How to export/import your XBMC Library so you never have to download it again!

Yep, you read that right!  Actually, this guide does away with exporting and importing mostly.  I got tired of waiting for my large collection to download every time I did an upgrade or removed an XBMC source/share.  And it wasn’t too hard to figure out a way around it.

A nice side effect of this guide is that you will easily be able to tell which content is not being detected by XBMC.  You may not realise it, but if you have a large collection, often XBMC doesn’t detect things and there doesn’t seem to be any reason to which it will or won’t detect during the library scan, but it can miss quite  a few things off from time to time.  Another nice side effect of this method is that you won’t have issues with path incompatibilities (causing your library import to fail)  if you’ve changed your sharename, have multiple XBMC clients etc.

OK, you’re not going to believe how easy this is. :)

First off, you’re going to need to do a library scan from the internet, once, as per normal.

Add items to your libraryAfter Library

From the main screen go to video.  Click or press Enter on the Add source item and add a media source if you don’t already have one.

Ensure you go into “Set Content” and change the item, “This directory contains” to Movies or whatever content you have in your source.  If you already had a source set up, you will need to edit it by selecting it, pressing C (or right clicking the mouse) and choosing edit source.

Also make sure you select, “Run Automated scan” and “Scan Recursively”, under Settings to ensure you have “enable fanart” enabled. Click OK twice to get out.

If you were creating a new source it should now scan it automatically.  If you had an existing source you may need to select it, press C (or right click) and choose, “Scan for new Content” as sometimes they don’t accept the automated scan request.  Note:  It is not until you do this scan that the Library Mode will become active.

Depending on the size of your library and speed of your internet connection, you may need to wait a while, maybe even an hour .  When it’s completed, select and make active the Library Mode item under Video.  At this point you should be seeing a screen with Movies, Recently added movies and Playlists on it.  Click on Movies, then Title and you should be looking at the the glorious XBMC Library goodness!screenshot006

Exporting your library

OK so you’ve spent an hour waiting for your library to download and you know you don’t ever want to do that again!  The fix is quite easy.

Ensure you have write access from XBMC to where your library is stored.  If you are running from a Samba share you will need to ensure the user you are connecting to the share as, has read, write and execute access, otherwise this will not work.

In the library, press C or right click and select settings.

Scroll down and select the Library Menu Item, then choose Export Video Libary.

Choose to export your library to Seperate files per entry (this bit is the magic)

Choose yes to export thumbs and fanart

Choose yes to overwrite old files.

The export now begins.  Once the export has completed, you’re actually done and you never ever need to go into, “Import Video Library” again!

How does this work?  It works because beside every file in your network share or disc folder/directory, the export put’s some matching files beside your movie files indicating to XBMC that this is the fanart, cover image, actors, directors, IMDB rating etc etc that belongs to this movie.  When XBMC is newly set up, all you need to do is go through the add items to your library section above and XBMC automatically pulls in the local versions of the files you previously exported.  You won’t need to go off to the internet for those files again!

Caveats, Gotcha’s and a bit of tweaking

OK, so the library isn’t always perfect, the automatic download feature sometimes skips stuff (as I mentioned before).  For these ones, XBMC may still go off to the internet at some stage, or they may be missed off altogether.  That’s OK, we can fix that!

Movies that aren’t detected

You can easily see which files were not detected, because when you open your movies folder in your favourite file manager you will see which ones do not have  any .nfo .tbn files etc beside them.  (To do this make sure you’re viewing your files sorted by name).  It’s these one’s that you need to do a bit of manual tweaking, but once you’ve done it, you shouldn’t need to go back to them, and they should stay there accross new versions of XBMC.

The way XBMC uses it’s scrapers is based on a file filter using something called regex.  Don’t worry about that too much, but just understand that the name of each of your files is quite important so that XBMC knows what movie to look up.  As an example, if you have a movie with a ‘ in it’s name, it needs to go into the file.  For example, if you had the Movie, “My Moms New Boyfriend”, it needs to read, “My Mom’s New Boyfriend”.  This is because if you look it up on the internet (the same thing the XBMC scraper does) it is actually written on the internet this way and the apostrophe is counted as a character it needs to match.  After you’ve changed the name of your movie, right click or press C on any movie in the library and choose, “Update Library”.  It’ll most likely turn up.

If a movie is still not being detected, plug it into google and see what comes up.  If you can find it in imdb.com and it has the same name, there’s another trick you can do.

Copy the url from imdb.com (or another supported scraper site (which you can get a list of from that same settings screen we went to above) and paste it as the only line in a text file.  Put the text file beside the movie in question and call it EXACTLY the same name but with .nfo on the end (so it should look like shrek.nfo for example).  Then choose update libarary again.  XBMC should say, “Oh, for this movie I need to go and look at this web address”.  If it does find something and it works well, you should re-export your library exactly the same as we did before (above) and choose yes to overwrite your files.  Then you will never have to go back to this particular one again.

If it doesn’t work, keep looking for web sites.  If you still can’t get the scraper to work you can put it in manually.  Most of the time these ones will not have fanart, but you should still be able to get a DVD cover and info on the movie.

The first step is to download a DVD cover off the internet.  Just google for it, get the enlarged version if available and right click, save as and put it somewhere on your computer.  You then need to convert the file to a .tbn file.  To do this in linux you need imagemagick installed (also available for windows I believe).  Once installed, type, “convert yourcovername.jpg yourcovername.tbn.  Then copy that file beside the movie file in question and give it the same name but keeping the .tbn extension.  If you update your library you should see the dvd cover display appear.  Occasionally, I’ve had to remove and re-add the Video source to get this to work, but it’s no big deal since it doesn’t have to go off to the internet any more.  :)

For the information that goes with the movie, copy one of the other movies .nfo files and edit it.  It’s pretty obvious what you need to change, just make sure it’s named yourmove.nfo, not the old movie name as you’ll stuff things up and need to remove and re-add your library again.

Welcome to your new XBMC library that installs in minutes instead of hours! :)  Have fun!

Good luck!

Written by marshalleq

18 Comments

gravatar
elf

Thanks for the instructions. A couple of things that helped me:
1. I had already tried to use the automatic library scan (which missed many things mainly due to my naming convention for media), so knowing that setting the content of the parent directory to “none” would remove the library stuff was useful.
2. I used the export/import features from the settings/video options instead of the video directory.

Reply
gravatar
Ken

Hi, i am interested in making my own HTPC with XBMC and was wondering if XBMC Live is able to import my mp3s or video files from and external HD into the HTPC. I take it XBMC Live is able to connect to the net for scrapers? Thanks

Reply
gravatar
marshalleq

Hi, thanks for your question. XBMC fully supports MP3’s and almost every video format I’ve seen as long as it’s not encrypted (such as blu-rays). XBMC doesn’t really import files into the library, the library is really just for all the meta-info such as fan-art, artist info, descriptions and ratings. Yes, XBMC supports multiple scrapers for both music and video, have a look around this site and you’ll see quite a few articles and screenshots on how to do this and what they look like.

As far as getting the info from an external disk this is also quite easy. You could either leave the disk plugged in as external and run everything off that, or copy the data from that disk onto the internal xbmc disk, your NAS/Windows machine or whatever. XBMC will happily connect direct to disk, USB disks, Network storage or similar over wired or wireless networks. You can see all this in the sources section of each individual media area (ie clicking on Video or Music).

Hope that helps :)

Reply
gravatar
Ken

Thanks for the reply. Believe it or not, i actually forgot that i posted a question. Work has its way of making sure your attention is directed elsewhere sometimes.
Would also like to know, that with xbmc live, could i, say, connect my ext HD to my HTPC and Cut/Paste the files from the ext HD to my HTPC? I’m aware that XBMC Live runs on Ubuntu and was wondering if i could access the OS to do such.
Once again, thank you so much for your reply

Reply
gravatar
marshalleq

No worries :) Actually there’s a file manager built right into XBMC that makes this possible yes. I just don’t remember where to access it ;) Or as you point out, you can access the OS, but because it’s been thinned down (creating less running services and improving performance) there is no traditional window manager included. This means you need to use console commands like cp or mv (like using DOS under windows). You could of course install a window manager from the ubuntu repositories, but I wouldn’t recommend it, it would be complex to set up and you may as well just go and get ubuntu and load xbmc onto that.

Reply
gravatar
marshalleq

Ah yeah, it took a while for this to click for me, things are often simpler than they initially seem! :) You’re more welcome.

Reply
gravatar
IJM

I found an alternative to this if it helps. Media Companion is a really handy program / exe to scan all your folders and create the tbn nfos of shows needed by XBMC. It’s been pretty reliable for me and catches all the items that XBMC misses.

It’s free. Site here http://billyad2000.co.uk/

Reply
gravatar
David

Hi there, i’ve recently come across an issue with my library on xbmc. I had around 270 movies working fine, however recently added a further 120. The new movies were picked up within the scan however the movie names did not show up – the field where the name generally shows up is completely blank. The year, genre, rating and cast information has also not downloaded (I use imbd for infoormation). I have cleaned the file lists, removed and readded the movie source and even gone as far to uninstall the programme completely and install from scratch however this has not made any difference so now all my movies are not showing up with all the normal information. There hasn’t been any effect to my TV Shows though… Do you have any idea as to what may be causing this?

Reply
gravatar
bennyprofane

If I export, then add new media files, would I then have to manually perform the export again for everything to be up to date? And if so, is there a way to automate this process? Thanks

Reply
gravatar
Gadget

I love this guys optimism…. Very obviously “marshalleq” doesn’t live in a “Third World Country” like I do, and the highest internet speed is 10Mb/s but the cost is way more than the average “Joe” can afford, so you are stuck with a 1Mb/s line instead that still costs you an arm and a leg…. POINT of this being…. It takes more than “5 DAYS” to get all my movies, series, and music videos covers and artwork downloaded from the internet. So…. @ “marshalleq” Thank you (And I truly mean this) ever so much for the great tip, and advise, I will be giving it a whirl in a few days time because I have 3 x XBMC Live boxes running off of one NAS unit and needless to say, updating 3 pc’s with a 5-6 day update interval (And doing this one at a time because it can’t handle 2 x boxes updating at the same time) is not my idea of fun.

If I may query, I am just not sure if I like the idea of the *.png and*.jpg (And other files) landing up on the drive with the content. (Not to be funny or critical or anything, but 3000+ movies spread over 3 x 2TB drives with all that extra info plastered inside of the drive might make finding the *.avi’s and *.mkv’s etc a bit hard to locate, as I am assuming this is how it would export the database in separated files.

Thanx again for the info. :-)

Reply
gravatar
marshalleq

Hey, this is the first time I’ve logged into my blog for what feels like years, and what do you know there’s a comment to answer ;)

I live in NZ, our internet has been bad here for a long time but recently got better, still yes, the point is when you have a large library the updates take AGES be it hours or days. ;)

I haven’t found the file names in the directories too much of a problem as it only applied to when you’re viewing the files on a computer or have XBMC running in file mode (which I void’s the whole purpose of this post really). It’s not too hard to do a dir *.avi or ls *.avi on linux / mac. Or if you get fed up just do a del*.jpg etc. ;)

I chose the multiple file method because in testing I found the single file method did not work properly. Also the single file method does not work if you move any of your movies or set up via shares at different locations withing the directory structure.

Another option with the latest XBMC is to centralise your database, but this has caveat’s and it would probably work best in conjuction with the above anyway.

Reply
gravatar
wep

Hi guys,

I was wondering if there is any way of importing titles only in the XBMC library directly from IMDB or other movie sites (I’m not referring to scrapping the titles I already have on the HDD).

I mean import title only as I would like to update XBMC library with the movies I’ve seen on different occasions (either cinema, TV, XBMC, live stream from Netflix, etc) but I do not have them as local media (and I don’t want to download them but only to update the list of seen movies).

I’m using the .nfo file scan described above for some time:

1. I usually start with two empty files – one .mkv and one .nfo – having random names as it does’n matter exactly the name of the file – something like asdf.mkv and asdf.nfo

2. copy/paste these files as long as I don’t get bored (usually for 10 – 20 times) – this result in 20 – 40 files named asdf copy (1).mkv, asdf copy (1).nfo, … asdf copy (20).mkv, asdf copy (20).nfo

3. manually edit the .nfo for every title with the address from IMDB.

4. update XBMC library

5. delete all files described above

However this is quite time consuming and for aprox. 3 to 4 thousand movie titles (apart from TV series) I would need a couple of days to do it.

What I would need is (either an add-on for XBMC or a web site) that can open the IMDB site and only click on the titles seen and afterwards import on the local drive the files needed for updating XBMC library.

Programming is not a solution as I can’t even code more half of line in VBA :D

Regards

Reply
gravatar
Syed Faisal Hasan

Hello,

Have looked around but didnt get any clue.

I had my library correctly updated using IMDB scrapper with movie porters and fanrt in XBMC Dharma 10.x. When i thought of upgrading to Pre-Aplha Frodo Alpha4, i wanted to make a new fresh clean installation. So i exported the library from Dharma using the “separate files per movie” option. This created the actor pics, thumbnail and fan-art file in the respective movie-named folders for each movie stored on my NAS.

Now when i have installed Frodo and created the same sources to begin building the media library from the locally stored info (exported previously from Dharma in each movie folder) , it still takes a long time to get completed, to which I am not sure that whether it is picking the locally stored information or re-scraping the internet again. It does complete at last.

Now surprisingly I can see the fanart for some movies in the library list view and for some other movies it is not being displayed (instead a plain white background is shown). I have double checked the fanart JPG file does actually exist for each movie in the respective folders and I can open it in any picture viewing program.

I cannot understand why is it refusing to read the locally stored fanart for some movies. Even if I go to the movie information page from within the library view to choose the remote or locally stored fanart, the remote thumbnails are displayed correctly, however the locally stored thumbnail is shown just as a plain white thumbnail (however the JPG file outside of XBMC is actually correct and displays the correct picture).I have seen the same behaviour in Eden as well.

Any ideas of what can be a remedy to the situation. Thanks for the information

Reply
gravatar
tich

Hi all, I am totally new to linux full stop and have just installed XBMCubuntu 11.0 on a media centre. All looks great but…. how do I put things on to the hard drive.
Ive plugged a usb pen into the machine with films on and the media centre will see and play them but i still dont know how to move files on to the actual media centre’s hard drive.
The installation is fresh with no add-ons…

Any help given will be appreciated.

Reply
gravatar
Ginger

What i don’t realize is if truth be told how you’re no longer really a lot more
neatly-favored than you might be right now.
You are very intelligent. You understand therefore significantly relating
to this matter, produced me in my opinion believe it from so many numerous angles.

Its like women and men aren’t interested until it is something to do with Girl gaga! Your personal stuffs nice. At all times maintain it up!

Reply

Make your mark!