Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenCV 4.4 VideoCapture Memory Leak with Gstreamer #21435

Open
2 of 4 tasks
kdavis523 opened this issue Jan 12, 2022 · 0 comments
Open
2 of 4 tasks

OpenCV 4.4 VideoCapture Memory Leak with Gstreamer #21435

kdavis523 opened this issue Jan 12, 2022 · 0 comments

Comments

@kdavis523
Copy link

kdavis523 commented Jan 12, 2022

System information (version)
  • OpenCV => 4.4.0
  • Operating System / Platform => Windows 10
  • Compiler => Visual Studio 2017
Detailed description

When using OpenCV with gstreamer support, VideoCapture API appears to have a memory leak.
Observed behavior was a complete program shutdown after a long period of time.
Ran through Visual Studio debugger, and memory heap profiling shows consistent growth.

VideoCapture is initialized with a gstreamer pipeline, reading an encoded video stream over UDP.
Issue exists with H265, H264, UDP multicast, RTP or MPEGTS

Pipeline example:
"udpsrc address=225.1.1.1 port=5555 ! queue ! tsdemux ! h265parse ! video/x-h265, stream-format=byte-stream, alignment=au ! queue ! avdec_h265 ! videoconvert ! queue ! appsink"

Memory issue appears to go away if I switch the backend to using FFMPEG

Steps to reproduce
Issue submission checklist
  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues,
    forum.opencv.org, Stack Overflow, etc and have not found solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc
@asmorkalov asmorkalov added the needs reproducer Provide complete minimal reproducer with input data label Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants