Posts: 237
Joined: Mar 2012
Reputation:
16
I don't understand why the following plays everything with MPC-HC when I'm trying to only play HDR files with it. as I have files named such as A Star Is Born (2018) - BLURAY-2160P.TRUEHD.ATMOS.7.1.X265.10Bit.HDR.[tt1517451][332562].mkv, I figured this file would trigger the rule and open mpc.hc. I can not for the life of me figure out why it opens every file with mpc-hc. another example would be 4.3.2.1 (2010) - BLURAY-1080P.DTS.5.1.H265.8Bit.[tt1514041][44877].mkv and I would figure this would be played by VideoPlayer, but it loads up with MPC-HC...
<playercorefactory>
<players>
<player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\MPC-HC\mpc-hc64.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidekodi>true</hidekodi>
<hideconsole>true</hideconsole>
<forceontop>false</forceontop>
<playcountminimumtime>2700</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule filetypes="mkv" filename="*HDR*.*" player="MPC-HC"/>
</rules>
</playercorefactory>
Posts: 2,546
Joined: Dec 2012
Reputation:
226
2020-11-02, 02:31
(This post was last modified: 2020-11-02, 02:40 by brazen1.)
Use this:
<playercorefactory>
<players>
<player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\MPC-HC\mpc-hc64.exe</filename>
<playcountminimumtime>2700</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule filename=".*HDR*" player="MPC-HC"/>
</rules>
</playercorefactory>
Both of your files open with MPC-HC because both of them are .mkv's.
You told the script to open all .mkv file extensions with MPC-HC by adding
<rule filetypes="mkv"
The above code is directing the script to only open files that have "HDR" in the file name with MPC-HC. All other files that do not contain "HDR" in the file name will open with the default VideoPlayer.
Posts: 2,546
Joined: Dec 2012
Reputation:
226
I put
<rule filename=
<rule filetypes=
on two different lines. I have no problems.
It does appear trying to combine the lines that not only does the file have to be an .mkv, it must also have "HDR" in the file name in order for the player task be passed to MPC-HC does not work. Perhaps this is because there is no indent separating the two codes so the PCF.xml simply responds to what is indented and ignores what isn't which is exactly how your code indeed responds. Is there a reason you don't use two lines of code?
Posts: 237
Joined: Mar 2012
Reputation:
16
Thank you. trying to combine them was the problem. I just got rid of the mkv part altogether, and it all works as intended now! Thank you so very much!
Posts: 21
Joined: Nov 2020
Reputation:
0
gzpr
Junior Member
Posts: 21
How do you make kodi pass on substituted paths to external players(MPV)?
I have path substitution turned on for my video files, and while it works for the inbuilt player, MPV still gets the original paths.
Posts: 110
Joined: Sep 2012
Reputation:
1
2020-12-18, 11:32
(This post was last modified: 2020-12-18, 11:35 by willburstyle06.)
I have VLC setup as an external player for my 4K HDR files where it would seamlessly switch between the two so you couldn't tell it was using an external player. Recently though after the movie finishes it stays in VLC. Here is my playercorefactor.xml
<playercorefactory>
<players>
<player name="VLC Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\VideoLAN\VLC\vlc.exe</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
<playcountminimumtime>100000</playcountminimumtime>
</player>
</players>
<rules action="prepend">
<rule filename=".*2160p.*" player="VLC Player"/>
</rules>
</playercorefactory>
Do I have something in my playercorefactory.xml setup wrong so that it doesn't exit back to KODI?