Well, i have a bunch of WAVE files for a Fallout 3 mod, but in the mod instructions the author only explains how to accomplish it using mp3gain (and of course for .mp3 files). The only info it have is "Set volume normalization. 92.8db matches the other radio stations."

The problem is: since the mod is old i need to change it internally to accept .wav instead (the game engine read better PCM). Plus i don't have mp3gain in my system (but i do have ffmpeg and audacity installed), and from what i searched on internet it only works with mp3 audio.

So how can i tweak my wav files for this decibel value? Thanks!


ReplayGain tags aren't standard in WAV files, so you have to alter the PCM data with the required gain.

As per my reading of the Replaygain specs, a correctly implemented Replaygain scanner will print out the gain required to attain 89 dB SPL (as defined in the specs).

FFmpeg has a filter to detect replaygain. You can run

ffmpeg -i in.wav -af replaygain -f null -

Its console log will have output of the form

[Parsed_replaygain_0 @ 0000000002a2b5c0] track_gain = +6.53 dB
[Parsed_replaygain_0 @ 0000000002a2b5c0] track_peak = 0.431484

To attain 92.8 dB, add 3.8 to the track gain value, +10.33dB in this case.

Now run,

ffmpeg -i in.wav -af volume=+10.33dB out.wav
  • So i need to determine (using the first command) what are the average volume of the track, and then calculate how much db i need to "add" and put the value on second track? Thats the only way? – Vico Jul 5 '18 at 13:19
  • Basically, yes. Replaygain is a way to tell the player/handler how much to alter the audio ; for that, one needs to know the base state. – Gyan Jul 5 '18 at 13:42
  • Oh snap! I Thought it was possible to tell ffmpeg something like "raise the average volume of a track to (+-)XXdb" but seems not to be possible. Thank you anyway for the help. – Vico Jul 5 '18 at 13:57

Wav, afaik, has no equivalent soft-gain parameter.

You could simply use Audacity to normalise to zero [so you have a level playing field], then again to -92.8dB... but -92.8 is going to be awfully quiet. Are you certain of your figures?

It's also pretty much a one-way process because of the noise floor you will generate, so keep your originals in case you need to do over.

  • It's (+)92.8 and I believe it's SPL not dBFS. – Gyan Jul 4 '18 at 10:50
  • There is absolutely no correlation between dB SPL & dB FS. You can change dB SPL by simply turning the amp up & down, irrespective of any other consideration. btw, 92.8dB SPL is getting up to jack-hammer or chainsaw levels, permanent hearing damage with long exposure. – Tetsujin Jul 4 '18 at 10:59
  • Yes, but Replaygain spec makes use of a SMPTE standard which sets a mapping between FS and SPL. The mod author looks to be using that and not dbfs directly. – Gyan Jul 4 '18 at 11:37
  • Then how to change it, as above... what to change it to I have not the faintest idea how to work out. – Tetsujin Jul 4 '18 at 15:57
  • So isnt possible to tell ffmpeg something like "change the average volume of this file to +92.8db"? – Vico Jul 5 '18 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.