arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.48k stars 3.52k forks source link

Server still seeing live even if interrupted by internet connexion down from emetter? #1738

Open CouinCouin opened 1 year ago

CouinCouin commented 1 year ago

Hi,

I had setup a video server with nginx and rtmp module. Streamers use OBS to send stream. All works fine but if streamer has an internet connexion interruption, the server stil seeing the stream (but with 0 kbps), and the streamer can not reconnect (once internet came back).

Is there a parameter to set in the config to kill the stream if not longer received ?

Thanks :) Couin

shubham21155102 commented 7 months ago

Hi,

I had setup a video server with nginx and rtmp module. Streamers use OBS to send stream. All works fine but if streamer has an internet connexion interruption, the server stil seeing the stream (but with 0 kbps), and the streamer can not reconnect (once internet came back).

Is there a parameter to set in the config to kill the stream if not longer received ?

Thanks :) Couin

Just a suggestion use ffmpeg to handle the rtmp server

CouinCouin commented 7 months ago

What do you mean ? :)

shubham21155102 commented 7 months ago

lets take a demo

socket.on("endstream", () => { console.log("End Stream Socket Event"); if (ffmpegProcess.stdin.writable) { endStream=true; ffmpegProcess.stdin.end(); console.log(Stream Ended); } else { console.log(Stream Not Found or Already Ended); } });

What do you mean ? :)