Jetson L4T 35.1 - CSI camera's issue with gstreamer

Hello,

I have Jetosn Xavier NX module. I am working on L4T 35.1. I am bringing up CSI camera’s.
I have some issues with the gstreamer plugin while testing CSI camera’s.
I had it working in 34.1 developer preview release. I am having trouble doing the same with 35.1.

command I am using:
gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1,format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960,height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -e

Errors:
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
WARNING: from element /GstPipeline:pipeline0/GstEglGlesSink:eglglessink0: Pipeline construction is invalid, please add queues.

Also attaching the complete execution of the command and boot log.
gst.txt (2.6 KB)
dmesg.txt (73.5 KB)

Thanks,
Shreyas

Hi,
Please try the simple command and check if it works:

$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1,format=NV12' ! fakesink

Hello,
I tried the command you suggested.
:~$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1,format=NV12’ ! fakesink
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
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 = 0
Output Stream W = 3280 H = 2464
seconds to Run = 0
Frame Rate = 21.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
Got EOS from element “pipeline0”.
Execution ended after 0:00:04.023579038
Setting pipeline to PAUSED …
Setting pipeline to READY …
GST_ARGUS: Cleaning up

(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 91)
(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 91)
GST_ARGUS: Done Success
^Z
[2]+ Stopped gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1,format=NV12’ ! fakesink
mistral@mistral-desktop:~$

Hi,
Looks like the sensor driver and device tree are not ready. Which camera do you use? Would like to know if you use the camera from our partner.

I have 3 imx219 CSI camera’s. I had it working in earlier releases and also after updating pinmux in 34.1 it was working. I don’t think the issue is from driver, there are no errors from driver or device tree. The same was working earlier without any issues. I also have imx290 camera and the same issue is being observed. A blank gstreamer window opens while previewing camera or capture but doe not display anything.

Hi,
For further check, you can try the two samples:
Jetson Linux API Reference: 09_camera_jpeg_capture (libargus & libjpeg-8b) | NVIDIA Docs
Jetson Linux API Reference: 10_camera_recording (libargus capture) | NVIDIA Docs

To clarify if the issue is specific to gstreamer commands.

I installed Jetpack, tried recording and some errors occurred.
mistral@mistral-desktop:/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture$ ./camera_jpeg_capture
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbuf_utils: Could not get EGL display connection
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbufsurftransform: Could not get EGL display connection
No protocol specified
[ERROR] (NvEglRenderer.cpp:98) Error in opening display
[ERROR] (NvEglRenderer.cpp:154) Got ERROR closing display
Error generated. main.cpp, main:649 Failed to create EGLRenderer.

I also exported display ‘export DISPLAY=:0’, but same issue.

Hi @DaneLLL ,

I tried with a different SOM, the results are as follow.
xx@xx-desktop:/usr/src/jetson_multimedia_api/samples/09_camera_jpeg_capture$ ./camera_jpeg_capture
[INFO] (NvEglRenderer.cpp:110) Setting Screen width 640 height 480
Error generated. main.cpp, execute:429 Failed to get ICaptureSession interface

xx@xx-desktop:/usr/src/jetson_multimedia_api/samples/10_camera_recording$ ./camera_recording
Set governor to performance before enabling profiler
Error generated. main.cpp, execute:552 Failed to get ICaptureSession interface

Hi,
Please try v4l2-ctl command and check if you can capture raw frame data. Looks like the sensor driver is not well ported to r35.1.

I am using stock imx219 drivers without any change. The same driver and dts settings were working with L4T 34.1 and I guess there are no major changes between these versions. Kernel version is upgraded from 5.10.65 to 5.10.104.
I used a simple v4l2 command to capture. But I am not able to open the captured image, it’s blank.
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=bb001.raw --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 3280/2464
Pixel Format : ‘RG10’ (10-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 6560
Size Image : 16163840
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 16163840 ts: 470.946460 (ts-monotonic, ts-src-eof)

v4l2-ctl --all output: v4l2.txt (4.3 KB)

Could you attached the sensor dts file to review.
Also check below command able capture continuously.

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap

Hi Shane,
Attaching the dts files for imx219 CSI camera’s.
Entry for 3rd CSI camera - tegra194-mstl-nb-common-csi-imx219.dtsi (7.6 KB)
Entries for 1st and 2nd CSI camera’s - tegra194-camera-rbpcv2-imx219.dtsi (26.3 KB)
tegra194-camera-jakku-rbpcv2-imx219.dtsi (1.6 KB)

As of now, I am testing only the first 2 camera’s as it is (stock), without doing any dts or kernel driver changes.
Also attaching output of the v4l2 command you mentioned.
v4l2-2.txt (7.2 KB)

Hi @DaneLLL and @ShaneCCC, Do you have any inputs on this issue? What are the changes that were done from 34.1.1dp to 35.1 release w.r.t CSI camera?

Please get the daemon log to check. Run below command then launch Argus APP by another console.

sudo service nvargus-daemon stop
sudo su
nvargus-daemon 2>&1 | tee d.log

Hello Shane,
I executed these commands and only the below line appears in the log file.
=== NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections…
I also tried with multiple boot but same thing.

You need to launch camera after those command line.
Please launch gst-launch-1.0 nvarguscamerasrc … from another console after those command.

Hello Shane,
I am attaching the log file.
d.log (6.8 KB)

Didn’t see any suspect error for it.
Do you check if any i2c error in kernel message?

Hi,
No I2C errors from log.

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