[FFmpeg-trac] #2975(undetermined:new): h264 streams don't start with timestamp/timecode 0 when muxed with Matroska

FFmpeg trac at avcodec.org
Fri Sep 20 22:58:38 CEST 2013


#2975: h264 streams don't start with timestamp/timecode 0 when muxed with Matroska
-------------------------------------+-------------------------------------
               Reporter:  jamal      |                  Owner:
                   Type:  defect     |                 Status:  new
               Priority:  normal     |              Component:
                Version:  git-       |  undetermined
  master                             |               Keywords:
             Blocked By:             |               Blocking:
Reproduced by developer:  0          |  Analyzed by developer:  0
-------------------------------------+-------------------------------------
 Encoding with ffmpeg/libx264, then checking the output with mkvinfo:

 {{{
 $ ./ffmpeg -f lavfi -i testsrc -t 10 -c:v libx264 -preset veryfast
 test.mkv
 ffmpeg version N-56469-gf6622f9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Sep 20 2013 05:04:04 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-nonfree --enable-libquvi --enable-
 openssl --enable-nonfree --enable-libvorbis --enable-libopus --enable-
 libfdk-aac --enable-libtheora --enable-libvpx --enable-libx264 --enable-
 libmp3lame --enable-libfreetype --cross-prefix=x86_64-w64-mingw32-
 --target-os=mingw32 --cpu=amdfam10 --arch=x86_64 --prefix=/mingw64
   libavutil      52. 45.100 / 52. 45.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.100 / 55. 18.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 86.102 /  3. 86.102
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, lavfi, from 'testsrc':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
 No pixel format specified, yuv444p for H.264 encoding chosen.
 Use -pix_fmt yuv420p for compatibility with outdated media players.
 [libx264 @ 0000000001C53860] using SAR=1/1
 [libx264 @ 0000000001C53860] using cpu capabilities: MMX2 SSE2Fast
 SSEMisalign LZCNT
 [libx264 @ 0000000001C53860] profile High 4:4:4 Predictive, level 1.3,
 4:4:4 8-bit
 [libx264 @ 0000000001C53860] 264 - core 133 r2339 585324f - H.264/MPEG-4
 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html -
 options: cabac=1 r
 ef=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00
 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0
 deadzone=21,11 fast_pski
 p=1 chroma_qp_offset=6 threads=3 lookahead_threads=1 sliced_threads=0 nr=0
 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3
 b_pyramid=2 b_a
 dapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250
 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1
 crf=23.0 qcomp=0.60
  qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, matroska, to 'test.mkv':
   Metadata:
     encoder         : Lavf55.18.100
     Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv444p,
 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 1k tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> libx264)
 Press [q] to stop, [?] for help
 frame=  250 fps=0.0 q=-1.0 Lsize=      51kB time=00:00:09.92 bitrate=
 42.3kbits/s
 video:49kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 4.321356%
 [libx264 @ 0000000001C53860] frame I:1     Avg QP:24.54  size:  2863
 [libx264 @ 0000000001C53860] frame P:77    Avg QP:15.07  size:   488
 [libx264 @ 0000000001C53860] frame B:172   Avg QP:15.11  size:    53
 [libx264 @ 0000000001C53860] consecutive B-frames:  8.0%  0.8%  0.0% 91.2%
 [libx264 @ 0000000001C53860] mb I  I16..4: 65.0%  9.7% 25.3%
 [libx264 @ 0000000001C53860] mb P  I16..4:  3.7%  1.6%  0.4%  P16..4:
 7.0%  3.9%  1.2%  0.0%  0.0%    skip:82.2%
 [libx264 @ 0000000001C53860] mb B  I16..4:  0.5%  0.1%  0.0%  B16..8:
 1.0%  0.1%  0.0%  direct: 0.4%  skip:97.9%  L0:46.8% L1:52.7% BI: 0.5%
 [libx264 @ 0000000001C53860] 8x8 transform intra:22.2% inter:24.4%
 [libx264 @ 0000000001C53860] coded y,u,v intra: 10.4% 16.1% 12.1% inter:
 0.8% 0.9% 0.7%
 [libx264 @ 0000000001C53860] i16 v,h,dc,p: 48% 42%  1%  9%
 [libx264 @ 0000000001C53860] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 90%  2%  7%
 0%  0% 0%  0%  0%  0%
 [libx264 @ 0000000001C53860] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 47% 22%
 1%  1% 1%  0%  1%  1%
 [libx264 @ 0000000001C53860] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0000000001C53860] kb/s:39.63

 $ ./ffmpeg -i test.mkv
 ffmpeg version N-56469-gf6622f9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Sep 20 2013 05:04:04 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-nonfree --enable-libquvi --enable-
 openssl --enable-nonfree --enable-libvorbis --enable-libopus --enable-
 libfdk-aac --enable-libtheora --enable-libvpx --enable-libx264 --enable-
 libmp3lame --enable-libfreetype --cross-prefix=x86_64-w64-mingw32-
 --target-os=mingw32 --cpu=amdfam10 --arch=x86_64 --prefix=/mingw64
   libavutil      52. 45.100 / 52. 45.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.100 / 55. 18.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 86.102 /  3. 86.102
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, matroska,webm, from 'test.mkv':
   Metadata:
     ENCODER         : Lavf55.18.100
   Duration: 00:00:10.08, start: 0.000000, bitrate: 41 kb/s
     Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv444p, 320x240
 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
 At least one output file must be specified

 $ mkvinfo -v test.mkv
 + EBML head
 |+ EBML version: 1
 |+ EBML read version: 1
 |+ EBML maximum ID length: 4
 |+ EBML maximum size length: 8
 |+ Doc type: matroska
 |+ Doc type version: 4
 |+ Doc type read version: 2
 + Segment, size 52375
 |+ Seek head (subentries will be skipped)
 |+ EbmlVoid (size: 149)
 |+ Segment information
 | + Timecode scale: 1000000
 | + Muxing application: Lavf55.18.100
 | + Writing application: Lavf55.18.100
 | + Segment UID: 0xe8 0x3c 0x24 0x06 0x4a 0xdf 0x9d 0xd3 0xd9 0x3c 0x3c
 0xaa 0x5c 0xd4 0x46 0x42
 | + Duration: 10.080s (00:00:10.080)
 |+ Segment tracks
 | + A track
 |  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
 |  + Track UID: 1
 |  + Lacing flag: 0
 |  + Language: und
 |  + Codec ID: V_MPEG4/ISO/AVC
 |  + Track type: video
 |  + Default duration: 40.000ms (25.000 frames/fields per second for a
 video track)
 |  + Video track
 |   + Pixel width: 320
 |   + Pixel height: 240
 |   + Display width: 320
 |   + Display height: 240
 |  + CodecPrivate, length 42 (h.264 profile: High 4:4:4 Predictive @L1.3)
 |+ Tags
 | + Tag
 |  + Targets
 |  + Simple
 |   + Name: ENCODER
 |   + String: Lavf55.18.100
 |+ Cluster
 | + Cluster timecode: 0.080s
 | + SimpleBlock (key, track number 1, 1 frame(s), timecode 0.080s =
 00:00:00.080)
 |  + Frame with size 3552
 | + SimpleBlock (track number 1, 1 frame(s), timecode 0.240s =
 00:00:00.240)
 |  + Frame with size 556

 [...]
 }}}

 Notice the duration of the file and timecode of the first block.

 Rerunning the above command but muxing instead to mp4 (So ffmpeg's
 matroska muxer is not part of the equation), then remuxing with
 mkvtoolnix, then looking at the result with mkvinfo:

 {{{
 $ ./ffmpeg -f lavfi -i testsrc -t 10 -c:v libx264 -preset veryfast
 test_toolnix.mp4

 ffmpeg version N-56469-gf6622f9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Sep 20 2013 05:04:04 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-nonfree --enable-libquvi --enable-
 openssl --enable-nonfree --enable-libvorbis --enable-libopus --enable-
 libfdk-aac --enable-libtheora --enable-libvpx --enable-libx264 --enable-
 libmp3lame --enable-libfreetype --cross-prefix=x86_64-w64-mingw32-
 --target-os=mingw32 --cpu=amdfam10 --arch=x86_64 --prefix=/mingw64
   libavutil      52. 45.100 / 52. 45.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.100 / 55. 18.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 86.102 /  3. 86.102
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, lavfi, from 'testsrc':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
 No pixel format specified, yuv444p for H.264 encoding chosen.
 Use -pix_fmt yuv420p for compatibility with outdated media players.
 [libx264 @ 0000000000693640] using SAR=1/1
 [libx264 @ 0000000000693640] using cpu capabilities: MMX2 SSE2Fast
 SSEMisalign LZCNT
 [libx264 @ 0000000000693640] profile High 4:4:4 Predictive, level 1.3,
 4:4:4 8-bit
 [libx264 @ 0000000000693640] 264 - core 133 r2339 585324f - H.264/MPEG-4
 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html -
 options: cabac=1 r
 ef=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=2 psy=1 psy_rd=1.00:0.00
 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=1 cqm=0
 deadzone=21,11 fast_pski
 p=1 chroma_qp_offset=6 threads=3 lookahead_threads=1 sliced_threads=0 nr=0
 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3
 b_pyramid=2 b_a
 dapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250
 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=1
 crf=23.0 qcomp=0.60
  qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, mp4, to 'test_toolnix.mp4':
   Metadata:
     encoder         : Lavf55.18.100
     Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv444p,
 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 12800 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo -> libx264)
 Press [q] to stop, [?] for help
 frame=  223 fps=0.0 q=28.0 size=      42kB time=00:00:08.16 bitrate=
 42.0kbits/s
 frame=  250 fps=0.0 q=-1.0 Lsize=      53kB time=00:00:09.92 bitrate=
 43.5kbits/s
 video:49kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 7.315520%
 [libx264 @ 0000000000693640] frame I:1     Avg QP:24.54  size:  2863
 [libx264 @ 0000000000693640] frame P:77    Avg QP:15.07  size:   488
 [libx264 @ 0000000000693640] frame B:172   Avg QP:15.11  size:    53
 [libx264 @ 0000000000693640] consecutive B-frames:  8.0%  0.8%  0.0% 91.2%
 [libx264 @ 0000000000693640] mb I  I16..4: 65.0%  9.7% 25.3%
 [libx264 @ 0000000000693640] mb P  I16..4:  3.7%  1.6%  0.4%  P16..4:
 7.0%  3.9%  1.2%  0.0%  0.0%    skip:82.2%
 [libx264 @ 0000000000693640] mb B  I16..4:  0.5%  0.1%  0.0%  B16..8:
 1.0%  0.1%  0.0%  direct: 0.4%  skip:97.9%  L0:46.8% L1:52.7% BI: 0.5%
 [libx264 @ 0000000000693640] 8x8 transform intra:22.2% inter:24.4%
 [libx264 @ 0000000000693640] coded y,u,v intra: 10.4% 16.1% 12.1% inter:
 0.8% 0.9% 0.7%
 [libx264 @ 0000000000693640] i16 v,h,dc,p: 48% 42%  1%  9%
 [libx264 @ 0000000000693640] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 90%  2%  7%
 0%  0% 0%  0%  0%  0%
 [libx264 @ 0000000000693640] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 47% 22%
 1%  1% 1%  0%  1%  1%
 [libx264 @ 0000000000693640] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0000000000693640] kb/s:39.63

 $ ./ffmpeg -i test_toolnix.mp4
 ffmpeg version N-56469-gf6622f9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Sep 20 2013 05:04:04 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-nonfree --enable-libquvi --enable-
 openssl
  --enable-nonfree --enable-libvorbis --enable-libopus --enable-libfdk-aac
 --enab
 le-libtheora --enable-libvpx --enable-libx264 --enable-libmp3lame
 --enable-libfr
 eetype --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32
 --cpu=amdfam10 --a
 rch=x86_64 --prefix=/mingw64
   libavutil      52. 45.100 / 52. 45.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.100 / 55. 18.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 86.102 /  3. 86.102
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_toolnix.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 512
     compatible_brands: isomiso2avc1mp41
     encoder         : Lavf55.18.100
   Duration: 00:00:10.00, start: 0.000000, bitrate: 43 kb/s
     Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 /
 0x31637661), y
 uv444p, 320x240 [SAR 1:1 DAR 4:3], 40 kb/s, 25 fps, 25 tbr, 12800 tbn, 50
 tbc (d
 efault)
     Metadata:
       handler_name    : VideoHandler
 At least one output file must be specified

 /* MKVToolnix GUI muxing at this point, can't paste anything */

 $ mkvinfo -v test_toolnix.mkv
 + EBML head
 |+ EBML version: 1
 |+ EBML read version: 1
 |+ EBML maximum ID length: 4
 |+ EBML maximum size length: 8
 |+ Doc type: matroska
 |+ Doc type version: 4
 |+ Doc type read version: 2
 + Segment, size 57293
 |+ Seek head (subentries will be skipped)
 |+ EbmlVoid (size: 4046)
 |+ Segment information
 | + Timecode scale: 1000000
 | + Muxing application: libebml v1.3.0 + libmatroska v1.4.1
 | + Writing application: mkvmerge v6.4.1 ('Omega Point') built on Sep 16
 2013 22:05:10
 | + Duration: 10.000s (00:00:10.000)
 | + Date: Fri Sep 20 20:12:48 2013 UTC
 | + Segment UID: 0xae 0x90 0x6b 0x02 0xaa 0xc7 0x3a 0xda 0x98 0x03 0x12
 0x17 0xb5 0x2b 0x8b 0xee
 |+ Segment tracks
 | + A track
 |  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
 |  + Track UID: 1711331502
 |  + Track type: video
 |  + Lacing flag: 0
 |  + MinCache: 1
 |  + Codec ID: V_MPEG4/ISO/AVC
 |  + CodecPrivate, length 42 (h.264 profile: High 4:4:4 Predictive @L1.3)
 |  + Default duration: 40.000ms (25.000 frames/fields per second for a
 video track)
 |  + Language: und
 |  + Video track
 |   + Pixel width: 320
 |   + Pixel height: 240
 |   + Display width: 320
 |   + Display height: 240
 |+ EbmlVoid (size: 1058)
 |+ Cluster
 | + Cluster timecode: 0.000s
 | + SimpleBlock (key, track number 1, 1 frame(s), timecode 0.000s =
 00:00:00.000)
 |  + Frame with size 3552
 | + SimpleBlock (track number 1, 1 frame(s), timecode 0.160s =
 00:00:00.160)
 |  + Frame with size 556
 [...]
 }}}

 Notice again the duration and timecode of first block.

 Remuxing test_toolnix.mkv with ffmpeg (Can also use the mp4 for this, the
 result is the same), then looking at it with mkvinfo:

 {{{
 $ ./ffmpeg -i test_toolnix.mkv -c:v copy remux.mkv
 ffmpeg version N-56469-gf6622f9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Sep 20 2013 05:04:04 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-nonfree --enable-libquvi --enable-
 openssl --enable-nonfree --enable-libvorbis --enable-libopus --enable-
 libfdk-aac --enable-libtheora --enable-libvpx --enable-libx264 --enable-
 libmp3lame --enable-libfreetype --cross-prefix=x86_64-w64-mingw32-
 --target-os=mingw32 --cpu=amdfam10 --arch=x86_64 --prefix=/mingw64
   libavutil      52. 45.100 / 52. 45.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.100 / 55. 18.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 86.102 /  3. 86.102
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, matroska,webm, from 'test_toolnix.mkv':
   Metadata:
     creation_time   : 2013-09-20 20:12:48
   Duration: 00:00:10.00, start: 0.000000, bitrate: 45 kb/s
     Stream #0:0: Video: h264 (High 4:4:4 Predictive), yuv444p, 320x240
 [SAR 1:1DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
 Output #0, matroska, to 'remux.mkv':
   Metadata:
     encoder         : Lavf55.18.100
     Stream #0:0: Video: h264 (H264 / 0x34363248), yuv444p, 320x240 [SAR
 1:1 DAR4:3], q=2-31, 25 fps, 1k tbn, 1k tbc (default)
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
 Press [q] to stop, [?] for help
 frame=  250 fps=0.0 q=-1.0 Lsize=      51kB time=00:00:09.88 bitrate=
 42.5kbits/s
 video:49kB audio:0kB subtitle:0 global headers:0kB muxing overhead
 4.400287%

 $ ./ffmpeg -i remux.mkv
 ffmpeg version N-56469-gf6622f9 Copyright (c) 2000-2013 the FFmpeg
 developers
   built on Sep 20 2013 05:04:04 with gcc 4.7.3 (GCC)
   configuration: --enable-gpl --enable-nonfree --enable-libquvi --enable-
 openssl --enable-nonfree --enable-libvorbis --enable-libopus --enable-
 libfdk-aac --enable-libtheora --enable-libvpx --enable-libx264 --enable-
 libmp3lame --enable-libfreetype --cross-prefix=x86_64-w64-mingw32-
 --target-os=mingw32 --cpu=amdfam10 --arch=x86_64 --prefix=/mingw64
   libavutil      52. 45.100 / 52. 45.100
   libavcodec     55. 33.100 / 55. 33.100
   libavformat    55. 18.100 / 55. 18.100
   libavdevice    55.  3.100 / 55.  3.100
   libavfilter     3. 86.102 /  3. 86.102
   libswscale      2.  5.100 /  2.  5.100
   libswresample   0. 17.103 /  0. 17.103
   libpostproc    52.  3.100 / 52.  3.100
 Input #0, matroska,webm, from 'remux.mkv':
   Metadata:
     MAJOR_BRAND     : isom
     MINOR_VERSION   : 512
     COMPATIBLE_BRANDS: isomiso2avc1mp41
     ENCODER         : Lavf55.18.100
   Duration: 00:00:10.08, start: 0.000000, bitrate: 41 kb/s
     Stream #0:0(und): Video: h264 (High 4:4:4 Predictive), yuv444p,
 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
     Metadata:
       LANGUAGE        : und
       HANDLER_NAME    : VideoHandler
 At least one output file must be specified

 $ mkvinfo -v remux.mkv
 + EBML head
 |+ EBML version: 1
 |+ EBML read version: 1
 |+ EBML maximum ID length: 4
 |+ EBML maximum size length: 8
 |+ Doc type: matroska
 |+ Doc type version: 4
 |+ Doc type read version: 2
 + Segment, size 52375
 |+ Seek head (subentries will be skipped)
 |+ EbmlVoid (size: 149)
 |+ Segment information
 | + Timecode scale: 1000000
 | + Muxing application: Lavf55.18.100
 | + Writing application: Lavf55.18.100
 | + Segment UID: 0xb5 0x1b 0x58 0x0b 0xe3 0x7b 0x7c 0x52 0x7f 0x49 0x72
 0x1c 0x88 0xaa 0x3e 0x2a
 | + Duration: 10.080s (00:00:10.080)
 |+ Segment tracks
 | + A track
 |  + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
 |  + Track UID: 1
 |  + Lacing flag: 0
 |  + Language: und
 |  + Codec ID: V_MPEG4/ISO/AVC
 |  + Track type: video
 |  + Default duration: 40.000ms (25.000 frames/fields per second for a
 video track)
 |  + Video track
 |   + Pixel width: 320
 |   + Pixel height: 240
 |   + Display width: 320
 |   + Display height: 240
 |  + CodecPrivate, length 42 (h.264 profile: High 4:4:4 Predictive @L1.3)
 |+ Tags
 | + Tag
 |  + Targets
 |  + Simple
 |   + Name: ENCODER
 |   + String: Lavf55.18.100
 |+ Cluster
 | + Cluster timecode: 0.080s
 | + SimpleBlock (key, track number 1, 1 frame(s), timecode 0.080s =
 00:00:00.080)
 |  + Frame with size 3552
 | + SimpleBlock (track number 1, 1 frame(s), timecode 0.240s =
 00:00:00.240)
 |  + Frame with size 556

 [...]
 }}}

 Duration and timecode of first block are wrong again.

 This can be reproduced with any h264 stream, created by ffmpeg/libx264 or
 not.
 The pts of first packet/block will always be a few ms ahead after
 re/muxing, which adds to the total duration (10.080s vs 10.000s in this
 case)

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


More information about the FFmpeg-trac mailing list