[FFmpeg-user] extract frames every n frames

francesco piasentini francescopiasentini at gmail.com
Fri Apr 26 23:02:37 EEST 2019


Is working fine.
I'm working on a video that's a basically a slideshow of images morphing
through different steps.
frame 1: step 1
frame +8: step 2
+7 frames: step 3
+6: step 4
+8: step 5
..
+7: step n

So the number of frames between animation steps is variable, randomly, with
a media of 7.
If I put: "pick a frame every 7", the resulting extracted frames are
"jagged", with non-uniform morphing between them.
As you may imagine, I have no experience on codec and video in general.

Is there any filter that fly through frames and extract only a frame if
it's different from the previous?

thanks


Il giorno ven 26 apr 2019 alle ore 15:15 Moritz Barsnick <barsnick at gmx.net>
ha scritto:

> On Fri, Apr 26, 2019 at 14:54:07 +0200, francesco piasentini wrote:
> > Thanks Moritz!
> > it worked out very well:
>
> Nice!
>
> > .\ffmpeg -i input.wmv -ss 00:00:12.000 -vf select='not(mod(n\,7))' -vsync
> > vfr -compression_algo raw -pix_fmt rgb24 output.tiff -hide_banner
> >
> > is there the possibility to have a grayscale 8bit output?
>
> Sure. You can just change the "-pix_fmt" argument to "gray", that will
> create 8 bit gray, and it will be handled properly by the tiff muxer.
>
> You can see all available "pixel formats" by:
>
> $ ffmpeg -pix_fmts
> (Not every output codec/format supports every "pixel format", of
> course.)
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list