MPEG Dash as a streaming option

  • I have been playing with ffmpeg and found that there is an option for making mpeg dash compliant file chunks. There is a playlist similar to HLS, but is a .mpd instead of .m3u8. Found some good details on stackoverflow. Preliminary command line testing shows me that using it with codec "copy" uses minimal cpu, just as with creating the HLS files.

    ffmpeg -i rtsp:// -codec copy -f dash test.mpd

    For further details about additional flags for tweaking dash output, run the following command

    ffmpeg -h muxer=dash

  • administrators

    Interesting, last time I saw mpd it was about webm playlists. Maybe if I can work this in, might be able to get webm playlists too 🤔 Thanks!

  • @moeiscool ffmpeg -h muxer=webm reveals some option about dash. Is there some reason you want to burn up your cpu by transcoding video?

  • administrators

    Recently we got hardware acceleration, so maybe we can use the GPU for it

  • @moeiscool I have mpeg dash working using dash.js. Tested on mac using ff, chrome, safari and windows using ff and chrome. Quality is just as good as HLS. Lag behind realtime is nearly equivalent to HLS. I will have to fully test but I want to see if chrome playing 10 simultaneous videos will run with a high cpu load and ram, or not.

  • administrators

    @kevingodell sweet. I think the reason hls.js uses a lot of RAM is because it caches the stream so you can seek it later. I tried destroying and reinit on timer but that proved to be a very bad solution... the flicker was just bad.

    If it has some way to remove old data that would be perfect or if the browser handles it then that would be even better.

  • @moeiscool I think what read about hls.js is that it takes each segment, reads it, breaks it down, recombobulates it, and then feeds it to the video player. With all of that client side processing, I can imagine why the load is what it is. Hopefully dash chunks can get swallowed easier by some browsers.

  • I made the code example on a gist. The tricky thing that messed me up was that if I did not include the -b:v, then the manifest.mpd file was malformed and no browser would play the video. Also, the flag -remove_at_exit 1 only seemed to work if I had it at the end.

  • administrators

    quick update on this suggestion :
    latest dev can use MPEG-DASH but it still needs a lot of work for fluidity.


Looks like your connection to Shinobi Forum was lost, please wait while we try to reconnect.