I have around 1000 frames in *.png format, which are named like frame-0.png
, frame-1.png
, frame-2.png
and so on. I read them and generate a movie by following command :
ffmpeg -f image2 -r 20 -i frame-%00d.png -vcodec mpeg4 -y movie.mp4
Let's say I just want to read frames like frame-0.png
,frame-20.png
, frame-40.png
and make a movie out of it. How can I achieve that ?
One possible way I know, is to make movie from all 1000 frames then generate a new movie by skipping frames from the following command :
ffmpeg -y -i movie.mp4 -filter:v "select='mod(n,20)'" out.mp4
Is there any direct method ?