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: AAC - ReplayGain Analysis (Read 9897 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

AAC - ReplayGain Analysis

Is there a tool out there like "MP3Gain" for AAC files?

I want to include any AAC files I have (purchased through iTunes Music Store, or Ripped by me).  I use MP3Gain now, but I'm looking for an "AAC Gain".

Thanks for any info!

AAC - ReplayGain Analysis

Reply #1
this was not your question, but you could apply gain via wavegain directly after ripping, just a hint for the future.
as for a mp3gain-like programm, I'm not aware of such a tool.
but I guess something like that could be done if you play your files back with foobar2k (aka 'the ha kitchen sink application'  ). maybe some foo enthuisast could tell you more...
Nothing but a Heartache - Since I found my Baby ;)

AAC - ReplayGain Analysis

Reply #2
You can't have replaygain in AAC files since it's raw data.
You can however in mp4 files using foobar. it will use mp4s own tagging system and I don't know if anything else than foobar will use it.

You can replaygain aac files in foobar2000 but it will save the values to the database only.

AAC - ReplayGain Analysis

Reply #3
Quote
Is there a tool out there like "MP3Gain" for AAC files?

Well.. there exists AACGain, which modifies global gain values similar to MP3Gain.
If only DSPGuru can finish it, or even publish the source
http://www.hydrogenaudio.org/forums/index....ndpost&p=122038
Juha Laaksonheimo

AAC - ReplayGain Analysis

Reply #4
Quote
You can't have replaygain in AAC files since it's raw data.
You can however in mp4 files using foobar. it will use mp4s own tagging system and I don't know if anything else than foobar will use it.

You can replaygain aac files in foobar2000 but it will save the values to the database only.

Actually foobar writes APEv2 tags to raw AAC files so replaygain data is stored in the files too.

AAC - ReplayGain Analysis

Reply #5
iTunes seems to have something in it to do with volume adjustment. Never tried it out though, or figured out how it works or what it's supposed to do.

AAC - ReplayGain Analysis

Reply #6
The 'sound check' option in iTunes is a simpler (and much faster) method of computing the rms volume compared to *gain, its computed on loading a song into the playlist. I believe it just computes the volume at every so-and-so interval, and possibly applies some simple filter to account for peaks and silence. Although its results may not be as 'accurate' as *gain, it does a pretty decent job and its presence is mostly transparent (unless you're loading a ton of items into a playlist at once).

AAC - ReplayGain Analysis

Reply #7
Quote
Actually foobar writes APEv2 tags to raw AAC files so replaygain data is stored in the files too.

OK, where do I find this "FooBar" tool?  Or is this a joke?

I have both XP machines and a Mac.  With iPods, and iTunes (on both platforms).

The big question is can any tool (besides the weak "Sound Check") compatible with the .m4p type of file from the the iTunes Music Store (Protected AAC file using FairPlay)?

Thanks again!


AAC - ReplayGain Analysis

Reply #9
why doesnt foobar store the gain information in the official way in the mp4 container by using the volume element in the mp4 header (called "volume", in the "mvhd" atom):
"volume is a fixed point 8.8 number that indicates the preferred playback volume. 1.0 (0x100) is full volume."

I think it should be easily possible to use foobars tag and the MP4 volume element in exactly the same way, but with the difference that the element is officially supported in the mp4 specs
I know, that I know nothing (Socrates)

AAC - ReplayGain Analysis

Reply #10
Quote
Quote
You can't have replaygain in AAC files since it's raw data.
You can however in mp4 files using foobar. it will use mp4s own tagging system and I don't know if anything else than foobar will use it.

You can replaygain aac files in foobar2000 but it will save the values to the database only.

Actually foobar writes APEv2 tags to raw AAC files so replaygain data is stored in the files too.

Why weren't you around the other day when we tried to figure out what foobar2000 did with different formats for the wiki page?

AAC - ReplayGain Analysis

Reply #11
Quote
The big question is can any tool (besides the weak "Sound Check") compatible with the .m4p type of file from the the iTunes Music Store (Protected AAC file using FairPlay)?

Not unless someone writes a way to decode the file using QuickTime for Windows.

However, QuickTime is just about as ugly as APIs get. I've been trying to figure out how to make an AAC encoder, but most of Apples sample code isn't exactly pretty, and their documentation isn't exactly thorough.

AAC - ReplayGain Analysis

Reply #12
Quote
why doesnt foobar store the gain information in the official way in the mp4 container by using the volume element in the mp4 header (called "volume", in the "mvhd" atom):
"volume is a fixed point 8.8 number that indicates the preferred playback volume. 1.0 (0x100) is full volume."

I think it should be easily possible to use foobars tag and the MP4 volume element in exactly the same way, but with the difference that the element is officially supported in the mp4 specs

That's not an "official" place to put ReplayGain information so it would never supplant the APEv2 tag, but it would certainly be a useful functionality addition. You should cross-post your request to the foobar forum.

AAC - ReplayGain Analysis

Reply #13
Quote
That's not an "official" place to put ReplayGain information so it would never supplant the APEv2 tag

of course the volume element wasnt created to support replaygain but i think it can be used in a similar way to store gain informations

Quote
You should cross-post your request to the foobar forum.

will do
I know, that I know nothing (Socrates)

AAC - ReplayGain Analysis

Reply #14
I'm also looking for replaygain-type control for my AAC files. I'm ripping to WAV (with EAC), then using iTunes for Windows 4.1.1 to encode to AAC / .m4a format. If I load these tracks into foobar and replaygain them, will this have effect when playing these files on my iPod?

I don't really like the way Apple does this with Sound Check, as it's only track-based. I want album-based replaygain like I get in foobar with encoded tracks when I play them on my iPod.

AAC - ReplayGain Analysis

Reply #15
Quote
I'm also looking for replaygain-type control for my AAC files. I'm ripping to WAV (with EAC), then using iTunes for Windows 4.1.1 to encode to AAC / .m4a format. If I load these tracks into foobar and replaygain them, will this have effect when playing these files on my iPod?

No. At least not at the moment.
Either DSPGuru needs to finish his software, or somebody else needs to implement this.
Foobar uses its own database for aac replaygain info.
Juha Laaksonheimo

AAC - ReplayGain Analysis

Reply #16
will the quicktime encoder take a --scale value by any chance? Then you could just run wavegain analysis on the extracted waves and plug the value into quicktime.

AAC - ReplayGain Analysis

Reply #17
Quote
I want to include any AAC files I have (purchased through iTunes Music Store, or Ripped by me).  I use MP3Gain now, but I'm looking for an "AAC Gain".

Since you're trying to play Apple's encrypted AAC files, you will probably find any solution which does not use QuickTime for decoding unsatisfactory. Currently, only QuickTime and iTunes can decode these files. You will probably find iTunes' built in Sound Check to work fairly well, although it may not be as accurate as ReplayGain.

Unencrypted AAC files will play fine in other players; with or without ReplayGain.

AAC - ReplayGain Analysis

Reply #18
Quote
If I load these tracks into foobar and replaygain them, will this have effect when playing these files on my iPod?

Quote
No. At least not at the moment.
Either DSPGuru needs to finish his software, or somebody else needs to implement this.
Foobar uses its own database for aac replaygain info.

afaik apple uses its own tag to store the (track) gain value in the m4a. so if ipod supports gain, than only its own tag (called NORM i think) and also not the official way to store such info: the volume element as i already wrote about

i am sure dspguru will also use its own "invention" the lwing_gain tag, so this will also not work in itunes/ipod

i already asked menno if it is possible to implement in foobar an apple compatible way of storing gain info in mp4/m4a (by using replaygain) to get a better interoperability - perhaps only the trackgain, if apple only supports that - but for some reason, i dont know anymore, it wouldnt work (that easily?)
edit: i think it was that nobody really knows how apples tag works?
perhaps menno can clearify this a little bit...
I know, that I know nothing (Socrates)

AAC - ReplayGain Analysis

Reply #19
Quote
i am sure dspguru will also use its own "invention" the lwing_gain tag, so this will also not work in itunes/ipod
you are sure..? wtf?
my AACGain tool has nothing to do with LWING_GAIN (which is only relevant for containers as ogm and mp4).
AACGain truely maniuplates the global_gain fields in the actual AAC frames.

Quote
Either DSPGuru needs to finish his software, or somebody else needs to implement this.
i'm afraid i don't have the time.
my suggestion is that someone else will patch faad2 in a similar fashion to what menno did here.
the idea of the second pass is to let faad2 parse the aac stream, and to modify the function "individual_channel_stream" so instead of passing global_gain through the casual bitstream reader, to pass it through a particular function that is consistent with the bitstream reader, but also manipulates the global_gain value.


[span style='font-size:8pt;line-height:100%']edit : typo[/span]

AAC - ReplayGain Analysis

Reply #20
hmm.
bad news. No chance that aacgain can be finalized at all?

your proposal would be that a first faad pass calculates a replay gain value and a second pass changes the global gain value in the aac stream?

AAC - ReplayGain Analysis

Reply #21
Quote
you are sure..?
AACGain truely maniuplates the global_gain fields in the actual AAC frames.

sorry, seems that i misunderstood your postings on doom9 
I know, that I know nothing (Socrates)

AAC - ReplayGain Analysis

Reply #22
let me claify about all my humble work regarding loseless gain assertion.

1. about BeSweet (and the doom9 discussions),
BeSweet currently offers postgain assertion on the following streams :
- MP3, by altering the global_gain fields
- MP2, by altering the scalefactor fields
- Vorbis, by setting a LWING_GAIN tag in the OGG stream
- AAC, by setting a LWING_GAIN comment in the MP4 stream

2. i have added AAC cutting support to BeSplit long ago, and sometimes later i started extending its aac parser in aim of syncing to the global_gain fields and altering them.
after writing a partial parser that was already able to sync to the first channel's global_gain field, i gave up the development of my aac parser.
i guess i was bored by the dirty work of writing a parser, and found some more interesting stuff to work on the development of my main tool, BeSweet.

3. later on, i decided to go for another approach. a dedicated AacGain.
i grabbed faad2's source-code and patched it to support alternation of the global_gain fields.
unlike common speculations, i had also integrated the gain_analysis module and was implementing a first-pass that calculates the replaygain.
alpha binary was tested by roberto and reported to have problems with the first pass.
then i have become busy in my personal life and the aacgain project died.

Quote
hmm.
bad news. No chance that aacgain can be finalized at all?

my suggestion is written two posts above.
it took menno (probably less than) 3 hours to add the feature of adif to adts conversion to the faad2 source-code, so if any of the many programmers here has around 3 hours to spare, he could devlier the goods and add faad2 the feature of postgain.
my reason for suggesting of doing this work from scratch, is that i'm not sure where are my sources of aacgain, and since newer faad2 releases had been introduced since my work, and those new releases has an alternative bitstream parser, so it's easiest to write things from scratch.