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 - blimes08 - 2013-02-23

they are all mkv's

(2013-02-23, 01:37)acejh1987 Wrote:
(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?
they are mkv
Try changing the rule to

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



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

(2013-02-23, 07:36)blimes08 Wrote: they are all mkv's

Try replacing the following line

<rule filename="_3d" player="TMT6">

with

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


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

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

I won't argue with you about that since I don't have bluray directory structure on my harddrives and don't have any knowledge about that.

I just tried to solve the issue ltm82 have:
(2013-02-20, 16:32)ltm82 Wrote: 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.

and I've read somewhere that XBMC chooses the biggest file to pass to the player, so I thougth that was the case here.

But if those bdmv files is in directories below the BDMV directory my first solution would work, the second one not so much.

And it's really strange that I didn't see your post where you explained the %1, if I had I wouldn't have written one myself.


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

(2013-02-23, 18:48)kaffekask Wrote: I just tried to solve the issue ltm82 have:

and I've read somewhere that XBMC chooses the biggest file to pass to the player, so I thougth that was the case here.

But if those bdmv files is in directories below the BDMV directory my first solution would work, the second one not so much.

Yes, if you choose 'Play Main Title' XBMC would usually send the longest playlist to the external player.

I agree the solution you posted would work great and is the superior way of doing it, I am going to use that myself, I never thought about doing it that way, Thanks for that.

Edit something like this could work also as long as the file is below the BDMV directory

Code:
set pth=%1

set end=%pth:*BDMV\=%

call set pth=%%pth:BDMV\%end%="%%



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

Yes, that should do the trick also.

Shorter line and doesn't introduce a new command in the script that might confuse users that isn't used to scripts.


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

(2013-02-22, 11:46)acejh1987 Wrote:
(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?



Hi to All,

Thank a lot for the informations. About my issue i have seen a strange behavior because if i Add the movies folder and unchecking the option to scan the subfolder it passes to my vbs the correct index.bdmv file. But If i check the scan option i get that it passes to my vbs all the bdmv files (example BDMV\Backup\Index.bdmv or BDMV\Backup\Index.bdmv) present in the subfolders but not the correct file (BDMV\index.bdmv) that powerdvd12 is able to read

I have also reported to Cyberlink that the command line to launch the movie using powerdvd12 has a little bug. But in their opinion it's not a problem.

The problem is that the movie path has not to be too long. If the movie path is too long (or there are also space characters beetween folder) you have to use the file name 8.3 as we have used in the past using MSDOS.

Using the characters "" does not solve the issue.

example

Normal path using quote: PDVDlaunchpolicy.exe AUTOPLAY "C:\Users\XXXX\Videos\Era Glaciale 4 Continenti alla deriva\index.bdmv" it does not work because the folders path is too long.

Short Path using quote: PDVDLaunchPolicy.exe AUTOPLAY "C:\USERS\XXXX\VIDEOS\ERAGLA~1\BDMV\index.bdmv" it works.

more info in the last page of this post:

http://forum.cyberlink.com/forum/posts/list/15/23551.page#147813

lmt82


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

(2013-02-22, 21:49)kaffekask Wrote:
(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"

thanks for the info.

Now i have understood the SET command line implemented in your bat file but....

....As i wrote in post #1281 i have seen that if i uncheck the scan option and i click on the movie folder in xbmc it passes to my vbs the correct index.bdmv file without using a method to remove a part of the path string as reported using this command line:

These two removes the part between : and = ("BDMV\MovieObject.bdmv" and "BDMV\index.bdmv")

set newvariable=%variabletouse:searchfor=replacewith%

have you tried to uncheck the scan option?


ltm82


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

I don't have any Blu-ray files on my computer, I just explained what that part of the script does and did a theoretical solution to the problem as I understood it.


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

Hi to all,

I have Done other test.

After removing XBMC eden 11 that work with my script i have tried to install XBMC 12 Frodo but i get now that it passes to my script the wrong bdmv file.
Using XBMC Eden it passes to my script the index.bdmv inside BDMV folder that i know to be the correct file to start the BD with PDVD12.

I have seen that XBMC 12 frodo opens a menĂ¹ to select 3 options:
1) Play main title. With this option it passes me the mpls file that does not work with powerdvd12
2) Select from all title. As above.
3 Play Blu ray menĂ¹. Selecting this option it passes to my script the file movieobject.bdmv but in my case i need to pass to powervd12 the index.bdmv.


why XBMC 12 Frodo passes to my script the movieobject.bdmv?


Is it a Frodo bug? Another question is : Do you use this strings below as workaround to get only the correct path in frodo?

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

is it possible to write to xbmv team to ask if they could help us?

ltm82


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

Yes, this is how Frodo works, the batch file however will remove everything in the path after the movie folder.

So

1) Play main title - For example XBMC will send -

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

The Batch file will then send the following to PowerDVD 12

"C:\Movies\Avatar\"

2) Select from all title (Same as Above)

3) Play Blu ray menu - For example XBMC will send -

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

The Batch file will then send the following to PowerDVD 12

"C:\Movies\Avatar\"

PowerDVD 12 should be able to play this path correctly (TMT5/6 does)

Edit - What Batch file are you using?


[WINDOWS] External Player Support Thread - dennmtr - 2013-02-28

hello there, I configured xbmc to use mpc as the default player but I want to exclude streaming from that (YouTube videos). How can I edit the XML rule in userdata to exclude http streaming from mpc to play from the default. Thank you...


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

(2013-02-27, 21:53)acejh1987 Wrote: Yes, this is how Frodo works, the batch file however will remove everything in the path after the movie folder.

So

1) Play main title - For example XBMC will send -

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

The Batch file will then send the following to PowerDVD 12

"C:\Movies\Avatar\"

2) Select from all title (Same as Above)

3) Play Blu ray menu - For example XBMC will send -

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

The Batch file will then send the following to PowerDVD 12

"C:\Movies\Avatar\"

PowerDVD 12 should be able to play this path correctly (TMT5/6 does)

Edit - What Batch file are you using?

I wrote a little vbs to pass the command line to powerdvd12.I know that i can replace as you did using the bat file but
in my opinion is not correct how frodo passes the information. We know that the start file for a BD structure is index.bdmv.
It scans all the bdmv file present in the folder. Why?

I have opened a ticket in the bug tracker web site because i would like that the team xbmc solve the issue.

thank for your help

ltm82


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

Frodo only sends what it uses for its internal player (It must use MovieObject.bdmv when trying to play the BD menus)

External player is basically a hack allowed by the developers so I wouldn't expect any changes, everything works fine when using a batch file (Or similar), so I don't see any issues.


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

(2013-02-28, 15:35)acejh1987 Wrote: Frodo only sends what it uses for its internal player (It must use MovieObject.bdmv when trying to play the BD menus)

External player is basically a hack allowed by the developers so I wouldn't expect any changes, everything works fine when using a batch file (Or similar), so I don't see any issues.

NOT an issue?
why in EDEN it works perfectly and in FRODO it does not work?
In my opinion they can insert an option inside XBMC frodo to change the behavior when i specific in the playercorefactory.xml to use an external player. is it too complicated create a new argument like {2} instead using {1} to pass the correct path?

If i would like to view a BD original 3D movie or 3D BDMV structure i need to use an external player as powerdvd12 or similar.


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

Frodo has added support for some Blu-ray menus and title selection, so it has changed the way it handles Blu-ray files, so the external player files would have to be changed to match.

Frodo works fine for me with an external player, ISO/BDMV/MPLS/MKV all work fine, its just requires a slightly different playercorefactory.xml and batch file to Eden.

When setup correctly you shouldn't notice any difference between Eden and Frodo, the external player should just launch and play the file.