Logitech C920 vidsrc syntax

Andrew Silby asilby at yahoo.com
Fri Mar 1 13:39:07 UTC 2019


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.

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



More information about the gstreamer-devel mailing list