FFmpeg remove every 6th frame starting from the 3rd frame

I have several 30fps videos to convert to videos with acceptable resolution and framerate for a DVD using this command:

ffmpeg.exe" -i "INPUT.MP4" -vf "select="mod(n,6)",crop=720:576:x=280:y=72" -r 25 -metadata:s:v:0 language= -metadata:s:a:0 language= -acodec pcm_s16le -ar 48000 "OUTPUT.MKV"

This does mostly what I anticipate. However, I want the command to select every 6th frame starting from the 3rd frame, instead of the 1st, or more precisely to follow the arithmetic sequence 6x-3 for frame selection (3, 9, 15, 21, etc.). I experimented with the modulus function, however, I couldn’t achieve the desired result.

I am not at all very experienced with FFmpeg, and I want to avoid having to extract frames from the video, remove the frames and re-encode the video.

Any suggestions or solutions?

Read more here: Source link