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: Reversibility of aacgain (Read 4831 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Reversibility of aacgain

In the past I have used mp3gain and aacgain on my library. I recently "undid" all of my files, in an attempt to return to original gain levels. It appears to have worked fine on all files, both mp3 and aac, and I have not observed any issues. However, I am very curious about how "different" the aac files are now compared to the original files. According to a description at the aacgain site (apologies for all-caps),
"AACGAIN IS NOT COMPLETELY REVERSABLE. THE UNDO OPTION IS INTENDED TO RESTORE A MUSIC FILE TO BE FUNCTIONALLY EQUIVALENT TO ITS ORIGINAL STATE, BUT IT WILL NOT BE BIT-FOR-BIT IDENTICAL TO THE ORIGINAL FILE."

My question is: what does the above mean? Would the "bit-for-bit differences" affect sound quality at all, or would it only be from a playability perspective (i.e. corrupted or unplayable files)? I'd just like to know what changes have been made. I do have backup files of the original aacs (as well as the cds), but I'd prefer to use the current "ungained" versions rather than re-import my backups if possible. Many thanks.

Reversibility of aacgain

Reply #1
I'm purely speculating here but it probably stored a gain adjustment clue in a meta tag or similar, in dB maybe.
And now that it's adjusted back there may be rounding errors. If you are worried about clipping then that could be possible. (rounding errors can go both ways after all)
If any of the differences are audible, is something I seriously doubt.
Technically speaking you may (or may not) have "lost" the "bottom bit" of the audio.

In the future may I suggest ReplayGain or something compatible to that, as they only add a meta tag and do not alter that audio at all (it is instead done during playback).

Also, somewhat ironically. With any lossy encoding you can forget about bit accurate and instead embrace bit inaccuracy, rounding/quantization errors, frequency limiting and so on, after all that is what makes lossy encoding possible.
Lossy encoding intentionally "damages" the audio, and then approximately rebuild it when decoding.

But back to your question, personally I'd re-rip/re-encode my collection, but that's just me. Even if you did an ABX test I doubt you'd notice any difference, so don't worry

Reversibility of aacgain

Reply #2
Great response. Thanks for the input.

Alas, I probably will do a complete re-rip regardless, but it will be a long and gradual process. 

 

Reversibility of aacgain

Reply #3
I am the author of aacgain.

When you undo gain changes, the AAC data streams are restored to their original values. This means that your music will play identically to the way it did before using aacgain. There is no data loss associated with undo.

However, the MP4 container in which those AAC streams are embedded will not be identical to the original. Because of the way tags and other data are stored in the MP4 container, and the way the open source libraries I use to modify the container operate, some of the tags and other data inside the container may be reordered, and the amount of padding (unused space) in the file may increase or decrease.

There is no need to re-rip your music.

Hope that helps...

Dave

Reversibility of aacgain

Reply #4
I am the author of aacgain.

When you undo gain changes, the AAC data streams are restored to their original values. This means that your music will play identically to the way it did before using aacgain. There is no data loss associated with undo.

However, the MP4 container in which those AAC streams are embedded will not be identical to the original. Because of the way tags and other data are stored in the MP4 container, and the way the open source libraries I use to modify the container operate, some of the tags and other data inside the container may be reordered, and the amount of padding (unused space) in the file may increase or decrease.

There is no need to re-rip your music.

Hope that helps...

Dave


Great! Thanks so much for the informative description Dave. By the way I love aacgain - don't know how I'd live without it. Actually, if you or anyone else is curious, the only reason for me wanting to "Undo" one of my libraries, was this: Google Music's "matching" service. See, I've uploaded almost all of my 12,000 song library to Google Music. However, now that they're using a "matching service", of course the "matched" songs have had no gain correction applied to them, whereas my original uploaded songs did, so my current "cloud library" is a mix of songs with and without gain adjustments (unless Google is  able to match every single one of my uploaded songs, which seems unlikely). Seems inevitable that I"m going to have to re-upload to Google Music with original files (before gain adjustment) so that my GM library is consistent, so I wanted to get a head start.

Sorry - long story. Anyway, thanks again for the help!

Chris