Doing my own research before asking here, I understand that PeerTube works similar but not the same as torrent protocol works and it seems to me that it uses the WebTorrent protocol, that means that I “share” fragments of the video I watch, and that the server although not behaving as a peer, provides the information to other servers.
Sincerely, even doing this research, I had many questions…
-
What happens if a video has no peers? Is it simply unplayable?
-
If a video has few peers, will only a part of it be playable?
-
To share fragments of a video I need to be consciously in the video? I mean, in a torrent program I open it in the background and forget about it, but in the case of PeerTube there is no desktop program as such to share in the background the videos I have already watched.
-
If I as a user share a video, and after a while I turn off my PC and I was the only one who saw it, no one else will be able to play the video until I turn on the PC?
-
This will sound stupid, but why do servers have a storage limit per user if the server as such does not share fragments of it?
Thanks and apologies for the stupid questions.
Well. Lots of it are technical details. The protocol has changed a bit but the way it works is as follows: The server stores the video. It delivers it via HTTP protocol to the viewer. If multiple people watch it simultameously (have the same video opened in their browsers) they help redistributing fragments to each other. This takes some load from the server. Coordination also happens via the server.
If there are no peers, you get the video delivered by the server. This happens most of the times anyways. It may stutter or take some time to load if the server is too busy.
Everything is watchable as long as the server is online. If the fragment isn’t offered by someone else, it’s just fetched from the server. If the server goes offline, the page won’t load anymore and the video is gone. this rarely happens or only for maintenance.
If you close your browser window or click on another video, you leave the swarm and stop redistributing that video.
The videos are stored by the servers. And people overestimate how much the peer2peer approach works. In reality it’s easily >90% delivered the traditional way by the server to the viewer.
I’m no expert, but this is my understanding:
Videos by default are transmitted from the server directly. If there are any peers, they will help with the load. Videos will always be playable as long as the server that’s hosting it is online.
This part I’m less sure about, but I would assume that as long as you are on the page, you are a peer. I would also assume that you only peer parts that you have watched or were loaded, because that makes sense. Any parts no peer has loaded would be transmitted by the server itself.
Servers have a storage limit because it is incredibly costly to store and stream videos online, as I have learned from tech tips Linus guy. If a user decided they wanted to upload 20TB of nascar videos (which is stupid, nobody watches nascar), that would be way too expensive for the server admin. It’s just a way to keep costs down. And also, peertube, being federated, also helps with storage costs, because no single server has to be responsible for storing all the videos anyone ever uploads.
I’ve been thinking about peertube a lot recently, and how incredible it is. It really seems to solve a lot of problems related to the immense cost of video hosting. It really gives the people power, instead of relying on multi billion dollar companies who can afford the cost with all their investor money. I think it has the potential to grow really big, and spread the cost out. I don’t know if this will ever happen. Hopefully a mastodon/lemmy moment happens to peertube.
So that’s my take. Hopefully most of it is correct.
I think that’s a pretty good overview. It’s too bad you had to rewrite that entire comment because you accidentally deleted the first draft. What a shame that some parts are probably worse off because you didn’t remember all that you wrote. The mental toll that would take must have been immense. Hope you’re doing ok
As said above, but shorter: the videos are stored on the servers like on a “regular” video hosting website. If there are peers available, then it relies on P2P for whatever’s working; if not, it acts like a regular video website.
To share fragments of a video I need to be consciously in the video?
I actually have no idea about this one!
I’m not affiliated with Peertube development so this is just my understanding, but a video is hosted by the website just like any other platform, so a video without peers will stream you that copy and that’s also why there is a storage limit.
Sharing a video over the WebTorrent protocol is mainly to speed up the streaming when say someone is closer to you than the server sharing that video.
Afaik, Peertube instances do allow you to copy a video’s magnet link for you to seed with your torrent client if you’re feeling generous. Anyone else feel free to correct me if anything is wrong.