As most of the quality degradation is most likely done by a program as well, you could bring up your hex editor and try to recognize patterns, either in the encoded mp3 file or in the decoded PCM stream. For example, there are click-removal algorithms - those include click-detection, and if a file has too many clicks, it's most likely damaged.

But there are certain limits to those detection mechanisms, as simply using a too-low bitrate will degrade the quality of a record to an unacceptable level. Simply decoding the mp3 and then deciding whether the decoded result has acceptable quality is very hard, if you consider different kinds of synthesizer tracks - there are some very clean synthesizer sounds, but there are also filtered and voluntarily distorted sounds - your algorithm would have to determine whether that distortion was intrinsic to the original record or came to be through malintent manipulation - an impossible task.

So I guess it's simply easier to just record all your CDs instead of downloading them from the internet...

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web

In reply to Re: Testing for quality of audio in MP3's by Corion
in thread Testing for quality of audio in MP3's by Stegalex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.