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

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
Sempervivum
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2020 20:29

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

Postby Sempervivum » 25 Jul 2020 20:39

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?

Hitchhiker
Big Cone-huna
Big Cone-huna
Posts: 2203
Joined: 29 Jun 2018 11:40
VLC version: 3.0.17.4
Operating System: Windows 8.1
Location: The Netherlands

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

Postby Hitchhiker » 26 Jul 2020 19:14

Default path is %PROGRAMFILES%\VideoLAN\VLC\vlc.exe (unless you didn't install it to the default location).

More info: VLC command line help

Sempervivum
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2020 20:29

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

Postby Sempervivum » 26 Jul 2020 19:19

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15257
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 26 Jul 2020 20:18

Filters are not per player, not per input/source, so yeah :audio-filter won't work.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Sempervivum
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2020 20:29

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

Postby Sempervivum » 26 Jul 2020 20:23

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.

Rémi Denis-Courmont
Developer
Developer
Posts: 15257
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

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

Postby Rémi Denis-Courmont » 26 Jul 2020 21:16

This applies to all audio & video filters settings.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Sempervivum
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2020 20:29

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

Postby Sempervivum » 26 Jul 2020 21:19

Thanks for this info. Is there any other way or workaround of increasing the volume per song?

Sempervivum
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2020 20:29

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

Postby Sempervivum » 29 Jul 2020 10:53

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"


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 42 guests