<p>Use the <a href="https://ffmpeg.org/ffmpeg-filters.html#color" rel="nofollow noreferrer">color</a>, <a href="https://ffmpeg.org/ffmpeg-filters.html#scale2ref" rel="nofollow noreferrer">scale2ref</a>, and <a href="https://ffmpeg.org/ffmpeg-filters.html#overlay" rel="nofollow noreferrer">overlay</a> filters. Include the <a href="https://ffmpeg.org/ffmpeg-filters.html#Timeline-editing" rel="nofollow noreferrer"><code>enable</code> option</a> with an <a href="https://ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation" rel="nofollow noreferrer">expression</a>.</p>

<pre><code>ffmpeg -f lavfi -i color=c=black:s=640x480:d=7200 -i iamge.png -filter_complex "[1][0]scale2ref=oh*mdar:ih[fg][bg];[bg][fg]overlay=(W-w)/2:(H-h)/2:enable='eq(t,8)'[v]" -map "[v]" output
</code></pre>

CC BY-SA 4.0
2018-12-26T19:12:41.420Z
2018-12-26T19:34:18.273Z
2018-12-26T19:34:18.273Z
llogan
<p>I would like to create a blank video and add images (occupying the entire screen) throughout the video for a very short amount of time (a frame or a second). </p>

<p>I found a command to create the blank video:</p>

<blockquote>
  <p>ffmpeg -t 7200 -s 640x480 -f rawvideo -pix_fmt rgb24 -r 25 -i /dev/zero empty.mpeg</p>
</blockquote>

<p>Now let's say I have an image. I want to insert the image into the video at the 8th second (or some other arbitrary second), and I want it to remain there only briefly. </p>

<p>How can I do this?</p>

<ffmpeg>
How to add images to video at specific timestamps for a short time?
DrDinosaur
# How to add images to video at specific timestamps for a short time?

(Asked by: username_0 on 2018-12-24)

I would like to create a blank video and add images (occupying the entire screen) throughout the video for a very short amount of time (a frame or a second).

I found a command to create the blank video:

> ffmpeg -t 7200 -s 640x480 -f rawvideo -pix\_fmt rgb24 -r 25 -i /dev/zero empty.mpeg

Now let's say I have an image. I want to insert the image into the video at the 8th second (or some other arbitrary second), and I want it to remain there only briefly.

How can I do this?

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2018-12-26. Score: 1

Use the color, scale2ref, and overlay filters. Include the enable option with an expression.
ffmpeg -f lavfi -i color=c=black:s=640x480:d=7200 -i iamge.png -filter_complex "[1][0]scale2ref=oh*mdar:ih[fg][bg];[bg][fg]overlay=(W-w)/2:(H-h)/2:enable='eq(t,8)'[v]" -map "[v]" output


---

