AW: buffer v4l2src for 30 seconds

Thornton, Keith keith.thornton at zeiss.com
Mon Dec 5 13:40:31 UTC 2016


Hi, 
if you set min-threshold-time to 30000000000 you would buffer 30 seconds of video. As a consequence, no data will reach xvimagesink until you have pushed more than 30 seconds of data into the queue. If this is not what you want then tell us how it should differ from this scenario.

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] Im Auftrag von Antoine Martin
Gesendet: Montag, 5. Dezember 2016 13:44
An: gstreamer-devel at lists.freedesktop.org
Betreff: buffer v4l2src for 30 seconds

Hi,

I want to do something seemingly very simple, but I am unable to find the correct GStreamer incantation.
All I want is ~30 seconds of delay between the v4l2src capture and the output (xvimagesink or whatever).

Using the queue element I can buffer up to ~1 seconds:
gst-launch-1.0 -v v4l2src device=/dev/video0 !
video/x-raw,format=YUY2,width=640,height=480,framerate=30/1 ! queue
min-threshold-time=1000000000 max-size-time=10000000000 max-size-bytes=0
max-size-buffers=0 ! xvimagesink

If I reduce the framerate, then I can buffer a little bit more.
But if I increase the min-threshold-time too much, I just get a black screen. My system has enough memory to buffer minutes of video, so what is happening here?

I tried using the queue2 element, but this isn't actually buffering anything at all (what is the equivalent to min-threshold-time here?):
gst-launch-1.0 -v v4l2src device=/dev/video0 !
video/x-raw,format=YUY2,width=640,height=480,framerate=15/1 ! queue2
use-buffering=1 low-watermark=0.5  max-size-time=0 max-size-bytes=0
max-size-buffers=600 ! xvimagesink sync=false

It is such a simple thing to do that I am sure GStreamer can do this, but how?

Thanks
Antoine
_______________________________________________
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