Page 5 of 11

Re: Media Player Classic

Posted: Mon Feb 11, 2013 9:48 am
by Pako
liggers wrote:FYI: This description box you showed doesn't exist if i run Eventghost with German language, this is why i never knew about this restriction.
Yes, that's obvious.
Already very, very long time there was not any update from translators.
German updates ended when Bitmonster left.
But I think, that even Bitmonster not translated plugins (like MPC-HC).
Do you know of anyone who would be interested in doing this?
The EventGhost project is looking for translators!

Pako

Re: Media Player Classic

Posted: Mon Mar 11, 2013 3:01 pm
by patong
Hi,
the plugin doesn't seem to work with the new versions of MPC-BE. I have Windows 8 Pro x64 installed but I don't think it has anything to do with this. I don't get any error messages, the remote works just fine and the commands show in the eventghost logger, but they just don't do anything. If you have any tips or trick please let me know! Thanks you :)

Re: Media Player Classic

Posted: Fri Mar 15, 2013 5:19 pm
by Pako
patong wrote:Hi,
the plugin doesn't seem to work with the new versions of MPC-BE.
I'm sorry, but this is not a plugin for MPC-BE:
MPC-HC_plugin.png
I think that we have no plugin for MPC-BE.
You possibly can write it if you do not like MPC-HC? :D

Pako

Re: Media Player Classic

Posted: Mon Mar 18, 2013 3:52 pm
by patong
Would it be hard to modify the current plugin to work with the BE version? They seem pretty much identical. I personally don't have a clue how to write a plugin or anything like that :(
I just think the BE version has better features and it also looks better.

Re: Media Player Classic

Posted: Tue Apr 23, 2013 9:10 pm
by molitar
This plugin does not work right I had to go back to the old. I use OSE explorer and everytime I select to play a file which I use the command for executing file it opens up one correctly and an extra MPC window opens up. OSE and Media Player Classic do not play well together! Fortunately I kept a copy of the old Media Player Classic plugin and am using it! I can't not figure out how OSE and Media Player Classic is suppose to play together since it kept opening up 2 windows one empty and one with the file I selected!

Re: Media Player Classic

Posted: Wed Apr 24, 2013 7:23 am
by Pako
I'm sorry, but I do not understand.
Can you describe it more clearly something more?
I do almost every day I use a combination of MPC-HC and OSE plugins and I have no problem.
Maybe it would be good if you put here (at least part of) your configuration file. Maybe then I'll understand what's going on.

Pako

Re: Media Player Classic

Posted: Wed Apr 24, 2013 2:20 pm
by molitar
Ok here is the configuration.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1610">
    <Folder Name="On screen explorer" Expanded="True">
        <Macro Name="Show explorer">
            <Event Name="DXusbPCR.MyPC" />
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(243), 2, True)
            </Action>
            <Action>
                EventGhost.PythonCommand(u'eg.result = eg.globals.WindowsState == "Fullscreen"')
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(475), 1, False)
            </Action>
            <Action>
                EventGhost.NewJumpIf(XmlIdLink(467), 2, False)
            </Action>
        </Macro>
        <Macro Name="Cursor Up">
            <Event Name="DXusbPCR.MouseUp" />
            <Action>
                OSE.MoveUp()
            </Action>
            <Action>
                EventGhost.AutoRepeat(0.5, 0.5, 0.10000000000000001, 0.0)
            </Action>
        </Macro>
        <Macro Name="Cursor Down">
            <Event Name="DXusbPCR.MouseDown" />
            <Action>
                OSE.MoveDown()
            </Action>
            <Action>
                EventGhost.AutoRepeat(0.5, 1.5, 0.10000000000000001, 0.0)
            </Action>
        </Macro>
        <Macro Name="Page Up">
            <Event Name="DXusbPCR.Page+" />
            <Action>
                OSE.PageUp()
            </Action>
        </Macro>
        <Macro Name="Page Down">
            <Event Name="DXusbPCR.Page-" />
            <Action>
                OSE.PageDown()
            </Action>
        </Macro>
        <Macro Name="Execute">
            <Event Name="DXusbPCR.LButton" />
            <Action>
                OSE.Execute()
            </Action>
        </Macro>
        <Macro Name="Cancel">
            <Event Name="DXusbPCR.Desktop" />
            <Event Name="DXusbPCR.Close" />
            <Action>
                OSE.Cancel()
            </Action>
        </Macro>
        <Macro Name="On screen explorer: Show explorer: D:\, [*.*] - Display 1 Tv" id="467">
            <Action>
                OSE.ShowLastMenu((75, 75, 75), (255, 255, 255), u'0;-49;0;0;0;400;0;0;0;0;3;2;1;50;\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af', u'OSE', u'Open', 0, '', u'*.*', False, (180, 180, 180), (75, 75, 75), True)
            </Action>
        </Macro>
        <Macro Name="Execute Directory">
            <Event Name="DXusbPCR.RButton" />
            <Action>
                OSE.Execute(36, u'', u'')
            </Action>
            <Action>
                EventGhost.PythonCommand(u'eg.path = \'"\' + eg.result + \'"\' + \' /play\' ')
            </Action>
            <Action>
                EventGhost.PythonCommand(u'print eg.path')
            </Action>
            <Action>
                System.Execute(u'C:\\Program Files\\Combined Community Codec Pack\\MPC\\mpc-hc.exe', u'{eg.path}', 0, False, 2, u'')
            </Action>
        </Macro>
        <Macro Name="On screen explorer: Show explorer: D:\, [*.*] - Display 2 Monitor" id="475">
            <Action>
                OSE.ShowLastMenu((75, 75, 75), (255, 255, 255), u'0;-49;0;0;0;400;0;0;0;0;3;2;1;50;\uff2d\uff33 \uff30\u30b4\u30b7\u30c3\u30af', u'OSE', u'Open', 1, '', u'*.*', False, (180, 180, 180), (75, 75, 75), True)
            </Action>
        </Macro>
        <Macro Name="On screen explorer: Go back">
            <Event Name="DXusbPCR.Backspace" />
            <Action>
                OSE.GoBack()
            </Action>
        </Macro>
        <Macro Name="On screen explorer: Get value: Get Menu item string">
            <Action>
                OSE.GetValue(0)
            </Action>
            <Action>
                EventGhost.PythonCommand(u'print eg.result')
            </Action>
            <Action Enabled="False">
                Window.SendKeys(u'{F5}', False)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
Now the new Media Player Classic has a path to launch as 'C:\Program Files\Combined Community Codec Pack\MPC\mpc-hc.exe' so what happens is when I use the Execute Button from OSE it's set to execute the associated program file and I end up with it doing that but I also end up with a blank empty Media Player Classic that the current plugin opens so I end up with 2 Media Player Windows open. One empty and one with the selected video.

Re: Media Player Classic

Posted: Wed Apr 24, 2013 2:53 pm
by Pako
It seems that you have incorrectly configured MPC-HC:
MPC-HC_settings.png
It is also necessary for other reasons.
It can not be changed.

Pako

Re: Media Player Classic

Posted: Wed Apr 24, 2013 3:01 pm
by molitar
I did try that but since OSE is opening one and the MPC plugin is opening another it's not as it's opening a single file and I have 2 opening. The one that MPC plugin is opening is a blank open file with no link to a video file so MPC is seeing it as you are opening two versions of it's self not the same video file.

The old plugin does it much better.. with it I can still open up 2 different video files if I want.. sometimes I do this especially if I want to compare two fansubs to see who looks and sounds the best but with your current plugin sounds like it will not work.

Other times I am watching an anime or movie.. than time for dinner comes up.. I will pause the anime and turn on some music in another player and go eat with the family and come back to my show afterwards.

Re: Media Player Classic

Posted: Wed Apr 24, 2013 4:33 pm
by Pako
molitar wrote:The old plugin does it much better.. with it I can still open up 2 different video files if I want.. sometimes I do this especially if I want to compare two fansubs to see who looks and sounds the best but with your current plugin sounds like it will not work.
I understand that you see it that way.
But now (when plugin communicates with MPC-HC using windows messages),
here are a few new fetaures that previously would have been impossible to do.
And I believe that the pros outweigh the cons.
molitar wrote:Other times I am watching an anime or movie.. than time for dinner comes up.. I will pause the anime and turn on some music in another player and go eat with the family and come back to my show afterwards.
I do not think I understand. You are using MPC-HC to play music?

Pako

Re: Media Player Classic

Posted: Wed Apr 24, 2013 5:26 pm
by molitar
I use it for both videos and music since I don't bother with playlists and all the other features. I just tell it to play the entire directory and leave it at that when I listen to music. I will be watching a show.. have to take a break.. so instead of stopping it where I am at.. I just pause it.. and open up another media player and start up some music.. Or another instance I will have one open on my full screen secondary display and one on my primary.. compare the two to see which fan sub is better and follow that series. So often I use two players at a time.

But even so when I tried the new plugin and set MPC to only play single mpc it was still was opening up two. When MPC plugin got called it would open up two Media Player Classics one with no file playing.. and the other that OSE opened up the one with the video file.. so I always had 2 mpc windows open.. one empty no file being played and one with the file.

So what changed that the new one can't just make the calls to the currently active MPC like the old one did?

I use mpc-hc for video files, music files, and flash shockwave files. Why run a separate shockwave player, music player, and video player when one serves all my needs.

Re: Media Player Classic

Posted: Thu Apr 25, 2013 4:19 pm
by Pako
molitar wrote:So what changed that the new one can't just make the calls to the currently active MPC like the old one did?
I do not know, I do not have the problems that you describe.
What version of MPC-HC you use?
molitar wrote:I use mpc-hc for video files, music files, and flash shockwave files. Why run a separate shockwave player, music player, and video player when one serves all my needs.
1. Just for this reason, that it is no problem to have open at the same time one player with film and other with music.
Because I do not understand - if you want to have open two instances of the same players - how EventGhost plugin should know,
to which instance it has to communicate?

2. Because the player, which is designed to play (only) music, make this work better.

Pako

Re: Media Player Classic

Posted: Fri Apr 26, 2013 12:12 am
by molitar
1.6.7.7091 (a42fccd) (blitzkrieg) (master@7082)

From latest CCCP pack

Re: Media Player Classic

Posted: Fri Apr 26, 2013 12:31 am
by molitar
I don't know all I had done was install latest version of EventGhost and this plugin and when I went to execute the file it would open two files.. One blank Media Player and one with the file selected. I than read the plugin information and changed it to only open single instance as recommended and tried it again and once again I got 2 Media Players open.. one blank and one with the select file.

Maybe a newer version of this plugin I should be trying than? What is the latest known working version?

BTW with latest EventGhost I tend to see this being repeated every few seconds is this normal?

System.RemoteDisconnect [u'']
System.RemoteConnect [u'']

------------------------------------------------------------------------------------------------------------------------------

Now on a side note is it possible to take the Get Times and ShowOSD and show a progress bar? I am currently using this code.

Code: Select all

import re

mpc = eg.WindowMatcher(u'mpc-hc.exe', None, u'MediaPlayerClassicW', None, None, None, True, 0.0, 0)
hWnd = mpc()

if len(hWnd) > 0:
    from eg.WinApi import GetWindowText
    title = GetWindowText(hWnd[0])
    if re.search(".mkv",title,re.I):
        title = title.split(".mkv")[0]
    elif re.search(".mp4",title,re.I):
        title = title.split(".mp4")[0]
    elif re.search(".avi",title,re.I):
        title = title.split(".avi")[0]
    elif re.search(".ogm",title,re.I):
        title = title.split(".ogm") [0]
    else:
        title = title.split(".")[0]
        
elaps, rem, total = eg.plugins.MediaPlayerClassic.GetTimes()
#print "elaps, rem, total =",elaps, rem, total

x = 1

while x < 4:

    if elaps != "00:00:00":
        if eg.globals.WindowsState == "Fullscreen": howManyBars = 100
        if eg.globals.WindowsState != "Fullscreen": howManyBars = 100

        secArray = elaps.split(':')
        secArrayTotal = total.split(':')
       
        secondsTotal = int(secArrayTotal[0])*(3600)+int(secArrayTotal[1])*(60)+int(secArrayTotal[2])
        secondsElapsed = int(secArray[0])*(3600)+int(secArray[1])*(60)+int(secArray[2])
       
        percent = (1.0*secondsElapsed)/(secondsTotal)*100
        percent = int(round(percent))
        bars = (percent * howManyBars)/100

        #print "percent =",percent
        #print "bars =",bars
       
        osd = title + "\n \n" + "[ " + "|" * bars + " " * (howManyBars - bars) + " ]" + "\n" + " "*30 + elaps + " / " + total

        if eg.globals.WindowsState <> "Fullscreen":
            eg.plugins.EventGhost.ShowOSD(osd, u'0;-40;0;0;0;700;0;0;0;0;3;2;1;49;Arial', (0, 255, 255), (0, 0, 0), 4, (0, 0), 1, 1.0, False)
        else:
            eg.plugins.EventGhost.ShowOSD(osd, u'0;-40;0;0;0;700;0;0;0;0;3;2;1;49;Arial', (0, 255, 255), (0, 0, 0), 4, (0, 0), 2, 1.0, False)
    eg.Wait(0.8)
    #print x
    x += 1
The problem with above code is for the 3 seconds it's displaying I can not do any other action. But the new Get Times and Show OSD does not affect any other actions. So is it possible to replicate the code above to the ShowOSD plugin? Currently I have the code below.

Code: Select all

Time: {eg.result[0]} / {eg.result[2]}
But as you can tell it's a static display with no progress bar. As you can tell also this is really old code before Get Times worked properly with MPC. So even if there is not any suggestions on trimming this code to be more efficient?

Here is how It looks now which I like but just want to know if I can clean this code up some by using the Get Times.

Image

Re: Media Player Classic

Posted: Sat Jun 15, 2013 1:52 pm
by abuttino
Any luck on getting this to work with mpc-be?