0

I'm attempting to make use of the hardware h264 compressor in a logitech c920 usb camera. I am using the gstreamer1.0 package provided by Ubuntu 14.10.

gst-launch-1.0 -v -e uvch264src device=/dev/video0 name=src auto-start=true \
src.vfsrc ! queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! \
h264parse ! avdec_h264 ! xvimagesink sync=false

I am getting the output

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
/GstPipeline:pipeline0/GstUvcH264Src:src/GstCapsFilter:capsfilter1: caps = "video/x-h264\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1"
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...

Any clues? I'm a bit baffled. I have a suspicion that I'm going to be told "you need to upgrade", but I'm trying to avoid going through the trouble of building everything from source, then attempting to replicate it on other systems.

lysdexia
  • 1,786
  • 18
  • 29

1 Answers1

1

Have you read this: http://www.oz9aec.net/index.php/gstreamer/487-using-the-logitech-c920-webcam-with-gstreamer-12?

I haven't this cam, but as I understood you have 2 streams here:

  1. H.264 high resolution stream, src.vidsrc
  2. MJPEG low resolution stream, src.vfsrc

So, try to change src.vfsrc to src.vidsrc.

Also, you could try v4l2src element:

gst-launch-1.0 -v -e v4l2src device=/dev/video0 ! queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! \
  h264parse ! avdec_h264 ! xvimagesink sync=false

Also, you can read this topic, it may help: Capturing h.264 stream from camera with Gstreamer

Community
  • 1
  • 1
Pavel Krasavin
  • 165
  • 2
  • 11
  • I had indeed read the link you provided! Your suggestion vis. changing from src.vfsrc to src.vidsrc failed with "streaming task paused, reason not-linked (-1)", but it has definitely set me on a better path by revealing that I have no idea what "not-linked" means and should do a bit more reading. There is quite a learning curve with gstreamer and I'm not sure I actually understand it well enough to ask intelligent questions, yet. – lysdexia May 14 '15 at 13:50
  • That being said: any clues to understanding how to discover the capabilities of one's hardware and build are appreciated. I realize that some of this stuff is "self-documenting", but it's a bit daunting to the noob. – lysdexia May 14 '15 at 13:53
  • Try to use both src.vfsrc & src.vidsrc then, linking the first to fakesink, it may be proper: `gst-launch-1.0 uvch264src device=/dev/video0 name=src auto-start=true src.vfsrc ! video/x-raw, format=YUY2, width=160, height=90, framerate=5/1 ! fakesink sync=false src.vidsrc ! queue ! video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! avdec_h264 ! xvimagesink` – Pavel Krasavin May 14 '15 at 14:27