Opened 13 years ago

Closed 11 years ago

#1378 closed defect (fixed)

ffmpeg lists every track in a QuickTime file twice

Reported by: dave rice Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: mov
Cc: rmk Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

I'm using Final Cut Pro to capture uncompressed audio and video coming over an SDI cable. This file, http://archive.org/download/FfmpegTest/BCSPA039_pre.mov, is what Final Cut captures. QuickTime and Mediainfo list 1 video track, 1 caption track, 7 audio tracks and 1 timecode track (10 total tracks). ffmpeg evaluates each track twice and lists 20 total tracks.

ffmpeg-20120529-165744.logffmpeg started on 2012-05-29 at 16:57:44
Report written to "ffmpeg-20120529-165744.log"
Command line:
ffmpeg -report -i /Volumes/ingest_hd_4/BCL00012/BCSPA039_pre.mov
ffmpeg version 0.10.2.git Copyright (c) 2000-2012 the FFmpeg developers
  built on May 24 2012 16:18:04 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/HEAD --enable-shared --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-libfreetype --cc=/usr/bin/gcc-4.2 --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libass
  libavutil      51. 54.100 / 51. 54.100
  libavcodec     54. 23.100 / 54. 23.100
  libavformat    54.  6.100 / 54.  6.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 76.100 /  2. 76.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=95
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] File position before avformat_find_stream_info() is 496557295
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Probe buffer size limit 5000000 reached
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #0: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #1: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #2: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #3: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #4: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #5: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #6: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #7: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #8: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #11: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #12: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #13: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #14: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #15: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #16: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #17: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #18: not enough frames to estimate rate; consider increasing probesize
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] Stream #19: not enough frames to estimate rate; consider increasing probesize
rfps: 26.250000 0.019258
rfps: 26.333333 0.018405
rfps: 26.416667 0.017571
rfps: 26.500000 0.016757
rfps: 26.583333 0.015962
rfps: 26.666667 0.015186
rfps: 26.750000 0.014429
rfps: 26.833333 0.013692
rfps: 26.916667 0.012974
rfps: 27.000000 0.012276
rfps: 27.083333 0.011597
rfps: 27.166667 0.010937
rfps: 27.250000 0.010296
rfps: 27.333333 0.009675
rfps: 27.416667 0.009073
rfps: 27.500000 0.008490
rfps: 27.583333 0.007927
rfps: 27.666667 0.007383
rfps: 27.750000 0.006859
rfps: 27.833333 0.006353
rfps: 27.916667 0.005868
rfps: 28.000000 0.005401
rfps: 28.083333 0.004954
rfps: 28.166667 0.004526
rfps: 28.250000 0.004117
rfps: 28.333333 0.003728
rfps: 28.416667 0.003358
rfps: 28.500000 0.003007
rfps: 28.583333 0.002676
rfps: 28.666667 0.002364
rfps: 28.750000 0.002071
rfps: 28.833333 0.001798
rfps: 28.916667 0.001544
rfps: 29.000000 0.001309
rfps: 29.083333 0.001094
rfps: 29.166667 0.000898
rfps: 29.250000 0.000721
rfps: 29.333333 0.000564
rfps: 29.416667 0.000426
rfps: 29.500000 0.000307
rfps: 29.583333 0.000208
rfps: 29.666667 0.000128
rfps: 29.750000 0.000067
rfps: 29.833333 0.000026
rfps: 29.916667 0.000004
rfps: 30.000000 0.000001
rfps: 30.000000 0.000001
rfps: 30.083333 0.000018
rfps: 30.083333 0.000018
rfps: 30.166667 0.000054
rfps: 30.166667 0.000054
rfps: 30.250000 0.000109
rfps: 30.250000 0.000109
rfps: 30.333333 0.000184
rfps: 30.333333 0.000184
rfps: 30.416667 0.000278
rfps: 30.416667 0.000278
rfps: 30.500000 0.000391
rfps: 30.500000 0.000391
rfps: 30.583333 0.000524
rfps: 30.583333 0.000524
rfps: 30.666667 0.000675
rfps: 30.666667 0.000675
rfps: 30.750000 0.000847
rfps: 30.750000 0.000847
rfps: 30.833333 0.001037
rfps: 30.833333 0.001037
rfps: 30.916667 0.001247
rfps: 30.916667 0.001247
rfps: 31.000000 0.001476
rfps: 31.000000 0.001476
rfps: 31.083333 0.001725
rfps: 31.083333 0.001725
rfps: 31.166667 0.001993
rfps: 31.166667 0.001993
rfps: 31.250000 0.002280
rfps: 31.250000 0.002280
rfps: 31.333333 0.002587
rfps: 31.333333 0.002587
rfps: 31.416667 0.002913
rfps: 31.416667 0.002913
rfps: 31.500000 0.003258
rfps: 31.500000 0.003258
rfps: 31.583333 0.003622
rfps: 31.583333 0.003622
rfps: 31.666667 0.004006
rfps: 31.666667 0.004006
rfps: 31.750000 0.004409
rfps: 31.750000 0.004409
rfps: 31.833333 0.004832
rfps: 31.833333 0.004832
rfps: 31.916667 0.005274
rfps: 31.916667 0.005274
rfps: 32.000000 0.005735
rfps: 32.000000 0.005735
rfps: 32.083333 0.006215
rfps: 32.083333 0.006215
rfps: 32.166667 0.006715
rfps: 32.166667 0.006715
rfps: 32.250000 0.007234
rfps: 32.250000 0.007234
rfps: 32.333333 0.007773
rfps: 32.333333 0.007773
rfps: 32.416667 0.008331
rfps: 32.416667 0.008331
rfps: 32.500000 0.008908
rfps: 32.500000 0.008908
rfps: 32.583333 0.009504
rfps: 32.583333 0.009504
rfps: 32.666667 0.010120
rfps: 32.666667 0.010120
rfps: 32.750000 0.010755
rfps: 32.750000 0.010755
rfps: 32.833333 0.011410
rfps: 32.833333 0.011410
rfps: 32.916667 0.012084
rfps: 32.916667 0.012084
rfps: 33.000000 0.012777
rfps: 33.000000 0.012777
rfps: 33.083333 0.013489
rfps: 33.083333 0.013489
rfps: 33.166667 0.014221
rfps: 33.166667 0.014221
rfps: 33.250000 0.014972
rfps: 33.250000 0.014972
rfps: 33.333333 0.015743
rfps: 33.333333 0.015743
rfps: 33.416667 0.016532
rfps: 33.416667 0.016532
rfps: 33.500000 0.017341
rfps: 33.500000 0.017341
rfps: 33.583333 0.018170
rfps: 33.583333 0.018170
rfps: 33.666667 0.019018
rfps: 33.666667 0.019018
rfps: 33.750000 0.019885
rfps: 33.750000 0.019885
rfps: 56.166667 0.019815
rfps: 56.250000 0.018949
rfps: 56.333333 0.018103
rfps: 56.416667 0.017276
rfps: 56.500000 0.016468
rfps: 56.583333 0.015680
rfps: 56.666667 0.014911
rfps: 56.750000 0.014162
rfps: 56.833333 0.013432
rfps: 56.916667 0.012721
rfps: 57.000000 0.012029
rfps: 57.083333 0.011357
rfps: 57.166667 0.010704
rfps: 57.250000 0.010070
rfps: 57.333333 0.009456
rfps: 57.416667 0.008861
rfps: 57.500000 0.008285
rfps: 57.583333 0.007729
rfps: 57.666667 0.007192
rfps: 57.750000 0.006675
rfps: 57.833333 0.006176
rfps: 57.916667 0.005697
rfps: 58.000000 0.005238
rfps: 58.083333 0.004797
rfps: 58.166667 0.004376
rfps: 58.250000 0.003975
rfps: 58.333333 0.003592
rfps: 58.416667 0.003229
rfps: 58.500000 0.002886
rfps: 58.583333 0.002561
rfps: 58.666667 0.002256
rfps: 58.750000 0.001971
rfps: 58.833333 0.001704
rfps: 58.916667 0.001457
rfps: 59.000000 0.001230
rfps: 59.083333 0.001021
rfps: 59.166667 0.000832
rfps: 59.250000 0.000663
rfps: 59.333333 0.000512
rfps: 59.416667 0.000381
rfps: 59.500000 0.000269
rfps: 59.583333 0.000177
rfps: 59.666667 0.000104
rfps: 59.750000 0.000050
rfps: 59.833333 0.000016
rfps: 59.916667 0.000001
rfps: 29.970030 0.000000
rfps: 29.970030 0.000000
rfps: 59.940060 0.000000
rfps: 59.940060 0.000000
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10200f600] File position after avformat_find_stream_info() is 4669696
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/ingest_hd_4/BCL00012/BCSPA039_pre.mov':
  Metadata:
    creation_time   : 2012-05-25 16:42:20
  Duration: 00:00:16.08, start: 0.204542, bitrate: 247001 kb/s
    Stream #0:0(eng), 0, 1/2997: Subtitle: eia_608 (c608 / 0x38303663)
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:3(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:4(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:5(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:6(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:7(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:8(eng), 0, 1/2997: Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2012-05-25 16:44:31
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:50;25
    Stream #0:9(eng), 1, 1/2997: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x486, 223724 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 2997 tbc
    Metadata:
      creation_time   : 2012-05-25 20:41:15
      handler_name    : Apple Alias Data Handler
    Stream #0:10(eng), 5, 1/2997: Video: v210 (v210 / 0x30313276), yuv422p10le, 720x486, 222790 kb/s, 29.84 fps, 29.97 tbr, 2997 tbn, 2997 tbc
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:11(eng), 0, 1/2997: Subtitle: eia_608 (c608 / 0x38303663)
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:12(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32, 2304 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:13(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:14(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:15(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:16(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:17(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:18(eng), 0, 1/48000: Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
    Metadata:
      creation_time   : 2012-05-25 16:44:30
      handler_name    : Apple Alias Data Handler
    Stream #0:19(eng), 0, 1/2997: Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2012-05-25 16:44:31
      handler_name    : Apple Alias Data Handler
      timecode        : 00:00:50;25
At least one output file must be specified

Change History (10)

comment:1 by Carl Eugen Hoyos, 13 years ago

Keywords: mov added; quicktime removed
Status: newopen

Not a regression, afaict.

comment:2 by Carl Eugen Hoyos, 13 years ago

Reproduced by developer: set

comment:3 by dave rice, 12 years ago

As I reported on ffmpeg-user I tested this file in a number of applications and only found this error in ffmpeg.

VLC shows correct number of tracks.
mediainfo shows the correct number of tracks.
Quicktime shows the correct number of tracks.
muxmovie shows the correct number of tracks.
Dumpster (Quicktime tool to review container structure) shows the correct number of tracks.
... and ...
ffmbc shows the correct number of tracks.

ffmpeg lists every track twice.

comment:4 by rmk, 12 years ago

I also have a file that exhibits that behaviour tested with a rather old ffmpeg version (>4 months) and now with current git master. It is too large to attache it though. Do you need another sample? If so I can try to reproduce a smaller one.

in reply to:  4 ; comment:5 by Carl Eugen Hoyos, 12 years ago

Cc: rmk added

Replying to rmk:

I also have a file that exhibits that behaviour tested with a rather old ffmpeg version (>4 months) and now with current git master. It is too large to attache it though.

Did you read http://ffmpeg.org/bugreports.html ?
A small sample is nice, but if you only have a larger one, please upload.

in reply to:  5 comment:6 by rmk, 12 years ago

Replying to cehoyos:

Did you read http://ffmpeg.org/bugreports.html ?

yes, which part are you referring to?

A small sample is nice, but if you only have a larger one, please upload.

Ok, I will upload the file.

comment:7 by rmk, 12 years ago

uploaded as duplicate-track-display.mov

comment:8 by rmk, 12 years ago

I think the file I uploaded should probably be considered broken as it contains two moov atoms, which was probably a bug in ffmbc 0.6, which was used to create the file. I could not find anything in the Quicktime spec explicitly disallowing this but think it's probably a bug. However, ignoring a second moov atom in a file and logging a warning should not be too hard to do and would be a bit more robust as these files seem to be OK for Quicktime player.
The original Final Cut Pro file also has two moov atoms but maybe in that case it is a sort of security measure used by the capturing application in case the capturing is interrupted to write a moov once in a while so at least the data captured until that point is readable (just a guess but the layout seems weird with lots of "free" atoms that internally look like a moov). in that case it would make sense to use the last moov atom one finds but this needs further investigation.

comment:9 by dave rice, 12 years ago

@rmk, thanks for this explanation. The source file, at internet archive, is the file produced from a Log&Capture process within Final Cut. This should be a common type of container use with Final Cut and production environments. Your idea of using the last atom makes sense and reminded me of this ticket: https://ffmpeg.org/trac/ffmpeg/ticket/1137. Here a Quicktime file is edited in Quicktime and saved. The 'save' changes the original moov to free and appends a new moov to the file. Using the last moov atom may fix this issue too.

comment:10 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavformat
Resolution: fixed
Status: openclosed

Fixed by Thierry Foucu.

Note: See TracTickets for help on using tickets.