Kodi Community Forum
Another External Player Code, but Very Simple to Setup - 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: Another External Player Code, but Very Simple to Setup (/showthread.php?tid=116724)



RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2013-01-16

(2013-01-16, 08:29)mrh335 Wrote: Thank you for the help on this. I tried tasklist last night unsuccessfully, but tonight with your code, everything works perfectly.

I don't see the lag or issues with PDVD12 on my computer. It is quite powerful and loads things quickly as it has an I7-2600K with 16 GB of ram. Using tasklist to watch active processes is able to keep the PlayISO.bat file open and continually pinging the process list looking for PowerDVD12.exe. As long as that is active, then the batch files stays open. To return to XBMC, a ctrl+X from the keyboard commands closes PDVD12 and returns automatic to XBMC. The continualy polling in the background consumes some cycles, but nothing that seemed to cause any issues. I found the smoothness and fact that PDVD12 just does what it is supposed to to be as fast as TMT5 without the horrible stutter and lack of refresh rate adjustment seen in TMT5.

The one thing I would like to try and address is a way to only have Bluray ISO files play via PDVD12 and DVD ISO files to play using the internal player. You provided some insight to that in an earlier post, but I didn't fully understand how to implement.

I'm glad you got it working successfully, the PC I'm using to test PowerDVD 12 is not the best, so that is probably the reason it was hit and miss for me, good to know that it works though.

Regarding Blu-ray ISO only with the external player, in Frodo you can do it a couple of ways

1. Remove ISO file type from the rule, Frodo doesn't actually use ISO rules now for BD, it uses either mpls or bdmv.

<rule filetypes="BD|IFO|bdmv|mpls" player="ISO_Player"/>

2. Add something to the BD ISO filenames to identify them as Blu-ray, example "avatar.bluray.iso"

Then use a filename rule in playercorefactory

<rule filetypes="iso|bdmv|mpls" filename=".*bluray.*" player="ISO_Player"/>

The filename rule is case sensitive.












RE: Another External Player Code, but Very Simple to Setup - Nivus420 - 2013-01-16

Hi,

This should work with PowerDVD 12:


<playercorefactory>
<players>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\HTPC\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}" /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="BDMV_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\HTPC\AppData\Roaming\XBMC\userdata\PlayBDMV.bat</filename>
<args>"{1}" /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="Disc_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\HTPC\AppData\Roaming\XBMC\userdata\PlayDisc.bat</filename>
<args>"{1}" /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="Universal_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe</filename>
<args>"{1}" /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<!-- Video Files Player -->
<rule filename=".*iso.*" player="ISO_Player"/>
<rule filename=".*bdmv.*" player="BDMV_Player"/>
<rule filename=".*mkv.*" player="Universal_Player"/>
<rule filename=".*m2ts.*" player="Universal_Player"/>
<rule filename=".*avi.*" player="Universal_Player"/>
<rule filename=".*wmv.*" player="Universal_Player"/>
<rule filename=".*ts.*" player="Universal_Player"/>
<rule filename=".*mp4.*" player="Universal_Player"/>
<rule filename=".*mpeg-4.*" player="Universal_Player"/>

<!-- Bluray-DVD Disc -->
<rule name="BD-ROM" filename="D:\\.*" filetypes="bdmv|ifo" player="Disc_Player"/>
</rules>
</playercorefactory>

PlayISO.bat
@echo off
"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe" J:
"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u


PlayDisc.bat
@echo off
rem you can place your PlayDisc file in \Roaming\XBMC\userdata\
"C:\Program Files\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe" D:


PlayBDM.bat
@echo off
set pth=%1
set pth=%pth:BDMV\index.bdmv=%
"C:\Program Files\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe" %pth% exit

regards


RE: Another External Player Code, but Very Simple to Setup - bungie240 - 2013-01-16

Hi All

When playing a MKV SBS 3D file can I get MPC HC/XBMC to ask me if I would like to play in 3D mode or 2D mode upon selecting the file?

Any help appreciated.


Thanks


RE: Another External Player Code, but Very Simple to Setup - Nivus420 - 2013-01-17

Hi All,

Somebody else with finished code for working xbmc (Eden 11) with PowerDVD12? It would be helpfull to compare with my code. May be we can try to have more functionality.

hope of posting here. Thanks

regards


RE: Another External Player Code, but Very Simple to Setup - bluray - 2013-01-17

(2013-01-16, 08:29)mrh335 Wrote: <rule filetypes="BD|IFO|iso|bdmv|mpls" player="ISO_Player"/>
I noticed you have a very busy playercorefactory, but you only have ISO_Player rule. If you don't need other codes, you can remove it from playercorefactory. The less codes the easier to troubleshoot....just a thought!

I haven't been in XBMC forum lately. I have been very busy with my 5 kids, works, new home, etc this new year. It seems that acejh1987 have done a wonderful job in this thread. Keep up the good work bud! Nod



RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2013-01-17

(2013-01-17, 18:21)bluray Wrote: I haven't been in XBMC forum lately. I have been very busy with my 5 kids, works, new home, etc this new year. It seems that acejh1987 have done a wonderful job in this thread. Keep up the good work bud! Nod

Thanks for the kind words, I'll try and help out whenever I can.




RE: Another External Player Code, but Very Simple to Setup - mrh335 - 2013-01-18

(2013-01-16, 12:33)acejh1987 Wrote:
(2013-01-16, 08:29)mrh335 Wrote: Thank you for the help on this. I tried tasklist last night unsuccessfully, but tonight with your code, everything works perfectly.

I don't see the lag or issues with PDVD12 on my computer. It is quite powerful and loads things quickly as it has an I7-2600K with 16 GB of ram. Using tasklist to watch active processes is able to keep the PlayISO.bat file open and continually pinging the process list looking for PowerDVD12.exe. As long as that is active, then the batch files stays open. To return to XBMC, a ctrl+X from the keyboard commands closes PDVD12 and returns automatic to XBMC. The continualy polling in the background consumes some cycles, but nothing that seemed to cause any issues. I found the smoothness and fact that PDVD12 just does what it is supposed to to be as fast as TMT5 without the horrible stutter and lack of refresh rate adjustment seen in TMT5.

The one thing I would like to try and address is a way to only have Bluray ISO files play via PDVD12 and DVD ISO files to play using the internal player. You provided some insight to that in an earlier post, but I didn't fully understand how to implement.

I'm glad you got it working successfully, the PC I'm using to test PowerDVD 12 is not the best, so that is probably the reason it was hit and miss for me, good to know that it works though.

Regarding Blu-ray ISO only with the external player, in Frodo you can do it a couple of ways

1. Remove ISO file type from the rule, Frodo doesn't actually use ISO rules now for BD, it uses either mpls or bdmv.

<rule filetypes="BD|IFO|bdmv|mpls" player="ISO_Player"/>

2. Add something to the BD ISO filenames to identify them as Blu-ray, example "avatar.bluray.iso"

Then use a filename rule in playercorefactory

<rule filetypes="iso|bdmv|mpls" filename=".*bluray.*" player="ISO_Player"/>

The filename rule is case sensitive.



I used option 1 from above and removed the ISO from the filetypes list and DVD ISO files still load up PowerDVD.

Any thoughts to why it didn't work or what I did wrong?







RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2013-01-18

Try removing IFO from the rule too, that might be causing it to still use the external player.


RE: Another External Player Code, but Very Simple to Setup - shawonmq - 2013-01-19

can someone help me with external player for android version

I am trying to get youtube played externally as well as most large files on external MxPlayer

Here's what I have managed to code so far..\

<playercorefactory>
<players>

<player name="MXPlayerFree" type="ExternalPlayer" audio="false" video="true">

<filename>com.mxtech.videoplayer.ad</filename>

<hidexbmc>true</hidexbmc>

<playcountminimumtime>120</playcountminimumtime>
</player>


<player name="DVDPlayer" audio="true" video="true" />
</players>





<rules action="prepend">
<rule video="true" player="MXPlayerFree">

<rule filetypes="mp4|mkv|avi|divx|flv|xvid" player="MXPlayerFree">

<rule filename=".*720.*|.*1080.*" player="MXPlayerFree"/>
</rule>


<!-- Internet streams -->
<rule name="streams" internetstream="true">
<rule name="flv/aacp/sdp" mimetypes="video/x-flv|video-flv|audio/aacp|application/sdp" player="MXPlayerFree" />
</rule>
</rule>
</rules>


</playercorefactory>

My main aim is to play all large video files and youtube in external player...except live streams on internal dvdplayer..
someone please correct me..



RE: Another External Player Code, but Very Simple to Setup - LWGS - 2013-01-20

Please, where I have the error? This configuration does not work in XBMC FrodoRC3.

<playercorefactory>
<players>

<player name="Universal_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Archivos de programa\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe</filename>
<args>"{1}" /fullscreen</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>

</player>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Usuarios\LWGIL\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}" /fullscreen</args>
<hidexbmc>true</hidexbmc>
<hideconsole>false</hideconsole>
<warpcursor>none</warpcursor>
</player>

</players>
<rules action="prepend">
<rule filetypes="iso|bdmv|mpls" filename=".*bluray.*" player="ISO_Player"/>



<!-- Bluray MKV -->
<rule filename=".*mkv.*" player="Universal_Player"/>
<!-- Bluray M2TS -->
<rule filename=".*m2ts.*" player="Universal_Player"/>

<!-- Bluray Disc -->
<rule protocols="bd" player="Universal_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:\Archivos de programa\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /f=0 %1
"C:\Archivos de programa\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" F:
"C:\Archivos de programa\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /f=0 /u
GOTO end

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

"C:\Archivos de programa\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:\Archivos de programa\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" %pth% exit
GOTO end

:end
exit

Anyone can help me?
Thanks


RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2013-01-20

What are you trying to play and what problem are you having?


RE: Another External Player Code, but Very Simple to Setup - LWGS - 2013-01-20

Mkv files work OK in TMT5
BDMV files are loaded in MTM5 but not start.
ISO files and nothing: They are not loaded


RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2013-01-20

Do you see the command box pop up at all?
Your codes look fine from what I can see, nothing stands out as being wrong.
If possible could you post up a XBMC logfile for one of the files that is not working



RE: Another External Player Code, but Very Simple to Setup - LWGS - 2013-01-20

I am an apprentice in XBMC.
Where are you located the log files for XBMC that are not working?


RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2013-01-20

After you try playing the file you can find the latest log here
C:\Users\User\AppData\Roaming\XBMC\xbmc.log
You can post the content somewhere like pastebin or xbmclogs