NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Integrate with BitTorrent?

Open stokebreakup opened this issue 1 year ago • 7 comments

Checklist

  • [X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • [X] I have read the FAQ and my problem isn't listed.
  • [X] I'm aware that this is a request for NewPipe itself and that requests for adding a new service need to be made at NewPipeExtractor.
  • [X] I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise.
  • [X] This issue contains only one feature request.
  • [X] I have read and understood the contribution guidelines.

Feature description

Integrate with BitTorrent? (should we support BitTorrent network protocol for low speed devices and poor download connections? or to sync downloaded videos between devices?)

Why do you want this feature?

perhaps this could contribute positively to these issues: Support for Variable Resolution Based on Internet Speed, Sync between devices, Self-host your own list of subscriptions, Self-hosted sync server?. In p2p networks, everyone is "partially a server". Understand server (who actually serves, shares or stores information. Or who consults, extracts, transfers or backs up this or that information). In p2p technical terminology, there are six categories of servers (peers, leechers, seeds, trackers, indexers, dhts). Peers are people who want to download things, trackers are used to find peers and seeds. Indexers (store torrent files for seeds and peers), seeds are those that have the full file or those that share the full file. DHT are servers that distribute file information (hashs). In short, you could have a graphical interface that automatically queries network nodes for the type of video resolution and the type of internet connection. Something you do manually through NewPipe or when you access YouTube does it for you.

maybe this would be expensive and laborious (unless the community New Pipe want to release a version of New Pipe Plus that implements private sync for this, where the user has video backup and can manage the video format from another device). And it is expensive because you have to have hosting, server, DNS, authentication, etc (which would justify or exemplify why it is expensive and laborious, and why it was done). this would be useful, because each person in a p2p network is each a server, which makes it less expensive and laborious. In short, implementing a p2p network can solve the above problems instead of creating a huge code base to manage and maintain. and also because p2p is already something done in NewPipe, although not fully with BitTorrent support.

Additional information

Another way to solve this (https://github.com/TeamNewPipe/NewPipe/issues/3382, https://github.com/TeamNewPipe/NewPipe/issues/5325) would be to include rclone(https://github.com/x0b/rcx) (rclone syncs across different clouds, after the user provides the password, you can check on the client side the connection type for the video format type. Because if the user wants a low resolution video because of the internet, he/she can query his Google Drive for the corresponding video format. Google Drive also has a certain way to check the file format and internet connection, and thus download a certain format if there are any upload and download restrictions).

The problem with the first(community host) and second(self-host) solutions is who will pay the bill (the community with a private server for this, just like YouTube does. Or the user with an account on a hosting service for this.) In my opinion this doesn't make much sense when you are a user outside of YouTube (because as a YouTube user, all of this is implemented easily and independently with the New Pipe app). A good solution between self-host and community host (synchronization would be BitTorrent). Because NewPipe is already partially p2p, you download the file and share it; but not fully p2p. And you could partner with content creators so they have control over the number of legal downloads and shares.

When the user does not trust a person(YouTube) or when he/she does not pay the bill(sync Google Drive, etc), there is a third way (which is the middle ground between the first and second way). In this case, p2p and BitTorrent. In the p2p case (this is done manually by NewPipe) it is already programmed and works well. What I request is an automatic way(BitTorrent), where different users share legal files for which they have permission and means to do so instead of manually. And it could be a good thing or a bad thing, but it needs more people to evaluate it.

stokebreakup avatar Jun 30 '24 16:06 stokebreakup

It's not exactly clear what you want. You've provided an alogorithm and its many possible uses. But what is the end result you're looking for? What purpose is the app currently not serving?

opusforlife2 avatar Jul 01 '24 09:07 opusforlife2

video sharing

There's a share button.

backup

Newpipe has a backup feature, both for subscriptions and the entire database and settings.

efficient storage

Storage efficiency depends on video and audio codecs. Newpipe cannot do anything about that. If you're facing storage issues download lower resolutions/smaller files.

whether it would be interesting for newpipe to be a p2p client

Why does it need to be?

opusforlife2 avatar Jul 01 '24 20:07 opusforlife2

Could this be done automated?

There is already an issue for speed-based variable resolution.

What I'm asking for is a way to download, share and store videos in a p2p way.

I'm pretty sure that's out of scope for Newpipe. P2P is a massive feature that will need prior expertise and constant maintenance. Still, let's see what the devs say.

opusforlife2 avatar Jul 03 '24 08:07 opusforlife2