Lossless & Lossy Encoded Audio With Compression

This post is going to mention many different topics that I plan to have individual posts on later. This discussion opens doors to other discussions that I feel deserve their own dedicated posts. In efforts to stay on topic for this post I plan to come back and link specific words to posts. I am doing this because I have to lightly discuss those topics to paint a clear picture of what I’m discussing. So lets start.

Lossless Audio and encoded audio. Why does this even matter? Well, maybe it doesn’t to you. Some people are perfectly fine double clicking an audio file and hearing a song. That’s great. Entertainment through simplicity is something I sometimes wish would satisfy me. Once you research and begin to understand how sound files really work it’s hard to accept simplicity. There are days I wish I didn’t know this information. Sometimes I want to erase what I know from my mind to avoid the distractions from the pleasure of just enjoying music. 20% of the time I can, but with the type of guy I am, if I know I can make something better. Why not do it or at least try. I found a great seminar one time on YouTube that discusses how the only way to listen to audio is by having someone else push play. As soon as the mind knows the source the end result is skewed. Think Wizard of Oz here. I say this because if you continue reading, realize you cannot go back. You will understand differences and your listening will be changed forever. Please hit back on your browser now.

Ok you have decided to move forward. You were warned. Before I jump to the topic I want to briefly discuss a few things. There are multiple moving parts when it comes to listening to audio. Here is an extremely simple flow:

File on iPhone –> play is pushed –> speakers make noise.

There is SO much more involved in what made the above possible. I’m talking multiple, multiple layers. There are some layers we can control ourselves and some layers beyond our control. It truly makes hearing audio an individually multi-layered unique experience each and every time. You can take this all the way to the point of creation. Here is a beginning flow that is at a microscopic level.

Human forms idea, 1 of a million guitars is chosen, 1 of a million brands of strings is strung, 1 of a million cables is chosen, 1 of a million amps is used, that has speakers from 1 of a million brands, that is then recorded by a microphone from 1 of a million different brands, that is then recorded and produced by 1 of a million different producers, that is then….I think you get the picture. At EVERY single step from creation to reproduction there are ways to make changes that effect the end result. So to move forward and summarize, a song is created and recorded. 🙂 Now lets look at the playback chain. You have to understand that the same is true for playback as is for recording. A file, a playback program, through a cable (or wireless), to a receiver or headunit, to be amplified, and is then reproduced by either crappy speakers or headphones, or high quality speakers or headphones. Every piece of equipment along this path effects the end result just like during creation. I mention all of the above before talking about lossless and lossy encoding because you could have an lossless file, but that does not guarantee you will hear a lossless sound. If you don’t have the equipment to make a sonic difference, lossless files will gain you nothing. Understand cause and effect from beginning to end. So note that, just because your equipment does not allow you to hear a difference in sound. It does not mean the difference is not there. If I can control a step in a 50 step process I’m going to make that one step the best I can. I always try to subtract weak links from any process. Thus, I will try and have lossless files when I can.

Ok, now for what this post is really about you also have to understand compression. Compression at a base level is simply reduction. A reduction of what you ask? Well a compression algorithm is used to shrink a file while trying to maintain quality. This is done by trimming frequencies and adjusting playback levels dynamically. Why do this in the first place? Well, transmission started a lot of it for radio broadcasts. As music became portable and stored on computers/ipods it was already known that a smaller file size the better for storage. This smaller file size has a snowball effect and why it is the standard. So lets say a CD is our starting point. It is the source media in the highest possible format. There is some form of compression that has already occurred but to provide a starting point lets say, and most do, a CD is a raw file. You want to copy this to your computer. You load up iTunes and tell it to add to your library. This is where encoders come into play. iTunes has encoders that it will use to take the source and create a file on disk. You can change your encoder in iTunes like such:

Encoder Settings

The iTunes default encoder is ACC that has a bitrate of 256kbps. The CD’s source song bitrate is around 1411kbps. This typically results in a 26mb file being compressed and encoded down to a 6mb file. If you hit play on both files most people will not notice a difference. When the file was encoded there were multiple things done to the audio. Take this example; 30 seconds of uncompressed silence that is encoded with a lossless encoder will match the size of the source. While 30 seconds of uncompressed silence encoded with a lossy format will be almost nothing in size. A compression encoder knows that is no reason to replay silence so the data is excluded. Encoding relays heavily on psychoacoustics to determine what data can be dropped or shortened on top of compression and data deduplication. The human ear can only perceived certain frequencies so those frequencies out of range get dropped. If you think about two guitars playing the same chord at the same time they are fighting each other in the same frequency range. Instead of a lossless file playing back the full contents a lossy encoder will determine the loudest and longest while slightly reducing the other. These are high level examples of what is actually occurring. There is a lot of frequency trimming and data deduplication occurring during the encoding. When a source replays an encoded file the information is decoded, aka expanded and played back. A good encoder will do a good job of dropping silence, trimming frequencies, matching up data throughout a song and only storing one copy, then compressing the entire file. The 2nd part of the encoder is also being good a decoding. That would be the process of reversing the encode in real time during playback.

So what do we take away from this. Lossy encoding modifies the source in some way. Lossless, regardless of what your system can reproduce, is the best possible option for replaying audio to mimic the source. For me personally, knowing that is enough to use lossless encoders when and where I can. The best way to use a lossless encoder is during the initial copying of a CD. You cannot take a lossy file and convert it to lossless. Once the file is encoded the data is lost for good. You must use the source to create lossless file. It will be my dream the day iTunes allows match to sync with lossless files for download. I cannot wait for that day to come. I do plan to have another post dedicated for audio playback, but since we are on the topic of encoding, lossless, and lossy, why not understand bitrates. Here is a list of the major players and there playback bitrate levels. Remember CD quality is 1411kbps and anything lower has lost quality. If this is the first time you are seeing these numbers I think the results may surprise you. That favorite band you have that you downloaded from iTunes…go purchase a CD in store and have a listen. You may be surprised.:

CD: 1411kbps
Google Music: Up to 320kbps but will decrease depending on bandwidth
iTunes Downloads: 256kbps ACC+
iTunes Radio Streaming Mobile:80kbps
iTunes Radio Streaming Wifi/LTE: 128-160kbps
iTunes Radio Streaming PC: 256kbps
Spotify Streaming Free Mobile: 96kbps (high quality is 160 kbps)
Spotify Streaming Free Web: 160kbps
Spotify Streaming Premium: 320 web and 320 on mobile when set to extreme.
Pandora Streaming Free Web: 64kbps AAC+
Pandora Streaming Paid Web: 192kbps *devices can vary*
FM Radio: What they consider CD-quality (100 kbit/s), FM-quality (25-50 kbit/s), AM-quality (12 kbit/s), or Talk-quality (5 kbit/s) channels. Alternatively, they could broadcast one single channel at 300 kbit/s.
HD Radio: up to 300kbps, but most broadcast around 70kbps.
XM and Sirius Radio: 16-39kbps over satellite and 128kbps for subscription web.

Austin

Leave a comment