ZED Gstreamer Pipeline Error

Hello,

I just flashed our Jetson Orin with JP 6.2.1 and installed ZED SDK v5.0.7 and the ZED GStreamer Plugin.

I have four ZED X / ZED X Mini cameras connected to the device and all of them seem to be running without issues when using ZED Explorer.

When running the example GStreamer Pipeline

gst-launch-1.0 zedsrc camera-sn=<sn-of-camera> camera-resolution=5 camera-fps=60 stream-type=2 ! autovideoconvert ! queue ! fpsdisplaysink

The pipeline starts and I can see the image stream but after some time I run into the following error. Apparently as soon as the exposure gain is changed.

Setting pipeline to PAUSED ...
Setting depth_mode to NONE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Grabbing failed with error: 'CORRUPTED FRAME' - The image may be corrupted or invalid
Additional debug info:
/home/nvidia/code/zed-gstreamer/gst-zed-src/gstzedsrc.cpp(2769): gst_zedsrc_fill (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0
Execution ended after 0:00:05.876584117
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0:
streaming stopped, reason error (-5)
Freeing pipeline ... 

Gain control error can be seen in dmesg

[ 1520.890650] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1520.896012] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1563.813055] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1563.825953] sl_max9296 11-0048: fps_set_Dser: 105000000 is not a supported value. [30,60,120]*10^6 are supported.
[ 1595.610742] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1595.618921] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.687365] zedx 11-0038: Error writing mode
[ 1595.734966] zedx 11-0030: Error writing mode
[ 1595.752718] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.753147] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.807444] zedx 11-0030: Error writing mode
[ 1595.808152] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.855077] zedx 11-0030: Error writing mode
[ 1595.864472] zedx 11-0030: zedx_set_gain: GAIN control error
[ 1595.911141] zedx 11-0030: Error writing mode
[ 1595.959277] zedx 11-0030: Error writing mode
[ 1595.965621] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1595.966405] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1596.015310] zedx 11-0038: Error writing mode
[ 1596.015905] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1596.063340] zedx 11-0038: Error writing mode
[ 1596.072644] zedx 11-0038: zedx_set_gain: GAIN control error
[ 1596.123286] zedx 11-0038: Error writing mode
[ 1596.171318] zedx 11-0038: Error writing mode

This occasionally also leads to having to restart the ZED X deamon service as the camera changes to NOT AVAILABLE. I also appended the whole dmesg log. Sometimes it’s also possible to restart the pipeline without having to restart the deamon service but the pipeline always stops as soon as i change the lighting conditions of the image.

This issue occures with any of the cameras. Sometimes the error also causes issues that cannot be solved by restarting the ZED deamon service.

Setting pipeline to PAUSED ...
Setting depth_mode to NONE
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)

I then get this error if I try to run the pipeline with any of the cameras. Trying to run the pipeline then sets the camera to NOT AVAILABLE.

We seem to have had this issue with ZED GStreamer also for JP 6.0 where it caused our system to run rather instable.

I would appreciate some support on this topic. Out application relies on stable RTSP streams and this currently does not seem to be achievable using our ZED cameras.

dmesg.txt (132.8 KB)

EDIT: it seems like when switching between cameras in ZED_Explorer I occasionally also run into “nvbuf_utils: dmabuf_fd -1 mapped entry NOT found” errors.

 

This is not a valid resolution for the ZED X cameras:

  camera-resolution   : Camera Resolution
                        flags: readable, writable
                        Enum "GstZedSrcRes" Default: 6, "Default value for the camera model"
                           (0): HD2K (USB3)      - 2208x1242
                           (1): HD1080 (USB3/GMSL2) - 1920x1080
                           (2): HD1200 (GMSL2)   - 1920x1200
                           (3): HD720 (USB3)     - 1280x720
                           (4): SVGA (GMSL2)     - 960x600
                           (5): VGA (USB3)       - 672x376
                           (6): Default value for the camera model - Automatic

You can use only 1, 2, 4, 6

I also recommend you upgrade the ZED X Driver to the latet v1.3.1

Thanks for the quick response and and the hint regarding the invalid camera resolution. This is now fixed and no more GAIN control error seems to be occurring.

Still I’m running into CORRUPTED FRAME errors

gst-launch-1.0 zedsrc camera-sn=<my-camera-sn> camera-resolution=2 camera-fps=30 stream-type=1 ! autovideoconvert ! queue ! fpsdisplaysink
Setting pipeline to PAUSED ...
Setting depth_mode to NONE
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Grabbing failed with error: 'CORRUPTED FRAME' - The image may be corrupted or invalid
Additional debug info:
/home/nvidia/code/zed-gstreamer/gst-zed-src/gstzedsrc.cpp(2769): gst_zedsrc_fill (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0
ERROR: from element /GstPipeline:pipeline0/GstZedSrc:zedsrc0: Internal data stream error.
Execution ended after 0:00:00.877249009
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstZedSrc:zedsrc0:
streaming stopped, reason error (-5)
Setting pipeline to NULL ...
Freeing pipeline ...

Regarding the ZED X Driver - v1.3.0 seems to be the latest version currently provided by Syslogic for their Jetson boards.

Besides the GStreamer issue there is still the “nvbuf_utils: dmabuf_fd -1 mapped entry NOT found” errors also happenening when runnnig ZED Explorer.

./ZED_Explorer 
 ** [SVO] Hardware compression (NVENC) available **
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
(Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79)
(Argus) Error FileOperationFailed: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 277)
(Argus) Error FileOperationFailed: Receive worker failure, notifying 2 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 350)
(Argus) Error InvalidState: Argus client is exiting with 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
(Argus) Error FileOperationFailed: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 379)
(Argus) Error FileOperationFailed: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error FileOperationFailed:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 92)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 265)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function acquireFrame(), line 249)

And further causing

./ZED_Explorer --all
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 220)
(Argus) Error Timeout: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 107)
No ZED detected

See also dmesg

dmesg.txt (130.3 KB)

If ZED Explorer and ZED Depth Viewer are not working, then the problem is not related to GStreamer.

Are you using a Syslogic ECU? This is important information to share when reporting the problem.
Please contact Syslogic to get support for their devices.