CFanのBlog

A good day for snow-viewing

Setting up an RTMP server with nginx for live streaming

Translated from the Chinese original by Claude.

Just making a note of this.

First, build nginx with the RTMP module

Download the source code for nginx and the RTMP module

Go into the root of the nginx source tree

Next, configure nginx.conf

vi /usr/local/nginx/conf/nginx.conf

Add a basic RTMP configuration

For all the RTMP module’s settings, see https://github.com/arut/nginx-rtmp-module/wiki/Directives

If you have a firewall, remember to open port 1935.

That’s the basics set up. Use any streaming software, OBS for example: set the FMS URL to rtmp://IP/live and type anything you like as the stream key, test for instance.

Once you start streaming, you can watch the live stream at rtmp://IP/live/test in any player that supports RTMP.

That’s it for now; I’ll dig deeper some other time…

One response to “Setting up an RTMP server with nginx for live streaming”

  1. 奶茶 Avatar

    怎么到这就结束了。。。

Leave a comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.