Squeezebox Setup

Install Twonky Media Server DLNA server

If media tomb doesn’t meet your DLNA streaming requirements you could look at buying a copy of Twonky Media Server (you only need the server bit). Its only 11 quid, and is on sale for less occasionally – either price seems worth it. It’s got better compatability than mediatomb, has transcoding (though I’ve not used that myself, so can’t vouch for it) and gets more active development. Anyway if you decide to go this route then these are the instructions to get it installed and running as a service.

First you need to make the installation folder (to make life simple later on we’re going to use the default directory).

[root@tranquilpc share]# cd /usr/local
[root@tranquilpc local]# mkdir twonkymedia
[root@tranquilpc local]# cd twonkymedia
[root@tranquilpc twonkymedia]# pwd
/usr/local/twonkymedia

Next we want to install the latest version. You can get the link to the latest version from here, then pull that onto the machine The last cd command left us in the installation directory (/usr/local/twonkymedia), so we will put the file straight in there.

[root@tranquilpc twonkymedia]# pwd
/usr/local/twonkymedia
[root@tranquilpc twonkymedia]# wget http://twonkymedia.com/downloads/twonkymedia-i386-glibc-2.2.5-5.1.3.zip
–2010-03-14 16:05:24– http://twonkymedia.com/downloads/twonkymedia-i386-glibc-2.2.5-5.1.3.zip
Resolving twonkymedia.com… 63.241.31.144
Connecting to twonkymedia.com|63.241.31.144|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2890338 (2.8M) [application/x-zip-compressed]
Saving to: `twonkymedia-i386-glibc-2.2.5-5.1.3.zip’

100%[====================================================================================================================================================>] 2,890,338 259K/s in 13s

2010-03-14 16:05:37 (224 KB/s) – `twonkymedia-i386-glibc-2.2.5-5.1.3.zip’ saved [2890338/2890338]

Then we unzip the file, and after unzipping it remove it:

[root@tranquilpc twonkymedia]# unzip twonkymedia-i386-glibc-2.2.5-5.1.3.zip
Archive: twonkymedia-i386-glibc-2.2.5-5.1.3.zip
inflating: RevisionHistory
inflating: Linux-HowTo.txt
inflating: radio.m3u
inflating: twonkymedia.sh
inflating: cgi-bin/cgi-jpegscale
inflating: plugins/itunes-import
inflating: plugins/itunes-import.plugin
inflating: plugins/mediafusion-integration-plugin
inflating: plugins/mediafusion-integration.plugin
inflating: twonkymediaserver
inflating: twonkymedia
inflating: bg_trans
inflating: cgi-bin/convert
inflating: cgi-bin/any-mp3.desc
inflating: cgi-bin/convert-jpeg.desc
inflating: cgi-bin/convert-readme.txt
extracting: cgi-bin/convert.location
inflating: cgi-bin/ffmpeg-asf-flv.desc
inflating: cgi-bin/ffmpeg-avi-flv.desc
inflating: cgi-bin/ffmpeg-divx-mpeg.desc
inflating: cgi-bin/ffmpeg-flv-mpg.desc
inflating: cgi-bin/ffmpeg-mov-flv.desc
inflating: cgi-bin/ffmpeg-mp4-flv.desc
inflating: cgi-bin/ffmpeg-mpg-flv.desc
inflating: cgi-bin/ffmpeg-mpg-wmv.desc
inflating: cgi-bin/ffmpeg-msdvr-mpeg.desc
inflating: cgi-bin/ffmpeg-msvideo-flv.desc
inflating: cgi-bin/ffmpeg-ts-mp4.desc
inflating: cgi-bin/ffmpeg-wmv-flv.desc
extracting: cgi-bin/ffmpeg.location
inflating: cgi-bin/flac-wav.desc
extracting: cgi-bin/flac.location
inflating: cgi-bin/jpeg-scale.desc
inflating: cgi-bin/thumbs-jpeg.desc
creating: resources/
inflating: resources/TwonkyMediaConfig.js
inflating: resources/index.html
extracting: resources/radio-sel.gif
inflating: resources/website-bg.gif
extracting: resources/photo-sel.gif
inflating: resources/TMS_Logo_transparent.png
extracting: resources/video-sel.gif
inflating: resources/webbrowse-settings.gif
extracting: resources/music.gif
inflating: resources/strings-chs.txt
creating: resources/views/
inflating: resources/views/folder.view.xml
inflating: resources/views/simple.view.xml
inflating: resources/views/advanced.view.xml
inflating: resources/views/classified.view.xml
inflating: resources/views/view-definitions.xml
inflating: resources/views/ipodlike.view.xml
inflating: resources/head-background.jpg
inflating: resources/wmdrm-trouble.htm
inflating: resources/webbrowse-e61-upload.gif
inflating: resources/devicedescription-dlna-1-0.xml
extracting: resources/webbrowse-play.gif
inflating: resources/devicedescription-redsonic.xml
inflating: resources/platform-specific-menu-grouping.js
inflating: resources/strings-ru.txt
extracting: resources/mb-video-sel.gif
inflating: resources/strings-it.txt
inflating: resources/devicedescription-dlna-1-5.xml
inflating: resources/clients.db
inflating: resources/twonkymedia.gif
inflating: resources/empty.gif
extracting: resources/webbrowse-logo.gif
inflating: resources/nocover_audio.jpg
inflating: resources/menu-background.jpg
inflating: resources/right.gif
extracting: resources/twonkyicon-120×120.png
inflating: resources/webbrowse-psp-home.gif
extracting: resources/photo.gif
inflating: resources/config.html
extracting: resources/mb-video.gif
inflating: resources/webbrowse-psp-upload.gif
extracting: resources/mediabrowser.gif
extracting: resources/webbrowse-psp-play.gif
extracting: resources/twonkyicon-48×48.png
inflating: resources/strings-es.txt
extracting: resources/mb-music.gif
inflating: resources/webbrowse-upload.gif
inflating: resources/webbrowse.css
inflating: resources/twonkyicon-120×120.jpg
inflating: resources/config-content.html
extracting: resources/webbrowse-e61-play.gif
inflating: resources/wait.htm
inflating: resources/tri-blau.gif
inflating: resources/favicon.ico
extracting: resources/status-sel.gif
inflating: resources/TwonkyMediaConfig.css
inflating: resources/webbrowse-psp-settings.gif
inflating: resources/strings-jp.txt
inflating: resources/webbrowse-back.gif
extracting: resources/status.gif
extracting: resources/cart.gif
inflating: resources/config-head.html
inflating: resources/webbrowse-e61-prev.gif
extracting: resources/mb-config.gif
inflating: resources/webbrowse-n95-upload.gif
extracting: resources/mediabrowser-sel.gif
inflating: resources/webbrowse-psp-back.gif
inflating: resources/webbrowse-pc.gif
inflating: resources/comingsoon.gif
inflating: resources/devicedescription-xbox.xml
inflating: resources/cds.xml
extracting: resources/mb-music-sel.gif
inflating: resources/config.gif
inflating: resources/webbrowse-e61.css
extracting: resources/arrow_test_small.gif
inflating: resources/webbrowse-psp-next.gif
extracting: resources/mb-radio-sel.gif
extracting: resources/webbrowse-prev.gif
inflating: resources/cds-hdrl.xml
inflating: resources/strings-de.txt
inflating: resources/webbrowse-e61-settings.gif
inflating: resources/folder.gif
inflating: resources/cms.xml
extracting: resources/arrow-left.gif
extracting: resources/arrow-right.gif
inflating: resources/home.gif
extracting: resources/mb-photo.gif
inflating: resources/webbrowse-n95-next.gif
inflating: resources/TwonkyMediaServer_logo.jpg
inflating: resources/webbrowse-n95-prev.gif
inflating: resources/strings-fr.txt
inflating: resources/wait.gif
inflating: resources/transcoding.db
inflating: resources/webbrowse-n95-settings.gif
extracting: resources/mb-photo-sel.gif
inflating: resources/strings-cht.txt
inflating: resources/webbrowse-psp-logo.gif
inflating: resources/webbrowse-home.gif
inflating: resources/stop.gif
inflating: resources/devicedescription-win7.xml
inflating: resources/twonkyicon-80×80.jpg
inflating: resources/webbrowse-n95.css
extracting: resources/music-sel.gif
extracting: resources/rss.gif
extracting: resources/mb-header-logo.gif
inflating: resources/webbrowse-e61-next.gif
inflating: resources/webbrowse-mobile.gif
extracting: resources/mb-radio.gif
extracting: resources/radio.gif
inflating: resources/left.gif
inflating: resources/nocover_video.jpg
inflating: resources/strings-nl.txt
extracting: resources/webbrowse-psp-prev.gif
inflating: resources/webbrowse-psp.css
extracting: resources/webbrowse-e61-home.gif
inflating: resources/msreg.xml
inflating: resources/protocolinfo.xml
extracting: resources/webbrowse-n95-play.gif
inflating: resources/nocover_photo.jpg
extracting: resources/TM_16x16.png
inflating: resources/webbrowse-e61-back.gif
inflating: resources/record.gif
inflating: resources/webbrowse-n95-back.gif
inflating: resources/devicedescription-tmm.xml
inflating: resources/twonkyicon-48×48.jpg
inflating: resources/cds-noupdate.xml
inflating: resources/webbrowse-e61-logo.gif
inflating: resources/attention-small.gif
inflating: resources/TwonkyMediaConfig_grouping.js
inflating: resources/norss.gif
inflating: resources/strings-ko.txt
inflating: resources/strings-en.txt
extracting: resources/webbrowse-next.gif
inflating: resources/strings-fi.txt
extracting: resources/video.gif
extracting: resources/mb-headerBG-kachel.gif
inflating: resources/config-menu.html
inflating: resources/webbrowse-n95-home.gif
inflating: resources/devicedescription-yamaha.xml
inflating: start_bgtrans.sh
inflating: initial_keystore.dat
inflating: mediafusion_keystore.dat
inflating: twonkymedia-server-default.ini
[root@tranquilpc twonkymedia]# rm twonkymedia-i386-glibc-2.2.5-5.1.3.zip
rm: remove regular file `twonkymedia-i386-glibc-2.2.5-5.1.3.zip’? y

The permissions are not quite right out of the box, so we need to fix them:

[root@tranquilpc ~]# cd /usr/local/twonkymedia/
[root@tranquilpc twonkymedia]# chmod 700 twonkym* cgi-bin/* plugins/*

The default port for twonky is 9000 – the same as the squeezebox server, so we need to change that. To do this edit the /usr/local/twonkymedia/twonkymedia-server-default.ini file, and add in a port config section:

contentbase=/
contentdir=+A|/
followlinks=0
radio=0
readdbondemand=0
ignoredir=AppleDouble,AppleDB,AppleDesktop,TemporaryItems
suppressmenu=divAutoShare
httpport=9050

If you have symbolic links used inside you library then the followlinks option needs to be set on as well in the same file:

followlinks=1

Next we need to configure it as a service, and let it auto start. First we will link the startup script, then add it to the service config:

[root@tranquilpc twonkymedia]# cd /etc/init.d/
[root@tranquilpc init.d]# cp /usr/local/twonkymedia/twonkymedia.sh twonkyserver
[root@tranquilpc init.d]# chmod a+x twonkyserver

We need to make a change to ensure the ip binding works correctly so we need edit the file /etc/init.d/twonkyserver and find this section:

echo -n “Starting $TWONKYSRV … ”
“$TWONKYSRV” -D
rc_status -v

and change it to (the ip address should be the ip of the server – 192.168.1.107 for me – you can use ifconfig to see yours):

echo -n “Starting $TWONKYSRV … ”
“$TWONKYSRV” -D -ip 192.168.1.107
rc_status -v

[root@tranquilpc init.d]# chkconfig –add twonkyserver
[root@tranquilpc init.d]# chkconfig twonkyserver on
[root@tranquilpc init.d]# service twonkyserver start

Finally we need to add in multicast routing:

[root@tranquilpc ~]# route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0

Now you can go to the config web page – http://192.168.1.107:9050 for me, and configure away. If you want to support flac and video transcoding then you will need ffmpeg and flac installed. I’ve not used this myself, but assuming that you have the rpmforge repo added (covered on the lame page) then this should get you the dependancies you need:

[root@tranquilpc ~]# yum install flac
[root@tranquilpc ~]# yum --enablerepo=rpmforge install ffmpeg

The location file for ffmpeg also points at a windows location out of the box – so the file /usr/local/twonkymedia/cgi-bin/ffmpeg.location should be changed to just say:

/usr/bin

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: