Error running with Flir Boson

• Hardware Platform: Jetson Xavier NX
• DeepStream Version: 6.1.1
• JetPack Version (valid for Jetson only): 5.0.2
• TensorRT Version: 8.4.1.5
• Issue Type( questions, new requirements, bugs): bugs

Hi,
I have a Flir Boson camera. Information from running “v4l2-ctl -d /dev/video1 --list-formats-ext” command is:

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: ‘UYVY’ (UYVY 4:2:2)

When I run these below pipelines, I get corresponding errors:

  • Pipeline 1
GST_DEBUG=3 gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 ! nvvideoconvert ! xvimagesink
  • Log 1

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
0:00:00.180786163 20816 0xaaaafaf2e400 FIXME default gstutils.c:3980:gst_pad_create_stream_id_internal:nvv4l2camerasrc0:src Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Setting pipeline to PLAYING …
New clock: GstSystemClock
0:00:00.259859133 20816 0xaaaafaf2ed80 WARN basesink gstbasesink.c:1209:gst_base_sink_query_latency: warning: Pipeline construction is invalid, please add queues.
0:00:00.259954074 20816 0xaaaafaf2ed80 WARN basesink gstbasesink.c:1209:gst_base_sink_query_latency: warning: Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
0:00:06.383228266 20816 0xaaaafaf2e400 ERROR nvv4l2camerasrc gstnvv4l2camerasrc.cpp:396:gst_nvv4l2camera_buffer_pool_acquire_buffer: Timeout Error
0:00:06.384425868 20816 0xaaaafaf2e400 ERROR nvv4l2camerasrc gstnvv4l2camerasrc.cpp:525:gst_nvv4l2camera_buffer_pool_release_buffer: VIDIOC_QBUF failed :Invalid argument
Got EOS from element “pipeline0”.
Execution ended after 0:00:06.234865709
Setting pipeline to NULL …
Freeing pipeline …

  • Pipeline 2:
GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video1 ! videoconvert ! xvimagesink
  • Log 2:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
0:00:00.124322705 20825 0xaaab0d090700 ERROR v4l2 gstv4l2object.c:1948:gst_v4l2_object_get_interlace_mode: Unknown enum v4l2_field 7
0:00:00.124591050 20825 0xaaab0d090700 WARN v4l2 gstv4l2object.c:2863:gst_v4l2_object_get_nearest_size:v4l2src0:src Unsupported field type for UYVY@720x507: 7
0:00:00.124700616 20825 0xaaab0d090700 WARN v4l2 gstv4l2object.c:2873:gst_v4l2_object_get_nearest_size:v4l2src0:src Unable to try format: Inappropriate ioctl for device
0:00:00.124744199 20825 0xaaab0d090700 WARN v4l2 gstv4l2object.c:2760:gst_v4l2_object_probe_caps_for_format:v4l2src0:src Could not probe minimum capture size for pixelformat UYVY
0:00:00.124819173 20825 0xaaab0d090700 ERROR v4l2 gstv4l2object.c:1948:gst_v4l2_object_get_interlace_mode: Unknown enum v4l2_field 7
0:00:00.124884771 20825 0xaaab0d090700 WARN v4l2 gstv4l2object.c:2863:gst_v4l2_object_get_nearest_size:v4l2src0:src Unsupported field type for UYVY@720x507: 7
0:00:00.124920610 20825 0xaaab0d090700 WARN v4l2 gstv4l2object.c:2873:gst_v4l2_object_get_nearest_size:v4l2src0:src Unable to try format: Inappropriate ioctl for device
0:00:00.124955970 20825 0xaaab0d090700 WARN v4l2 gstv4l2object.c:2766:gst_v4l2_object_probe_caps_for_format:v4l2src0:src Could not probe maximum capture size for pixelformat UYVY
Setting pipeline to PLAYING …
New clock: GstSystemClock
0:00:00.192724355 20825 0xaaab0d090700 WARN v4l2src gstv4l2src.c:914:gst_v4l2src_create: Timestamp does not correlate with any clock, ignoring driver timestamps
^Chandling interrupt.
Interrupt: Stopping pipeline …
Execution ended after 0:01:04.604110332
Setting pipeline to NULL …
Freeing pipeline …

Moving to Xavier NX forum for better support, thanks.

1 Like

Oh, I see the category is changed to Xavier NX.
Thank you.

hello hasontung1999,

please have a try to convert the formats as I420 for testing.
for example, $ DISPLAY=:0 gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY,width=640,height=480 ! videoconvert ! video/x-raw,formst=I420 ! xvimagesink

1 Like

Hi,
I run your example pipeline and get an error “Internal data stream error”, so I omit width & height properties and try again. It logs like below, still get errors but the pipeline is not broken:

Anw, running with “v4l2src” is just for more information. The major is nvv4l2camerasrc, I would like to run a pipeline using it.
When I use a pipeline like this (encode and push into udpsink):

GST_DEBUG=3 gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 ! 'video/x-raw(memory:NVMM), format=UYVY' ! nvvideoconvert ! 'video/x-raw(memory:NVMM), format=I420' ! nvv4l2h264enc bitrate=1000000 ! rtph264pay ! udpsink host=127.0.0.1 port=5000

It logs:

Then I run a more simple pipeline to see what’s happened:

GST_DEBUG=3 gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 ! "video/x-raw(memory:NVMM),format=UYVY" ! nvvideoconvert ! "video/x-raw,format=I420" ! xvimagesink sync=false

And I still get the same error:

hello hasontung1999,

how about running v4l ioctl to check the basic camera functionality,
for example,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=640,height=480,pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

BTW, is this an interlaced, or a progressive scan? it seems some unsupported errors reported.

Hi,
Hmmm, I don’t actually know how this command works but the console just logs like this:

<<<

Omit width/height and run the command:

v4l2-ctl -d /dev/video0 --set-fmt-video=pixelformat=UYVY --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

The console logs like this:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 59.93 fps, dropped buffers: 2
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

I’m sorry but I don’t really know the exact answer. I think it is a progressive scan because I don’t set the “interlace-mode” in caps.

hello hasontung1999,

that’s v4l ioctl to check the sensor stream, each of < indicate a success capture frame.
so, your basic camera functionality should works normally.

please try with below pipeline,
gst-launch-1.0 nvv4l2camerasrc device=/dev/video1 ! 'video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=progressive' ! nvvidconv ! nv3dsink -e

Hi, thank you for your supports.
I run your command and it logs errors like this:

hello hasontung1999,

you may try setting up environment variable, such as $ export DISPLAY=:0 for rendering the display preview frames.

Hi,
I still get the errors:

0:00:09.472482112 8013 0xaaaae1763b60 ERROR nvv4l2camerasrc gstnvv4l2camerasrc.cpp:396:gst_nvv4l2camera_buffer_pool_acquire_buffer: Timeout Error
0:00:09.482718272 8013 0xaaaae1763b60 ERROR nvv4l2camerasrc gstnvv4l2camerasrc.cpp:525:gst_nvv4l2camera_buffer_pool_release_buffer: VIDIOC_QBUF failed :Invalid argument

may I know what’s the failure from kernel side, please setup a terminal for running $ dmesg --follow to reproduce the issue again.

Hi,
Do you mean the log of dmesg --follow when running the gst-launch-1.0 ?
If yes, it is:

[ 2721.703015] nvmap_alloc_handle: PID 13154: gst-launch-1.0: WARNING: All NvMap Allocations must have a tag to identify the subsystem allocating memory.Please pass the tag to the API call NvRmMemHanldeAllocAttr() or relevant.
[ 2721.705664] adv7280: adv7180_s_power(on)
[ 2721.705673] adv7280: adv7180_set_power(on)
[ 2721.705680] adv7280: adv7180_select_page( page=0 )
[ 2721.705685]
adv7280 read old value first
[ 2721.705691] adv7280: adv7180_select_page( page=0 )
[ 2721.706266] adv7280 read: 0x0f 0x24
[ 2721.706272] adv7280 write: 0x0f 0x04
[ 2721.706644] adv7280: adv7180_select_page( page=0 )
[ 2721.707156] adv7280 read: 0x0f 0x04
[ 2721.707162] adv7280: End Write i2c
[ 2721.707168]
adv7280 csi read old value first
[ 2721.708210] adv7280 csi read: 0xde 0x02
[ 2721.708219] adv7280 csi write: 0xde 0x02
[ 2721.709108] adv7280 csi read: 0xde 0x02
[ 2721.709114] adv7280: End Write i2c CSI
[ 2721.709120]
adv7280 csi read old value first
[ 2721.709640] adv7280 csi read: 0xd2 0xf7
[ 2721.709646] adv7280 csi write: 0xd2 0xf7
[ 2721.710512] adv7280 csi read: 0xd2 0xf7
[ 2721.710518] adv7280: End Write i2c CSI
[ 2721.710523]
adv7280 csi read old value first
[ 2721.711056] adv7280 csi read: 0xd8 0x65
[ 2721.711063] adv7280 csi write: 0xd8 0x65
[ 2721.712483] adv7280 csi read: 0xd8 0x65
[ 2721.712492] adv7280: End Write i2c CSI
[ 2721.712498]
adv7280 csi read old value first
[ 2721.713019] adv7280 csi read: 0xe0 0x09
[ 2721.713026] adv7280 csi write: 0xe0 0x09
[ 2721.713926] adv7280 csi read: 0xe0 0x09
[ 2721.713933] adv7280: End Write i2c CSI
[ 2721.713938]
adv7280 csi read old value first
[ 2721.714446] adv7280 csi read: 0x2c 0x00
[ 2721.714483] adv7280 csi write: 0x2c 0x00
[ 2721.715358] adv7280 csi read: 0x2c 0x00
[ 2721.715365] adv7280: End Write i2c CSI
[ 2721.715370]
adv7280 csi read old value first
[ 2721.716062] adv7280 csi read: 0x00 0x80
[ 2721.716071] adv7280 csi write: 0x00 0x00
[ 2721.716946] adv7280 csi read: 0x00 0x00
[ 2721.716953] adv7280: End Write i2c CSI
[ 2721.744470] adv7280: adv7180_s_stream( enable=1 )
[ 2721.744479] adv7280: adv7180_select_page( page=0 )
[ 2721.745038] adv7280 read: 0x10 0x0d
[ 2721.745048] adv7280 8-0020: Autodetection result: 00
[ 2721.745054] adv7280: adv7180_select_page( page=0 )
[ 2721.745562] adv7280 read: 0x13 0x69
[ 2721.745570] adv7280 8-0020: Interlaced video detected (status3=0x69)
[ 2721.767822] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 64
[ 2721.801327] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 64
[ 2721.817940] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 2, flags: 0, err_data 64
[ 2721.839640] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 2, flags: 0, err_data 64
[ 2721.856208] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 2, flags: 0, err_data 64
[ 2721.889573] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 1, flags: 0, err_data 64

there’re discarding frames. the error flag means the channel has encountered an uncorrectable error and it must be reset.
is it possible to trigger a reset signal from driver side for testing?

Hmmm, I actually don’t know how to trigger a reset signal from camera’s driver.
As I know, it is installed while flashing Jetpack on NVMe using a customized kernel.

ahh… I have misread this message.
it seems the steam is output as interlaced, which is not supported by default.
could you please contact with sensor vendor to configure this as progressive.

Yeah, I will.
However, for more information, I don’t know why but it worked normally on JP 4.5.1.
Thank you for your support.