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 - canachi - 2013-01-13

(2013-01-02, 15:39)acejh1987 Wrote:
(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.

Can you please post a working batch file to play Bluray folders and ISOs with MPC-HC on FRODO?
Thanks.


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

I have found new heights of frustration.

I cannot get TMT5 to provide playback without constant stutter. Attempts to adjust refresh rate manually or through third party programs still result in constant stutter.

I have installed PowerDVD12 and so far, it plays the ISO files very smoothly without issue and auto adjusts the refresh rate when the ISO starts to play.

My issue is how to get PowerDVD to properly launch and come to focus.

I have a GT430 Nvidia card and my ISO files are stored on my network on another Windows computer. I must use Daemon tools to properly mount the files. I am running Windows 8 pro 64 bit

From XBMC Frodo RC3, I select my ISO file such as Spiderman. It will mount and launch PowerDVD, but powerDVD is in the background, not in focus. I have to then Alt-Tab to get to it and then manually click the play button.

How do I get XBMC to launch PowerDVD 12 and autoplay the disc and come to focus? I have the settings in PowerDVD to always be on top as well. Sometimes even when on top, I have no keyboard control to select menus or resume playback unless first Alt-Tabbing in.

Also, if I leave the unmounts command in place, it will mount the iso, launch powerdvd in the background, and then unmounts the image. When this happens, I can't even manually select play in PowerDVD.

Below are my playercorefactory.xml and Playiso.bat info.

Please help.

<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>true</hidexbmc>
<hideconsole>false</hideconsole>

</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>


Playiso.bat
@echo off

"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -mount dt, 0, %1
"C:\Program Files (x86)\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe" "E:"
"C:\Program Files (x86)\DAEMON Tools Lite\DTLite.exe" -unmount dt, 0




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

@mrh335 - I don't have a Windows 8 setup, so I can't offer much help here, hopefully someone can. Do you still get the focus issue if you disable auto refresh rate switching? Your codes look good to me.



(2013-01-13, 21:22)canachi Wrote: Can you please post a working batch file to play Bluray folders and ISOs with MPC-HC on FRODO?
Thanks.

Use this rule

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

and this in the PlayISO.bat

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


:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" D:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

:next

"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" %1 exit
GOTO end


:end
exit

A couple of notes -
Make sure all the paths are correct and check that the virtual drive letter is correct on this line

Code:
"C:\Program Files\MPC-HC\mpc-hc.exe" D:

With this bat file Blu-ray folders in MPC-HC will play whatever title you select from the popup menu, for example if you select "play title 100" MPC-HC will be sent that playlist (00100.mpls) to play and if you select "play menu" MPC-HC will be sent 'movieobject.bdmv'

If you want MPC-HC to always be sent the same file (eg index.bdmv) regardless of what you select from the popup selection, then the bat file will need to be changed.


(2013-01-13, 20:43)eironman23 Wrote: When will there be new settings in the first post? For frodo?

Frodo external player has become a little complicated (especially Full Blu-ray) and the codes really depend on what file(s) you want to play and what program you want to use, so it might be best to state what you want to do and someone can provide you with the best files for your needs.


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

(2013-01-14, 02:18)acejh1987 Wrote: With this bat file Blu-ray folders in MPC-HC will play whatever title you select from the popup menu, for example if you select "play title 100" MPC-HC will be sent that playlist (00100.mpls) to play and if you select "play menu" MPC-HC will be sent 'movieobject.bdmv'

If you want MPC-HC to always be sent the same file (eg index.bdmv) regardless of what you select from the popup selection, then the bat file will need to be changed.

Thank you. Bluray folders play fine. But with iso files the movie is mounted and MPC-HC opens, but the movie doesn't start. All the paths are correct and the virtual drive letter is correct on that line in the bat file.

It seems that it's not enough to point MPC-HC to the virtual drive letter?

Is there any way to get rid of the freaking pop up menu and play always the longest playlist?

Thanks again.




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

(2013-01-07, 11:58)acejh1987 Wrote:
(2013-01-07, 10:31)Ghostdivision Wrote:
(2013-01-06, 16:47)acejh1987 Wrote: Yes, it has made it awkward.

Before you start converting, try the changes I have posted, it should work fine, the batch file is longer and more complicated, but will not slow down the process.

If you do decide to just use ISO, then follow the same steps except you don't need to change your current PlayISO.bat.

Iso is working great, have not had luck with bdmv unfortunately, xbmc minimizes and tmt wont launch, but for iso it seems to work fine. Might double check the path, but it looks proper.

In the ISO player could you change this
<hideconsole>true</hideconsole>
to False

This will let you check if the batch file launches, you should see the command box popup if it does.

Let me know if it does, if it does then there is something wrong with the batch file I posted for you, we can fix it though.
If the batch file doesn't popup could you post a XBMC log.


Just had time to try this, it seems the command console pops up then closes right away, xbmc minimizes and then pops back up again as well saying theirs an external player in use, but theirs not...

Here is the log.

21:14:31 T:5788 NOTICE: ExternalPlayer Filename: C:\Users\Monty\AppData\Roaming\XBMC\userdata\Playiso.bat
21:14:31 T:5788 WARNING: ExternalPlayer: invalid value for warpcursor: none
21:14:31 T:5788 NOTICE: ExternalPlayer Tweaks: hideconsole (false), hidexbmc (true), islauncher (false), warpcursor (none)
21:14:31 T:5788 NOTICE: CExternalPlayer::OpenFile: bluray://S%3a%5cBluray%5c12%20Angry%20Men%5c/BDMV/MovieObject.bdmv
21:14:31 T:4224 NOTICE: Thread CExternalPlayer start, auto delete: false
21:14:31 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Player : C:\Users\Monty\AppData\Roaming\XBMC\userdata\Playiso.bat
21:14:31 T:4224 NOTICE: CExternalPlayer:Tonguerocess: File : S:\Bluray\12 Angry Men\BDMV\MovieObject.bdmv
21:14:31 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Content:
21:14:31 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Args : "{1}" /fullscreen
21:14:31 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Start
21:14:31 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Hiding XBMC window
21:14:31 T:4224 NOTICE: CExternalPlayer::ExecuteAppW32: "C:\Users\Monty\AppData\Roaming\XBMC\userdata\Playiso.bat" "S:\Bluray\12 Angry Men\BDMV\MovieObject.bdmv" /fullscreen
21:14:32 T:4224 NOTICE: CExternalPlayer::ExecuteAppW32: WAIT_OBJECT_0
21:14:32 T:4224 NOTICE: CExternalPlayer:Tonguerocess: XBMC cannot stay hidden for a launcher process
21:14:56 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Stop
21:14:56 T:4224 NOTICE: CExternalPlayer:Tonguerocess: Showing XBMC window



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

(2013-01-14, 03:57)canachi Wrote: Thank you. Bluray folders play fine. But with iso files the movie is mounted and MPC-HC opens, but the movie doesn't start. All the paths are correct and the virtual drive letter is correct on that line in the bat file.

It seems that it's not enough to point MPC-HC to the virtual drive letter?

Is there any way to get rid of the freaking pop up menu and play always the longest playlist?

Thanks again.

Sorry, my mistake - use this line instead

Code:
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe"   "D:\BDMV\index.bdmv"

No the popup selection can not be removed.



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

(2013-01-14, 06:18)Ghostdivision Wrote: Just had time to try this, it seems the command console pops up then closes right away, xbmc minimizes and then pops back up again as well saying theirs an external player in use, but theirs not...

Here is the log.

The log looks good, it seems to be sending the correct paths, I would say it has to be a mistake in the bat file I posted for you.

Could you post up what you now have in your playercorefactory.xml and in your playiso.bat.

Are BD ISO files still working correctly?
Do the BD folders work if you select 'play main title' on the popup selection instead of 'play menu' ?




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

Hello,

I use the Tool from the first page and it worked with PDVD10 wonderfull. I used it with Eden 11 and skin Aon nox (windows 7 32 bit).

Now I decide to use PDVD12 it doesent work. I dont know how to lose this problem.

Can somebody help me please.

I put this all parts in userdata (xbmc):



Playercorefactory.xml :

<playercorefactory>
<players>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\Dell\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\Dell\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\Dell\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)\CyberLink\PowerDVD12\PowerDVD12.exe</filename>
<args>"{1}"</args>
<hidexbmc>false</hidexbmc>

</player>
</players>
<rules action="prepend">
<!-- Bluray ISO -->
<rule filetypes="iso" player="ISO_Player"/>
<!-- Bluray BDMV -->
<rule filetypes="bdmv" player="BDMV_Player"/>
<!-- Bluray M2TS -->
<rule filetypes="m2ts" player="Universal_Player"/>
<!-- Bluray MKV -->
<rule filetypes="mkv" player="Universal_Player"/>
<!-- Bluray AVI -->
<rule filetypes="avi" player="Universal_Player"/>
<!-- Bluray TS -->
<rule filetypes="ts" player="Universal_Player"/>

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


</rules>
</playercorefactory>


PlayISO.bat :

@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 (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1
"C:\Program Files (x86)\CyberLink\PowerDVD12\PowerDVD12.exe" K:


Sorry for my poor English. I hope somebody can help me. Thanks

regards
Niva



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

Make sure your bat file paths are correct -

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

Also PowerDVD 12 paths will be different in 32 bit version of windows.

C:\Program Files (x86)\CyberLink\PowerDVD12\PowerDVD12.exe

will be

C:\Program Files\CyberLink\PowerDVD12\PowerDVD12.exe



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

Hello,

Everything seems to be corect.

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

My PowerDVD is also for 32 bit version.

Yes this is also corect wroting.
C:\Program Files\CyberLink\PowerDVD12\PowerDVD12.exe

After I choose a blue ray Iso from xbmc thann comes the massage: click ok if account is finished.

It worked with PowerDVD 10 very good. I dont know what to do!!??
thanks


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

(2013-01-14, 12:11)acejh1987 Wrote: Sorry, my mistake - use this line instead

Code:
"C:\Program Files (x86)\MPC-HC\mpc-hc.exe"   "D:\BDMV\index.bdmv"
Thanks, unfortunately it doesn't work. Again, the movie is mounted and MPC-HC opens, but the movie doesn't start.
I think a delay between the iso being mounted and MPC-HC being launched may solve the problem. I tried using "00000.mpls" and it says that doesn't exist, but when I press "Retry" the movie starts.

(2013-01-14, 12:11)acejh1987 Wrote: No the popup selection can not be removed.

That really sucks. I know it meant to be a "new feature", but it is extremely annoying. I imagine a lot of people may think this is a deal breaker to upgrade to Frodo.

Regards


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

(2013-01-14, 16:49)Nivus420 Wrote: Hello,

Everything seems to be corect.

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

My PowerDVD is also for 32 bit version.

Yes this is also corect wroting.
C:\Program Files\CyberLink\PowerDVD12\PowerDVD12.exe

After I choose a blue ray Iso from xbmc thann comes the massage: click ok if account is finished.

It worked with PowerDVD 10 very good. I dont know what to do!!??
thanks

I can't see anything from the codes that would be wrong, it could just be an issue with PowerDVD 12, I don't have PowerDVD 12 so I can't try it out.
Sorry I can't help more, hopefully someone with PowerDVD 12 can help you more.




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

(2013-01-14, 17:14)canachi Wrote: Thanks, unfortunately it doesn't work. Again, the movie is mounted and MPC-HC opens, but the movie doesn't start.
I think a delay between the iso being mounted and MPC-HC being launched may solve the problem. I tried using "00000.mpls" and it says that doesn't exist, but when I press "Retry" the movie starts.


Regards

You could add a ping delay before MPC-HC launch, or you can try this bat file, it should wait until the ISO is mounted before launching MPC-HC.
Let me know if it works, I'm assuming your Virtual Drive is D:

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


:playiso
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %1

:unmounted
IF EXIST D:\BDMV\\. GOTO mounted
GOTO unmounted

:mounted

"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" "D:\BDMV\index.bdmv"
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u
GOTO end

:next

"C:\Program Files (x86)\MPC-HC\mpc-hc.exe" %1 exit
GOTO end


:end
exit






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

[quote='acejh1987' pid='1297230' dateline='1358122687']
@mrh335 - I don't have a Windows 8 setup, so I can't offer much help here, hopefully someone can. Do you still get the focus issue if you disable auto refresh rate switching? Your codes look good to me.


I did figure out one additional item that helped me and may help others with PowerDVD 12.

In the PlayISO.bat file, insert AUTOPLAY prior to the drive letter. For me this code looked like

"C:\Program Files (x86)\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe" AUTOPLAY E:

After the ISO is mounted, this will then play the mounted ISO in virtual drive E:.
I cannot use an unmount command after this as it just unmounts the ISO and PowerDVD never plays it.
Any help to institute a proper unmount would be nice.

The only problem remaining is that the ISO file will mount and start playing, but this all happens in the background meaning PowerDVD is playing in the background behind XBMC. My only option is to Alt-Tab to switch windows to get to PowerDVD. From there on, it is good. When the video is exited, I am returned to XBMC.

I disabled the refresh rate switching in XBMC, but it is on by default in PowerDVD and this is actually the main reason I am using PowerDVD is because TMT5 would not play at the correct refresh rate and provided constant stutter even with Autofrequency was used to set the frame rate. TMT5 seems to be incompatible with my bluray ISO playback.

PowerDVD 12 gets me where I want to be, except it is not playing on top of all the windows even though this option is checked internally, but obviously not being used correctly by PowerDVD.

Can someone offer a suggestion how to get XBMC to launch PowerDVD and XBMC go to the background and PowerDVD come to the foreground with focus?



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

(2013-01-14, 19:38)mrh335 Wrote: "C:\Program Files (x86)\CyberLink\PowerDVD12\PDVDLaunchPolicy.exe" AUTOPLAY E:

I'm just been playing with the trial, using AUTOPLAY from the Cyberlink sticky thread.

PDVDLaunchPolicy.exe is what I think will be causing these problems, what happens is the batch file will wait until PDVDLaunchPolicy.exe is ended before moving to the next line (unmounting or closing).

The problem is PDVDLaunchPolicy.exe will end once PowerDVD is launched (PowerDVD12.exe is then used instead) so the batch file will assume to move to the next line thinking that PowerDVD has finished, hence why the ISO is unmounted, or it will reach the end of the batch file then XBMC will think the external player has finished (That's why XBMC comes back up)

Not sure how this can be fixed since this is just how PowerDVD 12 works, it uses PDVDLaunchPolicy.exe to open the other exe files (PowerDVD12.exe etc) once PDVDLaunchPolicy.exe has opened the required exe's it then terminates, this fools the batch file into thinking it can move on to the next line.

If you change PDVDLaunchPolicy.exe to PowerDVD12.exe in the bat file does this fix the unmounting and focus issues?

Does the AUTOPLAY argument work with "PowerDVD12.exe" instead of "PDVDLaunchPolicy.exe"?

Hope you understand what I mean about PDVDLaunchPolicy.exe, it hard to explain Blush

Edit - Has anyone else got PowerDVD 12 working correctly for BD ISO and Folders?