[FFmpeg-trac] #9052(undetermined:new): Concat frozen frames with audio

FFmpeg trac at avcodec.org
Mon Jan 4 17:59:19 EET 2021


#9052: Concat frozen frames with audio
-------------------------------------+-------------------------------------
             Reporter:  tokejepsen   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 When using concatenation on videos with audio, the concatenated video has
 frozen frames.

 How to reproduce:

 1. Produce three video files to concatenate:

 {{{
 ffmpeg -y -v 9 -loglevel 99 -f lavfi -i
 testsrc=duration=1.0:size=960x540:rate=25 -f lavfi -i
 sine=frequency=1000:duration=1.0 -pix_fmt yuv420p temp0.mov
 }}}

 {{{
 ffmpeg -y -v 9 -loglevel 99 -f lavfi -i
 testsrc=duration=1.0:size=960x540:rate=25 -f lavfi -i
 sine=frequency=1000:duration=1.0 -pix_fmt yuv420p temp1.mov
 }}}

 {{{
 ffmpeg -y -v 9 -loglevel 99 -f lavfi -i
 testsrc=duration=1.0:size=960x540:rate=25 -f lavfi -i
 sine=frequency=1000:duration=1.0 -pix_fmt yuv420p temp2.mov
 }}}

 2. Concatenate all three video files together:


 {{{
 ffmpeg -y -v 9 -loglevel 99 -i temp0.mov -i temp1.mov -i temp2.mov
 -filter_complex "[0:0] [0:1][1:0] [1:1][2:0] [2:1]concat=n=3:v=1:a=1 [v]
 [a]" -map [v] -map [a] temp.mov
 }}}

 3. Validate frame length:


 {{{
 ffprobe -v error -count_frames -select_streams v:0 -show_entries
 stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 temp.mov
 }}}

 Frame count is 76, but should be 75. Frozen frames are only introduced
 when the videos have audio. Video only files concatenate without frozen
 frames.

 This reproducible is done with the filter method from
 https://trac.ffmpeg.org/wiki/Concatenate, but the demuxer method suffers
 from the same bug. Demuxer method cannot be validated by ffprobe though,
 but frozen frames can be seen in an editorial software (tested in
 NukeStudio and Resolve).

 A python script for running through the reproducible can be found here;
 https://gist.github.com/tokejepsen/551afac5728e36bda4c7a9e71087d860.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9052>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list