v4l2src doesn't capture H264 from local camera

zupsel s at stickybit.ru
Wed Apr 3 06:11:25 PDT 2013


Hi all!

I've just got Logitech C920 webcam. It encodes video to H264 itself.
I'd like to catch this encoded stream with v4l2src element.

I'm using Gstreamer 1.0 on Raspberry Pi (Raspbian OS).

v4l2-ctl says that camera is producing H264:

# v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
        ...
        Index       : 1
        Type        : Video Capture
        Pixel Format: 'H264' (compressed)
        Name        : H.264
        ...

But when I'm trying to use a pipeline like:
*# gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! video/x-h264, width=800,
height=448, framerate=30/1 ! fakesink*

it keeps giving me *not-negotiated (-4)* error:
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-h264,
width=(int)800, height=(int)448, interlace-mode=(string)progressive,
pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
video/x-h264, width=(int)800, height=(int)448,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps =
video/x-h264, width=(int)800, height=(int)448,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
video/x-h264, width=(int)800, height=(int)448,
interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1,
framerate=(fraction)30/1
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal
data flow error.
Additional debug info:
gstbasesrc.c(2809): gst_base_src_loop ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 67687169 ns.

I can catch RAW video from camera with:
# gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! video/x-raw ! fakesink

And MJPEG video with:
gst-launch-1.0 -vvv v4l2src device=/dev/video0 ! image/jpeg ! fakesink

Any help!



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/v4l2src-doesn-t-capture-H264-from-local-camera-tp4659383.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list