nginx-rtmp-module
nginx-rtmp-module copied to clipboard
Nginx RTMP reconnect after peer reset a connection
I stream video to different streaming services (facebook live, google, ok.ru, and vk.com) using nginx-rtmp module. All streaming services works fine, exept vk.com, which randomly reset connection. log file:
recv() failed (104: Connection reset by peer), client:
95.213.11.125:443
For redirect stream to its target i using on_publish directive. How can I reconnect stream to its destination after that
[info] 18793#0: *104 disconnect
[info] 18506#0: *202 deleteStream
Thx! My nginx.conf:
rtmp {
server {
listen 1935;
chunk_size 8192;
max_message 10M;
ping 120s;
ping_timeout 5s;
idle_streams off;
buflen 10s;
application output0 {
live on;
meta on;
sync 10ms;
wait_video on;
allow publish all;
on_publish http://127.0.0.1/site/stream?id=1;
}
}