Open jbvsmo opened 11 years ago
How many workers do you have? Stat does not work properly in multi-worker mode.
Now I'm using 4 workers (I did this change at the same time as upgrading the nginx-rtmp). I had just 1 worker prior to this.
I'll see if going back to 1 user the count will stay right now.
But, why does the module do not send the available stream to new users even if ffmpeg is still transmitting?
With only one worker, the module works fine. But can't it reliably stream videos using more workers?
I thought about multi workers stat. To make it the easiest way I think you can make separate stat file for each worker. So when now we setup http location with rtmp_stat all then we will use rtmp_stat all 1 where 1 is worker number.
I updated the module to latest version on master, but something happens after an user is connected on rtmp for too much time. This is what normally happens:
2
(one viewer + one publisher)If there are new viewers, my program will not open new ffmpeg instances.
The problem is that, after some time, the counter on "stat" drops to zero! without disconnecting anything nor calling
exec_play_done
(but the original viewer keeps watching the video and ffmpeg keeps working).The nginx-rtmp will not acknowledge that ffmpeg is still transmitting data and will not send the available streams to new users.
This is my application:
I think this is not a problem with the "stat" part, but on the "rtmp" part.