user24093: I have a certain number of pictures that I want to repeat until the melody ends. The problem is that when I make settings it does not work.
the process goes on forever
ffmpeg  -pattern_type glob -loop 1 -r:v 1/4 -i "folder/*.jpg"  -i "folder/voice.mp3" -acodec libvo_aacenc -shortest  -c:v libx264  -preset veryslow -pix_fmt yuv420p -b 20M -pix_fmt yuv420p  -y /folder.avi


user1760: 
Your ffmpeg is old. Update it before doing anything else. See FFmpeg Downloads for links to builds for Linux, Windows, and macOS.
Use -framerate instead of -r for input.
Change -acodec libvo_aacenc to -c:a aac. libvoaac_enc is a low quality encoder and support for it has been removed from FFmpeg.
Some players do not like a low frame rate. Declare an output frame rate with -r or the fps filter when the input -framerate is below ~5 fps.
Use -crf instead of -b / -b:v.
Output MP4 instead of AVI.

Example command:
ffmpeg -y -pattern_type glob -loop 1 -framerate 1/4 -i "folder/*.jpg"  -i "folder/voice.mp3" -c:v libx264 -preset veryslow -crf 22 -pix_fmt yuv420p -r 25 -shortest -movflags +faststart folder.mp4


24093: <p>I have a certain number of pictures that I want to repeat until the melody ends. The problem is that when I make settings it does not work.
the process goes on forever</p>

<pre><code>ffmpeg  -pattern_type glob -loop 1 -r:v 1/4 -i "folder/*.jpg"  -i "folder/voice.mp3" -acodec libvo_aacenc -shortest  -c:v libx264  -preset veryslow -pix_fmt yuv420p -b 20M -pix_fmt yuv420p  -y /folder.avi
</code></pre>
 1760: <ol>
<li><p>Your <code>ffmpeg</code> is old. Update it before doing anything else. See <a href="https://ffmpeg.org/download.html" rel="nofollow noreferrer">FFmpeg Downloads</a> for links to builds for Linux, Windows, and macOS.</p></li>
<li><p>Use <code>-framerate</code> instead of <code>-r</code> for input.</p></li>
<li><p>Change <code>-acodec libvo_aacenc</code> to <code>-c:a aac</code>. libvoaac_enc is a low quality encoder and support for it has been removed from FFmpeg.</p></li>
<li><p>Some players do not like a low frame rate. Declare an output frame rate with <code>-r</code> or the fps filter when the input <code>-framerate</code> is below ~5 fps.</p></li>
<li><p>Use <a href="https://trac.ffmpeg.org/wiki/Encode/H.264" rel="nofollow noreferrer"><code>-crf</code> instead of <code>-b</code> / <code>-b:v</code></a>.</p></li>
<li><p>Output MP4 instead of AVI.</p></li>
</ol>

<p>Example command:</p>

<pre><code>ffmpeg -y -pattern_type glob -loop 1 -framerate 1/4 -i "folder/*.jpg"  -i "folder/voice.mp3" -c:v libx264 -preset veryslow -crf 22 -pix_fmt yuv420p -r 25 -shortest -movflags +faststart folder.mp4
</code></pre>
