Opened 5 years ago

Last modified 5 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 (1)

comment:1 Changed 5 years ago by Cigaes

  • Analyzed by developer set
  • Priority changed from normal to minor
  • Reproduced by developer set
  • Status changed from new to open
  • Summary changed from Concat filter can not join more than two video files to Concat filter can not join individual images
  • Version changed from unspecified to git-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.

Note: See TracTickets for help on using tickets.