2 XBMC PCs and 1 Database on the shared NAS

  Thread Rating:
  • 7 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
blademansw Offline
Junior Member
Posts: 11
Joined: Apr 2011
Reputation: 0
Post: #761
I have about 100 movies, 60 TV shows but 16,000 songs with shared thumbs

That works fine, the only thing that is slow is when you go into music by artist view - very slow, however, on the XBMC android remote by artist view, its fast. Work that one out!
find quote
tboooe Offline
Fan
Posts: 457
Joined: Dec 2010
Reputation: 0
Post: #762
MrDVD Wrote:You did this commands at an MySQL Admin tool ? (like Heidisql)

Music:
Code:
CREATE INDEX idAlbum_idx ON song(idAlbum);
CREATE INDEX idArtist_idx ON song(idArtist);
CREATE INDEX idArtist_idx ON album(idArtist);
CREATE INDEX idArtist_idx ON exartistsong(idArtist);
CREATE INDEX idArtist_idx ON exartistalbum(idArtist);
ALTER TABLE xbmc_music.song ADD INDEX idx_idArtist(idArtist);
ALTER TABLE xbmc_music.song ADD INDEX idx_idGenre(idGenre);
ALTER TABLE xbmc_music.song ADD INDEX idx_idAlbum(idAlbum);
Movie:
Code:
ALTER TABLE movie ADD INDEX idMovie(idMovie);
ALTER TABLE movie ADD INDEX idFile(idFile);
Here it helped a lot.

Edit:
You also try to change the cache size that mysql use:
Code:
set global query_cache_size = 10000000;

Yup, I have added all these to my database. For whatever reason, going into Artist view in the music library is sloooow. I wonder if upgrading to a faster processor would help?
find quote
tboooe Offline
Fan
Posts: 457
Joined: Dec 2010
Reputation: 0
Post: #763
blademansw Wrote:I have about 100 movies, 60 TV shows but 16,000 songs with shared thumbs

That works fine, the only thing that is slow is when you go into music by artist view - very slow, however, on the XBMC android remote by artist view, its fast. Work that one out!

+1. Me too! Kind of a bummer. I stopped using XBMC for music since it was so painfully slow. This is a shame because its cool seeing all the artwork, bios, fanart slideshow, etc.

Anyone else with large music library experiencing slow access? Perhaps my PC is too slow? One of my HTPC is an Atom 525 and the other is a Celeron 2300. I am thinking of building an i3-2105 system.
find quote
phsyraxion Offline
Senior Member
Posts: 137
Joined: Aug 2011
Reputation: 0
Post: #764
Well I have done further testing and started loading more data into XBMC.

My music library is up to 9000 songs (1500 Artists) fully populated with data and images. It takes me 3 seconds from either test machine to open any view (album/artist/genre etc). Both machines access a MYSQL database on my server and I have applied the optimisation queries to this database. Any change on one machine is reflected on the other machine immediately

My TV Show library is 12,000 episodes (170 shows) and again is fully populated. This again only takes 3 seconds to open and browsing is instant.

The script I have been working on keeps thumbs synced perfectly. Any change of a thumb image on one machine is uploaded to the server and sent to connected HTPC machines once they are online. This same script also syncs playlists, favourites and media source paths (all selectable to be synced on/off) by using a central location on the server to send and receive stuff from.

This is all stuff I have wanted working for years and has actually been a little too easy for me to get going which is why I am concerned that this type of setup is going to have a big issue somewhere.

Only 1 thing I have had issues with... The Aeon Nox skin has a really neat "random episode" & "random album" widget that displays on the home page which I love. It seems to have issues working with an SQL database and causes XBMC to disconnect from the database for some reason. This is a small issue but still a shame. Hopefully this can be fixed in time.
find quote
generious Offline
Junior Member
Posts: 24
Joined: Oct 2011
Reputation: 0
Post: #765
Just after setting this up using the commands below.

Code:
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';

CREATE DATABASE xbmc_video CHARACTER SET latin1 COLLATE latin1_general_ci;

CREATE DATABASE xbmc_music CHARACTER SET latin1 COLLATE latin1_general_ci;

GRANT ALL ON *.* TO 'xbmc';

GRANT ALL PRIVILEGES ON *.* TO 'xbmc'@'%' IDENTIFIED BY 'xbmc';
Verified everything was okay by doing the below

Code:
SELECT host,user from mysql.user;
SHOW DATABASES;

Modified the my.ini with the details below
Code:
mysqld
port = 3306
bind-address = 192.168.0.24
# skip-networking

Changed the permissions on the xbmc account to DBDesigner

After that I opened the firewall ports using
Code:
netsh advfirewall firewall add rule name="MySQL Server" action=allow protocol=TCP dir=in localport=3306

But it is not working well I can connect to using xbmc10.1/workbench and heidi

11:09:03 T:2820 M:2656104448 ERROR: Error attempting to update the database version!
11:09:03 T:2820 M:2656104448 ERROR: Can't update the database xbmc_video from version 0 to 42
11:09:03 T:2820 M:2656104448 ERROR: SQL: Undefined MySQL error: Code (1050)
Query: CREATE TABLE version (idVersion integer, iCompressCount integer)
11:09:03 T:2820 M:2656104448 ERROR: CVideoDatabase::CreateTables unable to create tables:0
11:09:03 T:2820 M:2656104448 NOTICE: Attempting to update the database xbmc_video from version 0 to 42
11:09:03 T:2820 M:2656104448 ERROR: SQL: The table does not exist
Query: alter table settings add NonLinStretch bool
11:09:03 T:2820 M:2656104448 ERROR: Error attempting to update the database version!
11:09:03 T:2820 M:2656104448 ERROR: Can't update the database xbmc_video from version 0 to 42
11:09:03 T:2820 M:2656104448 ERROR: SQL: Undefined MySQL error: Code (1050)

For the 1050 errors I have already review post

The DB has been dropped, uninstalled MySQL and deleted all the content and registry keys and reinstalled it redid it the above again still the same problem.
MySQL is running on Windows Home Server 2011.

Anyone any ideas on how to fix those darned 1050's?

edit
btw advancedsettings.xml config

Code:
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.0.24</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.0.24</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_music</name>
    </musicdatabase>

<pathsubstitution>
    <substitute>
        <from>special://masterprofile/Thumbnails</from>
        <to>smb://192.168.0.24/Thumbnails/</to>
</substitute>
</pathsubstitution>
    <useddsfanart>true</useddsfanart>
</advancedsettings>


edit

got it all working now, what a pain...
(This post was last modified: 2011-11-09 01:32 by generious.)
find quote
Rumik Offline
Fan
Posts: 301
Joined: Nov 2010
Reputation: 0
Post: #766
Hi all,

I've followed the LifeHacker guide to get this up and running, but I installed MySQL on my ReadyNas Duo and created the video and music databases on there, but connecting to them in XBMC is horrendously slow.

I've checked the my.cnf file and the skip-name-resolve line is in there, so it's not that.

Any ideas? Or is it just my NAS?

Thanks

[Image: watched-fanart.jpg]
find quote
Mr. Zero Offline
Junior Member
Posts: 3
Joined: Jan 2012
Reputation: 0
Post: #767
I've just discovered that the Lifehacker article left out a crucial bit regarding setting the appropriate character set of the database so XBMC can properly write to it. The following mysql command should be run to create the databases and set the character set to latin1:

[INDENT]CREATE database xbmc_video CHARACTER SET latin1 COLLATE latin1_general_ci;
CREATE database xbmc_music CHARACTER SET latin1 COLLATE latin1_general_ci;
[/INDENT]

The lines above came from this How-To Geek guide, How to Sync Your Media Across Your Entire House with XBMC, and clarifies a few points missed by the Lifehacker article.
find quote
pctech Offline
Junior Member
Posts: 2
Joined: Apr 2012
Reputation: 0
Post: #768
Hello Xbmc Members....

I have blown peoples minds with this xbmc software, But I have a question about network streaming from a server to xbmc boxes on my network.i would like to know what is the best way to stream my collection of movies and music from a network server and send this stream to family members online(people with internet connection).The other question is whats the string or code to make your own add on program or video addon.Im currently designing a cable type of box.your input on the design is needed.


Thanks
Software need to make my own program and video add-on
(This post was last modified: 2012-04-21 08:26 by pctech.)
find quote
rglasier Offline
Junior Member
Posts: 1
Joined: May 2012
Reputation: 0
Post: #769
(2012-04-21 08:24)pctech Wrote:  Hello Xbmc Members....

I have blown peoples minds with this xbmc software, But I have a question about network streaming from a server to xbmc boxes on my network.i would like to know what is the best way to stream my collection of movies and music from a network server and send this stream to family members online(people with internet connection)

I've had a play around with Subsonic and it works pretty well. It's not the most attractive interface and it's geared more towards music than movies but it's a good solution and definitely worth giving a go. It's totally independant of XBMC tho'. You just point it at your folder shares. I hope that helps.
find quote
Post Reply