Friday, November 22, 2013

MPEG-DASH live streaming in nginx-rtmp-module

I'm pleased to announce MPEG-DASH support in nginx-rtmp-module. Browser-side support in implemented in dash.js library.

Setting up nginx-rtmp-module

Check out dash branch of nginx-rtmp-module. Dash configuration is similar to HLS
location /dash {
  root /tmp;


application myapp {
  live on;
  dash on;
  dash_path /tmp/dash;
Dash module will create m4v, m4a, mpd files in its directory.

Setting up dash.js

  • Check out live branch of my dash.js fork
  • Set up nginx location serving dash.js contents and prepare streaming html. For this purpose modify (or copy) baseline.html in dash.js root and put your mpd (dash playlist) url in it instead of the default one
  • Open that html in browser and watch the stream published to nginx-rtmp-module


  • I only tested DASH streaming in Chrome, it seems other browsers are poorly supported now. However I need feedback about other browsers.
  • Video should be h264 encoded with Baseline profile. Other profiles will not work! Audio is AAC.
  • Vanilla dash.js does not play live streams well. I've submitted pull request to the project.

I want to thank Stephen Basile for his great work on dash module! He implemented all basic MPEG-DASH stuff including protocol manifest and mp4 writer.


  1. Hey Roman,

    Thank you for all of your effort with this module, it's enabled us to break away from Wowza and ditch all the licenses involved. One thing that I can't seem to find any documentation on is the variant directives for MPEG-DASH - does nginx support this in a similar fashion to the "hls_variant" directive?

    Again, thanks!

  2. Hi, excuse me, nginx plus support dash for vod? Thanks in advance.

  3. Hi, I've tried to use nginx-rtmp to gen dash. Everythings is allright. Play very good on dashas player. But, I cannot play stream on DASHIF player.

    Please help me! Thanks!

  4. How can we get this to work with h265?

  5. I cannot configure nginx it is too hard :(

    1. IMO It is probably the easiest Nginx config I've ever applied.. Copy and paste from the github example..