Dump 10 seconds of video at once.

Anton Pryima zingfrid at gmail.com
Wed Feb 19 09:15:50 UTC 2020

Hello all.

I need to make program which displays online video from rtsp and then, by a
command, it dumps 10 seconds of video to the disk (creates playable video

I've created working pipeline looking like:
*rtspsrc location=<video_uri> ! rtph264depay ! queue
min-threshold-time=11000000000 name=n ! avdec_h264 ! autovideosink*

It has 10 seconds of buffer and working fine.

Now I need to dump all content of the queue to the disk at once.

I've tried different methods:
queue2, shmsink, appsink and etc.
But all of them has some disadvantages:
    queue2 - creates temp file on disk during playout. But when I try to
'cat' it I'm not getting playable video file. I've tried to pass it as
filesrc - but this pipeline refuses to start. As I understand queue does
not store video directly - it has its metadata aside.
    shmsink - socket is created, I've tried to shmcat it - but it doesn't
    appsink - provides video stream frame by frame, but no whole buffer at

So is there is any way to make it with standard GST tools? Or only the way
it to create appsink callback and save frame by frame to gst.buffer and
then, when it is needed, dump this buffer to disk with appsrc->filesink?

Thank you in advance.
Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200219/5917a0c8/attachment.htm>

More information about the gstreamer-devel mailing list