<p dir="ltr"></p>
<p dir="ltr">Le 8 nov. 2016 2:05 AM, "Eric-Stone" <<a href="mailto:somedude114@gmail.com">somedude114@gmail.com</a>> a écrit :<br>
><br>
> Hi,<br>
><br>
> I'm trying to stream two synchronized side-by-side webcams compressed in<br>
> h264 over the network. Right now, I have the output saved to a file (because<br>
> it simplifies testing) using the command:<br>
><br>
> gst-launch-1.0 \<br>
>         v4l2src device=/dev/video0 do-timestamp=true ! \<br>
>         image/jpeg, width=$WIDTH, height=$HEIGHT, framerate=$FPS/1 ! \<br>
>         jpegparse ! jpegdec ! \<br>
>         videorate ! \<br>
>         alpha alpha=1.0 ! \<br>
>         videobox border-alpha=0 left=-$WIDTH ! \<br>
>         videomixer name=mix ! \<br>
>         videoconvert ! \<br>
>         queue ! \<br>
>         queue ! omxh264enc ! matroskamux ! filesink location=output/out.mkv  \<br>
>         $v4l2src device=/dev/video1 do-timestamp=true ! \<br>
>         image/jpeg, width=$WIDTH, height=$HEIGHT, framerate=$FPS/1 ! \<br>
>         jpegparse ! jpegdec ! \<br>
>         videorate ! \<br>
>         queue ! \<br>
>         mix.<br>
><br>
> This works, but unfortunately the two views are out of sync. I imagine that<br>
> I need to add "sync=true" to some element before the encoder, but I'm unsure<br>
> as where that should go. Does anyone have any suggestions on how to<br>
> synchronize these two inputs?<br>
></p>
<p dir="ltr">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.</p>
<p dir="ltr">><br>
> --<br>
> View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Stream-Synchronized-Webcams-tp4680531.html">http://gstreamer-devel.966125.n4.nabble.com/Stream-Synchronized-Webcams-tp4680531.html</a><br>
> Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br></p>