Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Effects of lossy transcoding (Read 6716 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Effects of lossy transcoding

Pretty much every time you see someone explain how to defeat Fairplay's copy protection with "Oh just burn it to an audio CD and rip it back" you'll invariably see a huge collection of replies of replies with people telling them not to as it degrades quality. And rightly so, however i was fastincated just to see how badly it actually does mangle the sound.

I decided to make the effects more pronounced by using lame's output as the input of the next pass and doing this a few times to see how the quality goes.

I present to you: the first 30 seconds of Supertramp's Breakfast in America.

Apple Lossless: breakfast.m4a
1st Gen MP3: not included, make it from lossless if you want.
2nd Gen MP3: breakfast2.mp3 - this one is to simulate what something from itunes -> cdda -> mp3 might sound like.
8th Gen MP3: breakfast8.mp3

I used LAME 3.97b2 with -V2 --vbr-new. I have to say that the results are not quite as bad as I expected.

I have included the LAME bitrate graphs of the 2nd and 8th encoding in case anyone wants to compare stats.

2nd Gen:
Code: [Select]
LAME 3.97 (beta 2, Jan 20 2006) 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
Encoding breakfast1.mp3 to breakfast2.mp3
Encoding as 44.1 kHz VBR(q=2) j-stereo MPEG-1 Layer III (ca. 7.3x) qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  2292/2292  (100%)|    0:11/    0:11|    0:16/    0:16|   5.2995x|    0:00
32 [   9] %
40 [   0]
48 [   0]
56 [   0]
64 [   0]
80 [   0]
96 [   0]
112 [   0]
128 [  17] **
160 [ 681] %%**************************************
192 [1108] %%%%%%%%%%%%%%%%%%*************************************************
224 [ 300] %%%%%%%%%*********************
256 [ 118] %%**********
320 [  29] %%*
-----------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  190.5       13.2  86.8        95.4   2.7   1.9
Writing LAME Tag...done
ReplayGain: -1.7dB


8th Gen:
Code: [Select]
LAME 3.97 (beta 2, Jan 20 2006) 32bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 18671 Hz - 19205 Hz
Encoding breakfast7.mp3 to breakfast8.mp3
Encoding as 44.1 kHz VBR(q=2) j-stereo MPEG-1 Layer III (ca. 7.3x) qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
  2292/2292  (100%)|    0:11/    0:11|    0:16/    0:16|   5.2428x|    0:00
32 [  14] *
40 [   0]
48 [   0]
56 [   0]
64 [   0]
80 [   0]
96 [   2] %
112 [   0]
128 [  23] **
160 [ 695] %%**************************************
192 [1190] %%%%%%%%%%**********************************************************
224 [ 271] %%%%%***********
256 [  73] %****
320 [  24] %*
-------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  187.8       12.3  87.7        96.8   1.8   1.4
Writing LAME Tag...done
ReplayGain: -1.9dB


I wonder if the codec makes much of a difference to the degradation curve..

Effects of lossy transcoding

Reply #1
Wow.  I downloaded the 8th gen one thinking it would surely sound horrible, and granted I'm listening on a laptop through its speakers, but it was pretty darned good.

How about doing some Lossless > iTunes AAC > LAME mp3?

Effects of lossy transcoding

Reply #2
Wow.  I downloaded the 8th gen one thinking it would surely sound horrible, and granted I'm listening on a laptop through its speakers, but it was pretty darned good.


I already knew that transcoding is not as bad as people (me included) say. Because I transcode from Musepack and Ogg Vorbis to MP3 (lame) regularly when doing MP3-CDs for my car hifi.

Still the 8th generation really sounds good, for being the 8th generation. Ok, the settings didn't change so the encoder did the same codec and psychoacustic sound shaping over and over again (which won't do that much harm to the audio I guess).

How about doing some Lossless > iTunes AAC > LAME mp3?


Yes, a better test closer to reality would be like that. Try to use the exact same encoder and settings like iTunes uses for it's music. Also speaking from experience, in the rarest cases someone will transcode MP3->MP3 (ok stupid people or people being desperate for space excluded). Most often people transcode because their playback equipment does not support the "original" lossy audio data, like .mpc/.ogg/.aac/.m4a/.wmv->.mp3.

The idea of doing a proper transcoding listening test, complete with ABX-testing has been around for a while, but noone really showed enough interest to organise one... 

While I expect such a test will hold many surprises for people who are strictly against transcoding, I still believe it's not a good thing to do, except when you have no other choice and won't be able to listen to the music otherwise. For example I consider it being impolite when you hand over some transcoded files to a friend without telling him about it, but of course it's ok when you tell him and he doesn't mind. (Yes, sharing music with real friends is still legal in many countries when you rightously own the original music - just in case someone wants to object to saying this sentence above).

Effects of lossy transcoding

Reply #3
I think it is easier to hear the difference when transcoding low bitrate -> low bitrate (no matter what codec).  Showing that the bitrates are similar over the generations doesn't really say much for percieved quality.

At best, one might say that transcoding from ?? quality/bitrate to a relatively high quality/bitrate does less damage than transcoding to a relatively lower bitrate/quality.  I don't think this statement is anything more than obvious.

It would be interesting to have a full scale transcoding test
Vorbis-q0-lowpass99
lame3.93.1-q5-V9-k-nspsytune


Effects of lossy transcoding

Reply #5
Isn't there any way that an encoder can tell if a songs been encoded before or not.  Wat confuses me is that when a sond is decoded back into a WAV file its file size increases again.  What data is added to the song when its decoded?

Effects of lossy transcoding

Reply #6
What data is added to the song when its decoded?
Good question. Lot's of "zeros", AFAIK.

You can use aucdtect.exe before re-encoding. But it will only tell you with a limited certainty whether a PCM wav was lossily encoded, it won't tell you how often.


Effects of lossy transcoding

Reply #8
Isn't there any way that an encoder can tell if a songs been encoded before or not.  Wat confuses me is that when a sond is decoded back into a WAV file its file size increases again.  What data is added to the song when its decoded?


In one sense, no data is added - it's just a different representation of the same data. The problem is that the mp3>wav transform isn't easily reversed, because data from the mp3 file is overlapped in the wave file, and frame boundaries in the mp3 file are not indicated in the wav file.

Cheers,
David.