7

The title pretty much says it all. I am using Ubuntu MATE, which uses ALSA instead of PulseAudio. OMXplayer bypasses ALSA. Because of this OMXplayer always starts playback at 100% volume, which is far too loud (dive for cover and grab some earmuffs!). I would like to reset the default volume so this does not happen.

Is there a way to do this?

Thank you.

3
  • Are you using a pixel desktop? If so why can't you use volume control instead? Or do you mean that OMXplayer resets the volume to 100%? Nov 30, 2017 at 21:43
  • @Darkest N2O, I forgot got to mention that I am using Ubuntu MATE. The Ubuntu MATE desktop uses ALSA, which has no control over OMXplayer.
    – user72982
    Dec 1, 2017 at 6:31
  • sorry cant help you. I have never used Ubuntu before... Dec 1, 2017 at 18:49

2 Answers 2

5

If you are starting omxplayer from the command line you can use the --vol option to set the volume at start.

$man omxplayer
...
-b 
   --vol n                 set initial volume in millibels (default 0)

You can do a trial and error experiment with a few values and see which one is best suited to your likes. Then you can create an alias for omxplayer -b --vol nnnn

It's important to note that the units are millibels not decibels. So, a value of -50 is not going to do much. Since the scale is logarithmic, 3.0dB is twice or one half power. So, the -3000 set point is one half power of the default 0 setting.

How to set an alias

#alias omxplayer="omxplayer -b --vol -1000"

It's important to remember that the alias needs to be created in the proper user's environment. So, if you run omxplayer as root, you will need to create the alias in a root shell.

$sudo -s
1
0

I am also using ubuntu mate loaded on Raspberry pi 2 model B.

you can increase-decrease volume in omxplayer by following command:

omxplayer -o local --vol -1000 name.mp3 (0 to -1000.... is for low volume set)

omxplayer -o local --vol 1000 name.mp3 (0 to 1000.... is for high volume set)

you can check omxplayer's option by enter- omxplayer on terminal.

it will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.