user33545: I have a 952×600 JPEG image, generated by a PHP script. I want to create another PHP script that uses ffmpeg, which converts that JPEG image to a MP4 video, which has only 1 frame that lasts for 10 seconds.
Which options should I provide to FFmpeg, if the input JPEG is called input.jpeg and the video output.mp4?

user18155: The simplest way is
ffmpeg  -loop 1  -t 10  -i input.jpg  output.mp4


The explanation and additions:
Your input file (an image) will go through the default image2 demuxer, which makes a video stream from it.
By default, this video stream will contain only 1 frame (the input picture), and its framerate will be 25 FPS (frames per second), so the duration of this stream will be only 40 miliseconds (= 1/25 s).
To repeat your input image for obtaining more frames, I used the options -loop 1:

-loop 1: The number 1 means true for infinite looping, i.e. for repeating your input picture “infinitely” many times to obtain next and next frame in case of need.

If you are not satisfied with the default framerate (25 fps), you may use the -framerate option, for example
ffmpeg  -loop 10  -framerate 15  -t 10  -i input.jpg  output.mp4

Now the last thing – you need to limit the number of generated frames (otherwise your ffmpeg command will run forever). As you want the 10-second video, I used the -t 10 option to limit the number of generated frames indirectly by the duration of the target video.

33545: <p>I have a 952×600 JPEG image, generated by a PHP script. I want to create another PHP script that uses <code>ffmpeg</code>, which converts that JPEG image to a MP4 video, which has only 1 frame that lasts for 10 seconds.</p>
<p>Which options should I provide to FFmpeg, if the input JPEG is called <code>input.jpeg</code> and the video <code>output.mp4</code>?</p>
 18155: <p>The simplest way is</p>
<pre><code>ffmpeg  -loop 1  -t 10  -i input.jpg  output.mp4
</code></pre>
<hr />
<p><em>The explanation and additions:</em></p>
<p>Your input file (an image) will go through the default <code>image2</code> demuxer, which makes a video stream from it.</p>
<p>By default, this video stream will contain <strong>only 1 frame</strong> (the input picture), and its framerate will be <strong>25 FPS</strong> (frames per second), so the duration of this stream will be only 40 miliseconds (= 1/25 s).</p>
<p>To repeat your input image for obtaining more frames, I used the options <code>-loop 1</code>:</p>
<ul>
<li><code>-loop 1</code>: The number <code>1</code> means <strong>true</strong> for <em>infinite looping</em>, i.e. for repeating your input picture “infinitely” many times to obtain next and next frame in case of need.</li>
</ul>
<p>If you are <em>not</em> satisfied with the default framerate (25 fps), you may use the <code>-framerate</code> option, for example</p>
<pre><code>ffmpeg  -loop 10  -framerate 15  -t 10  -i input.jpg  output.mp4
</code></pre>
<p>Now the last thing – you need to <em>limit the number of generated frames</em> (otherwise your <code>ffmpeg</code> command will run <em>forever</em>). As you want the 10-second video, I used the <code>-t 10</code> option to limit the number of generated frames indirectly by the duration of the target video.</p>
