Memory leak using Gstreamer pipelines as video input
See original GitHub issueThere is memory leaks issues when using video inputs like:
- Webcam as a gstreamer pipeline:
"v4l2src device=/dev/video0 ! video/x-raw, framerate=30/1, width=640, height=360 ! videoconvert ! appsink"
- Raspberrypi cam :
"nvarguscamerasrc ! video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12 ! nvvidconv ! video/x-raw, format=BGRx, width=640, height=360 ! videoconvert ! video/x-raw, format=BGR ! appsink"
It seems related to OpenCV and VideoCapture API .
Filled two issue on nvidia forum and darknet:
- https://devtalk.nvidia.com/default/topic/1064350/jetson-nano/memory-leak-running-darknet-yolo-with-opencv-on-a-gstreamer-input/
- https://github.com/AlexeyAB/darknet/issues/4031
One thing that would be good would be to repro the bug with OpenCV 3.4.7 (latest) and fill an issue on the OpenCV repo.
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (14 by maintainers)
Top Results From Across the Web
Memory leaks detected in GStreamer elements (omxh264 or ...
Hi folks. I found omxh264dec or nvvidconv has memory leak problems. The tested pipeline is as follows.
Read more >Memory Leak in basic Gstreamer pipeline code.
I am trying to run a Gstreamer pipeline code in a loop: The simpler version of my code: Reads the video file and...
Read more >Memory leak under some conditions when using GST ...
I'm using the following GST Pipeline to process and encode my UYVY Video, which is capture from an ADV7282 over CSI.
Read more >gStreamer Video Recording Memory Leak - Stack Overflow
I am using following gst command to do recording in MPEG4 Format gst-launch -e rtspsrc location=rtsp://10.17.8.136/mediainput/h264 latency=100 ! decodebin ...
Read more >Once the Gstreamer applications run for a long time i.e. ...
Once the Gstreamer applications run for a long time i.e. memory consumes 100%. Video saved during this memory run out case is corrupted....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes you can use htop from terminal
It will display the processes and the memory usage, you will have a line with
./uselib blabalbalbala
which should be on top and on the left you have the memory usage…Looking for people to test OpenDataCam v3.0.0-alpha.1 on Jetson nano to see if memory leak problem is fixed
Docker setup
Build only available on jetson nano for now.
Should work from jetpack 4.2.x , if not please flash to 4.3
Non-docker setup:
If you want to install without docker (on another platform than jetson nano), follow this documentation:
https://github.com/opendatacam/opendatacam/blob/v3.0.0-alpha.1/documentation/USE_WITHOUT_DOCKER.md