Get the th frame from a video
Nicolas Dufresne
nicolas at ndufresne.ca
Mon Jul 24 13:51:50 UTC 2017
Le lundi 24 juillet 2017 à 04:30 -0700, Antoine a écrit :
> Hi guys !
> I'm new here and new with Gstreamer. I'm looking for a way to extract a jpeg
> image from a h264/mp4 file.
> I already have a pipeline which works but it's very slow (12 sec for 1min
> video) :
> gst-launch-1.0 filesrc location=1.mp4 typefind=true ! video/quicktime !
> aiurdemux ! queue ! vpudec ! decodebin ! videorate ! video/x-raw,
> framerate=1/60 ! vpuenc_jpeg ! filesink location=test.jpg
> In fact this pipeline it's not really what I'm looking for, I just want to
> capture the 10th frame from my video and use it like a preview (static
> preview). I'm sure there is be a simple pipeline to do this.
> Thank you for your time.
> Antoine
You could pause the pipeline, and use a step event to skip the first 9
frames. Note that thumbnailing this way does not work very well. The
Gnome thumbnailer as an example will seek at several places, and will
chose the thumbnail based on a small statistic to figure-out if the
frame isn't a black frame, or green frame.
regards,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170724/9426deae/attachment.sig>
More information about the gstreamer-devel
mailing list