Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have, say, 20 music videos (.flv and .mp4), is there a way to play them in mplayer (mplayer2) without having to change the volume for each video, instead specifying a desired general volume, and having mplayer adjusting automatically whenever necessary?

Edit: Possibly this is called "volume normalization". By the way, I'll accept any solution for this, or even a description what is required. I use mplayer at the moment, but, if you solve this with, say, a microphone, a script, and vlc, that will be great.

Edit 2: This is close to, but not quite "volume normalization": check out my comment to David Kohen's answer below.

share|improve this question
I think what you're talking about is called volume normalization. – David Kohen Oct 23 '12 at 12:59
OK - changed the title and post. Would you also happen to have some clues as to how to achieve it? – Emanuel Berg Oct 23 '12 at 17:59
This question seems to be the same as yours, and has an accepted answer superuser.com/questions/531983/… – jrouquie Feb 28 '15 at 23:33

You mean mplayer's output, e.g always 80%, right?

If so, use -volume option, e.g mplayer *.flv *.mp4 -volume 80

share|improve this answer
It sets the mixer volume, it seems (so if you use mplayer with -ao alsa, you can see the change with alsamixer). But won't a loud file still be louder, as the mixer volume is the same for all files? (Correct me if I'm wrong.) – Emanuel Berg Oct 21 '12 at 17:11

Here's a link on how to do it on VLC: videolan forum

share|improve this answer
Close (+1) but not quite: This will change the volume constantly, driving you crazy. The volume setting must be the same for each song. If the volume of one file is set high, the volume of the player must compensate for this (reducing the volume), but only at the beginning of each song. Perhaps the way to go about this issue it: for an .mp4 or .flv (or just about any media file), how would you extract the default audio level? I suppose, for each file format, this data is put in a specific header field. – Emanuel Berg Oct 24 '12 at 21:03
It is not data in the files all the time, LAME adds a volume level to files it encodes (at some point only using a switch, at another it was by default) but it is not part of any standard that I know of... – David Kohen Oct 25 '12 at 15:25
Could you somehow determine what files are loud and what are not? If so, I could write a script to compensate, once for each file - I'd get sort of normalization, but on a per file level (and that's what I desire, otherwise the music gets screwed up - try it yourself). – Emanuel Berg Oct 25 '12 at 18:54

There is a script that reencodes audio in video files according to the gain, keep in mind that this may lower audio quality: http://www.jwz.org/hacks/video-replaygain.pl

share|improve this answer

Earlier I was also having audio normalization issues while playing movies on my VLC media player but few searches over Internet I was able to find a perfect solution for this and I have shared it below so that you can also benefit from it....

Audio Normalization VLC Fix / Audio Out of Sync VLC Fix

share|improve this answer

I use ddvideo flv video converter gain to normalize my videos and musics. You can also try it.

share|improve this answer
Could you provide an example? – slm Jul 11 '13 at 11:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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