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


Issues

  • 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.

10 comments:

  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!

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

    ReplyDelete
  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!

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

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

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

      Delete
  6. Live streaming is the latest fad on social media so make sure to get live with your audience from time to time.
    Live streaming would give you a more intimate space with your viewers and encourage them to interact with you more often. It would allow more personal interaction with your audience in real time.
    You can also share your live videos later, so that those who have missed out the live streaming can view them again. A tour of your business, a demonstration of your products or an interview with the creators are some of the possible content which can be created with a live video.
    Make sure to make the most out of the apps which allows you to go live directly from the blog.

    ReplyDelete
  7. Live streaming is the latest fad on social media so make sure to get live with your audience from time to time.
    Live streaming would give you a more intimate space with your viewers and encourage them to interact with you more often. It would allow more personal interaction with your audience in real time.
    You can also share your live videos later, so that those who have missed out the live streaming can view them again. A tour of your business, a demonstration of your products or an interview with the creators are some of the possible content which can be created with a live video.
    Make sure to make the most out of the apps which allows you to go live directly from the blog.

    ReplyDelete
  8. Live streaming is the latest fad on social media so make sure to get live with your audience from time to time.
    Live streaming would give you a more intimate space with your viewers and encourage them to interact with you more often. It would allow more personal interaction with your audience in real time.
    You can also share your live videos later, so that those who have missed out the live streaming can view them again. A tour of your business, a demonstration of your products or an interview with the creators are some of the possible content which can be created with a live video.
    Make sure to make the most out of the apps which allows you to go live directly from the blog.

    ReplyDelete