Multiple webcam issues

Nicolas Dufresne nicolas at ndufresne.ca
Mon Jun 19 18:21:19 UTC 2017


Hi,

please be aware the your are using @yahoo.com emails, which all goes to
spam on many systems. As a side effect, it's likely your message will
get missed, or only seen a while later.

Le dimanche 18 juin 2017 à 13:46 -0700, schmidtbag a écrit :
> I've been working on this project that ultimately results in recording from
> 2x 1080p webcams side-by-side on the same video, but gstreamer seems to be
> struggling with this despite using known-working commands and hardware that
> works fine with other applications.  I have two problems in particular, and
> I'm gussing they're both related.
> 
> The webcams in question are the Logitech C615, and my OS is Arch Linux 64
> bit.
> 
> 1.  When initializing gstreamer, it takes roughly 15 seconds to start doing
> anything as long as these cameras are involved.  So far it doesn't seem to
> matter what I change in the command, the delay is always the same.  For
> example, this:
> gst-launch-1.0 v4l2src device=/dev/video1 !
> video/x-raw,framerate=30/1,width=1280,height=720 ! xvimagesink

That's a known issue, distributed between the slow firmware in that
camera, UVC driver not being very smart, and GStreamer probing all
possible feature on the camera before the camera starts.

I have found how to optimize this, but haven't found time (neither
anyone to sponsor work). Let me know if you are interested.

> 
> The performance is fine, CPU usage always remains very low, but the delay is
> quite long.  If I tell it to record to a file, it's actually recording the
> entire time, but it's only showing the first frame during the those 15
> seconds.  When using a different webcam, there is no delay.

For live source, the recorded time is includes initial GAPs indeed.
That's normal, though there is some proposal on bugzilla to allow
clipping that initial delay. 

https://bugzilla.gnome.org/show_bug.cgi?id=750794

> 
> 2.  If I try doing a side-by-side recording, things get much worse.  I tried
> doing a very basic side-by-side recording.  If I set both input sources to
> both cameras, only one camera turns on and gstreamer eventually just
> self-closes.  If I do one webcam and one "videotestsrc", it will run but the
> framerate is abysmal.  Example:
> gst-launch-1.0 v4l2src device=/dev/video1 !
> vido/x-raw,framerate=30,width=640,height=480 ! m.sink_0   videotestsrc !
> video/x-raw,width=640,height=480 ! m.sink_1   videomixer name=m
> sink_0::xpos=0 sink_1::xpos=640 ! video/x-raw,width=1280,height=480 !
> xvimagesink

"videomixer" could be the wrong choice here, depending on the GStreamer
version. In general, to be sure, use compositor. This new mixer is
designed to handle live streams properly. In recent version of
GStreamer, videomixer is just a GstBin on top of compositor, that mimic
the old interface.

> 
> Note the CPU usage is still very low.  When using a different webcam, the
> frame rate is very smooth.
> 
> 
> Any suggestions?  ffmpeg doesn't seem to have these problems, but I intend
> to run these cameras on a platform where only gstreamer can run smoothly
> (when it actually works).
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Multiple-webcam-issues-tp4683435.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170619/20f73be0/attachment.sig>


More information about the gstreamer-devel mailing list