I'm using mplayer to play videos. To have the option to play videos with mplayer from nautilus, I installed gnome-mplayer. I do not need the ui and it start with 0% sound while mplayer start with normal sound. I searched and they seem to be using the same config file, but why does gmplayer start with no sound? I tried a few changes, to the config file, then I tought of creating an alias gmplayer -volume 100, no luck while mplayer -volume 100 works. The volume keys (0 and 9) works with both mplayer and gmplayer. How can I get mplayer to play videos by default from nautilus or configure gmplayer to have sound by default?
- 2,332
- 1
- 13
- 17
-
You are sure it is not a matter of pulseaudio? – ridgy Jan 06 '18 at 20:37
-
It probably is a matter of pulse audio as it is using pulse audio (according to mplayer config file), it is the default. How can I change this behaviour? – kbenoit Jan 06 '18 at 20:52
-
Start `pavucontrol`, then run the different versions of your audio players (from different terminal windows, maybe). In the 'Playback' tab of `pavucontrol` look for the settings of the players. – ridgy Jan 06 '18 at 20:56
-
Thanks, that get me forward, but they are both at 100%. If I raise the volume using `gmplayer`, I then start to see the actual volume bar wobbling. I guess it mean that the problem is with what is provided to pulse audio. Thus the mplayer software based sound level reducer should be reducing sound level completely by default. – kbenoit Jan 06 '18 at 23:39
-
I notice that `mplayer` restore the audio level to the last used value at startup while `gmplayer` does not, but set it to 0 instead. – kbenoit Jan 07 '18 at 01:26
-
I just see `~/.mplayer/gui.conf` and realize it does not have any volume set. So I tried to set it, but the file is rewrote at every gmplayer startup, and not mplayer. If started with `volume=100` in `/etc/mplayer/mplayer.conf`, `mplayer` set the volume accordingly, but not `gmplayer`. – kbenoit Jan 07 '18 at 01:40
1 Answers
Found an answer:
Some of the (initial) settings of gmplayer are done in the skins definitions. These are found in /usr/share/mplayer/skins/, and usually default points to the folder clearplayer. You may change that in the context menu of gmplayer, section skin browser. The following refers to skin clearplayer.
Open the skin configuration file:
sudo nano /usr/share/mplayer/skins/default/skin (use your preferred editor).
Now find the line reading something like
hpotmeter = vol, 18, 14, NULL, 100, 0, 331, 64, 45, 14, evSetVolume
The important information is the event to trigger (evSetVolume). The values set are
vol: The name of the button image
18, 14: The size of the button image
NUll, 100: Information about special potentiometer phases
0: The default (startup) value
331, 64, 45, 14: The geometry of the box for the slider.
So, to set the default (initial) value of the volume say to 100%, just modify the default from 0 to 100. The documentation says you might even set it to - (hyphen) to respect the last value, but that did not work for me.
If there is an entry potmeter = ... evSetVolume, remove that, as it is deprecated (it will give you an error).
For more information on gmplayer skins, see http://www.mplayerhq.hu/DOCS/HTML/en/skin.html.
- 2,276
- 1
- 12
- 12
-
Thanks a lot, that let me fix the sound!!! I could not set the default volume as you said, but as I only use it to start it from Nautilus, I removed about everything and the volume is now at 50% at startup. At least there's sound and I can adjust it, I'm not thinking the speakers might be unplugged. – kbenoit Jan 08 '18 at 00:08