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 - sonic00 - 2012-12-31

(2012-12-31, 21:04)acejh1987 Wrote: Does it work without using the submenu?
Not every iso file has the "Play from here" subemenu, don't know why. If I click directly on the movie, I get the new context menu, where I have to choose between the 3 things. If I choose "Show bluray menus", XBMC sends the right path to VCD and it mounts the movie correctly, after that PowerDVD starts - just like it should.

Thanks for your help.



RE: Another External Player Code, but Very Simple to Setup - acejh1987 - 2012-12-31

(2012-12-31, 21:43)sonic00 Wrote:
(2012-12-31, 21:04)acejh1987 Wrote: Does it work without using the submenu?
Not every iso file has the "Play from here" subemenu, don't know why. If I click directly on the movie, I get the new context menu, where I have to choose between the 3 things. If I choose "Show bluray menus", XBMC sends the right path to VCD and it mounts the movie correctly, after that PowerDVD starts - just like it should.

Thanks for your help.

You don't have to choose 'show menus' it should still work whatever you choose (you can pick any title from the 3 options) as long as you add mpls to the rule.
The new context menu has been added to Frodo, since it now has support for some BD menus.




RE: Another External Player Code, but Very Simple to Setup - bluray - 2012-12-31

(2012-12-31, 21:04)acejh1987 Wrote:
(2012-12-31, 20:22)bluray Wrote:
(2012-12-31, 11:57)acejh1987 Wrote: Or like I said before, just add BDMV/MPLS to the universal player file type rule and MPC will play folders without a bat file.
I know, and I tried it all a long time ago. I found certain codes works better on my HTPC's, and I stick to it and I suggested it in this thread. I preferred the bat file route.....

Yes I was just trying to help by giving you a better/quicker bat file, no need having lines in it that don't change anything.
This is still the best bat file on any HTPC for BDMV and MPC -

Code:
"C:\Program Files\MPC-HC\mpc-hc64.exe" %1 exit

One line, quick and simple, no way it will be slower than the other ones posted.
Thank you for contributes to this thread.....you're a good man!




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

(2012-12-31, 22:45)acejh1987 Wrote: You don't have to choose 'show menus' it should still work whatever you choose (you can pick any title from the 3 options) as long as you add mpls to the rule.
The new context menu has been added to Frodo, since it now has support for some BD menus.
My mistake. You're right. In Frodo RC2 it works with every option.



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

(2012-12-30, 22:21)bluray Wrote: @andcbii-
Can you re-post your playercorefactory from the notepad? It is scrambled in your last post....

Here are my files:

Code:
<playercorefactory>
<players>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="BDMV_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PlayBDMV.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="Disc_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PlayDisc.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="Universal_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PDVDLaunchPolicy.exe</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>

</player>
</players>
<rules action="prepend">
<!-- Bluray ISO -->
<rule filenames="iso" filetypes="iso" player="ISO_Player"/>

<!-- Bluray Disc -->
<rule filenames="BD" name="F:\\.*" filetypes="bdmv" player="Disc_Player"/>

</rules>
</playercorefactory>

Code:
@echo off
rem you can place your PlayBDMV file in \Roaming\XBMC\userdata\
set pth=%1
set pth=%pth:BDMV\index.bdmv=%
"%ProgramFiles%\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" %pth% exit

Code:
@echo off
rem you can place your PlayDisc file in \Roaming\XBMC\userdata\

"%ProgramFiles%\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" F:

Code:
@echo off
rem you can place your PlayISO file in \Roaming\XBMC\userdata\
rem you need to put the correct VCDMount drive letter in the command below

"C:\Program Files\DVDFab Virtual Drive\vdrive.exe" /M:F %1
"%ProgramFiles%\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" F:
"C:\Program Files\DVDFab Virtual Drive\vdrive.exe" /U:F



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

@andcbii-
I notice you have PlayBDMV.bat file, but you don't have rule for it. I added the rule for PlayBDMV.bat, and I made the rules simpler...

<playercorefactory>
<players>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="BDMV_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PlayBDMV.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="Disc_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Andrew\AppData\Roaming\XBMC\userdata\PlayDisc.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>

</player>
</players>
<rules action="prepend">
<!-- Bluray ISO -->
rule filetypes="iso" player="ISO_Player"/>
<!-- Bluray BDMV -->
<rule filetypes="bdmv" player="BDMV_Player"/>
<!-- Bluray Disc -->
<rule filetypes="bd" player="Disc_Player"/>
</rules>
</playercorefactory>

If you are looking for tips to setup MCE remote, you can check out this guide- Customised MCE


RE: Another External Player Code, but Very Simple to Setup - jespermart - 2013-01-02

(2012-12-31, 12:44)acejh1987 Wrote:
(2012-12-31, 07:52)beanie763 Wrote: At this point to get the external player to work for ISO images I had to change my video default select action from 'play' to 'choose' so that I can pick the 'Play using' option and choose one of the external player names out of a list. At least for Bluray ISO images the default in the 'Play using' list is ISO_Player. On top of that it still comes up with a popup menu to select either a title or the blu-ray menu rather than directly launching TMT5. My Blu-ray drive playback about the same too. I end up picking 'blu-ray menu' from the popup list to continue launching my external program.

Maybe someone can offer some suggestions as to where I'm going wrong with my configuration?

My first question is whether there is some way to disable the popup menu when dealing with Blu-ray source media either in a physical disk format or an ISO file and force it to parse the rules defined in the playercorefactory.xml file first? That way I could go back to having video selection do a 'play' action rather than 'choose'.

Yes, Frodo changes the way it works with ISO and external players.
To answer the first question - No, you can not skip this popup menu, this is built in to XBMC now and there is no way of disabling it.

It is the popup menu that causes a problem with ISO and external player, this is what happens -
When you select an ISO for playback, the popup menu will show, with options to play a 'title' or 'play menu'
If you select one of the titles, then XBMC will treat this file as a"MPLS' file, even though the file is a ISO, instead of looking at the ISO rules in playercorefactory, it looks at the MPLS rule and ignores any ISO rules.
Same thing happens if you select 'play menu', it will treat this as a 'BDMV' file and look at the BDMV rules instead.

You can get around this issue by using the 'play using..' like you have already found out.

First question to you is do you ever play BDMV folders? Or is it strictly Discs and ISO?
If you don't play BDMV folders then I can give you a simple fix -
Change the following lines in playercorefactory.xml

Code:
<rules action="prepend">
<rule filetypes="iso" player="ISO_Player"/>
<rule filetypes="bd|ifo" player="Disc_Player"/>
<rule filetypes="dvdimage|bdimage" player="ISO_Player"/>
<rule filename=".*bdmv.*" player="BDMV_Player"/>
</rules>

With the following

Code:
<rules action="prepend">
<rule filetypes="bd|ifo" player="Disc_Player"/>
<rule filetypes="iso|bdmv|mpls" player="ISO_Player"/>
</rules>

This should get all your Blu-ray ISO files working.
Warning though this will break BDMV folder playback, let me know if you need this and I will give you a different fix.

As for the focus problems, what settings do you have under Video Output? (System settings - System)
Do you have TMT set to launch in full screen?

I would like to have the fix which also includes the BDMV folder playback.




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

(2013-01-02, 14:00)jespermart Wrote: I would like to have the fix which also includes the BDMV folder playback.

First in playercorefactory.xml you will only need one player for ISO and BDMV.

So get rid of one of the players in playercorefactory.xml

I will assume you keep "ISO_Player"

Use this rule for the player

Code:
<rule filetypes="iso|bdmv|mpls" player="ISO_Player"/>

Assuming you are using TMT5 for playback and VCD for mounting, use this batch file for PlayISO.bat

Code:
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" D:
"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

This batch file will check what file XBMC is sending (Either ISO, BDMV or MPLS)
The file type will then determine what part of the bat file it uses.

Make sure the TMT and VCD program paths are correct and make sure the virtual drive letter is correct on this line

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

You can select any option on the Frodo popup menu, it will still work for ISO and BDMV folders.
Let me know if it works. MPC will need a different batch file.




RE: Another External Player Code, but Very Simple to Setup - jespermart - 2013-01-03

Thanks for your help, bit it didn't fix my problems.

I used your PlayISO.bat changing the path to VCD to it's driveletter F:

Below are my playercore factory file

<playercorefactory>
<players>

<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<!-- You can place your PlayISO file anywhere -->
<filename>%AppData%\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" player="ISO_Player"/>
</rules>
</playercorefactory>

I have also a XBMC log file but[/code] i dont know hot to post it in this forum

But thanks for trying to help


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

What problem is it you are having?
Try posting the log at www.pastebin.com

Also on this line in playercorefactory.xml

Code:
<filename>%AppData%\XBMC\userdata\PlayISO.bat</filename>

Try putting the full path and see if it makes any difference.

Code:
<filename>C:\Users\YourUsername\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>



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

As of last night I have been able to launch TMT5 from XBMC Frodo RC2 using the extra context menu and select Bluray menus from the option list and this has consistently worked. The one issue I need to work out is the unmounting of the ISO. I am running Windows 8 and have my ISO files stored on another Windows machine on my network. I could not get VCD to work because of this and have used Daemon tools.

1. How do you unmount ISO files automatically after done watching them?
For reference, the following command is successful to mount the ISO when the movie is selected from XBMC, but I am unsure of the unmount command.
"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount dt, 0, %1

I assume the proper unmount command would be: "C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount dt, 0 and would like is someone could confirm.

My playiso.bat file would then have the following lines:
"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount dt, 0, %1
"C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" D:
"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount dt, 0

The last line is the one I haven't tried yet to automatically unmount the ISO when I exit TMT5.

2. How to you setup automatic refresh rate using TMT5?
Question is in regard to refresh rates. I thought XBMC had properly switched rates when watching ISO files using the internal player. When using TMT5, it seems the video output to my preamp is at 1080/30p which happens to be the setting under the Nvidia control panel. I have a Asus GT430 card and installed the latest Nvidia drivers last night.

I have read that TMT5 can switch refresh rates to match the source material, but cannot find any settings for this. The only option I found last night was to manually go into the Nvidia control panel and change the output refresh rate from the computer. This seems ridiculous and cumbersome if playing content with varying refresh rates. Is there an easier way to have the refresh rate auto switch to match the source material? Is the setting a TMT5 issue or a Nvidia issue? I assume if XBMC was properly switching that the issue is TMT5.

3. Is there a way to use the XBMC internal player to play DVD iso files and TMT5 to play bluray ISO files?


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

1. Yes, your unmount code should work fine.

2. Sorry not sure about this.

3. Can you post your playercorefactory.xml - How do you name your DVD/Blu-ray ISO files? Do you add DVD or Bluray to the filename at all?


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

(2013-01-03, 21:23)acejh1987 Wrote: 1. Yes, your unmount code should work fine.

2. Sorry not sure about this.

3. Can you post your playercorefactory.xml - How do you name your DVD/Blu-ray ISO files? Do you add DVD or Bluray to the filename at all?

Thanks for the reply. I will post the xml file later tonight. I currently do not name the ISO files differently for bluray or DVD. They just use the title of the movie, but this could be easily changed as well.

If anyone else can help with the second question, I would appreciate it.


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

(2013-01-04, 00:31)mrh335 Wrote: Thanks for the reply. I will post the xml file later tonight. I currently do not name the ISO files differently for bluray or DVD. They just use the title of the movie, but this could be easily changed as well.

If anyone else can help with the second question, I would appreciate it.

I don't have an Nvidia card, but there should be an option in TMT5 settings to enable auto refresh rate switching, I think its under playback.
This was added in version 5.2.1.119 and later.

Edit - Actually if I remember correctly TMT5 built in refresh rate switching may be disabled with Nvidia cards, I don't think it supports them. Hopefully someone can offer you a solution.



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

(2013-01-03, 21:23)acejh1987 Wrote: 1. Yes, your unmount code should work fine.

2. Sorry not sure about this.

3. Can you post your playercorefactory.xml - How do you name your DVD/Blu-ray ISO files? Do you add DVD or Bluray to the filename at all?

the playercorefactory.xml file as follows:
<playercorefactory>
<players>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\markr_000\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>

</player>
<player name="BDMV_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\markr_000\AppData\Roaming\XBMC\userdata\PlayBDMV.bat</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>

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

</player>
<player name="Universal_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Program Files (x86)\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>

</player>
</players>
<rules action="prepend">
<rule filetypes="bd|ifo" player="Disc_player"/>
<rule filetypes="iso|bdmv|mpls" player="ISO_Player"/>

</rules>
</playercorefactory>