Camera can not work with gstreamer

Hi Expert,

I download Jetson_Linux_r36.4.3_aarch64.tbz2 https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.3/release/Jetson_Linux_r36.4.3_aarch64.tbz2
And then burn orin nx with below command
sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3768-0000-p3767-0000-a0-nvme external

and then I follow Accelerated GStreamer — Jetson Linux<br/>Developer Guide 34.1 documentation to test camera, but encounter below error

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), \

 width=(int)1920, height=(int)1080, format=(string)NV12, \
 framerate=(fraction)30/1' ! nvdrmvideosink -e

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3280 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 2
Output Stream W = 1920 H = 1080
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.431840608
Setting pipeline to NULL …
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline …

I try another command, still have stranger issue
mli1@mli1-desktop:~$ gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! \

 'video/x-raw(memory:NVMM), format=(string)UYVY, \
 width=(int)1920, height=(int)1080, \
 interlace-mode= progressive, \
 framerate=(fraction)30/1' ! nvvidconv ! \
 'video/x-raw(memory:NVMM), format=(string)NV12' ! \
 nv3dsink -e

WARNING: erroneous pipeline: could not parse caps “video/x-raw(memory:NVMM),\ format=(string)UYVY,\
\ \ \ \ \ width=(int)1920,\ height=(int)1080,\
\ \ \ \ \ interlace-mode=\ progressive,\
\ \ \ \ \ framerate=(fraction)30/1”

another question,
How can I confirm which sink is used?

thanks,
LImeng

I use below simple command, but still report error.

gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw, format=(string)NV12, width=(int)1920, height=(int)1080, framerate=(fraction)30/1’ ! nveglglessink -e

Setting pipeline to PAUSED …

Using winsys: x11
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Pipeline is PREROLLED …
Additional debug info:
../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Setting pipeline to PLAYING …
ERROR: pipeline doesn’t want to preroll.
Execution ended after 0:00:00.000242624
Setting pipeline to NULL …
Freeing pipeline …

hello meng.li,

let’s narrow down this issue
(1) is the camera device register to system correctly?
please check kernel init message, such as.. $ dmesg > klogs.txt
it should reported as following..

[   10.172978] imx185 9-001a: probing v4l2 sensor
[   10.173155] imx185 9-001a: tegracam sensor driver:imx185_v2.0.6
[   10.175734] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx185 9-001a bound
[   10.179580] imx185 9-001a: Detected IMX185 sensor

(2) please check you’ve video node availabe, $ ls /dev/video0, please also run.. $ v4l2-ctl -d /dev/video0 --list-formats-ext to check the sensor format dumps.

(3) you may see-also applications Using V4L2 IOCTL Directly to use V4L2 IOCTL to verify basic functionality.
for instance, $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

thanks a lot!
I have resolved this issue.

thanks,
LImeng

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