<p>Based on the discussion at the bug tracker, this should be a workaround:</p>

<pre><code>file path/to/001.png
duration 5
file path/to/002.png
duration 5.96
file path/to/002.png
</code></pre>

<p>and </p>

<pre><code>ffmpeg.exe -f concat -safe 0 -i path/to/input.txt -vsync vfr output.mp4
</code></pre>

<p>The idea is to duplicate the entry of the last image. If you need the duration to be precise, then decrease the duration of the now 2nd-last entry by <code>1/fps</code> seconds. For 25 fps video, that's 0.04s. If you don't do this, the output duration will be 0.04s longer.</p>

CC BY-SA 3.0
2017-02-05T11:40:56.967Z
Make sure to add `-pix_fmt yuv420p` for broad player compatibility.
Gyan
CC BY-SA 3.0
2017-02-05T11:24:26.500Z
2017-02-05T11:24:26.500Z
Gyan
<p>I want to concat several pictures into a video. Each picture must have its own duration. I use the most recent windows build for ffmpeg (20170204) and the guide from <a href="http://trac.ffmpeg.org/wiki/Slideshow/" rel="nofollow noreferrer">http://trac.ffmpeg.org/wiki/Slideshow/</a></p>

<p>Here is my text file:</p>

<pre><code>file path/to/001.png
duration 5
file path/to/002.png
duration 6
</code></pre>

<p>I try using the following command: </p>

<pre><code>ffmpeg.exe -f concat -safe 0 -i path/to/input.txt output.mp4
</code></pre>

<p>In the resulting video, the first pictures hangs for 5 seconds but the second picture only hangs for 0 seconds (I only see a glimpse of it). What am I doing wrong?</p>

CC BY-SA 3.0
2017-02-05T07:49:28.630Z
@LordNeckbeard the demuxer example at Wiki doesn't work. Reproduced by me. Adding a duplicate entry of the last image alters total duration unpredictably.
Gyan
CC BY-SA 3.0
2017-02-05T08:20:59.717Z
No. There is a concat filter which is different from the fps filter. In any case, neither of those are used here. Filters are processors invoked by `-vf`, `-af` or `-filter_complex`. Here, the concat demuxer is used, which is a different process.
Gyan
CC BY-SA 3.0
2017-02-05T08:53:10.207Z
Doesn't work here. Supply a different duration for the duplicated entry and check.
Gyan
CC BY-SA 3.0
2017-02-05T10:41:20.177Z
Bug report [filed](https://trac.ffmpeg.org/ticket/6128).
Gyan
<ffmpeg><video-editor>
ffmpeg flash frames last still image in concat sequence
gisly
# ffmpeg flash frames last still image in concat sequence

(Asked by: username_0 on 2017-02-05)

I want to concat several pictures into a video. Each picture must have its own duration. I use the most recent windows build for ffmpeg (20170204) and the guide from http://trac.ffmpeg.org/wiki/Slideshow/
Here is my text file:
file path/to/001.png
duration 5
file path/to/002.png
duration 6

I try using the following command: 
ffmpeg.exe -f concat -safe 0 -i path/to/input.txt output.mp4

In the resulting video, the first pictures hangs for 5 seconds but the second picture only hangs for 0 seconds (I only see a glimpse of it). What am I doing wrong?

**Tags:** ffmpeg, video-editor

> **Comments:**
> **username_1**: @LordNeckbeard the demuxer example at Wiki doesn't work. Reproduced by me. Adding a duplicate entry of the last image alters total duration unpredictably.  
> **username_1**: No. There is a concat filter which is different from the fps filter. In any case, neither of those are used here. Filters are processors invoked by `-vf`, `-af` or `-filter_complex`. Here, the concat demuxer is used, which is a different process.  
> **username_1**: Doesn't work here. Supply a different duration for the duplicated entry and check.  
> **username_1**: Bug report [filed](https://trac.ffmpeg.org/ticket/6128).  

---

## 1 answers

### Answer by username_1 on 2017-02-05. Score: 5 | Accepted answer

Based on the discussion at the bug tracker, this should be a workaround:
file path/to/001.png
duration 5
file path/to/002.png
duration 5.96
file path/to/002.png

and 
ffmpeg.exe -f concat -safe 0 -i path/to/input.txt -vsync vfr output.mp4

The idea is to duplicate the entry of the last image. If you need the duration to be precise, then decrease the duration of the now 2nd-last entry by 1/fps seconds. For 25 fps video, that's 0.04s. If you don't do this, the output duration will be 0.04s longer.

> **Comments:**
> **username_1**: Make sure to add `-pix_fmt yuv420p` for broad player compatibility.  

---

