NGALAC/Subsystems/RTMPserver

From Noisebridge
Revision as of 18:27, 10 May 2018 by Rando (talk | contribs) (Created page with "== RTMP server configuration == In order to receive external videos, an RTMP server is required. NGINX is a well known web server and has a RTMP module, and there is a versi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

RTMP server configuration

In order to receive external videos, an RTMP server is required.

NGINX is a well known web server and has a RTMP module, and there is a version with pre-built with the rtmp module available for windows. The configuration is straight forward after that.

This configuration is specifically for Windows 10 as the existing instructions on the internet are not great. Linux is available here[[1]]

1. Download pre-compiled nginx version Gryphon 1.7.11.3 higher versions are not compiled with the rtmp server, do not download any other versions

[[2]]

2. unzip the folder whereever you wish. There is no need to install anything, it can be run directly from that directory.

Going forward I will use c:\nginx\

3. create the file c:\nginx\conf\nginx.conf

include nginx-win.conf;

rtmp {

    server {
        listen 1935;
        chunk_size 4096;

        application live {
            live on;
            record off;
        }
    }
}

Note the semicolons at the end of each line. If yo are aware of a port conflict, please just chose another port. The client will stream to this port so it doesn't matter.

This configuration is simple and sufficient to handle one incoming stream.

4. Once complete, open a PowerShell and nagivate to the directory. run the nginx.exe binary. If the shell does not return to a prompt, then the server is running. If it's not working, go to the troubleshooting section.

5. Check server by loading a local webpage. open a browser and type http://localhost. A page should appear welcomnig you to nginx. If not, please go to the troubleshooting section.

6. The server is set up and ready to test with OBS. boot obs and add the following configuration.

Add a new source and select VLC media source.

hit the '+' sign and type in the ip address of the source stream. This is not "localhost" or the ip of the rtmp server (unless VLC will be playing on the same machine as the rtmp server).

the address will look like:

http://192.168.1.10/live/<key>

The <key> is up to you to choose, but is near meaningless as long as it exists. t=This is the "stream key" that will be used to identify the stream source.

http://192.168.1.10/live/mykey