The use case described here is very much the same as the YouTube's feature where a lower resolution of the video is selected if the user's network speed is low. But, I'd like to do this only at the start of the video.
Currently, I'm transcoding the videos uploaded by the user into webm format (VP8 and Vorbis to be specific) using Gstreamer. And, I'm transcoding the video into different resolutions, so I'll get many video files (of those resolutions) in webm format. I can use a good video player to render those resolutions by just giving an option to the user (so that the user can choose a resolution; of course at the start, a default resolution is played).
Hence I thought of implementing adaptive streaming where streams are broken into a series of small segments and those segments are made available at different qualities and bit rates. Is it possible to achieve above mentioned feature in any other way?
There are a few ways to achieve adaptive streaming:
- HLS (by Apple)
- Smooth Streaming (by Microsoft)
- MPEG DASH
I'd like to use MPEG DASH to achieve the above mentioned feature. It is codec-agnostic and has a few other advantages.
I'd like to know how to go about implementing DASH using Gstreamer for properly encoding the video and producing the .mpd file (with different segments of the transcoded video). I'm new to videos and it'd be helpful if anyone could provide basic steps to go about it. If it is possible, then I can use Dash.js or other players which can handle DASH encoding to render the video on the client's side.
I also looked at other existing tools here (in Content Generator Section), but mostly the combining part (producing a .mpd file for the segments; even producing the segments) is codec-specific (H.264 encoding; mainly MP4 segments) using FFmpeg and MP4Box/Bento4.
I'd like to know if there are tools in Gstreamer to implement DASH for webm (or worst case, for MP4). If yes, then please let me know how to go about implementing it.