Configure External player
#1
Question 
Problem description:

Hi guys, i've got xbmc to start up my external player which is Totem by now, it seems to work fine but the tags "{0}" or {1} of the external player configuration file
Quote:playercorefactory.xml
are always expanded to an URI like

Quote:musicdb://3/411/5093.wma

i guess i need to install some protocol or is there a way to get xbmc to give me the real path instead of the musicdb-uri

Setup description:

currently i am using Ubuntu Jaunty AMD64

Quote:Linux minihtpc 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:48:52 UTC 2009 x86_64 GNU/Linux

and right now i am using the following XBMC-VERSION:

Quote:9.04.3+svn23164-jaunty2

with the following playercorefactory config:

Code:
<playercorefactory>
  <players>
    <player name="Totem" type="ExternalPlayer" audio="true" video="false">
      <filename>/usr/bin/totem</filename>
      <!-- <args>/"--fullscreen" "{0}"</args> -->
      <args>/"{0}"</args>
    </player>
  </players>
  <rules action="prepend">
    <rule filetypes="wma" player="Totem"/>
  </rules>
</playercorefactory>


my xbmc log file output
http://pastebin.com/m627a9c87

some interesting parts of the logfile may be

Quote:#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Clearing cached fileitems [musicdb://3/411/]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: CGUIMediaWindow::GetDirectory (musicdb://3/411/)
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: ParentPath = [musicdb://3/]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: GetSongsByWhere query = select * from songview where (idAlbum=411)
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: GetSongsByWhere(where (idAlbum=411) ) - took 24 ms
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Album format left = [%B]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Album format right = [%A]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Album format left = [%B]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Album format right = [%A]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Album format left = [%B]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Album format right = [%A]
#
14:37:33 T:140114414205008 M:2546278400 DEBUG: Sort, sorting took 0 millis
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers(musicdb://3/411/5091.wma)
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: un-named
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: un-named
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: adding player: Totem (4) for rule: un-named
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: system rules
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: matches rule: system rules
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtv
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: hdhomerun/myth/rtmp/mms
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: lastfm/shout
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: rtsp
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: streams
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvd
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdfile
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: dvdimage
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: sdp/asf
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerSelectionRule::GetPlayers: considering rule: nsv
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: matched 1 rules with players
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: adding audiodefaultplayer (3)
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: for video=0, audio=1
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: PAPlayer (3)
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: Totem (4)
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: for video=1, audio=1
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: adding player: DVDPlayer (1)
#
14:37:34 T:140114414205008 M:2546278400 DEBUG: CPlayerCoreFactory::GetPlayers: added 3 players

and

Quote:#
14:38:14 T:140114414205008 M:2548125696 NOTICE: ExternalPlayer Filename: /usr/bin/totem
#
14:38:14 T:140114414205008 M:2548125696 NOTICE: ExternalPlayer Tweaks: hideconsole (false), hidexbmc (false), islauncher (false), warpcursor ()
#
14:38:14 T:140114414205008 M:2548125696 NOTICE: OpenFile: musicdb://3/411/5085.wma
#
14:38:14 T:140114061216016 M:2548125696 DEBUG: thread start, auto delete: 0
#
14:38:14 T:140114061216016 M:2548125696 NOTICE: Process: Player : /usr/bin/totem
#
14:38:14 T:140114061216016 M:2548125696 NOTICE: Process: File : musicdb://3/411/5085.wma
#
14:38:14 T:140114061216016 M:2548125696 NOTICE: Process: Content:
#
14:38:14 T:140114061216016 M:2548125696 NOTICE: Process: Args : /"{1}"
#
14:38:14 T:140114061216016 M:2548125696 NOTICE: Process: Start
#
14:38:14 T:140114061216016 M:2548125696 NOTICE: ExecuteAppLinux: "/usr/bin/totem" /"musicdb://3/411/5085.wma"
#
14:38:21 T:140114061216016 M:2545090560 NOTICE: ExecuteAppLinux: Failure: -1
#
14:38:21 T:140114061216016 M:2545090560 NOTICE: Process: Stop
#
14:38:21 T:140114061216016 M:2545090560 DEBUG: OnPlayBackStopped - Playback was stopped
#
14:38:21 T:140114061216016 M:2545090560 DEBUG: Thread 140114061216016 terminating

Other things that may be useful:

1. System hardware specs (CPU, RAM, Chipset, etc.)
Zotac ION ITX A, Atom330, Onboard Geforce 9400 512MB setting in bios, Chipset Nvidia ION

2. Kernel Version
2.6.28-15-generic x86_64 GNU/Linux


and i also had have this problem with XBMC version
Quote:xbmc - 9.04.1-jaunty1
when i tried to set it up using
Quote:advancedsettings.xml

please can anybody help
Reply
#2
i guess in need to install some sqlite packages maybe some for phyton can anyone paste his/her sqlite packages for Jaunty here?

code to do that:
Code:
dpkg -l | grep sqlite

my sqlite packages are:
Code:
ii  libdbd-sqlite3-perl                        1.14-3                                   Perl DBI driver with a self-contained RDBMS
ii  libqt3-mt-sqlite                           3:3.3.8-b-5ubuntu1                       SQLite database driver for Qt3 (Threaded)
ii  libsqlite0                                 2.8.17-4build1                           SQLite shared library
ii  libsqlite3-0                               3.6.16-1                                 SQLite 3 shared library
ii  php5-sqlite                                5.2.6.dfsg.1-3ubuntu4.2                  SQLite module for php5
ii  python-pysqlite2                           2.5.0-2ubuntu1                           Python interface to SQLite 3
ii  python-sqlite                              1.0.1-7ubuntu1                           python interface to SQLite 2
ii  sqlite                                     2.8.17-4build1                           command line interface for SQLite
ii  sqlite-doc                                 2.8.17-4build1                           SQLite documentation
ii  sqlite3                                    3.6.10-1ubuntu0.2                        A command line interface for SQLite 3
ii  sqlite3-doc                                3.6.10-1ubuntu0.2                        SQLite 3 documentation
Reply
#3
we're not made for external music players. why on earth would you want/need one?

anyways, code needs to be added to the extplayer engine to replace musicdb urls with their real equivalents.

edit: i see you use wma. you deserve everything you have coming to you and more.
Reply
#4
spiff Wrote:we're not made for external music players. why on earth would you want/need one?

anyways, code needs to be added to the extplayer engine to replace musicdb urls with their real equivalents.

edit: i see you use wma. you deserve everything you have coming to you and more.

well yes some of the newer wma files can't be played by XBMC, but since i've bought
Quote:Fluendo Complete Playback Pack
from canonical my totemplayer was able to play just everything i gave it so far.

Well if the external player needs to have extra code added to understand the URI, how are other users able to play videos with e.g mplayer?

Don't they use library mode when doing so?

Does mplayer understand the video database (haven't tried that) or is the external player feature only supported by windows or mac or XBOX?
Because i also tried mplayer with the exact same problem.

Maybe it is possible to write a script which is then starting Totem/mplayer with the expanded path but i am not that good in writing database queries.

So if i understand you correctly it is somehow possible for mplayer to work with video database on linux but not with the audio database and returning a database uri is the normal behavior of XBMC?

Or do you mean i need to manualy modify the XBMC-svn source to return the expanded path instead of the database uri?
Reply
#5
if not in database mode it works!! nice so i guess i'll have to write a script which queries the correct path.

since i am always using the library mode, hmm i'll need to recall my database knowledge i think ... is there some documentation or ER-diagram for the music database which is created by XBMC?


EDIT:
ok i've got the query if someone is interested:

EDIT: THIS QUERY IS WRONG CORRECT ONE IN POST #7
select strPath from path where idPath=NUMBER RETURNED BY XBMC;

now i just need to hack a script with sed or something like that

thanks for your help guys
Reply
#6
why hack when it can be solved properly. add the necessary code to ExternalPlayer.cpp.

and videos don't use videodb:// url at that point due to intricaties with stacks and such
Reply
#7
spiff Wrote:why hack when it can be solved properly. add the necessary code to ExternalPlayer.cpp.

and videos don't use videodb:// url at that point due to intricaties with stacks and such

well because of the lack of time ... a script would be written faster as understanding the code of XBMC

oh and the above query was wrong the correct one is
Code:
SELECT path.strPath, song.strFileName from song,path where idSong=NUMBER RETURNED IN URI and path.idPath=song.idPath;

Where NUMBER RETURNED IN URI was in may case 5093

so the Query is:
Code:
SELECT path.strPath, song.strFileName from song,path where idSong=5093 and path.idPath=song.idPath;

which returns the correct path with title:
Quote:/media/LACIE/multimedia/audio/Eigene Musik/The Beatles/Anthology 1 Disc 2/19 You Know What to Do.wma

cheers

EDIT: at least i pointed out the situation in the Feature Suggestions thread which can be found here: http://www.xbmc.org/forum/showthread.php?t=58910
Reply
#8
sure. i get your point but surely you get mine as well Smile
i have cooked the diff, waiting for maintainer approval.
Reply
#9
spiff Wrote:sure. i get your point but surely you get mine as well Smile
i have cooked the diff, waiting for maintainer approval.

wow ...godlike thank you very much
well i guess nobody will need the following script then:

EDIT as temporary hack until the suggested feature is implemented i wrote a little script which will do that:

Code:
DATABASE_URI="$1"
#TEST STRING WHEN     IN LIBRARY MODE: DATABASE_URI="/musicdb://3/411/5093.wma"
#TEST STRING WHEN NOT IN LIBRARY MODE: DATABASE_URI="/media/LACIE/multimedia/audio/Eigene Musik/The Beatles/Anthology 1 Disc 2/19 You Know What to Do.wma"

DATABASE_URI_PREFIX=`echo $DATABASE_URI | sed "s/:.*//g"`
if [ "/musicdb" = $DATABASE_URI_PREFIX ];
then
  echo "XBMC IN LIBRARY MODE"
  DATABASE_SONGID=`echo "$DATABASE_URI" | sed "s/\/.*\///" |  sed 's/\(.*\)\..*/\1/'`
  DATABASE_PATH="$HOME/.xbmc/userdata/Database/MyMusic7.db"
  totem "`sqlite3 -separator "" $DATABASE_PATH "SELECT path.strPath, song.strFileName from song,path where idSong=$DATABASE_SONGID and path.idPath=song.idPath;"`"
else
  echo "XBMC NOT IN LIBRARY MODE"
  totem "$DATABASE_URI"
fi

you may replace totem by any player you wanna use
cheers

and again thanks
Reply
#10
fixed properly in r23340
Reply

Logout Mark Read Team Forum Stats Members Help
Configure External player0