1

thanks to the answers to this superuser question Combine one image + one audio file to make one video using FFmpeg i was able to create a video from a single image and an audio track.

i used PJ Brunets code:

ffmpeg -r 1 -loop 1 -i 00.png -i 00.wav -acodec copy -r 1 -shortest 00.avi

it works fine, but i noticed that the duration of the generated video is longer than the original audio track. in my case the audio is 36,61 seconds and the resulting video is 38 seconds.

i think the issue comes from the low frame rate, therefore i rose the frame rate from 1 fps to 2 fps until 25 fps and compared the results: with higher frame rates you get more accuracy in duration.

now my question is: is there a way to still use 1 fps, but truncate the last frame when the audio finishes? in this way you could achieve faster encoding times without losing the original length.

stefano
  • 11

0 Answers0