mainNormalize Audio - Support: sr #105294, writing RVAD Tags for ID3V2.3


sr #105294: writing RVAD Tags for ID3V2.3

Submitter:  None
Submitted:  Wed 12 Apr 2006 04:04:18 PM UTC
Category:  None Priority:  5 - Normal
Severity:  1 - Wish Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 07 May 2009 05:30:22 PM UTC, comment #1: 

If the mp3file has id3v2.3 tags than normalize will write an id3v2.3 tag called "XRVA". This will be formated the same way as the id3v2.4 "RVA2" tag though.

I guess It would be possible to compute RVAD values and to write such a tag but the definition of RVAD is a somewhat hazy:

     <Header for 'Relative volume adjustment', ID: "RVAD">
     Increment/decrement           %00xxxxxx
     Bits used for volume descr.   $xx
     Relative volume change, right $xx xx (xx ...)
     Relative volume change, left  $xx xx (xx ...)
     Peak volume right             $xx xx (xx ...)
     Peak volume left              $xx xx (xx ...)

E.g. what exactly is the format of
  "Relative volume change, right $xx xx (xx ...)"  ?

   In the increment/decrement field bit 0 is used to indicate the right
   channel and bit 1 is used to indicate the left channel. 1 is
   increment and 0 is decrement.

So there is the sign. But what is the data format?

The only example of an RVAD tag I have found is this one here:

A hexdump of the relevant part looks like this:
5450 4f53 0000 0005  0000 0031 2f32 0052  |TPOS.......1/2.R|
5641 4400 0000 0a00  0000 1037 3737 3700  |VAD........7777.|
0000 0054 5945 5200  0000 0600 0000 3230  |...TYER.......20|

The tag name is 0x52564144 = RVAD.
Then there is the tags size in 4 bytes (0x0000000a = 10 bytes). Followed by two bytes for flags (0x0000).

Then there is the Increment/decrement bit field (0x00 means decrement left and right channel)

The next byte is 0x10 = 16 "Bits used for volume descr".

This means that we are expecting 16 bit values, and there they come:
     Relative volume change, right $37 37
     Relative volume change, left  $37 37
     Peak volume right             $00 00
     Peak volume left              $00 00

According to the expected test results here
the data 0x3737 should result in -2.119539 dB.

The sign is clear from the Increment/Decrement bit field but how do you go from 0x3737 (14135 decimal) to -2.119539 dB ?

I looked at the sources a little further and I found an interesting comment:

      // iTunes uses a range of -255 to 255
      // to be -100% (silent) to 100% (+6dB)

and code that translates roughly to this formula:

vol = 20   ln( ( (value sign / 256) + 255 )/255) / ln(10)

Using value=14135 and sign=-1 you actually get -2.11953925...

Nice, but still there is no guarantee that this is indeed the way that RVAD is supposed to be used. In fact judging from experience with iTunes' handling of id3 tags I very much doubt it.

Heinrich Langos <hlangos>
Wed 12 Apr 2006 04:04:18 PM UTC, original submission:  

Is there a possibillity to write the RVAD Tag für ID3V2.3 instead of the Tag for ID3V2.4?

Greetings Konrad



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by hlangos (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-e652.
    Corresponding source code