<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span>Hi,<br><br>I have RTMP clients streaming to my local nginx-rtmp server so others can view the stream via HTTP (HLS and DASH). I also push the RTMP stream to Youtube on a live channel.<br><br>Pushing the stream to Youtube should be optional, in my case. In other words, if that fails for whatever reason, the client should still be able to publish to my local nginx server. Today, for some reason the youtube service failed, and the client stopped publishing.<br><br>I have two questions regarding this scenario.<br><br>1) Is it possible to silently and automatically by-pass the push to youtube, and keep streaming "locally"?<br><br>2) How can I set up two "applications" in nginx.conf so that both do exactly the same, except one streams (pushes) to youtube while the other doesn't? HLS and DASH settings (as well as paths) should be the same. Also, I currently cannot use ffmpeg to, eg., stream copy from one "application" context to another. Is there a way to do this without ffmpeg?<br><br>Here's part of my nginx.conf:<br><br>rtmp {<br><br>    server {<br><br> [...]<br>       application live {<br><br>            live on;<br><br>            record all;<br>[...]<br>            allow publish 10.215.145.120;<br>            allow publish 10.215.248.68;<br>            allow publish 10.215.248.54;<br>            allow publish 10.215.144.116;<br>            allow publish 127.0.0.1;<br>            deny publish all;<br><br>            allow play all;<br><br>            hls on;<br> [...]<br><br>            dash on;<br>[...]<br><br>            push rtmp://a.rtmp.youtube.com/live2/mystreamname;<br><br>[...]<br>       }<br><br>Here's the error log:<br><br>2018/04/12 08:24:02 [info] 29518#0: *1 client connected '10.215.145.120'<br>2018/04/12 08:24:02 [info] 29518#0: *1 connect: app='live' args='' flashver='' swf_url='' tc_url='rtmp://10.215.144.91:1935/live' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:02 [info] 29518#0: *1 createStream, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:02 [info] 29518#0: *1 publish: name='SHH' args='' type=live silent=0, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:02 [info] 29518#0: *1 exec: starting unmanaged child '/opt/custom/scripts/run/scripts/streaming/nginx_notifier.sh', client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:02 [info] 29518#0: *1 relay: create push name='SHH' app='' playpath='' url='a.rtmp.youtube.com/live2/streamname', client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:02 [notice] 29518#0: signal 17 (SIGCHLD) received from 1186<br>2018/04/12 08:24:02 [notice] 29518#0: unknown process 1186 exited with code 0<br>2018/04/12 08:24:02 [info] 29518#0: epoll_wait() failed (4: Interrupted system call)<br>2018/04/12 08:24:02 [info] 29518#0: *2 handshake: digest not found, client: a.rtmp.youtube.com/live2/streamname, server: ngx-relay<br>2018/04/12 08:24:11 [info] 29518#0: *1 deleteStream, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:11 [info] 29518#0: *1 exec: starting unmanaged child '/opt/custom/scripts/run/scripts/streaming/nginx_notifier.sh', client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:11 [info] 29518#0: *1 exec: starting unmanaged child '/opt/custom/scripts/run/scripts/streaming/index_flv.sh', client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:11 [info] 29518#0: *2 disconnect, client: a.rtmp.youtube.com/live2/streamname, server: ngx-relay<br>2018/04/12 08:24:11 [info] 29518#0: *2 deleteStream, client: a.rtmp.youtube.com/live2/streamname, server: ngx-relay<br>2018/04/12 08:24:11 [info] 29518#0: *1 disconnect, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:11 [info] 29518#0: *1 deleteStream, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:11 [notice] 29518#0: signal 17 (SIGCHLD) received from 1238<br>2018/04/12 08:24:11 [notice] 29518#0: unknown process 1238 exited with code 1<br>2018/04/12 08:24:11 [info] 29518#0: epoll_wait() failed (4: Interrupted system call)<br>2018/04/12 08:24:11 [notice] 29518#0: signal 17 (SIGCHLD) received from 1237<br>2018/04/12 08:24:11 [notice] 29518#0: unknown process 1237 exited with code 0<br>2018/04/12 08:24:11 [info] 29518#0: epoll_wait() failed (4: Interrupted system call)<br>2018/04/12 08:24:12 [info] 29518#0: *3 client connected '10.215.145.120'<br>2018/04/12 08:24:12 [info] 29518#0: *3 connect: app='live' args='' flashver='' swf_url='' tc_url='rtmp://10.215.144.91:1935/live' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:12 [info] 29518#0: *3 createStream, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:12 [info] 29518#0: *3 publish: name='SHH' args='' type=live silent=0, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:12 [info] 29518#0: *3 exec: starting unmanaged child '/opt/custom/scripts/run/scripts/streaming/nginx_notifier.sh', client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:12 [info] 29518#0: *3 relay: create push name='SHH' app='' playpath='' url='a.rtmp.youtube.com/live2/streamname, client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:12 [error] 29518#0: connect() to [2a00:1450:401f:7::c]:1935 failed (101: Network is unreachable)<br>2018/04/12 08:24:12 [error] 29518#0: *3 relay: push failed name='SHH' app='' playpath='' url='a.rtmp.youtube.com/live2/streamname', client: 10.215.145.120, server: 0.0.0.0:1935<br>2018/04/12 08:24:12 [notice] 29517#0: signal 17 (SIGCHLD) received from 29518<br>2018/04/12 08:24:12 [alert] 29517#0: worker process 29518 exited on signal 11<br>2018/04/12 08:24:12 [notice] 29517#0: start worker process 1284<br>2018/04/12 08:24:12 [notice] 29517#0: signal 29 (SIGIO) received<br><br>Thanks,<br><br>Vieri<br></span><div><br></div></div></body></html>