Question / Help Nginx-RTMP Routing

Rayj

Member
How do you set up Nginx.conf to route to a specific IP, based on the OBS stream setting of rtmp://"nginx-rtmp IP":1935/LPC1-LPC4
I am thinking that Nginx will forward the OBS rtmp to /LPC1 application, or LPC2, etc. application but it seems no matter what I put, LPC1-4, it sends it
to LPC1 application? Note that the applications are four LXD containers with Media Server software. Here is my nginx.conf:

user nobody;
worker_processes 2;

error_log logs/error.log;
error_log logs/error.log notice;
error_log logs/error.log info;
error_log logs/debug.log debug;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}

rtmp {
server {
listen 1935;
ping 30s;
ping_timeout 10s;
chunk_size 4096;

application LPC2 {
live on;
record off;
push rtmp://10.57.215.247:1935;

}
application LPC1 {
live on;
record off;
push rtmp://10.57.215.214:1935;

}
}
}

So from OBS Stream setting of rtmp://"nginx-rtmp server IP":1935/LPC2 would expect it to route to 10.57.215.247. Instead it is routing to the LPC1 app.

Any ideas how to trouble shoot this?
 

vapeahoy

Member
why would u even need this? what is the goal? If you're trying to save each step as it were for individual transcoding of feeds, there's been written several guides on that before that u could google. Ie you first receive a clean data feed that you can setup individual encodes on, ie to target various platforms, twitch,fb, yt, mobile etc. If u set it in obs to send to X application, it will be sent to that application. Rename your application without the silly numbering.
 
Top