Loop images until the audio ends
Assume you have an audio file, which is named as &quot;audio.mp3&quot;;
you have images file pattern as &quot;Picture01.jpg&quot;, &quot;Picture02.jpg&quot;, ... &quot;Picture30.jpg&quot;; and you want 4.5s image duration. Then the command is
ffmpeg -y -loop 1 -framerate 1/4.5 -i Picture%2d.jpg -i audio.mp3 -shortest -acodec copy -vcodec mjpeg result.mp4

Good luck!