Repository navigation
Replies: 5 comments 1 reply
|
Hi @muellerto |
|
My RTSP streams are generated endlessly from MP4 videos by FFMPEG and the mediamtx tool. They don't break up after an hour. Indeed they worked already for more than 24h correctly. I follow another strategy now: disconnect and (re)connect in short intervals, 2 minutes only. I do this using two When the visible one streamed a video for 2 minutes I create a new Currently I'm watching the webrtc-streamer process in a longer test, how it handles so many disconnects and connects, memory behavior and so on. |
|
Yesterday I started an over night test which stopped after about six hours. The webrtc-streamer process terminated without any message. So I started it again this morning using --verbose and it stopped suddenly after only some minutes. Note: this test contains 12 local RTSP streams. Each stream is endless and has different video contents but no audio (this should simulate traffic cameras). After 2 minutes the webpage disconnects and reopens all streams, this is intended. But somehow it stopped the webrtc-streamer process. (Yesterday it survived some hundred cycles!) My RTSP streams are still good, VLC shows them perfectly. The stdout log of webrtc-streamer shows nothing special: That's all, including the crash. The stderr log is attached. I guess the first number on each line means "seconds from start", so "125" means 2 minutes and 5 seconds, this would be the first closing of the connections. But what then? I don't get a clue here. |
|
Hi @muellerto From your log it seems, lots of frames are drop because timestamp is not increasing. The ffmpeg decompressor didnot support it, I did not check if B frame are now supported, at the end, decompression fails, probably error could be better managed. I reset the decoder in case of error in 3b31e48 Anyway you could try the option -o, that avoid decompression. Best Regards, |
|
Better! Especially the parameter -o reduces the CPU load a lot (one browser showing 12 videos caused 10% load, with -o it's about 1%). But webtrc-streamer still crashes after less than an hour. Today I got a number of real traffic cameras producing native RTSP streams which belong to the intended use case I develop for. I'll see if this brings new informations. Update: the webrtc-streamer crash I had was still with my webpage which closed and reopened the connections after 2 minutes. When I instead specify 10000 minutes as timeout the connections do not stop after 60 minutes. With -o I have now running connections for more than 2 hours and they are still alive ... |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Currently I use a
WebRtcStreamerobject on my webpage like this:and then I have a video tag:
In the
connectline there's atimeoutparameter. And when the timeout is reached the connection stops. So this is a planned interruption. But the use case I have has no planned interruption. I need to see cameras as long as they send frames, even for months.I tried the following:
timeoutparameter -> then a default is used (probably60)0,-1,undefined,nullorNaN-> this kills indeed the webrtc-streamer processMy conclusion is a timeout must be an integer in the interval of 1 ... 65535 minutes which means maximum 45 days.
Question: Is there really no way to get a longer timeout or a truly unlimited connection? Or do I have to handle the planned interruption and reconnect myself?
Update: my experiments show that a value of 65535 (FFFF, the biggest two-byte unsigned integer) is accepted but doesn't work as expected. The connection stops already after an hour. This means that the biggest value is much less, probably 32767 minutes (22 days). Will check that.
Update: even 10000 doesn't work. The connection stops already after an hour. So what's the longest timeout possible???
All reactions