Effects of Compression

ngsm13

BSEE
Sep 5, 2002
41,528
247
Cincinnati, OH
Trying to redo this thread since JMAC deleted all his posts...

 

COPIED from the WHAT.CD Wiki Tutorials:

 

What is a transcode?

Wikipedia says that "Transcoding is the direct digital-to-digital conversion from one (usually lossy) codec to another." A transcode is any conversion of format.

Why is lossy transcoding bad?

Whenever you encode a file to a lossy format (such as mp3, m4a(AAC), ogg, or mpc) information is permanently lost. It doesn't matter what you do, it's impossible to get this information back without making a new rip from the original lossless source. If you re-encode it to a different format or bitrate, you are reducing the quality. This applies to any lossy to lossy conversion, so even if you convert from 320kbps to 192kbps, the final file will still sound worse than if you had just ripped to 192kbps in the first place.

It's also important to remember to verify that lossless rips actually came from an original source. People that download lossless expect it to be identical to the original. There's no point in people downloading a bigger file just to get another lossy rip.

So how do I verify that my music isn't a transcode?

The simplest way is to rip and encode it from the original source yourself. That way, you know that there has been only one lossy step (or that the rip is truly lossless, if you decided to do a lossless rip).

You should also check it by using a wave editor (such as Adobe Audition) to look at the spectral frequency display.

What is the difference between FhG and LAME?

Most lossy encoders use a low-pass filter when encoding. The filter is set to cut frequencies above a certain point and leave those below. The reason they're doing it is, that high frequencies are more difficult to encode and hearing is less sensitive in higher frequencies. MP3 encoders at 128kbps will typically use a LPF at 16kHz. As you raise the bitrate, the frequency threshold raises. At 192kbps the LPF is usually set at 18kHz or higher.

How can I view the Spectral Analysis of songs using Adobe Audition?

To view the spectral analysis of audio files in Adobe Audition, first ensure you are in Edit Waveform View by pressing the number 8 on your keyboard. Then, go to File > Open and select the file you wish to test. Adobe Audition will open the audio file in the "Waveform View" by default each time, so you'll need to choose View > Spectral View or press F9 to switch to Spectral View.

Common Bitrate Comparisons

The following section contains a list of common bitrates and their audio spectrum. The LAME were all done using dbpoweramp from a flac source, and they are all encoded using LAME version 3.97. The FhG were all done using Adobe Audition 1.5 FhG. The shape of the screen-shots differ due to different screen resolutions.

Original (FLAC):



128 LAME:



160 LAME:



160 FhG:



192 LAME:



192 FhG:



V2 (preset standard, aka aps):



224 LAME:



224 FhG:



256 LAME:



wrwekjl

 

ngsm13

BSEE
Sep 5, 2002
41,528
247
Cincinnati, OH
Continued...

256 FhG:



320 LAME:



320 FhG:



V0 (preset extreme, aka apx):



Typical Webrip: (notice the gap)



Analysis

As you can see, LAME uses 'full resolution' up to the frequency threshold, whereas FhG, encodes at 'full resolution' up to 16kHz, and uses 'low resolution' at higher frequencies. This is an easy way to tell which encoder was used. At 128kbps, LAME uses a LPF at ~17kHz and FhG at ~16kHz. I have included a screenshot of FhG at 128kbps without the LPF. At 160kbps FhG's LPF is set at 20kHz. At 192kbps, LAME stops at 19kHz and FhG encodes upto 22kHz.

FhG looks like it's not doing its job right, but if you listen to the 192kbps samples, you can hardly tell which is LAME and which is FhG. At 128kbps, LAME sounds a bit better, more 'clear'. FhG encoding at 128kbps without the LPF sounds bad, you can certainly listen to the artifacts.

LAME APS will typically use a LPF at 18.5kHz, whereas APX will go up to 19kHz.

 

ngsm13

BSEE
Sep 5, 2002
41,528
247
Cincinnati, OH
How to view the Spectral Analysis of songs using Adobe Audition

To view the spectral analysis of audio files in Adobe Audition, first ensure you are in Edit Waveform View by pressing the number 8 on your keyboard. Then, go to File > Open and select the file you wish to test. Adobe Audition will open the audio file in the "Waveform View" by default each time, so you'll need to choose View > Spectral View or press F9 to switch to Spectral View.

I've seen a lot of discussion here about how to spot transcodes. Many people have suggested using a spectral analysis from programs like Cool Edit / Adobe Audition / EAC and looking at the 'cut off' point. There is some disagreement about how effective this is, but those who recommend it suggest looking for cut-offs between 1600 Khz as the signature of a 128kbps mp3 source and 2100 Khz as the signature of Lossless.

One counter argument to this 'cut off' level method is that the same cut off which characterises lossy encodes may also be the result of a poor quality recording - a bootleg of a live show or a 'third world' vinyl master.

A number of spectral views have been posted and linked to, but nearly all of these have been analyses of entire tracks... which IMHO is NOT the most effective way to use spectral analysis to detect transcodes.

What I haven't seen anyone discuss is the 'blocky' appearance of the spectral analysis of lossy rips which is noticeable only when you zoom in close enough. IMHO this is a more reliable way to detect whether a file which purports to be lossless has in fact been transcoded from a lossy rip, and may even be a useful way to detect re-encodes from lower to higher bitrate mp3s (although this is much harder whatever method you use).

The image below illustrates what I mean. The track (from an album by Philip Glass) was ripped from CD to flac and a 1 second sample was saved to 320 kbps LAME mp3 and 128 kbps FhG mp3 and then in each case saved again to flac. The spectral analysis was done at full screen on a monitor with resolution of 1280 x 1024. Each of the three strips below is of the same 0.15 of a second.

FLAC / 320 mp3 / 128 mp3 compared



And here are bigger strips of the three spectral analyses. The zoom level is the same - bigger simply means that what is shown here is around 0.5 of a second - and NOT the whole track!

FLAC



320Kbps LAME mp3



128Kbps FhG mp3



Credits

Adopted from the tutorial by brigetd: forums.php?action=viewthread&threadid=1200

 

ThatDude

Bruce LeeRoy
Mar 26, 2005
93
0
Florida
Really though, anything above 192 kbps I think sounds just fine. I'm pretty sure most you guys can't tell the difference between them to. Nice data.

 

tRiGgEr

CarAudio.com Veteran
Jan 27, 2004
13,390
78
San Diego, Ca
I went and bought the Tool cd's to compare to all of my 192k files. No audible difference was detected by my ears.

Jmac, can you please explain what diminishes in quality are caused by the compression. Like the drop of frequency above 12k-16k...

 

hellomota

Banned
Oct 12, 2004
333
0
Chicago burbs, IL
Question when you burn CD from mp3, will it change the bit rate back to 1411kb/s, or will it just make, lets say, 192kb/s mp3 larger for CD players to recognize them?

 

thch

MSEE, Design Engineer
Jul 16, 2005
686
4
SIUE
hmm. why are there differences between the original and the lossless compression. lossless compression should give exact results, anyone disagreeing should look at the proliferation of ZIP, ARJ, BZIP, ect... files out there.

 

bri487

Banned
Feb 2, 2003
7,562
8
birth canal
hmm. why are there differences between the original and the lossless compression. lossless compression should give exact results, anyone disagreeing should look at the proliferation of ZIP, ARJ, BZIP, ect... files out there.
the guy who does the tech article in car audio and electronics did a good job explaining that in this months issue. maybe check that out.

 

JLee1469

Junior Member
Sep 12, 2005
20
0
Chicago, IL
I remember back in the Napster days when most songs out there were ripped @ 128 kb... especially in rock music the sound is clearly awful!

Reading up on many msg boards... it seems VBR (Variable Bit Rate) is the way to go to compress music.

 

IamDeMan

Banned
Nov 5, 2004
22,694
88
/dev/null
Anyone still think MP3s sound just as good as CDs??
At 50MPH with windows down, yes. It isn't the format I use at home to listen to music, but in the car, MP3 makes a very nice compromise in convenience/SQ. I rip my MP3s for the car in VB mode 192-256.
 

adam71

P9 = Ultimate SQ
Jul 11, 2003
6,683
13
Michigan
At 50MPH with windows down, yes. It isn't the format I use at home to listen to music, but in the car, MP3 makes a very nice compromise in convenience/SQ. I rip my MP3s for the car in VB mode 192-256.
In that respect I can see where you may not hear a difference. In a quiet environment the difference is night and day. Especially if you were to compare it to vinyl, DVD-Audio or SACD but CD-Audio is a big enough difference for me.

 

ngsm13

BSEE
Sep 5, 2002
41,528
247
Cincinnati, OH
At 50MPH with windows down, yes. It isn't the format I use at home to listen to music, but in the car, MP3 makes a very nice compromise in convenience/SQ. I rip my MP3s for the car in VB mode 192-256.
Agreed.

NG

 

thch

MSEE, Design Engineer
Jul 16, 2005
686
4
SIUE
would it be possible to redo the graphs with log spacing of frequency? and possible give differnecs between the original and compressed (image subtraction).

While the linear spacing does show harmonics very well (the rows of lines), it also favors HF over LF. most of the detail shows up in a very small part of the pics. compression typically favors LF over HF.