Logitech C920 vidsrc syntax
Andrew Silby
asilby at yahoo.com
Fri Mar 1 14:19:55 UTC 2019
Hi Nicholas, I've just looked back at what I did. Using c920. Here is the log:
gst-launch-1.0 uvch264src do-timestamp=true initial-bitrate=2000000 average-bitrate=2000000 peak-bitrate=2000000 iframe-period=3000 device=/dev/video0 name=src auto-start=true src.vidsrc ! video/x-h264,width=1280,height=720,framerate=20/1,profile=main ! fakesink
0:00:00.133891567 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:1889:xu_query:<uvch264src0> Can't query XU with fd = -1
0:00:00.133978494 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:930:set_bitrate:<uvch264src0> BITRATE_LAYERS GET_CUR error
0:00:00.134001775 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:1889:xu_query:<uvch264src0> Can't query XU with fd = -1
0:00:00.134024952 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:1052:update_bitrate:<uvch264src0> BITRATE_LAYERS GET_CUR error
0:00:00.134064743 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:1889:xu_query:<uvch264src0> Can't query XU with fd = -1
0:00:00.134088337 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:930:set_bitrate:<uvch264src0> BITRATE_LAYERS GET_CUR error
0:00:00.134110524 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:1889:xu_query:<uvch264src0> Can't query XU with fd = -1
0:00:00.134132399 1596 0x1b3fbc0 WARN uvch264src gstuvch264_src.c:1052:update_bitrate:<uvch264src0> BITRATE_LAYERS GET_CUR error
That's why I used v4l2src instead. I assume - probably wrongly - that uvch264src wasn't be kept up to date.
Thanks for all the work everyone does on the project - it's fantastic.
-----Original Message-----
From: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> On Behalf Of Nicolas Dufresne
Sent: 01 March 2019 13:45
To: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Subject: Re: Logitech C920 vidsrc syntax
Le vendredi 01 mars 2019 à 13:39 +0000, Andrew Silby a écrit :
> I did try using uvch264src to control bitrate but from memory I don't
> think it worked on the c920/h264. That's why I ended up using v4l2src.
It has been implemented specifically for that camera, but is known to work with the C930 too. You should have requested some help in the mailing list.
>
> -----Original Message-----
> From: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org>
> On Behalf Of Nicolas Dufresne
> Sent: 01 March 2019 13:36
> To: Discussion of the development of and with GStreamer
> <gstreamer-devel at lists.freedesktop.org>
> Subject: Re: Logitech C920 vidsrc syntax
>
> Le vendredi 01 mars 2019 à 13:12 +0000, Andrew Silby a écrit :
> > I would use v4l2src rather than uvch264src. I use it with rtp and c920/brio and it works very well.
>
> uvch264src is a wrapper on top of v4l2src that makes UVC specific
> calls to control the C920 encoder (e.g. bitrate). With v4l2src you
> won't be able to control the bitrate of the encoder. The Brio does not
> have an
> H264 encoder.
>
> > -----Original Message-----
> > From: gstreamer-devel
> > <gstreamer-devel-bounces at lists.freedesktop.org>
> > On Behalf Of Ingemar Johansson
> > Sent: 01 March 2019 11:55
> > To: gstreamer-devel at lists.freedesktop.org
> > Subject: Logitech C920 vidsrc syntax
> >
> > Hi
> > I am trying to realize the pipeline below with the c-code snippet further below. The problem I have is with the src.vidsrc property or parameter. My effort is obviously wrong, so how do one fix this ?
> >
> > BR
> > /Ingemar
> > ============
> > gst-launch-1.0 -v -e uvch264src name=src auto-start=true
> > initial-bitrate=2000000 src.vidsrc !
> > video/x-h264,width=640,height=480,framerate=30/1 ! rtph264pay !
> > udpsink
> > host=88.129.244.8 port=5000
> >
> > ============
> > videosrc = gst_element_factory_make ("uvch264src", "encoder");
> > capsfilter = gst_element_factory_make ("capsfilter",
> > "capsfilter");
> > videopayload = gst_element_factory_make ("rtph264pay", "payload");
> >
> > capsfiltercaps =
> > gst_caps_from_string("video/x-h264,width=640,height=480,framerate=30/1");
> > g_object_set (G_OBJECT(capsfilter), "caps", capsfiltercaps,
> > NULL);
> >
> > g_object_set(G_OBJECT(videosrc), "name", "src", NULL);
> > g_object_set(G_OBJECT(videosrc), "auto-start", true, NULL);
> > g_object_set(G_OBJECT(videosrc), "initial-bitrate", 2000000, NULL);
> > g_object_set(G_OBJECT(videosrc), "*src.vidsrc*", NULL, NULL); // ?????
>
> When manually creating a pipeline, you need to add your GstElement to your GstPipepeline (gst_pipeine_new() -> gst_bin_add (GST_BIN (pipeline), element); You can use conveniances, like gst_bin_add_many() but be careful not to forget your sentinel (NULL as last parameter) or it will crash.
>
> When this is done, you then need to link your elements. See
> gst_element_link/gst_element_link_pads(). To help debug your work,
> make sure to check all return values, including insuring the
> gst_element_factory_make() calls worked, It's really easy to make a typo in a string like element name or pad name.
>
> >
> >
> > --
> > Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list