Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5205 closed defect (fixed)

mp3 detection regression

Reported by: Carl Eugen Hoyos Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mp3 probe regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

http://thread.gmane.org/gmane.comp.video.ffmpeg.user/60875
A user provided an mp3 sample that starts with an id3 tag containing a png slightly smaller than PROBE_BUF_MAX that is not autodetected with current FFmpeg. From a user perspective, this is a long-time regression.

$ ffmpeg -loglevel 99 -i example-with-error_cut.mp3
ffmpeg version N-78200-g0dd201d Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 16.101 / 55. 16.101
  libavcodec     57. 23.100 / 57. 23.100
  libavformat    57. 23.101 / 57. 23.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 27.100 /  6. 27.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '99'.
Reading option '-i' ... matched as input file with argument 'example-with-error_cut.mp3'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument 99.
Successfully parsed a group of options.
Parsing a group of options: input file example-with-error_cut.mp3.
Successfully parsed a group of options.
Opening an input file: example-with-error_cut.mp3.
Probing aac score:1 size:2048
Probing mp3 score:12 size:2048
Probing aac score:1 size:4096
Probing mp3 score:12 size:4096
Probing mp3 score:12 size:8192
Probing aac score:1 size:16384
Probing mp3 score:12 size:16384
Probing mp3 score:12 size:32768
Probing aac score:1 size:65536
Probing mp3 score:12 size:65536
Probing aac score:1 size:131072
Probing mp3 score:12 size:131072
Probing aac score:1 size:262144
Probing mp3 score:12 size:262144
Probing mp3 score:12 size:524288
Probing aac score:1 size:2035
Probing mp3 score:1 size:2035
[AVIOContext @ 0x383cde0] Statistics: 1048576 bytes read, 0 seeks
example-with-error_cut.mp3: Invalid data found when processing input

Imo, after an id3 tag was detected, the file should never get a smaller score than if no such tag was detected.

Attachments (1)

example-with-error_cut.mp3 (2.4 MB ) - added by Carl Eugen Hoyos 8 years ago.

Change History (9)

by Carl Eugen Hoyos, 8 years ago

Attachment: example-with-error_cut.mp3 added

comment:1 by gjdfgh, 8 years ago

This mp3 situation is really ridiculous. On one hand, the prober STILL detects ELF binaries and other garbage (from lavf POV) as mp3, and on the other hand legitimate mp3s are not detected.

A real fix would perhaps allow the prober to specify that the application has to skip some data (instead of forcing it to read the entire id3v2 into memory).

in reply to:  1 comment:2 by Carl Eugen Hoyos, 8 years ago

Replying to gjdfgh:

This mp3 situation is really ridiculous. On one hand, the prober STILL detects ELF binaries and other garbage (from lavf POV) as mp3

I did not find bug reports from you;-(

and on the other hand legitimate mp3s are not detected.

This ticket was reported yesterday and will be fixed soon, I don't see what can be improved.

comment:3 by gjdfgh, 8 years ago

I did not find bug reports from you;-(

#3327

comment:4 by Carl Eugen Hoyos, 8 years ago

Yes, I did remember the report:

$ ffmpeg -i issue3327-libc-2.17.so
ffmpeg version N-78205-g31f5fa2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      55. 16.101 / 55. 16.101
  libavcodec     57. 23.100 / 57. 23.100
  libavformat    57. 23.101 / 57. 23.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 27.100 /  6. 27.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
issue3327-libc-2.17.so: Invalid data found when processing input

I was more thinking about unfixed issues.

comment:5 by gjdfgh, 8 years ago

It's not fixed. That specific file that was uploaded is not detected anymore, but other files are. Just try to play random files in "/lib", some will be detected as mp3.

comment:6 by Carl Eugen Hoyos, 8 years ago

Resolution: fixed
Status: newclosed

comment:7 by gjdfgh, 8 years ago

Going by file extension again? And ID3 specific hacks in the common code? Seriously? This is such a shitshow.

comment:8 by Elon Musk, 8 years ago

Yes, the id3 should be skipped when probbing.

Note: See TracTickets for help on using tickets.