FFmpeg memory leaks (until OOM) when got Non-monotonous DTS error #636
Labels
bug
Program error or software error or software anomaly.
known issue
A known issue for which there may be a workaround or which will be fixed in a following version.
third-party
Configuration from an external program is not necessarily our problem.
Describe the bug
I have many RTP/UDP multicast sources from a streamer that is pulling Free to Air TV channels from a satellite. Sometimes, one or two channel source got a little bit bad, then from the
Process Details
log, I got bunch of DTS error like this:output omitted..
@1697789423 [hls] Non-monotonous DTS in output stream 0:1; previous: 999202502, current: 894696902; changing to 999202503.
output omitted..
The channel's video itself runs fine, but the audio is gone, I hear nothing. FFMpeg memory usage was also fine until this error came and eats a lot of memory that can cause OOM for the container.
I have tried using different fflags like the genpts, igndts, discard_corrupt, etc.. and tried using the use_wallclock_as_timestamps or copyts, or start_at_zero. All of them does nothing to prevent or even to restart the stream. Because the process simply needed to be restarted, and I have done this manually by clicking the disconnect and connect button, that its always working back normal again, until another DTS error came back.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The ffmpeg / restreamer can automatically restarts the process if DTS error happens so much (sometimes if its only happening a little bit it can corrects by itself)
Screenshots

DTS Error logs
One of the ffmpeg process that is starting to eats ram (normally only using 0.3%, and it will spike until OOM kicks out)

Additional context
I noticed there are
memory_mbytes
and thememory_bytes
variable inside the Process report log button which is used to set the memory limit and read the current memory usage of the ffmpeg process. Why don't we set it from the GUI, because its a little bit annoying that I need to set limit inside the db.json manually for all of the channel so that it won't eat RAM more than I allowed to. But it is more annoying that sometimes after I set that, it came back to default values '0' (which is unlimited). I would be thankful if we can set the limit in each channel on the GUI, or even set it for all channelI really want to use this tool because it has bunch of features..
Any suggestions is appreciated, maybe I'm missing something because I just recently used Restreamer with this setup
I can provide additional info if needed, thank you guys..
The text was updated successfully, but these errors were encountered: