Wednesday, May 2, 2012

My new media server

Recently y decided to get a bigger external hard drive so I can use it to backup my computers, mainly as backup storage for Ubtuntu´s own backup tool Déjà Dup. Tired of cables however, it had to be a network disk, so I can access it from anywhere while at home, and also use it for sharing photos and other files with my family. After a quick search on Amazon for external hard drives, I found the Western Digital My Book Live 3 TB Personal Cloud Storage Drive, for $199 which seems to be a perfect fit for my requirements. It's also available in 1 and 2 TB, but I decided to get the 3TB version, which should be big enough for a while.

What I didn't know at that time is that this nice little device makes an awesome home media server! It's basically a PowerPC computer running Debian Linux, it includes an iTunes server so your music shows up as an iTunes library in the home network and a commercial media server named Twonky which enables you to stream all media files over DLNA so I can watch them directly on my SmartTVs over the network, without the need to copy them over to pendrives or stream them using the laptop. Isn't that great?

For file sharing it supports Windows Share, Apple File Protocol (AFP) and FTP out of the box so you can access it´s content from basically any computer. I prefer accessing it via AFP from my Ubuntu laptop.

It has a nice web interface which allows you to configure the device. If you're using a home router that supports connected devices to register their names, the web interface should be available out of the box using http://mybooklive.local/. Also, you can enable SSH login using the hidden page at http://mybooklive.local/UI/ssh so you have full access to the system. You can install aditional software, use rsync, or whatever you dream about doing with a linux server.

So, to wrap it up, it takes no more than 10 minutes to unpack and add the device to your home network and have a working media server! You can use it just like that, or start tweaking it to get more features.

Subtitles

The first thing you would probably want are subtitles for the video files you stream. Samsung SmartTVs are capable of loading external subtitles via DLNA (Samsung calls it AllShare), which is something Twonky doesn't support. Fortunately, you can turn it off in the settings and install another DLNA server.

MiniDLNA

One option is MiniDLNA, if you have a lot of time on your hands to compile a version for PowerPC, which I did the second day after getting the drive. To compile it, you have to install the necesary libraries and compiler. Search on the internet how to do that, there are various howtos about it.

The next day after installing MiniDLNA, Western Digital released a formware update and I had to learn the hard way that firmware updates wipe out self installed software. So, after one day of having MiniDLNA stream nicely with subtitles, I had to start over. However, after the latest firmware update (april 24th, 2012) apt-get would refuse to install most packages because some libc6 incompatibility. So I decided to see if I find a way to install without forcing the libc6 update, as I am not sure if that wouldn't break other software or even brick the drive...

Optware

So, the first attempt was to install MiniDLNA from Optware. The good thing about optware is that it installs everything in /opt. To prevent the the next firmware from wiping out, I moved the opt directory to /DataVolume and symlinked it to /opt. The installation went fine, and I had MiniDLNA running again. The problem showed up when I tried to use it: it wouldn't stream any video file, it would just show "unsuported file format" (or somethign similar).

Cross compiling

Given that I didn't want to force the update on the drive, the next option was to build a cross compiling enviroment and compile a statically linked version of minidlna for powerpc. I have to admit that I dropped this idea pretty soon, when I realize that it would requiere much more time that I had available -- and  I had already invested a good amount of hours in getting this to work.

TVMOBiLi

Then I realized that it's probably cheaper to buy a commercial product than to keep wasting my time. I had already used TVMOBiLi on my laptop before and I knew it worked fine with subtitles, so I headed to their download page to see if they had a version that would run on MyBookLive. Got the LINUX DEB INSTALLER version from the Devices seccion, copied it over to my drive, logged in as root and ran dpkg -i to install it. It worked flawlessly, out of the box. All I had to do was to open the web interface at http://mybooklive.local:30888/ to add the paths to the media files and I had a working media server that supports al kind of files, including subtitles on Samsungs Allshare. The first month of usage is free, and then they charge $1.50 monthly for unlimited usage, which I consider well spent, thinking about how many hours of work it would have costed to get something similar running with free software.

So, thumbs up for TVMOBiLi, and also for the WD My Book Live which turned out to be able to do much more than I expected.

9 comments:

  1. I have followed it with TVMobili, but at the end I get a warning... "missing transcoder - vlc".

    Did you have this problem?

    ReplyDelete
    Replies
    1. Transcoding means that the server will recode video files to different formats for different devices. That way you could watch an DiVX movie on your iPhone for example.

      However, the TV is able to reproduce basically everything and I don't care about watching videos on my iPhone or other devices. Also, the CPU in the NAS is not that powerful, so I guess transcoding would be pretty slow anyway. That's why I just turned off transcoding in the settings and didn't bother about the missing components needed for transcoding.

      Delete
  2. Yes. The problem is my TV (Sony 40 EX520) does not support all formats (in fact, not much).

    You are right on your guess... I installed VLC on the NAS, and, appart from being 300 MB of related libraries and so, it does not work (it shuts down the TVMobili server on the NAS if I try to transcode).

    Therefore I think I will try to use the Mac as the TVMobili Server, linking the NAS folders... let's see...

    ReplyDelete
    Replies
    1. You could transcode on your Mac and only store the transcoded files on the NAS to stream them to your TV. The nice thing about the NAS this is that it's always on and you don't have to keep your laptop on, or start it whenever you want to watch something.

      Delete
  3. Solved this way... Now I have to think if I'ww try to delete all the crap the VLC brought with it xDD

    ReplyDelete
  4. "apt-get remove vlc && apt-get autoremove" should do the trick, but I woudn't trust it blindly.

    If you didn't install anything else, then you can probably find all the packages that were downloaded and installed in /var/cache/apt/archives and uninstall them manually.

    ReplyDelete
  5. how can I install tvmobili in my wd live, from windows? Can you help me here? Thanks

    ReplyDelete
    Replies
    1. I'll post a step-by-step how-to in a little while. Check back later please.

      Delete
    2. Any progress on that step by step im kinda stuck too. Would be greatly apriciated if you could make a how-to!
      thanks in advance

      Delete