Closed Tralapo closed 11 months ago
I "fixed" this by changing rename.sh so that it will now kill the active stream and start a new one with the just saved recording. This prevents the stream from running behind. Only thing is the videoplayer will always stop and the page has to be refreshed to get the new stream.
This repo hasn't been very active lately, but I hope there are still some people hanging around here that can maybe help me or point me in the right direction.
TL;DR
I have securitycameras that I stream 24/7 live, but with a 30m delay because of reasons. Somehow though, this sometimes increases up to a 60m delay, although I can not find the raw footage on the server. How is this even possible?
Config
I created a workflow where, when nginx starts, it starts recording the camera and saves a .flv every 30m. I then rename that to just 'stream.flv' to create a source for continious streaming. If the buffer file does not exist at first, it will show a waiting screen. This workflow is based on my own issue #312 from a few years ago.
This works fine, apart from the fact the stream ends up anywhere between 30 up to 60 minutes behind. When I manually download the .flv file and play it, it's just the past 30 minutes. The footage that is shown through HLS at that moment, for example from 56 minutes ago, is not in there.
How is that even possible? Is there some kind of hidden tmp used by nginx/nginx-rtmp?
It's not because of unexpected restarts of nginx, because it also happens when it will be up and running for days.
Hope there's someone who knows where this strange behaviour comes from, or maybe knows a better way to do this.
nginx.conf
stream-30m.sh
rename.sh