Log in

View Full Version : How to control DVobSub/VSFilter externally


arman68
19th September 2004, 23:34
I have been trying to control DVobSub/VSFilter externally for a couple of years now, and have finally found a way to do it!

Basically, all you need to do is register a shared message defined by the filter, and then send it to the filter window.

For example:

WM_DVSPREVSUB = RegisterWindowMessage(TEXT("WM_DVSPREVSUB"))
DVSWND = FindWindow("DVSWND", 0)
PostMessage(DVSWND, WM_DVSPREVSUB, 0, 0)

The possible messages are:
WM_DVSPREVSUB
WM_DVSNEXTSUB
WM_DVSHIDESUB
WM_DVSSHOWSUB
WM_DVSSHOWHIDESUB

I have made a small tool that will take 2 parameters on the command line, a message & a window handle, and send the message to the specified window. If you do not specify any parameter, it will display a form where you can enter the 2 parameters and test them.

Included in the package is a short description of valid messages and the window handle for DVobSub, and 2 batch files that call the tool to get the next subtitle, and toggle subs on/off.

Get it at http://www.savefile.com/redir/58698.zip

I use it with Girder, and at last I can control the subs with my remote on the HTPC. I know it is supposed to work with F13 to F17, but I have tried so many different ways of sending those keys to DVobSub without success; if anyone knows how to do it, it would be nice to know.

arman68
5th October 2004, 23:05
Isn't anyone interested? I thought the ability to control DVobSub externally was a sore point for many people...

Liisachan
11th October 2004, 04:06
Maybe your post was too difficult for most people.
Altho, since VSFilter is open-source, there should be a lot of scope for hacking.

Well, this might be unrelated, but don't you happen to know how you can activate the "Properties" box of VSFilter.dll externally?
That box appears easily, if you do
rundll32 path\to\VSFilter.dll,DirectVobSub
but it starts as "not focused"--especially the z-index would be the lowest on win98. So, even if you get that dialogbox externally, the end user cant see it by default...

CreateProcess(
NULL,
"rundll32.exe path\\to\\VSFilter.dll,DirectVobSub",
NULL, NULL, FALSE,
CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS,
NULL, szDir, &si, &pi );
Sleep( 500 );
HWND hDlg = FindWindow( "#32770", "Properties" );

I can SetWindowText, MoveWindow, etc. using hDlg, but I cannot SetActiveWindow( hDlg ) probably because I am not the owner of it.
Any suggestions...?

capler
13th February 2009, 20:31
I have made a small tool that will take 2 parameters on the command line, a message & a window handle, and send the message to the specified window. If you do not specify any parameter, it will display a form where you can enter the 2 parameters and test them.

Included in the package is a short description of valid messages and the window handle for DVobSub, and 2 batch files that call the tool to get the next subtitle, and toggle subs on/off.

Get it at http://www.savefile.com/redir/58698.zip

Hey arman, could you Pleeeease reupload the tool you mentioned?
I'd really like to control my mkv's subtitles with my remote and doing it via girder is probably the best way to do it - but I'd need something like what you tool provides because girder doesn't support 'RegisterWindowMessage'.
Thanks!