Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5205 closed defect (fixed)

mp3 detection regression

Reported by: cehoyos 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 cehoyos 3 years ago.

Change History (9)

Changed 3 years ago by cehoyos

comment:1 follow-up: Changed 3 years ago by gjdfgh

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).

comment:2 in reply to: ↑ 1 Changed 3 years ago by cehoyos

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 Changed 3 years ago by gjdfgh

I did not find bug reports from you;-(

#3327

comment:4 Changed 3 years ago by cehoyos

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 Changed 3 years ago by gjdfgh

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 Changed 3 years ago by cehoyos

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 3 years ago by gjdfgh

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

comment:8 Changed 3 years ago by richardpl

Yes, the id3 should be skipped when probbing.

Note: See TracTickets for help on using tickets.