15

I've been trying, without success, to set the volume in VLC [2.2.1] via terminal, on Ubuntu.

The parameter --volume doesn't exist anymore (Warning: option --volume no longer exists), and I can't find anything in the help which has "volume" in it.

The documentation (https://wiki.videolan.org/Documentation:Advanced_Use_of_VLC/) is outdated, as it still has the --volume option in it.

Is it still possible?

Marcus
  • 5,104
  • 2
  • 28
  • 24

4 Answers4

6

According to the documentation, --volume no longer exists but --volume-step and --gain may be used:

--gain <float> audio gain (between 0 and 8)

--volume-step <float> audio output volume step (between 1 and 256)

Note that gain is independent of volume: If you increase it, sound will be louder even though the volume setting will not change.

Philipp Moers
  • 570
  • 3
  • 15
1

Tested on MacOS using VLC 3

/Applications/VLC.app/Contents/MacOS/VLC --auhal-volume=256

Will start VLC with the set volume of 256 which corresponds to 100% of current system volume.

Can be set to 512.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
mjs
  • 21,431
  • 31
  • 118
  • 200
  • 4
    Was this option added some time between when the question was asked and now? Are those command options? What is the scale for volume, 256 is showing, is it a range from zero to 256? – Jason Aller Jan 20 '20 at 03:05
  • Thats 100%. You can set up to 512. x2. – mjs Jan 20 '20 at 12:15
  • 1
    You can add some explanation to your answer (like at least the range of the accepted values, which you mentioned in the comment), otherwise it automatically appears as "low quality" – pptaszni Jan 20 '20 at 13:04
  • @pptaszni Done! – mjs Jan 20 '20 at 20:07
  • 6
    Shame - it seems it doesn't exist on Linux (VLC v3.0.9.2): `vlc: unknown option or missing mandatory argument `--auhal-volume'`. – Marcus Jul 02 '20 at 10:09
  • check vlc --help – mjs Apr 15 '23 at 05:28
1

The original question was about Ubuntu but I just thought I'd mention in case someone using Windows comes across this question. This is the only setting that seems to work for me on Windows.

--mmdevice-volume=<float [0.000000 .. 1.250000]> 

e.g.

--mmdevice-volume=0.5

Found via the exhaustive help list, also mentioned here

Josh McGee
  • 443
  • 6
  • 16
0

Cant do it with modern vlc versions, but

2 other ways, you can use this app to set pulse stored volume for app: https://github.com/rhaas80/pa_volume

or you can use the rc interface, and send it the volume command on startup:

(echo "volume 256";cat) | vlc -I rc video.mp4

or with gui

(echo "volume 256";cat) | vlc --extraintf=rc video.mp4

(256 = 100%)

Hayden Thring
  • 1,718
  • 17
  • 25
  • I've tried the second solution (`(echo "volume 0"; cat) | vlc -I rc my_video.mp4`; VLC 3.0.16) but it has no effect, and additionally, when the video starts, there are no GUI controls. – Marcus Apr 18 '23 at 13:19
  • Works for me ! I added a command option that lets you have the GUI as well, even with no gui, you can scroll mouse wheel to see current volume, see what it is when you run your command. – Hayden Thring Apr 18 '23 at 22:24