DNS-323 is a very versatile little NAS that is widely used to serve music and video files thru Samba network shares. With the help of fun_plug scipt, you can extend its capabilities quite easily.
One very interesting extension is to install TwonkyMedia server 7, a very efficient and low memory print DLNA & uPnP media server.
TwonkyMedia is one of the most efficient DLNA server you can get on a low power device like DNS-323.
It can easily serve music and video files to some network clients like :
|Roku Soundbridge Network Player (uPnP)|
|Philips Network Player NP2500 (uPnP)|
|LG connected TV (DLNA)|
It can handle easily a huge mp3 database (20k+ files) and it can stream 1080p videos (2D or 3D SBS) to your DLNA TV without any problem.
The use of TwonkyMedia server has one drawback : It needs a licence key to run. You can buy one from their site or you can get one attached with some network players, like Philips NPxxxx. Point to be noted, a Twonkymedia server key will work on any number of servers and on any type of supported OS.
This article will explain how to install TwonkyMedia server 7 on the NAS.
As a pre-requisite, you must have installed Fun_plug 0.5 following DNS 323 - Fun_plug 0.5 : Extend your NAS possibilities.
1. Install Dependancies
As thumbnail generation may need to use convert utility, we first install imagemagick package and its dependancies :
# funpkg -i /ffp/pkg/packages/libjpeg*.tgz
# funpkg -i /ffp/pkg/packages/libpng*.tgz
# funpkg -i /ffp/pkg/packages/zlib*.tgz
# funpkg -i /ffp/pkg/packages/imagemagick*.tgz
2. Install TwonkyMedia Server
We will install Twonkymedia Server following this directory structure :
- server : /ffp/opt/twonky
- data : /ffp/opt/twonky/data
- database : /ffp/opt/twonky/db
- cache (thumbnails, ...) : /ffp/opt/twonky/cache
First thing is to check which is the latest available version of Twonkymedia Server from the "NAS and other OS" section of the forum http://www.twonkyforum.com/viewforum.php?f=8.
We need to download the specific DNS-323 version.
At the time of this guide, it was version 7.0.9 available from http://www.twonkyforum.com/downloads/7.0.9-Special/
From the NAS console, throw these commands to install the package :
# mkdir -p /ffp/opt/twonky/
# cd /ffp/opt/twonky
# wget http://www.twonkyforum.com/downloads/7.0.9-Special/twonky-dns323-special-7.0.9.zip
# unzip twonky-dns323-*.zip
# rm Terms* twonky-dns323-*.zip
# chmod +x twonkyserver twonkystarter plugins/* cgi-bin/*
3. Create Startup Script
TwonkyMedia server is now installed.
You then need to create the starter script /ffp/start/twonky.sh for the server to start at every NAS boot.
# PROVIDE: twonky
# REQUIRE: LOGIN
# add route
route add -net 18.104.22.168 netmask 240.0.0.0 dev egiga0
# if firts run, create working directories
test -d "/ffp/opt/twonky/cache" || mkdir /ffp/opt/twonky/cache
test -d "/ffp/opt/twonky/data" || mkdir /ffp/opt/twonky/data
test -d "/ffp/opt/twonky/db" || mkdir /ffp/opt/twonky/db
# cd to the twonky directory
# start twonky server process
/ffp/opt/twonky/twonkystarter -logfile /dev/null -appdata /ffp/opt/twonky/data/ >/dev/null 2>/dev/null
# kill the twonky processes
# remove the route
route del -net 22.214.171.124 netmask 240.0.0.0 dev egiga0
4. Server Configuration
We also need to provide the default configuration file /ffp/opt/twonky/twonkyserver-default.ini for the Twonkymedia server
# Visible name in the network
friendlyname=Video & Music Unlimited
# directory for cached/transcoded files
# directory where metadata database is stored
# for Linux/NAS systems this is the basedirectory used for content sharing (prepended to all shares)
# CSV list of all shares, prepended by the type (A,M,P,V) and a '+' or '-' sign to flag enabled or disabled shares
# access to web config pages, 0 for denied, 1 for local only, 2 for open
# -1 for evented, 0 for disabled, positive value for rescan time in minutes
# on base URL start media browser and not config pages
# menus which are supressed on web config pages
5. First Server Start
Once everything is setup, we can try to start the server daemon :
# sh /ffp/start/twonky.sh start
You should now be able to connect to the Twonkymedia server web interface on port 9000 of your NAS : http://your.nas.ip.address:9000/
From this interface, first things to do is to enter the registration key.
Then from menu "Settings / Sharing", you have to set the path to you music files :
- /HD/HD_a2/xxxxx for your first disk or RAID setup
- /HD/HD_b2/xxxxx for your second disk
If everything is running fine, you should see your music database being scanned under Settings / Status / Detailed status.
As everything is running fine, you just need to allow the server to start at every NAS boot :
# chmod +x /ffp/start/twonky.sh
Your TwonkyMedia server is up and running.