VLC passing volume control to system

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.
Pembo
New Cone
New Cone
Posts: 2
Joined: 06 Mar 2010 04:45

VLC passing volume control to system

Postby Pembo » 11 Jul 2010 09:16

Using VLC 1.1.0 and lastest nightly build on a Toshiba Satellite A300 with Windows XP.

My laptop has a little volume wheel on the front, which I use to control the system volume. I think it just uses default mediakeys' volume.

Since 1.1.0, VLC has been using this to control its volume, as well as passing it through to the system.

As far as I can see, there is no option to turn this control off.

Any help?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC passing volume control to system

Postby VLC_help » 11 Jul 2010 16:33

No help for this.

Pembo
New Cone
New Cone
Posts: 2
Joined: 06 Mar 2010 04:45

Re: VLC passing volume control to system

Postby Pembo » 12 Jul 2010 04:08

This also happens on my desktop computer, using the (mediakeys) volume control knob on an HP keyboard.

Needless to say, it's unwanted behaviour. Any chance it could be fixed in a future build?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC passing volume control to system

Postby VLC_help » 12 Jul 2010 17:32

Double input is something that will be hopefully fixed.
http://trac.videolan.org/vlc/ticket/3828

Fangs404
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2010 10:16

Re: VLC passing volume control to system

Postby Fangs404 » 25 Jul 2010 10:21

Double input is something that will be hopefully fixed.
http://trac.videolan.org/vlc/ticket/3828
Just bumping to say that this bug still exists in 1.1.1. The behavior that existed prior to 1.1.x was that keyboard buttons would control the system volume only. In order to change VLC-specific volume, you'd have to use the mousewheel or VLC UI. I think this is the correct way to handle things as that is the norm with music players, computer games, and virtually every other program that outputs sound. I say this because in the ticket, you say that the correct way to do this is to allow the keyboard buttons to control the VLC-specific volume. That is incorrect and is not the standard way Windows programs operate.

xuchibara
New Cone
New Cone
Posts: 5
Joined: 29 Jul 2010 03:30

Re: VLC passing volume control to system

Postby xuchibara » 29 Jul 2010 03:33

Glad to see other people noticing this undesired change.

I was surprised and disappointed to find that this remains broken in the 1.1.1 release - a real pain for watching videos on my setup. Hopefully we can get an actual fix and not just an "unstarted" bug report.

luukgommans
New Cone
New Cone
Posts: 1
Joined: 31 Jul 2010 16:22

Re: VLC passing volume control to system

Postby luukgommans » 31 Jul 2010 16:29

Same incident occurs with my configuration too. No problem with vlc 1.0.5. But occurs with version 1.1.0. also 1.1.1. and 1.1.2. Changing back to version 1.0.5. solves it for now. So I guess it's some change in the vlc code.

Config:
Asus G73 with G110 Keyboard
Running Windows 7 x64

It would be nice to see it working the way it did before. Keyboard control for windows sound adjusting, and mouse scroll for vlc sound adjustment. I would prefer the same for mute.

BridgetKFisher
Blank Cone
Blank Cone
Posts: 11
Joined: 09 Jan 2010 06:38

Re: VLC passing volume control to system

Postby BridgetKFisher » 12 Aug 2010 05:37

This problem still exists in 1.1.2

grabthemikeandscream
New Cone
New Cone
Posts: 1
Joined: 12 Aug 2010 07:00

Re: VLC passing volume control to system

Postby grabthemikeandscream » 12 Aug 2010 07:06

Came to the boards to post about this as well.

The only way around it that I've found is, after you've opened what you want to play with VLC, click somewhere off of the program (i.e., on the desktop, in another window, etc.) THEN use the keyboard's Volume Up/Volume Down controls, and it won't affect VLC's volume.

That'll have to work until further notice, I guess.

DataGhost
New Cone
New Cone
Posts: 1
Joined: 13 Aug 2010 18:48

Re: VLC passing volume control to system

Postby DataGhost » 13 Aug 2010 19:04

There, I fixed it. I came up with a not-so-nice workaround which disables the following code without having to recompile vlc:

vlc-1.1.2/modules/gui/qt4/main_interface_win32.cpp:

Code: Select all

bool MainInterface::winEvent ( MSG * msg, long * result ) { /* ... */ switch( msg->message ) { /* ... */ case WM_APPCOMMAND: cmd = GET_APPCOMMAND_LPARAM(msg->lParam); switch(cmd) { /* ... */ // The code below is now disabled case APPCOMMAND_VOLUME_DOWN: THEAM->AudioDown(); break; case APPCOMMAND_VOLUME_UP: THEAM->AudioUp(); break; case APPCOMMAND_VOLUME_MUTE: THEAM->toggleMuteAudio(); break; // The code above is now disabled /* ... */ } break; } return false; }
and rewrites it to use the default case rather than handling the keys. "All you have to do" is open up libqt4_plugin.dll (from the plugins directory) in a hex editor, go to offset 0x8A5390 (decimal 9.065.360) and change the following sequence of bytes
70 F1 E9 68 A0 F1 E9 68 85 F1 E9 68
into
82 F0 E9 68 82 F0 E9 68 82 F0 E9 68
and save it. Unfortunately the file is about 10MB so I can't just upload it somewhere.

So far I have not found any side effects. Note that this only works with VLC 1.1.2! It is likely to break horribly in any other version. I know that this is one of the least elegant solutions out there but it'll have to do for now.

lofre
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 21:31

Re: VLC passing volume control to system

Postby lofre » 14 Aug 2010 20:31

hello,
Can you send here your new VLC files with modications ?
Thanks

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC passing volume control to system

Postby VLC_help » 15 Aug 2010 18:08

DataGhost: I sent your patch to mailing list

ExpHP
New Cone
New Cone
Posts: 4
Joined: 15 Aug 2010 18:37

Re: VLC passing volume control to system

Postby ExpHP » 15 Aug 2010 19:23

To anyone afraid of performing DataGhost's solution, I can confirm that it does indeed work. The media volume/mute keys now work properly: By default, they will change the system volume without affecting VLC. If you set them up as global hotkeys in VLC, they'll only change VLC's volume. All is as it should be.

All you have to do is open libqt4_plugin.dll in a hex editor and change the 12 bytes starting at hex address 8A5390 like he says. But I will emphasize that you should only do this if you have version 1.1.2 of VLC on Windows. If you have another version of VLC, or especially if the 12 bytes starting at address 0x8A5390 do not look like the first hex string DataGhost gave (70 F1 E9 68...), there is a very high chance that you will break VLC.

If you're still worried about editing the file, just make a backup copy of the original libqt4_plugin.dll before you edit it. Of course, this is something you ought to be doing anyways.

lofre
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 21:31

Re: VLC passing volume control to system

Postby lofre » 15 Aug 2010 22:28

hey it's work verry well ;)
Thanks for your help ExpHP ;)

xuchibara
New Cone
New Cone
Posts: 5
Joined: 29 Jul 2010 03:30

Re: VLC passing volume control to system

Postby xuchibara » 17 Aug 2010 01:47

Another confirmation that this works beautifully!

Thanks, DataGhost - you know your stuff!

golaniy
New Cone
New Cone
Posts: 1
Joined: 17 Aug 2010 14:32

Re: VLC passing volume control to system

Postby golaniy » 17 Aug 2010 14:35

i took the liberty of uploading the changed plugin file for those who dont to install a hex editor. :D
http://dl.dropbox.com/u/2093097/libqt4_plugin.dll

lofre
New Cone
New Cone
Posts: 4
Joined: 11 Aug 2010 21:31

Re: VLC passing volume control to system

Postby lofre » 19 Aug 2010 12:09

Hello,

Same problem with the new version of VLC .... 1.1.3
And the modification don't work because this is not the same code ... please help me

Lofre

Chetic
New Cone
New Cone
Posts: 1
Joined: 27 Jul 2009 02:42

Re: VLC passing volume control to system

Postby Chetic » 20 Aug 2010 00:07

Bumpedibump, listen to this chump!
This is still unchanged in 1.1.3. Intentional or what?

Otto
New Cone
New Cone
Posts: 1
Joined: 20 Aug 2010 02:50

Re: VLC passing volume control to system

Postby Otto » 20 Aug 2010 02:52

Is there any fix for this? This is basically preventing me from using VLC at all, as the volume is all wrong every time I try to use it.

Fangs404
New Cone
New Cone
Posts: 8
Joined: 25 Jul 2010 10:16

Re: VLC passing volume control to system

Postby Fangs404 » 21 Aug 2010 10:09

DataGhost: I sent your patch to mailing list
This still exists in 1.1.3, but I look forward to it getting fixed. Thanks DataGhost!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC passing volume control to system

Postby VLC_help » 21 Aug 2010 18:44

Yep. Patch hasn't been merged.

AgeKay
New Cone
New Cone
Posts: 3
Joined: 22 Aug 2010 12:09

Re: VLC passing volume control to system

Postby AgeKay » 22 Aug 2010 12:15

Thanks for the heads up on the version. This has been annoying me so much lately that I almost forgot that there was a version were this wasn't the case. I hope there is a patch or official fix for 1.1.3 soon. I can't believe it's taking them so long. Fixing this in code would take 1 minute. Please post here when either patch or fix is available. Thanks!

AgeKay
New Cone
New Cone
Posts: 3
Joined: 22 Aug 2010 12:09

Re: VLC passing volume control to system

Postby AgeKay » 22 Aug 2010 13:09

Oh --please stay polite--, 1.0.5 isn't a good solution either because it doesn't respond to media controls at all. So the best solution so far is the 1.1.2 with the patch that someone kindly uploaded. Thanks for that, btw.

wireman121
Blank Cone
Blank Cone
Posts: 12
Joined: 30 Jul 2008 21:45

Re: VLC passing volume control to system

Postby wireman121 » 02 Sep 2010 19:06

not fixed in 1.1.4 either

_yak_
New Cone
New Cone
Posts: 1
Joined: 05 Sep 2010 13:45

Re: VLC passing volume control to system

Postby _yak_ » 05 Sep 2010 13:54

Hi all, big thanks to DataGhost for providing the patch.

After looking at the original and patched DLLs and comparing that to the new one from 1.1.4 I managed to come up with a general patch that I quickly coded in Python:

Code: Select all

PATH_SRC = r'c:\program files\videolan\vlc\plugins\libqt4_plugin.dll' PATH_DST = r'libqt4_plugin.dll' src = open(PATH_SRC, 'rb') data = src.read() src.close() s = 'unknown APPCOMMAND = %d\x00' pos = data.index(s) + len(s) if pos % 4 > 0: pos += 4 - pos % 4 t = data[pos + 32 : pos + 36] data = data[:pos] + t * 3 + data[pos + 12:] dst = open(PATH_DST, 'wb') dst.write(data) dst.close()
Here's the patched DLL from VLC 1.1.4:
http://dl.dropbox.com/u/2081159/libqt4_plugin.dll

Works perfect for me.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 60 guests