Home Fileserver: Media Center

Your ZFS home fileserver / NAS is a great place to store your music, photo and video media, and if you’ve setup your ZFS file systems similar to the way described in Home Fileserver: ZFS File Systems, then it will be quite simple to view this media from a media center.

The nice thing about storing your media on your fileserver is that if your original CDs or DVDs get scratched, you will always have your backup available on your fileserver. The other huge advantage of having your media on your NAS is that you don’t have to go hunting through your DVD library to find the right box, only to find that it never got put back in the right box. And with a network-enabled media center hooked up to your ZFS fileserver / NAS, you can locate any media at the touch of a remote control.

There are many different media centers or HTPC products out there and they vary in openness, price, power and usability.


Video is the most difficult media for these devices to handle well, due to the large number of different video formats that exist. To support a large variety of different video formats, a media center needs to provide many video and audio codecs to decode the video media correctly for a good viewing experience. Ideally, your chosen media center should be open enough to be extendable to allow addition of new audio & video codecs, or upgrading of existing ones. Generally, open source solutions will be more open than proprietary products, and will continue to be supported long after a proprietary product has been retired, or the company selling it goes out of business.


Media centers vary enormously in terms of their computing power. This is important if the video is highly compressed when encoded, as it needs to be decoded in real time when viewed. Also, the media center hardware needs to be powerful enough to handle the resolution of the encoded video. Therefore, a media center having a low power CPU will struggle or fail to decode highly compressed and/or high resolution formats.


Usability of a media center solution will depend on its processor power and also the ergonomics of the user interface. Again, this is where open source projects can score highly over some closed, proprietary products — for example, see what people think about the usability of Blu-ray media and players in the comments here: People just not that into Blu-ray.

XBMC: Xbox Media Center

Here I will detail just one possible media center, as it is open source, is well supported, has great usability and runs on a variety of different hardware and even operating systems.

Originally Xbox Media Center (XBMC) started development on the original Xbox, but it has since been ported to Windows, Linux and Mac operating systems.

Due to the success of the original Xbox, a large number of people probably already own one, and with either a hardware modification (modchip) or software modification, the original Xbox can be made to run unsigned code, which is required in order to run software like XBMC. If that interests you, there are many sources of information on the internet. Be warned though, modification is not a trivial subject, but neither is it too difficult for someone with a little tech savvy.

Also, the original Xbox, due to its use of an Intel Celeron processor running at 733 MHz, is not enormously powerful, and it will struggle to decode highly compressed video in real time, leading to dropped frames — i.e. completely unacceptable viewing experience.

However, the original Xbox is powerful enough to decode MPEG2 video as used by DVD films, and also things like DivX or Xvid-encoded video etc.

The original Xbox also has a 100Mbit/sec ethernet connector to transfer data to which is sufficient for streaming MPEG2 (DVD), DivX and Xvid format video to from your ZFS fileserver.

However, the original Xbox’s main strength is that with XBMC software, it makes a terrific media center with great usability, and it is very cheap to buy one second hand from ebay etc, and you may even have an old one gathering dust in the attic, or know someone wanting to get rid of one.

XBMC configuration

Assuming you have shared your video file system from your ZFS fileserver using a CIFS share (SMB protocol), then it is simple to setup XBMC to access it in order to watch your videos.

If we assume you setup your video file systems as described here, then you will be able to setup XBMC like this:

  1. Start XBMC
  2. Select the ‘Videos’ item from the main XBMC screen
  3. Select the ‘Add source’ item
  4. Select the ‘Browse’ button
  5. Select the ‘Add network location’ item from the list shown
  6. Select the ‘Windows network (SMB)’ item from the ‘Protocol’ box
  7. Select the ‘Server name’ field and in the next screen select the IP address box and enter the IP address of your ZFS fileserver, then select ‘Done’
  8. Select the ‘Shared folder’ field and enter the name you gave to your share within ZFS — e.g. ‘media_video’ from the setup page
  9. Enter the relevant username and password in the fields shown and select the OK button (as setup on the ZFS fileserver file system)
  10. Click on OK button in the last screen

Now you will be able to watch video stored on your ZFS fileserver. Enjoy!

To setup access to your music and photo file systems on your ZFS fileserver, follow the same procedure for the ‘Music’ and ‘Pictures’ items on the XBMC main screen.

If XBMC interests you you can find more info on it here, and you can see screenshots of its user interface here.


Plex is a media center that runs on Mac OS X, and I understand this makes a very capable and modern media center. See here for more information. As it runs on modern Mac hardware it will have a lot more processor power to decode video, and I think I heard it can even decode Blu-ray Full HD video. However, the problem with Blu-ray video is the file size, so you would either need a huge array of 2TB drives to store your original Blu-ray discs or you will need to play them only directly from the discs in your Blu-ray player.

For more ZFS Home Fileserver articles see here: A Home Fileserver using ZFS. Alternatively, see related articles in the following categories: ZFS, Storage, Fileservers, NAS.

Join the conversation


  1. Media was one of the original reasons I built a NAS. It didn’t need to be ZFS, but…

    I originally intended to put XBMC on an old Xbox and use that as a media centre, which seemed like a good use of an obsolete console. Getting it on there was slightly problematic as it required a soft-mod to the Xbox, but with some internet digging it was (relatively) painless. Playing content off the NAS though turned out to be problematic as I could not get anything to stream reliably. Given that the Xbox has a 100Mb NIC and I have a Gb switch and 2 x Gb NICs in the NAS something is wrong somewhere, but unfortunately I have to yet find where.

    I’m looking at alternatives at the moment and have got down to a Mac mini running Plex, and nvidia ION running XBMC, or a popcorn hour. While I like the idea of using a mini and Plex, it’s the only option that does not allow for a blue-ray drive in the media centre, and as you say putting blue-ray disks on the NAS would quickly chew up the space. Disk cost is decreasing quickly though, and with a 1Tb disk costing £50, where not that far off it being feasable.

    Oh and plex is a fork of XBMC, and copying your DVDs / CDs onto your NAS in the UK is a breach of copyright, there is no ‘fair use’ and no ‘backup copy’ clause; yet another indication that our copyright laws are out of date and not written for the public good.

  2. One short note: Plex is a fork of XBMC So it has all the great features that XBMC has plus some more nice stuff.

  3. Hi Lee, this is a wild guess, but perhaps you connected an old 10Mbit/s ethernet cable to the Xbox? Also, are you using CIFS sharing of your video directory on the ZFS fileserver? Try moving the cable from the Xbox to another PC and copying a large file from the ZFS server to the PC/Mac etc and see what speed you get. Use the same sharing protocol (SMB).

    Also you could try a new 100Mbit/s ethernet cable (Category 5 or 5e) and connect it to the Xbox. Also try the Xbox FTP client and check the speed. It’s possible the cable got damaged.

    I assume you get fast speeds from the ZFS NAS to other computers, and that the speed problem is just with the Xbox?

    Plex on a Mac Mini should work nicely, but it’s a pity about the lack of Blu-ray drive, like you say.

    If you manage to identify the speed problem with the Xbox’s ethernet, you should have a nice system to use now though. And the user interface of XBMC is terrific.

    I didn’t know that Plex is a fork of XBMC. Good to know. And it should mean it also has great usability. I heard good things about Plex too.

    The media companies have given themselves enormously bad PR over the years with all of their price fixing, anti-copying attempts, DRM, suing P2P users including children and pensioners, but now they seem to be slowly waking up. But I wouldn’t hold your breath waiting for them to change, although things do seem to be changing for the better — did you see these?:
    ‘Tens of thousands’ of US students sign up for legal P2P
    Virgin to offer unlimited, DRM-free music

    Anyway, good luck debugging the ethernet on your Xbox 🙂

  4. I don’t think I tested the cable at the time, which I should have done, but I put it aside to get on with other things with the intent of coming back to it later and never did. I know I have a couple of Cat 5 cables around which have caused me momentary pain and head scratching when a Gb link won’t establish, but I’m not sure I have any 10Mbit cables; damaged cables I do have, so that’s also a possibility. I do have a bunch of new Cat 6 cables lying around so I’ll try one of them and see if it makes a difference.

    Yes, the media directories are shared with CIFS, though I have tried NFS mounts as well.

    I get reasonable speeds off the NAS to my Macbook Pro, nothing earth shattering, but I think that’s more to do with slow disk on the laptop rather than the NAS. I don’t have anything else to test with currently, so I won’t worry too much about it until I have another client that I know should be capable of a good link speed.

    I think the only problem with the XBox as a media centre is the noise – they are not quiet, but given that I have already cracked it open to soft mod it, replacing the noisy fans with something that sounds less like a jet engine warming up will be the next job assuming I can get it streaming properly. I don’t have a remote for it, so hopefully you can still pick them up on eBay, as using a wired controller is a bit of a pain.

    To be honest, I’ll probably get a new box (mini or ion) to use as a media centre anyway for the added general net access etc, and fob the xbmc/xbox off onto the kids TV – they’re the ones who destroy the DVDs anyway!

    I completely agree regarding the big content cartels, they are responsible for their own misfortune and I think even things like the Virgin all you can eat subscriptions are doomed to fail unless they apply reasonable fees, which they won’t. The real problem is that as more and more of their protection ideas fail the more they lobby governments to make the law more draconian, I.e the upping of statutory damages in the UK for electronic infringement detailed in the digital Britain report (hello mass extortion law suits as in the US; pay us X or we take you to court and ruin your life), and things like ACTA creeping in though the back door with no public oversight.

  5. Yes, I would guess it’s a damaged/faulty cable that’s causing the slow speed. A quick test with a Cat. 6 will soon see, like you say.

    With CIFS sharing and using Cat. 6 cabling throughout here, I get around 47-50MBytes/sec sustained reads through a 1GbE switch using a single link between the ZFS NAS running OpenSolaris 2009.06 and a Mac Pro running OS X 10.5.7. As you say, the MacBook Pro’s 2.5″ 5400 RPM drive will probably be the limiting factor, but it should still be reasonably fast I would guess. You can easily check the speed by running Activity Monitor on the MBP and selecting the Disk Activity tab and watching the write speed update as you receive a file from the NAS to give an idea — also the Network tab. Then try the same cable on the Xbox, or just the Cat. 6.

    Regarding the Xbox fan noise, you can reduce the noise by making the speed dynamic according to temperature, or a fixed percentage of max speed if you look at the System settings within XBMC. It makes a huge difference. And the remote does make a big improvement to the wired controllers for a media center.

    I had the same thoughts as you too — that the Virgin all-you-can-eat deal will only work if they price it sensibly, and my immediate reaction on reading ‘The service will be priced at a couple of albums per month’, was that this is way overpriced and will fail. I think something like £5 a month would work, whereas £20 a month (£250 a year) is virtually guaranteed to fail, especially in a severe recession like we have now.

    So I think the media companies are, yet again, going to find out the hard way about how to make something attractive at a price the public is willing (and able) to pay. A few more years… zzzz. And I wasn’t the only one seeing that the eventual likely outcome of digital music distribution would inevitably veer towards an online, flat-rate-all-you-can-eat model, as it seems to be the only viable model:
    Free legal downloads for $6 a month. DRM free. The artists get paid. We explain how…
    Digital music: flat fee futures
    Big labels are f*cked, and DRM is dead – Peter Jenner
    Online music fees pose digital dilemma
    Flat-rate music for all
    Legal, British P2P ‘by end of year’

    Anyway, I’ll watch what happens with this area with great interest, as I think many, many people are genuinely interested in a flat-rate model, where they pay a relatively small amount of money each month for access to the complete current and back catalogue of all music ever made without DRM. I hope that day arrives, and I think it will eventually, it’s just a matter of time when the media moguls do the maths and then agree to setup huge P2P distribution networks using bittorrent. Then they can sit back and rake it in, which will make them very happy, no doubt 🙂

    You’re right about the media cartels’ desperate lobbying of governments to pass more and more laws. They just need to see that the carrot is better than the stick 🙂

  6. Thanks for the pointer to the variable speed setting on XBMC, I didn’t know about that, and it’s certainly much easier to try than replacing the fan.

    I didn’t have a chance to re-try the Xbox link speed last night, but will hopefully have time tonight. However, you get significantly better link speed to your MBP than I do. I think the last time I tested it I was getting < 30Mb/s which was a fair bit more than before I upgraded the MBP disk to 500GB. I don’t have jumbo frames enabled as the OpenSolaris NIC driver for the built in NIC on my motherboard does not seem to support it, but I can’t imagine it would make that much difference.

    I did buy an Intel NIC to try as well, as I had read at various sites that they worked better with OpenSolaris, and even with jumbo frames enabled, that seemed to perform worse than the built in NIC. I also tested the server disk write speed and was getting sustained write speeds in excess of 500MB/s so that’s not the problem.

    It really should not matter for the Xbox though – 20MB/s should be more than enough to stream, but it’s quite annoying to no know what’s hampering it.

    £250 a year is a guaranteed fail. No one is going to pay that, especially when it’s only one labels content. I don’t really think it matters too much anymore what they do in terms of the stick, whether it be disconnections or harsher laws, the genie is well out of the bottle and is not going to go back in. Hopefully they come to there senses and, as you say, offer people what they want at a price they can, and want, to afford.

    The issue with flat rate is who calculates which artists get paid what, and how do they calculate it? One of the major benefits of the p2p sharing culture is the ability to find the old, ‘out of print’, and obscure. Things like the Virgin deal won’t make any provision for that as it will be from their services, not any service, so it’s ‘all you can eat, but we choose the flavours’.

    The only file sharing case to have actually got to trial in the US just awarded the RIAA £1.9m for 24 songs in it’s second round…a few more ‘wins’ like that and more and more artists will distance themselves from the big cartels; a process that’s happening already as the artists realise that they don’t need the labels for much anymore anyway, and are sick of being shafted by them. Not that I think the fine will get paid, it will go to appeal as the RIAA didn’t really have any evidence, and at the very least the constitutionality of the fines will be contested. Ray Beckermans (a lawyer fighting the RIAA) blog has great coverage of all the RIAA cases http://recordingindustryvspeople.blogspot.com.

  7. Yes, the fan setting change will change it from a jet engine to a more tolerable noise. Let me know if the cable swap works.

    I said *Mac Pro* and not MacBook Pro. Do you mean 500 MBytes/sec write speed or 500 Mbits/sec sustained write speed?

    Sooner or later, the record companies will find the right price for flat rate deals when people start to bite, maybe even a bit of market research here and there might help them in this process of discovering the ‘sweet spot’ price.

    Dividing up the pie is tricky, but a simple way would be to divide it up according to what was downloaded, although this might not be ideal, it might be a starting point.

    And you’re right, if only Virgin do this, it won’t be interesting. It needs all of the companies to participate and make the whole music catalogue available, including obscure older stuff.

    That fine was ridiculous — didn’t read it all but it’s crazy. Silly scare tactics like this rather than dealing with the real model change issue won’t do them any favours, yet again.

    Anyway, it’s early days yet, and there’s a long way to go with all of this still, it’s just a pity that things will maybe move at a glacial rate.

  8. Hi! I discovered your blog and It’s really interesting all the information about the Home Fileserver with ZFS. The thing is I have a Intel Atom motherboard, but it only have 2xSATA ports, Do you know about any kind of dummy box that I could connect directly to the SATA ports to have at least 4 hard drives with only 2SATAs (I don’t have eSATA port). Of course It should work with OpenSolaris.

    Thanks a lot (for reading this and for your blog)

  9. Try boxee as well. I know I prefer it over plex and xbmc, plus it also works on ubuntu and windows.

  10. I have a similar setup. My ZFS file server is built on freebsd instead of opensolaris, mainly because of hardware issues. My next server will be opensolaris for sure, i’m a huge fan of the newest build. Anyways, my server is built on 3 raidz1 vdevs each with 4 1tb drives. I have 3 hdtv’s and 2 sdtv’s. The SDTV’s have softmodded xbox’s with xbmc, while the HDTV’s have htpc’s built on linux with xbmc and the mediastream skin (if you haven’t seen it i HIGHLY recommend it for hdtv’s, it’s amazing http://teamrazorfish.co.uk/mediastream.html ) Another thing i love about my setup is that using ZFS to clone a freebsd jail, i can make several jails for different things and it doesn’t take nearly as much space. Opensolaris is awesome but if you have hardware issues, FreeBSD is a real option.

  11. Anyone found a good UPnP media server for OpenSolaris? I’m keen to build a NAS to use with xbox 360/ps3 as the media player so that would be really handy 😀

    1. Yes, I’ve seen the popcorn hour devices in the shops, but not had a chance to take much of a look at them. I wonder how fluid the user interface is. The specs look quite good though, in terms of codec support etc.

      Personally, I’m considering building a small HTPC client based on a cheap AMD Athlon II X2 & mobo, running Linux and XMBC. Should be a good bang/buck ratio with the fluidity of UI that XBMC is known for.

Leave a comment

Your email address will not be published. Required fields are marked *