Problem in Gstreamer in AGX Orin and JetPack 5.0.1 platform

Problem in Reinstall OPENCV on AGX Orin Platform
Because the original opencv in JetPack 5.0.1 does not open Gstreamer function, I need to reinstall opencv by make install following the method on opencv.org. the new version opencv can affect python2 but the python3 still keeps the old opencv version. I try remove python3-opencv and remove libopencv and their dependences. It doesn’t work. “import cv2” still works well in python3! So how can i change the version for python3 in JetPack 5.01?

/////////////////////////////////////////////////////////////////////////////////
After intstalling the opencv, Export the opencv lib path like:
add path “export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.8/site-packages/cv2/python-3.8” in .bashrc. the problem above can be solved.

The new problem comes. Gstreamer cannot run correctly in python opencv, the videocapture path is:

capip = “rtspsrc location="rtsp://{username}:{password}@192.168.8.80/Streaming/Channels/101/" latency=50 ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! appsink”

cap = cv2.VideoCapture(capip,cv2.CAP_GSTREAMER)

these two commands will deadlock. The terminal shows :
g_mutex_clear() called on uninitialised or locked mutex

is there any solutions?

Hi,
A user has shared a script for building/installing OpenCV manually. Please give it a try:
GitHub - mdegans/nano_build_opencv: Build OpenCV on Nvidia Jetson Nano

I have tried this script. The result is the same: python2 is the new version opencv 4.6.0-dev and python3 is the old one opencv 4.6.0-dirty. Is there any other solution?

by the way, in this script there are two steps that cannot run correctly.
I comment these two steps.

  1. when running “sudo apt-get dist-upgrade” , the terminal shows
    Get:1 https://repo.download.nvidia.cn/jetson/common r34.1/main arm64 libnvinfer8 arm64 8.4.0-1+cuda11.4 [167 MB]
    Err:1 https://repo.download.nvidia.cn/jetson/common r34.1/main arm64 libnvinfer8 arm64 8.4.0-1+cuda11.4
    File has unexpected size (165491174 != 167151752). Mirror sync in progress? [IP: 119.36.245.194 443]

  2. when install_dependencies, apt-get install v4l2ucp cannot install correctly

it seems there is no gst-omx tool for jeston orin , is there any replacement for it for using hardware video decoder?

Hi,
We have deprecated omx plugins. Please use nvv4l2decoder plugin.

how can i find the specific user guide for opencv interface?

1 Like

Hi,
There is no user guide. There is C samples in source code package:
https://developer.nvidia.com/embedded/l4t/r34_release_v1.1/sources/public_sources.tbz2

Please take a look.

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