So, after some trial-and-error, I’ve cracked the RVA2 frame format as written by Quod Libet / Mutagen.
- All values are stored big-endian (most significant byte first). This tripped me up, because this is not true for all data stored in all tag formats.
- If we think of the peak value in terms of the “units, tens, thousands” format you learned at school (only, of course, in binary this is “units, twos, fours”), the first bit is the units, the second is the halves, the third quarters and so on. Simple, yes? However, it’s not so easy to infer from the code that parses it. So I’ve put plenty of comments in the amarokcollectionscanner code.
- Everything else you could wish to know about the format is in the ID3v2.4 frames list, section 4.11.
So Amarok’s collection now has complete support for replay gain tags in Ogg Vorbis (as written by vorbisgain), FLAC (as written by flacenc) and MP3 (as written by Foobar2000 [ID3v2.3 TXXX comments], Quod Libet / Mutagen [ID3v2.4 RVA2] or mp3gain [APEv2]).
Other formats will follow. As will replay gain support for files that aren’t in the collection, but are on the local machine.
18th January 2009 at 2:05 am |
great work!! thank you
18th January 2009 at 5:14 am |
This is great news, another missing feature crossed off my list
I’ using amarok compiled today (svn 912659) , can you tell me how i can check if replaygain i working? (since the volume slider doesnt change).
Also, a amarok script (with necessary replay gain client detection) which would apply replay gain tags would be great
keep up the good work, amarok 2.0 is getting better and better.
18th January 2009 at 10:56 am |
i am impressed… great work!
18th January 2009 at 11:55 am |
@Paulo Dias: If you turn on debug output (run amarok as `amarok –debug`), you will get a message on the console every time the track changes telling you how much gain was applied.
18th January 2009 at 2:48 pm |
Thank you very much. Lack of replay-gain support was my #1 reason for not moving to Amarok2.
19th January 2009 at 2:49 pm |
I indeed run amarok in debug mode and the gain shows up
very nice.
Now, to close the wrap, a welcome feature would be a script/code to apply replay gain automatically when building/processing the collection.
A script would be awesome, i remember i used one with amarok 1.x to do just that.
cheers