Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Music Media

Audio Compression Primer 236

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)."
This discussion has been archived. No new comments can be posted.

Audio Compression Primer

Comments Filter:
  • Is FLAC worth it? (Score:4, Insightful)

    by Megaweapon ( 25185 ) on Thursday January 13, 2005 @02:34PM (#11351495) Homepage
    "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 personally think 256kbps or even 192kbps is good. But it depends on your output (speakers, headphones) and more importantly your ears. Some people don't mind 92kbps while others won't settle for anything less than vinyl (usually people with $30k+ wrapped up in their setups...)

      In short--its entirely up to you!
      • Re:Is FLAC worth it? (Score:3, Interesting)

        by stratjakt ( 596332 )
        Most of us aren't exactly audiophiles.

        I'll go stereo to mono and reencode at 22khz for my tv captures. It sounds the same to me.

        As for mp3s, etc, the only time I ever listen to it in the car, and there's so much ambient noise, it's not worth bothering. Hell, 128k joint stereo sounds like the CD to me, I don't know any better.

        I don't listen to much music anymore. All the bullshit and RIAA and this is legal and blah blah blah, it's all killed music as an artform for me. I used to play guitar in bands,
        • Re:Is FLAC worth it? (Score:3, Interesting)

          by Dogtanian ( 588974 )
          Hell, 128k joint stereo sounds like the CD to me, I don't know any better.

          Really seems to depend on the codec; I can get 128kbps MP3s with notlame that sound really good through moderately decent headphones, but I download other people's 128kbps MP3s and you can hear the artifacts clearly.

          Have they been re-encoded once or more (losing quality), re-encoded from a slower bitrate, or was the encoder that did it just severely crap? Who knows.

          I notice that 192kbps MP3s seem to be more common now than they
          • Well, it all depends on the hardware you are using to listen to your music. MP3 degrades the sound in two different ways:
            1. Artifacts. That is the easiest way to recognise an MP3. Because you can hear them!!!
            2. Frequency decay. This is tricky and you need a lot of attention to hear it. Some frequencies are cut off, that is the whole concept of MP3 compression. Some of them would be audible or perceptible.

            all in all, I'm backing up all my CDs in MP3, 320kbps. I used to do it at 256kbps, but I did a few mont
            • MP3 degrades the sound in two different ways: [...] I brought a CD with 4 audio tracks, all the same, "Dogs" from the album Animals (Pink Floyd) (My emphasis!)

              MP3 degrades the sound in another way; it doesn't do quadraphonic ;-)

              Maybe I'm being stereotypical, but my mental stereotype of a Pink Floyd fan is someone with an expensive hi-fi, obsessed with quality sound. Frankly, I'd expect them to be the target audience for DVD-A and SACD.

              As a genuine question (re: backing up as WAVs; and if you're that
        • I don't listen to much music anymore. All the bullshit and RIAA and this is legal and blah blah blah, it's all killed music as an artform for me. I used to play guitar in bands, and love playing music. It's just dead to me now. White noise.

          You just need to stop letting MTV tell you what to listen to. There is a ton of great music out nowadays - it just isn't on the radio.
      • by Venner ( 59051 ) on Thursday January 13, 2005 @03:46PM (#11352473)
        I personally think 256kbps or even 192kbps is good. But it depends on your output (speakers, headphones) and more importantly your ears. Some people don't mind 92kbps while others won't settle for anything less than vinyl (usually people with $30k+ wrapped up in their setups...)
        I have a decent mid-range receiver & set of speakers*. I had a friend of mine administer a blind listening test on me. I could pick out the FLAC encode vs. the Ogg "higher quality" (I think it was -q7 or -q8) encode about 75% of the time.

        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.
    • Re:Is FLAC worth it? (Score:2, Informative)

      by jasoncc ( 754385 )
      I use FLAC because converting from a lossy format to another lossy format can produce crappy results. If I choose a lossy format for all my audio and then I need the audio to be in some other lossy format, I might be screwed.

      You might choose Ogg for your audio then sometime in the future, a new lossy format sweeps the industry. Your Ogg files might not convert well to the new format.

      and besides...Disk is Cheap!
    • Re:Is FLAC worth it? (Score:4, Interesting)

      by itp ( 6424 ) on Thursday January 13, 2005 @02:50PM (#11351691)
      I keep my entire CD collection on disk as FLAC, and then transcode to the lossy format(s) most useful to me at the time (currently Vorbis to play in my Rio Karma). If I ever need a new format I can go back to the FLAC and reencode without transcoding from another lossy format.
      • Re:Is FLAC worth it? (Score:3, Interesting)

        by pla ( 258480 )
        I keep my entire CD collection on disk as FLAC, and then transcode to the lossy format

        Same here... I began a search last year for a Vorbis CD player, and found that they simply do not exist (I've heard rumors of a few available only in random SouthEast Asian countries, but that doesn't really do me a whole lot of good).

        So rather than either transcode my OGGs to MP3s, or rip my CD collection again (for the third time... Boy did I every choose poorly to pick VQF the first time) to MP3 to keep alongside m
        • Now, I can reencode to MP3 for portable devices. I can reencode to Vorbis for putting on a DVD to take to work or a friend's house (or anywhere I can use a PC to listen to it). I could encode to AAC to listen on an iPod, if I had one.

          iPods play MP3. You don't have to use AAC.
          • Yeah, but why not? You get better quality for the same space (or the same quality in less space). If you've already got the FLAC files, all you've got to do is leave the encoding running overnight - no extra effort from you.
      • I keep my entire CD collection on disk as FLAC, and then transcode to the lossy format(s) most useful to me at the time (currently Vorbis to play in my Rio Karma). If I ever need a new format I can go back to the FLAC and reencode without transcoding from another lossy format.

        That's exactly why I switched to FLAC as well. When you choose a lossy codec, you're locking yourself in to it. With FLAC, I can reencode to anything else with minimal effort and no transcoding loss.

        My flac albums are an average o
      • I agree completely - staying with a lossless format is a no-brainer with the storage available today.

        I think the only real question is, how soon until FLAC becomes pointless because you might as well stick with WAVs? I suppose there will always be benefits to wrapping WAVs inside of another format, which can store things like tags and other such metadata. Also, the coming of better-than-CD audio formats will only increase the want/need for lossless compression.
        • I think the only real question is, how soon until FLAC becomes pointless because you might as well stick with WAVs?

          Never. Debian packages all ship with compressed text documentation even though it probably only saves a few hundred bytes in many cases. The manpages on most Unix systems are gzipped until you actually read them. Compare a 2KB text file with a several-meg .wav - if it's worthwhile to compress the former, then there will be a benefit to compressing the latter for years to come.

      • Hey! Me too! (Score:5, Insightful)

        by Just Some Guy ( 3352 ) <kirk+slashdot@strauser.com> on Thursday January 13, 2005 @06:25PM (#11353859) Homepage Journal
        I do the exact same thing, except that I keep my entire CD collection on CD. If I ever need a new format, I can go back to the CD and reencode without transcoding from another lossy format.

        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.

        • The one advantage to having them on your computer already in lossless format is that you can encode multiple CDs faster than you would be able to sitting there and putting each CD in one after another.
    • 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 10
    • 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.

      Well, I store all my new rips as flac. Disk is cheap, the time it takes to rip all my albums is not. I just encode to ogg for my player, but if I need mp3 (or another bitrate) or something else I can regenerate it without having to rip all over again or do a double-lossy co
      • Re:Is FLAC worth it? (Score:3, Interesting)

        by pavon ( 30274 )
        I was going to do this and then I realized that FLAC only cuts the file size in half, and like you said, disk is cheap. So I just ripped them to WAV, which can read by every encoder ever created on any platform, unlike flac which requires me to install extra software, and possibly go through a seperate step depending on if the encoder for the format of the week supports FLAC.
    • The nice thing about FLAC is you don't have to commit to a lossy codec or particular encoding settings. I can re-encode from the same rip every time a new lossy codec comes out, or if I decide I want more music at lower quality on my portable player, or whatever.

      -Peter
    • 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?

      300GB hard disk = $150.
      Average flac compressed CD =~ 250MB
      That equals 1200 albums stored on $150 of hardware, or 13 cents per CD and it is only getting cheaper.

      The question should really be - for long term storage, is it really worth not going lossless? Remember, you can always convert from flac to your favorite lossy format at whatever bitrate you want, but yo
      • Space to store my music compressed = 300GB
        Space to store my music in FLAC = 1.5TB
        Cost for the extra storage = 600$
        Money that I don't have = 600$

        Seriously... if I had 600$ to blow away, I'd use it to upgrade my lousy 256k/s DSL to ~750k/s for the next 2 1/2 years.

        Besides, who is to say whether you'll have everything that you'll want for the future? What if you decide that you want cd covers and and there's a neat piece of hardware to simplify their creation? What if the future is multichannel sound? Wha
    • Odd this should come up. Last week, I just finished installing Fedora Core 3 on my laptop and saw that it comes with Sound Juicer instead of GRIP. I also noticed that it can rip to Ogg Vorbis, FLAC or uncompressed WAV. I decided to do a quick comparison of file size since I'd never tried FLAC before. I ripped a CD (the first 13 tracks of the Wild Palms soundtrack) and wound up with three directories:

      Ogg Vorbis (192K): 43 Megs
      FLAC: 325 Megs
      Uncompressed WAV: 575 Megs

      I would have to guess that your choic
      • If you just need the absolute purest audio you can get from a CD, then WAV (or some other uncompressed format) is the way to go.

        Except that WAV is no more "pure" than FLAC - that's the beauty of a lossless format :) You can always decode back to WAV from FLAC.
  • by Sanity ( 1431 ) on Thursday January 13, 2005 @02:38PM (#11351548) Homepage Journal
    This article doesn't seem to talk much about ogg at all, unless I am missing something, in fact, it virtually dismisses all lossy algorithms in favour of lossless algorithms which achieve only 50% compression (instead of 90% compression with lossy).

    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 was wondering, did I read the same article as the submitter? Ogg was mentioned... once? Oh, and there was a little gif which said Ogg. Not anywhere near what I'd call "a healthy dosage of ogg".

      But then maybe I just don't know what a healthy dosage might be. Could it be that seeing Ogg mentioned three times in an article could be fatal?

    • Given the topics in the audio section [sudhian.com] (it has an audio section!), the site seems to lean more towards audiophiles.

      I don't agree with the dismissal of lossy algorithms either, but I think it makes sense given the context.
    • Yes, I noticed the article is 3 PAGES LONG! It makes only passing reference to other codecs. Not much of a primer, and it didn't take the entire afternoon to read, it to 5 minutes.

      Did I miss a crucial link or something?
    • From Apple - iPod - Technical Specifications [apple.com]:
      • 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.
  • 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".
    • by aceh0 ( 646013 ) on Thursday January 13, 2005 @02:45PM (#11351632)
      FM Radio is far from CD quality hence there isnt really a need to use very high bitrate MP3s or whatever
      • FM Radio is far from CD quality hence there isnt really a need to use very high bitrate MP3s or whatever

        Or consider this; since FM radio has a limited range of frequencies that come across well, songs that are intended to be widely played on FM radio (e.g. Britney Spear's latest "hit" song) are actually engineered to sound best in those frequencies. With the end result that when you hear Britney Spears on the radio, the track sounds just like it does on the CD.

        Meanwhile, quality music, lovingly mixed ont
    • FM and AM radio transmissions have worse quality than 128 kbit mp3 anyways.

      Just recently I finally heard the difference between a 128 kbit mp3 and the uncompressed version in a blind test. It required good speakers and amplifier. Some instruments in certain frequency bands were definitely quieter and some instruments had their stereo imaging slightly wrong. Some transaural 3-d effects were diminished. It surprised me to hear the difference because I know that my ears have been damaged by playing in loud
    • by katharsis83 ( 581371 ) on Thursday January 13, 2005 @03:15PM (#11352027)
      I second that.

      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,64123 ,pg,1,00.asp.
      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.
      • Just put on a pair of Sennheiser HD580 or HD600 headphones, and you will EASILY hear the difference between 192kbps MP3 and uncompressed audio. And I do mean, easily. Even people who don't know what to listen for hear the difference and run to the store to buy HD580's. :0)
      • The hardware you use to listen is composed of two pieces of equipment: Your speakers and your ears.

        See this other post [slashdot.org], and before you start asking, I encoded with lame, with the r3imx archive CBR profile (at least for the 256kbps track). And this is the second time I do this kind of test with two different people. So there is obviously a difference for him between 256kbps and uncompressed.

        And remember that if average joe cannot tell the difference with his $200 speakers, he will be disappointed when he'l
    • "VBR" 320kbps (Score:3, Informative)

      by silverfuck ( 743326 )

      I know that even large radio stations use 128Kbit sampling frequency.

      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.

      I have switched from 128K to VBR 320K

      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 hav

  • by barryman_5000 ( 805270 ) <barryman5000@gmail.com> on Thursday January 13, 2005 @02:47PM (#11351659)
    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.
  • by demonbug ( 309515 ) on Thursday January 13, 2005 @02:49PM (#11351686) Journal
    Trying to transmit audio data with uncompressed audio or video is not the easiest task. After all, even an audio CD contains data that transmits at 1400kb/s



    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)?

    • 441000hz*16bits*2 channels = 1411200 bits per second, 1400 kb/s

      The 150KB number is for CD-ROM data storage, the gap between the two data rates is for the extra error detection and correction.
      • Err, that would be error codes and positional information.

        There's even a little more room, in the subcode channels where one can hide the data for CD+G (karaoke) or CD-TEXT.
    • 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)?

      Data CDs are 150 KB/s at 1x, but you're missing an important difference between data and audio CDs.

      CD sectors are 2352 bytes (I'm ignoring subchannels here). Data CDs have 2048 data bytes, plus 304 bytes of error-correction data, so every bit comes off perfectly. Audio CDs have no error correction, so they use all 2352 bytes for audio data (on the ass

      • iTunes reports 44.1khz, 16 bit Stereo .wav and .aiff files to be 1411kbps.
        • iTunes reports 44.1khz, 16 bit Stereo .wav and .aiff files to be 1411kbps.

          We're talking about the same number here: 1.41e6 bits/sec. It appears that iTunes is basing their numbers on kilobit=1000 bits. Since I had been comparing to a value based on that 150KB/s number, in which 1KB=1024 bytes, I used 1024 instead, hence 1378.

    • 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)?

      Permit me to be even more pedantic :-)

      150kB is approximately the right speed, but is tweaked for ISO FS overhead. Audio CD's have no file system, and can thus store 746MB of PCM audio per 74 minute CD or 807MB of PCM audio per 80 minute CD.

      The actual rate is 44100Hz * 16 bits * 2 channels = 1 411 200 bits/second.

  • AAC (Score:4, Informative)

    by sometwo ( 53041 ) on Thursday January 13, 2005 @02:49PM (#11351688)
    So what about AAC used by Apple in their music store?

    I did a little googling and found this (http://www.teamcombooks.com/mp3handbook/13.htm [teamcombooks.com]):
    AAC (Advanced Audio Coding) is not a MPEG layer, although it is based on a psycho-acoustic model. Sometimes referred to as MP4, AAC provides significantly better quality at lower bit-rates than MP3. AAC was developed under MPEG-2 and also exists under MPEG-4.


    AAC supports a wider range of sampling rates (from 8 kHz to 96 kHz) and up to 48 audio channels, plus up to 15 auxiliary low frequency enhancement channels and up to 15 embedded data streams. AAC works at bit rates from 8 kbps for mono speech and up to in excess of 320 kbps for high-quality audio. Three profiles of AAC provide varying levels of complexity and scalability.

    AAC software is much more expensive to license than MP3 because the companies that hold related patents decided to keep a tighter reign on it. Most AAC software is geared towards professional applications and secure music distribution systems, so it may be a while before you see AAC in consumer-oriented products.
    • Re:AAC (Score:5, Interesting)

      by Skuto ( 171945 ) on Thursday January 13, 2005 @04:46PM (#11352834) Homepage
      AAC is *much LESS* expensive than MP3. Just compare the licensing costs from Vialicensing (AAC) vs Thomson (MP3).

      The parent is plain wrong. ("Don't believe all you read on the internet, kids")

    • Since this article is mostly about lossless codecs and barely mentions the lossy ones, I don't see it as unusual that it doesn't mention AAC. It doesn't mention MP3 Pro, Real Audio, VQF, or many others, either.

      The interesting information from Apple that it leaves out is about Apple Lossless Encoder. [apple.com] This is built into iTunes, so it's easy to rip to this format on both Macs and PC's. Obviously, it can be played back with iTunes too. It compresses to about 60%. It can be played back on the iPod, and it does

  • Ok, mod me down if I'm clueless, but on the first page: "Compact Discs use a bit depth of 16, allowing for 2 ^ 16 possible levels."

    I always thought CDs were encoded in 12 bit, not 16?

  • by ikewillis ( 586793 ) on Thursday January 13, 2005 @02:56PM (#11351761) Homepage
    I've stopped liking Modified Discrete Cosine Transform-based codecs like Vorbis, MP3(+), etc. even though they (i.e. aoTuV Vorbis) consistently win in low bitrate listening tests among random listeners. Why? Well, unfortunately, I've been listening to audio encoded with this transform for so long that I can't help but hear the distortions they create, namely pre-echo (which is often described as a 'muddiness' or an 'underwater' sound) and distorted treble detail (often described as 'twinkling')

    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.

    • It really depends on what you are recording. For speech recording I see no real benifit for lossless like Flac.
      Things like talking books as such would do very well using Speex. The only problem is I have yet to see a mobil player that supports it.
    • (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.
    • by radish ( 98371 ) on Thursday January 13, 2005 @03:35PM (#11352309) Homepage
      Not wanting to get some award for pedantry, but all music recording is "lossy". If you listen to a CD, you're not hearing the exact same sound you'd here in the studio, those cymbals sound diffrent due to sampling, quantization etc. So when it comes to "lossy compression" causing "artifacts" - it's only creating different artifiacts, there already were some.

      Of course this doesn't go against what you're saying at all, other than calling FLAC "perfect" is wrong. It might be the same as the CD, but that has it's own problems.
    • different encocers produce different output. most people sware by LAME and only with the highest quality settings. I'm sure the faster encoders take shortcuts sacrificing audio quality for encoding speed.

      the future is definately not lossless. why would we go backwards? with cpu's getting faster more emphesis will be put on accurate encoding instead of fast encoding and the distortions will eventually go away
      • the future is definately not lossless.

        Sure it is. Once you hit 192KHz at 24-bit, there isn't a speaker-system on earth that can do any better, and certainly the human at the recieving end can't tell the difference. Since a human can only listen to so much music at a time, when you've got the storage to store everything lossless, why would you bother to compress it, if only to save on encoding time?
        • So you use raw TIFFs for all of your images? We're already far past the point where we need to compress images, yet I've never seen any web page use anything other than jpegs/gifs (and the assorted .bmp.jpeg because someone thought you could convert a file by renaming it, but that doesnt count)

          Just because you have the extra space doesnt mean you should waste it. If you have the space for N lossless objects, and you can compress them at 50% (low compared to mp3/ogg), you free up half the disk.
          • We're already far past the point where we need to compress images, yet I've never seen any web page use anything other than jpegs/gifs (and the assorted .bmp.jpeg because someone thought you could convert a file by renaming it, but that doesnt count)

            No, I don't use TIFFs for my images, but that's because my internet bandwidth is the limiting factor, not my storage space. Since I'm assuming we're talking about legally-ripped MP3s, internet bandwidth doesn't enter into the equation here. What's growing at a
            • "even 20 years from now when 1TB MP3 players are $100 on pricewatch. With that kind of storage, why would you bother compressing the music?"

              Because assuming prices are the same relationally to now, you could compress all of your music and it would fit on a 500gig mp3 player, which would presumably be half as expensive.
  • more algorithms (Score:5, Informative)

    by barik ( 160226 ) on Thursday January 13, 2005 @02:59PM (#11351802) Homepage
    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 [mondo-estremo.com] and The Sounding Object [mondo-estremo.com], 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?
    • Re:more algorithms (Score:3, Informative)

      by Hal-9001 ( 43188 )

      Any other resources that Slashdot readers can recommend for those who are interested in the subject of audio compression and representation?

      • An older but good technical survey of digital audio compression, including MP3, is Davis Yen Pan, "Digital Audio Compression," Digital Technical Journal (Spring 1993). (PDF [iocon.com])
      • Some other technical reference material on MP3 is also available on the Digital Audio Systems website. [iocon.com]
      • A more recent survey of perceptual coding of audio, which covers more recent formats lik
  • I know that everyone says that transcoding loses quality. So when I finally got an iPod, I initially transcoded all of my .ogg files to .mp3, but planned on re-encoding later from the CDs. But when I re-encoded a few tracks with lame, and listened to them versus the transcoded track, I honestly couldn't tell a difference (even with headphones). If I ever notice poor quality on my iPod, I guess I'll re-encode then, but otherwise why bother?

    I believe that I used the default settings for both oggenc and lame,
    • Because not everyone is using $5 earphones to listen to stuff. Yes transcoding loses quality, no it's not much, yes you can tell with the right equipment. If you're just listening on an ipod with stock earbuds, don't do anything over 128kbps, you can't tell the difference. If you upgrade to decent phones (ala Shure E3) or a real hifi, then it's a different story.
    • Transcoding does lose quality, but probably not as much as the inherent quality drop between 128kbps ogg to 128kbps mp3, so you probably couldn't tell the difference between the transcoded mp3 and the first generation encoding.
  • This article is already outdated. :) His discussion of lossless formats excludes the iTunes Apple Lossless encoder, which is supported by iPod. From their websites Import Music page:

    Weapon of Choice

    "However, you can choose to use different audio formats for any track that you import from CD. iTunes lets you convert your music to MP3s at high bit-rate for no additional charge. Using AAC or MP3, you can store more than 100 songs in the same amount of space as a single CD. Discerning customers and audioph
  • by wowbagger ( 69688 ) on Thursday January 13, 2005 @03:36PM (#11352338) Homepage Journal
    According to the "Nyquist Theorem," you need to have twice as many digital samples as the frequency of the analog signal you are trying to represent to have enough data to accurately build it.


    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).
  • Um, no. 20/20K is more accurate, and we lose a kHz every 5-10 years as we get older.
  • by bigberk ( 547360 ) <bigberk@users.pc9.org> on Thursday January 13, 2005 @03:51PM (#11352509)
    (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 [foobar2000.org] 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.
  • It's interesting how hot people can get over this subject. People who can hear artifacts in lower-bitrate mp3s accuse the non-hearers of being audio philistines. People who can't hear those artifacts (or aren't bothered by them) accuse the hearers of being snobs. Others have pointed out that perception of artifacts may vary based on listening equipment (iPod headphones vs. high-range speakers vs. computer-gaming rig). The following additional reasons for differing perceptions, IMO, also should not be ov
  • Many other posters have discussed the scant coverage of lossy encoding.

    There is a distinction between Ogg and Vorbis that is lost in the summary (and much of the discussion). Ogg is a container format which can hold many other kinds of data (video like Theora, audio like Vorbis, and lyrics in a format which is being worked on, just to name a few) including combinations of data encoded with various codecs. So the lossy encoding in question is Vorbis, not Ogg.

    Just because a program can understand the cont
  • Musepack? (Score:2, Flamebait)

    by delus10n0 ( 524126 )
    What about musepack? It seems like this codec is constantly passed up; yet in my own testing, and double-blind testing with friends and family, they chose the MPC files 80% of the time over OGG and MP3.

    Also, if you do a frequency analysis of the raw input compared to MPC's --standard setting output, there's very little difference, where as MP3/etc. will do a "round" or "drop off" after a certain frequency, usually 16-20kHz.

    Anyways, hydrogenaudio.org is a great site for information about all this stuff..
  • it's also a polemic against lossy compression which is not appreciated.

I judge a religion as being good or bad based on whether its adherents become better people as a result of practicing it. - Joe Mullally, computer salesman

Working...