Hello,
I’m encountering an issue with nvarguscamerasrcon a Jetson platform (nvidia-jetson-kernel_src-linux-36.4.4-jetpack-6.2.1, orin nx). When I try to capture video using a GStreamer pipeline, the pipeline fails with a dmabuf_fdmapping error, even though the same camera works correctly with v4l2-ctlin a direct V4L2 capture test.
log:
run@localhost:/tmp$ v4l2-ctl -V --set-fmt-video=width=2560,height=1984 --set-ctrl bypass_mode=0,sensor_mode=0 --stream-mmap -d /dev/video2
Format Video Capture:
Width/Height : 2560/1984
Pixel Format : ‘GB10’ (10-bit Bayer GBGB/RGRG)
Field : None
Bytes per Line : 5120
Size Image : 10158080
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps
<<^C
run@localhost:/tmp$ gst-launch-1.0 -e nvarguscamerasrc sensor-id=2 num-buffers=300 ! ‘video/x-raw(memory:NVMM),width=2560,height=1984,framerate=30/1,format=NV12’ ! nvv4l2h264enc bitrate=8000000 ! h264parse ! qtmux ! filesink location=output.mp4
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Redistribute latency…
NvMMLiteOpen : Block : BlockType = 4
===== NvVideo: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 2560 x 1984 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 4.000000; Exposure Range min 40000, max 10000000;
GST_ARGUS: Running with following settings:
Camera index = 2
Camera mode = 0
Output Stream W = 2560 H = 1984
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.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:734 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:245 (propagating)
Redistribute latency…
Got EOS from element “pipeline0”.
EOS received - stopping pipeline…
Execution ended after 0:00:04.034338336
Setting pipeline to NULL …
GST_ARGUS: Cleaning up
GST_ARGUS: Done Success
Freeing pipeline …
dts.txt (17.8 KB)
Hello @1984979292!
Based on the title and content of your topic, it looks like it may receive better visibility and feedback in a different category. We took the liberty of moving it for you.
If this was an incorrect assessment, please send me a direct message.
Disclaimer: this moderation suggestion and message were generated with AI assistance.
The tegra_sinterface should be serial_a instead.
mode0 {/*mode 2560x1984@30fps*/
status = "okay";
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_e";
phy_mode = "DPHY";
vc_id = "3";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
lane_polarity = "6";
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "bayer";
pixel_phase = "gbrg";
active_w = "2560";
active_h = "1984";
readout_orientation = "0";
line_length = "2800";
inherent_gain = "1";
//mclk_multiplier = "3.01";
pix_clk_hz = "200000000";
serdes_pix_clk_hz = "560000000";
gain_factor = "100";
min_gain_val = "100"; /* dB */
max_gain_val = "400"; /* dB */
step_gain_val = "1"; /* 0.1 */
default_gain = "100";
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = "1";
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "40"; /*us, 2 lines*/
max_exp_time = "10000";
step_exp_time = "1";
default_exp_time = "10000";/* us */
embedded_metadata_height = "0";
};
This issue has been resolved. Thank you very much.
Sorry to bother you again, I have one more question. When I use gst-launch-1.0 to get images from video0 and video1 separately, both work fine. But when I try to start both streams at the same time, the second one fails to start. Why is this happening? Below is the run log. Please help me translate this issue.
log:
gst-launch-1.0 -e nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvvidconv ! videoconvert ! pngenc ! filesink location=output.png
GLib (gthread-posix.c): Unexpected error from C library during ‘pthread_setspecific’: Invalid argument. Aborting.
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: 2064 x 1552 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 48.000000; Exposure Range min 12000, max 19000000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 2064 H = 1552
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.
Redistribute latency…
0:00:38.0 / 99:99:99.
run@localhost:/tmp$ gst-launch-1.0 -e nvarguscamerasrc sensor-id=1 ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvvidconv ! videoconvert ! pngenc ! filesink location=output.png
GLib (gthread-posix.c): Unexpected error from C library during ‘pthread_setspecific’: Invalid argument. Aborting.
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:805 Failed to create CaptureSession
Redistribute latency…
Got EOS from element “pipeline0”.
EOS received - stopping pipeline…
Execution ended after 0:00:00.016708128
Setting pipeline to NULL …
Freeing pipeline …
run@localhost:/tmp$
I would suspect the incorrect virtual channel ID cause the problem.
Could you please point out the specific location? Currently, the hardware connection is set up with all four cameras connected via Port A. Thank you very much.
You need to make sure the vc-id match to the aggregator’s output.
I found that I changed the four dpcm_enable = "false";settings to dpcm_enable = "true";, and then I was able to use gst-launch-1.0to run video2 and video3 simultaneously for image capture. However, I cannot run video0 and video1 together with video2 and video3 to capture images at the same time. I’m not sure if this is because video0/1 and video2/3 have different formats. Could you please tell me why this is the case? Thank you very much.
Each of them working well indivitually?
Yes, they can run independently with gst-launch-1.0. Cameras of the same type can run together, but cameras of different types cannot run together. The four connected cameras consist of two 2064x1552, RAW12 cameras and two 2560x1984, RAW10 cameras.
Please get the daemon log for analysising.
sudo service nvargus-daemon stop
sudo nvargus-daemon 2>&1 | tee log.txt
Thanks
Just check internally looks like current in Argus: RAW10 and RAW12 on different virtual channels sharing the same CSI port are not supported simultaneously by Argus
you may see-also Topic 358947, and test with the patch file.