nginx-rtmp-module how to install and use

164 views
Skip to first unread message

Peter Fanter

unread,
Jan 16, 2015, 2:57:59 AM1/16/15
to matterho...@opencast.org
greetings all,

could someone inform us where we could find detailed guidelines in order to install nginx in order to replace wowza? we do not need it for live streaming, just to stream our already recorded and stored videos,

or if you have experience and could suggest us best practices.

thank you in advance

Hans Erasmus

unread,
Jan 16, 2015, 3:30:46 AM1/16/15
to matterho...@opencast.org
Hi Peter

Here is the official link to the installation instructions of nginx-rtmp module for Matterhorn:

https://opencast.jira.com/wiki/display/MHDOC/nginx-rtmp

Please take note, videos have to be in .mp4 format for this to work properly.  The guide (url) listed above is quite detailed thanks to the original author of the post.

Regarding best practice, it all depends on the type of installation you have.  Be it a distributed file system or not. If you are using a distributed file system, or if your streaming server "stand-alone" with regards to your Matterhorn installation, the streaming directory that you set up must be readable by both the MH installation and the streaming server.

Hope this sends you in the correct direction at least.

Regards

Hans

To unsubscribe from this group and stop receiving emails from it, send an email to matterhorn-use...@opencast.org.

Mikey Orr

unread,
Jan 16, 2015, 2:19:53 PM1/16/15
to matterho...@opencast.org
Hey Peter-

We're using nginx+rtmp to do streaming here at UCSC. I followed the guide that Hans point you too and it worked just fine. I can offer additional help, if you need it.

In terms of setup, we have a 3-node Matterhorn 1.5.1 setup (core/worker/engage). We have a custom workflow and encoding profile that ingests/distributes videos as quickly as possible, and then we go back and re-ingest videos for segmentation/OCR/downloading, etc. This process works really well in getting the video published as quickly as possible. The encoding profile looks like this:

profile.mp4-passthru.name = mp4-passthru
profile.mp4-passthru.input = visual
profile.mp4-passthru.output = visual
profile.mp4-passthru.suffix = -passthru.mp4
profile.mp4-passthru.mimetype = video/mp4
profile.mp4-passthru.ffmpeg.command = -i #{in.video.path} -threads 0 -vcodec copy -acodec copy -movflags faststart #{out.dir}/#{out.name}#{out.suffix}

The incoming file (from the capture agent) is already an MP4, all we do is cleanup the container a bit and relocate the MOOV atom to the front of the file for streaming (that's what -movflags faststart does). After that, the file gets published and nginx does the rest. Here's a link to our engage player site, if you want to see it in action:

http://matterhorn-player-1.lt.ucsc.edu:8080/engage/ui/index.html

Like I said, not everything is segmented/OCR'd just yet. We're still working through some bugs and other config issues (including cleaning up the HTML). That being said, the streaming part works really well! That nginx plugin also produces a nice little "moment in time: stats page, that can be interesting to keep an eye on:

http://matterhorn-player-1.lt.ucsc.edu/stats

Hope that helps out. =)

-Mikey



--
Mikey Orr
Learning Technologies Mac/Unix Systems Integrator
ITS @ University of California, Santa Cruz

Rüdiger Rolf

unread,
Jan 19, 2015, 8:16:38 AM1/19/15
to matterho...@opencast.org
Hi Peter,

the guide on how to install nginx is here:
https://opencast.jira.com/wiki/display/MHDOC/nginx-rtmp

There is no migration guide yet.

If you are only using MP4 files the migration is very easy. Just let nginx point to the streams-directory that you already use and it will work.

If you are using FLV files the migration could be be troublesome:
1. All FLV files will need some additional metadata (keyframe references, etc) that has to be injected with a third-party software.
2. The RTMP-links to FLV files are different between nginx and the rest of the streaming servers. In Matterhorn 1.6 is a new added config option available for this. But that has only influence on newly published epiosdes.

And a general remark on upcoming features:
In the upcoming HTML5 player for Matterhorn (workname Theodul) you will have a HLS streaming option. We only created a HLS-distribution module for Wowza so far, and I am not sure if somebody will write any distribution modules for other streaming servers that cover the HLS-streaming feature than Wowza at the moment... So if you already use Wowza, you might consider this.

Regards
Rüdiger

Am 16.01.15 08:57, schrieb Peter Fanter:
To unsubscribe from this group and stop receiving emails from it, send an email to matterhorn-use...@opencast.org.


-- 
________________________________________________
Rüdiger Rolf, M.A.
Universität Osnabrück - Zentrum virtUOS
Heger-Tor-Wall 12, 49069 Osnabrück
Telefon: (0541) 969-6511 - Fax: (0541) 969-16511
E-Mail: rr...@uni-osnabrueck.de
Internet: www.virtuos.uni-osnabrueck.de
Reply all
Reply to author
Forward
0 new messages