XBMC Community Forum
[PATCH] LaunchPlayer - External Video Player Launcher (to launch third-party players) - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: [PATCH] LaunchPlayer - External Video Player Launcher (to launch third-party players) (/showthread.php?tid=40136)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40


- ashlar - 2008-12-26 13:07

Is there anything still keeping this from being added to SVN?


VLC issues pzh the patch - tvont - 2008-12-26 23:16

Hi,

actually i need to implant vlc as external player because of its streaming capabilities (in the other room there is a appleTV waiting for a udp stream to start...). unfortunately it does not work with (the current) build XBMCSetup-Rev16612-jester-externalplayer...vlc is beeing launched - but with no video playing. I tried several switches without success. (--fullscreen; --video-on-top)
Any suggestions?

Also...could someone *PLEASE* build an OSX build with this feature? Unfortunately, i am not a programmer.

Thanks,

TvT


- WiSo - 2008-12-26 23:27

Please post in the proper user forum. This is for devs only.


- Jester - 2008-12-27 13:27

I'll do an update today (i hope) to sync the patch with the SVN again.


- WiSo - 2008-12-27 19:20

I raised a poll in our internal forums to add this to svn. Please note that this doesn't mean that we proceed maintaining it nor adding the missing features which were requested. Patches would be then welcome of course.


Linux and Mac OS X capability/compatibility? - Gamester17 - 2008-12-27 20:39

Have anyone tested this on Linux and Mac OS X yet?
...and how much of an 'hack' is this really now? Confused


- Mshake - 2008-12-27 20:49

Ok, sorry if this is posted in the wrong forum,

I posted some SMB issues with the external player patch a while ago in this thread.

My issue with SMB/network shares (i wanted to avoid to map them as I swap drives often, mapped drives work fine)
Eternalplayer patch parse the smb url as "smb://server1/share/test.avi" directly to external players but the url is not understood by these external players as in windows the correct url would be "\\server1\share\test.avi"

My quick and dirty solution is as below, feel free to try, no guarantees though, was hoping devs here could give some pointers. Perhaps I have been going about this totally wrong,etc....

General idea: use a script to 'intercept' the url parsed by xbmc to external player to change / replace "smb:" to nothing and "/" to "\", thus resulting in usable media files by your player

End result: I use a python script with a friend's help. (a little cut and paste plus some documentation reading for a fair bit!) to achieve this. Full script below and some mini instructions.

Media Player tested:
1) Tried Media Player Classic - it works but the focus and /fullscreen option somehow does not work or not working well?
2) Tried mplayer/smplayer_portable - it works but there was an issue with the focussing again and i can't be stuffed trying / audio switcher does not really work
3) Tried KMplayer - it works, no issues with focussing, audio switcher works, lots of tweaking options (this may actually discourage people from using this, my personal opinion) - I went with this in the end

Ok now a little instruction:

1) You will need to download python, i used python26

2) Install KMPlayer (I installed mine to root c:\Kmplayer\*.* as there seem to be an issue with the folder names and spacing if i install the player in the default c:\program files\the kmplayer, unsure why...someone with more experience in kmplayer may be of assistance, I believe it's the freaking playlist feature, i tried to disable adding any files to the playlist but I can't)

3) Copy and paste the following lines to a notepad and rename it kmplayer.py. Note that my KMplayer.exe is located C:\KMPlayer\kmplayer.exe and the resulting script is located at c:\

Code:
import os, sys
t = '"'
file = sys.argv[1].replace('smb://','\\\\')
file = t + file.replace('/','\\') + t
os.execl('C:\KMPlayer\kmplayer.exe','C:\KMPLAYER\kmplayer.exe','/fullscreen','/close',file,)

4) Open up your advancedsettings.xml, mine looks like this. Note that for me, python is installed also in root c:\python26\....

Code:
<advancedsettings>
<video>
  <defaultplayer>dvdplayer</defaultplayer>
</video>
<externalplayer>
  <filename>c:\python26\python.exe</filename>
  <args>c:\kmplayer.py</args>    
  <forceontop>false</forceontop>
  <hideconsole>false</hideconsole>
  <hidecursor>false</hidecursor>
</externalplayer>
</advancedsettings>

5) Try the above and hopefully your files over smb network shares would be able to launch. The python script above can also be converted to an executable for those who would prefer a cleaner advancedsettings.xml or for whatever reasons. And I have tested the script for local files as well. If the files are local or on a mapped drive, i.e. no SMB://....., then it will ignore it and your files will still be able to launch fine.

Regarding the mediaplayer, I only tested the 3 above and KMplayer seems to be able to go fullscreen and close when playback finish without hiccups. My personal priority is to get better RV40 and RV30 support through external players. For all my other needs, the internal dvdplayer is DEFINITELY better.

Again, if konfoo can do a patch for the above for SMB urls to external players, then all would be good, network files and all will play fine. Don't think there's many players out there capable of even understanding those SMB urls as there is no smb client build-in?

Hope this works for someone. XBMC jester-externalplayer plus the above work for me, so I am okay for now.

Apologies for the long post.


- Jester - 2008-12-27 23:27

Patch updated to work with latest SVN

Upped XBMCSetup-Rev16734-jester-externalplayer.exe


- WiSo - 2008-12-28 21:33

Mshake Wrote:Don't think there's many players out there capable of even understanding those SMB urls as there is no smb client build-in?

The external player is a third party patch we don't support but we respect the need for it and the work konfoo and jester put into it.
The smb:// protocol is XBMC's own internal one which ofc only libs compiled for XBMC do understand. It shouldn't be a problem to replace it by \\ but this is also a hack for a hack Cool


- tvont - 2008-12-28 21:44

Hi,

I use jesters new build (...734) but (still) experience focus problems with vlc. VLC starts fine with any option while XBMC is in windowed mode. Using it in fullscreen mode leads into a no-video issue....audio plays well.

Does anyone have a hint on that? I need to use vlc because I want to start a UDP stream simultaneously...and I still would be very very (and even more) happy about an OSX build :-)

Thanks,

TvonT