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

(2012-12-30, 23:45)CaptainKen Wrote: The movie I'm using as a test is Battleship.When I use PlayBDMV.bat outside of xbmc I'm getting file not found, so I select the disc via the menu and it plays directors comments, but no sound. With xbmc open and I insert bluray then I have sound, but still same problem of directors comments.

I tired The Avengers movie and that one does go straight to playing only the movie, so it must be something with Battleship?

BTW, is there a reason why VLC isn't used, as it plays everything and support menus? According to this article "Wonder how to get your VLC 2.0 to play encrypted blu-ray discs?" you only need two files. However, it's Interesting that VLC doesn't like it's menu either and when disc is opened without menu support it plays directors comments.

The PlayBDMV bat files will not work outside of XBMC, they rely on XBMC sending the path to the movie.
VLC has very limited menu support, and will not work with many menus.

What happens with VLC and MPC, is they are unable to tell which playlist on the disc is the main movie, so they make an educated guess, 95% of the time it works fine and the main movie is selected, however some movies (Like Battleship) it gets wrong, it is quite rare though (That's why Avengers was fine)

I would recommend you do one of the following
1.
Install LAV Filters for use with MPC, this way you are able to manually change the playlist to the correct one if it guesses incorrectly (Like with Battleship)
Audio/Subtitle support is a lot better when using LAV filters too.

2.
In AnyDVD, enable "Speedmenus" this will replace the disc menus/trailers/warnings with its own simple selection menu, allowing you to quickly play the main movie from the disc, you will need to use TMT5 to play the Speedmenus, but they work great.




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

(2012-12-31, 00:23)acejh1987 Wrote:
(2012-12-30, 23:45)CaptainKen Wrote: The movie I'm using as a test is Battleship.When I use PlayBDMV.bat outside of xbmc I'm getting file not found, so I select the disc via the menu and it plays directors comments, but no sound. With xbmc open and I insert bluray then I have sound, but still same problem of directors comments.

I tired The Avengers movie and that one does go straight to playing only the movie, so it must be something with Battleship?

BTW, is there a reason why VLC isn't used, as it plays everything and support menus? According to this article "Wonder how to get your VLC 2.0 to play encrypted blu-ray discs?" you only need two files. However, it's Interesting that VLC doesn't like it's menu either and when disc is opened without menu support it plays directors comments.

The PlayBDMV bat files will not work outside of XBMC, they rely on XBMC sending the path to the movie.
VLC has very limited menu support, and will not work with many menus.

What happens with VLC and MPC, is they are unable to tell which playlist on the disc is the main movie, so they make an educated guess, 95% of the time it works fine and the main movie is selected, however some movies (Like Battleship) it gets wrong, it is quite rare though (That's why Avengers was fine)

I would recommend you do one of the following
1.
Install LAV Filters for use with MPC, this way you are able to manually change the playlist to the correct one if it guesses incorrectly (Like with Battleship)
Audio/Subtitle support is a lot better when using LAV filters too.

2.
In AnyDVD, enable "Speedmenus" this will replace the disc menus/trailers/warnings with its own simple selection menu, allowing you to quickly play the main movie from the disc, you will need to use TMT5 to play the Speedmenus, but they work great.

Thank you acejh1987 for your explanations and suggestions. I'll pass on spending $90 on TMT5 and the additional money for updates to new version as they become available, so I'll go with option 1 using Lav Filters (LF).

Does this mean that I won't need the ffdshow filter?

I assume this is where I get LAV filters?

Assuming LF requires specific settings like ffdshow does, can you please provide the required settings?



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

(2012-12-31, 01:10)CaptainKen Wrote: Thank you acejh1987 for your explanations and suggestions. I'll pass on spending $90 on TMT5 and the additional money for updates to new version as they become available, so I'll go with option 1 using Lav Filters (LF).

Does this mean that I won't need the ffdshow filter?

I assume this is where I get LAV filters?

Assuming LF requires specific settings like ffdshow does, can you please provide the required settings?

I wasn't sure if you had TMT5 already, no need to buy it if you don't.
As for LF, the official page is here
This is where the developer offers support, and there are links to setup/settings guides and to download the latest version.

I would recommend LAV but it isn't a requirement, if MPC/ffdshow is working fine then you might be best leaving it as is.
You should still be able to manually change the playlist
You can try it -
While MPC-HC is playing - right click - 'navigate' - 'jump to' - You should then see the list of playlists, if by chance MPC guesses wrong then simply click another to try, they are listed by length so it shouldn't be hard to figure out which one the movie might be.
Here's a screenshot of what the playlist selection menu will look like -

Image








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

(2012-12-31, 01:49)acejh1987 Wrote:
(2012-12-31, 01:10)CaptainKen Wrote: Thank you acejh1987 for your explanations and suggestions. I'll pass on spending $90 on TMT5 and the additional money for updates to new version as they become available, so I'll go with option 1 using Lav Filters (LF).

Does this mean that I won't need the ffdshow filter?

I assume this is where I get LAV filters?

Assuming LF requires specific settings like ffdshow does, can you please provide the required settings?

I wasn't sure if you had TMT5 already, no need to buy it if you don't.
As for LF, the official page is here
This is where the developer offers support, and there are links to setup/settings guides and to download the latest version.

I would recommend LAV but it isn't a requirement, if MPC/ffdshow is working fine then you might be best leaving it as is.
You should still be able to manually change the playlist
You can try it -
While MPC-HC is playing - right click - 'navigate' - 'jump to' - You should then see the list of playlists, if by chance MPC guesses wrong then simply click another to try, they are listed by length so it shouldn't be hard to figure out which one the movie might be.
Here's a screenshot of what the playlist selection menu will look like -

Image

Ok, great thank you again for your followup again. Probably won't have a chance to do this tonight, but hopefully tommorw.



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

(2012-12-31, 00:08)acejh1987 Wrote: Are you reading my posts at all? Or try the bat file I posted?
The PlayBDMV.bat you posted does absolutely nothing! All it does is open MPC-HC (Because the other lines do nothing)
The only reason it works with MPC-HC is because like I said it does not need a bat file for BDMV folders.
Please try the following PlayBDMV.bat file for MPC-HC, I bet it works on your 3 HTPC systems too (Just change the MPC path)

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

It will work because MPC doesn't need the path changing, if you would just try it for me.

What are you expecting this line to do? Please explain.
Code:
set pth=%pth:\BDMV\PLAYLIST\*.*.mpls=%

Sorry, I'm just a little frustrated as you are not listening or answering my questions.
I didn't want to try it again, because I tried it a long time ago. It worked either way, but I found that the codes I posted seem to start the movie faster on my HTPC's.

Here are the two .bat files-

This bat file seem to start the movie a little slower on my HTPC's-
@echo off
set pth=%1
set pth=%pth:BDMV\Index.bdmv=%
"C:\Program Files\MPC-HC\mpc-hc64.exe" %1 exit

This bat file seem to start the movie a little faster on my HTPC's. I knew that I don't need this "\PLAYLIST\*.*.mpls" in the set pth, but it seem to work better with it. I knew that MPC-HC doesn't need %pth% to change path, but it doesn't hurt to leave in it.
@echo off
set pth=%1
set pth=%pth:\BDMV\PLAYLIST\*.*.mpls=%
"C:\Program Files\MPC-HC\mpc-hc64.exe" %pth% exit

Is there a reason why you are using MPC-HC for BDMV and blu-ray disc? I don't use MPC-HC. I'm strickly using TMT5 for blu-ray folder, blu-ray disc and ISO file to enjoy the original blu-ray menu. The movies that I don't need blu-ray menu, I use XBMC internal player....


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

I have been fighting with XBMC Frodo RC2 on my new HTPC trying to get the Bluray ISO and Bluray disk playback to work with TMT5 in an external player setup like it does on my XBMC Eden desktop. I figured I'd get the basics working before I moved onto enabling PVR functionality and losing what little hair I have left on my head.

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'.

Another thing that I have noticed is that when the external player rule is processed and it launches my PlayISO or PlayDisc batch files that TMT5 is not the focused window so you would need to click with the mouse to bring the program to be the active window. XBMC Eden didn't seem to have that type of problem. Is there some way to set the window focus on a program launched from a batch file? I have tried hideconsole set to true rather than false for ISO_Player in my XML file with no luck.

Sometimes launching TMT5 goes into some kind of ping pong launch almost like its waiting for XBMC to release the audio device and fails ultimately returns back to XBMC. Should I put some kind of sleep or wait in my batch file? I noticed one person was workign on putting a ping into one of their scripts to essentially add a 2 second wait before launching their media player program. ping -n 2 -w 1000 127.0.0.1 > nul
Is it recommended to maybe put a second or 2 wait before launching TMT5 into my batch scripts?

Software: XBMC Frodo RC2
OS: Windows 7 Professional 64bit
CPU: I7-3770
Memory: 8GB
Graphics Card: ATI Radeon HD 6770 w/HDMI
Speakers set to 5.1 to match my Denon AVR-791 receiver configuration.
Audio: Directsound HDMI (WASAPI HDMI causes slow video and/or XBMC hang)
Bluray player: TotalMedia Theatre 5 installed at D:\apps\ArcSoft\TotalMedia Theatre 5
ISO Mounter: Virtual CloneDrive
Physical Blu-ray drive: E:
Virtual Clonedrive drive: F:

ATI HDMI Ouput is set to allow applications to take exclusive control and set to give exclusive mode applications priority.

My xml file is a work in progress since I've been experimenting trying to get XBMC not to do the Blu-ray title/menu pick. If I let it do the default player then XBMC plays the ISO image/Blu-Ray rather than processing the external player.

playercorefactory.xml
<playercorefactory>
<players>
<player name="Disc_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\mediapc\AppData\Roaming\XBMC\userdata\PlayDisc.bat</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>bottomleft</warpcursor>
</player>
<player name="ISO_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\mediapc\AppData\Roaming\XBMC\userdata\PlayISO.bat</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>bottomleft</warpcursor>
</player>
<player name="Universal_Player" type="ExternalPlayer" audio="false" video="true">
<filename>D:\apps\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe</filename>
<args>"{1}" /fullscreen /close</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>bottomleft</warpcursor>
</player>
<player name="BDMV_Player" type="ExternalPlayer" audio="false" video="true">
<filename>C:\Users\mediapc\AppData\Roaming\XBMC\userdata\PlayBDMV.bat</filename>
<args>"{1}"</args>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<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>
</playercorefactory>

PlayDisc.bat
"D:\app\ArcSoft\TotalMedia Theatre 5\uMCEPlayer5.exe" E:

PlayISO.bat
@echo off
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\vcdmount.exe" /d=0 %1
"D:\apps\ArcSoft\TotalMedia Theatre 5\uMCEPlayer5.exe" F:
"C:\Program Files (x86)\Elaborate Bytes\VirtualCloneDrive\vcdmount.exe" /d=0 /u

PlayBDMV.bat
@echo off
set pth=%1
set pth=%pth:BDMV\index.bdmv=%
"D:\apps\ArcSoft\TotalMedia Theatre 5\uTotalMediaTheatre5.exe" %pth% exit

I would appreciate any advice on tweaking my xml configs andn scripts. I probably don't need PlayBDMV.bat either since either I play commercial Blu-Ray discs or ISO images a few discs I don't want to wear out.

Thanks!


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

(2012-12-31, 04:37)bluray Wrote: I didn't want to try it again, because I tried it a long time ago. It worked either way, but I found that the codes I posted seem to start the movie faster on my HTPC's.

Here are the two .bat files-

This bat file seem to start the movie a little slower on my HTPC's-
@echo off
set pth=%1
set pth=%pth:BDMV\Index.bdmv=%
"C:\Program Files\MPC-HC\mpc-hc64.exe" %1 exit

This bat file seem to start the movie a little faster on my HTPC's. I knew that I don't need this "\PLAYLIST\*.*.mpls" in the set pth, but it seem to work better with it. I knew that MPC-HC doesn't need %pth% to change path, but it doesn't hurt to leave in it.
@echo off
set pth=%1
set pth=%pth:\BDMV\PLAYLIST\*.*.mpls=%
"C:\Program Files\MPC-HC\mpc-hc64.exe" %pth% exit

Is there a reason why you are using MPC-HC for BDMV and blu-ray disc? I don't use MPC-HC. I'm strickly using TMT5 for blu-ray folder, blu-ray disc and ISO file to enjoy the original blu-ray menu. The movies that I don't need blu-ray menu, I use XBMC internal player....

The first bat file will be slower, because it is valid and will change the path

Code:
set pth=%pth:BDMV\Index.bdmv=%

This line will remove the file name and send the folder to MPC to play, since MPC plays "index.bdmv' anyway it has to look and find 'index.bdmv'

The second file is quicker because the following line is invalid and does not change the path, this doesn't matter because MPC doesn't need the path changed.

Code:
set pth=%pth:\BDMV\PLAYLIST\*.*.mpls=%

If you want the quickest and most efficient way is using this bat file

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

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.

The reason I am using MPC-HC with LAV, is it handles forced subtitles better, able to use a superior video renderer (madvr), supports DXVA on all cards, and can switch playlists on movies that MPC/XBMC gets the main movie wrong, its a superior player, thats why high end software like JRiver use the same.
The only reason XBMC don't use it is because they have to use ffmpeg, so they can get compatibilty with all operating systems.

I also use TMT5 for Blu-ray/Menus, its the best player for full BD IMO, but I use MPC-HC if I want to skip the menus (Sometimes I don't want the menus)
I have them both set up as external players, both are superior to XBMC internal.




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

(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?




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

Is it possible to mount an iso file with the new playercorefactory.xml in frodo?


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

(2012-12-31, 15:23)sonic00 Wrote: Is it possible to mount an iso file with the new playercorefactory.xml in frodo?

Yes, Frodo RC2 fixed it and ISO files are sent correctly to VCD.
But you now have to add mpls/bdmv filetypes for the ISO Player in playercorefactory.xml
This will break BDMV folder playback though, if folder playback is also needed then a new custom bat file is needed.


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

I never used BDMV folder, just iso files ... mount it with VCD and used Powerdvd as player. Worked fine with Eden, but not with Frodo (RC2). I will try your playercorefactory.xml and hope it will works again Smile


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

(2012-12-31, 15:49)sonic00 Wrote: I never used BDMV folder, just iso files ... mount it with VCD and used Powerdvd as player. Worked fine with Eden, but not with Frodo (RC2). I will try your playercorefactory.xml and hope it will works again Smile
Yes just add mpls and bdmv to your ISO player rules, it should work, let me know how it goes.



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

Seems to work, if I use the submenu "Play from here"


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

(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.....




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

(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.

(2012-12-31, 16:47)sonic00 Wrote: Seems to work, if I use the submenu "Play from here"

Does it work without using the submenu?