[FFmpeg-trac] #3327(avformat:new): libavformat fails to detect some mp3 files reliably

FFmpeg trac at avcodec.org
Mon Jan 27 12:08:13 CET 2014


#3327: libavformat fails to detect some mp3 files reliably
------------------------------------+------------------------------------
             Reporter:  gjdfgh      |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  mp3         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by gjdfgh):

 >So you agree that what FFmpeg reports is correct? After all, it does
 report the correct file type or do I miss something?

 I'm doing this for a video player. I do not want libavformat to
 "recognize" random binary files as media files (which it does often with
 low probescore/probesize), OTOH I sure want it do detect simple mp3 files.
 Usually this works great by requiring at least AVPROBE_SCORE_RETRY+1,
 except for some mp3 files.

 So yes, I see a problem here.

 >Define "reliably": Afaict, for the file in question, FFmpeg succeeds with
 auto-detection (which is apparently not trivial, see "other"
 applications), I don't find "I am not 100% sure" so bad for mp3 files with
 large attachments.

 I wouldn't mind feeding a few megabytes of mp3 data to the probe function
 in the case of large attachments, but even then it doesn't "work".

 No, I do not want to play back ELF files as mp3, which is why I think some
 work is needed here.

 >*Please* provide such samples!

 Uploaded issue3327-libc-2.17.so. It's recognized as mp3, and even decodes
 some audio artifacts.

 >>Using the file extension instead of the sophisticated probing in
 mp3_read_probe would be more reliable.
 >This opinion seems to be in strong contrast to what FFmpeg stands for
 (since forever) and most people always saw that as one of the largest
 advantages over WMP etc.

 I generally agree that it's better to determine the file format by content
 and not by extension. However, although this is quite a pathological case,
 the bad mp3 detection does lead to user complaints. And lowering the
 probescore for file detection isn't a solution either, because you get too
 many false positives.

 (For now I've special cased mp3 in my player, so strictly speaking this is
 not an issue for me anymore.)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3327#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list