Jump to content

Problem with using MPC-HC as external player


saj

Recommended Posts

I use Emby for WMC heavily, and I use MPC-HC to play all my media. If I play a movie and watch it to the end or end it prematurely, everything works fine. However, If while playing the movie, I do anything unusual with MPC-HC setttings, like right click and change the subtitle option, then when the movie ends or I stop it, the Emby screen is displayed, but Emby is locked up. Indeed it is so thoroughly locked up that I cannot end it or even close Windows Media Center. I have to alt-tab to the desktop and use a Windows Taskkill command to end WMC, I have played with a lot of settings to no avail. Do you have any idea how to fix this?

 

Thanks

Link to comment
Share on other sites

Nothing comes immediately to mind unfortunately.  Perhaps one of our community members who also uses that setup...?

Link to comment
Share on other sites

One2Go

When I interact with MPC I use keyboard commands rather then mousing on the screen and so far that has worked without a hitch. But I also have experienced where WMC is locked up and I also do the same use Task manager and kill WMC. The key combination of Ctrl+Shift+ESC brings up the Task manager. It does not have the WAF approval but it works.

Link to comment
Share on other sites

jachin99

I also have had nothing but problems closing mpc-hc when it is launched through emby.  What version of MPC are you on?  Maybe try a different version?  I didn't know about the keyboard trick so thats good to know

Link to comment
Share on other sites

I also have had nothing but problems closing mpc-hc when it is launched through emby.  What version of MPC are you on?  Maybe try a different version?  I didn't know about the keyboard trick so thats good to know

 

Can you please describe what that means? thanks.

Link to comment
Share on other sites

One2Go

Here is my setup that runs so far flawless with MPC as external player and using the Throgsoft themes.

 

MPC-HC website https://mpc-hc.org/

 

Version: v1.7.11 is released March 06, 2017

 

To be fair I am using a Logitech One remote control that has a few custom commands on it like Next Audio, Sub Titles ON/OFF plus Current Play Time of media and Render Statistics. These custom commands can be defined and Customized in MPC Options.

 

Read the following thread that may help you as you need to edit the Exit part of the Options / Keys entry.  https://emby.media/community/index.php?/topic/12690-force-close-player-on-stop-button-not-working-with-mpc-hc-as-external-player/

 

In addition I do launch MPC and have it set to auto switch my projector to the frames per second of the media being played back.

 

Finally I have no difficulties with using as external players PDVD for DVDs and BDs and MPC with madVR for everything else.

 

Now display of media formats on the Emby display pages for the BD structure that is a different story but @@Luke knows that :)

Edited by One2Go
Link to comment
Share on other sites

jachin99

Can you please describe what that means? thanks.

When I had MPC-HC installed as an external player WMC or Emby would crash when I tried to exit the player.  I don't use it right now because I have a few other things to troubleshoot, and only so much time to do so.  I might try it later in the future but using MPC is pretty low on my HTPC to-do list. 

Link to comment
Share on other sites

Thanks @@ebr to all for the feedback. I have been able to solve the problem, but I had to write an AutoIt script to call MPC-HC rather than calling it directly from emby. It is clear that the mouse actions on the MPC-HC side affect emby for WMC somehow or affect how MPC-HC returns. The symptoms are that it returns to the emby screen from which I played the movie and usually displays a message saying it was unable to start emby. Sorry I don't have the exact message available at the moment. Then emby and WMC are locked and I cannot respond to the error message or do anything else except kill WMC and start over. With my script as an intermediary everything works perfectly.

Link to comment
Share on other sites

It is possible that certain actions within MPC-HC may pause the MPC web api or may have the MPC web api act differently, and EMC is not accounting for this and that's when you see the lockup.

Link to comment
Share on other sites

One2Go

That is one of the reasons I use keyboard commands from a small HTPC wireless keyboard.

 

Ctrl+I and up comes where you are time wise in the media played back.

Ctrl+R shows all the details of the media being played back, how many frames dropped and other playback information.

Ctrl+Enter MPC. Goes into full screen.

 

Check the key assignments in the options part of MPC

Edited by One2Go
Link to comment
Share on other sites

It is possible the web API is being paused, But I don't know how to tell that.I don't have to do anything very elaborate to cause the problem. Just moving the mouse, so MPC-HC displays its status information at the bottom of the screen along with the scroll bar seems to be enough. I do understand about using the keyboard, but I really prefer to have the mouse options, and the script makes everything work fine, so I 'll stick with that. Obviously it would be better if there were a way for emby to fix it. I am pretty familiar with all the MPC-HC options, and I have tried a lot of things that didn't help at all.

Link to comment
Share on other sites

I don't know if it will help at all, but I thought I would post the script in case it might offer the developers some insight into what might be happening. It follows:

 

___________________________________________________________________

 

If $CMDLINE[0] < 1 Then
    MsgBox(0," Missing Parameter","Missing Media File Name Parameter")
    Exit
EndIf
 
$MediaFileName = $CMDLINE[1]
 
RunWait(@ComSpec & " /c  pushd ..","",@SW_HIDE)
 
WinSetState("Windows Media Center","",@SW_DISABLE)
 
ShellExecuteWait("C:\Program Files\MPC-HC\mpc-hc64.exe", """"&$MediaFileName&"""", "C:\Program Files\MPC-HC", "open", @SW_Maximize)
 
ProcessWaitClose("mpc-hc64.exe")
 
RunWait(@ComSpec & " /c  popd","",@SW_HIDE)
 
WinActivate("Windows Media Center")
 
Send ("#!{ENTER}{ENTER}")
 
Exit (0)
 
______________________________________________________________
 
It's a weird little thing, and it seems to be the minimum of what I can make work consistently. It saves the current directory, actually disables Windows Media Center, calls MPC-HC, waits for MPC-HC to terminate, restores the directory, activates WMC, and then sends a WMC green button command followed by an extra enter, I found that the green button command would return me to the WMC menu pointing at my emby entry, and the extra enter command takes me back exactly where I should be in in emby (at the movie play screen).
 
It certainly wasn't an intuitive fix, but trial and error sometimes pays off.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...