Audio Compression Primer
Hack Jandy writes "For those of you with a little extra time this afternoon, check out Sudhian's primer to all things concerning audio compression. The article details everything from DRM to CRC matrixes (with a healthy dosage of Ogg)."
"FLAC is the Linux users lossless audio codec of choice"
Unless your doing some form of audio editing or "production" recording, is lossless really worth the extra size compared to a 192kbps Ogg or MP3? I usually have more problems with static from the stupid 3.5mm jack than a lossy format.
I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
Each to their own, but I am more than satisfied with oggs or mp3s encoded at a reasonable bitrate - I think the popularity of hardware such as iPods suggest that most other people are too.
I know that even large radio stations use 128Kbit sampling frequency. I have heard musicians saying they cannot distinguish the difference between the audio sound played by CD and MP3 with 128Kbit encoding. I have switched from 128K to VBR 320K but just because "that is a good style".
MySQL Error 1040: Can't return sig, Too many connections!
More ranting.
And what the fuck is this? The sampling rate of the sound has absolutely nothing to do with "rounding errors". There is rounding only within the sample itself, as it is quantized to an x-bit value.
This guy should take a math class.
Not very informative for slashdot ppl. I think we should have had an article more about code or something. I think most slashdotters understand codecs and the differences in lossless and lossy compressions. Waste of 15 minutes.
Shouldn't that be 1200 kb/s? 150 KB/s * 8 = 1200 kb/s, right? Or is the 150 KB/s figure I'm using incorrect (I could have sworn that was the 1x CD speed)?
I did a little googling and found this (http://www.teamcombooks.com/mp3handbook/13.htm):
Because the code is open source, FLAC will be around forever and available on whatever OS/Platform you want to use it on if you feel like compiling the software.
Another reason it's going to be around and much more prevalent as time goes on is that the compression is so good and the speed/resource usage figures are so attractive. When I rip CD's to FLAC I am limited to 40x by my burner (CPU utilization is around 20-25%). When I rip the same CD to ogg, I top out under 30X because the processor has reached 100% utilization.
Fast. Free. Efficient. Frugal with the CPU. What else do you need?
Call me crazy, but I insist that there are certain 'killer' tracks where I can hear this distortion even at higher bitrates in advanced MDCT codecs like Vorbis, namely Led Zeppelin / Rock and Roll whose drumline consists of a ridiculous number of cymbal crashes in rapid succession.
The way I see it, the future is lossless. With hard drives burgeoning to over 500GB and Fiber-to-the-Home becoming a reality within the near future, why bother saving a little extra space at the cost of degraded quality, which, the more you listen to audio compressed with a certain transform, the more likely you are to hear distortions? I think in the future we'll see a greater trend towards lossless audio compression with codes like FLAC and its ilk.
While the article is a primer, I was a little disappointed in the algorithmic treatment given in the article itself. Right now I know of two excellent free publications: Introduction to Sound Processing and The Sounding Object, which both treat the theoretical, DSP side of things. Any other resources that Slashdot readers can recommend for those who are interested in the subject of audio compression and representation?
Titus Barik
If it's lossless, you should be able to take digital file A, compress it into compressed file B, and then if you uncompress B to get A', then A' = A.
That is, the checksums for A and A' should match, etc.
That's how I define mathematically lossless.
Whatever this asshat is on about double blind and testing and all that, has more to do with the ability of his FLAC playing equipment to sound the same as his CD player, which is a whole 'nother ball of wax altogether.
I don't need no instructions to know how to rock!!!!
I second that.
3 ,pg,1,00.asp.
:
On repeated double-blind tests on very expensive equipment, even audiophiles are unable to distinguish between CD quality and LAME encoded 192 kbps MP3 files. Those who say they are able to aren't using double-blind tests or have super-human mutant ears. If you go check over at Hydrogen-Audio (where audiophiles and people who care far too much about LAME settings hang out), most of the forum posts indicate that anything above 192 kbps is transparent even to their equipment, which is pretty above average.
On regular equipment, PC World did a small test a while ago on standard equipment: http://www.pcworld.com/reviews/article/0,aid,6412
Their results found that ~192 kbps is pretty much transparent as well.
mp3-tech.org also has a listening test availible. On their run, they found 192 CBR kbps to be nearly transparent (*feels* different, but don't know why), and 256 kbps CBR to be completely transparent (can't tell compressed from source CD).
"The listening equipment is the following
* Teac VRDS 25 CD reader
* MIT T2 cables
* Yamaha AX 1050 amplifier
* Denon PMA 960 amplifier (for frequencies 50Hz)
* Celestion speakers"
This test was also done a while ago on an older mp3 compression program( c. 1998), so current LAME encoding probably allows for complete transparency at 192kbps or so.
(Mod to -3, nitpicking)
The MDCT in itself is actually lossless. Any distortion you notice is most likely introduced by the quantization applied post MDCT during compression.
"There is no dark side of the moon really. Matter of fact it's all dark."
WRONG!
Nyquist's criterion is "You must have at least twice as many samples as the largest BANDWIDTH of the signal in order to correctly reconstruct it."
You can take a 10.7 MHz signal, and sample it at 10000 samples per second, and correctly reconstruct it, so long as the signal is guaranteed to be bandwidth limited to 10.7 MHz +/- 2.5 kHz. This is often done in software defined radio to aquire the signal from the intermediate frequency (IF) of the analog front end.
You also have to have an appropriate reconstruction filter at the output of the system in order to correctly recover the signal - if you don't have the right reconstruction filter, you will NOT reconstruct the signal correctly.
You also have to take into account the effects of any signal modulation - take a 20 kHz sine wave, and burst it for 10 msec, and you widen the bandwidth of the signal by about 100 Hz (depending upon the exact shape of the burst - a perfect square burst will widen the signal as a sinc function and will, in effect, increase the bandwidth to infinity, which is why square bursts are generally Considered Harmful in communications work).
Also, you don't oversample a signal in time to account for "rounding errors" - you oversample in time because the frequency response of sampling a system in time introduces a sinc response in frequency - by moving the sampling rate up you reduce the impact of this response on the recovered signal's frequency response. You also greately ease the requirements on the reconstruction filter - the filter can be wider (have fewer poles in the transfer function - thus fewer parts needed).
www.eFax.com are spammers
Um, no. 20/20K is more accurate, and we lose a kHz every 5-10 years as we get older.
Most of the time I am content with a good Ogg encode (I mean, hell, I'd never have heard the difference if the samples weren't played back to back!) I generally only use FLAC for a) my favorite albums and b) classical music. Size wouldn't be an issue... but for the fact that I keep an oft-updated mirror of the data on a second computer. As drive space is become rather inexpensive, I forsee a time when lossless will be the way to go, except for portables.
*Ascend Acoustics CBM-300 stereo pair, HSU sub, and a HK AVR-325 receiver.
A preposition is a terrible thing to end a sentence with.
(As an Engineer who has thoroughly studied ADC/DAC) I would say that the article presents a very good background on the issues of sampling and reconstruction of audio.
However, the rest of the article is approached from the heavily biased opinion point of an "audiophile", which the majority of the population is not. These audio experts have fantastic equipment and a keen sense of hearing, allowing them to distinguish between the subtle difference between high fidelity recording and playback. Such people like software like foobar2000 and care a lot about dynamic range, and for the most part think that lossy encoding is a shame. This is a bit about being picky, and a bit about showing off, but either way it's a minority viewpoint.
But such people are by far the minority of the public. Most of us don't get caught up in the subtle details of audio recording and playback, partially because we don't care, and partially because we don't have the fine equipment (electronics and human ear) to notice such things. So the article for instance completely dismisses lossy encoding, even though this is by far the most exciting frontier of modern audio compression. You can get 64 kbps (ogg vorbis) or 32 kbps (aac) streams that sound amazing to most people, as good as FM radio.
As an Engineer that is what I find exciting, because we can transport "essentially the same" amount of media in far, far less bandwidth than it required a decade ago. And the efficiency is improving all the time, ditto for video.
- Audio formats supported: AAC (16 to 320 Kbps), MP3 (32 to 320 Kbps), MP3 VBR, Audible, AIFF, Apple Lossless and WAV
- Upgradable firmware enables support for future audio formats
The second bullet leaving the possibility there, but the page lists it as currently (meaning iPod users now, popularity etc) not supporting it.For context, click Parent.
Sampling frequency would typically be 44.1KHz, bitrate would be 128kbps. Also, FM radio quality (with good reception) compares to about 96kbps well-encoded mp3, so there's not much point in them recording higher except for archival purposes.
You should be using LAME to encode, and LAME only goes up to 320kbps (blade for instance goes up to 384kbps, but is much lower quality), ergo you can only have 320kbps CBR, not VBR.
And to everybody else out there who complains about background noise, you should be extracting digitally from the CD!
flac doesn't seem to have come far enough yet for me (500+ albums is a lot of diskspace if it's around 300MB/album), but to my ears on my equipment (Klipsch £250 (pound sterling if that doesn't come out) speakers, cheapo SB Audigy2 soundcard), lame --preset standard (around 200kbps VBR) sounds damn near perceptual transparency.
You know you've been IMing too long when you almost say 'lol' out loud to a non-geeky friend...
I had a Vorbis listening party this past Summer at my home.
But no one came.
I've got about 350GB of lossless audio goodness in a set of nice oak bookshelves built into my wall. Considering that the time it takes to get up, get a CD, rip it, and encode it is not much longer than it takes to locate a FLACed album on my fileserver and encode it - that is, the encoding stage is several times longer than the "get up and rip the first track before starting to encode" phase - I think I'll stick with my current system.
Dewey, what part of this looks like authorities should be involved?