Home Server MiniDLNA Server

Index.

23-Jul-2011: initial release.
17-Oct-2011: updated directory permissions.
07-Aug-2012: updated presentation_url.
16-Dec-2012: adjusted for Slackware.

 

Introduction.

MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully compliant with DLNA/UPnP-AV clients. It is developed by a NETGEAR employee for the ReadyNAS product line. Find out more about the Digital Living Network Alliance in this Wiki.

There is also Mediatomb available for Linux. While this has more features like media transcoding, the development seems to have come to a halt so I decided to use MiniDLNA on my own servers. MiniDLNA is currently active developed and has enough features to support the latest DLNA capable devices.

 

Installation.

There is no MiniDLNA package is in the standard Slackware distribution so you need to build the package yourself. It depends on parts of the ffmpeg package, so install that first. You can get the build scripts or packages from this site or use the slackbuilds website.

There is only one configuration file to edit: /etc/minidlna.conf, only the relevant configuration lines are shown:

port=8200
network_interface=eth0
media_dir=A,/mnt/media/Audio
media_dir=V,/mnt/media/Video
media_dir=P,/mnt/media/Fotos
friendly_name="WPL DLNA Server"
db_dir=/var/cache/minidlna
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.
   jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
inotify=yes
enable_tivo=no
strict_dlna=no
presentation_url=http://media.wpl.ym:8200/
notify_interval=900
serial=12345678
model_number=1

 

Note that the album_art_names= line is broken here, in the real file it must be one long line. I have split the media_dir paths in Audio, Video and Fotos. This is not needed for MiniDLNA but other programs and humans that use these directories like it better this way.

About the presentation_url, it just shows a simple page with minidlna statistics.

You don’t need to create the db_dir, it will be created when MiniDLNA is started if it’s at the default location /tmp. But since /tmp is a tmpfs (ramdisk) on some systems, the database and art directories are lost on these systems after each system boot. If you want to prevent this set the db_dir to /var/cache/minidlna. Before you start minidlna for the first time you must create that directory manually and let it own by user minidlna. You need to create this by hand because user minidlna is not allowed to create a directory in /var/cache. Note that if you use the rc.minidlna script from my Slackbuild, the init script will take care of this.

The following commands adds the minidlna startup commands to /etc/rc.d/rc.local and starts minidlna for the first time:

root@homsrv:~# cd /etc/rc.d
root@homsrv:/etc/rc.d# echo "[ -x /etc/rc.d/rc.minidlna ] && /etc/rc.d/rc.minidl
na start" >> rc.local
root@homsrv:/etc/rc.d# ./rc.minidlna start
Starting minidlna done.
root@homsrv:/etc/rc.d#

 

Cache maintenance.

MiniDLNA has a cache with the thumbnails of the audio (mp3, flac etc) files. The default location of that cache is /tmp or /var/cache/minidlna if you have set this in /etc/minidlna.conf.  MiniDLNA automatic adds new thumbnails when you add new music, but if you move, rename or delete music the thumbnails will not follow. So after a long time there can be a lot of orphaned thumbnails in your cache. In Slackware Linux you can (as root) clean and rebuild the cache with the following command:

root@homsrv:~# /etc/rc.d/rc.minidlna clean
Stopping minidlna done.
Cleaning minidlna cache done.
Starting minidlna done.
root@homsrv:~#

 

This command returns quite fast, but in the background the cache will be rebuild and depending on the size of your collection, this can take a while. In that cache directory you will also find a logfile, in that file you can see the cache rebuilding.

 

Screenshots.

Albums selection

Albums selection

Playing a MP3

Playing a MP3

Here are two screen shots using the MiniDLNA server on a Nokia phone via wireless LAN:

2 thoughts on “Home Server MiniDLNA Server”

    1. Hi Jeroen,

      I really don’t know. It seems that there are people who managed to install additional software on these devices. I think you need to search the Internet for that information.

      Michiel.

Comments are closed.