VLC from the command line / bash

At the risk of feeling really really stupid here, but I can't seem to set the VLC volume from the command line

vlc file.mp3 --vol 0 

I read the man pages as well as googled, but I cannot get the above to work. Also tried --volume 0, -vol 0, -volume 0 (and also put a volume parameter in front of the file name).

Regardless, the VLC starts at a predetermined volume. Using VLC 1.1.5 on Ubuntu. (I intend to use a string in a bash script, so I cannot use the VLC GUI) / J


Update

I tried different values. Now I run vlc with very verbose. This section looks a little suspicious (but I don't know how to interpret it!):

  [0xb7108d14] main audio output warning: PTS is out of range (-9483), dropping buffer
 [0xb7108d14] main audio output warning: PTS is out of range (-35533), dropping buffer
 [0x94384ac] mpgatofixed32 audio filter debug: libmad error: bad main_data_begin pointer
 [0xb7108d14] pulse audio output debug: Pulse stream started
 [0xb7108d14] main audio output warning: output date isn't PTS date, requesting resampling (86708)
 Warning: call to rand ()
 [0xb7108d14] main audio output warning: buffer is 86706 late, triggering upsampling
 [0xb7104654] qt4 interface debug: IM: Setting an input
 [0xb7108d14] main audio output warning: output date isn't PTS date, requesting resampling (44448)
 [0xb7108d14] main audio output warning: audio drift is too big (130928), dropping buffer
 [0x94384ac] mpgatofixed32 audio filter debug: libmad error: bad main_data_begin pointer
 [0xb7108d14] main audio output debug: audio output is starving (20040), playing silence
 [0xb7108d14] main audio output warning: resampling stopped after 16895748 usec (drift: 19049)
+6
bash volume vlc
source share
3 answers

This seems to be a known bug. Volume parameter has no effect

+7
source share

From the documentation :

  • - volume <integer> sets the audio output level (from 0 to 1024). Also applies only to local playback (e.g. --noaudio).

Have you tried to use any values ​​other than 0? What about other files (from a source other than the one you tried)?

Try using the very verbose ( -vv ) option to see if it is reporting anything.

+1
source share

For those who came to this later, I had to turn off the β€œSave Sound” option in the sound settings for this to work. I also had to use one of the other sound settings. My was:

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

Other options

 --directx-volume=<float [0.000000 .. 2.000000]> --waveout-volume=<float [0.000000 .. 2.000000]> 
0
source share

All Articles