GSTREAMER disable python

Hello
JETSON ORIN NANO
L4T: 36.4.3
Jetpack: 6.2
OpenCV: 4.12.0-dev with CUDA YES

The problem is as follows:

I want to use the IMX219-83 Stereo Camera, however, GSTREAMER is not enabled to use the Python code.

When compiling OpenCV, it is enabled in cmake -D WITH_GSTREAMER=ON and shows that it is enabled upon completion.

When checking in Python, GSTREAMER is not enabled.

When running this in the terminal, the camera does open.
gst-launch-1.0 nvarguscamerasrc sensor-id=0 !
‘video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=30/1’ !
queue ! nvvidconv ! nvegltransform ! nveglglessink

But when I try to adapt it in Python, it says that gstreamer is not enabled.

Hello @JorgeLdeJesus

You could try following the instructions at Compiling OpenCV from Source to enable GStreamer when installing OpenCV.

For capturing with your camera sensor, you could take a look the examples at RidgeRun Linux Camera Drivers - Jetson OpenCV Examples

I hope this helps!

Regards!
Eduardo Salazar
Embedded SW Engineer at RidgeRun

Contact us: [email protected]
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

Thanks, Eduardo.

It seems that GSTREAMER was being installed with OpenCV and worked with gst-launch-1.0, but when trying to use it with Python, it didn’t.

The problem is that the OpenCV .so file for Python wasn’t found (cv2*.so). The PYTHON3_PACKAGES_PATH variable wasn’t pointing correctly, or the .so file wasn’t being generated in the expected path.

We created a build_opencv.sh script to automate a clean installation of OpenCV with full support, including:

WITH_GSTREAMER=ON

WITH_CUDA=ON

OPENCV_ENABLE_NONFREE=ON

BUILD_opencv_python3=ON

We deleted the contents of opencv/build/ and successfully ran cmake from a clean directory.

Reinstall CMake and verify the paths are correct with:

PYTHON3_EXECUTABLE

PYTHON3_PACKAGES_PATH

Thanks for the help

Hello @JorgeLdeJesus

So, is the issue already solved?

Regards!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.