[Flac-dev] Idea to possibly improve flac?

Jørgen Vigdal
Fri, 07 Jan 2011 23:54:01 -0000

Cool, thanks for all the great comments.

I think we agree now on that the "find mp3 before encoding" feature
would not be a good idea to implement in the flac core. As Brian pointed out, it
might be a better idea to create a program that automatically checks if a flac
might have been an mp3 source.

My first suggestion was to use FFT, because I know that 128kbps mp3 have a
low-pass filter at 16kHz (Fraunhofer IIS Encoder). The program should not decide
whether or not the file is a mp3 based on only that, but it could give an
indication on that. Perhaps with people not very familiar with advanced audio
tools know how to spot out a mp3, they just want to know if the flac they just
bought or downloaded is good or not?

Another test, if the FFT test is unclear, is to check the correlation between
left and right channel below 3kHz, which should be just about nothing if the
source is a mp3 (since mp3 encoders sum L and R below 3kHz at low bitrates). If
also doing further testing, and knowing how the mp3 encoders work, it should be
fairly easy to determine if a source file might have been an mp3. At least the
program would be able to tell if the input file is poor quality? :)

J.
On Jan 8, 2011, at 12:28 AM, Declan Kelly wrote:

> On Fri, Jan 07, 2011 at 02:22:51PM -0800, brianw at sounds.wa.com wrote:
>>
>> First of all, I am not aware of any official source of FLAC files
>> that provide MP3 sourced data.
>
> Unofficial sources (such as Usenet and that torrent site with the old
> fashioned sailing ship as its logo) are much more likely to have FLAC
> files that were made from lossy audio.
>
> And I vaguely remember reading about an illegal download site that
> stored all audio in MP3 (at less than 320k) and transcoded on the fly
> for all other bitrates and formats, including FLAC and 320k MP3. They
> did it to save storage space.
>
>> However, you should be aware that many modern producers use software
>> to create their music, and when the software stores sound clips in
>> MP3 format, what you end up with is music that sometimes looks like
>> MP3.
>
> I recently bought the double-CD "Influence" remaster by The Art
Of Noise
> and some rarer tracks were sourced from MP3 because that was all their
> archivist could find. Most of the reissue was direct from analogue tapes
> so this wasn't a quick "shovelware" reissue job.
>
>> it just has to do with the software that was used to create the music
>> originally.
>
> A friend of mine recorded his band's last album on DCC in the mid 1990s
> and released it on CD. It sounds horrible; the lossy compression of DCC
> is even worse than MiniDisc's ATRAC. I'm sure this CD would fail
most
> FFT quality tests, as literally everyone who heard it (not just people
> with "golden ears" or good sound systems) complained about the
quality.
>
>> In other words, if you try to shut down the FLAC encoder based on an
>> FFT, you might have a lot of false triggers!
>
> I think it's a bad idea for a lot of reasons: checking the source audio
> quality should be a job for another tool. Most FLAC users won't need to
> check (most of my FLAC files are ripped from original CDs that I own),
> and anyone who was trying to fool listeners (or fellow piracy groups)
> would either work out how to bypass the check, or (more likely) use an
> older version of FLAC.
>
> And it's not in keeping with the philosophy behind FLAC: one thing that
> I regularly say to people who aren't sure about using FLAC is that Josh
> designed it with no copy protection support: if it was there, someone
> would only crack it, so it is effectively useless. And that's probably
> why Apple's ALAC is usually bigger than FLAC for the same uncompressed
> audio (and why Apple still don't support FLAC in their products).
>
> Stopping a pirate from encoding FLAC is similar to stopping a pirate
> from ripping a copy-protected CD: it's a challenge to be overcome, and
> it will probably take "them" less time to work it out than it
took "us"
> to build it. And "they" only need to work it out once. Which is
why all
> copy protection and DRM sucks, for everyone.