SVC video are a great feature for normal streaming website in order to adapt content to user bandwith,
it seems to me really important that peertube support this kind of feature.
Don't know how difficult it can be to do this in peer to peer.
Some links :
https://forum.bittorrent.com/topic/29889-bittorrent-scalable-video-coding/
https://pdfs.semanticscholar.org/ea81/c29cac62cda6104432ca90040d7fdc0637b8.pdf
Edit: Not sure this link use scalable word as referring to "SVC" Video : https://github.com/bradparks/nile.js__Scalable-peer-to-peer-live-video-streaming-built-on-torrents-and-webRTC
SVC seems great but unfortunately it doesn't seem to be supported by web browsers.
For now we generate multiple resolution files (so 1 torrent per resolution), and the client choose its definition -> we have 1 swarm per resolution. It's not ideal but better than nothing.
As far as i understand, firefox and chrome support SVC for VP8 temporal (aka framerate) scalability. (VP8 doesn't support other kind of scalability). i do think it's a bit more complex than just framerate, as i understand this technology, frame are create in order to match the most correctly without some frame.
https://bugzilla.mozilla.org/show_bug.cgi?id=1343143
Not sure if temporal scalability is very useful for replay, but if peertube plan to support livestream, that's important.
For vp9, which support also quality and spatial (aka size) scalability, the feature exist in chrome. Don't know if is it activated now. You can have all these feature at the same time in fact.
https://webrtchacks.com/chrome-vp9-svc/
SVC required also special encoding (SVC file is a bit bigger than AVC, standard equivalent) and of course special filetype, that's why vp8 (and soon vp9) should be the preferred format of transmission.
@Chocobozzz "we generate multiple resolution files", I don't seem to be getting this on a dev installation of peertube (the one from PeerTube-Docker), is this documented somewhere ? Is there an option ? Does it require additional software ? Is it only available for certain types of formats ?
@arthurlutz This is opt-in.
https://github.com/Chocobozzz/PeerTube/blob/develop/config/default.yaml#L46
Maybe this Javascript library would be of some help : https://github.com/Dash-Industry-Forum/dash.js
It's entirely client-side and you only need to generate the video properly with ffmpeg
I think we can close this issue since the server generates multiple video definitions and the client handle them.
@Chocobozzz This seems like a potential game-changing improvement to me.
I am no specialist, but as far as I know, scalable video coding (introduction) allows to store multiple streams with different resolutions (spatial) or framerates (temporal), for a marginal increase of file size, and a few improvements can be gained from that (it seems like you are already aware of most, though):
So, we already have a way to work around that basic problem, so why is SVC important?
Consider the following use case: 5 people are streaming a video, two of them with a lower quality setting. Currently:
Now, with SVC:
Note: (3) could be configurable as an "auto" option like on YouTube: if the user selects a quality, the client would wait for the video to be fully buffered before unpausing it.
In my opinion, what makes SVC a strong fit for PeerTube, much more so than the other platforms, is that it makes every client download the same and unique file (or parts of it), which is nice for torrenting.
Now, on the downsides:
But in any case, I don't think that having multiple video files quite solves the same problems, so I wouldn't have closed this issue ;)
Most helpful comment
@Chocobozzz This seems like a potential game-changing improvement to me.
I am no specialist, but as far as I know, scalable video coding (introduction) allows to store multiple streams with different resolutions (spatial) or framerates (temporal), for a marginal increase of file size, and a few improvements can be gained from that (it seems like you are already aware of most, though):
So, we already have a way to work around that basic problem, so why is SVC important?
Consider the following use case: 5 people are streaming a video, two of them with a lower quality setting. Currently:
Now, with SVC:
Note: (3) could be configurable as an "auto" option like on YouTube: if the user selects a quality, the client would wait for the video to be fully buffered before unpausing it.
In my opinion, what makes SVC a strong fit for PeerTube, much more so than the other platforms, is that it makes every client download the same and unique file (or parts of it), which is nice for torrenting.
Now, on the downsides:
But in any case, I don't think that having multiple video files quite solves the same problems, so I wouldn't have closed this issue ;)