10

I want to configure mplayer conf so that the player's default volume is not 25%. I have to increase the volume via the keyboard with every song/flick. I can only find solutions that simply over-pushing the soundcard...

Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306

3 Answers3

7

You can run mplayer with the -af flag:

mplayer -af volume=10:1

where the value 10 means the sound is amplified by 10dB

To set this, edit the mplayer configuration file:

 ~/.mplayer/config

add the option:

af=volume=10:1

The af flag alters the hardware volume. If this doesn't work, you can try specifying the software mixer, and altering the software volume with the options:

softvol=yes
softvol-max=1000
Oliver Salzburg
  • 86,445
  • 63
  • 260
  • 306
mark
  • 4,479
  • 1
  • 21
  • 9
  • appears that -af volume=10:1 avoids using a software mixer at all, which allows mutes to work better than using softvol. Thanks for the tip! – rogerdpack Dec 27 '12 at 00:48
6

The -volume option sets the volume between 0 and 100.

mplayer -volume 40 MyMusicVideo.mp4
Russell Hankins
  • 181
  • 1
  • 2
0

It may be a different problem, but it's the skin that breaks the volume setting for me. Here's my fix:

diff -u /usr/share/mplayer/skins/default/skin{.bak,}
--- /usr/share/mplayer/skins/default/skin.bak   2015-09-08 23:15:31.000000000 +0200
+++ /usr/share/mplayer/skins/default/skin   2019-10-16 09:40:01.152006731 +0200
@@ -38,7 +38,7 @@
   ;hpotmeter=buttonbitmaps,sx,sy,phasebitmaps,phases,default value,x,y,sx,sy,msg
   hpotmeter = pos, 13, 10, NULL, 100,  0, 242, 79, 82, 10, evSetMoviePosition
   hpotmeter = pos, 13, 10, NULL,  50, 50,  78, 59, 42, 10, evSetBalance
-  hpotmeter = pos, 13, 10, NULL,  50, 50,  79, 78, 44, 10, evSetVolume
+  hpotmeter = pos, 13, 10, NULL,  50, -,  79, 78, 44, 10, evSetVolume
 
   ;pimage=phasebitmaps,phases,default value,x,y,sx,sy,msg
 ;  pimage = progres-long2c, 46, 0, 245, 67, 141, 5, evSetMoviePosition
T-Gergely
  • 128
  • 3