Pages

Saturday, June 4, 2011

Taming The WD MyBook Live And Twonky 5.1.9

As I posted here last November, I've got my home entertainment center tricked out with a 2TB Western Digital MyBook Live NAS device. I've since had to do some tuning and some tweaking, and this information might be helpful to someone else, so I'm posting about it.

DISCLAIMER: I'm not responsible for any loss of warranty, data, marital consortium, or anything else. Everything below worked for me, but it's your responsibility to decide if you understand things well enough to proceed.

If you have an iPad: install either Media Link Player Lite and / or LivingMediaPlayer (aka "MLPlayer" and "LMPlayer". Both were free the last time I checked) and you can use the MyBook's built-in Twonky server to stream media wirelessly to your iPad via your home wireless router.

To enable ssh (ie, command-line) access to your MyBook, use the backdoor:

http://myMyBookIPAddress/UI/ssh

This enables ssh and tells you that the root pw is initially welc0me. This is hard-coded into the page, so if you change the password, it'll still say the password is welc0me. So if you change the password, don't forget it!

http://myMyBookIPAddress/UI

has a "Media" page that lets you turn TwonkyServer on and off.

http://myMyBookIPAddress:9000/

is the TwonkyServer control panel. Click the wrench icon to get to the good stuff. Note that the "Sharing" page doesn't seem to work.

Your MyBook Live runs a version of Linux called Debian "lenny". Twonky is located in the directory

/usr/local/twonkymedia-5

Your vanilla twonkymedia-server.default.ini file probably looks something like this:

contentbase=/shares
contentdir=+A|/Public
followlinks=0
radio=0
readdbondemand=0
scantime=-1
friendlyname=%HOSTNAME%-Twonky
ignoredir=AppleDouble,AppleDB,AppleDesktop,TemporaryItems,SmartWare
suppressmenu=mediafeeds,transcoding,divAutoShare,network
startupmb=1
disablelocalssdp=1
streambuffer=131072
dbdir=/CacheVolume/twonkymedia
cachedir=/CacheVolume/twonkymedia
nicrestart=1
uploadenabled=1
uploadmusicdir=/shares/Public/Shared Music
uploadpicturedir=/shares/Public/Shared Pictures
uploadvideodir=/shares/Public/Shared Videos
maxidletime=0

Note that I have a single share named Public. It contains the following subdirectories:

/Public/Craig
/Public/Miranda
/Public/Roberta
/Public/Aidan
/Public/Shared Books
/Public/Shared Music
/Public/Shared Pictures
/Public/Shared Video

The vanilla .ini file is problematic: it indexes everything (all videos, pictures, and music), which takes a loooong time -- and there's something wrong with Twonky's supposed ability to notice when new content is added and thus I must re-index frequently -- and causes Twonky's DB to grow very large. Which appears to make Twonky less reliable. We are a simple family, with simple needs: we just want to stream videos. So I modified the file to this:

contentbase=/shares
contentdir=+V|/Public
followlinks=0
radio=0
readdbondemand=0
scantime=-1
friendlyname=%HOSTNAME%-Twonky
ignoredir=AppleDouble,AppleDB,AppleDesktop,TemporaryItems,SmartWare,Craig,Miranda,Roberta,Aidan,Shared Books,Shared Music,Shared Pictures
suppressmenu=mediafeeds,transcoding,divAutoShare,network
startupmb=1
disablelocalssdp=1
streambuffer=131072
dbdir=/CacheVolume/twonkymedia
cachedir=/CacheVolume/twonkymedia
nicrestart=1
uploadenabled=1
uploadmusicdir=/shares/Public/Shared Videos
uploadpicturedir=/shares/Public/Shared Videos
uploadvideodir=/shares/Public/Shared Videos
maxidletime=0

Note 1: It's a good idea to save a copy of the old file before you modify it:

cp twonkymedia-server-default.ini twonkymedia-server-default.ini.save

Note 2: I added the names of directories I didn't want to scan (Craig, Miranda, etc) to the ignoredir line.

Note 3: I changed the contentdir line from '+A|/Public' to '+V|/Public', which makes Twonky search only for videos. I leave it as an exercise for the reader to play with comma-separating different combinations of + and - and M, P, V, and A to target content more precisely (ie, "+V|/Public,-A|/Public/Shared Music,+P|/Public/Shared Pictures").

Note 4: I had some trouble getting Twonky to recognize my tweaked .ini file, so I resorted to the following process:

  1. Stop TwonkyServer via the "Media" page at http://myMyBookIPAddress/UI
  2. At your Linux command line, type cd /CacheVolume/twonkymedia
  3. Your command line prompt should read
    MyBookLive:/CacheVolume/twonkymedia#
  4. Okay -- I know this is a gutsy move, but -- delete the entire contents of your current directory (ie /CacheVolume/twonkymedia)
  5. Re-start TwonkyServer via the "Media" page at http://myMyBookIPAddress/UI
  6. Go to http://myMyBookIPAddress:9000/ and check to see that you're up and running.

Note 5: The process outlined in Note 4 above will also fix Twonky if you try to access the web control panel at http://myMyBookIPAddress:9000/ and get "page not found". I mention this because Google tells me this is a not-uncommon problem.

Note 6: I changed uploadmusicdir, uploadpicturedir, and uploadvideodir so they all pointed at the /Public/Shared Videos directory. I'm not sure if this was necessary or not.

Hacking WD MyBook World Ed has lots of interesting information on the MyBook Live.

No comments:

Post a Comment