0

我正在尝试在罗技 c920 USB 相机中使用硬件 h264 压缩器。我使用的是 Ubuntu 14.10 提供的 gstreamer1.0 包。

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

我得到输出

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 ...

有什么线索吗?我有点困惑。我怀疑我会被告知“您需要升级”,但我试图避免遇到从源代码构建所有内容然后尝试在其他系统上复制它的麻烦。

4

1 回答 1

1

你读过这个:http ://www.oz9aec.net/index.php/gstreamer/487-using-the-logitech-c920-webcam-with-gstreamer-12 ?

我没有这个摄像头,但据我所知,这里有 2 个流:

  1. H.264 高分辨率流,src.vidsrc
  2. MJPEG 低分辨率流,src.vfsrc

因此,尝试将src.vfsrc更改为src.vidsrc

此外,您可以尝试v4l2src元素:

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

此外,您可以阅读此主题,它可能会有所帮助:Capturing h.264 stream from camera with Gstreamer

于 2015-05-14T09:36:04.290 回答