USB camera data stream error

Hi,

I am running the below pipeline

gst-launch-1.0 -e v4l2src device=/dev/video0 ! queue ! video/x-raw, width=1920, height=1080, framerate=30/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=5/1 ! jpegenc ! multifilesink location=presentation.jpg

and I get the below error after running for sometime

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device ‘/dev/video0’ has no supported format
Additional debug info:
gstv4l2object.c(3760): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Call to S_FMT failed for YUYV @ 1920x1080: Invalid argument
EOS on shutdown enabled – waiting for EOS after Error
Waiting for EOS…
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)

The device starts to work fine after a power off and on and will again stop working after few hours it will stop.

Hi,
It looks like the v4l2 source does not generate jpegenc-supported frame data. Please try with videoconvert plugin:

gst-launch-1.0 -e v4l2src device=/dev/video0 ! queue ! video/x-raw, width=1920, height=1080, framerate=30/1 ! videorate ! video/x-raw, width=1920, height=1080, framerate=5/1 ! videoconvert ! jpegenc ! multifilesink location=presentation%05d.jpg

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