gstreamerpython-gstreamerwebcam-capture

vidsrc in uvch264 fails


Following pipeline fails. How to debug this? What is going wrong?

gst-launch-1.0 -v uvch264src device=/dev/video0 name=src \
  auto-start=true src.vidsrc ! queue ! video/x-h264 ! \
  h264parse ! avdec_h264 ! xvimagesink sync=false
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0: num-buffers = -1 
/GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0: device = /dev/video0 
/GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0: num-buffers = -1 
/GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0: device = /dev/video0 
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)2304, height=(int)1536, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)2/1
/GstPipeline:pipeline0/GstUvcH264Src:src.GstGhostPad:vfsrc: caps = video/x-raw, format=(string)YUY2, width=(int)2304, height=(int)1536, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)2/1
/GstPipeline:pipeline0/GstUvcH264Src:src.GstGhostPad:vfsrc.GstProxyPad:proxypad0: caps = video/x-raw, format=(string)YUY2, width=(int)2304, height=(int)1536, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)2/1
ERROR: from element /GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstUvcH264Src:src/GstV4l2Src:v4l2src0:
streaming task paused, reason not-linked (-1)
Execution ended after 0:00:02.891955232
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

But vfsrc is working fine.

gst-launch-1.0 -v -e uvch264src device=/dev/video0 name=src auto-start=true  \ 
  src.vfsrc ! queue ! video/x-raw,format=\(string\)YUY2,width=320,height=240,framerate=10/1 ! \
  textoverlay text="Capture from vfsrc 79879 " font-desc="Sans 24" ! \
  xvimagesink sync=false

Thanks,
Sneha


Solution

  • uvch264src requires the vfsrc pad to be linked. If you don't want to use it you can link it to a fakesink.

    gst-launch-1.0 -v uvch264src device=/dev/video0 name=src auto-start=true src.vidsrc ! queue ! video/x-h264 ! h264parse ! avdec_h264 ! xvimagesink sync=false src.vfsrc ! fakesink