Saturday, September 15, 2012

My Raspberry's nights ! Shopping List and first impression :-)



This will be the first post (of numerous ^^) about my Raspberry Pi that i finally received a few days ago :-)

Let's resume all the history !

First thing, why ?


If you're new to that, the Raspberry Pi is a very nice and cheap ARM mini computer, delivered as it is (no cases, no cables, nothing but the essential the computer!) and created by the Raspberry foundation.

So why  and what to with it ? Well, simple question indeed, just because that's cheap, fun, because you can, because you're such a geek :-)

But seriously, that's a computer and you will do with it whatever you can, whatever you'll be able to, there is a great community of active people working on Raspberry Pi, you can easily get a nice XBMC cheap Media Center, or anything you want, Webserver, Fileserver, and so on!

Where to buy and what to buy ?


That will be the first questions you will to answer and if you are planing to get a Rasperry Pi, quite simple to answer.

First, do not hesitate to take a look at the official Raspberry Pi website:
http://www.raspberrypi.org/

3 places to buy a Raspberry Pi:

  • RS Components (official dealer):
http://uk.rs-online.com/web/generalDisplay.html?id=raspberrypi&cm_mmc=UK-Short_url-_-Internal-Flyer-_-%20RaspberryPie-062012-_-Multimedia

  • Farnell Element14 (official dealer):
http://www.element14.com/community/groups/raspberry-pi

  • Ebay, unofficial and will be more expensive
That's my opinion, but i recommend Farnell, they have a very small delivery wait and are very serious.
I don't know why but Rs components have crazy delivery wait (at this post article writing date) even if they are also serious. (my first attempt to get one, finally canceled) 

Now, what do  you need more ?


My first advice to avoid compatibility issue, check this site:

You will get a lot of information for verified Hardware for your Raspberry Pi!

1. Obligatory : Keyboard / Mouse

You may certainly buy almost anything, it should work with no issue.

Still you can search on the website above before one, but compatibility with any keyboard or mouse should not be a problem. (perhaps not with Bluetooth devices)

I have a Trust wireless Keyboard with Touchpad integrated, this works out the box :-) 



2. Obligatory : Power supply

The Raspberry Pi uses a micro USB Power supply which is not delivered with the computer, letting you the choice to recycle one you may have or to buy a new one.

In any case, the only real recommendation is about output voltage, minimum should be 700ma and recommended 1A output voltage.I bought this one and works with no issues:


With less power, you may encounter many issues with your hardware!

I bought this one and it works with no issues:
http://www.rueducommerce.fr/Accessoires-Consommables/showdetl.cfm?product_id=4869696&option=1



Alternatively, you may also use a powered USB Hub to aliment your Raspberry Pi, this is not recommended and not guaranteed but may also work perfectly.
I have one with a power supply of 2,5A and this also works with no issue.

3. Obligatory : Flash Memory

Then, you need a Flash Memory card (SDcard), i advise you to buy a "Class 10" which will gives you much more performance and are now cheap enough.

Again, check the verified hardware site about before buying it to avoid any problem.

My choice was finally:
http://ec.transcendusa.com/product/ItemDetail.asp?itemid=TS8GSDHC10



4. Optional : HDMI cable

Probably you will want to use an HDMI connection between your Raspberry Pi and your TV or Screen.

Off course, you can also simply use the available DVI connection.

When choosing your HDMI cable, just ensure to buy an 1.4 HDMI Cable, or you may have issue with sound though HDMI. (if you plan to use numerical sound)


5. Optional : Powered USB Hub (USB2)

This is optional but you may quickly need it, just because a Raspberry has only 2 USB ports.

Also, because the Raspberry does not deliver much power through USB, using a Powered USB Hub will be very practical.

IMPORTANT: Don't buy an auto alimented USB Hub, you need one that comes with an external power supply!

Again, you can check the verified hardware site above before buying one, i bought this one and don't have any issue:

http://www.bluestork.eu/produits/hubs-et-card-readers/item/477-hub-4-ports-avec-alimentation?lang=fr




6. Optional : A nice case for you Raspberry Pi !!!

You may want to protect your small animal with a nice case, just because the Raspberry comes absolutely as it is, this may seems a to be a good idea :-)

You'll find a lot of nice cases in the Internet, i would you recommend you to take a look at ebay and you will easily find one you'll enjoy.

My choice: 
http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=271038580240&var=570108183975&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2648#ht_1128wt_1189


7. Optional : A cheap MCE Remote control if you're planing to use it as an XBMC Media Center

If you are planing to use your Raspberry Pi with XBMC, you will probably want to get a remote control.

Off course you will be able to use your Keyboard or even Android / IOS application to control XBMC but in my experience nothing is more reliable than a simple remote control :-)

You will find thousand of on Ebay or anywhere else, just keep in mind that your life will be easier if you choose a standard MCE Remote (RC6) known to work out the box in XBMC with Linux.

My choice:
http://cgi.ebay.fr/Mando-HTPC-Media-Center-MCE-Multimedia-Philips-RC197-Receptor-Remote-Control-/271056452988?pt=LH_DefaultDomain_186&hash=item3f1c393d7c#ht_2183wt_1434



Ok, done for the shopping list :-)

I received my Raspberry Pi a few days ago, let's see some picture of the animal !









Ok, let's work now !








My Raspberry's nights ! Shopping List and first impression :-)



This will be the first post (of numerous ^^) about my Raspberry Pi that i finally received a few days ago :-)

Let's resume all the history !

First thing, why ?


If you're new to that, the Raspberry Pi is a very nice and cheap ARM mini computer, delivered as it is (no cases, no cables, nothing but the essential the computer!) and created by the Raspberry foundation.

So why  and what to with it ? Well, simple question indeed, just because that's cheap, fun, because you can, because you're such a geek :-)

But seriously, that's a computer and you will do with it whatever you can, whatever you'll be able to, there is a great community of active people working on Raspberry Pi, you can easily get a nice XBMC cheap Media Center, or anything you want, Webserver, Fileserver, and so on!

Where to buy and what to buy ?


That will be the first questions you will to answer and if you are planing to get a Rasperry Pi, quite simple to answer.

First, do not hesitate to take a look at the official Raspberry Pi website:
http://www.raspberrypi.org/

3 places to buy a Raspberry Pi:

  • RS Components (official dealer):
http://uk.rs-online.com/web/generalDisplay.html?id=raspberrypi&cm_mmc=UK-Short_url-_-Internal-Flyer-_-%20RaspberryPie-062012-_-Multimedia

  • Farnell Element14 (official dealer):
http://www.element14.com/community/groups/raspberry-pi

  • Ebay, unofficial and will be more expensive
That's my opinion, but i recommend Farnell, they have a very small delivery wait and are very serious.
I don't know why but Rs components have crazy delivery wait (at this post article writing date) even if they are also serious. (my first attempt to get one, finally canceled) 

Now, what do  you need more ?


My first advice to avoid compatibility issue, check this site:

You will get a lot of information for verified Hardware for your Raspberry Pi!

1. Obligatory : Keyboard / Mouse

You may certainly buy almost anything, it should work with no issue.

Still you can search on the website above before one, but compatibility with any keyboard or mouse should not be a problem. (perhaps not with Bluetooth devices)

I have a Trust wireless Keyboard with Touchpad integrated, this works out the box :-) 



2. Obligatory : Power supply

The Raspberry Pi uses a micro USB Power supply which is not delivered with the computer, letting you the choice to recycle one you may have or to buy a new one.

In any case, the only real recommendation is about output voltage, minimum should be 700ma and recommended 1A output voltage.I bought this one and works with no issues:


With less power, you may encounter many issues with your hardware!

I bought this one and it works with no issues:
http://www.rueducommerce.fr/Accessoires-Consommables/showdetl.cfm?product_id=4869696&option=1



Alternatively, you may also use a powered USB Hub to aliment your Raspberry Pi, this is not recommended and not guaranteed but may also work perfectly.
I have one with a power supply of 2,5A and this also works with no issue.

3. Obligatory : Flash Memory

Then, you need a Flash Memory card (SDcard), i advise you to buy a "Class 10" which will gives you much more performance and are now cheap enough.

Again, check the verified hardware site about before buying it to avoid any problem.

My choice was finally:
http://ec.transcendusa.com/product/ItemDetail.asp?itemid=TS8GSDHC10



4. Optional : HDMI cable

Probably you will want to use an HDMI connection between your Raspberry Pi and your TV or Screen.

Off course, you can also simply use the available DVI connection.

When choosing your HDMI cable, just ensure to buy an 1.4 HDMI Cable, or you may have issue with sound though HDMI. (if you plan to use numerical sound)


5. Optional : Powered USB Hub (USB2)

This is optional but you may quickly need it, just because a Raspberry has only 2 USB ports.

Also, because the Raspberry does not deliver much power through USB, using a Powered USB Hub will be very practical.

IMPORTANT: Don't buy an auto alimented USB Hub, you need one that comes with an external power supply!

Again, you can check the verified hardware site above before buying one, i bought this one and don't have any issue:

http://www.bluestork.eu/produits/hubs-et-card-readers/item/477-hub-4-ports-avec-alimentation?lang=fr




6. Optional : A nice case for you Raspberry Pi !!!

You may want to protect your small animal with a nice case, just because the Raspberry comes absolutely as it is, this may seems a to be a good idea :-)

You'll find a lot of nice cases in the Internet, i would you recommend you to take a look at ebay and you will easily find one you'll enjoy.

My choice: 
http://cgi.ebay.fr/ws/eBayISAPI.dll?ViewItem&item=271038580240&var=570108183975&ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2648#ht_1128wt_1189


7. Optional : A cheap MCE Remote control if you're planing to use it as an XBMC Media Center

If you are planing to use your Raspberry Pi with XBMC, you will probably want to get a remote control.

Off course you will be able to use your Keyboard or even Android / IOS application to control XBMC but in my experience nothing is more reliable than a simple remote control :-)

You will find thousand of on Ebay or anywhere else, just keep in mind that your life will be easier if you choose a standard MCE Remote (RC6) known to work out the box in XBMC with Linux.

My choice:
http://cgi.ebay.fr/Mando-HTPC-Media-Center-MCE-Multimedia-Philips-RC197-Receptor-Remote-Control-/271056452988?pt=LH_DefaultDomain_186&hash=item3f1c393d7c#ht_2183wt_1434



Ok, done for the shopping list :-)

I received my Raspberry Pi a few days ago, let's see some picture of the animal !









Ok, let's work now !








Sunday, September 09, 2012

Howto : XBMC share and sync your Media library between multiple XBMC instances using Samba/NFS and Mysql




Last update:
09/19/2012: FAQ - deleting databases if required 


If you have multiple XBMC installations (or if you're planing to), you should be interested in sharing and syncing your Media Library between your installations.

When you have multiple XBMC running in your Network, and one central storage, this will really really simplify your life ^^

Advantages:

  • Share watched and unwatched status for your media on all devices
  • Stop watching a movie or TV show in one room then finish watching it in another room automatically
  • Only one library to maintain for all devices
  • Consolidate thumbnails and fanart to save hard drive space (only with XBMC Frodo v12) 

Main source:
http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Share_your_files

You'll find in this Wiki page all required information to achieve this, but i wanted to share my own experience to help you implementing this great feature!

I recommend you to use XBMC Frodo v12, even if not yet stable this version will work better in this configuration as it is able to deal itself with shared Library data like thumbnails and fanart.

With XBMC Eden (v11) sharing the Library works too but you have to synchronize yourself Thumbnails Datas.

Let's start ^^


1. Share your files



First consider your sharing protocol:

You may use 2 major file sharing protocols to share your Media Library, SMB protocol which is the most implemented (used by Windows, implemented in Linux through Samba) or NFS. (Network File System, more known in Unix World)

Choosing is simple, if you have or plan to have Windows XBMC clients, use SMB with Samba.
If you only have Linux Based XBMC, you should use NFS because of betters speed performances.

Note: NFS will also be supported in XBMC under Windows, but you could lack performances



To share your file with SMB using Samba:


If it's not already installed, you have to get samba up and running to share your Multimedia files between your XBMC instances:

On Ubuntu based systems:
$ sudo apt-get install samba


Share your files:

Setup simple shares for your media library, edit "/etc/samba/smb.conf" and add your share, example:
[MY_SHARE]
path = /media/MY_VOLUME
available = yes
browsable = yes
public = yes
writable = yes



Restart samba:
$ sudo service samba restart



To share your file with SMB using NFS:


On Ubuntu based systems, install NFS Server components:
$ sudo apt-get install nfs-kernel-server


Edit "/etc/exports" and configure your shared directory, example (adapt MY_VOLUME  and your Local Network IP):
/media/MY_VOLUME xxx.xxx.xxx.xxx/255.255.0.0(rw,all_squash,insecure,no_subtree_check,async)


Note: "async" option is not recommended for secured write operations, but an XBMC client should not expected to have write operations), this option may enhance NFS performances)
You can also choose "sync".

Restart NFS Server:

sudo /etc/init.d/nfs-kernel-server restart


2. Install and setup Mysql for your Database


Extracted from main XBMC Wiki page, follow these instructions:

Install Mysql:
$ sudo apt-get install mysql


- Create a main admin password when asked

- After installation has complete, edit "/etc/mysql/my.cnf" and do changes as follows:

Look for the line "bind-address" and change "127.0.01" with your host IP address.
You can also simply comment this line to allow access from anywhere.


Restart Mysql:
$ sudo service mysql restart



Login to Mysql using client (adapt password):
$ mysql -u root -p


Create the XBMC user,  set password and rights, enter commands as follows:
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc';


Exit mysql client. (exit)


3. Set up XBMC


At this point, if you already have set your Media Library inside your main XBMC installation, you have 2 possibilities:

  • Converting your existing Media Library
  • Re-creating your Media Library from scratch

To be honest, even if you have a big Media Library, converting it will be enough complicated for not so much benefits.

This is my opinion, but i would recommend to completely re-create your Library from scratch, this is much easier than converting it, moreover that you won't loose your existing thumbnails and fanart.

If you want to convert it, follow instructions at:
http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Setting_up_XBMC

If you want to re-create it from scratch (my advice), do:

- In XBMC, Go to Video and delete each source you have previously set, say Yes when XBMC asks if you want to purge these media from your Library

- Go to Parameters > Video and Clean your Library

- Configure your mysql settings by editing your advancedsettings.xml (~/.xbmc/userdata/advancedsettings.xml) and adding:

Adapt "xxx.xxx.xxx.xxx" with your main IP Address:
    <videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>


- Restart XBMC

- Go in Video and re-set your Media Sources using Samba/NFS shares instead of Local paths

This is very important, right now any source you want to add in your Media Library must be done using Samba shares, files paths must use UNC patchs to be able to be shared.

Here's some screenshots to explain:

When you will add your source, ensure your choose a SMB or NFS Share:




And navigate until your Media Share, and finally set the scrapper as always.

Any media found will automatically be added to the Mysql Database.


4- Setup other XBMC instances (clients)


- Stop XBMC

First thing to do with any XBMC client instance: Setup advancedsettings.xml

- Edit each of your client advancedsettings.xml and ensure your add the mysql section (adapt your IP Adress), this is exactly the same code than for the main instance:


    <videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>


- Restart XBMC (on clients)


Then setup your sources on clients:

For any other XBMC instances, just copy your main XBMC instance sources.xm file to your clients.

This is very important as all of your XBMC instances have to use the same source settings, using SMB shares.

To achieve this, nothing more simple :-)

"sources.xml" is located in "~/.xbmc/userdata/sources.xml"

If you have playlists and favorites, you can also just copy them from your main XBMC instance to client instances:


  • Playlists are located in "~/.xbmc/userdata/playlists"
  • favourites.xml in "~/.xbmc/userdata/favourites.xml"


Final before launching your XBMC client:

About fanarts and other datas:

- If your clients are running XBMC Frodo (v12), then you don't have nothing to do.
XBMC will take care itself with fanart and other data.
Any future added Media will also be available in clients, including Thumbnails and fanart.

- If you have clients with XBMC Eden (v11), you have to copy the Thumbnails directory from your main XBMC instance: ~/.xbmc/userdata/Thumbnails/

For future media add, it will be available on both main XBMC and clients, but you won't get Thumbnails and fanart in clients.

For this to work, you will have to set scrappers in clients too (as in main XBMC instance) and scan for new medias each time you added some. (or enable scan at launch time)





And finally start XBMC.

Magical you'll get your full Media Library centralized and always synced :-)

Off course you main XBMC instance acts as the main server, clients won't be able to access to Media Library if the server is down...



FAQ



- How to re-initialize my database in case of trouble:

In case of trouble you may have to totally re-reinitialize your database. (if you're running thousands of hard tests ^^^).

To do so, simply delete all XBMC databases and re-create from scratch:^

Note: don't worry you won't loose nothing


Login to Mysql using client (adapt password):
$ mysql -u root -p



List XBMC Databases:
mysql > show databases;



Then for each database, delete it, example:
mysql > drop database xbmc_video;


And restart from importing your Media ^^







Howto : XBMC share and sync your Media library between multiple XBMC instances using Samba/NFS and Mysql




Last update:
09/19/2012: FAQ - deleting databases if required 


If you have multiple XBMC installations (or if you're planing to), you should be interested in sharing and syncing your Media Library between your installations.

When you have multiple XBMC running in your Network, and one central storage, this will really really simplify your life ^^

Advantages:

  • Share watched and unwatched status for your media on all devices
  • Stop watching a movie or TV show in one room then finish watching it in another room automatically
  • Only one library to maintain for all devices
  • Consolidate thumbnails and fanart to save hard drive space (only with XBMC Frodo v12) 

Main source:
http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Share_your_files

You'll find in this Wiki page all required information to achieve this, but i wanted to share my own experience to help you implementing this great feature!

I recommend you to use XBMC Frodo v12, even if not yet stable this version will work better in this configuration as it is able to deal itself with shared Library data like thumbnails and fanart.

With XBMC Eden (v11) sharing the Library works too but you have to synchronize yourself Thumbnails Datas.

Let's start ^^


1. Share your files



First consider your sharing protocol:

You may use 2 major file sharing protocols to share your Media Library, SMB protocol which is the most implemented (used by Windows, implemented in Linux through Samba) or NFS. (Network File System, more known in Unix World)

Choosing is simple, if you have or plan to have Windows XBMC clients, use SMB with Samba.
If you only have Linux Based XBMC, you should use NFS because of betters speed performances.

Note: NFS will also be supported in XBMC under Windows, but you could lack performances



To share your file with SMB using Samba:


If it's not already installed, you have to get samba up and running to share your Multimedia files between your XBMC instances:

On Ubuntu based systems:
$ sudo apt-get install samba


Share your files:

Setup simple shares for your media library, edit "/etc/samba/smb.conf" and add your share, example:
[MY_SHARE]
path = /media/MY_VOLUME
available = yes
browsable = yes
public = yes
writable = yes



Restart samba:
$ sudo service samba restart



To share your file with SMB using NFS:


On Ubuntu based systems, install NFS Server components:
$ sudo apt-get install nfs-kernel-server


Edit "/etc/exports" and configure your shared directory, example (adapt MY_VOLUME  and your Local Network IP):
/media/MY_VOLUME xxx.xxx.xxx.xxx/255.255.0.0(rw,all_squash,insecure,no_subtree_check,async)


Note: "async" option is not recommended for secured write operations, but an XBMC client should not expected to have write operations), this option may enhance NFS performances)
You can also choose "sync".

Restart NFS Server:

sudo /etc/init.d/nfs-kernel-server restart


2. Install and setup Mysql for your Database


Extracted from main XBMC Wiki page, follow these instructions:

Install Mysql:
$ sudo apt-get install mysql


- Create a main admin password when asked

- After installation has complete, edit "/etc/mysql/my.cnf" and do changes as follows:

Look for the line "bind-address" and change "127.0.01" with your host IP address.
You can also simply comment this line to allow access from anywhere.


Restart Mysql:
$ sudo service mysql restart



Login to Mysql using client (adapt password):
$ mysql -u root -p


Create the XBMC user,  set password and rights, enter commands as follows:
CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';
GRANT ALL ON *.* TO 'xbmc';


Exit mysql client. (exit)


3. Set up XBMC


At this point, if you already have set your Media Library inside your main XBMC installation, you have 2 possibilities:

  • Converting your existing Media Library
  • Re-creating your Media Library from scratch

To be honest, even if you have a big Media Library, converting it will be enough complicated for not so much benefits.

This is my opinion, but i would recommend to completely re-create your Library from scratch, this is much easier than converting it, moreover that you won't loose your existing thumbnails and fanart.

If you want to convert it, follow instructions at:
http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries/Setting_up_XBMC

If you want to re-create it from scratch (my advice), do:

- In XBMC, Go to Video and delete each source you have previously set, say Yes when XBMC asks if you want to purge these media from your Library

- Go to Parameters > Video and Clean your Library

- Configure your mysql settings by editing your advancedsettings.xml (~/.xbmc/userdata/advancedsettings.xml) and adding:

Adapt "xxx.xxx.xxx.xxx" with your main IP Address:
    <videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>


- Restart XBMC

- Go in Video and re-set your Media Sources using Samba/NFS shares instead of Local paths

This is very important, right now any source you want to add in your Media Library must be done using Samba shares, files paths must use UNC patchs to be able to be shared.

Here's some screenshots to explain:

When you will add your source, ensure your choose a SMB or NFS Share:




And navigate until your Media Share, and finally set the scrapper as always.

Any media found will automatically be added to the Mysql Database.


4- Setup other XBMC instances (clients)


- Stop XBMC

First thing to do with any XBMC client instance: Setup advancedsettings.xml

- Edit each of your client advancedsettings.xml and ensure your add the mysql section (adapt your IP Adress), this is exactly the same code than for the main instance:


    <videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</musicdatabase>


- Restart XBMC (on clients)


Then setup your sources on clients:

For any other XBMC instances, just copy your main XBMC instance sources.xm file to your clients.

This is very important as all of your XBMC instances have to use the same source settings, using SMB shares.

To achieve this, nothing more simple :-)

"sources.xml" is located in "~/.xbmc/userdata/sources.xml"

If you have playlists and favorites, you can also just copy them from your main XBMC instance to client instances:


  • Playlists are located in "~/.xbmc/userdata/playlists"
  • favourites.xml in "~/.xbmc/userdata/favourites.xml"


Final before launching your XBMC client:

About fanarts and other datas:

- If your clients are running XBMC Frodo (v12), then you don't have nothing to do.
XBMC will take care itself with fanart and other data.
Any future added Media will also be available in clients, including Thumbnails and fanart.

- If you have clients with XBMC Eden (v11), you have to copy the Thumbnails directory from your main XBMC instance: ~/.xbmc/userdata/Thumbnails/

For future media add, it will be available on both main XBMC and clients, but you won't get Thumbnails and fanart in clients.

For this to work, you will have to set scrappers in clients too (as in main XBMC instance) and scan for new medias each time you added some. (or enable scan at launch time)





And finally start XBMC.

Magical you'll get your full Media Library centralized and always synced :-)

Off course you main XBMC instance acts as the main server, clients won't be able to access to Media Library if the server is down...



FAQ



- How to re-initialize my database in case of trouble:

In case of trouble you may have to totally re-reinitialize your database. (if you're running thousands of hard tests ^^^).

To do so, simply delete all XBMC databases and re-create from scratch:^

Note: don't worry you won't loose nothing


Login to Mysql using client (adapt password):
$ mysql -u root -p



List XBMC Databases:
mysql > show databases;



Then for each database, delete it, example:
mysql > drop database xbmc_video;


And restart from importing your Media ^^







Howto : Linux - Setup a simple and powerful DNLA server (UPnP protocol) in 5 minutes with minidlna




The Goal:

With "minidlna" you will create within a few minutes a real simple but powerful DLNA Server.

UPnP is a protocol (and DLNA a certification based on this protocol) being more and more used by many manufacturers, it allow you to share your multimedia files between all your DLNA compliant devices.

As a simple example, you have a computer acting as your DLNA server and sharing multimedia files through your network to your Home Cinema.

Minidlna is the perfect DNLA server, simple, light and powerful.

Let's begin!



1 - Install minidna


On Ubuntu based systems, just do:

$ sudo apt-get install minidlna


2 - Configure minidlna


Edit main minidlna configuration file "/etc/minidlna.conf" and do same changes as follows:

- Change port to "49200"

- Add your media sources, you can add as many sources as you want like this:
media_dir=V,<MY VIDEO SOURCE 1>
media_dir=V,<MY VIDEO SOURCE 2>
media_dir=A,<MY MUSIC SOURCE>

- uncomment "friendly_name" (delete "#") and set it to the value you want, it will be the displayed name of your DLNA server

- uncomment "log_dir" (delete #) to ensure main log will be available in /var/log

You case also manually setup the location of the database file. (called files.db)

3 - Start minidlna and begin the scan of your library


Minidlna has been started automatically when installed, but we want it to take in charge our modifications and begin to scan our sources.

First, stop minidlna:
$ sudo /etc/init.d/minidlna stop

Delete existing database:
$ sudo rm /var/lib/minidlna/files.db

Start minidlna:
$ sudo /etc/init.d/minidlna start

And finally take a look at the log files to see what is doing minidlna process:
$ tail -20f /var/log/minidlna.log

Depending on number of files in your sources, minidlna will need a few time to scan, you should see a message like this:
[2012/09/08 17:08:25] scanner.c:719: warn: Scanning /media/FREECOM-HDD/Multimedia/Films_HD-DVD
[2012/09/08 17:08:57] scanner.c:790: warn: Scanning /media/FREECOM-HDD/Multimedia/Films_HD-DVD finished (232 files)!


4 - Access to your DLNA device and navigate to your DLNA Server



Depending on your device, go the your menu and navigate into your DLNA server.

Here is one example screenshot using my LG Home Cinema:





And this works very well, i can play a big big mkv in 1024p (around 45 GB size, native Blu-ray) using local Network (my LG Home Cinema has a 100 Mbps local network connection) with absolutely no issues!

Real great!

Keep in mind that this may also depends on your DLNA device capacity...

Finally, with minidlna note a few last more things:

1. In case of trouble, do not hesitate to delete the database file (see steps above) and restart minidlna, it will automatically recreate the database

2. minidlna sometimes does not like specific characters, you should avoid this in your folder names

3. Some file format may not be playable, it depends on your DLNA device and minidlna.
In my experience, prefer a mkv file, almost all recent devices will support mkv

4. Any added media file will be automatically available in minidlna




Howto : Linux - Setup a simple and powerful DNLA server (UPnP protocol) in 5 minutes with minidlna




The Goal:

With "minidlna" you will create within a few minutes a real simple but powerful DLNA Server.

UPnP is a protocol (and DLNA a certification based on this protocol) being more and more used by many manufacturers, it allow you to share your multimedia files between all your DLNA compliant devices.

As a simple example, you have a computer acting as your DLNA server and sharing multimedia files through your network to your Home Cinema.

Minidlna is the perfect DNLA server, simple, light and powerful.

Let's begin!



1 - Install minidna


On Ubuntu based systems, just do:

$ sudo apt-get install minidlna


2 - Configure minidlna


Edit main minidlna configuration file "/etc/minidlna.conf" and do same changes as follows:

- Change port to "49200"

- Add your media sources, you can add as many sources as you want like this:
media_dir=V,<MY VIDEO SOURCE 1>
media_dir=V,<MY VIDEO SOURCE 2>
media_dir=A,<MY MUSIC SOURCE>

- uncomment "friendly_name" (delete "#") and set it to the value you want, it will be the displayed name of your DLNA server

- uncomment "log_dir" (delete #) to ensure main log will be available in /var/log

You case also manually setup the location of the database file. (called files.db)

3 - Start minidlna and begin the scan of your library


Minidlna has been started automatically when installed, but we want it to take in charge our modifications and begin to scan our sources.

First, stop minidlna:
$ sudo /etc/init.d/minidlna stop

Delete existing database:
$ sudo rm /var/lib/minidlna/files.db

Start minidlna:
$ sudo /etc/init.d/minidlna start

And finally take a look at the log files to see what is doing minidlna process:
$ tail -20f /var/log/minidlna.log

Depending on number of files in your sources, minidlna will need a few time to scan, you should see a message like this:
[2012/09/08 17:08:25] scanner.c:719: warn: Scanning /media/FREECOM-HDD/Multimedia/Films_HD-DVD
[2012/09/08 17:08:57] scanner.c:790: warn: Scanning /media/FREECOM-HDD/Multimedia/Films_HD-DVD finished (232 files)!


4 - Access to your DLNA device and navigate to your DLNA Server



Depending on your device, go the your menu and navigate into your DLNA server.

Here is one example screenshot using my LG Home Cinema:





And this works very well, i can play a big big mkv in 1024p (around 45 GB size, native Blu-ray) using local Network (my LG Home Cinema has a 100 Mbps local network connection) with absolutely no issues!

Real great!

Keep in mind that this may also depends on your DLNA device capacity...

Finally, with minidlna note a few last more things:

1. In case of trouble, do not hesitate to delete the database file (see steps above) and restart minidlna, it will automatically recreate the database

2. minidlna sometimes does not like specific characters, you should avoid this in your folder names

3. Some file format may not be playable, it depends on your DLNA device and minidlna.
In my experience, prefer a mkv file, almost all recent devices will support mkv

4. Any added media file will be automatically available in minidlna




Saturday, September 08, 2012

News: XBMC on Android, upcoming!




XBMC on Android has finally arrived, not yet fully mature but still it is here !


If you already know XBMC Media Center (and for sure you love it ^^) you also already know that information (if you don't know XBMC yet, no problem you'll be lucky to discover it!)

But the Android apk is not yet official, and so it's not yet available trough Google play.

My recommendation! Go to:
http://forum.xda-developers.com/showthread.php?p=29737360

Download last apk night build and install, please note a few things:

- XBMC for Android is really young and not yet fully functional

- As far as i know Hardware acceleration is for now only available on XIOS DS (which is the hardware XBMC developers used for XBMC Android, only available in the US and seems to be really hard to find)

So, for any other hardware, Playback will be done using CPU and software, playing HD videos may not possible if your CPU can't do it...

- Sound level has to be set before your launch XBMC, sound level is different between Android and XBMC

The only Android device i have right now is a XOOM 3g (first generation) and XBMC runs with more or less success...

But this is very promising and a real great job, i'm pretty sure there won't be too much time to wait before getting greats Android devices (like MK802 and others) and XBMC solutions :-)