Alexander / Aebian

Who am I?

Musician, Programmer, Linux Geek and what not.  more...


The Categories



Stuff

Arma CodeList
Legal Things
GitHub Projects
Media Creations
My Hardware
My Wishlist
Player
Some Spotify


August 15th at 12:21am
Report a website issue
For best viewing experience use a 4k screen.
Sidebar ➠

❬ Back to Blog


How to build the nginx RTMP module


Want to enable RTMP streaming on nginx? Here's how.

Greetings folks,

This post will cover how to build the rtmp module for nginx without the need to re-compile your whole nginx installation.
Things you need:

Be sure that the version of nginx you download matches your installed version. Use sudo nginx -v to find your correct version.
Download the nginx code with wget or curl. Clone the rtmp source code into a directory of your choice.

git-folderview.png

The next step is to build the module.


Enter the directory of the nginx source code. Then compile the sources using the following command:

nginx-code.png

Once the compilation has finished build the module.

Next step is to copy the module (.so extension) to the desired folder where nginx expects it to be:

sudo mv objs/ngx_rtmp_module.so /usr/lib/nginx/modules/

Then instruct nginx to load the module by creating a config file under /etc/nginx/modules-enabled/nginx-rtmp.conf.


That's it. If you want to use the module then add the following section to your nginx.conf


Over and Out

Aebian