buffer v4l2src for 30 seconds

Vivia Nikolaidou n.vivia at gmail.com
Mon Dec 5 14:09:24 UTC 2016


Hi,

Basically, what Keith just said - make sure you actually wait 30
seconds before you see the image. Also don't forget to make
max-size-time correspondingly bigger.

If it still doesn't work, please send a debug log with GST_DEBUG=\*:6
and GST_DEBUG_NO_COLOR=1 .

Best regards,

Vivia

On 5 December 2016 at 15:40, Thornton, Keith <keith.thornton at zeiss.com> wrote:
> 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
> _______________________________________________
> 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