There is a page on official documentation (docs.joinpeertube.org) (which needs to be updated to reflect the removal of WebTorrent but is still relevant on hls parts).
Here is the one concerning us:
" - If using the HLS player (depending on the admin transcoding configuration):
- The player loads the HLS playlist using hls.js from the origin server
- PeerTube provides a custom loader to hls.js that downloads segments from HTTP but also from P2P via WebRTC
- Segments are loaded by HTTP from the origin server + servers that mirrored the video and by WebRTC from other web browsers that are watching the video. They are used by hls.js to stream them into the <video> HTML element"Could there be a benefit to P2P distribution of bandwidth that isn't just at the video level, but perhaps at the instance level, where they choose to federate with other instances that also agree to share the P2P load? Or rather, to share the P2P wealth?
Federated instances that enable redundancy copy all resolutions of a video that meet chosen criteria of popularity. When a user views the video on PeerTube, their browser grabs the sections of the video from any of the PeerTube instances that have a copy, creating an ad-hoc distributed CDN. This covers the mid-level of popularity and keeps the hosting instance from getting slammed on bandwidth.
If something goes viral, or during livestreams which are by nature simultaneous, then the p2p in the browser between viewers kicks in and reduces load on the peering servers even more.
But what about the prospects of distributing the load that isn't localized to a particular video? As in, users do some peer to peer load distribution of any and all videos above the threshold, regardless of whether it's the one they are watching?
Does this mean the list of IP addresses of people currently watching a video is necessarily public?
edit: the main FAQ on the website still clearly says, it is p2p. But now I am curious if they really implemented their own p2p solution, or if this is outdated.
https://joinpeertube.org/en_US#what-are-the-main-advantages-...
"Help share videos being played"
It has worked surprisingly well in my testing during livestreams when you can count on multiple simultaneous viewers.
I'm still going through it, but I suspect so far they are transcoding via HLS and then streaming it out over the p2p connection.
The p2p connetion itself is interesting again, I suspect a regular websocket that is sitting on their express server.. but will dig some more. Was always curious .
https://github.com/Chocobozzz/PeerTube/blob/develop/client/s...
Almost nobody uses PeerTube. Here's the "Trending" list on Hardlimit.[1] 217 views of the top video. A video I posted two days ago to illustrate a bug report is in 9th position, with 14 views. This is pathetic.
Maybe if they got Wordpress integration, so Wordpress sites could serve videos via Peertube, it might take off. And get more sites to support auto-embedding of PeerTube videos, so that just providing a link produces a playable video.
The post says they dropped webtorrent in favor of HLS. Does this mean Peertube is no longer peer-to-peer?
HLS is a codec or container format or something, whereas webtorrent sounds like a method to have peers stream video data to each other such that the server doesn't easily bog down under traffic spikes. That seemed like a fundamental advantage of Peertube over other platforms and I thought that's why the name was chosen. Am I misreading it or has this truly been dropped now?
The post says HLS is also a brick in peer-to-peer streaming but.. it's not? I've used it, it's a container format that encapsulates video data, something like MP4 or MKV, not something that sets up peering sessions. HLS data would rather be something that webtorrent could be gossiping, if webtorrent weren't removed.