Version 1.4.5 and C920 webcam
Petteri Matilainen
pmatil at gmail.com
Thu Jan 28 07:14:08 PST 2016
Hi Jerry,
I have the same webcam but I'm using raspbian and raspberry pi. Have you
tried to use uvch264src? because I use that and it works, although I
cannot test ximagesink as raspberry pi does not support it.
Here's my pipeline:
$gstlaunch -v -e uvch264src initial-bitrate=1000000
average-bitrate=1000000 peak-bitrate=2000000 rate-control=vbr
iframe-period=1000 name=src auto-start=true src.vfsrc ! queue !
video/x-raw,format=\(string\)YUY2,width=320,height=240,framerate=10/1 !
fakesink src.vidsrc ! queue !
video/x-h264,width=1280,height=720,framerate=30/1,profile=main,stream-format=byte-stream
! h264parse ! flvmux ! rtmpsink rtmp://localhost/rtmp/live
In this case it is required to get the "viewfinder" stream as src.vfsrc
and direct it to fakesink as it is not used. The main stream src.vidsrc
is directed to rtmpsink. In your case you could try to replace h264parse
and everything after that with your own. Also the configuration after
uvch264src is not required but it is used to set the bitrate of the
in-camera H264 encoder. It is also required to set
stream-format=byte-stream, because without it it will not work at all.
That may be one of the reasons why you don't get a picture. Good luck.
regards,
PM
On 27.1.2016 17:48, Jerry Geis wrote:
> I am using CentOS 7.2... gstreamer is 1.4.5.
>
> When I run this to view my C920 webcam it comes up but 1 frame a second
> gst-launch-1.0 -vvvv v4l2src device=/dev/video0 ! decodebin !
> videoconvert ! ximagesink
>
> When I then run this command:
> gst-launch-1.0 -vvvv v4l2src device=/dev/video0 ! video/x-h264,
> width=1920,height=1080,framerate=\(fraction\)30/1 ! decodebin !
> videoconvert ! ximagesink
>
> My window pops up but I never see a picture..
>
> This is the output from GST_DEBUG=3
>
> GST_DEBUG=3 gst-launch-1.0 -vvvv v4l2src device=/dev/video0 !
> video/x-h264, width=1920,height=1080,framerate=\(fraction\)30/1 !
> decodebin ! videoconvert ! ximagesink
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps =
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps =
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
> "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:sink:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstH264Parse:h264parse0.GstPad:src:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1\,\
> parsed\=\(boolean\)true\,\ level\=\(string\)4\,\
> profile\=\(string\)constrained-baseline"
> 0:00:00.535139262 24709 0x156ed90 WARN fluh264dec
> fluh264dec.c:251:gst_fluh264dec_flush:<GstFluH264Dec at 0x7f8850060000> we
> are not setup yet, can't flush
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter1.GstPad:src:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1\,\
> parsed\=\(boolean\)true\,\ level\=\(string\)4\,\
> profile\=\(string\)constrained-baseline"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFluH264Dec:fluh264dec0.GstPad:sink:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1\,\
> parsed\=\(boolean\)true\,\ level\=\(string\)4\,\
> profile\=\(string\)constrained-baseline"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstCapsFilter:capsfilter1.GstPad:sink:
> caps = "video/x-h264\,\ stream-format\=\(string\)byte-stream\,\
> alignment\=\(string\)au\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1\,\
> parsed\=\(boolean\)true\,\ level\=\(string\)4\,\
> profile\=\(string\)constrained-baseline"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstFluH264Dec:fluh264dec0.GstPad:src:
> caps = "video/x-raw\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> format\=\(string\)I420\,\ framerate\=\(fraction\)30/1\,\
> rotation\=\(int\)0\,\ pixel-aspect-ratio\=\(fraction\)1/1"
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps =
> "video/x-raw\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> framerate\=\(fraction\)30/1\,\ rotation\=\(int\)0\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ format\=\(string\)BGRx"
> /GstPipeline:pipeline0/GstXImageSink:ximagesink0.GstPad:sink: caps =
> "video/x-raw\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> framerate\=\(fraction\)30/1\,\ rotation\=\(int\)0\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\ format\=\(string\)BGRx"
> /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps =
> "video/x-raw\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> format\=\(string\)I420\,\ framerate\=\(fraction\)30/1\,\
> rotation\=\(int\)0\,\ pixel-aspect-ratio\=\(fraction\)1/1"
> /GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstDecodePad:src_0.GstProxyPad:proxypad1:
> caps = "video/x-raw\,\ width\=\(int\)1920\,\ height\=\(int\)1080\,\
> format\=\(string\)I420\,\ framerate\=\(fraction\)30/1\,\
> rotation\=\(int\)0\,\ pixel-aspect-ratio\=\(fraction\)1/1"
> ^Chandling interrupt.
>
>
> Why would this not be showing a picture at the 30 frames a second?
>
> Thanks,
>
> jerry
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
More information about the gstreamer-devel
mailing list