[FFmpeg-trac] #7939(undetermined:new): The concat demuxer changes a constant frame rate into variable one

FFmpeg trac at avcodec.org
Tue Jun 4 13:55:33 EEST 2019


#7939: The concat demuxer changes a constant frame rate into variable one
-------------------------------------+-------------------------------------
             Reporter:  RigacciOrg   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:  concat       |               Blocked By:
  h264_mp4toannexb codec_time_base   |
  avg_frame_rate                     |
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 The file "clip_mpeg2.ts" is an MPEG-2 transport stream in constant frame
 rate (as reported by ''ffprobe -show_format -show_streams''):

 {{{
 codec_time_base=1001/60000
 r_frame_rate=30000/1001
 avg_frame_rate=30000/1001
 }}}

 If I concatenate it twice, to produce an '''mp4''' file, I get a variable
 frame rate file! The concat command is:

 {{{
 ffmpeg -f concat -safe 0 -i clip-list.txt -c copy clip-concat.mp4
 }}}

 where the clip-list.txt contains just two lines with ''file
 'clip_mpeg2.ts'''

 In the resulting file, the '''codec_time_base''' is changed,
 '''r_frame_rate''' and '''avg_frame_rate''' are not exact:

 {{{
 codec_time_base=607/36000
 r_frame_rate=179/6
 avg_frame_rate=18000/607
 }}}

 I suspect that the source file has some bits which triggers this bug,
 because I was used to concatenate clips, but I never encountered this
 problem.

 May be it is related to ticket #5380, because the input file is produced
 using '''-bsf:v h264_mp4toannexb'''.

 If instead I use an '''mkv''' container as destination, the problem does
 not exist.

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


More information about the FFmpeg-trac mailing list