Showing posts with label tvmobili. Show all posts
Showing posts with label tvmobili. Show all posts

Sunday, March 3, 2013

Installing the latest manual version of TVMOBiLi on Western Digital Mybook Live

If you tried to follow the instructions in my last entry about installing TVMOBiLi on your MyBookLive NAS you may have encountered a small problem. The latest .deb package is not an universal package anymore and doesn't include support for PowerPC, which is needed for the MyBookLive.

However it's very easy to install the manual package, which does have the PowerPC binaries included. To do this, download the file that says LINUX MANUAL INSTALL from the Devices section on the TVMOBiLi download page. Save it to the Public folder and then replace Step 7 from my previous post with the following commands:

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

MyBookLive:~# cd /shares/Public/

Look for the downloaded file:

MyBookLive:/shares/Public# ls -l

You should see the .tar.gz file:

-rw-rw-r--  1 nobody              share 11278704 Mar  3 12:33 tvmobili-all-universal.tar.gz

You can install the package anywhere in the system, but I suggest putting in /shares/. This way, it's not touched by firmware updates, but it's still out of the Public folder so it doesn't show up when you're browsing the drive and delete it or modify it by mistake.

To do so, change back to the /shares/ folder:

MyBookLive:~# cd /shares/

and extract the archive:

MyBookLive:/shares# tar xzvf /shares/Public/tvmobili-all-universal.tar.gz

You will see a bunch of files that are extracted into a folder called tvmobili:


tvmobili/
tvmobili/usr/
tvmobili/usr/local/
tvmobili/usr/local/bin/
tvmobili/usr/local/bin/tvmobilisvcd_arm_g234
tvmobili/usr/local/bin/tvmobilisvcd_arm_g250

Once finished, change to the tvmobili folder:

MyBookLive:/shares# cd tvmobili

First, create the log folder:

MyBookLive:/shares/tvmobili# mkdir -p var/log/tvmobili

Next, create a symlink to the powerpc binary:

MyBookLive:/shares/tvmobili# cd usr/local/bin/
MyBookLive:/shares/tvmobili/usr/local/bin# ln -s tvmobilisvcd_ppc_g250 tvmobilisvcd

Make sure the symlink was created right:

MyBookLive:/shares/tvmobili/usr/local/bin# ls -l 
total 32768
lrwxrwxrwx 1 root root      21 Feb 24 19:47 tvmobilisvcd -> tvmobilisvcd_ppc_g250
-rwxr-xr-x 1 root root 5519557 Jan 30 18:38 tvmobilisvcd_arm_g234
-rwxr-xr-x 1 root root 4215885 Jan 30 18:38 tvmobilisvcd_arm_g250
-rwxr-xr-x 1 root root 8788267 Jan 30 18:38 tvmobilisvcd_arm_u000
-rwxr-xr-x 1 root root 5330673 Jan 30 18:38 tvmobilisvcd_i386_g2110
-rwxr-xr-x 1 root root 5327519 Jan 30 18:38 tvmobilisvcd_i386_g236
-rwxr-xr-x 1 root root 4095789 Jan 30 18:38 tvmobilisvcd_ppc_g250

Go to the config directory:

MyBookLive:/shares/tvmobili/usr/local/bin# cd /shares/tvmobili/etc/tvmobili/conf/

Copy the default config file:

MyBookLive:/shares/tvmobili/etc/tvmobili/conf# cp tvMobiliService.conf.notlimited tvMobiliService.conf

Edit the file using vi or pico if you're not familiar with vi:

MyBookLive:/shares/tvmobili/etc/tvmobili/conf# vi tvMobiliService.conf
or 
MyBookLive:/shares/tvmobili/etc/tvmobili/conf# pico tvMobiliService.conf

and change the line that says:

WebServerRoot=/etc/tvmobili/www
to
WebServerRoot=/shares/tvmobili/etc/tvmobili/www

Change to the init directory:

MyBookLive:/shares/tvmobili/etc/tvmobili/conf# cd /shares/tvmobili/etc/init.d/

Edit the init file with vi or pico:

MyBookLive:/shares/tvmobili/etc/init.d# vi tvmobilisvcd.init
or
MyBookLive:/shares/tvmobili/etc/init.d# pico tvmobilisvcd.init

Change the line that says:

INSTALLROOT=
to
INSTALLROOT=/shares/tvmobili

Change to the system init directory:

MyBookLive:/shares/tvmobili/etc/init.d# cd /etc/init.d/

Create a symlink to the tvmobili.init file:

MyBookLive:/etc/init.d# ln -s /shares/tvmobili/etc/init.d/tvmobilisvcd.init .

Make sure it was created right:

MyBookLive:/etc/init.d# ls -l tvmobilisvcd.init 
lrwxrwxrwx 1 root root 45 Mar  3 13:21 tvmobilisvcd.init -> /shares/tvmobili/etc/init.d/tvmobilisvcd.init

And finally create the stop/start links (never mind the warning):

MyBookLive:/etc/init.d# update-rc.d tvmobilisvcd.init defaults
update-rc.d: warning: /etc/init.d/tvmobilisvcd.init missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/tvmobilisvcd.init ...
   /etc/rc0.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc1.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc6.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc2.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc3.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc4.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc5.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init

To start TVMOBiLi either reboot the drive or run:

MyBookLive:/etc/init.d# /etc/init.d/tvmobilisvcd.init start
Starting TVMOBiLi server

That's it. Continue with Step 8 to configure TVMOBiLi and enjoy.

After a firmware update, all you have to do is recreate the symlink in the /etc/init.d directory and run update-rc.d again to enable TVMOBiLi again:


MyBookLive:~# cd /etc/init.d/
MyBookLive:/etc/init.d# ln -s /shares/tvmobili/etc/init.d/tvmobilisvcd.init .
MyBookLive:/etc/init.d# update-rc.d tvmobilisvcd.init defaults
update-rc.d: warning: /etc/init.d/tvmobilisvcd.init missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
 Adding system startup for /etc/init.d/tvmobilisvcd.init ...
   /etc/rc0.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc1.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc6.d/K20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc2.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc3.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc4.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
   /etc/rc5.d/S20tvmobilisvcd.init -> ../init.d/tvmobilisvcd.init
MyBookLive:/etc/init.d# /etc/init.d/tvmobilisvcd.init start
Starting TVMOBiLi server

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.