1

I have pngs starting from temp0000.png and ending at temp7085.png.

After reading the ffmpeg manual I tried the command: ffmpeg -i temp%d.png -i a.mp3 -framerate 60 -start_number 0000 output.webm

But get the error: Could find no file with path 'temp%d.png' and index in the range 0-4 temp%d.png: No such file or directory

What must I change please?

2

temp%d expands to temp0, temp1 ... temp10 ... and so on.

For temp0000, you need temp%04d

and the full command should be

ffmpeg -framerate 60 -i temp%4d.png -i a.mp3 -pix_fmt yuv420p output.webm
  • Thanks. What does -pix_fmt yuv420p do please? And ffmpeg ignored my framerate of 60 and used 24 instead, so my video is out of sync with my mp3. What is the right parameter there? – Richard Oct 6 '18 at 18:39
  • 1
    framerate needs to go before -i as shown in my command. yuv420p is the only compatible pixel format for web playback, unlike the pixel format of RGB in the source PNGs. – Gyan Oct 6 '18 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.