View Full Version : Normalize RMS opus files
Mark Regalo
8th October 2017, 05:45
I'd like to normalize a large folder of OPUS files to some average dB across all files. How would I go about doing this with eac3to?
Music Fan
8th October 2017, 06:58
I'd like to normalize a large folder of OPUS files to some average dB across all files. How would I go about doing this with eac3to?
If eac3to does not open OPUS files, you will have to make piping to use another tool which does, example with qaac ;
eac3to input stdout.wav | qaac -V 99 --ignorelength --no-delay -o output.m4a -
And here is an example of batch file (txt with .bat extension) which uses all wav files in a folder, but this one doesn't use piping ;
for %%I in (*.wav) do "C:\Program Files (x86)\eac3to\eac3to.exe" "%%I.wav" "%%I-new.wav" -resampleTo48000 -down16
pause
The bat file has to be in the same folder than the wavs.
Try to adapt and combine them.
Mark Regalo
8th October 2017, 08:31
If eac3to does not open OPUS files, you will have to make piping to use another tool which does, example with qaac ;
eac3to input stdout.wav | qaac -V 99 --ignorelength --no-delay -o output.m4a -
And here is an example of batch file (txt with .bat extension) which uses all wav files in a folder, but this one doesn't use piping ;
for %%I in (*.wav) do "C:\Program Files (x86)\eac3to\eac3to.exe" "%%I.wav" "%%I-new.wav" -resampleTo48000 -down16
pause
The bat file has to be in the same folder than the wavs.
Try to adapt and combine them.
This will normalize each file's dB to the average RMS dB across all files? I'm essentially looking to achieve something similar to what replaygain does but as a permanent alteration to the audio rather than a tag.
Music Fan
8th October 2017, 09:21
This will normalize each file's dB to the average RMS dB across all files?
No, that's just examples of piping and batch, you have to change the functions.
I'm not sure eac3to can do alone (without piping) this type of normalization, the -normalize function outputs peaks to 0 dB ;
https://en.wikibooks.org/wiki/Eac3to/How_to_Use#Using_audio_or_video_files_as_input
tebasuna51
8th October 2017, 10:01
Post moved from eac3to thread because eac3to can't decode/recode opus files and make PEAK normalize, not RMS.
hello_hello
8th October 2017, 18:29
I'm essentially looking to achieve something similar to what replaygain does but as a permanent alteration to the audio rather than a tag.
I don't think it's possible to losslessly adjust opus files as you can with mp3/aac, so you'd have to re-encode them
You could use a program such as foobar2000 to scan with replaygain and save the info to tags, then use that info to adjust them all to the same target volume while re-encoding.
manolito
9th October 2017, 01:50
I don't think it's possible to losslessly adjust opus files as you can with mp3/aac, so you'd have to re-encode them
This is exactly what the OP wants, see his second post.
For such tasks I like LoudNorm very much (comes with current ffmpeg versions). Here is a quick and dirty hack:
1. Download a current version of FFmeg.exe and save it in the folder where your Opus source files reside.
2. Save the following text as "Loudnorm.bat" and also save it in the Opus sources folder.
MD Normalized
FOR %%a in ("*.opus") DO ffmpeg.exe -fflags +genpts -y -i "%%a" -map 0:0 -c:a:0 libopus -b:a:0 128k -vbr on -filter:a:0 "loudnorm=I=-18:TP=-1.5:LRA=14" -shortest ".\Normalized\%%a"
3. Run the batch file by doubleclicking it.
The LoudNorm parameters specify a target integrated loudness of -18 LUFS (Loudness Units Full Scale) which is the ReplayGain2 standard. For most sources this will apply Dynamic Range Compression to avoid clipping. If you prefer to not apply DRC then you should change "I=-18" to "I=-23" in the batch file. This lowers the target volume to the EBU R128 standard, so DRC will mostly not be necessary.
Cheers
manolito
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.