OpenCV and GStreamer Error on Jetson Orion Nano but Works on Jetson Xavier AGX

Hello everyone,

I am currently facing an issue with an OpenCV and GStreamer setup on my Jetson Orion Nano. When trying to run the following code, I encounter the error:

/home/stuart/opencv/modules/videoio/src/cap_gstreamer.cpp:1611: error: (-215:Assertion failed) frameSize.width > 0 && frameSize.height > 0 in function ‘open’

Here’s the segment of code where the error occurs:

cpp
Code
videos[i].open(
videoName,
cv::VideoWriter::fourcc(‘a’,‘v’,‘c’,‘1’),
pCamera_Array[i]->AcquisitionResultingFrameRate.GetValue(),
cv::Size(imageWidth_, imageHeight_),
true);
This code and camera setup work perfectly fine on a Jetson Xavier AGX. I have verified that the OpenCV installation and other configuration settings are the same on both devices. The camera is recognized and other utilities run well, so this specific error is puzzling.

Has anyone encountered a similar issue, or does anyone have insights into what might be causing this discrepancy between the two Jetson platforms? Any help or suggestions would be greatly appreciated!

Thank you!

Hi,
Do you use nvarguscamerasrc or v4l2src? Would like to know which type the camera is.

And please use latest Jetpack 5.1.3 if you are using previous version.

Hello,
Thank you for the reply !!

I’m using v4l2src, and the camera model is FLIR Blackfly S BFS-U3-16S2C.

Hello @DaneLLL, is there anything I can do, what can be the issue? I have tried to build open cv multiple time to make sure all open cv supports this and as mentioned above I have followed the same process for agx but it works on it

Thank you!

Hi,
Please refer to the steps in

Jetson AGX Orin FAQ
Q: I have a USB camera. How can I launch it on AGX Orin?

And see if you can launch the camera in v4l2-ctl or gst-launch-1.0 commands first.