Kodi not using External Player, default to ffmpeg
#1
I am struggling trying to get Kodi to use MPC-HC as external player but for whatever the reason, it skip that and use internal decoder, ffmpeg. I created playercorefactory.xml and put it in the masterprofile, Appdata/roaming/kodi/userdata. The log show it did list MPC-HC as the external player but refuse to use it. It show that it is using ffmpeg and CDVDDemuxFFmpeg to handle the file. I set the rule to use MKV in MPC-HC, but it simply won't. I am not sure if I did it wrong. I check the wiki and guide and everything seem to be right but it is not working. I am not sure if Kodi is picky on the pathline or a custom mpc-hc such as KCP.

How can I get it to use the external player?

Here the debug log

Here the playercorefactory.xml

Code:
<playercorefactory>
  <players>
    <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files (x86)\KCP\MPC-HC\mpc-hc.exe</filename>
      <hidexbmc>false</hidexbmc>
      <hideconsole>false</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
  </players>
  <rules action="prepend">
    <rule filetypes="mkv" player="MPC-HC"/>
  <rules name="system rules">
    <rule name="mms/udp" protocols="mms|mmsh|udp" player="DVDPlayer" />
    <rule name="lastfm/shout" protocols="lastfm|shout" player="PAPlayer" />
    <rule name="rtmp" protocols="rtmp" player="videodefaultplayer" />

    <!-- dvdplayer can play standard rtsp streams -->
    <rule name="rtsp" protocols="rtsp" filetypes="!(rm|ra)"  player="PAPlayer" />

    <!-- Internet streams -->
    <rule name="streams" internetstream="true">
      <rule name="aacp/sdp" mimetypes="audio/aacp|application/sdp" player="DVDPlayer" />
      <rule name="mp2" mimetypes="application/octet-stream" filetypes="mp2" player="PAPlayer" />
    </rule>

    <!-- DVDs -->
    <rule name="dvd" dvd="true" player="DVDPlayer" />
    <rule name="dvdimage" dvdimage="true" player="DVDPlayer" />

    <!-- Only dvdplayer can handle these normally -->
    <rule name="sdp/asf" filetypes="sdp|asf" player="DVDPlayer" />

    <!-- Pass these to dvdplayer as we do not know if they are audio or video -->
    <rule name="nsv" filetypes="nsv" player="DVDPlayer" />

    <!-- pvr radio channels should be played by dvdplayer because they need buffering -->
    <rule name="radio" filetypes="pvr" filename=".*/radio/.*" player="DVDPlayer" />
  </rules>
</playercorefactory>

Edited: Posted a debug log in pastebin
Reply
#2
Just comparing to what is on the wiki, you seem to be missing the {args} line
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
(2016-07-22, 04:49)nickr Wrote: Just comparing to what is on the wiki, you seem to be missing the {args} line

I didn't add it in because other guides show no args line, so that why I left it out. so now I put it back in with the fullscreen args. and it is still not working. I tried to put Kodi as admin to see if that works, still not using external player.

Here the updated log
Reply
#4
Do you need filenames=*.mkv
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#5
(2016-07-22, 05:23)nickr Wrote: Do you need filenames=*.mkv

It was blank that time, so I assume that it need a filename so it can force it to use MPC-HC. So I add the filename attribute and it didn't work at all, so I just left it there because leaving it blank or adding the filename didn't get it to use MPC-HC.

Edited: Let me clarify on what I meant. When I first use the playercorefactory to set it up. I didn't put the mkv line because I didn't believe it need that one. So I load Kodi and it still using DVDPlayer to handle the file. Then I decided to add the mkv line to force it to use external player, it still not working. So I just left it there as it is because it didn't matter whenever I leave it there or not.


I might be ahead of myself but I decide to read the log. And I am seeing that it add two players which it is in 813-818 lines. One of them is MPC-HC and the second one is DVDPlayer. The videodefaultplayer use the (1). So MPC is (4) and DVDPlayer is (1). Based on that, I am assuming that it is using DVDPlayer because it is set as the video default player. 820 line show DVDPlayer is being used and opening that mkv file. even it is ignoring the rules which i explicit that mkv is open in MPC-HC only. But for whatever the reason, Kodi is not seeing that rule. Whatever the reason, videodefaultplayer is defaulting to DVDPlayer. I am trying to figure out how to change that videodefaultplayer to get it to use (4). Googling reveal minimal information on this. Even in Kodi site.

Edited: Clarification


Finally got it to work with MPC-HC. I knew about the advancedsettings but I didn't realize it need advancedsetting to override the default player. So I create a line to make sure that "MPC-HC" is the default video player and it works. It finally use MPC-HC to show the video. One tiny issue, it didn't full screen MPC. It have the args to make it full but I am assuming it the wrong args for MPC. It is solved for now. I suppose, I will figure out how to get MPC-HC to be full screen from Kodi directly then exit promptly back to Kodi when I hit escape or the video ended.
Reply
#6
I assumed that's what /fullscreen /close does in the first example in the wiki. Now that you have it working perhaps post your working file.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#7
(2016-07-22, 06:49)nickr Wrote: I assumed that's what /fullscreen /close does in the first example in the wiki. Now that you have it working perhaps post your working file.

That what I thought too. Even MPC-HC wiki agreed the same thing and yet I am unable to get it full screen automatically from Kodi.

advancedsettings.xml

Code:
<advancedsettings>
    <video>
        <defaultplayer>MPC-HC</defaultplayer>
    </video>
</advancedsettings>

playercorefactory.xml

Code:
<playercorefactory>
  <players>
    <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
      <filename>C:\Program Files (x86)\KCP\MPC-HC\mpc-hc.exe</filename>
      <args>"{1}" /fullscreen /close</args>
      <hidexbmc>false</hidexbmc>
      <hideconsole>false</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
  </players>
  <rules name="system rules">
  </rules>
</playercorefactory>

I tried to play around with args line to see if I can get it full screen. I change it to {2} and it didn't have any effect on it. So I change it back to {1} and add /play in it and that don't have any effect too. So I checked around advancedsettings wiki and see they have <fullscreenonmoviestart> and tried to add that line to advancedsettings and it didn't work. I knew it only apply to movie section, it worth a shot. so I took it out.
Reply
#8
what is the commandline option for mpc-hc to start fullscreen?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
(2016-07-22, 08:29)nickr Wrote: what is the commandline option for mpc-hc to start fullscreen?

/fullscreen
Reply
#10
My playercorefactory looks exactly the same. And MPC starts fullscreen.

Maybe its a configuration problem within MPC.
What happens if you run MPC with all parameters from windows shell manually?
Reply
#11
(2016-07-22, 09:40)icebaer Wrote: My playercorefactory looks exactly the same. And MPC starts fullscreen.

Maybe its a configuration problem within MPC.
What happens if you run MPC with all parameters from windows shell manually?

I am not sure why it is the issue. I use KCP since they came with their own MPC-HC with it. I did replaced the MPC-HC from the MPC website and it made no changes. So basically I am not sure if it is the configuration in MPC. If I did use the fresh MPC-HC directly from MPC site, and set .xml to use the MPC. It still won't use /fullscreen parameter.

I decided to go back to read the log, and discovered something interesting

Code:
01:01:50 T:5708  NOTICE: ExternalPlayer Filename: C:\Program Files (x86)\KCP\MPC-HC\mpc-hc.exe
01:01:50 T:5708 WARNING: ExternalPlayer: invalid value for warpcursor: none
01:01:50 T:5708  NOTICE: ExternalPlayer Tweaks: hideconsole (false), hidexbmc (false), islauncher (false), warpcursor (none)
01:01:50 T:5708  NOTICE: CExternalPlayer::OpenFile: C:\Users\BlackZoom\Downloads\Video\Coffee Table.mkv
01:01:50 T:5708   DEBUG: CApplication::PlayFile: OpenFile succeed, play state 1
01:01:50 T:4372   DEBUG: Thread ExternalPlayer start, auto delete: false
01:01:50 T:4372  NOTICE: CExternalPlayer::Process: Player : C:\Program Files (x86)\KCP\MPC-HC\mpc-hc.exe
01:01:50 T:4372  NOTICE: CExternalPlayer::Process: File   : C:\Users\BlackZoom\Downloads\Video\Coffee Table.mkv
01:01:50 T:4372  NOTICE: CExternalPlayer::Process: Content:
01:01:50 T:4372  NOTICE: CExternalPlayer::Process: Args   :
01:01:50 T:4372  NOTICE: CExternalPlayer::Process: Start
01:01:50 T:4372   DEBUG: CExternalPlayer::Process: Unlocking foreground window


Whatever the reason, the argument line is not there. It just gone AWOL. I don't know how Kodi does it but I am assuming if Args is blank, that mean the args is not there at all. Which it is why it is not displaying fullscreen. I am just guessing. my playercorefactory.xml is showing <args>"{1}" /fullscreen /close</args> in the line.
Reply
#12
Really weird.

Though my playercorefactory looks like yours, I can see args in my log file.
At least I can't see any relevant difference.

Code:
<playercorefactory>
    <players>
        <player name="MPC-HC" type="ExternalPlayer" audio="false" video="true">
            <filename>C:\Program Files\MPC-BE x64\mpc-be64.exe</filename>
            <args>"{1}" /fullscreen /close</args>
            <hidexbmc>false</hidexbmc>
            <hideconsole>false</hideconsole>
            <warpcursor>none</warpcursor>
            <playcountminimumtime>1140</playcountminimumtime>
        </player>
    </players>
    <rules action="prepend">
        <rule filetypes="mkv|avi|divx|ogm|mp4|mov|m4v|flv|m2v|mpeg|mpg|mts|m2ts|vob|bdmv" player="MPC-HC">
            <rule protocols="http|https" player="MPC-HC"/>
            <rule protocols="daap|rtv|rtsp|rtmp|rtmpe|rtsp|mms|rtp|pvr" player="DVDPlayer"/>
        </rule>
    </rules>
</playercorefactory>
Code:
12:52:33 T:6012  NOTICE: ExternalPlayer Filename: C:\Program Files\MPC-BE x64\mpc-be64.exe
12:52:33 T:6012 WARNING: ExternalPlayer: invalid value for warpcursor: none
12:52:33 T:6012  NOTICE: ExternalPlayer Tweaks: hideconsole (false), hidexbmc (false), islauncher (false), warpcursor (none)
12:52:33 T:6012  NOTICE: CExternalPlayer::OpenFile: smb://x.x.x.x/Movies/Captain_Phillips/Captain_Phillips_t00.mkv
12:52:33 T:4720  NOTICE: CExternalPlayer::Process: Player : C:\Program Files\MPC-BE x64\mpc-be64.exe
12:52:33 T:4720  NOTICE: CExternalPlayer::Process: File   : \\x.x.x.x\Movies\Captain_Phillips\Captain_Phillips_t00.mkv
12:52:33 T:4720  NOTICE: CExternalPlayer::Process: Content:
12:52:33 T:4720  NOTICE: CExternalPlayer::Process: Args   : "{1}" /fullscreen /close
12:52:33 T:4720  NOTICE: CExternalPlayer::Process: Start
12:52:33 T:4720  NOTICE: CExternalPlayer::ExecuteAppW32: C:\Program Files\MPC-BE x64\mpc-be64.exe "C:\Program Files\MPC-BE x64\mpc-be64.exe" "\\x.x.x.x\Movies\Captain_Phillips\Captain_Phillips_t00.mkv" /fullscreen /close
Reply
#13
@noiselessowl full log please, to pastebin.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#14
(2016-07-22, 13:11)icebaer Wrote: Really weird.

Though my playercorefactory looks like yours, I can see args in my log file.
At least I can't see any relevant difference.

Yes That is what I don't understand, hoping the log reveal something wrong with it.

(2016-07-22, 13:49)nickr Wrote: @noiselessowl full log please, to pastebin.

Here it the Debug Log
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi not using External Player, default to ffmpeg0