[FFmpeg-trac] #10486(undetermined:new): Concat with a single input stream is changing the number of frames in the output stream

FFmpeg trac at avcodec.org
Tue Jul 25 15:41:20 EEST 2023


#10486: Concat with a single input stream is changing the number of frames in the
output stream
-------------------------------------+-------------------------------------
             Reporter:  abingham     |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I have two complex filter graphs which are identical except that one
 includes a {{{ concat=n=1 }}} edge. I expected them to produce output
 videos with the same number of frames, but what I find is that the one
 with the 'concat' has one fewer frame.

 Here are the commands:
 {{{
 ffmpeg -v 9 -loglevel 99 -f lavfi -r 30 -i "color=c=yellow:s=1920x1080" -f
 lavfi -r 30 -i "color=c=red:s=1920x1080" -filter_complex
 "[1:v]trim=end_frame=1[s0];[s0]concat=n=1[s1];[s1]tpad=start=1732[s2];[0:v][s2]overlay=eof_action=repeat:shortest=True[s3]"
 -map "[s3]" video_1732.mp4 -y
 ffmpeg -v 9 -loglevel 99 -f lavfi -r 30 -i "color=c=yellow:s=1920x1080" -f
 lavfi -r 30 -i "color=c=red:s=1920x1080" -filter_complex
 "[1:v]trim=end_frame=1[s0];[s0]tpad=start=1732[s1];[0:v][s1]overlay=eof_action=repeat:shortest=True[s2]"
 -map "[s2]" video_1733.mp4 -y
 }}}

 On several systems I've checked, the first graph writes a file with 1732
 frames while the second produces 1733 frames. I've primarily tested this
 on an M1 macbook with this ffmpeg:
 {{{
 ffmpeg version N-111575-g74474a551b-tessus  https://evermeet.cx/ffmpeg/
 Copyright (c) 2000-2023 the FFmpeg developers
 built with Apple clang version 11.0.0 (clang-1100.0.33.17)
 configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-
 version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
 --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d
 --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-
 libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-
 libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-
 libopus --enable-librubberband --enable-libshine --enable-libsnappy
 --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
 --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-
 libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-
 libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq
 --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-
 ffplay
 libavutil      58. 14.100 / 58. 14.100
 libavcodec     60. 22.100 / 60. 22.100
 libavformat    60. 10.100 / 60. 10.100
 libavdevice    60.  2.101 / 60.  2.101
 libavfilter     9.  8.102 /  9.  8.102
 libswscale      7.  3.100 /  7.  3.100
 libswresample   4. 11.100 /  4. 11.100
 libpostproc    57.  2.100 / 57.  2.100
 }}}

 I've attached the full output for each command.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10486>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list