AW: Dump 10 seconds of video at once.

Thornton, Keith keith.thornton at zeiss.com
Wed Feb 19 10:39:51 UTC 2020


Hi, if you want to dump h264 to an mp4 file for instance try

Tee --- queue avdec_h264  --- autovideosink
         |--queue (with min-threshold == 11 secs) – h264parse – mp4mux – filesink.
If you then set min-threshold to 1 it will empty the queue

Von: gstreamer-devel <gstreamer-devel-bounces at lists.freedesktop.org> Im Auftrag von Anton Pryima
Gesendet: Mittwoch, 19. Februar 2020 10:16
An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Betreff: Dump 10 seconds of video at once.

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 file).

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 work.
    appsink - provides video stream frame by frame, but no whole buffer at once.

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,
Anton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200219/2ff80e5e/attachment.htm>


More information about the gstreamer-devel mailing list