YUV sensor input-----v4l2-ctl succeed! gst-launch-1.0 fail !

dear all,

I have transplanted a YUV sensor(YUV422 8bit) that works properly using v4l2-ctl;

but gst-launch-1.0 was not able to capture images , as follow:

v4l2-ctl -d /dev/video0 -w --verbose --set-fmt-video=width=1920,height=1080,pixelformat=UYVY --stream-mmap --stream-count=1 --set-ctrl bypass_mode=0 --stream-to=/tmp/stream.yuv
<<<<<<<<<<

stream.yuv ok


gst-launch-1.0 -v v4l2src device="/dev/video0" ! "video/x-raw,width=1920,height=1080, format=(string)I420" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvoverlaysink

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: <b>Internal data stream error.</b>
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

hello JiaZW,

  1. may I know which JetPack release you’re working with.
  2. could you please have a try to launch with nvgstcapture, for example,
$ nvgstcapture-1.0 --camsrc=0

Hi JiaZW,

I believe the issue with the pipeline is the format field in the caps of v4l2src. I suggest the following pipeline using the same format as the v4l2-ctl command which you reported is working.

gst-launch-1.0 -v v4l2src device="/dev/video0" ! "video/x-raw,width=1920,height=1080, format=(string)UYVY" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvoverlaysink

Regards,

@-desktop:~$ nvgstcapture-1.0 --camsrc=0
Encoder null, cannot set bitrate!
Encoder Profile = High
Runtime USB Camera Commands:

Help : ‘h’
Quit : ‘q’
Set Capture Mode:
mo:
(1): image
(2): video
Get Capture Mode:
gmo
Capture: enter ‘j’ OR
followed by a timer (e.g., jx5000, capture after 5 seconds) OR
followed by multishot count (e.g., j:6, capture 6 images)
timer/multihot values are optional, capture defaults to single shot with timer=0s
Start Recording : enter ‘1’
Stop Recording : enter ‘0’
Set Preview Resolution:
pcr: e.g., pcr:2
(0) : 176x144
(1) : 320x240
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
NOTE: Preview/Encode resolution will be same as Capture resolution for USB-Camera
Get Preview Resolution:
gpcr
Get Image Capture Resolution:
gicr
Get Video Capture Resolution:
gvcr
Set Capture Device Node:
cdn: e.g., cdn:0
(0): /dev/video0
(1): /dev/video1
(2): /dev/video2
Get Capture Device Node:
gcdn

Runtime encoder configuration options:

Set Encoding Bit-rate(in bytes):
br: e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep: e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter ‘f’

** Message: 22:52:56.178: main:4564 iterating capture loop …
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstV4l2Src:v4l2src0: Internal data stream error.
debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
** Message: 22:52:56.237: main:4574 Capture completed
** Message: 22:52:56.238: main:4623 Camera application will now exit

Hi,
Please refer to
[url]Logitech C930e on Jetson TX1 very slow and choppy video - Jetson TX1 - NVIDIA Developer Forums
You have to configure exact width ,height, format, and framerate in the pipeline.

dear DaneLLL,

width ,height, format, and framerate all ok

Hi JiaZW,
Does it work for you by following the post ?