Error Releasing VideoCapture in OpenCV Using GStreamer Pipeline

Gaspar Ramôa ramoa.science at gmail.com
Wed Nov 13 12:51:11 CET 2024


Dear libcamera community,

Thank you for developing such a helpful library.

I am trying to get frames using *opencv*. I am actually able to get 
frames via cv2.VideoCapture through *GStreamer*.

However, when I try to release the capture (for ending the program or 
maybe adjusting raw image size): cap.release()
I get the following error:

/[1:39:52.854669803] [1885] ERROR DeviceEnumerator 
device_enumerator.cpp:172 Removing media device /dev/media4 while still 
in use
[1:39:52.854709759] [1885] ERROR DeviceEnumerator 
device_enumerator.cpp:172 Removing media device /dev/media3 while still 
in use
/

I've already published an issue on the raspberry Pi libcamera GitHub 
repo where you can get more detail on my problem: 
https://github.com/raspberrypi/libcamera/issues/163

I found the following commit which /apparently /did to solve the problem 
I am having now: 
https://github.com/raspberrypi/libcamera/commit/fa63d428aef62bacf0a6ad1622a7965b3ff2ba2f 


This commit was done by the user https://github.com/pinchartl. But I 
have no way of contacting him to help me fix the problem.

Any suggestions? Thanks in advance!


Best Regards,

Gaspar Ramôa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.libcamera.org/pipermail/libcamera-devel/attachments/20241113/9ff4d782/attachment.htm>


More information about the libcamera-devel mailing list