Stream Synchronized Webcams
Nicolas Dufresne
nicolas at ndufresne.ca
Thu Nov 10 03:04:50 UTC 2016
Le 8 nov. 2016 2:05 AM, "Eric-Stone" <somedude114 at gmail.com> a écrit :
>
> Hi,
>
> I'm trying to stream two synchronized side-by-side webcams compressed in
> h264 over the network. Right now, I have the output saved to a file
(because
> it simplifies testing) using the command:
>
> gst-launch-1.0 \
> v4l2src device=/dev/video0 do-timestamp=true ! \
> image/jpeg, width=$WIDTH, height=$HEIGHT, framerate=$FPS/1 ! \
> jpegparse ! jpegdec ! \
> videorate ! \
> alpha alpha=1.0 ! \
> videobox border-alpha=0 left=-$WIDTH ! \
> videomixer name=mix ! \
> videoconvert ! \
> queue ! \
> queue ! omxh264enc ! matroskamux ! filesink
location=output/out.mkv \
> $v4l2src device=/dev/video1 do-timestamp=true ! \
> image/jpeg, width=$WIDTH, height=$HEIGHT, framerate=$FPS/1 ! \
> jpegparse ! jpegdec ! \
> videorate ! \
> queue ! \
> mix.
>
> This works, but unfortunately the two views are out of sync. I imagine
that
> I need to add "sync=true" to some element before the encoder, but I'm
unsure
> as where that should go. Does anyone have any suggestions on how to
> synchronize these two inputs?
>
First avoid do-timestamp, this will break a/v sync. Then replace videomixer
with the new element compositor. The new one supports live streams. It's a
drop-in replacement. You should probably use the compositor pad properties
instead of videobox, performance will be better.
>
> --
> View this message in context:
http://gstreamer-devel.966125.n4.nabble.com/Stream-Synchronized-Webcams-tp4680531.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 --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161109/2e3f17bc/attachment.html>
More information about the gstreamer-devel
mailing list