NGALAC/Subsystems/RTMPserver
RTMP server configuration[edit]
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
http://nginx-win.ecsds.eu/download/
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:9876/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:9876/live/mykey
For testing purposes, select "loop playlist" and "always play even when not visible"
press ok to save the soruce
make sure you order your sources so this is visible, just put it on top of everything
7. Set up VLC on the client machine
capture desktop / application
1. Media / Stream /Capture Device 2. Change Capture mode, device, as needed. 3. pick a nice frame rate like 24 fps, but less than 60. 4. The wizard will pop up, select screen or whatever else makes sense, this is local to your machine. 5. Next select <code>http</code> as the destination, then press <code>Add</code> 6. type in the parameters from the rtmp server: <code>port</code>9876 <code>path</code>/live/mykey 7. Next, Next, stream
This should appear on OBS now. There is no need to press anything else on OBS, it should "just work".
Troubleshooting[edit]
nginx won't start[edit]
Is there any output on on the shell when you launch it?
Assertion failed: ngx_shared_sockets->pid=pid
nginx is already running.
kill it by nginx.exe -s stop or kill all running processes of nginx in the task manager.
Config file errors
double check the braces { not parenthesis ()
double check the semi-colon ending each line ;
make sure there is no semi-colon after a brace }
nginx running but no webpage[edit]
not sure.
nginx running, obs configured, VLC streaming, no video on OBS[edit]
Confirm that the httplink is the same between VLC and OBS
The whole path has to be identical.
http://ip:port/live/key