4 ms·
I just did a side project at work dealing with live streaming, it's actually fairly simple if you understand ffmpeg. You can stream DASH like this: ffmpeg
by Sir_Cmpwn 8y ago
I just did a side project at work dealing with live streaming, it's actually fairly simple if you understand ffmpeg. You can stream DASH like this:
ffmpeg -i [...] -codec:v libx264 -profile:v baseline -pix_fmt yuv420p -codec:a aac -tune zerolatency -f dash -window_size 5 /tmp/live/live.mpd
Check out the ffmpeg-formats man page for a list of options you can use with -f dash. Then serve /tmp via nginx and point the reference client [0] at your mpd file. Tada!
You might want to use the nginx RTMP module, too, if you want to receive an RTMP stream from e.g. obs and wang-bang it into DASH.
[0] http://reference.dashif.org/dash.js/v2.6.8/samples/dash-if-reference-player/index.html http://reference.dashif.org/dash.js/v2.6.8/samples/dash-if-r...
I'll write up a more detailed blog post at some point.
- madeofpalk 8y agoDoes Safari support DASH yet? Or, does Chrome support HLS?
- Sir_Cmpwn 8y agoDash.js polyfills it in for unsupported browsers and it works fine, I suggest just using that and not worrying about it.
- melito 8y agoSafari doesn't support DASH and probably will not. Chrome does not support HLS. DASH isn't plug and play. It's an XML representation describing how to ingest media streams using something like Media Source Extensions. There are a lot of players out there that will do this heavy lifting for you.
- j4pe 8y agoI would definitely read that post. I've had bad times in the past with video codecs.