How to extract frames and name them starting with 0.png?

Viewed 103

I am extracting frames from a video to alter them however for the program to work properly I need ffmpeg to extract the frames and name them starting with 0.png. Right now it extracts at 1.png. The command to extract the frames is:

ffmpeg -i input_video -vf select="between(n\,'0'\,'20'\)" -vsync 0 frames/%d.png

Is this possible still using this command or should I create a loop that extracts them and names them based on a counting variable?

1 Answers

You should be able to use -start _number like this:

ffmpeg -i input_video -vf select="between(n\,'0'\,'20'\)" -start_number 0 -vsync 0 frames/%d.png
Related