top | item 11815417

Scalable Live Video Streaming Using NGINX and MPEG-DASH/HLS

140 points| slederer | 9 years ago |nginx.com | reply

52 comments

order
[+] vhiremath4|9 years ago|reply
"but for ease of reading we refer to NGINX Plus throughout"

Uhuh. Suuuure. :p

[+] bcryptd|9 years ago|reply
I also would hesitate to call it "Live" without showing how to adjust for GOP sizes, key frames, B and I frames, etc.
[+] bcryptd|9 years ago|reply
The one thing I've always wanted from nginx-rtmp was the ability to pull from a source input instead of running a separate process with ffmpeg to push the stream over. If they could get that working my life would become less complicated quickly.
[+] jc4p|9 years ago|reply
yeah I use nginx-rtmp for local video capturing (basically the functionality of a mirror) and the lag that needing to re-encode + chunk + starting off at the beginning of the chunks in the playlist introduces is meh. I think I'm going to transition my project over to WebRTC though, since the mobile device I'm using to display the video can handle that now.
[+] nickysielicki|9 years ago|reply
> [I'd prefer] the ability to pull from a source input instead of running a separate process with ffmpeg to push the stream over.

Could you elaborate on this? I don't understand what you mean by 'push' and 'pull' in this context.

[+] alexcroox|9 years ago|reply
I wish there was a decent HTML5 low latency (< 2s) solution. Nothing comes close to RTMP + Flash still.
[+] dmm|9 years ago|reply
The scalability of DASH/HLS comes from the fact that the video segments are just static files sitting on a http server so they can be cached and distributed with the many techniques for serving static files over http.

If you don't need the scalability of DASH/HLS you can use the WebRTC apis for low latency streaming, usually <1s. WebRTC can be used for client-server applications just as easily as peer-to-peer using a gateway like Janus[1].

[1] https://janus.conf.meetecho.com/

[+] benwilber0|9 years ago|reply
HD RTMP to the client is extremely difficult to scale without an enormous investment in infrastructure. AFAIK BAM/MLB.TV are the only ones doing it.
[+] wrigby|9 years ago|reply
Abusing WebRTC can be a viable option in latency-critical applications, but it brings a bunch of other concerns with it (browser support, no way to leverage a CDN, etc).
[+] aleksanb|9 years ago|reply
The setup seems rather similar to https://github.com/arut/nginx-rtmp-module which I've used in the past. Perhaps they've bundled it with Nginx Plus without crediting the original authors? The project has a bit too permissive license for my taste.
[+] rch|9 years ago|reply
> Both NGINX and NGINX Plus support the features we’re discussing
[+] callmeed|9 years ago|reply
This looks cool. I'm very interested in live video but can someone enlighten me on the creation side of this equation?

How do I create an RTMP stream in the first place?

What camera can/should I use? Can I use webcam? Is there an iOS app that can do it?

What hardware/software is needed to create this RTMP stream that I'll be pushing to nginx?

[+] dylz|9 years ago|reply
ffmpeg, vlc, OBS Studio (this one is probably easiest; you can just add an image or add a webcam source etc then configure a rtmp url to push to)
[+] nickysielicki|9 years ago|reply
Lots of people in here commenting about nginx plus, but can anyone recommend a free alternative to BITMOVIN?
[+] hayksaakian|9 years ago|reply
video.js with the HLS plugin is fine if you don't need dash (there may be flash) but obviously that's very bare bones. It seems like there's things like ad support among other features you get with the suggested player.
[+] jordanbaucke|9 years ago|reply
Anyone have any insight on RTMP + HLS / MPEG-DASH -> WebRTC? Ala www.beam.pro (what they call FTL)?
[+] NEDM64|9 years ago|reply
Is there a way to mux subtitles written on the fly?

For example, I want to mux a subtitle stream, with the real time clock in it, into a video stream.

[+] mountaineer22|9 years ago|reply
How does this compare to Wowza?
[+] bcryptd|9 years ago|reply
It's not running on Java so it should be faster with the same hardware.
[+] benwilber0|9 years ago|reply
basically the same. I find nginx + ffmpeg to be easier and simpler than deploying Wowza. As well as free-er.
[+] kasparsklavins|9 years ago|reply
Working on a similar product but using peer to peer live video streaming. Since the data does not touch the server, there are no scaling problems.
[+] corobo|9 years ago|reply
Who's the target market? I think I'm a bit jaded as my first thought was this would open up the streamer to get DDoSed every time they try to stream
[+] jacquesm|9 years ago|reply
One-to-many or one-to-one?
[+] newman314|9 years ago|reply
FYI. The rtmp module broke recently with the recent nginx 1.11.0 release.