Opened 12 years ago

Last modified 6 years ago

#1717 open defect

Concat filter can not join individual images

Reported by: chinshou Owned by:
Priority: minor Component: avfilter
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

using latest ffmepg build from http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20120903-git-5d55830-win32-static.7z

execute following command
ffmpeg -i a1.jpg -i a2.jpg -i a3.jpg -filter_complex "[0:0] [1:0] [2:0] concat=n=3:v=1:a=0" join.mp4

to join three jpeg files to one video, But the generated mp4 file only contain two frames.

ffmpeg -i join.mp4 test%d.jpg

only output test1.jpg and test2.jpg

best regards

Change History (2)

comment:1 by Cigaes, 12 years ago

Analyzed by developer: set
Priority: normalminor
Reproduced by developer: set
Status: newopen
Summary: Concat filter can not join more than two video filesConcat filter can not join individual images
Version: unspecifiedgit-master

This is a timestamp problem: concat uses the mean inter-frame interval as the duration of the last frame to separate the segments. If a segment is made of a single video frame and no audio, then there is no inter-frame interval, and the next segment starts at the same time. This will then cause frame dropping depending on the vsync algorithm.

The filter works correctly (AFAIK) if all the segments have more than one frame or have audio.

Temporary workaround: use setpts to shift the time of each segment after a single image, or add dummy audio and discard it.

The problem can be properly fixed when a duration field will be added to filtered frames; this is work in progress.

comment:2 by Elon Musk, 6 years ago

Still not fixed.

Note: See TracTickets for help on using tickets.