Rtspsrc stuck and using up memory
Describe your issue
I'm using a pipeline like this:
rtspsrc location=rtsp://10.16.14.207:554/s0 latency=0 name=rtspsrc rtspsrc. ! application/x-rtp,media=audio ! queue max-size-bytes=0 max-size-time=0 ! decodebin ! audioconvert ! avenc_aac ! mux.audio_0 rtspsrc. ! rtph264depay ! queue max-size-bytes=0 max-size-time=0 ! h264parse config-interval=1 ! identity name=adjust ! mux.video splitmuxsink location="D:/VideoRecording/Ubiquiti/video%07d.mp4" name=mux async-finalize=true start-index=699 sink-properties=properties,file-mode=3 max-files=1000 max-size-bytes=26214400 max-size-time=60000000000
Usually this works fine. However, I have a pipeline running right now that is not writing files. When I went to look why, I notice that it's taking up serious amounts of memory. Currently at around 5GB whereas I'm expecting around 50MB. Only real sign of a problem I can find is this:
22:54:53.661711600 2000 0000022231ECA0C0 WARN rtspsrc gstrtspsrc.c:3746:on_timeout_common:<rtspsrc> source 80df6e0b, stream 80df6e0b in session 0 timed out
22:55:38.468300700 2000 0000022231ECA0C0 WARN rtspsrc gstrtspsrc.c:3746:on_timeout_common:<rtspsrc> source 80df6e0b, stream 80df6e0b in session 0 timed out
22:56:26.277560100 2000 0000022231ECA0C0 WARN rtspsrc gstrtspsrc.c:3746:on_timeout_common:<rtspsrc> source 80df6e0b, stream 80df6e0b in session 0 timed out
It seems to consistently add a new timeout warning to the log file every 45 seconds or so. And has been doing that apparently for nearly 8 hours. I've verified this machine can play the stream in VLC, so there isn't anything wrong network wise.
I'm wondering if this is a GstRTSPSrcTimeout? I've noticed GstRTSPSrcTimeout messages but usually those don't affect anything.
Expected Behavior
If it's a valid timeout, it should have recovered well before now. In addition, even with a valid timeout I don't think the memory usage should be increasing.
Observed Behavior
Not recovering from timeout. Using up lots of memory.
Setup
- Windows Server 2019 Standard, version 1809
- Computer
- GStreamer 1.24.2
- See issue description for the command line. I am, however, running this with GStreamer-Sharp.
Steps to reproduce the bug
- Run pipeline.
- Wait for a long time.
- Monitor for timeout messages and no files written from splitmuxsink.
- May need to run pipeline multiple times.
How reproducible is the bug?
Seems difficult to reproduce as it usually works fine.
Screenshots if relevant
Solutions you have tried
None
Related non-duplicate issues
Additional Information
Attaching the full gstreamer log. If necessary, I can increase the log level and try again, but no idea when the problem may reproduce. gstreamer.txt