OS X ExecuteAppLinux: Failure: -1 with External Player
#1
I have tried several iterations of trying to get an external player to work with a Dune HD Player but have been unsuccessful.

Here is my playercoryfactory.xml:

Code:
<playercorefactory>
<players>
   <player name="Dune" type="ExternalPlayer" audio="false" video="true">
     <filename>/Users/dlord/Dropbox/scripts/dunexbmc.py</filename>
     <args>"{1}"</args>
     <hideconsole>true</hideconsole>
     <islauncher>true</islauncher>
   </player>
</players>
</playercorefactory>

Here is my advancedsettings.xml which defaults to my external player for every video type.
Code:
<advancedsettings>
    <video>
        <defaultplayer>Dune</defaultplayer>
    </video>
    <loglevel hide="false">0</loglevel>
</advancedsettings>

Whenever I try to execute the script (which simply prints the args into a log file) it fails with "NOTICE: ExecuteAppLinux: Failure: -1" and doesn't print anything to the logs.

I am running
Mac OS X Lion (10.7.5)
Frodo RC3

Is there anyone successfully using external players on Macs? Or is there something I am missing?

I have changed the permissions on the files to 777 and ownership to group admin just as a safe measure.
I have even tried placing the files in the XBMC.app package to try to see if it was a permission with the location of the files, and still a no go.
Reply
#2
ensure that the python script starts with a valid interpreterline (#!/usr/bin/python) or something.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
you might even need to add the python call before the script name - external players are not executed in a shell (so nobody parses interpreterlines) - they get called with exec or something so should be real binaries.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#4
I had tried both of those options. Thank you for the suggestions. However it still doesn't seem to work. Is there another script style I should try using or any other suggestions on how to get it to execute it?

The information about it not running in a shell is helpful. I will try and take that path as well and see what I can come up with.

Also I tried doing the same thing with a bash shell script and still a no go.
Reply
#5
Yeah no scripts if its not executing a shell (doesn't count if it is python, bash, perl - whatever). You need to call a binary (python) and give it the script as argument i guess.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
[Update]

I started digging into the binary option after your last comments and found py2app which creates a binary executable for Mac OS X.

I created the binary file and updated my playercorefactor.xml. Still a no go.

I double checked that it was in fact a binary that I was trying to execute:
Code:
$ file dunexbmc
dunexbmc: Mach-O universal binary with 2 architectures
dunexbmc (for architecture i386):    Mach-O executable i386
dunexbmc (for architecture x86_64):    Mach-O 64-bit executable x86_64

I am still digging into this and will post a solution if I happen to find one.
Reply
#7
** UPDATE **

I was able to finally solve this issue.

Here is what I did:

1. Created custom app to communicate with dune from xbmc using python and Dunes IP API.
2. Setup XBMC as noted in the first post.
3. Using brew I installed python 2.7.3 so that it does not use the system python version (In order for py2app to work this must be done)
4. Used pip to install py2app
5. Followed the instructions for py2app to create a standalone Mac Python Binary App
6. Placed the py2app dist/<program_name>.app in the /Applications folder
7. Reconfigured playcorefactory.xml to point to /Applications/<program_name>.app/Contents/MacOS/<program_name>
8. Restarted XBMC

This solved the issue and allowed me to execute the binary program from within XBMC. Which means I now have XBMC telling my dune what to play.

My final hurdle is can I create any output or can the binary program accept any input for better integration with XBMC? Meaning, I want to report back to XBMC what is playing, how long it has been playing so XBMC knows what is currently playing. I would also like to stop/fast forward/rewind/etc the dune player using the "Now playing" controls from the mobile app.
Reply
#8
Thats not possible atm. ExternalPlayer is a oneway ticket atm.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
ExecuteAppLinux: Failure: -1 with External Player0