View Full Version : Audio normalize recommendations?
oldcpu
4th March 2006, 23:04
I created a number of DVD compatible .mpeg files (out of various avi files) and I plan to put them all together on one DVD. The audio on these files are at different levels.
What is a good quick/easy to use package to normalize the audio on the different movie clips to the same volume level? (I'm not adverse to using the command line).
Should I have performed the normalize while the files were still in avi format (prior to converting to mpeg), or does it matter?
echo
12th March 2006, 11:00
I don't think you can do anything now with the .mpeg files. If you still have the originals you could extract the audio to .wav files, use wavegain (http://freshmeat.net/projects/wavegain/) preferably instead of normalize and then encode to .mpeg
oldcpu
13th March 2006, 21:55
I don't think you can do anything now with the .mpeg files. If you still have the originals you could extract the audio to .wav files, use wavegain (http://freshmeat.net/projects/wavegain/) preferably instead of normalize and then encode to .mpegThanks. I have the originals, but they are in a non-editted form. Looks like I'll have to start over and redit.
I downloaded wavegain, and it took me a while to figure out how to install it. Not a typical install. :) I haven't tried it out yet.
oldcpu
2nd April 2006, 00:25
I don't think you can do anything now with the .mpeg files. If you still have the originals you could extract the audio to .wav files, use wavegain (http://freshmeat.net/projects/wavegain/) preferably instead of normalize and then encode to .mpeg
Following your recommendation (for wavgain) I took four mpg files created by tovid, and extracted the audio (which was in an ac3 format) as follows:
mplayer input1.mpg -ao pcm:file=temp1.wav
mplayer input2.mpg -ao pcm:file=temp2.wav
etc ...
I did this for 4 different music video's, which had significantly different volume levels. I then ran wavegain against these wav files, to normalize the audio level:
wavegain --radio --apply *.wav
This rewrote each .wav file, adjusting the audio levels.
I then listened to the wav files, and the audio volume levels from file to file were much more balanced than the originals.
I individually converted each of them back to ac3 using a tovid script:
ffmpeg -i temp1.wav -ab 224 -ar 48000 -ac 2 -acodec ac3 -y "temp1.ac3"
ffmpeg -i temp2.wav -ab 224 -ar 48000 -ac 2 -acodec ac3 -y "temp2.ac3"
etc ...
I then individually stripped the audio out of each of the original mpg (creating an m2v):
tcextract -i input1.mpg -t yuv4mpeg -x mpeg2 > temp1.m2v
tcextract -i input2.mpg -t yuv4mpeg -x mpeg2 > temp2.m2v
etc ...
And finally individually recombined each of them into a new mpeg:
mplex -f 8 -o final1.mpg temp1.m2v temp1.ac3
mplex -f 8 -o final2.mpg temp2.m2v temp2.ac3
etc ...
idvid assess the "final1.mpg", "final2.mpg", etc ... as all being dvd compliant. I haven't yet tried to burn them to dvd, but this does seem to work for normalizing the audio. Hopefully I haven't lost too much audio quality in the process.
I can now call these revised files with dvdauthor -x myxmlfile.xml (to create my compilation dvd):
But this normalizing the volume level is a lot of work! And this may not be the most efficient way to do this :( If only there was a way to automate it.
Edit: (11-June-06) - Fixed typo in ffmpeg command (for converting from .wav to .ac3)
oldcpu
2nd April 2006, 21:33
I discovered another package that will normalize audio volume across multiple files. I haven't tried to compile and installed it yet:
aacgain
http://altosdesign.com/aacgain/
[while I believe it is primarily built for windows, there is a link to a unix tarball at the bottom of the page].
oldcpu
2nd April 2006, 21:43
Reading the wiki (linked below) on replay gain makes me think that I need to do more of a test to be certain wavegain will do what I want.
http://en.wikipedia.org/wiki/Replay_Gain
I stopped short of actually burning a dvd with my new mpeg files, and I now think for my test to be complete, I need to actually create a DVD, and see if the audio volume normalization worked.
fanbanlo
21st April 2006, 08:56
I discovered another package that will normalize audio volume across multiple files. I haven't tried to compile and installed it yet:
aacgain
http://altosdesign.com/aacgain/
I tried ACCGAIN /g 20 on an acc file demux'ed from a mp4, and then remux it to a mp4, play with Quicktime, and the sound level remains the same... :sly:
Also, after gained, foobar complains:
Playback Error:
Decoding failure at 0:00.192 (Unsupported format or corrupted file):
"C:\ffmpeg\output.aac"
:sly:
oldcpu
21st April 2006, 20:03
I tried ACCGAIN /g 20 on an acc file demux'ed from a mp4, and then remux it to a mp4, play with Quicktime, and the sound level remains the same... :sly: I didn't have any luck with ACCGAIN either. But I am pretty happy with WAVEGAIN.
oldcpu
11th June 2006, 15:50
I discovered mp3gain can be used to normalize mp3 files.
http://mp3gain.sourceforge.net/
http://www.penguin-soft.com/penguin/man/1/mp3gain.html
But what I am looking for now is a program that will normalize the audio across multiple .avi files, without me having to pull out the audio to either .mp3 or .wav format, normalize, and then have to rejoin the normalized audio with the respective video.
buzzqw
11th June 2006, 16:50
mencoder is your friend !
mencoder.exe -ovc copy -af volnorm=1 -oac mp3lame -lameopts cbr:br=128 input.avi -o output.avi
BHH
oldcpu
12th June 2006, 07:19
mencoder is your friend !mencoder.exe -ovc copy -af volnorm=1 -oac mp3lame -lameopts cbr:br=128 input.avi -o output.avi Thanks, I'll give it a try and report back how it worked!
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.