digital generation loss in mp3s

This is a discussion on digital generation loss in mp3s within the General Discussions forums, part of the Community Boards category; My intuition says that if I were to burn an mp3 to a cd, rip it, burn it, rip it, ...

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738

    digital generation loss in mp3s

    My intuition says that if I were to burn an mp3 to a cd, rip it, burn it, rip it, burn it, etc. etc. etc. several times, an mp3 would suffer from digital generation loss as JPEG images do with multiple edits.

    Is my intuition correct? I've never heard of digital generation loss in mp3s, but I just started thinking about it a couple minutes ago and it seems like it would happen.
    My Website

    "Circular logic is good because it is."

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    MP3 is a lossy compression, so it will lose something. Will it lose something every time you recompress it? That depends on the psycho-acoustic analysis of the specific compressor, but it's very likely.

    There's no need to waste a lot of CDs, though. Just convert a few thousand times between MP3 and raw WAV.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,453
    The only sad thing about it though, is that you don't get that old vinil sound.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #4
    Registered User
    Join Date
    Aug 2009
    Posts
    19
    >Will it lose something every time you recompress it?
    Absolutely. You don't need to be an audiophile to recognize that an audio clip has been transcoded between lossy codecs multiple times. It sounds horrible. Lossy audio codecs are ONLY supposed to be used once. After that the only acceptable transcode is to a lossless format, such as WAV or FLAC.

    >The only sad thing about it though, is that you don't get that old vinil sound.
    The problem with the Red Book audio CDs found in mainstream use today is that they simply don't support a great enough range of frequencies (they only go up to 20 khz). Your human ear can only hear up to ~20 khz, but for some unknown reason higher frequencies enhance the quality of the audio, which is evident in an analog medium such as vinyl. However, there are formats that can hold much better audio resolution -- 24 bit audio files, which can go up to as much as 50 khz. It's the recommended format if you're copying vinyls to digital, and you can even burn them at that quality as an audio disc if you have an SACD burner.

    Oh well, with the current trend of "hip" teenagers using iPods with their included crappy headphones, music encoded into low bitrate mp3s, quality couldn't mean less to the younger generation.

  5. #5
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    Quote Originally Posted by ctrl_freak View Post
    >Will it lose something every time you recompress it?
    Absolutely. You don't need to be an audiophile to recognize that an audio clip has been transcoded between lossy codecs multiple times. It sounds horrible. Lossy audio codecs are ONLY supposed to be used once. After that the only acceptable transcode is to a lossless format, such as WAV or FLAC.
    Even lossy compressions can have stationary points. I doubt that repeated coding/decoding in MP3 or any other format would ever reduce the recording to complete noise. Therefore there must be some point where the encoding becomes stable. This may be a point of very poor quality, however.

    To use an analogy with JPEG, it is a reasonable assumption that the de-quantized DCT coefficients should quantize back to the same values if compressed multiple times. But this is simple enough to test for yourself, so don't take my word for it.

    If multiple codecs are involved in your coding/decoding loop, the story is different. Each quantization/de-quantization cycle will use somewhat different quantization levels, and these might operate on each other to eventually reduce the signal completely to noise. Again, this is easy enough to try for yourself.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  6. #6
    Registered User
    Join Date
    Aug 2009
    Posts
    19
    Quote Originally Posted by brewbuck View Post
    Even lossy compressions can have stationary points. I doubt that repeated coding/decoding in MP3 or any other format would ever reduce the recording to complete noise. Therefore there must be some point where the encoding becomes stable. This may be a point of very poor quality, however.
    Well, I just tried running LAME 3.98.2 through an MP3 500 times, (using 32 kb/s CBR) and it was reduced to complete noise. I ran a diff between the last two output files produced, and they weren't the same. Now, this is by no means scientific; actual results could vary depending on the encoder and bitrate settings used (for example, VBR), but I think it's safe to say that in virtually any scenario a lossy audio transcode reduces the quality of a file.

    If you've ever looked at an audio file with a spectral analyzer, you can see how it deforms after a few transcodes.

    Original audio file

    V2 mp3 (standard VBR quality)

    transcode
    Last edited by ctrl_freak; 08-28-2009 at 08:08 PM.

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by ctrl_freak View Post
    >The only sad thing about it though, is that you don't get that old vinil sound.
    The problem with the Red Book audio CDs found in mainstream use today is that they simply don't support a great enough range of frequencies (they only go up to 20 khz). Your human ear can only hear up to ~20 khz, but for some unknown reason higher frequencies enhance the quality of the audio, which is evident in an analog medium such as vinyl. However, there are formats that can hold much better audio resolution -- 24 bit audio files, which can go up to as much as 50 khz. It's the recommended format if you're copying vinyls to digital, and you can even burn them at that quality as an audio disc if you have an SACD burner.
    Redbook does not support high resolution audio at 20KHz. Thats the highest frequency it can reproduce, the true dynamic range is limited to around 0-8KHz.

    Nyquist frequency - Wikipedia, the free encyclopedia

    typically, professional audio recordings are done at 192k samples per second to fully capture the high frequencies.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vista core audio apis for playing mp3s
    By elmutt in forum Windows Programming
    Replies: 0
    Last Post: 06-03-2008, 04:12 PM
  2. Digital Tour in Flash
    By GanglyLamb in forum Tech Board
    Replies: 3
    Last Post: 03-01-2005, 10:58 AM
  3. Guaranteed weight loss
    By Glirk Dient in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 05-12-2004, 06:11 AM
  4. Configurations give different results
    By Hubas in forum Windows Programming
    Replies: 2
    Last Post: 04-11-2003, 11:43 AM
  5. Wav file to digital value conversion
    By RpiMatty in forum C++ Programming
    Replies: 1
    Last Post: 12-23-2001, 05:42 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21