How can I use ffmpeg to extract every nth frame from a video file?

1 answer

Answer

1182241

2026-03-29 02:50

+ Follow

To extract every nth frame from a video file using ffmpeg, you can use the command:

ffmpeg -i input.mp4 -vf "selectnot(mod(n,n))" output.mp4

Replace "input.mp4" with the name of your input video file and "output.mp4" with the desired name of the output file. Replace "n" with the desired interval of frames you want to extract. This command will extract every nth frame from the video file.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.