Tuesday, September 16, 2008

Audio Boost using MPlayer

I often felt pissed off when my friends used VLC and others programs for software level volume amplification, so I searched for a similar kind in mplayer and guess what! It was already there in mplayer since ages. You just need to RTFM.

Syntax :

mplayer -af volume=20:0 mediafile
Would amplify the sound by 20dB and hard-clip if the sound level is too high

Reference ( man pages of mplayer ) :

Audio filters allow you to modify the audio stream and its properties. The syntax is:

-af <filter1[=parameter1:parameter2:...],filter2,...>
Setup a chain of audio filters.

NOTE: To get a full list of available audio filters, see -af help.

Implements software volume control. Use this filter with cau‐
tion since it can reduce the signal to noise ratio of the sound.
In most cases it is best to set the level for the PCM sound to
max, leave this filter out and control the output level to your
speakers with the master volume control of the mixer. In case
your sound card has a digital PCM mixer instead of an analog
one, and you hear distortion, use the MASTER mixer instead. If
there is an external amplifier connected to the computer (this
is almost always the case), the noise level can be minimized by
adjusting the master level and the volume knob on the amplifier
until the hissing noise in the background is gone.
This filter has a second feature: It measures the overall maxi‐
mum sound level and prints out that level when MPlayer exits.
This volume estimate can be used for setting the sound level in
MEncoder such that the maximum dynamic range is utilized.
NOTE: This filter is not reentrant and can therefore only be en‐
abled once for every audio stream.
Sets the desired gain in dB for all channels in the
stream from -200dB to +60dB, where -200dB mutes the
sound completely and +60dB equals a gain of 1000 (de‐
fault: 0).
Turns soft clipping on (1) or off (0). Soft-clipping
can make the sound more smooth if very high volume lev‐
els are used. Enable this option if the dynamic range
of the loudspeakers is very low.
WARNING: This feature creates distortion and should be
considered a last resort.

Enjoy your home theater ... :)

1 comment:

Jaikrit said...

hey thnx a lott mate..i thot its nt possible 2 boost in mplayer..i was in need of dis coz sum of d media files m usin hv vry low voice!! thnx a lot it workz! :)