CircusMonkey / ros_rtsp

ROS node to subscribe to an image and serve it up as a RTSP video feed.
The Unlicense
103 stars 48 forks source link

memory leak problem with gst_caps_new_simple and gst_buffer_new_allocate call. #17

Open yxw820603 opened 1 year ago

yxw820603 commented 1 year ago

@CircusMonkey hi,i am trying use this project with 4 video stream, each stream is 1280 * 720. when this project running,it is fill memory very fast. i have 16G memory, about 10 minutes,it will use all memory. i am checked the code,found 2 function call : gst_caps_new_simple and gst_buffer_new_allocate. as document say,these two function are allocate some memory then code can use it . but i can not find any code to release that memory. so,is that the problem here?can you fix it?

Bark33p3r commented 1 year ago

You need to reduce the bitrate. In the same case my latency rises. I guess the PC can't process to high bitrates and resolution for some reason. Reduce bitrate and resolution until it works.

CircusMonkey commented 4 months ago

There is a problem here which seems to make the video reencode for each subscribed stream.

If you can find a fix, please create a pull request and I will merge it.