0
votes

I am using a simple RTSP server based on Ullaakut/RTSPAllTheThings, built on the top of GStreamer. It is configured to read video from the file and serve over RTSP.

The server works in general but if the viewer (that consumes the RTSP stream) is late to connect, the server gradually allocates somewhat 3 Gb of RAM, using about 50 % of CPU resources over all this time. As soon as this limit is reached, CPU usage drops to zero and there is no further memory increase. However I must stop this growth at 1 Gb or even earlier, 3 Gb is way too much.

The pipeline that the server reports on startup is:

( appsrc name=mysrc ! decodebin ! timeoverlay halignment=left valignment=top shaded-background=true font-desc="Sans 10" ! clockoverlay halignment=right valignment=top shaded-background=true font-desc="Sans 10" ! videorate ! video/x-raw,framerate=12/1 ! capsfilter ! queue ! x264enc speed-preset=superfast ! rtph264pay name=pay0 pt=96 )

I tried to add max-size-bytes=512000000 after the queue that I would believe should limit the spike to 512m but no effect before 3.3 Gb are allocated anyway. My file input is set up as here. I have set the frame rate with RTSP_FRAMERATE property. There are no any other alterations that I think should affect anything.

I need to serve 32 streams from the server. With current setup this would need 128 Gb of RAM or about!

1

1 Answers

0
votes

I have switched into VLC streamer that does not have these issues. Maybe GStreamer is great somewhere else, it looks much more configurable. Anyway, VLC works for me and does not have addressed issues.