Guide: Using MPC HC As Your Video Player In XBMC

by Damian on June 4, 2010 · 26 comments

in Guides

If you have followed my guides you know I spend a decent amount of time focusing on Windows Media Center. However, I don’t like to lock myself into just one Front End, but instead like to test out different Front Ends. If one comes along that does a better job at what I am looking for with my HTPCs then I have no problem switching over. I have messed around with XBMC for quite some time, but for one reason or another it just never quite fit in with what I was looking for. However, some of the changes I have seen come through with XBMC of late really have me looking at it as a serious contender for my HTPCs. Over the next couple of weeks I hope to put together a few writeups highlighting XBMC and some of the great features it has to offer.

One of the most important features  I look for when looking at a front end is the ability and ease to bitstream HD audio (DTS-MA and TrueHD) from my Blu Ray mkvs. As I have documented previously, I found the easiest way to bitstream HD Audio was using a 3rd party player called Media Player Classic – Home Cinema (MPC-HC). Being able to use MPC HC is not enough though, it has to integrate into whatever Front End I use seamlessly. I have been able to successfully launch MPC HC from Media Browser, so let’s take a look at how to do the same with XBMC.

Files To Download:

Setup (I am assuming you already have XBMC installed):

1. Download and install MPC HC as well as the DirectX End-User Installer (if needed)

2. You need to tell XBMC to use MPC HC as an external player. There are two methods that can be used:

UPDATE- UNLESS YOU ARE USING AN EARLIER VERSION OF XBMC (I THINK 9.04 OR EARLIER) SKIP 2(a) AND GO RIGHT TO STEP 2(b) WHICH DISCUSSES CONFIGURING USING PLAYERCOREFACTORY.XML. BIG THANKS TO STEELMAN1991 FOR GIVING ME A HAND SORTING THROUGH ALL THIS.

(a) AdvancedSettings.xml – this method is fairly straightforward, simply specify the location of the 3rd party player you want to use and adjust a few other settings (such as hiding XBMC when launching the 3rd party player). Copy the below code (obviously adjust the player path if yours is different) into NotePad++, save the file as advancedsettings.xml, and save in your Userdata folder (Users\[user]\AppData\Roaming\XBMC\)

<advancedsettings>
<video>
 <defaultplayer>externalplayer</defaultplayer>
</video>
<externalplayer>
 <filename>c:\Program Files\MPC HomeCinema\mpc-hc.exe</filename>
 <args>-fs</args>
 <forceontop>true</forceontop>
 <hidexbmc>true</hidexbmc>
 <hideconsole>false</hideconsole>
 <hidecursor>false</hidecursor>
</externalplayer>
</advancedsettings>

(b) Playercorefactory.xml – this method allows for more options then with advancedsettings.xml. Not only can you specify an external player, put you can also assign rules for when a player should be used. For instance, I only really care to have MPC HC launch for my Blu Ray mkv movies for the purpose of bitstreaming HD Audio. For all other mkvs I am fine just using the internal XBMC player. All my Blu Ray mkvs have “1080p” in the filename, so using playercorefactory.xml I can actually specify that I only want MPC HC to launch for mkvs that have “1080p” in the filename. Pretty neat, huh!!! You may ask why not have MPC HC launch for all mkvs. The reason is because every once in a while I run into issues with MPC launching from Media Browser where it either launches but doesn’t close properly or it launches but the WMC internal player starts playing a movie as well. I don’t mind dealing with a little bug here and there, but my non Blu Ray mkvs my wife usually plays when I am not home, so if I can minimize or eliminate the chance of bugs when she uses the better. Copy the below code (obviously adjust the player path if yours is different) into NotePad++, save the file as playercorefactory.xml, and save in your Userdata folder (Users\[user]\AppData\Roaming\XBMC\)

<playercorefactory>
 <players>
   <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
     <filename>C:\Program Files\MPC HomeCinema\mpc-hc.exe</filename>
     <args>"{1}" /fullscreen /close</args>
     <hidexbmc>false</hidexbmc>
     <hideconsole>false</hideconsole>
     <warpcursor>none</warpcursor>
   </player>
 </players>
 <rules action="prepend">
   <rule filetypes="mkv" filename=".*1080p.*" player="MPC-HC"/>
 </rules>
</playercorefactory>

One interesting thing I noticed, by default a playercorefactory.xml file is saved in the C:\Program Files\XBMC\System folder. If you delete this file and instead only use the playercorefactory.xml saved in the UserData folder XBMC ignores any rules set forth. So for example using the xml above, XBMC will play all videos with MPC HC instead of only 1080p mkvs as specified in the rules. If the playercorefactory.xml file is not deleted then XBMC will honor whatever rules are set. Also, you may be asking why not just edit the playercorefactory.xml file in the System folder instead of creating a new one in the UserData folder? The main reason is if you do a clean install of XBMC the files in the system folder will be overwritten so you lose any custom settings. Using the UserData folder all settings will remain even after uninstalling (as long as you uncheck the option to delete this folder).

Obviously you can customize the settings to your liking, and for more information I would recommend reading the Wiki that was put together over on the XBMC forum. I am very impressed with the integration of the 3rd party player in XBMC. When launching MPC from MediaBrowser you can see the desktop background as the switch goes from MediaBrowser to MPC. With MPC launching from XBMC you feel like you are just using the internal player, the transition feels seamless. Also, don’t forget you can easily launch XBMC from WMC as well. Stay tuned as over the coming weeks I hope to post a few more articles looking closer at XBMC.


Article by

Hi, my name is Damian, and I'm tech gadget addict! Although I always had some interest in technology, it wasn't until I got my EX470 and more importantly found Mediasmartserver.net, that my interest became an addiction. My goal, aside from world domination and to see the Mets/Broncos win another championship, is to set up the perfect digital home where all my media is available at the click of a button. When I am not writing for Mediasmartserver.net you can find me over at my blog at http://www.adigitalhomeblog.com or follow me on twitter


{ 26 comments }

amit June 5, 2010 at 6:42 am

this is actually really helpful as if you want to run xbmc and 1080p on a low powered htpc you would need to use MPC-HC as it can do hardware decode…..

steelman1991 June 18, 2010 at 1:24 am

@Damian – sent you a PM via the xbmc website regarding this guide – could you check it out and get back to me – thanks

@amit – you really need to keep up to speed – xbmc has been doing hardware acceleration natively for months now!!!!!!!!

Amit June 18, 2010 at 3:50 am

…. only in the nightlies (for windows) which is what I’ve switched to – looks very promising!

steelman1991 July 17, 2010 at 4:37 am

Hi Damian

Just a quick question – have you tried using an external player with any of the new nightly builds – I cannot get it to work in any of them.

Damian July 17, 2010 at 4:59 am

Hey Steelman,

No I haven’t tried a nightly build. I actually just checked the forums but can’t find them where I used to look. If you have a link I can download and test out

steelman1991 July 17, 2010 at 5:09 am
Damian July 17, 2010 at 5:35 am

OK, just tested using r31901 and MPC HC launches without issue (using PlayerCoreFactory)

steelman1991 July 17, 2010 at 5:43 am

Damn there must be some sort of gremlin in my system – I can’t even get the option to ‘play using…’. Just fully uninstalled (including profile folder) and reinstalled will see what happens once library has rescraped (three cheers for backups – oh and the ‘Open’ on telly – hurrah)

Damian July 17, 2010 at 5:46 am

Good luck. Where would the fun be if everything worked as expected!!!

steelman1991 July 17, 2010 at 3:01 pm

Hi Damian

Think I’ve solved it and if so – might be something worth adding to the guide. Could you check your settings and see whether you are running in ‘fake’ or fullscreen mode – I was trying to use the external player in fullscreen mode – if as I suspect it doesn’t like it then you might consider changing the guide to warn others.

Derek

Damian July 22, 2010 at 11:22 am

Derek,

Sorry for the late response, somehow I missed your comment. In MPC HC I do not have “Launch files in fullscreen” checked off, I rely on playercorefactory to run it in fullscreen mode (I assume this is what you mean by fake mode?). I will update the guide to mention this. As always, thanks for pointing out.

Cheers
Damian

Chase July 31, 2010 at 11:12 am

Damian,

I tried doing the 2b fix but XBMC doesn’t seem to want to play nice. It still uses the built-in player for 1080p MKVs and I’m at a loss as to why. I copied that xml into notepad, saved it as a .xml in %appdata%\Roaming\XBMC\ with the modified player path copied/pasted directly out of windows explorer. But no dice.
I’m sure this is a Layer 8 Error but I’m not sure what I did wrong. Any suggestions?

Damian August 3, 2010 at 12:49 pm

@ Chase,

Try setting the playercorefactory to just play mkvs (don’t filter for 1080p), see if it works then. Also, to confirm you saved the xml in the Userdata folder in (\AppData\Roaming\XBMC)

Michael August 8, 2010 at 12:28 pm

hey. this guide is awesome as I wanted mpc-hc for hardware decoding aswell. I was wondering if you found a way to have mpc automaticaly close automatically after a movie or if there is any way to control it. I am currently using the xbmc remote app for the iphone and wanted to be able to pause and stuff while in mpc. I saw somebody before write a script to close mpc after playback so it automatically switches back to xbmc. Let me know what you think and thanks again for the awesome guide.

-michael

Damian August 8, 2010 at 12:58 pm

@ Michael,

In MPC HC in the Keys section set exit to Media_Stop. That is what I have so when I hit the stop button MPC HC exits out. It should work the same when you get to the end of your movie. Let me know if that does the trick. Thanks.

Jorgo March 8, 2011 at 5:14 am

Hi,

the folder structure on windows is a bit strange. At first glance, the userdata folder could also be
\program files\XBMC\userdata\
or
\Users\[user]\AppData\Roaming\XBMC\userdata\

David November 26, 2011 at 1:40 pm

Hmmm, i’ve managed to get XMBC to use MPC, but for some reason it runs really laggy (seems that my CPU gets overworked).

Is there any option/switch i can use that can stop this? (the videos run absolutely fine if i just run them via MPC, so it’s 100% not an issue with my hardware or the videos themselves.

Thanks! :)

Meir January 13, 2012 at 8:42 pm

Can i use 3 different wild cards for the playercorefactory.xml
meaning i sometimes use 720p files with DTS audio.
can i use another line:

will that work?

friexs April 6, 2012 at 10:58 am

hi Damian,

i not able to call the mpc-hc to play the normal english series with stereo sound. i’m not looking to use xbmc for the HD content.

i’m using the same xml you put in this site, maybe u can light me which path i do it wrong? the only difference compare to your xml is the path of the mpc-hc. here’s mine.. C:\Program Files\Media Player Classic – Home Cinema\mpc-hc.exe

most of file i have in library is avi, mp4, and wmv. and i plan to use mpc-hc as default player for video and audio.
or perhaps you can suggest me some xml that can fit my need?

Brandon August 21, 2012 at 10:07 pm

I realize this is an older post but wanted to add my experience. First, thanks for posting this guide, i found it very helpful. Second, unless I’m missing something you will have to map your network drives containing movies in XBMC. I can only assume that XBMC is using Win cmdline to call external players, and cmdline does not support network paths (\\server). Lastly, I had to replace the xml in the system folder to get this to work, probably an ID10T error on my part though. Again, great article and tips, if only I can get my wife to adjust to using XMBC now…

Damian August 22, 2012 at 8:44 am

If I remember I did not need to map accounts as XBMC can see the UNC path, you just have to navigate via the Windows SMB option

Dennis September 6, 2012 at 6:30 pm

Hi Damian
Great guide, however I’m looking at using MPC-HC with reclock as the external player for XBMC, wondering if you can shed some light?

Thanks!
Dennis

Damian September 21, 2012 at 8:32 am

Hi Dennis,

Unfortunately I have only tinkered with Reclock a few times, but not enough to provide any sort of usable information

Cheers
Damian

Russel April 1, 2013 at 8:24 am

Hi Damian, thanks for a great guide, I found it invaluable in getting VC1 encoded files working on my HTPC. Your comment about getting MPC-HC to exit after playback was also very helpful.

Kris Robertson November 23, 2011 at 1:31 pm

I know this is an old thread but wanted to put this right in case someone comes along, like me and finds it.

XBMC will play all the formats you have listed above just fine and has for a long time.

Anyone reading this take this for what it is.. an advertisement which is making false claims.

Damian November 23, 2011 at 3:09 pm

Hi Kris,

The comment you replied to is spam and will be deleted.

FYI – the point of this guide was to use MPC HC in place of the XBMC player if desired. One of the benefits (for someone like me) is HD Audio bitstreaming which XBMC does not support (there are some offshoot builds but nothing official)

Cheers
Damiain

Comments are closed, visit the forums to continue the discussion.

Previous post:

Next post: