I also get the camera view from GStreamer using the default ArduSub Companion camera stream settings and running the following code on the command prompt:
But I need to mention that some commands just gave me an error saying that pipeline could not be constructed. But some commands just do not give any error, the terminal just stays blank and I do not get any type of response from the code.
So in my opinion it seems like OpenCV command cv2.VideCapture() is the root of the problem.
Yes, I am using autovideosink on the command prompt and appsink on the OpenCV.
Not with OpenCV. But it works on command prompt after changing appsink to autovideosink and adding gst-launch-1.0 in front of it.
So to you keep updated on the situation, here’s what I will be doing:
Since I’m working on Windows and it’s a bit problematic with these libraries (I had to build OpenCV myself just for it to support GStreamer) I will change my approach.
Instead of trying to catch the image on OpenCV with GStreamer built in it, I will try to use PyGObject to get the image directly from that and I will use OpenCV only for interface purposes.
If the pipeline can’t be created then you’re probably missing some gstreamer libraries or something - perhaps your OpenCV was built with a different gstreamer to the one you’re using to run your own pipelines in the terminal?
OpenCV does not have pre-compiled binaries with built in gstreamer support, so it’s always necessary to build OpenCV yourself if you want to use it with a gstreamer backend.