IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Lossy-Lossy transcoding
Chrisman
post Jul 20 2011, 21:59
Post #1





Group: Members
Posts: 2
Joined: 20-July 11
Member No.: 92423



As I've heard numerous times, lossy-to-lossy is BAD, I know this, please don't point this out anymore, it's an established point.

However, I'm looking to find out, what happens in this given situation:
FLAC->MP3 320 CBR->MP3 192 CBR
that is different from
FLAC->MP3 192 CBR

Oh, but you lose quality between 320->192... YES, but you lose even more quality between FLAC->192. Of course, I do NOT know how encoders work, but I'm tired of people not knowing about transcoders try to tell me that "it's just different and i will not tell you how". My very simplistic view is that it is a layer cake, FLAC being 5 layers, 320 being 4 layer and 192 being 2 layers, and that with 320->192 you're just removing another layer. I know this is wrong, and I'm trying to find out what is really going on in transcoding, that makes the two things different.
Thanks to anyone willing to help me with this smile.gif
Go to the top of the page
+Quote Post
benski
post Jul 20 2011, 22:09
Post #2


Winamp Developer


Group: Developer
Posts: 670
Joined: 17-July 05
From: Brooklyn, NY
Member No.: 23375



QUOTE (Chrisman @ Jul 20 2011, 16:59) *
As I've heard numerous times, lossy-to-lossy is BAD, I know this, please don't point this out anymore, it's an established point.

However, I'm looking to find out, what happens in this given situation:
FLAC->MP3 320 CBR->MP3 192 CBR
that is different from
FLAC->MP3 192 CBR

Oh, but you lose quality between 320->192... YES, but you lose even more quality between FLAC->192. Of course, I do NOT know how encoders work, but I'm tired of people not knowing about transcoders try to tell me that "it's just different and i will not tell you how". My very simplistic view is that it is a layer cake, FLAC being 5 layers, 320 being 4 layer and 192 being 2 layers, and that with 320->192 you're just removing another layer. I know this is wrong, and I'm trying to find out what is really going on in transcoding, that makes the two things different.
Thanks to anyone willing to help me with this smile.gif


As a very general explanation, MP3 works by replacing audio data with "close enough" data. If you've taken some science courses, think of this as reducing the number of significant figures for parts of the audio spectrum deemed unimportant.

When you re-encode to a lower bitrate, the MP3 encoder doesn't know that some sections are of the audio were approximated and will apply a new approximation that might change the value to something even further from its original value.

Or, put another way, the second MP3 encoder can't tell the difference between legitimately important audio and audio that was distorted by the first encoder.

In theory, an MP3->MP3 downcoder would be written that reads the scalefactors from the first file and never adds precision, only reduces it further. This has been discussed numerous times on Hydrogenaudio, but to my knowledge there has never been an implementation of it.
Go to the top of the page
+Quote Post
db1989
post Jul 20 2011, 22:10
Post #3





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



One of the multiple past threads in which the reasons for this difference are touched upon:
Detecting MP3s re-encoded from a lower bitrate

I imagine a search would turn up plenty more!
Go to the top of the page
+Quote Post
psycho
post Jul 20 2011, 22:12
Post #4





Group: Members
Posts: 241
Joined: 14-October 05
Member No.: 25099



Well... I think there's a lot of ways one could try to explain this to you... I have come up with one:

Think of it as if you have rabbits and you want them to breed. If you use lossless encoding, you use two of the healthiest of your rabbits, which are not related, to breed and produce perfect offspring. If you however use lossy encoding, you use two rabbits, who are related, you risk that their offspring will have genetic defects, which will be the result of "amplification" of the bad genes that the two parent-siblings had in common and is then even worse with their offspring. And if you repeat with inbreeding another generation further, it gets even worse.

That's why FLAC -> MP3 192 CBR is less likely to produce a file with noticeable artifacts (bad genes), because it hapened only in one generation and if you do FLAC -> MP3 320 CBR -> MP3 192 CBR you have two generations of "inbreeding".

I hope this helps you understand a bit more.


--------------------
lame -V 0
Go to the top of the page
+Quote Post
Chrisman
post Jul 20 2011, 22:24
Post #5





Group: Members
Posts: 2
Joined: 20-July 11
Member No.: 92423



QUOTE (benski @ Jul 20 2011, 23:09) *
As a very general explanation, MP3 works by replacing audio data with "close enough" data. If you've taken some science courses, think of this as reducing the number of significant figures for parts of the audio spectrum deemed unimportant.

When you re-encode to a lower bitrate, the MP3 encoder doesn't know that some sections are of the audio were approximated and will apply a new approximation that might change the value to something even further from its original value.

Or, put another way, the second MP3 encoder can't tell the difference between legitimately important audio and audio that was distorted by the first encoder.

In theory, an MP3->MP3 downcoder would be written that reads the scalefactors from the first file and never adds precision, only reduces it further. This has been discussed numerous times on Hydrogenaudio, but to my knowledge there has never been an implementation of it.

Thank you VERY much, this answered my question.
So, if I get it right, it transcodes "replaced audio" from the lossy, while on the lossless, it would transcode original audio. I had the understanding that it worked as your described with your theoretical MP3 downcoder. Would it be possible to create such a program, and it just hasn't been created yet, or is it too problematic?
Go to the top of the page
+Quote Post
db1989
post Jul 20 2011, 22:30
Post #6





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



Another possible method in the same vein as benskiís suggestion is bitrate peeling, but thatís met with only barely more success.
Go to the top of the page
+Quote Post
2Bdecided
post Jul 20 2011, 22:44
Post #7


ReplayGain developer


Group: Developer
Posts: 5057
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



It's really simple. mp3 encoders smear the audio in both the time and frequency domains, as well as adding noise. You could look at the smearing as a form of noise. They get away with this because a limited amount of smearing and noise (in the right places) is inaudible - it's hidden by comparable smearing and noise that already exists in our ears.

If one encoding step does as much smearing as possible without introducing audible problems, it's obvious that extra smearing from a second encoding step can take things past the threshold of audibility into the area where you can hear something has changed.

The exact same thing applies to adding noise. If you add as much as possible without it being audible first time around, then adding any second time around is going to make it audible.

Lossy codecs don't work so cleanly (sometimes it sounds bad first time, other times it sounds fine after two generations), but that's the principle.

Cheers,
David.
Go to the top of the page
+Quote Post
Soviet Commissar
post Jul 21 2011, 06:07
Post #8





Group: Members
Posts: 43
Joined: 8-October 08
From: Virginia, USA
Member No.: 59765



In addition - and maybe I read over this because I'm impatient, a bit - lossy encoding also finds "artifacts", and not just a lack of data, and tries to encode those as if they were original audio as well, so now you have artifacted artifacts. I'm aware that's not the most technical explanation in the world, but that's another concern. Again, not everyone - in fact, very few - hear these artifacts up to a certain point. I'm 100% sure there's SOME music in my library from my days of not knowing better which is transcoded, and I have a hell of a time figuring out which except in extreme examples (128-160 bitrates, generally).
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd July 2014 - 07:12