Opened 3 years ago

Closed 3 years ago

#2435 closed defect (invalid)

moov atom not found

Reported by: KSHawkEye Owned by:
Priority: normal Component: avformat
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm getting "moov atom not found" with the latest version of the FFmpeg git.

Here is the result of the following command:
ffmpeg -v 9 -loglevel 99 -i "20121006182827-0006KM.mov"

ffmpeg version N-51511-g599866f Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr  1 2013 12:44:46 with gcc 4.8.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 24.100 / 52. 24.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.105 /  3. 48.105
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'C:\Users\Kyle\Desktop\20121006182827-0006KM.mov'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Successfully parsed a group of options.
Parsing a group of options: input file C:\Users\Kyle\Desktop\20121006182827-0006KM.mov.
Successfully parsed a group of options.
Opening an input file: C:\Users\Kyle\Desktop\20121006182827-0006KM.mov.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0210e7c0] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0210e7c0] ISO: File Type Major Brand: qt  
[mov,mp4,m4a,3gp,3g2,mj2 @ 0210e7c0] moov atom not found
[AVIOContext @ 0210ece0] Statistics: 32768 bytes read, 1 seeks
C:\Users\Kyle\Desktop\20121006182827-0006KM.mov: Invalid data found when processing input

I don't know if this is a Windows only bug, but it occurs with a version compiled with MinGW-w64 and MSVC.

This issue seems to be only 32-bit related, the 64-bit versions work. It also might be related to a issue with large files.

The build used to get the error is: http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20130401-git-599866f-win32-static.7z

The issue happens with the following file: http://zeranoe.com/shared/N1r1r5ssh0AjN31L/20121006182827-0006KM.mov

This file is very large (4.7G) and has the MD5 hash:
49337c0d75fcf89cc42ba6e6d1672d3c

I am willing to provide any further information needed.

This issue happens with ffmpeg, ffplay, and ffprobe.

Change History (19)

comment:1 Changed 3 years ago by cehoyos

  • Component changed from FFmpeg to avformat
  • Keywords mov added; moov atom not found removed
  • Priority changed from important to normal

Sorry if I misremember but didn't you already find out that the problem is the definition of a size variable in the zlib headers (using long)?

comment:2 Changed 3 years ago by heleppkes

I cannot reproduce any issues, i tried both MSVC and MinGW-w64 builds (my own)

Here is ffprobe:

D:\Dev\Multimedia\ffmpeg\git-master>ffprobe -v debug D:\Downloads\20121006182827-0006KM.mov
ffprobe version N-51616-g8c43fd8 Copyright (c) 2007-2013 the FFmpeg developers
  built on Apr  5 2013 21:39:46 with Microsoft (R) C/C++ Optimizing Compiler Version 17.00.60315.1 for x86
  configuration: --enable-gpl --enable-debug --toolchain=msvc
  libavutil      52. 25.100 / 52. 25.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 49.100 /  3. 49.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 004AD320] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 004AD320] ISO: File Type Major Brand: qt
[mov,mp4,m4a,3gp,3g2,mj2 @ 004AD320] File position before avformat_find_stream_info() is 5002355025
[mov,mp4,m4a,3gp,3g2,mj2 @ 004AD320] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 004AD320] File position after avformat_find_stream_info() is 3995648
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Downloads\20121006182827-0006KM.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2012-10-07 01:28:27
  Duration: 00:05:38.51, start: 0.000000, bitrate: 118222 kb/s
    Stream #0:0(eng), 8, 1/2997: Video: dvvideo (dvh3 / 0x33687664), yuv422p, 1280x1080 [SAR 3:2 DAR 16:9], 1001/30000,
115084 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 29.97 tbc
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
      timecode        : 12:52:51:20
    Stream #0:1(eng), 24, 1/48000: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng), 24, 1/48000: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:3(eng), 24, 1/48000: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:4(eng), 1, 1/48000: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:5(eng), 0, 1/2997: Data: none (tmcd / 0x64636D74), 1/30
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
      timecode        : 12:52:51:20
[dvvideo @ 004B5FC0] detected 8 logical cores
Unsupported codec with id 0 for input stream 5
[AVIOContext @ 004B5B60] Statistics: 4208085 bytes read, 6 seeks

PS:
This file does not have a cmov atom, its pure moov.

Last edited 3 years ago by heleppkes (previous) (diff)

comment:4 Changed 3 years ago by heleppkes

That build doesn't work. Why, i don't know.

comment:5 Changed 3 years ago by cehoyos

It works fine here with "ffmpeg-20130115-git-5ce023b-win32-static" (apparently provided by you) and a version compiled with (normal) mingw32:

$ ./ffmpeg -i /c/20121006182827-0006KM.mov
ffmpeg version N-51511-g599866f Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr  6 2013 10:04:02 with gcc 4.7.2 (GCC)
  configuration: --enable-pthreads --cc='gcc -m32' --disable-zlib --disable-bzlib
  libavutil      52. 24.100 / 52. 24.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  1.100 / 55.  1.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 48.105 /  3. 48.105
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'c:/20121006182827-0006KM.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 537199360
    compatible_brands: qt
    creation_time   : 2012-10-07 01:28:27
  Duration: 00:05:38.51, start: 0.000000, bitrate: 118222 kb/s
    Stream #0:0(eng): Video: dvvideo (dvh3 / 0x33687664), yuv422p, 1280x1080 [SAR 3:2 DAR 16:9], 115084 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 29.97 tbc
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
      timecode        : 12:52:51:20
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:3(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:4(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, mono, s16, 768 kb/s
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
    Stream #0:5(eng): Data: none (tmcd / 0x64636D74)
    Metadata:
      creation_time   : 2012-10-07 01:28:27
      handler_name    : Apple Alias Data Handler
      timecode        : 12:52:51:20
At least one output file must be specified

comment:6 follow-up: Changed 3 years ago by KSHawkEye

Can you try with zlib enabled?

This might be where the error comes from:

#if CONFIG_ZLIB
    AVIOContext ctx;
    uint8_t *cmov_data;
    uint8_t *moov_data; /* uncompressed data */
    long cmov_len, moov_len;
    int ret = -1;

Which seems to use zlib.

comment:7 follow-up: Changed 3 years ago by heleppkes

Your file doesn't have a "cmov" atom (where the zlib code would be used), and my own builds had zlib enabled - in fact, a file with a cmov atom wouldn't open at all if zlib was disabled (with about the same error that you're getting)

comment:8 in reply to: ↑ 7 Changed 3 years ago by KSHawkEye

Replying to heleppkes:

Your file doesn't have a "cmov" atom (where the zlib code would be used), and my own builds had zlib enabled - in fact, a file with a cmov atom wouldn't open at all if zlib was disabled (with about the same error that you're getting)

Do you have any idea what might be causing the error then?

comment:9 in reply to: ↑ 6 Changed 3 years ago by cehoyos

Replying to KSHawkEye:

Can you try with zlib enabled?

Since this is non-trivial, may I suggest that you test with --disable-zlib?

comment:10 Changed 3 years ago by KSHawkEye

It seems like heleppkes is correct, adding --disable-zlib does not change the error.

I am willing to provide any needed information. I can provide a non stripped ffmpeg.exe if it will help.

comment:11 Changed 3 years ago by compn

my _guess_ is that these mingw32 builds hit the 4gb limit and cant read the mov index atoms (which are at the end of a file unless qt_faststart is used).

the bug may be 'cant read past 4gb with mingw32 ffmpeg'

this patch from sherpya might fix:
http://mplayerhq.hu/pipermail/mplayer-dev-eng/2007-January/048904.html

comment:12 Changed 3 years ago by KSHawkEye

This issue might not be related to large files.

The same build that give the moov atom error can read and encode a 10gb file.

Version 0, edited 3 years ago by KSHawkEye (next)

comment:13 Changed 3 years ago by cehoyos

Please test with an older compiler and / or without external libraries.

comment:14 Changed 3 years ago by compn

could you try with filemon while ffmpeg opens your mov sample?
maybe it will have some info. you can exclude other processes to only see ffmpeg disk accesses.

filemon is a free microsoft util, part of process monitor or something. its on microsoft's website somewhere.

comment:15 follow-up: Changed 3 years ago by cehoyos

Works fine here with 4.8.0 and cc='gcc -m32', please test (and use, this is affecting users, see ticket #2433) an older compiler.

comment:16 in reply to: ↑ 15 ; follow-up: Changed 3 years ago by KSHawkEye

Replying to cehoyos:

Works fine here with 4.8.0 and cc='gcc -m32', please test (and use, this is affecting users, see ticket #2433) an older compiler.

I'm using 4.8.0. I can try adding -m32 to the compiler flags, but I doubt that would fix it.

What older compiler are you talking about? MinGW-w64 works best with the latest SVN GCC, I'm not even using that, I'm using the release. Until it can be confirmed that this is a toolchain issue, I don't think using an older compiler is the solution.

If it is the compiler, could you please provide information that can explain this.

comment:17 in reply to: ↑ 16 ; follow-up: Changed 3 years ago by cehoyos

Replying to KSHawkEye:

Replying to cehoyos:

Works fine here with 4.8.0 and cc='gcc -m32', please test (and use, this is affecting users, see ticket #2433) an older compiler.

I'm using 4.8.0. I can try adding -m32 to the compiler flags, but I doubt that would fix it.

Please read comment:5 (and test yourself), it does work with an older binary by you, compiled with an older gcc version.

What older compiler are you talking about? MinGW-w64 works best with the latest SVN GCC, I'm not even using that, I'm using the release. Until it can be confirmed that this is a toolchain issue, I don't think using an older compiler is the solution.

Then please confirm that it is a toolchain issue and use an older compiler!

If it is the compiler, could you please provide information that can explain this.

I already shared all information (it works fine with an older compiler), please test!
It is of course possible that one of the external libraries is the culprit, but that will also be easy to find out. (for you!)

Concerning the compiler: Please understand that gcc versions that contain a "0" (and actually also versions containing "1") are typically unusable and should not be used to compile binaries for distribution.

comment:18 in reply to: ↑ 17 Changed 3 years ago by KSHawkEye

My apologizes, reverting to 4.7.3 seems to have resolved the issue.

While it does bother me that we still don't know exactly what is causing the bug, this ticket can be closed as this is not a FFmpeg issue.

comment:19 Changed 3 years ago by cehoyos

  • Keywords mov removed
  • Resolution set to invalid
  • Status changed from new to closed

Thank you for testing!

We of course also would like to know the reason for the problem, note that it is not reproducible here with Vanilla gcc 4.8.0.

Note: See TracTickets for help on using tickets.