Page 1 of 1

command line: --gain works, :gain does not

Posted: 25 Jul 2020 20:39
by Sempervivum
Dear VLC experts,
yesterday I started using VLC. Fine player so far, however I encountered one issue:
I have serveral videos where the sound level is too low. I created sortcuts and added --gain=3 to the command line. This works fine. However when I use a colon like this :gain=3, it doesn't work any longer. I'm using :start-time and :stop-time as well and both work fine with a preceeding colon. I tried the audio filter gain too and it doesn't work either.
The complete command line:
"C:\Program Files\Multimedia\VLC\vlc.exe" "D:\Gemeinsame Dateien\Musik\filename.mp4" :audio-filter=gain :gain-value=5 :start-time=93 :stop-time=247
Am I doing anything wrong or is the colon not supported for these parameters? Is there a workaround?

Re: command line: --gain works, :gain does not

Posted: 26 Jul 2020 19:14
by Hitchhiker
Default path is %PROGRAMFILES%\VideoLAN\VLC\vlc.exe (unless you didn't install it to the default location).

More info: VLC command line help

Re: command line: --gain works, :gain does not

Posted: 26 Jul 2020 19:19
by Sempervivum
I didn't install to the default directory. The program path in my command line is correct. Everything works apart from the parameter gain preceeded by a colon.
And you can be sure that I've read the manual carefully, however didn't find a solution.

Re: command line: --gain works, :gain does not

Posted: 26 Jul 2020 20:18
by Rémi Denis-Courmont
Filters are not per player, not per input/source, so yeah :audio-filter won't work.

Re: command line: --gain works, :gain does not

Posted: 26 Jul 2020 20:23
by Sempervivum
OK, that explains why it doesn't work. Does the same apply to the pure :gain? Would be regrettable as I need to adjust the volume per song.

Re: command line: --gain works, :gain does not

Posted: 26 Jul 2020 21:16
by Rémi Denis-Courmont
This applies to all audio & video filters settings.

Re: command line: --gain works, :gain does not

Posted: 26 Jul 2020 21:19
by Sempervivum
Thanks for this info. Is there any other way or workaround of increasing the volume per song?

Re: command line: --gain works, :gain does not

Posted: 29 Jul 2020 10:53
by Sempervivum
PS: I ended up in an ugly workaround: Use AutoIt and set the volume by turning the mouse wheel:

Code: Select all

#include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <File.au3> Example() Func Example() Opt("ExpandVarStrings", 1) ; Retrieve the position as well as height and width of the VLC window Local $aPos = WinGetPos("[CLASS:SkinWindowClass]") If @error = 0 Then ; Activate window WinActivate("[CLASS:SkinWindowClass]") ; Get parameters from command line $volume = $CmdLine[1] $song = $CmdLine[2] If UBound($CmdLine) < 5 Then $stop = '' Else $stop = $CmdLine[4] EndIf If UBound($CmdLine) < 4 Then $start = '' Else $start = $CmdLine[3] EndIf ; Run VLC Run('"C:\Program Files\Multimedia\VLC\vlc.exe" "$song$" $start$ $stop$') ; Pause by hitting custom shortcut "p" Send("p") ; Move the mouse into the window MouseMove($aPos[0] + 300, $aPos[1] + 200, 0) ; Set volume by turning the mouse wheel MouseWheel($MOUSE_WHEEL_DOWN, 50) MouseWheel($MOUSE_WHEEL_UP, $volume) ; Continue by hitting custom shortcut "c" Send("c") Else ;_FileWriteLog("d:\temp\log.log", "WinGetPos failed") EndIf EndFunc
Example for target in windows shortcut:

Code: Select all

"C:\Program Files (x86)\Sonstiges\AutoIt3\AutoIt3.exe" "scriptpath\playit.au3" 15 "songpath\song.mp4" ":start-time=69" ":end-time=300"