nginx-rtmp-module icon indicating copy to clipboard operation
nginx-rtmp-module copied to clipboard

[Question] Disconnect stream connection if relay disconnects

Open daxiachonger opened this issue 1 year ago • 3 comments

Is there a way to disconnect a stream connection if the relay disconnects? The following is a code snippet. If the push to port 2935 disconnects, I would like to disconnect the stream to port 1935.

rtmp {
  server {
    listen 1936 proxy_protocol;
    application live {
        live on;
        record off;
        push rtmp://localhost:2935;
    }
  }
}

stream {
    proxy_protocol on;
    server {
        listen 1935;
        proxy_pass localhost:1936;
    }
}

daxiachonger avatar Jul 22 '24 16:07 daxiachonger