Issue:
When working with custom sensors on the Jetson Orin NX, you might encounter the following error message in your logs:
tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame XX, flags: 0, err_data 131072
(Where XX
is a variable frame number.)
This issue appeared frequently for me, and I found that it was directly related to the resolution selected in my GStreamer pipeline.
Root Cause:
Using a non-native resolution for the sensor, such as 640x480, often led to this error. After extensive debugging and testing, I discovered that switching to the actual native resolution of the sensor resolved the problem.
To determine the correct sensor resolution, you can:
- Use the command:
This will display detailed information about your sensor, including its native resolution.v4l2-ctl --all
- Refer to the camera manufacturer’s datasheet to verify the supported resolutions.
In my case, my camera sensor is IMX297, and its native resolution is 728x544. Setting this resolution in my GStreamer pipeline eliminated the issue.
Solution:
Updating the GStreamer pipeline to use the correct resolution and including queue drop=true !
also helped in improving system stability.
Here is a generic example of a GStreamer pipeline structure that worked for me:
gstreamer_element ... ! video/x-raw,format=BGRx,width=728,height=544 ! queue drop=true ! appsink sync=false
Since implementing this fix, all of my deployments that previously experienced this issue have been running without any crashes. Before the fix, crashes occurred inconsistently—sometimes within 3 hours, sometimes after 3 days, 1 week, or even 2 weeks. This change has significantly improved the reliability of my system.
Conclusion:
If you’re facing this issue, check your sensor’s native resolution and make sure your GStreamer pipeline matches it. Additionally, using queue drop=true !
in your pipeline can enhance stability.
I hope this helps others who might be struggling with the same problem, as I found limited information on this specific issue in the NVIDIA developer forums.
Would love to hear if anyone else has encountered and resolved this in a different way!
System Details:
- Jetson Orin NX 16GB
- Sensor: IMX297
- Connection: FPD-Link III
- GStreamer Pipeline with tcambin