How do I convert the following pipeline:
gst-launch-1.0 -v v4l2src device="/dev/video2" ! queue ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc maxperf-enable=1 insert-sps-pps=1 idrinterval=1 ! h264parse ! queue ! rtph264pay ! udpsink port=5000 host=192.168.12.187 sync=false
to one that works for grayscale images?
I know I need to convert to an RGB or YUV image and then pass to nvvidconv but the following pipeline gives me negotiation errors:
gst-launch-1.0 -v v4l2src device="/dev/video0" ! video/x-raw,format=GRAY16_LE, width=848, height=480 ! videoconvert ! video/x-raw,format=RGBA, width=848, height=480 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc maxperf-enable=1 insert-sps-pps=1 idrinterval=1 ! h264parse ! queue ! rtph264pay ! udpsink port=5000 host=192.168.12.187 sync=false
I get the following errors when GST_DEBUG=2
:
0:00:00.326558789 17749 0x55b09932a0 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55b09492b0 Failed to determine interlace mode
0:00:00.326635301 17749 0x55b09932a0 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55b09492b0 Failed to determine interlace mode
0:00:00.326676657 17749 0x55b09932a0 WARN v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x55b09492b0 Failed to determine interlace mode
0:00:00.326771086 17749 0x55b09932a0 WARN v4l2 gstv4l2object.c:4434:gst_v4l2_object_probe_caps:<nvv4l2h264enc0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
Pipeline is live and does not need PREROLL ...
0:00:00.328923066 17749 0x55b0978000 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
0:00:00.328966505 17749 0x55b0978000 WARN basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)