Opened 3 years ago

Closed 3 years ago

#7817 closed defect (fixed)

Fails to parse mp4 header

Reported by: Tim Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mov regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no


Submitted by HandBrake user:

Also fails with git master:

ffmpeg -i 01_0001.mp4
ffmpeg version N-93476-g391f884675 Copyright (c) 2000-2019 the FFmpeg developers

built with Apple LLVM version 10.0.1 (clang-1001.0.46.3)
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.106 / 58. 47.106
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f88b3000000] error reading header
01_0001.mp4: Invalid data found when processing input

Sample above 10 MB (NSFW) available here:

Sample appears to play fine in VLC, FWIW.

Attachments (1)

01_0001_cut.mp4 (2.4 MB ) - added by Carl Eugen Hoyos 3 years ago.

Change History (4)

comment:1 by Carl Eugen Hoyos, 3 years ago

Keywords: mov regression added
Priority: normalimportant
Reproduced by developer: set
Status: newopen

by Carl Eugen Hoyos, 3 years ago

Attachment: 01_0001_cut.mp4 added

comment:2 by Gyan, 3 years ago

abf669479 is the proximate source of the error, but the root cause is 1c2e07b8111b24f62b8d1bda62907848e34dfbcb

The esds box for this track has a tag for MP4DecSpecificDescrTag but the length is 0. The commit I referenced stopped allowing that.

However, 14496-3 (2009) 9.D.2.2 says,

No decSpecificInfo is defined for MPEG-1 Audio or MPEG-2 Audio, i.e. in the case of DecoderConfigDescriptor.objectTypeIndication values that refer to streams complying with ISO/IEC 11172-3 (MPEG-1 Audio) and ISO/IEC 13818-3 (MPEG-2 Audio). In these cases audio decoders receive all relevant information in the ‘header()’ element of their own bitstream and can forward the composition memory format to the composition memory. Thus, changes in the output format need to be dealt with dynamically, i.e. without an elementary stream descriptor update.

So, an exception needs to be added for MPEG-1/2 audio streams. MPEG-2 AAC is not included.

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

comment:3 by Gyan, 3 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.