Can playercorefactory.xml be modified to allow only locally sourced video to play to
#1
Question 
Hello,

First time poster here. I have a HTPC running Windows 7 32-bit with the latest pre-Eden build. I have successfully created a playercorefactory.xml that will launch PowerDVD 11 Ultra when I play ISOs or Blu-ray discs.

I have also successfully modified the file to play individual AVIs, MKVs and Blu-ray files to PowerDVD. My problem is with the various plugins I have installed with XBMC. When videos are started from within the plugins they too try and launch PowerDVD. Unfortunately unsuccessfully.

What I really want is a way to be able to launch my external player (PowerDVD) only for local video sources such as those on my NAS or local hard drive, and use the default "dvdplayer" for the internet-based videos launched from the plugins. Is this possible?

I have tried using the internetstream= variable; as well as trying specific filenames for my playercorefactory such as filename="\\DROBOFS\*.avi" but unfortunately, the plugins still launch PowerDVD.

Does anyone have any suggestions on how I can play only local-based files through an external player and leave the internet-based files playing through the default video player? Thanks.

lascoopus
Reply
#2
The filename is a regular expression not a Windows wildcard, so you need something like:

filename=".*DROBOFS.*avi"

or possibly:

filename="\\\\DROBOFS\\.*\.avi"

JR
Reply
#3
Sad 
Thanks for your help JR, I really appreciate it. I've been trying your suggestions and researching "regular expressions" for the last few days. Unfortunately nothing I do seems to help. In XBMC it seems that it's an all or nothing type of situation. Either the filetypes I designate (AVIs and MKVs) will play in the default dvdplayer or PowerDVD 11 Ultra, but I can't seem to separate locally stored files and those accessed via the internet. I am including the two .bat files I use as well as my playercorefactory.xml in the hope that you or some other member can help. Thanks again for all your help.

Goal: Have XBMC play local files either from my NAS (\\DROBOFS\*) or my local hard drive (C:\*) thru POWERDVD 11 Ultra, and have any files accessed over the internet (via the various addons e.g. "TWIT") play thru the original default dvdplayer.

My original playercorefactory.xml:

Code:
<playercorefactory>
  <players>
    <player name="PowerDVD" type="ExternalPlayer" audio="true" video="true">
      <filename>C:\Users\Admin\AppData\Roaming\XBMC\Play_BD\PlayISO.cmd</filename>
      <args></args>
      <forceontop>true</forceontop>
      <hidexbmc>true</hidexbmc>
      <hideconsole>true</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
    <player name="PWDVD" type="ExternalPlayer" audio="true" video="true">
      <filename>C:\Users\Admin\AppData\Roaming\XBMC\Play_BD\BD.cmd</filename>
      <args></args>
      <forceontop>true</forceontop>
      <hidexbmc>false</hidexbmc>
      <hideconsole>true</hideconsole>
      <warpcursor>none</warpcursor>
    </player>
  </players>
  <rules action="prepend">
    <rule filetypes="iso" player="PowerDVD"/>
    <rule filetypes="avi" player="PWDVD"/>
    <rule filename="*index.bdmv" player="PWDVD"/>
    <rule filetypes="mkv" player="PWDVD"/>
  </rules>
</playercorefactory>


PlayISO.cmd:

IF EXIST F:\NUL "C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 /u <!-- If previous virtual image exists, unmount it -->
ping -n 2 -w 1000 127.0.0.1 > nul <!-- Create a 2 second delay -->
"C:\Program Files\Elaborate Bytes\VirtualCloneDrive\VCDMount.exe" /d=0 %* <!-- Mount the ISO into a virtual drive -->
ping -n 2 -w 1000 127.0.0.1 > nul <!-- Create a 2 second delay -->
"C:\Program Files\CyberLink\PowerDVD11\Movie\PowerDVD Cinema\PowerDVDCinema11.exe" F:\ <!-- Launch PowerDVD -->


bd.cmd:

@echo off
"C:\Program Files\CyberLink\PowerDVD11\PDVDLaunchPolicy.exe" %* <!-- Launch PowerDVD -->


I would surely appreciate any help on this matter. I'm about to give up any hope of this every working the way I want it...
Reply
#4
The third rule should be:

Code:
<rule filename=".*index.bdmv" player="PWDVD"/>

Remember it's .* to match any sequence of characters.

However this doesn't appear to have any rules distinguishing between local and network content. Assuming this is still the problem you need to post the playercorefactory.xml you are using and pop a debug log on pastebin.com (don't paste logs into the forum).

Also remember that rules are executed in sequence and the first rule that matches is applied.

JR
Reply
#5
Thank you once again J.R.!!!!

You must be, or have once been, an instructor. Because you pointed me in the right direction without actually doing "all" my homework for me.

In your last post you stated "remember that rules are executed in sequence and the first rule that matches is applied."

That got me thinking that if I wanted to send only locally sourced AVI or MKV files to my external player, all I needed to do was to come up with a rule that matched only those criteria, everything else would automatically play through the default dvdplayer.

Well, thanks to a little website that helped me check my regular expression ( "Regular Expression Tester" by Quanetic Software, http://www.quanetic.com/Regex ); I came up with just such a rule. I'm including my updated playercorefacory.xml in the hope that it can help someone else.

Playercorefactory.xml :

<playercorefactory>
<players>
<player name="PowerDVD" type="ExternalPlayer" audio="true" video="true">
<filename>C:\Users\Admin\AppData\Roaming\XBMC\Play_BD\PlayISO.cmd</filename>
<args></args>
<forceontop>true</forceontop>
<hidexbmc>true</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
<player name="PWDVD" type="ExternalPlayer" audio="true" video="true">
<filename>C:\Users\Admin\AppData\Roaming\XBMC\Play_BD\BD.cmd</filename>
<args></args>
<forceontop>true</forceontop>
<hidexbmc>false</hidexbmc>
<hideconsole>true</hideconsole>
<warpcursor>none</warpcursor>
</player>
</players>
<rules action="prepend">
<rule filetypes="iso" player="PowerDVD"/>
<rule filename=".*index.bdmv" player="PWDVD"/>
<rule filetypes="(avi|mkv)" filename=".*(DROBOFS|drobofs).*" player="PWDVD"/>
</rules>
</playercorefactory>

Once again thank you J.R.!!!!!!!!!
Reply

Logout Mark Read Team Forum Stats Members Help
Can playercorefactory.xml be modified to allow only locally sourced video to play to0