Volume normalization of MP3 audio track in AVI video files


For AVI video files with MP3 audio tracks, the best way to normalize its volume without recompression involves using FFMpeg and MP3Gain:

> ffmpeg -i input.avi -vn -acodec copy -y audio.mp3
> ffmpeg -i input.avi" -an -vcodec copy -y video.avi

> mp3gain /r audio.mp3
> ffmpeg -i audio.mp3 -i video.avi -acodec copy -vcodec copy -y output.avi


In fact, AACGain in the previous post could substitute for MP3Gain as well.

So the process basically involves extracting the audio and video tracks separately from the original video file, normalizing the audio track using MP3Gain, then muxing the audio (normalized) and video tracks back again.

Since everything is command-line driven, it will be quite straightforward to create a batch/script file that performs all 4 steps in sequence.

Comments

Popular posts from this blog

Adding "Stereo Mixer" to Windows 7 with Conexant sound card

Attiny85 timer programming using Timer1

Hacking an analog clock to sync with NTP - Part 5