You are not logged in.

#1 2008-12-13 23:32:36

slipper
Member
Registered: 2008-09-11
Posts: 28

gnome-mplayer default volume

Simple question, how do I set the default volume for gnome-mplayer?
My lack of googling skills aren't helping me.

I remember all I had to do in a previous version (8?) is go to edit>preferences and change a slider (or dropdown box, not sure) and that would let me select the default volume.

I'm using gnome-mplayer 0.9.2-1

Offline

#2 2008-12-14 00:37:18

lldmer
Member
From: Amsterdam
Registered: 2008-05-17
Posts: 119

Re: gnome-mplayer default volume

If gnome-mplayer also uses ~/.mplayer/config, you might be able to set volume=xx there to amplify the sound by xx dB by default.


For lack of better words: chair, never, toothbrush, really. Ohw, and fish!

Offline

#3 2008-12-14 03:12:42

slipper
Member
Registered: 2008-09-11
Posts: 28

Re: gnome-mplayer default volume

lldmer wrote:

If gnome-mplayer also uses ~/.mplayer/config, you might be able to set volume=xx there to amplify the sound by xx dB by default.

That seems to set the volume on straight mplayer, however makes no difference in gnome-mplayer. hmm

I'm using OSS if that's any help.

Offline

#4 2008-12-14 03:32:12

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: gnome-mplayer default volume

There's an option in ~/.gconf/apps/gnome-mplayer/preferences/%gconf.xml, but it doesn't seem to do anything on my machine.

Offline

#5 2009-01-13 22:10:19

listdata
Member
Registered: 2008-12-23
Posts: 102
Website

Re: gnome-mplayer default volume

gmplayer takes the same command-line arguments as mplayer, so you can do something like:

gmplayer -af volume=10:0 file.mp3

The volume is in decibels (dB), and generally I use a NEGATIVE number as that's the only way to decrease the default volume by any noticeable amount. On my laptop I use -30, since the default sound is horribly loud (-30 for me sets the volume at 3%, the lowest value in mplayer using default settings -- though I'm sure you could get it to 1% tweaking the various config options out there -- I haven't done the research myself yet on this fully). You will see that the volume slider is affected as desired with this setting. In the above example, the 10:0 means 10 dB, and the number following the colon sets soft clipping off (personally, I don't bother specifying soft clipping on or off; I just use volume=-30). See the manpage for mplayer (i.e., man mplayer) for details -- you need to go waaaay down to the "AUDIO FILTERS" section to see the info I just posted about volume.

Of course, if you want to do this by default every time you load up mplayer or gmplayer (or any other frontend), simply edit the config file as mentioned above (~/.mplayer/config) and put in af=volume=-30 or some other number.

EDIT: After doing some more research and testing, it looks like mplayer does not use the software mixer by default (this means that the af=volume parameter does not work, or even if it does, the volume cannot be changed later on via the '9' and '0' keyboard hotkeys). To correct this, put in your config file: softvol=1 to make sure that both mplayer and gmplayer turn on the software mixer by default. Also, to change your volume percentage increments from the default 3% to 1% increments, put in volstep=1. So my complete config file looks like this:

af=volume=-30 # use really low volume by default (only works if software mixer is turned on!!)
softvol=1 # use software mixer by default
volstep=1 # increment volume by 1% each step, instead of 3%

Hmm, I should put this into the Arch wiki sometime in the future, as I feel that this is not documented very well on the internet so far. I'll get around to it sometime, if no one else does.

Go Arch!

EDIT: Hmm, I just noticed that if I play multiple songs on a playlist, that after each song gmplayer defaults back to the 90% or so volume level on the software mixer (the volume meter on the gui display). Does anyone know how to fix this?

EDIT: I feel like I'm running the entire show here. The default volume/playlist "problem," if you google about it, is actually the way mplayer is supposed to behave. (See http://thread.gmane.org/gmane.comp.vide … ocus=57789) Anyway, I found a workaround: use mplayer instead of gmplayer (i.e., use mplayer from the command line instead of gmplayer). This is what mplayer's manpage says about the "-af volume" parameter: "NOTE: This filter is not reentrant and can therefore only be enabled once for every audio stream." So when gmplayer plays files in a playlist, it just resets back to the 90% volume mark. HOWEVER, mplayer itself does not behave like this. If you load up a playlist in mplayer (via "mplayer -playlist playlist.txt"), mplayer will consistently use the volume setting specified in your config file as shown above!! So now that mplayer uses the software mixer's volume consistently (if you change the software volume with '9' or '0' hotkeys, mplayer will "reset" back to the volume level specified in your config file, and not back to the 90% level), you can then use the master sound volume (I use my function keys on my laptop) to tweak the volume for your listening session (e.g., headphones vs. laptop speakers).

Too bad this only works on mplayer, and not gmplayer. Oh well.

Last edited by listdata (2009-01-17 21:39:25)

Offline

Board footer

Powered by FluxBB