Beardedbob
Member
Hi All,
I'm hoping someone can help, I've tired setting up a NGINX server on both Ubuntu 14 & Windows 7 with the same results. I've my gaming PC with OBS on it setup to steam to my second PC via the LAN.
I can get the stream to work over twitch by using a direct RTMP push feed and that works perfectly, the issue i'm having is when i want to stream from my OBS PC at a higher bitrate to my second PC which i then want to transcode into a lower format before uploading it to twitch.
The reason for this is that I want to record my OBS stream at a higher rate than I want to stream it at. The connection code i'm using is the following
rtmp {
server {
listen 1935;
chunk_size 4000;
application transcode {
live on;
record off;
exec ffmpeg -re -i rtmp://192.168.0.9:1935/trans/$name -vcodec libx264 -preset medium -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -r 30 -b:v 2000k -maxrate 2000k -bufsize 2000k -threads 12 -s hd720 -sws_flags spline -acodec copy -f flv rtmp://localhost:1935/live/${name};
}
application live {
live on;
record off;
push rtmp://live-lhr.twitch.tv/app/twitch_key;
}
}
but it doesn't stream to twitch. I've also tried removing the second stage out (app Live) and replacing the RTMP details in transcode section with the twitch appkey and this won't work either.
I know the server is correct as it works if I set OBS to go directly to live but its something in the transcode or ffmpeg. I've also got ffmpeg up and running with no errors so i'm a little lost and hope someone can help.
Here is my error log from my win7 server when in the two stage config above.
when its up and trying to work using both app code
2014/12/12 15:28:03 [notice] 2636#2628: using the "select" event method
2014/12/12 15:28:03 [notice] 2636#2628: using the "select" event method
2014/12/12 15:28:03 [notice] 2636#2628: nginx/1.7.4
2014/12/12 15:28:03 [notice] 2636#2628: nginx/1.7.4
2014/12/12 15:28:03 [info] 2636#2628: OS: 260100 build:7600, "", suite:100, type:1
2014/12/12 15:28:03 [notice] 2636#2628: start worker processes
2014/12/12 15:28:03 [notice] 2636#2628: start worker processes
2014/12/12 15:28:03 [notice] 2636#2628: start worker process 2608
2014/12/12 15:28:03 [notice] 2636#2628: start worker process 2608
2014/12/12 15:28:03 [notice] 2608#2624: nginx/1.7.4
2014/12/12 15:28:03 [notice] 2608#2624: nginx/1.7.4
2014/12/12 15:28:03 [info] 2608#2624: OS: 260100 build:7600, "", suite:100, type:1
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2540
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2540
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2640
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2640
2014/12/12 15:28:03 [notice] 2608#2624: create thread 1900
2014/12/12 15:28:03 [notice] 2608#2624: create thread 1900
2014/12/12 15:28:17 [info] 2608#2540: *1 client connected '192.168.0.9'
2014/12/12 15:28:17 [info] 2608#2540: *1 connect: app='transcode' args='' flashver='FMLE/3.0 (compatible; FMSc/1.0)' swf_url='rtmp://192.168.0.18/transcode' tc_url='rtmp://192.168.0.18/transcode' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 192.168.0.9, server: 0.0.0.0:1935
2014/12/12 15:28:17 [info] 2608#2540: *1 createStream, client: 192.168.0.9, server: 0.0.0.0:1935
2014/12/12 15:28:17 [info] 2608#2540: *1 publish: name='test' args='' type=live silent=0, client: 192.168.0.9, server: 0.0.0.0:1935
I'm hoping someone can help, I've tired setting up a NGINX server on both Ubuntu 14 & Windows 7 with the same results. I've my gaming PC with OBS on it setup to steam to my second PC via the LAN.
I can get the stream to work over twitch by using a direct RTMP push feed and that works perfectly, the issue i'm having is when i want to stream from my OBS PC at a higher bitrate to my second PC which i then want to transcode into a lower format before uploading it to twitch.
The reason for this is that I want to record my OBS stream at a higher rate than I want to stream it at. The connection code i'm using is the following
rtmp {
server {
listen 1935;
chunk_size 4000;
application transcode {
live on;
record off;
exec ffmpeg -re -i rtmp://192.168.0.9:1935/trans/$name -vcodec libx264 -preset medium -x264opts nal-hrd=cbr:force-cfr=1:keyint=60 -r 30 -b:v 2000k -maxrate 2000k -bufsize 2000k -threads 12 -s hd720 -sws_flags spline -acodec copy -f flv rtmp://localhost:1935/live/${name};
}
application live {
live on;
record off;
push rtmp://live-lhr.twitch.tv/app/twitch_key;
}
}
but it doesn't stream to twitch. I've also tried removing the second stage out (app Live) and replacing the RTMP details in transcode section with the twitch appkey and this won't work either.
I know the server is correct as it works if I set OBS to go directly to live but its something in the transcode or ffmpeg. I've also got ffmpeg up and running with no errors so i'm a little lost and hope someone can help.
Here is my error log from my win7 server when in the two stage config above.
when its up and trying to work using both app code
2014/12/12 15:28:03 [notice] 2636#2628: using the "select" event method
2014/12/12 15:28:03 [notice] 2636#2628: using the "select" event method
2014/12/12 15:28:03 [notice] 2636#2628: nginx/1.7.4
2014/12/12 15:28:03 [notice] 2636#2628: nginx/1.7.4
2014/12/12 15:28:03 [info] 2636#2628: OS: 260100 build:7600, "", suite:100, type:1
2014/12/12 15:28:03 [notice] 2636#2628: start worker processes
2014/12/12 15:28:03 [notice] 2636#2628: start worker processes
2014/12/12 15:28:03 [notice] 2636#2628: start worker process 2608
2014/12/12 15:28:03 [notice] 2636#2628: start worker process 2608
2014/12/12 15:28:03 [notice] 2608#2624: nginx/1.7.4
2014/12/12 15:28:03 [notice] 2608#2624: nginx/1.7.4
2014/12/12 15:28:03 [info] 2608#2624: OS: 260100 build:7600, "", suite:100, type:1
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2540
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2540
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2640
2014/12/12 15:28:03 [notice] 2608#2624: create thread 2640
2014/12/12 15:28:03 [notice] 2608#2624: create thread 1900
2014/12/12 15:28:03 [notice] 2608#2624: create thread 1900
2014/12/12 15:28:17 [info] 2608#2540: *1 client connected '192.168.0.9'
2014/12/12 15:28:17 [info] 2608#2540: *1 connect: app='transcode' args='' flashver='FMLE/3.0 (compatible; FMSc/1.0)' swf_url='rtmp://192.168.0.18/transcode' tc_url='rtmp://192.168.0.18/transcode' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 192.168.0.9, server: 0.0.0.0:1935
2014/12/12 15:28:17 [info] 2608#2540: *1 createStream, client: 192.168.0.9, server: 0.0.0.0:1935
2014/12/12 15:28:17 [info] 2608#2540: *1 publish: name='test' args='' type=live silent=0, client: 192.168.0.9, server: 0.0.0.0:1935