Monday, May 28, 2012

How to install TVMOBiLi on Western Digital Mybook Live (step by step)

Here is a clean step by step instruction on how to install TVMOBiLi as media server on a Western Digital Mybook Live running debian linux and replace the preinstalled Twonky media server.

Disclaimer: I am not to be held responsible for any damage you may cause your drive while following these instructions. Especially if you are not familiar with Linux, don't enter any commands not listed here while installing the software.

That being said, here goes the how-to:

Step 1 - check your drive is installed right and up to date

Make sure your WD Mybook Live is installed and accessible from the Web interface. The Web interface should show up when you open http://mybooklive.local. If you never installed additional software manually on the drive, update the firmware to the latest version. If you did install software on the drive before, than this how-to is not for you, as you already know what you're doing.

Step 2 - just for windows users

Download PuTTY, an SSH client for Windows PCs. Either the standalone binary (putty.exe) or the Windows installer should be fine.

Step 3 - enable SSH

In order to login to the drive, you have to enable SSH. To do that, open http://mybooklive.local/UI/ssh and check SSH Access. The username and password shows up on the same page.

Step 4 - disable Twonky

Still on the web interface, disable Twonky in Settings:Media. If you change your mind later and want to keep using Twonky, you can come back here and enable it again.

Step 5 - download TVMOBiLi

Go to http://www.tvmobili.com/download.php and download the LINUX PPC DEB INSTALLER form the Devices section. For your convenience, save it to the Public folder on the drive so you can access it easily from the drive.

Step 6 - login to the drive

Open an SSH connection to the drive (mybook.local) and login as root with the password that you obtained in step 3. On a Mac, open Terminal and type:

ssh root@mybooklive.local

On Windows PCs, use Putty. The connection is successful if you end up in a text window with a prompt that says:

MyBookLive:~#

Step 7 - Install TVMOBiLi

Change to the Public folder and look for the installation file you downloaded:

MyBookLive:~# cd /shares/Public
MyBookLive:/shares/Public# ls -l

You should see the file:

-rwxrw-r--  1 nobody              share 9771422 May 28 12:09 tvmobili-all-ppc.deb

Run dpkg -i tvmobili-all-universal.deb to install it:

MyBookLive:/shares/Public# dpkg -i tvmobili-all-ppc.deb

If everything works fine, the installation should end with a line saying:

Starting TVMOBiLi server: tvmobilisvcd.

We are done on the drive, close the Putty window, or type exit to logout.

Step 8 - Configure TVMobiLi

Back on the PC, go to http://mybooklive.local:30888/ to configure TVMOBiLi. All you have to do is go the Settings page, scroll down to folders and click ADD next to MY FOLDERS. You can add the folder you want to be visible on the media server or the whole Public folder if you want to be able to access everything. Remember the shared folders are inside the /shares directory on the drive, so look for them there.

You may also want to open the Transcoding page and turn off transcoding so the drive doesn't try to transcode the videos you are watching.

After the free month, you may need to get a subscription from TVMOBiLi if you use it for more than 10 GB per month.

If you every want to go back toTwonky, just login to the drive with ssh again, remove tvmobili using dpkg -r tvmobili and enable Twonky form the web interface again.





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.