TOPIC: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 4 months ago #81

  • zilexa
  • zilexa's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
The guide explains how to do this assuming you place your library on a different machine then the machine OpenElec runs on.

Is it possible to have 1 machine, running OpenElec and the MySQL database? I have 1 HTPC with external SATA drive with all the media, currently running win7+MySQL. Want to switch to OpenElec but it seems OpenElec can only be used as "client", according to this guide.
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 4 months ago #82

  • klojum
  • klojum's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 65
  • Thank you received: 3
  • Karma: 0
It is not possible at this time, since OpenELEC as a standalone operating system does not have a true MySQL server onboard. Therefore you still need 'help from outside' on that matter for the time being. But who knows what is in store in the next version(s).
Intel Core i3 3225 (4GB) - OpenELEC Eden 64bit
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 4 months ago #83

  • chewitt
  • chewitt's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 2697
  • Thank you received: 418
  • Karma: 130
It's a big fat piece of code to include so will never be part of the base image, but it could be done as an 'addon' if someone wants to volunteer time and create it. We already have the sources in the OE build system as we build/include the mysql client libraries so there's a small amount of prior-art to get someone started.
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #84

  • elevans
  • elevans's Avatar
  • NOW ONLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
  • Karma: 1
I had extreme difficulty getting this to work with the latest Eden builds and my new Synology Nas, but I finally got it working.

The instructions provided in this post are somewhat outdated and will not work with the new builds. The most important thing I found out is that the new Eden builds create their own SQL databases for you. You also DO NOT NEED TO SPECIFY THE DATABASE NAME IN THE FILE. If you do, the GUI will become non-responsive. I still setup user "xbmc", but it would not work when I created the databases as instructed. I really hope this saves someone some trouble. My advancedsettings.xml now looks like this:

<advancedsettings>


<videodatabase>

<type>mysql</type>
<host>192.168.1.116</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.116</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>

<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>nfs://192.168.1.116/volume1/video/Thumbnails/</to>
</substitute>
</pathsubstitution>



</advancedsettings>

Credit goes to this thread for pointing me in the right direction: http://forum.xbmc.org/showthread.php?t=117866]

Frankly, the new method is much simpler.
Last Edit: 1 year 3 months ago by elevans.
The administrator has disabled public write access.
The following user(s) said Thank You: Blockmove

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #85

  • zivodevo
  • zivodevo's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 125
  • Thank you received: 3
  • Karma: 2
elevans wrote:
I had extreme difficulty getting this to work with the latest Eden builds and my new Synology Nas, but I finally got it working.

The instructions provided in this post are somewhat outdated and will not work with the new builds. The most important thing I found out is that the new Eden builds create their own SQL databases for you. You also DO NOT NEED TO SPECIFY THE DATABASE NAME IN THE FILE. If you do, the GUI will become non-responsive. I still setup user "xbmc", but it would not work when I created the databases as instructed. I really hope this saves someone some trouble. My advancedsettings.xml now looks like this:

<advancedsettings>


<videodatabase>

<type>mysql</type>
<host>192.168.1.116</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.116</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>

<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>nfs://192.168.1.116/volume1/video/Thumbnails/</to>
</substitute>
</pathsubstitution>



</advancedsettings>

Credit goes to this thread for pointing me in the right direction: http://forum.xbmc.org/showthread.php?t=117866]

Frankly, the new method is much simpler.

elevans, thank you. I have been trying to work this out for weeks and you've cracked it. Don't make any databases on the NAS, just the user xbmc; that's the secret all right.

I do however have one glitch. After adding your pathsubstitution extract, I have thumbnails stored on my NAS too now but the icons for my Addons all disappeared. I'm having to uninstall the addon, reboot the machine and add them back in again. Is there are better way?

Also, I had a local folder on my openelec box for custom backdrops and now that I've relocated the thumbnails, this no longer works. I can still select the local images but when I exit, the images are not displayed. The default background is working OK.

Anyone know a workaround for that?

Zotac ID11
OpenELEC-ION.x86_64-devel-20120201183756-r9725
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #86

  • elevans
  • elevans's Avatar
  • NOW ONLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
  • Karma: 1
You're welcome. I haven't experienced your issues yet, but I'm new to XBMC and have new setups on a couple of systems. I have noticed a similar issue a few times with album art, when I select locally stored album art, but it still doesn't display properly. I've seen that after a reboot, it does tend to display properly.
Last Edit: 1 year 3 months ago by elevans. Reason: grammar
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #87

  • MikeBuzz
  • MikeBuzz's Avatar
  • OFFLINE
  • Moderator
  • Posts: 309
  • Thank you received: 24
  • Karma: 5
Make sure that you edit the bind-address in my.conf as on ubuntu by default its set to 127.0.0.1
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #88

  • minimalko
  • minimalko's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Karma: 0
elevans wrote:
I had extreme difficulty getting this to work with the latest Eden builds and my new Synology Nas, but I finally got it working.

The instructions provided in this post are somewhat outdated and will not work with the new builds. The most important thing I found out is that the new Eden builds create their own SQL databases for you. You also DO NOT NEED TO SPECIFY THE DATABASE NAME IN THE FILE. If you do, the GUI will become non-responsive. I still setup user "xbmc", but it would not work when I created the databases as instructed. I really hope this saves someone some trouble. My advancedsettings.xml now looks like this:

<advancedsettings>


<videodatabase>

<type>mysql</type>
<host>192.168.1.116</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.116</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>

<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails/</from>
<to>nfs://192.168.1.116/volume1/video/Thumbnails/</to>
</substitute>
</pathsubstitution>



</advancedsettings>

Credit goes to this thread for pointing me in the right direction: http://forum.xbmc.org/showthread.php?t=117866]

Frankly, the new method is much simpler.

Elevens cannot find words to thank you !!!

I spent so many frustrating hours trying to set this up..then I found your post.

That information should seriously be quoted in the very first post of this thread to save users from hair pulling.
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #89

  • elevans
  • elevans's Avatar
  • NOW ONLINE
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 1
  • Karma: 1
You're welcome!

Elliott
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #90

  • xe
  • xe's Avatar
  • OFFLINE
  • Staff
  • Posts: 1061
  • Thank you received: 75
  • Karma: 77
We always welcome some taking the time to do a user level end to end write up. We will formally publish it if someone does so.

The perfect people to do it are those that just battled though the process as they, unlike us, tend not to miss things "others take for granted"

:)
#################################################
I collect Karma points feel free to contribute :)
#################################################
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 3 months ago #91

  • klojum
  • klojum's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 65
  • Thank you received: 3
  • Karma: 0
elevans wrote:
I had extreme difficulty getting this to work with the latest Eden builds and my new Synology Nas, but I finally got it working.

The instructions provided in this post are somewhat outdated and will not work with the new builds. The most important thing I found out is that the new Eden builds create their own SQL databases for you. You also DO NOT NEED TO SPECIFY THE DATABASE NAME IN THE FILE. If you do, the GUI will become non-responsive. I still setup user "xbmc", but it would not work when I created the databases as instructed. I really hope this saves someone some trouble.

...

Frankly, the new method is much simpler.
Well, I wouldn't mind if the developers implemented some sort of GUI-support for the MySQL part of XBMC, including an option to edit the external path for thumbnails storage outside the XBMC client. But since MySQL is still not top priority at this time, we just have to struggle onwards with our manual adjustments.

Of course you can choose other user and password settings, as long as you incorporate them correctly in the MySQL database server. Also, most tutorials instruct to give full ("GRANT ALL") administrative access/rights to the user 'xbmc', which is a bit ludicrous. This is only okay if the XBMC database is the only database running on that database server. If there were other databases for other applications running on that same server, then you would have a big security risk.

I now have 3 openELEC machines with centralized database and thumbnails, and it works like a charm. The next challenge would be to 'centralize' the skins and their options as well. Adding / rebuilding a htpc would then take even less time and effort (hopefully). B)
Intel Core i3 3225 (4GB) - OpenELEC Eden 64bit
Last Edit: 1 year 3 months ago by klojum.
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #92

  • X23
  • X23's Avatar
  • OFFLINE
  • Senior Boarder
  • Catch me if you can
  • Posts: 166
  • Thank you received: 20
  • Karma: 19
Hi,

How to handle between different mapping between linux and windows network shares?
I have all my media on an central openelec installation... so i have paths like
/storage/video/bla.avi in my mysql database.

How to add the smb networks shares for example on a windows machine to fit db entrys?

Can i also work with path subtituion like with thumbnails?


Greetz X23
Looking for jDownloader with X-Server and VNC Support? Check my jDownloader Addon! Forum Thread: bit.ly/jdl_thread Repository: bit.ly/x23repo
Looking for a FTP Server with FXP and TLS Support? Check my ProFTPD Addon! Forum Thread: bit.ly/proftpd_thread Repository:...
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #93

  • xe
  • xe's Avatar
  • OFFLINE
  • Staff
  • Posts: 1061
  • Thank you received: 75
  • Karma: 77
You need to ALWAYS use the SMB path even if it is local.

i.e.

SMB://OPENELEC_MACHINE_NAME_OR_IP/storage/video/bla.avi

this makes sense if you think about it. shared dbase and library is designed for using a shared media store. just because your shared datastore happens to be your OE machines doesnt change the fact

Path substitution could possibly fix it but better to do it right in the first place
#################################################
I collect Karma points feel free to contribute :)
#################################################
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #94

  • klojum
  • klojum's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 65
  • Thank you received: 3
  • Karma: 0
xe wrote:
You need to ALWAYS use the SMB path even if it is local.
That is a bit bold... I use NFS which now too works in Windows' XBMC variant. SMB is a good alternative, but since XBMC used the full path for example in its calculation for thumbs, a single standard file protocol for all htpcs in the same network is highly suggested.
Intel Core i3 3225 (4GB) - OpenELEC Eden 64bit
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #95

  • KillerKelvUK
  • KillerKelvUK's Avatar
  • NOW ONLINE
  • Senior Boarder
  • Posts: 117
  • Thank you received: 15
  • Karma: 1
klojum wrote:
Does OpenELEC have the correct (administrative) user rights to the thumbnail folder on your Windows machine? If the path is correct, then all should work. To be certain, clear the thumbnails on the local OE machine to be sure the thumbs are read & created on the SMB share.

Hi just been following this thread through testing out the process before I make the big plung...I've managed to get the MySQL DB working without issues but have encountered problems with the thumbnails which I believe is due to a user right config?! Basically I'm storing everything on a QNAP NAS and have advancedsettings.xml setup to use SAMBA due to a kink in NFS I've yet to work out.

I couldn't fathom why the SAMBA share wasn't being populated duing a scan so I went to Systems->File manager->Profile directory->Thumbnails and it then prompted me for my SAMBA credentials (Using the same SAMBA account for the sources!). I promptly entered the details and then almost immediately noticed a Video->Fanart structure appear in the mapped Thumbnails directory. So I removed the source, cleaned the library and set the source back up...this time the Fanart directory populates as the scan progresses but I still get no actual thumbnails, just a random selection of background artwork! Can anyone point out what I might be missing/am doing wrong? :dry:

Thanks,

K
(HTPC - Shuttle XS35GT-V2 [4GB RAM, Diskless], Ubuntu Server [RAID 10, loads of apps], OpenELEC 3.0 Beta 3 ION86_64)
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #96

  • X23
  • X23's Avatar
  • OFFLINE
  • Senior Boarder
  • Catch me if you can
  • Posts: 166
  • Thank you received: 20
  • Karma: 19
Hi,
xe wrote:
You need to ALWAYS use the SMB path even if it is local.

first time i was thinking about editing path entrys in my existing db, but then i decided to reimport all my sources (local smb) over night ;)

How can i find out if xbmc is using shared thumbs via pathsubstiution?
in my advancesettings.xml i have this:
<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails</from>
<to>smb://192.168.178.213/Userdata/Thumbnails</to>
</substitute>
</pathsubstitution>

but iam not sure that xbmc really using it how to find out?
(iam using latest pre eden pvr release)

Another fact is i think db speed's lika a pain...
1640 Movies
36 Series with 1500 Episodes
4800 Albums with 32720 Songs

I have long initial waitings times for displaying db contents.


Greetz X23
Looking for jDownloader with X-Server and VNC Support? Check my jDownloader Addon! Forum Thread: bit.ly/jdl_thread Repository: bit.ly/x23repo
Looking for a FTP Server with FXP and TLS Support? Check my ProFTPD Addon! Forum Thread: bit.ly/proftpd_thread Repository:...
Last Edit: 1 year 2 months ago by X23.
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #97

  • xe
  • xe's Avatar
  • OFFLINE
  • Staff
  • Posts: 1061
  • Thank you received: 75
  • Karma: 77
easiest way is to rename the local thumbnail folder making it impossible for xbmc to find it.

your database is relatively small the wait times shouldnt be too large. the xbmc log will tell you exact query timing... might need debug loggin turned on
#################################################
I collect Karma points feel free to contribute :)
#################################################
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #98

  • X23
  • X23's Avatar
  • OFFLINE
  • Senior Boarder
  • Catch me if you can
  • Posts: 166
  • Thank you received: 20
  • Karma: 19
Hi,
xe wrote:
easiest way is to rename the local thumbnail folder making it impossible for xbmc to find it.

your database is relatively small the wait times shouldnt be too large. the xbmc log will tell you exact query timing... might need debug loggin turned on

i think my db server is downsized :(
CVideoDatabase::RunQuery took 5477 ms for 1640 items query: select * from movieview
I don't think this is a normal value?

I renamed my local thumbnails dir, know i need to find out that a thumbs is really loaded via the smb share...

the only thing i can find in debug activated log about thumbs is:
20:51:16 T:3388 NOTICE: Contents of special://profile/advancedsettings.xml are...
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.178.247</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>192.168.178.247</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>
<pathsubstitution>
<substitute>
<from>special://masterprofile/Thumbnails</from>
<to>smb://192.168.178.213/Userdata/Thumbnails</to>
</substitute>
</pathsubstitution>
</advancedsettings>

and...
20:51:16 T:3388 INFO: thumbnails folder: special://masterprofile/Thumbnails

Greetz X23
Looking for jDownloader with X-Server and VNC Support? Check my jDownloader Addon! Forum Thread: bit.ly/jdl_thread Repository: bit.ly/x23repo
Looking for a FTP Server with FXP and TLS Support? Check my ProFTPD Addon! Forum Thread: bit.ly/proftpd_thread Repository:...
Last Edit: 1 year 2 months ago by X23.
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #99

  • klojum
  • klojum's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 65
  • Thank you received: 3
  • Karma: 0
X23 wrote:
Hi,
xe wrote:
your database is relatively small the wait times shouldnt be too large. the xbmc log will tell you exact query timing... might need debug loggin turned on

i think my db server is downsized :(
CVideoDatabase::RunQuery took 5477 ms for 1640 items query: select * from movieview
I don't think this is a normal value?
5,5 seconds for 1640 records is way too slow. I get 0,05 seconds for 350 movies, so 1640 movies should still be way under a single second.

These values come from PHPmyadmin on a PC, I haven't run a debug for sql timing values on my XBMC htpc yet... But it does show that the database itself is fast enough. If XBMC is significantly slower in retrieving sql data, then perhaps check your network connection speed again. Are you using 100Mb/s or 1Gb/s connections? A good 100Mb/s connection shouldn't be having these speed problems either.

What sort of computer are you running the MySQL database on?
Have you added the database table indexes that 'should' speed up searching and gathering info?

For the video part:
ALTER TABLE movie ADD INDEX ix_idFile(idFile);
ALTER TABLE movie ADD INDEX idMovie(idMovie);
ALTER TABLE movie ADD INDEX idFile(idFile);
For the music part:
CREATE INDEX test_idx ON song(idAlbum);
alter table song add index idArtist(idArtist);
alter table song add index idGenre(idGenre);
Disclaimer: i don't know if these indexes still apply to version 60 of the video database, but it's worth a try i guess.
Intel Core i3 3225 (4GB) - OpenELEC Eden 64bit
The administrator has disabled public write access.

Re: [GUIDE] How-to build your own external XBMC library and use it for multiple boxes 1 year 2 months ago #100

  • xe
  • xe's Avatar
  • OFFLINE
  • Staff
  • Posts: 1061
  • Thank you received: 75
  • Karma: 77
To give you some other timings to consider. Running mysql in a virtual machine

select * from movieview;
/* 0 rows affected, 3,656 rows found. Duration for 1 query: 0.000 sec. (+ 0.422 sec. network) */

and when some caching kicks in

select * from movieview;
/* 0 rows affected, 3,656 rows found. Duration for 1 query: 0.000 sec. (+ 0.375 sec. network) */

I cant fully test the TV view as about 50% is offline this now but with what remains

select * from tvshowview;
/* 0 rows affected, 2,201 rows found. Duration for 1 query: 0.672 sec. (+ 0.141 sec. network) */
#################################################
I collect Karma points feel free to contribute :)
#################################################
The administrator has disabled public write access.

Our Sponsors & Partners

arctic_logo