<p>Use this command:</p>

<pre><code>ffmpeg -i "video" -loop 1 -t 3 -i "image" -f lavfi -t 3 -i anullsrc -filter_complex "[0:v] [0:a] [1:v] [2:a] concat=n=2:v=1:a=1 [v] [a]" -c:v libx264 -c:a aac -strict -2 -map "[v]" -map "[a]" output.mp4
</code></pre>

<p>Replace the <code>t</code> value with the duration that you want the image to stay. I've supplied the common encoding parameters. Replace those as needed.</p>

<p>For an image sequence, use</p>

<pre><code>ffmpeg -i "video" -f image2 -framerate n -i "image" -f lavfi -t 3 -i aevalsrc=0 -filter_complex "[0:v] [0:a] [1:v] [2:a] concat=n=2:v=1:a=1 [v] [a]" -c:v libx264 -c:a aac -strict -2 -map "[v]" -map "[a]" output.mp4
</code></pre>

<p>Replace the <code>n</code> in framerate with the rate that you want.</p>

CC BY-SA 4.0
2019-08-15T21:38:17.177Z
Great work. Unfortunately doesn't work with audio-less videos. Could you add enough explanation to allow one to manipulate it to suit?
Heath Raftery
CC BY-SA 4.0
2022-05-09T12:29:06.257Z
As a modification to top answer, this is for working with videos with no audio by removing the [a] parts. `ffmpeg.exe -i input.mp4 -loop 1 -t 3 -i d.png -f lavfi -t 3 -i anullsrc -filter_complex "[0:v] [1:v] concat=n=2:v=1 [v]" -c:v libx264 -strict -2 -map "[v]" output.mkv` Note that for some reason ffmpeg will run forever when outputting to mp4 but works fine outputting to mkv. It's easy to then copy .mkv to .mp4 with `ffmpeg -i output.mkv -codec copy output.mp4`
allanw
CC BY-SA 4.0
2023-02-02T05:12:21.600Z
In the first command, where does the name of the image go?
étale-cohomology
CC BY-SA 4.0
2023-02-02T12:25:29.067Z
Substitute `"image"`
Gyan
CC BY-SA 3.0
2015-12-22T04:51:05.457Z
2015-12-22T12:11:38.737Z
2015-12-22T12:11:38.737Z
Gyan
<p>Refer to this command:</p>

<pre><code>ffmpeg -y -i input.mp4 -loop 1 -framerate 25 -t 3 -i foo.jpg -t 3 -f lavfi -i aevalsrc=0 -i bar.png -filter_complex '[1:0]scale=640:480[curtain];[0:0][0:1][curtain][2:0] concat=n=2:v=1:a=1[out];[out][3:0]overlay=W-w-25:H-h-25' -max_muxing_queue_size 1000 output.mp4 -loglevel 'trace'
</code></pre>

<p>this will add an image at end of the mp4 ,and add watermake to the mp4.</p>

CC BY-SA 3.0
2017-06-29T22:50:37.927Z
Can you explain some of the options given to ffmpeg since readers may need to change them to fit their situation (for example, `-framerate`)? Why do you specify `-loglevel 'trace'`? That doesn't seem necessary for the command to complete properly.
Michael Liebman
CC BY-SA 3.0
2017-06-28T10:13:19.280Z
2017-06-28T10:13:19.280Z
spoon
<p>I'd like to add some images at the end of a mp4 file via ffmpeg:</p>

<p><a href="https://i.sstatic.net/eN0Mh.png" rel="noreferrer"><img src="https://i.sstatic.net/eN0Mh.png" alt="enter image description here"></a></p>

<p>Any help would be greatly appreciated.</p>

<ffmpeg><workflow>
How to add images at the end of an existing movie?
kksky
# How to add images at the end of an existing movie?

(Asked by: username_0 on 2015-12-22)

I'd like to add some images at the end of a mp4 file via ffmpeg:

[![enter image description here](https://i.sstatic.net/eN0Mh.png)](https://i.sstatic.net/eN0Mh.png)

Any help would be greatly appreciated.

**Tags:** ffmpeg, workflow


---

## 2 answers

### Answer by username_1 on 2015-12-22. Score: 7

Use this command:
ffmpeg -i "video" -loop 1 -t 3 -i "image" -f lavfi -t 3 -i anullsrc -filter_complex "[0:v] [0:a] [1:v] [2:a] concat=n=2:v=1:a=1 [v] [a]" -c:v libx264 -c:a aac -strict -2 -map "[v]" -map "[a]" output.mp4

Replace the t value with the duration that you want the image to stay. I've supplied the common encoding parameters. Replace those as needed.
For an image sequence, use
ffmpeg -i "video" -f image2 -framerate n -i "image" -f lavfi -t 3 -i aevalsrc=0 -filter_complex "[0:v] [0:a] [1:v] [2:a] concat=n=2:v=1:a=1 [v] [a]" -c:v libx264 -c:a aac -strict -2 -map "[v]" -map "[a]" output.mp4

Replace the n in framerate with the rate that you want.

> **Comments:**
> **username_2**: Great work. Unfortunately doesn't work with audio-less videos. Could you add enough explanation to allow one to manipulate it to suit?  
> **username_3**: As a modification to top answer, this is for working with videos with no audio by removing the [a] parts. `ffmpeg.exe -i input.mp4 -loop 1 -t 3 -i d.png -f lavfi -t 3 -i anullsrc -filter_complex "[0:v] [1:v] concat=n=2:v=1 [v]" -c:v libx264 -strict -2 -map "[v]" output.mkv` Note that for some reason ffmpeg will run forever when outputting to mp4 but works fine outputting to mkv. It's easy to then copy .mkv to .mp4 with `ffmpeg -i output.mkv -codec copy output.mp4`  
> **username_4**: In the first command, where does the name of the image go?  
> **username_1**: Substitute `"image"`  

---

### Answer by username_5 on 2017-06-28. Score: 0

Refer to this command:
ffmpeg -y -i input.mp4 -loop 1 -framerate 25 -t 3 -i foo.jpg -t 3 -f lavfi -i aevalsrc=0 -i bar.png -filter_complex '[1:0]scale=640:480[curtain];[0:0][0:1][curtain][2:0] concat=n=2:v=1:a=1[out];[out][3:0]overlay=W-w-25:H-h-25' -max_muxing_queue_size 1000 output.mp4 -loglevel 'trace'

this will add an image at end of the mp4 ,and add watermake to the mp4.

> **Comments:**
> **username_6**: Can you explain some of the options given to ffmpeg since readers may need to change them to fit their situation (for example, `-framerate`)? Why do you specify `-loglevel 'trace'`? That doesn't seem necessary for the command to complete properly.  

---

