Kodi Community Forum
[WINDOWS] External Player Support Thread - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
---- Thread: [WINDOWS] External Player Support Thread (/showthread.php?tid=43511)



RE: [WINDOWS] External Player Support Thread - bluray - 2013-02-06

You can try this filetypes rule instead- <rule filetypes="mkv|avi|mp4|ts|m2ts|mts" player="MPCHC_Player"/>. If it still choose MPC-HC to play music, you can remove music file type. You can do this "post #1629". It'll allow you to choose media player....


RE: [WINDOWS] External Player Support Thread - abba77 - 2013-02-06

vmstek, also you have

filename=".*mkv.*"

is that correct method? it almost reads *.*
any extension will play. did you mean

filename="*.mkv"

and i agree, i would use filetype instead of filename


RE: [WINDOWS] External Player Support Thread - vmstek - 2013-02-06

(2013-02-06, 21:27)bluray Wrote: You can try this filetypes rule instead- <rule filetypes="mkv|avi|mp4|ts|m2ts|mts" player="MPCHC_Player"/>. If it still choose MPC-HC to play music, you can remove music file type. You can do this "post #1629". It'll allow you to choose media player....

Went with just <rule filetypes="mkv|avi|mp4|ts|m2ts|mts" player="MPCHC_Player"/> instead of filenames, which I copied from another post.
But same issue...MPC-HC is still launching for audio.
I am surprised this issue has not come up before. I'll try post #1629 next.
Thanks
Tried
<rules action="prepend">
<rule filetypes="mkv|avi|mp4|ts|m2ts|mts" player="MPCHC_Player"/>
<rule internetstream="false" player="MPCHC_Player"/>
<rule filetypes="mp3|flac" player="PAPlayer"/>
</rules

but still using MPC-HC for audio

"Play Using" worked.

But I'll keep at it until I get it right.

Worse problem is that I ticked "Party Mode once, and now when songs play with MPC, if I close MPC it relaunches immediately to the next song.
Even after un-ticking Party Mode. Does not happen with PAPlayer.

Somehow I have to get MPC-HC not to be the Default player for audio.

I tried adding <player name="PAPlayer" audio="true" video="false" /> did not work.
I tried <rule audio="false" player="MPCHC_Player"/> did not work. Thought it would since it works for internetstreams.


RE: [WINDOWS] External Player Support Thread - bluray - 2013-02-07

What is the music file type? You can remove it from this line (<rule filetypes="mkv|avi|mp4|ts|m2ts|mts" player="MPCHC_Player"/>) to stop it from using MPC-HC, and set options as mentioned on post #1629....


RE: [WINDOWS] External Player Support Thread - vmstek - 2013-02-07

just normal audio formats mp3 .flac and .wav Which according to the Wiki are included in the default audio formats list. (3.11 <musicextensions>)

even though the rule specifies only the video files for MPC-HC, XBMC thinks MPC-HC is the default player for all audio also.

I just tried adding an advancedsettings.xml file according to http://wiki.xbmc.org/index.php?title=Advancedsettings.xml#.3Caudio.3E, but still launching MPC-HC for mp3 files.
Code:
<advancedsettings>
    <audio>
        <defaultplayer>paplayer</defaultplayer>
    </audio>    
</advancedsettings>

This makes no sense. Every documented setting to use the internal audio player, after specifying an External video player, does not work.
Is every person who specified an external player for video also forced to use that same player for all audio?


RE: [WINDOWS] External Player Support Thread - bluray - 2013-02-07

These are the .xml and .bat files I uses with Frodo on all my HTPC's, and it playback using external player only the file types specified in the rules. Music and other files playback using Frodo internal player. If all else fail, you can un-install Frodo completely and re-install it. You can give the codes below a try again....

playercorefactory.xml

<playercorefactory>
<players>
<player name="ISO_BDMV_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Alien\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}"</args>
<hidexbmc>True</hidexbmc>
<hideconsole>true</hideconsole>
<forceontop>false</forceontop>

</player>
<player name="Disc_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Alien\AppData\Roaming\XBMC\userdata\PlayDisc.bat</filename>
<args>"{1}"</args>
<hidexbmc>True</hidexbmc>
<hideconsole>true</hideconsole>
<forceontop>false</forceontop>

</player>
<player name="Universal_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\MPC-HC\mpc-hc64.exe</filename>
<args>"{1}"</args>
<hidexbmc>True</hidexbmc>
<hideconsole>true</hideconsole>
<forceontop>false</forceontop>

</player>
</players>
<rules action="prepend">
<!-- Bluray ISO/BDMV -->
<rule filetypes="iso|bdmv|mpls" player="ISO_BDMV_Player"/>
<!-- Multiple files -->
<rule filetypes="m2ts|mkv|avi|ts" player="Universal_Player"/>

<!-- Bluray Disc -->
<rule filetypes="bd|ifo" player="Disc_Player"/>

</rules>
</playercorefactory>

playiso.bat

Set file=%1
Set dummy=%file:iso=%
IF NOT %dummy% == %file% (GOTO playiso) ELSE (goto next)

:next
Set file=%1
Set dummy=%file:mpls=%
IF NOT %dummy% == %file% (GOTO plaympls) ELSE (goto playbdmv)

:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" J:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

:plaympls
set pth=%1
set pth=%pth:~1,-25%

"C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" "%pth%" exit
GOTO end

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%

"C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" %pth% exit
GOTO end

:end
exit

playdisc.bat

@echo off

"C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" E:



RE: [WINDOWS] External Player Support Thread - vmstek - 2013-02-07

BINGO !!!

Re-Installed - no change still showed MPC_HC as default player in Music "Play Using" list
Rewrote playercorefactory.xml file - no change

Changed the player name from HPCHC_Player to HPC-HC, and changed some indents
And now working.! Bizarre.

Only problem this time is the Music Scaper option did not appear when adding Music directory, and Update not doing it either.

Thanks for all the assistance.




RE: [WINDOWS] External Player Support Thread - Uthred - 2013-02-19

Having a problem, set up MPC-HC as my external player for video files but for some reason its also opening when I try and play an mp3?

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

</player>
</players>

<rules action="prepend">
<rule filename=".*mkv.*" player="MPC-HC"/>
<rule filename=".*m2ts.*" player="MPC-HC"/>
<rule filename=".*mts.*" player="MPC-HC"/>
<rule filename=".*ts.*" player="MPC-HC"/>
<rule filename=".*avi.*" player="MPC-HC"/>
<rule filename=".*mp4.*" player="MPC-HC"/>
<rule internetstream="false" player="MPC-HC" />
</rules>
</playercorefactory>


RE: [WINDOWS] External Player Support Thread - ltm82 - 2013-02-20

@ Bluray

Could you please explain me how xbmc passes to an external player the path folder of a BDMV structure?

i'm trying to implement a vbs to interface xbmc (frodo) to powerdvd12 instead of using a bat file as reported here. I have found the correct command line to start the BDMV folder in Powerdvd12 but i get an issue because when i click "play" on the BDMV folder in XBMC instead of to pass the correct index.bdmv file it passes others bdmv files present in the BDMV folder structure.

the only solution that i have found is click "play" directly on the correct index.bdmv file.

How have you solved the issue using the bat file?

in particular could you explain this command line in the bat file:

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%


could you please explain the string %1 what type of string passes to pth?

thank for your help

ltm82


RE: [WINDOWS] External Player Support Thread - ltm82 - 2013-02-21

Hi to all,

I need to understand how you start the bdmv structure.

In XBMC do you start the movie clicking "play" directly on the correct index.bdmv file?

In XBMC do you start the movie clicking "play" on the folder that contain the index.bdmv?

Could you please help me?

Thanks for your help

ltm82


RE: [WINDOWS] External Player Support Thread - acejh1987 - 2013-02-22

(2013-02-20, 16:32)ltm82 Wrote: @ Bluray

in particular could you explain this command line in the bat file:

:playbdmv
set pth=%1
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%


could you please explain the string %1 what type of string passes to pth?

When you play a Blu-ray folder from the Movie library in Frodo you will get a small popup with a few options like 'Play Main Title', 'Choose Title' and 'Show Blu-ray menu', the %1 sent to the bat file will be different depending on what you choose.

If you choose the main title or one of the other titles it will send the playlist number, example -

"E:\Movies\Avatar\BDMV\PLAYLIST\00001.mpls"

If you choose the 'Show Blu-ray Menu' it will usually send the MovieObject.bdmv or index.bdmv, example -

"E:\Movies\Avatar\BDMV\MovieObject.bdmv"

So %1 would be "E:\Movies\Avatar\BDMV\MovieObject.bdmv"

set pth="E:\Movies\Avatar\BDMV\MovieObject.bdmv"
set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%

the second and third line remove 'BDMV\MovieObject.bdmv' or 'BDMV\index.bdmv' from the path

So pth will end up = "E:\Movies\Avatar\"
This path is then sent to the external player to play.

What command line are you using to start the BDMV folder in PowerDVD12?


RE: [WINDOWS] External Player Support Thread - kaffekask - 2013-02-22

(2013-02-20, 16:32)ltm82 Wrote: in particular could you explain this command line in the bat file:

:playbdmv
set pth=%1
%1 is the string passed as first argument to the script (or "subroutine" in the script), in this case "{1}" from XBMC which is the full path to the file with surrounding "".

(2013-02-20, 16:32)ltm82 Wrote: set pth=%pth:BDMV\MovieObject.bdmv=%
set pth=%pth:BDMV\index.bdmv=%
These two removes the part between : and = ("BDMV\MovieObject.bdmv" and "BDMV\index.bdmv")

set newvariable=%variabletouse:searchfor=replacewith%

The problem is with this solution that if XBMC have used another (bigger) bdmv-file the script doesn't work as you noticed.

In that case you need an other way to parse the path correctly, this can be done in several different ways in a "batch" or vbsscript (vbscript have more functions for string parsing).

This should solve the problem as long as you don't have more than one \BDMV\ in your path.
Code:
:playbdmv
set pth=%1
set pth=%pth:\BDMV\=;%
for /f "tokens=1 delims=;" %%p in ('echo %pth%') do set pth=%%p\"

May I suggest that you use Powershell instead of VBScript, that's the new batch in town.Big Grin

Edit:
And this should be a better solution.
Code:
set pth=%1
for /f "tokens=*" %%p in ("%pth%") do set pth=%%~dpp
set pth=%pth:~0,-1%
for /f "tokens=*" %%p in ("%pth%") do set pth="%%~dpp"



RE: [WINDOWS] External Player Support Thread - blimes08 - 2013-02-22

I have read and read and tried about 100 different playercoryfactory files and cant get it to go. I am trying to get Total Media Theater to play only 3D Movie this is what my current playercorefactory file looks like


<playercorefactory>
<players>
<player name="TMT6" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 6\uTotalMediaTheatre6.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>false</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filename="_3d" player="TMT6">
</rule>
</rules>
</playercorefactory>


I am using v12.0 Frodo and my files are named as followed
Finding Nemo_3D
Top Gun_3D

What can I be doing wrong??

Thank you for your time


RE: [WINDOWS] External Player Support Thread - acejh1987 - 2013-02-23

(2013-02-22, 21:49)kaffekask Wrote: The problem is with this solution that if XBMC have used another (bigger) bdmv-file the script doesn't work as you noticed.

Edit:
And this should be a better solution.
Code:
set pth=%1
for /f "tokens=*" %%p in ("%pth%") do set pth=%%~dpp
set pth=%pth:~0,-1%
for /f "tokens=*" %%p in ("%pth%") do set pth="%%~dpp"

XBMC should not be sending any BDMV file other than index.bdmv or movieobject.bdmv. Those are the only 2 bdmv files in the BDMV directory of the disc, any other files are within other folders for example 'sound.bdmv' would be in the AUXDATA folder, which would require a different batch file again.


RE: [WINDOWS] External Player Support Thread - acejh1987 - 2013-02-23

(2013-02-22, 23:16)blimes08 Wrote: I have read and read and tried about 100 different playercoryfactory files and cant get it to go. I am trying to get Total Media Theater to play only 3D Movie this is what my current playercorefactory file looks like

I am using v12.0 Frodo and my files are named as followed
Finding Nemo_3D
Top Gun_3D

What can I be doing wrong??

Thank you for your time

What file type are you trying to play?

Try changing the rule to

<rule filetypes="mkv" filename=".*_3D.*" player="TMT6"/>


This forum uses Lukasz Tkacz MyBB addons.