-
Notifications
You must be signed in to change notification settings - Fork 106
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
Error Releasing VideoCapture in OpenCV Using GStreamer Pipeline #163
Comments
faced the same problem. |
I have the same error.
I tried both Test script for rerpoducing error:
And
|
So far, I am still looking for a workaround for this. But I am confident it has to do with what Laurent Pinchart(@pinchartl) worked on in this issue: fa63d42. |
I tested this on RPi OS Bookworm 64 bit and faced the same error. |
I presume this is still an issue? To be honest, I don't know anything about gstreamer so I cannot really advise on this issue. Perhaps the libcamera mailing list might be a better place for this query? |
Hi @naushir! Thanks for reaching out. This is really important for the library. I was hoping that @pinchartl would come up with a solution since he/she has worked on this specific problem before. I will create a query for the libcamera mailing list, but I am not sure if that will reach more people or not. |
Hello, everyone. I sent an email to the libcamera development mailing list and immediately got a reply from @pinchartl. I removed my libcamera and manually installed the latest release v0.3.2+98-75fe515a
One thing was that, on this version
I fixed this by activating the following environment in my libcamera build folder:
In this version, I can release the frame using gstreamer and opencv! 🎉🎉🎉 This is the pipeline I used:
One crucial detail and another problem I had was choosing the right frame-size and frame-rate.
But for some reason gstreamer does not support this (I also printed the supported formats). The image has a stripping effect that suggests the frames are not being captured or processed.
The format closest to the original |
Dear all,
Thank you for developing such a helpful library.
Problem:
I am trying to get frames using opencv.
I know that libcamera does not entirely support cv2 (I already created another issue for that kbingham/libcamera#96).
I am actually able to get frames via
cv2.VideoCapture
through GStreamer using the following: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:
System:
What I already tried:
I updated my
libcamera
fromv0.0.5
tov0.3.0+65-6ddd79b5
(clone this repo and use the build instructions)I updated the
libcamera-apps build
torpicam-apps build: 511941fdb1fe-intree
I build the custom cv2 version of advait-0, used
cv2.VideoCapture(0, cv2.CAP_LIBCAMERA)
, but unfortunately I got the same problem. I cannot release the camera without an error in DeviceEnumerator.More Details:
This has definitely to do with gstlibcamerasrc.cpp. Apparently this error happened before and this was the solution: fa63d42
I am confident it has to do with that... I also activated the logs of Gstreamer and Libcamera and present them here as soon as I start the
release()
:The text was updated successfully, but these errors were encountered: