PDA

View Full Version : Impact of data compression (mp3 & wma) on frequency content



BradJudy
09-11-2005, 09:02 PM
I did some screenshots of the spectral charts of a couple pieces of music to show what gets cut out (on a gross level) when you compress music. It's pretty interesting to see side-by-sides of a few different files.

http://www.bradjudy.com/audioblog/2005/09/11/affects-of-data-compression-on-frequency-content/

Has the original and six different compressions for pieces of two different songs. I had previously played with using Audition to selectively cut out high frequencies to see how it sounded and the different was audible through my ER-6s once I got down into the 15kHz range.

It just occured to me that I should add the relative file sizes for reference. I'll do that.

tamuct
09-12-2005, 06:44 AM
Thanks for the comparison BradJudy! The basis for all audio compression is how much you're willing to sacrifice audio quality for disk space. There are many different options for audio compression, and the couple that I know of that can retain 100% of audio quality are FLAC and WMA lossless. Basically, these codecs do a mathmatical replacement on long strings of repeating bits. When played, the bits are replaced and the audio played is bit for bit identical to the original. The drawback here is that these formats have very little compression.

For MP3, WMA and the like, the encoder performs psyco-acoustic algorithms so that the most important parts of the music are retained. From one article I read on MP3, the encoder basically raises the noise floor and drops signals that are below a certain dB level. For pop and rock music that is always played at moderately to loud levels, it's not as noticable. The music that hurts the most from MP3 (and others) encoding is classical music and others with lots of subtle nuances.

I've ripped my entire CD collection to MP3, and I think it's fine for daily/causal listening, but if I really want to sit and listen to music I'll go to the CD source. I just don't have enough disk space (and backup space) to rip my collection to FLAC.

FYI: FLAC (Free Lossless Audio Codec)

curtis
09-12-2005, 07:15 AM
Great stuff Brad! Thanks!

I also rip everything to MP3(256 CBR) and agree that it is great for daily/casual listening....and the car....I just integrated my iPod with my car stereo.

BradJudy
09-12-2005, 08:14 AM
Thanks.

I actually feel that solo vocals suffer the most with compression. I had wondered a bit about what this 'air' that is often mentioned in audio really is. I found out when I started cutting out the high frequencies on solo vocals as I think they do lose something noticable.

I had hoped to compare some other techniques like ogg or flac, but Audition cannot read those files. I'll poke around and see if there is a plug-in for them. One option might be having a player output to wav (I know winamp can do this) and then read the wav file.

I tend to rip to 192kbps mp3 which sounds fine for work and on my portable player. In this experiment, I could tell a difference between the 128k files and the original, but I think I would be hard pressed to tell the others from the original. Of course, this was via my ER-6s and not my speakers or even my HD-600s and wasn't blind.

metalaaron
09-12-2005, 08:45 AM
thanks brad. i think the file size will add the final piece of the puzzle. i was wondering about ogg. maybe a plugin will popup for you.

tamuct, that must have taken a long time! i have ~ 280 CDs. i'm seriously considering an iPod now, and of course the xbox360 will have streaming capabilities so maybe i should go ahead and start ripping now. i'm tired of windows vista, so it's about time to repartition and change the organization of my HDDs anyways. ah, flashbacks of the old napster/audiograbber days.

maybe the lesson learned is don't compress your overtones. ;)

BradJudy
09-12-2005, 09:03 AM
I found Audition plugins for ogg and FLAC here - http://www.vuplayer.com/other.php

Does anyone know if a particular encoder is preferred by the ogg or flac fans?

metalaaron
09-12-2005, 10:43 AM
cool.

i don't have many colleagues or friends who use FLAC, or rip music for that matter. i'm using flac 1.1.2 via cdex.

BradJudy
09-12-2005, 11:46 AM
I'll probably just use CDex with Ogg and FLAC since I already have that installed. Hopefully I'll get that done and post it tonight or tomorrow night.

tamuct
09-12-2005, 11:54 AM
I've been torn between the various formats to use. From articles I've read, OGG and AC3 both perform better at each bitrate over MP3, but many players don't support OGG or FLAC. I figured that just about anything could play MP3s encoded at 128kbps or better, so I went with that.

I also have lots of CDs (~200) and it did take quite a while. The hard part was finding a free program to rip and encode them. As much as I hate to admit it, I used the built in ripping of Micro$oft Media Player to make MP3s of them. All the other good rippers wanted money (something to do with paying royalties to Fraunhofer) :confused:

BradJudy
09-12-2005, 12:01 PM
tamcut - Take a look at CDex or EAC. I use CDex and it has the LAME encoder built-in (top choice for mp3 encoding). It will handle the ID3 tags, directory/file naming and playlist creation as it builds files. Best of all, it's free. :)

sensibull
09-12-2005, 02:45 PM
Just to throw my hat in the ring...

I also use EAC (http://www.exactaudiocopy.de/) to tag and rip to FLAC (http://flac.sourceforge.net/index.html). Once you have EAC setup, it's a breeze to throw a disc in, start the process, and walk away. And the way I figure it -- hard drives are cheap (and getting cheaper) and once you rip to a lossy codec, you can never get that information back without re-doing all your work. Might as well go lossless from the outset. Beyond the convenience of having a digital archive of your music is the fact that CDs have a very short lifespan -- many of the ones I bought in the late 80s/early 90s are flaking and scratched, making them unplayable on anything but the best transports. Fortunately, my Plextor drive can squeeze blood from a stone.

Lots of guides out there for automating the EAC>FLAC process -- some good ones are here (http://www.hydrogenaudio.org/forums/index.php?showtopic=30959) and here (http://www.saunalahti.fi/cse/EAC/). (The latter refers to other compression schemes, but offers multiple options) I also often use Tag & Rename (http://www.softdepia.com/tag_rename_download_1291.html) to clean up and/or edit the tags. Not free, but highly recommended.

Other fantastic freeware apps include:

Burrrn (http://www.burrrn.net/?page_id=4)
Most EAC>FLAC guides include a step to create a .CUE file which greatly facilitates burning an exact backup copy (with exact gap duplication, lead-ins, etc.). With Burrrn, you basically drag and drop these CUE files and never have to worry about any other settings.

Xlobby (http://www.xlobby.com/)
Great free frontend for your HTPC/Media server. Learning curve is a little steep, but flexibility is unmatched, even by the pricey alternatives.

And here (http://flac.sourceforge.net/links.html) is a list of the growing number of standalone components that support FLAC.

BradJudy
09-12-2005, 07:20 PM
Okay, OGG and FLAC charts are up now.

http://www.bradjudy.com/audioblog/2005/09/12/more-compression-spectrum-analysis/

metalaaron
09-12-2005, 09:10 PM
the difference between OGG 128 & 256 is pretty interesting

nice work brad

appears FLAC vs. WMA is just a matter of preference, and maybe depends on the player you plan to use. i think i'll have to go with WMA simply because that's what i expect the xbox360 to support (http://www.microsoft.com/presspass/press/2005/may05/05-17MCEE32005PR.mspx) in terms of streaming since no supported file types have been released.