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)



- moby-uk - 2009-08-06

astromo Wrote:However, when selecting "Music" on the homescreen in any skin, XBMC crashes and returned to Windows. This also happens with some other builds (21865 for example). I use Windows 7 RC 32 bit.

There is a similar problem with other Win7 RC users but solved in r21933

Updated build (22017)


- der.supertusse - 2009-08-06

moby-uk Wrote:Try my latest build here, I've done some work on rar/zip support so let me know if it works for you.

Hello again

Finally got a chance to try it out.

I navigate to the .rar file in XBMC, press enter to open it and see the .avi as usual. Then, clicking enter again launches Zoom Player, and I get this error message from RARFileSource according to message box title:

Image

(Translated: "Overlapping I/O operation in progress")

Dismissing this messagebox yields the following error from Zoom Player:
"Unable to play [burn.notice.s03e08.hdtv.xvid-xii.rar]
This may be due to a corrupt file, missing filters, filter conflicts, or hardware related issues."

Playing the .avi in the internal DVDPlayer works fine, like before.

So, apparently XBMC is passing the .rar to the external player, which is good, but there seems te a lock of some sort on the archive that prevents RARFileSource from accessing it properly. Perhaps you need to "back out" of the archive, before launching the external player?

BTW: I tried right-clicking the rar file in the xbmc file explorer to try to avoid opening the archive, and got the same results.

Let me know if you need log files, or want me to test a new build etc.

Thanks so far
Tusse.


- moby-uk - 2009-08-06

tiben20 Wrote:moby your think there a way to catch the sdl key input from the externalplayer window?

Maybe, I'm not really a win32 programmer so I'm not sure. In any case you've still got the issue of what to do if you can
* if you (can) stop the keypresses going to the externalplayer how do you then how do you, in the general case, control it
* if you trap the keypress as well as the externalplayer you then need to introduce another mapping to say for player x this button does this operation
in either case what if the operation is performed by some other mechanism; mouse, some remote-control handler ...

to be honest it sounds like a can-o-worms that I've no interest in opening, if someone else wants to though ...


- der.supertusse - 2009-08-06

Actually, disregard all of the above! Seems the problem lies elsewhere. I tried another file, and it worked flawlessly.

The file I tried before fails when drag-dropping it from explorer to zoom player, so there is something else causing the problem, corrupt rar perhaps.

So, thanks moby-uk, your patch works for me with Zoom Player as external player!

Tusse


- tiben20 - 2009-08-06

moby-uk Wrote:Maybe, I'm not really a win32 programmer so I'm not sure. In any case you've still got the issue of what to do if you can
* if you (can) stop the keypresses going to the externalplayer how do you then how do you, in the general case, control it
* if you trap the keypress as well as the externalplayer you then need to introduce another mapping to say for player x this button does this operation
in either case what if the operation is performed by some other mechanism; mouse, some remote-control handler ...

to be honest it sounds like a can-o-worms that I've no interest in opening, if someone else wants to though ...
My expectation on how to do this is not for controlling a custom external player but a specific one. If you ever worked with with key input you will notice DIK( direct input key) are in no way related with sdl keys. I was thinking about controling mpc-hc by the window messaging.


- rflores2323 - 2009-08-06

when is this going to be built into a main svn?


- Fascix - 2009-08-06

Hi i have just read most of the 70 pages in this thread cuz i would like to be able to use mpc hc for dxva on my hd mkvs.
but i was woundering how this svn building thingy worksHuh i dont understand shit about that.
i am now using the latest builds from kricker/ikons using the update tool from the svn thread in windows help section.
But if i would like to take advantage of the work in this thread do i have to use a build from ex. moby-uk or is this work intergrated in the kricker/ikons buildsHuh
maby quick crachcourse how this worksHuh

thanx in advance (and from the reading i have done in this thread.. Thanx alot, hope to be able to use it)


- ashlar - 2009-08-07

What's written in the wiki is already supported in SVN.


- astromo - 2009-08-07

moby-uk Wrote:Updated build (22017)

Thank you so much. I will test it tonight.


PowerDVD9 Settings - skaymakca - 2009-08-07

Hello all, I'm new here but a long time xbmc user. I wanted to enable BD/DVD external player playback with powerdvd9 and thought I'd share my work. I based it upon some of the other batch files I saw on the forum. With this script powerdvd can playback iso's of backed up BD or DVDs, using alcohol 120 to mount them, or playback regular files it recognizes. Unfortunately powerdvd9 is too boneheaded to play back direct rips (video_ts folders or bd folders). The movies work from the file view or library view (if they are isos or supported regular files) and the script can handle files on samba shares and strip out credentials so iso mounting works. To use select the media you want to externally play, bring up the context menu, select play using and chose powerdvd.

I am using vista 64 bit, but it should work on 32 bit as well. I'm using the latest svn.

playercorefactory.xml file, you'll have to add your user name and change the batch file location if you're on XP or don't want the script in the location I have it in. The space between .bat and </filename> is needed:

Code:
<playercorefactory>
    <players>
        <player name="PowerDVD" type="ExternalPlayer" video="true">
          <filename>C:\Users\USERNAME\AppData\Roaming\XBMC\launchpowerdvd.bat </filename>
        <hideconsole>true</hideconsole>
           <hidexbmc>true</hidexbmc>
        </player>
    </players>
</playercorefactory>

launchpowerdvd.bat - There are two changeable settings in this. You can change powerdvd9 to powerdvd8 below as well,manually. Powerdvd8 can also play back video_ts.ifo files but sometimes fails:
Code:
:: Launches powerdvd9 to play selected file.
:: Mount iso,img images in Alcohol if file is an image file.  Unmounts image after Powerdvd close.  Powerdvd does not launch if mount fails.
:: Parses input from XBMC to remove leading garbage.
:: If a samba share is supplied from XBMC the credentials are removed.  Make sure windows has your credentials.

:: --- Settings
:: Kill XBMC process or not, 1 and 2 kill, 0 does not.  Killed xbmc will be restarted fullscreen with 2, windowed with 1
set killxbmc=0
:: Virtual Drive
set virtdrive=F


echo off
cls

set progprefix=%programfiles%\

set sourcefile=%*

:garbage_loop
set test=%sourcefile:~0,1%
if ^%test%==^" (
    set sourcefile=%sourcefile:~1%
    ) else (
    if ^%test%==^  set sourcefile=%sourcefile:~1%
    )
if ^%test%==^" (goto garbage_loop)
if ^%test%==^  (goto garbage_loop)


for /f "tokens=1,2 delims=@" %%a in ("%sourcefile%") do set test=%%b
if not "x%test%"=="x"  set sourcefile=\\%test%

set test=%sourcefile:~-4%
if %test%==.iso (
    set imageflag=mount
    ) else (
    set imageflag=no
    )
if %test%==.img set imageflag=mount

echo.Input File: %sourcefile%
if %imageflag%==mount (echo Image File deteced, will be mounted)

if %killxbmc%==1 (
    taskkill /F /IM XBMC.EXE
    )
if %killxbmc%==2 (
    taskkill /F /IM XBMC.EXE
    )

if %imageflag%==mount (
    "%progprefix%\Alcohol Soft\Alcohol 120\AxCmd.exe" %virtdrive%: /M:"%sourcefile%"
    if not ERRORLEVEL==1 (
        start "" /wait "%progprefix%\CyberLink\PowerDVD9\PowerDVD9.exe" /fullscreen %virtdrive%:\
        )
    ) else (
        start "" /wait "%progprefix%\CyberLink\PowerDVD9\PowerDVD9.exe" /fullscreen "%sourcefile%"
    )

if %imageflag%==mount (
    "%progprefix%\Alcohol Soft\Alcohol 120\AxCmd.exe" %virtdrive%: /U
)

if %killxbmc%==1 start "" "%progprefix%\XBMC\XBMC.exe"
if %killxbmc%==2 start "" "%progprefix%\XBMC\XBMC.exe" -fs

exit



- rimmi2002 - 2009-08-07

Just wondering in MPC-hc is better than zoomplayer. I was using ZP previously, seems like everyone is configuring their playercorefactory with MPC-hc here. Thanks.


BD ISO Automatic Playback and Libray Tags - skaymakca - 2009-08-07

I've added some more code to enable my powerdvd external player script to be the default player for BD ISOs . I've added the word BLURAY to the ISO filenames (keeping in convention with the AEON hitched skin) and added this block to my playercorefactory.xml (ISOs without the word BLURAY still default to dvdplayer):

Code:
<rules action="prepend">
     <rule dvdimage="true" player="dvdplayer">
          <rule filename="*BLURAY*" player="PowerDVD"/>
     </rule>
</rules>

The file tagging icons for both DVD and Bluray were displaying over each other in my added BD ISO backups. I changed all the blocks with dvd.png to contain a new filename evaluation pattern, in the file aeon/720p/Includes_MediaFlags.xml:

Original Block:
Code:
<control type="image" id="91">
     <include>Furniture_MovieInfoFlagSource</include>
     <texture>flags/info/dvd.png</texture>
     <visible>[substring(listitem.filename,dvd) + !substring(listitem.filename,hddvd) + !substring(listitem.filename,hd-dvd)] | substring(listitem.filename,.iso,Right) | substring(listitem.filename,.ifo,Right)</visible>
</control>

Changed Block:
Code:
<control type="image" id="91">
     <include>Furniture_MovieInfoFlagSource</include>
     <texture>flags/info/dvd.png</texture>
     <visible>[substring(listitem.filename,dvd) + !substring(listitem.filename,hddvd) + !substring(listitem.filename,hd-dvd) + !substring(listitem.filename,bluray)] | [substring(listitem.filename,.iso,Right) + !substring(listitem.filename,bluray)] | substring(listitem.filename,.ifo,Right)</visible>
</control>



Update - skaymakca - 2009-08-08

The skin code for media has been added to the main trunk of AEON hitched.

The filename rule was causing problems with some iso images, I updated it to a real regexp that should take care of the problem:

Code:
<rules action="prepend">
     <rule dvdimage="true" player="dvdplayer">
          <rule filename=".*BLURAY.*\.iso" player="PowerDVD"/>
     </rule>
</rules>



- patkhoo - 2009-08-08

moby-uk Wrote:except that I said "in general". Your approach sounds like it may work but I'm not interested in developing a point solution for each of the 1,796 different media players out there. I only use an exteralplayer for movies and I've converted all my DVDs to a single-file H.264 MKV so theres never more than one file in the playlist.

i can look at adding an options to not continue playing a playlist when an externalplayer ends but it would be strictly on or off for the player and not dependent on what you're playing or how the player ended. That would mean that stacked files would no longer work for any player with the option set.

Bump +1 for this (type of) idea.. Let me explain why:

In some External Media Players (like MPC HC), they are able to play all the movies in a folder if you pass it the folder path. This works great if you have stacked movies where each movie is in it's own folder.

So I have:
movie\movie.cd1.avi
movie\movie.cd2.avi
Under the latest SVN, when I play this movie with external player:
a) playback is not "smooth", at the break between cd1 and cd2, xbmc comes up to fire the next item in the playlist
b) If while playing cd1, I decide I do not want to watch the movie any more, stopping MPC HC is OK, but XBMC will fire the next cd2 anyway.

So, if you have an option somewhere that either:
1. plays only the 1st video in a folder (then we use a launcher script to pull back to the folder level)
2. plays a .m3u in the folder instead of the individual avis
3. tells external player to play the folder name, instead of the actual video file.

This is especially true/needed for the movies library IMHO..

What do you think?


- Livin - 2009-08-08

moby-uk
I'd ask that you at least consider 1 media player... MPCHC. It is free and one of the most widely used and supported, still being developed/bug fixed.

I think this would at least take us to a better place than what we have today with the built-in player from a video quality and leveraging the GPU decoding functions.