CONTENTS DELETED
The author has deleted this message.
|
Hi,
You should use compositor instead of videomixer. compositor will make sure that the two sources are in sync. You should also try removing the do-timestamp=true from the sources. If they do timestamping correctly, it shouldn't be needed. Best regards, Vivia On 8 November 2016 at 08:47, Eric-Stone <[hidden email]> wrote: > 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? > > > > -- > 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 > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Eric-Stone
Le 8 nov. 2016 2:05 AM, "Eric-Stone" <[hidden email]> a écrit : 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. > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Eric-Stone
Hi,
On 08/11/16 17:47, Eric-Stone wrote: > 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: Attached is a script I used while developing the stereoscopic support in GStreamer. It uses GL components to composite the side-by-side image, but you can do the same with compositor in software. omxh264enc doesn't have the code to add H.264 SEI markers to the output video afaik, but if you make sure to mark it on the caps, then matroskamux can write that info at the container level instead. It's not clear how 'out of sync' your two images are. You'll always get *some* jitter because the capture rates of the 2 webcams aren't genlocked. You definitely shouldn't be doing do-timestamp=true though - v4l2src will already be applying timestamps based on the actual capture time, while 'do-timestamp=true' will apply a timestamp corresponding to the moment the frames reach GStreamer instead. Cheers, Jan. > > 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? > > > > -- > 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 > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
CONTENTS DELETED
The author has deleted this message.
|
Free forum by Nabble | Edit this page |