[FFmpeg-user] How to drop every Nth frame?

Sam Logan shapableline at gmail.com
Sat Sep 21 12:15:45 CEST 2013

On 9/21/13, Andrey Aleksandrovich <andrey.aleksandrovich at googlemail.com> wrote:
> oh, thanks, but I can't understand syntax of select filer:
> Example from manual:
> # select one frame every 100
> select='not(mod(n,100))'
> But how to set - "select 23 frames every 24"?

mod() is the modulus function. So mod(n, 100) returns positive for any
value of n except for multiples of 100, so Boolean negation of that
will return false for everything except multiples of 100, thereby
selecting one frame per hundred. So to select 23 frames per 24, do:


More information about the ffmpeg-user mailing list