IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
AAC to AAC loss of quality, AAC encoding
manisphere
post Feb 9 2014, 20:42
Post #1





Group: Members
Posts: 3
Joined: 9-February 14
Member No.: 114397



This is a terribly noobish question but google search after google search could not give me an answer.

I have a double album that was well encoded at 256 kbps. The files were all converted on itunes from 256 aac to 256 aac (I know. Who does such a thing? unsure.gif ).

Will there be any quality loss if the conversion was in the same format and same size? 256 aac to 256 aac?



thanks

Go to the top of the page
+Quote Post
eahm
post Feb 9 2014, 20:50
Post #2





Group: Members
Posts: 884
Joined: 11-February 12
Member No.: 97076



QUOTE (manisphere @ Feb 9 2014, 12:42) *
Will there be any quality loss if the conversion was in the same format and same size? 256 aac to 256 aac?

Yes.

Can you hear it? Probably not: http://www.hydrogenaudio.org/forums/index....howtopic=100067
Go to the top of the page
+Quote Post
manisphere
post Feb 10 2014, 01:53
Post #3





Group: Members
Posts: 3
Joined: 9-February 14
Member No.: 114397



QUOTE (eahm @ Feb 9 2014, 20:50) *
QUOTE (manisphere @ Feb 9 2014, 12:42) *
Will there be any quality loss if the conversion was in the same format and same size? 256 aac to 256 aac?

Yes.

Can you hear it? Probably not: http://www.hydrogenaudio.org/forums/index....howtopic=100067

Thank you.
Go to the top of the page
+Quote Post
christopher
post Feb 12 2014, 02:50
Post #4





Group: Members
Posts: 63
Joined: 19-December 03
From: Bucks, UK
Member No.: 10556



QUOTE (manisphere @ Feb 10 2014, 00:53) *
QUOTE (eahm @ Feb 9 2014, 20:50) *
QUOTE (manisphere @ Feb 9 2014, 12:42) *
Will there be any quality loss if the conversion was in the same format and same size? 256 aac to 256 aac?

Yes.

Can you hear it? Probably not: http://www.hydrogenaudio.org/forums/index....howtopic=100067

Thank you.


That said, it's generally not recommended. When you transcode as in your example, internally the codec is first effectively reconstituting a waveform to PCM then immediately recompressing.

What you irreparably lose is the fine detail in high frequencies, complex frequency content subsequently masked by the perceptual model, some time domain resolution and some stereo information. Lossy codecs aren't best suited to being fed audio that's already been through the wash once, so results become unpredictable (increased janglies, smearing, graininess, loss of clarity.)

Even with high bitrate lossy sources, your compression ratio is still phenomenal - i.e., loads of data already thrown away - so the encoder doesn't get much to work with for starters.

Liken it to rescanning and reprinting an already-printed scan of a photo. smile.gif

This post has been edited by christopher: Feb 12 2014, 02:52


--------------------
[SIZE=1][B]Don't forget International Talk Like A Pirate Day! September the 19th![/B][/SIZE]
Go to the top of the page
+Quote Post
manisphere
post Feb 12 2014, 03:50
Post #5





Group: Members
Posts: 3
Joined: 9-February 14
Member No.: 114397



QUOTE (christopher @ Feb 12 2014, 02:50) *
QUOTE (manisphere @ Feb 10 2014, 00:53) *
QUOTE (eahm @ Feb 9 2014, 20:50) *
QUOTE (manisphere @ Feb 9 2014, 12:42) *
Will there be any quality loss if the conversion was in the same format and same size? 256 aac to 256 aac?

Yes.

Can you hear it? Probably not: http://www.hydrogenaudio.org/forums/index....howtopic=100067

Thank you.


That said, it's generally not recommended. When you transcode as in your example, internally the codec is first effectively reconstituting a waveform to PCM then immediately recompressing.

What you irreparably lose is the fine detail in high frequencies, complex frequency content subsequently masked by the perceptual model, some time domain resolution and some stereo information. Lossy codecs aren't best suited to being fed audio that's already been through the wash once, so results become unpredictable (increased janglies, smearing, graininess, loss of clarity.)

Even with high bitrate lossy sources, your compression ratio is still phenomenal - i.e., loads of data already thrown away - so the encoder doesn't get much to work with for starters.

Liken it to rescanning and reprinting an already-printed scan of a photo. smile.gif

Hmm. Somehow I had thought things were more efficient in the digital age. You make it sound like when I taped cds for my walkman. dry.gif tongue.gif
Go to the top of the page
+Quote Post
greynol
post Feb 12 2014, 04:14
Post #6





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



Some formats are worse than others.

It's highly unlikely that you're going to hear any difference if you transcode as described in your initial post.

ABX is your friend.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
Woodinville
post Feb 12 2014, 04:44
Post #7





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



You will if there is any critical material. It probably won't be too too too bad.

Please look at the last 4 slides of www.aes.org/sections/pnw/ppt.htm in the "perceptual coding tutorial".


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
greynol
post Feb 12 2014, 04:52
Post #8





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



ABX to find out. I was extremely humbled after testing aac in light of the discussion that was linked earlier.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
Porcus
post Feb 12 2014, 12:05
Post #9





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



What I do when I have to transcode, is to mark it in file names. Like, file.mpcĄ.m4a would tell me it was an mpc, and then I know I have a source to fetch a better file from should it not be good enough.

QUOTE (manisphere @ Feb 12 2014, 03:50) *
Somehow I had thought things were more efficient in the digital age. You make it sound like when I taped cds for my walkman. dry.gif tongue.gif


I have asked the question a few times, why isn't it possible? And as far as I can understand the answer, it is a bit like trying to .zip an encrypted file. Which also in principle should be possible, as the encrypted file does not have any more information than the unencrypted, but you could try - it won't help much. And in both cases is trivial in theory but infeasible in practice - you can by brute force crack encryption, and you can by brute force find a 256 k AAC file which sounds indistinguishable from another 256 k AAC file (you just generate all possible 256 k AAC files of the same length ...).


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
nu774
post Feb 12 2014, 16:04
Post #10





Group: Developer
Posts: 476
Joined: 22-November 10
From: Japan
Member No.: 85902



QUOTE (manisphere @ Feb 12 2014, 11:50) *
Hmm. Somehow I had thought things were more efficient in the digital age. You make it sound like when I taped cds for my walkman. dry.gif tongue.gif

Transcoding is usually done by decoding + re-encoding. After decoding, not only you have degraded input that is more or less different from the reference (like broken telephone), but also any information about the original compression is lost (so you cannot make use of it).

Working directly on the compressed domain (without decoding) might make it more efficient as you say, but I dunno.
Go to the top of the page
+Quote Post
greynol
post Feb 12 2014, 18:54
Post #11





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



Converting iTunes Plus to iTunes Plus appears to give a different result from transcoding iTunes Plus to iTunes Plus with iTunes 10.7, at least.


--------------------
Your eyes cannot hear.
Go to the top of the page
+Quote Post
saratoga
post Feb 12 2014, 19:20
Post #12





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



QUOTE (Porcus @ Feb 12 2014, 06:05) *
I have asked the question a few times, why isn't it possible?


The data is already been through lossy quantization. How exactly would you do any better than just decoding it to PCM? I guess you could look at the quantized values and restrict the transcoder to quantization that is equal or coarser then the original, but that might not even be possible unless you're going to force the new bitrate to use the same block sizes as the old, which might work quite badly if the bitrates are very different. Probably though if you want to go from 256k to 64k you will not want to use the same transform sizes, in which case you will end up requantizing everything anyway.
Go to the top of the page
+Quote Post
pdq
post Feb 12 2014, 19:28
Post #13





Group: Members
Posts: 3305
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



In general I would say that if at least one of the bitrates, source or destination, is fairly high then you are probably OK (high to low, low to high, or high to high). If you are transcoding from low bitrate to low bitrate that is when you are most likely to be adding audible artifacts.
Go to the top of the page
+Quote Post
Porcus
post Feb 12 2014, 19:36
Post #14





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (saratoga @ Feb 12 2014, 19:20) *
QUOTE (Porcus @ Feb 12 2014, 06:05) *
I have asked the question a few times, why isn't it possible?


The data is already been through lossy quantization. How exactly would you do any better than just decoding it to PCM?


Me? The same way as I usually encode - start an application somebody else has written ...

Now the point is: If you have a 4 MB file that unpacks to a 30 MB file, then it we know for a fact that those 4 megabytes contain precisely the same information as the 30 megabytes - i.e., it is possible to losslessly compress those 30 down to 4. "Possible" except nobody knows how (except keep it and delete the unpacked one).

This post has been edited by Porcus: Feb 12 2014, 19:36


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
saratoga
post Feb 12 2014, 19:55
Post #15





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



QUOTE (Porcus @ Feb 12 2014, 13:36) *
Me? The same way as I usually encode - start an application somebody else has written ...


No I mean logically. Without knowing what the original lossless data was, you need someway to use extra additional 'clues' from the the compressed audio stream that aren't in the decompressed PCM. There are some; the transform sizes used, the quantization levels per frequency domain coefficient, and the stereo modes, but how do you use these to do something useful? Its not clear to me that you can.

QUOTE (Porcus @ Feb 12 2014, 13:36) *
Now the point is: If you have a 4 MB file that unpacks to a 30 MB file, then it we know for a fact that those 4 megabytes contain precisely the same information as the 30 megabytes - i.e., it is possible to losslessly compress those 30 down to 4.


In general you can define an infinite number of mappings between bitstreams of different lengths (although they will not be bijective). But to what end? Its not clear to me how you would do something useful with the information that a specific one exists . . .
Go to the top of the page
+Quote Post
Porcus
post Feb 13 2014, 03:41
Post #16





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (saratoga @ Feb 12 2014, 19:55) *
No I mean logically.


Logically it is trivial, so I suspect we are talking about completely different things.

What I mean, is that there is nothing - logically - that says you get any quality loss whatsoever by transcoding AAC@256 into AAC@256. In fact, there is a trivial but infeasibly slow way to do so, losslessly.
As it is trivial in theory, what needs to be explained is why nobody has found a way to even transcode an AAC@256 - or even an AAC@64 - into an AAC@256 without loss if information.
Especially since we consider state-of-the-art data compressing algorithms to be "quite good". (Which leads me to point out that although they are "quite good" most of the time, they are easy to fool.)

This post has been edited by Porcus: Feb 13 2014, 03:42


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
saratoga
post Feb 13 2014, 04:49
Post #17





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



QUOTE (Porcus @ Feb 12 2014, 21:41) *
As it is trivial in theory, what needs to be explained is why nobody has found a way to even transcode an AAC@256 - or even an AAC@64 - into an AAC@256 without loss if information.


This is actually really easy. Just pad a lot of zeros into the 64k bitstream until you reach 256k. Or unpack the entropy coding and then repack it less efficiently. You can always losslessly increase bitrate without much effort.

I'm assuming the question you really want to know is if you can decrease bitrate with less increase in quantization error than regular transcoding.
Go to the top of the page
+Quote Post
Octocontrabass
post Feb 13 2014, 06:59
Post #18





Group: Members
Posts: 22
Joined: 9-September 13
Member No.: 110004



QUOTE (Porcus @ Feb 12 2014, 18:41) *
What I mean, is that there is nothing - logically - that says you get any quality loss whatsoever by transcoding AAC@256 into AAC@256.
Yes there is, and it's called a psychoacoustic model.

Any good AAC encoder will have a psychoacoustic model that it uses to decide things like quantizers, stereo mode, block size, and bit allocation. All of these decisions depend on the input audio, which means some of the decisions will be different between a file that is taken directly from a lossless source versus one that has already been encoded to AAC@256 and then decoded back to uncompressed PCM.

In theory, you could create an AAC encoder that does not make any decisions based on the input audio. If you used this hypothetical AAC encoder to re-encode its own output, you'd end up with a nearly (if not completely) identical file. Unfortunately, this hypothetical AAC encoder is not even close to being competitive with encoders that use psychoacoustic models.
Go to the top of the page
+Quote Post
Porcus
post Feb 13 2014, 09:15
Post #19





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (saratoga @ Feb 13 2014, 04:49) *
I'm assuming the question you really want to know is if you can decrease bitrate with less increase in quantization error than regular transcoding.


OK, I missed the explanation of transcoding 256 to 256, so here goes again:
Decode an AAC 256 stream. Then it is trivial to losslessly compress the decoded signal down to a bitrate of (at most) 256; trivial, but practically infeasible.

This post has been edited by Porcus: Feb 13 2014, 09:15


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
saratoga
post Feb 13 2014, 18:44
Post #20





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



QUOTE (Porcus @ Feb 13 2014, 03:15) *
Decode an AAC 256 stream. Then it is trivial to losslessly compress the decoded signal down to a bitrate of (at most) 256; trivial, but practically infeasible.


No thats generally not possible because of rounding error. Once its gone to PCM, you're probably out of luck.

You can trivially turn the 256k AAC file into a 256k AAC file by doing nothing however.

This post has been edited by saratoga: Feb 13 2014, 18:45
Go to the top of the page
+Quote Post
Porcus
post Feb 13 2014, 21:14
Post #21





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (saratoga @ Feb 13 2014, 18:44) *
No thats generally not possible because of rounding error. Once its gone to PCM, you're probably out of luck.


Look, if you really feel like derailing the logic by nitpicking on that level of detail, then (i) who said you need to use LPCM upon transcoding?, and (ii) if you do not allow roundoff errors, then you can delete a lot of software from your list of media players. For example, foobar2000 is not an mp3 player unless you allow for roundoff errors in the -150 dB range.

People do transcode, and they are surprised that lossless --> 256 --> lossless --> 256 is not the same as lossless --> 256. And logically it could very well be the same (that would be the situation if you e.g. reduce the # of colours in a photo format), that just is not implemented.


--------------------
One day in the Year of the Fox came a time remembered well
Go to the top of the page
+Quote Post
saratoga
post Feb 13 2014, 21:32
Post #22





Group: Members
Posts: 4718
Joined: 2-September 02
Member No.: 3264



QUOTE (Porcus @ Feb 13 2014, 15:14) *
QUOTE (saratoga @ Feb 13 2014, 18:44) *
No thats generally not possible because of rounding error. Once its gone to PCM, you're probably out of luck.


Look, if you really feel like derailing the logic by nitpicking on that level of detail, then (i) who said you need to use LPCM upon transcoding?


AAC actually specifies LPCM, so you'll have to use it at some point in your decoder.

QUOTE (Porcus @ Feb 13 2014, 15:14) *
, and (ii) if you do not allow roundoff errors, then you can delete a lot of software from your list of media players. For example, foobar2000 is not an mp3 player unless you allow for roundoff errors in the -150 dB range.


You're missing the point. Because rounding is not explicitly defined by the specification, there are an infinite number of PCM outputs that can be generated from any given AAC file. Hence, given one specific output, its not in general possible to uniquely identify the AAC stream that generated it, nor to generate an AAC stream that will losslessly decode back to it (since the decoder will have an unknown rounding error). You might be able to in practice, but its not a for sure thing, especially if you don't have prior information (for example, the specific decoder binary used).

QUOTE (Porcus @ Feb 13 2014, 15:14) *
People do transcode, and they are surprised that lossless --> 256 --> lossless --> 256 is not the same as lossless --> 256. And logically it could very well be the same (that would be the situation if you e.g. reduce the # of colours in a photo format), that just is not implemented.


I suspect we're just talking past each other because I have no idea what this is in reference to. I thought you were asking why its not possible to take an AAC file and transcode it to a lower bitrate while preserving more quality than decoding to PCM and feeding that back into an encoder.
Go to the top of the page
+Quote Post
Octocontrabass
post Feb 13 2014, 23:48
Post #23





Group: Members
Posts: 22
Joined: 9-September 13
Member No.: 110004



QUOTE (Porcus @ Feb 13 2014, 12:14) *
And logically it could very well be the same (that would be the situation if you e.g. reduce the # of colours in a photo format), that just is not implemented.
Not really. Reducing colors is trivial, and you can guarantee that no further loss will occur after one generation; encoding JPEG is nearly trivial and will reduce to no further loss during encoding after a few generations, if the rounding error from the encoder and decoder sums close to zero.

A more fair comparison would be re-encoding a video multiple times with the same settings. Any good (i.e. not MJPEG) codec will use its psychovisual model to make encoding decisions and cause nearly endless generation loss. Even codecs that require bit-exact decoding (H.264) will have generation loss.
Go to the top of the page
+Quote Post
Porcus
post Feb 14 2014, 10:22
Post #24





Group: Members
Posts: 1779
Joined: 30-November 06
Member No.: 38207



QUOTE (saratoga @ Feb 13 2014, 21:32) *
QUOTE (Porcus @ Feb 13 2014, 15:14) *
People do transcode, and they are surprised that lossless --> 256 --> lossless --> 256 [...]

I suspect we're just talking past each other because I have no idea what this is in reference to.


The original posting? dry.gif


--------------------
One day in the Year of the Fox came a time remembered well
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: 20th April 2014 - 03:16