[FFmpeg-user] some mp3 files can not be decoded by recent FFmpeg

Alexander Strasser eclipse7 at gmx.net
Sun Aug 11 03:33:46 CEST 2013


Hi Kirill, 

  thank you for the report and the sample!

On 2013-08-10 11:31 +0400, Kirill Gavrilov wrote:
> After migration to FFmpeg 2.0 I have observed that several old mp3 files (9
> from 100) can not be played anymore with the same error - no 'data' tag
> found:

  I analyzed the situation and found the culprit. It all breaks down
in the wav demuxer. Your file is an mp3 inside of a WAV container. It
additionally contains ID3 information at the beginning.

  So let me explain what is happening:
  0. wav demuxer was changed to only seek to even positions
     (fixes some "kind of broken" files I assume)
  1. the ID3 chunk in your file is of uneven size
  2. the wav demuxer seeks one byte too short
  3. the 2nd tag is read and results in a wrong tag name and a wrong size
  4. the data tag is never found and the demuxer errors out

  Unfortunately I am not yet sure what would be the best fix here.
Simply reverting the offending commit would result in other files
being not playable that were with it.

  Suggestions welcome.

  Alexander

> ./ffmpeg -i anb3.mp3
> ffmpeg version N-55410-gd4db7c3 Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Aug 10 2013 10:58:01 with gcc 4.2.1 (GCC) (Apple Inc. build
> 5666) (dot 3)
>   configuration: --enable-swscale --enable-shared --disable-static
> --enable-memalign-hack --enable-avfilter --enable-hardcoded-tables
> --enable-pthreads --disable-libopenjpeg --enable-runtime-cpudetect
> --enable-vda --disable-debug --enable-version3
>   libavutil      52. 41.100 / 52. 41.100
>   libavcodec     55. 24.100 / 55. 24.100
>   libavformat    55. 13.102 / 55. 13.102
>   libavdevice    55.  3.100 / 55.  3.100
>   libavfilter     3. 82.100 /  3. 82.100
>   libswscale      2.  4.100 /  2.  4.100
>   libswresample   0. 17.103 /  0. 17.103
> [wav @ 0x10180e820] Format wav probed with size=2048 and score=99
> [wav @ 0x10180e820] id3v2 ver:2 flags:00 len:85
> [wav @ 0x10180e820] no 'data' tag found
> [AVIOContext @ 0x101111260] Statistics: 32768 bytes read, 0 seeks
> anb3.mp3: Invalid data found when processing input
> 
> There no such issues with older release 0.10.2:
> [wav @ 0x10100e820] max_analyze_duration 5000000 reached at 5015510
> Input #0, wav, from 'anb3.mp3':
>   Duration: 00:03:11.82, bitrate: 12 kb/s
>     Stream #0:0: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, stereo, s16,
> 128 kb/s
> 
> I may suppose that these files were encoded with broken encoder but it is
> weird that only recent FFmpeg can not play them now...
> Could somebody tell me is it regression or new "feature"?
> 
> I have prepared 300 KB cut from one sample:
> http://sview.cifro-city.ru/trash/anb3.mp3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130811/5ff3e8e0/attachment.asc>


More information about the ffmpeg-user mailing list