FFmpeg: Could find no file with path ‘%08d.ppm’ and index in the range 0-4 %08d.ppm: No such file or directory


During some work that we were doing, we used the following command to export the frames of a video using FFmpeg:

ffmpeg -v quiet -i "$video" "$input_frames_folder/%08d.ppm";

The above command exported the video frames into the selected folder and using eight digits zero-padding it named all the images in an increasing order starting from the number 00000001 (00000001.ppm).

Later on, we processed those frames and deleted some of the first ones (specifically, we deleted the first 61 frames, so the first available frame was named 00000062.ppm). When we tried to rebuild the video using the command below, we got the error that is listed after the command:

ffmpeg -framerate "25/1" -i "$input_frames_folder/%08d.ppm" -pix_fmt yuv420p -y processed.mkv;
Could find no file with path '%08d.ppm' and index in the range 0-4 %08d.ppm: No such file or directory

To fix the issue, we used the -start_number parameter with the value 62. The parameter sets the file starting index for the matched image files.

ffmpeg -start_number 62 -framerate "25/1" -i "$input_frames_folder/%08d.ppm" -pix_fmt yuv420p -y processed.mkv;

Please note that we also used -pix_fmt yuv420p as we were getting a video with black frames only, so we had to define the format of the pixels to use manually.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.