<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>
<ol>
<li><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 the case of need.</li>
</ul>
</li>
<li><p>You need to <em>limit the number of generated frames</em> (otherwise your <code>ffmpeg</code> command will run <em>forever</em>).</p>
<p>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>
<pre><code>ffmpeg  -loop 1  -t 10  -i input.jpg  output.mp4
</code></pre>
</li>
<li><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 1  -framerate 15  -t 10  -i input.jpg  output.mp4
</code></pre>
</li>
</ol>

CC BY-SA 4.0
2022-02-14T15:00:27.287Z
2023-05-18T19:39:13.407Z
2023-05-18T19:39:13.407Z
MarianD
<p>found here: <a href="https://talotics.com/post/videos/ffmpeg-add-call-to-action-image-after/" rel="nofollow noreferrer">https://talotics.com/post/videos/ffmpeg-add-call-to-action-image-after/</a></p>
<p><b>Create a 5 second video from a png as follows:</b></p>
<pre><code>ffmpeg -loop 1 -i image.png -pix_fmt yuv420p -t 5 promo-image.mp4
</code></pre>
<p>This will create a video called {promo-image.mp4} from {image.png} with a duration of {5 seconds}</p>

CC BY-SA 4.0
2021-01-15T19:51:11.800Z
2021-01-15T19:51:11.800Z
kevin
<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>

<ffmpeg><mp4><script>
FFmpeg convert 1 JPEG frame to 10 sec video
Max Cruer
# FFmpeg convert 1 JPEG frame to 10 sec video

(Asked by: username_0 on 2021-01-14)

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`?

**Tags:** ffmpeg, mp4, script


---

## 2 answers

### Answer by username_1 on 2022-02-14. Score: 2 | Accepted answer

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 the case of need.


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.
ffmpeg  -loop 1  -t 10  -i input.jpg  output.mp4


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


---

### Answer by username_2 on 2021-01-15. Score: 0

found here: https://talotics.com/post/videos/ffmpeg-add-call-to-action-image-after/
Create a 5 second video from a png as follows:
ffmpeg -loop 1 -i image.png -pix_fmt yuv420p -t 5 promo-image.mp4

This will create a video called {promo-image.mp4} from {image.png} with a duration of {5 seconds}


---

