Media Player Classic

Questions and comments specific to a particular plugin should go here.
User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Media Player Classic

Post by kgschlosser » Wed May 31, 2017 6:39 am

I am looking into seeing if possibly maybe it can be done. I would need to ask the developers of the mpc-be if they have they have the original Microsoft API for controlling the thing. well errr... at least I think it's a Microsoft API I gotta check into that as well.

I have swapped out the things necessary to make it use the mpc-be version but with no success so far. I could have missed a step somewhere.
If you like the work I have been doing then feel free to Image

scorpy
Posts: 1
Joined: Sat Nov 25, 2017 7:11 pm

Re: Media Player Classic

Post by scorpy » Sat Nov 25, 2017 7:24 pm

Well, I switched to MPC-BE too and naturally, missed this plugin. Went looking around the source and... i think i got it.
I edited EventGhost\plugins\MediaPlayerClassic\__init__.py, replaced "MediaPlayerClassicW" with "MPC-BE" (there were 2 matches).
Saved file, exited Eventghost, deleted __init__.pyc and ran Eventghost again. Voila, it works :D

User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Media Player Classic

Post by kgschlosser » Tue Nov 28, 2017 5:05 pm

GREAT news!

You should modify the plugin to have a drop down box in the config to select if they want to use Media Player Classic or the BE version. we can have it populate the drop down box by checking the registry to see what is installed and if only one of them is then it will use it. but if both are installed give the user the option to.

You do the code and i will point you where you need to change things and give you pointers on what needs to be done and added. If ya want. It's a great way to learn.
If you like the work I have been doing then feel free to Image

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Media Player Classic

Post by Foune » Tue Nov 28, 2017 6:34 pm

Awesome news, I was missing this plugin since I switched to mpcbe.

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Media Player Classic

Post by Pako » Thu Nov 30, 2017 7:32 am

I'd like to share your enthusiasm, but it's not nearly as great as it seems.
Yes, some (maybe most) things work with MPC-BE.
But not all of them. For example, the "On Screen Go To ..." action is unfortunately one of them. For me personally, this is a necessary action. I use it very often.
kgschlosser wrote:
Tue Nov 28, 2017 5:05 pm
You should modify the plugin to have a drop down box in the config to select if they want to use Media Player Classic or the BE version. we can have it populate the drop down box by checking the registry to see what is installed and if only one of them is then it will use it. but if both are installed give the user the option to.
I think a cleaner solution is to make a separate plugin for MPC-BE. Of course, this would only include actions that work.
Maybe even the action "On Screen Go To ..." could work. But it would have to be programmed a bit differently than MPC-HC plugin. I can try it.
I have learned that the MPC-HC development has been stopped. That's a shame, it's the best video playback program for me. For now, fortunately, there is no reason to change it.
But it is clear that this can happen. Therefore, it would be good to have an alternative.

Pako

User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Media Player Classic

Post by kgschlosser » Thu Nov 30, 2017 8:01 am

whatever you would like to do Pako. I have not personally tested MPC-BE with this plugin. so i do not know what does and does not work.

I was personally thinking since MPC-BE, MPC-HC and Media Player Classic are for the most part are based off the same core program it would be nicer to have them all wrapped up into one plugin. this would reduce the code footprint on the things that do work. and being able to deny access to specific actions based on the MPC flavor would not be that hard. and it could be set to multiload so if more then one of the players is installed you would have the ability to control them.

Whichever way you think is best.
If you like the work I have been doing then feel free to Image

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Media Player Classic

Post by Pako » Thu Nov 30, 2017 5:16 pm

The situation seems to be better than I thought originally. Before that, I had some version 1.5.1 installed.
Now I downloaded the latest version 1.5.2 (build 3148) beta.
It works much better!
Even the "On Screen Go To ..." action is already working!
Now, the option to make a plugin common to both programs looks more realistic.

Pako

User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Media Player Classic

Post by kgschlosser » Fri Dec 01, 2017 1:51 am

awesome!. that's a good thing. and also hopefully will be a suitable replacement for ya
If you like the work I have been doing then feel free to Image

User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Media Player Classic

Post by Pako » Sun Dec 03, 2017 4:17 pm

I made the first version of the plugin that is common to MPC-HC and MPC-BE.
This is certainly not perfect, but the vast majority of actions work in both cases.

Pako
Attachments
__init__.py
Version 2.13
(112.19 KiB) Downloaded 141 times
You know flattr ? You can Image

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Media Player Classic

Post by Foune » Sun Dec 17, 2017 8:14 pm

Awesome. I use both MPC-HC and MPC-BE (one is for my LCD and the other for my projector), even if this plugin doesn't accept multiple instances now I can get my automation working with MPC-BE.

MXKM
Posts: 2
Joined: Sat Jan 20, 2018 9:21 am

Re: Media Player Classic

Post by MXKM » Sat Jan 20, 2018 9:13 pm

Pako wrote:
Sun Dec 03, 2017 4:17 pm
I made the first version of the plugin that is common to MPC-HC and MPC-BE.
This is certainly not perfect, but the vast majority of actions work in both cases.

Pako
Thank you Pako.

molitar
Experienced User
Posts: 209
Joined: Fri Sep 11, 2009 6:44 am

Re: Media Player Classic

Post by molitar » Mon Mar 18, 2019 7:08 am

Ok it officially seems this plugin is broken in Windows 10. I have tried everything to get it to work reliably even tried to go to MPC-BE and it still can not control the player. The commands like volume up, down, mute none of these work at all from EventGhost.

So these are what I tried and finally found one method that did work.

Set compatibility to Windows 7 (no change)
set compatiblity to run as administrator (no change)
try the file menu run as administrator in Eventghost (no change)
Launch Eventghost with debug from elevated command prompt (no change)

I finally found the problem and that is EventGhost must be launched after the the MPC is started. When it's working if I close the player and re-open it no longer works. I have attached debug log with this behavior.

Steps for log.
1. Opened up MPC-BE
2. Started to play video
3. Launched EventGhost with -debug
4. Changed volume up and down (worked)
5. Closed MPC-BE
6. Started MPC-BE
7. Started video playing
8. Attempted to change volume up and then down (did not work)
9. Attempted to Show OSD (did not work)

Code: Select all

03:05:17: DEBUG: 0 MainThread: ----------------------------------------
03:05:17: DEBUG: 0 MainThread: EventGhost started
03:05:17: DEBUG: 0 MainThread: ----------------------------------------
03:05:17: DEBUG: 0 MainThread: EventGhost Version: 0.5.0-rc5
03:05:17: DEBUG: 0 MainThread: Machine type: AMD64
03:05:17: DEBUG: 0 MainThread: Processor: AMD64 Family 23 Model 8 Stepping 2, AuthenticAMD
03:05:17: DEBUG: 0 MainThread: Architecture: ('32bit', 'WindowsPE')
03:05:17: DEBUG: 0 MainThread: Python:  2.7.12 CPython ('default', 'Oct 31 2016 18:42:08') [MSC v.1500 32 bit (Intel)]
03:05:17: DEBUG: 0 MainThread: ----------------------------------------
03:05:17: DEBUG: 0 MainThread: PluginManager.ScanAllPlugins :0.1295182
03:05:17: DEBUG: 0 MainThread: SendKeysParser.__init__()
03:05:17: DEBUG: 0 MainMessageReceiver: MainMessageReceiver.__MainLoop()
03:05:17: DEBUG: 0 MainMessageReceiver: MainMessageReceiver.Setup()
03:05:17: DEBUG: 0 ActionThread: ActionThread.__MainLoop()
03:05:17: DEBUG: 0 EventThread: EventThread.__MainLoop()
03:05:17: DEBUG: 0 Socket Server: starting...
03:05:17: DEBUG: 0 Socket Server: started.
03:05:17: DEBUG: 0 EventThread: EventThread.StartSession(filename=u'C:\\Program Files\\MPC-BE x64\\mpc-be64.egtree')
03:05:17: DEBUG: 0 ActionThread: ActionThread.StartSession(filename=u'C:\\Program Files\\MPC-BE x64\\mpc-be64.egtree')
03:05:17: DEBUG: 1 MainThread: OSDFrame.__init__(parent=None)
03:05:17: DEBUG: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1707484, uMsg=536L, wParam=32787L, lParam=7144248)
03:05:17: DEBUG: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1707484, uMsg=536L, wParam=32787L, lParam=7318544)
03:05:17: DEBUG: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1707484, uMsg=536L, wParam=32787L, lParam=7318640)
03:05:17: DEBUG: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=1707484, uMsg=536L, wParam=32787L, lParam=7357728)
03:05:17: DEBUG: 0 MouseThread: MouseThread.run()
03:05:17: DEBUG: 0 ActionThread: Document.Load(filePath=u'C:\\Program Files\\MPC-BE x64\\mpc-be64.egtree')
03:05:17: DEBUG: 0 ActionThread: StartLoad(cls=<class 'eg.Classes.TreeLink.TreeLink'>)
03:05:17: DEBUG: 0 MessageReceiver: MessageReceiver.__MainLoop()
03:05:17: DEBUG: 0 MessageReceiver: MessageReceiver.Setup()
03:05:17: DEBUG: 0 Thread-3: SessionChangeNotifier.Register()
03:05:17: DEBUG: 0 ActionThread: Document.SetExpandState(expanded=set([0, 4, 5, 6, 7, 24, 28, 29, 30, 31]))
03:05:17: DEBUG: 0 ActionThread: XML loaded in 0.029161 seconds.
03:05:17: DEBUG: 0 ActionThread: DXusbPCR.__start__(ignoreNumLock=True)
03:05:18: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText=u'MPC Home Mode', fontInfo=u'0;-73;0;0;0;700;0;0;0;0;3;2;1;34;Arial', textColour=(255, 0, 0), outlineColour=(0, 0, 0), alignment=4, offset=(0, 0), displayNumber=0, timeout=2.0, event=2056, skin=None)
03:05:18: DEBUG: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
03:05:18: DEBUG: 0 ActionThread: ActionThread.StartSession => None
03:05:20: DEBUG: 0 Thread-5: OSDFrame.OnTimeout()
03:05:21: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2004, skin=u'Default')
03:05:21: DEBUG: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
03:05:22: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 10%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=1436, skin=u'Default')
03:05:22: DEBUG: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
03:05:23: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 12%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=1288, skin=u'Default')
03:05:23: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 10%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=1580, skin=u'Default')
03:05:24: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2168, skin=u'Default')
03:05:26: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='                    Boogiepop wa Warawanai - 16 [HorribleSubs]\n \n[||||||||||||........................................................................................] - 12.04%\n                             Elapsed: 00:02:51 / Total: 00:23:40', fontInfo=u'0;-058;0;0;0;700;0;0;0;0;3;2;1;49;Arial', textColour=(0, 255, 255), outlineColour=(0, 0, 0), alignment=4, offset=(0, 0), displayNumber=2, timeout=2.4, event=2080, skin=None)
03:05:26: DEBUG: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
03:05:29: DEBUG: 0 Thread-17: OSDFrame.OnTimeout()
03:05:40: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2156, skin=u'Default')
03:05:40: DEBUG: 1 MainThread: OSDFrame.OnPaint(dummyEvent=<wx.PaintEvent>)
03:05:41: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2068, skin=u'Default')
03:05:42: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=1356, skin=u'Default')
03:05:42: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2208, skin=u'Default')
03:05:43: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2084, skin=u'Default')
03:05:44: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2216, skin=u'Default')
03:05:44: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2244, skin=u'Default')
03:05:44: DEBUG: 1 MainThread: OSDFrame.ShowOSD(osdText='Volume: 8%', fontInfo=u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Arial', textColour=(255, 255, 255), outlineColour=(0, 0, 0), alignment=5, offset=(0, 1000), displayNumber=2, timeout=3.0, event=2188, skin=u'Default')
03:05:47: DEBUG: 0 Thread-34: OSDFrame.OnTimeout()

Foune
Experienced User
Posts: 96
Joined: Sun Jul 03, 2011 7:08 pm

Re: Media Player Classic

Post by Foune » Mon Mar 18, 2019 7:48 am

Interesting. I spent little time to find why it stopped working suddenly under Windows 10. It seems to be related to a Windows 10 update because it worked last year. Very annoying, to be honnest..

molitar
Experienced User
Posts: 209
Joined: Fri Sep 11, 2009 6:44 am

Re: Media Player Classic

Post by molitar » Fri Mar 22, 2019 7:08 am

Ok the problem is the crappy new MPC plugin.. The stupid thing keeps launching a second blank MPC-HC whenever I open one up. I went back to the old original plugin v1.7 and it's working great. I can now run two different mpc-hc64 and depending on which one is in focus it will control that one. So why is the new plugin so broken? Why does it keep wanting to launch a second one?

If you want to review the original 1.7 code it's attached to this post.

The original version works perfectly with multiple players. Which ever one is in focus gets the commands and OSD display.
Attachments
__init__.py
(81.47 KiB) Downloaded 34 times

User avatar
kgschlosser
Site Admin
Posts: 5020
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Media Player Classic

Post by kgschlosser » Fri Mar 22, 2019 9:25 am

the newer one was done up to support other mpc players. I believe that the one the plugin originally supported was no longer being developed or some such thing..

IDK.
If you like the work I have been doing then feel free to Image

Post Reply