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 Arch 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.
17-Oct-2011: updated directory permissions. 23-Jul-2011: initial release.
Installation.
The MiniDLNA package is in the Arch Linux community repository so it can be installed like any other program:
[root@homsrv ~]# pacman -S minidlna
resolving dependencies...
looking for inter-conflicts...
Targets (20): libexif-0.6.20-1 libid3tag-0.15.1b-6 libogg-1.2.2-1
flac-1.2.1-2 libvorbis-1.3.2-1 lame-3.98.4-1 sdl-1.2.14-6
xvidcore-1.3.2-1 x264-20110617-1 libtheora-1.1.1-1
opencore-amr-0.1.2-1 alsa-lib-1.0.24.1-1 libvdpau-0.4.1-1
orc-0.4.14-1 schroedinger-1.0.10-1 libvpx-0.9.6-2
libva-1.0.12-1 rtmpdump-2.3-3 ffmpeg-20110622-1
minidlna-1.0.20-1
Total Download Size: 9.59 MB
Total Installed Size: 50.97 MB
Proceed with installation? [Y/n]
:: Retrieving packages from extra...
libexif-0.6.20-1-i686 334.2K 750.8K/s 00:00:00 [######################] 100%
libid3tag-0.15.1b-... 45.9K 279.6K/s 00:00:00 [######################] 100%
libogg-1.2.2-1-i686 69.8K 327.5K/s 00:00:00 [######################] 100%
flac-1.2.1-2-i686 1413.4K 551.2K/s 00:00:03 [######################] 100%
libvorbis-1.3.2-1-i686 276.3K 698.2K/s 00:00:00 [######################] 100%
lame-3.98.4-1-i686 262.2K 692.0K/s 00:00:00 [######################] 100%
sdl-1.2.14-6-i686 439.4K 793.7K/s 00:00:01 [######################] 100%
xvidcore-1.3.2-1-i686 243.2K 652.5K/s 00:00:00 [######################] 100%
x264-20110617-1-i686 330.1K 777.2K/s 00:00:00 [######################] 100%
libtheora-1.1.1-1-i686 571.9K 875.9K/s 00:00:01 [######################] 100%
opencore-amr-0.1.2... 333.7K 739.5K/s 00:00:00 [######################] 100%
alsa-lib-1.0.24.1-... 340.2K 747.6K/s 00:00:00 [######################] 100%
libvdpau-0.4.1-1-i686 43.8K 262.6K/s 00:00:00 [######################] 100%
orc-0.4.14-1-i686 190.4K 583.4K/s 00:00:00 [######################] 100%
schroedinger-1.0.1... 418.1K 737.7K/s 00:00:01 [######################] 100%
libvpx-0.9.6-2-i686 307.2K 719.8K/s 00:00:00 [######################] 100%
libva-1.0.12-1-i686 127.6K 472.1K/s 00:00:00 [######################] 100%
rtmpdump-2.3-3-i686 103.1K 443.2K/s 00:00:00 [######################] 100%
ffmpeg-20110622-1-i686 3.8M 1081.4K/s 00:00:04 [######################] 100%
:: Retrieving packages from community...
minidlna-1.0.20-1-i686 107.8K 458.7K/s 00:00:00 [######################] 100%
(20/20) checking package integrity [######################] 100%
(20/20) checking for file conflicts [######################] 100%
( 1/20) installing libexif [######################] 100%
( 2/20) installing libid3tag [######################] 100%
( 3/20) installing libogg [######################] 100%
( 4/20) installing flac [######################] 100%
( 5/20) installing libvorbis [######################] 100%
( 6/20) installing lame [######################] 100%
( 7/20) installing sdl [######################] 100%
( 8/20) installing xvidcore [######################] 100%
( 9/20) installing x264 [######################] 100%
(10/20) installing libtheora [######################] 100%
(11/20) installing opencore-amr [######################] 100%
(12/20) installing alsa-lib [######################] 100%
Optional dependencies for alsa-lib
python2: for python smixer plugin
(13/20) installing libvdpau [######################] 100%
(14/20) installing orc [######################] 100%
(15/20) installing schroedinger [######################] 100%
(16/20) installing libvpx [######################] 100%
(17/20) installing libva [######################] 100%
Optional dependencies for libva
vdpau-video: VDPAU backend for VA API
(18/20) installing rtmpdump [######################] 100%
(19/20) installing ffmpeg [######################] 100%
(20/20) installing minidlna [######################] 100%
[root@homsrv ~]#
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/ 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, I created a virtual webserver that points to the /mnt/media partition, but I didn’t find it useful for something. Maybe I’m missing something here.
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) these days the database and art directory cache is lost 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 nobody. You need to create this by hand because user nobody is not allowed to create a directory in /var/cache.
[root@homsrv ~]# mkdir -p /var/cache/minidlna [root@homsrv ~]# chown nobody:nobody /var/cache/minidlna [root@homsrv ~]# /etc/rc.d/minidlna start :: Starting minidlna [DONE] [root@homsrv ~]#
You can add @minidlna at the end of the DAEMONS=() array in /etc/rc.conf so it will automatic start when your server boots.
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 Arch Linux you can (as root) clean and rebuild the cache with the following command:
[root@homsrv ~]# /etc/rc.d/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.
Here are two screen shots using the MiniDLNA server on a Nokia phone via wireless LAN:


2 comments
jeroen
January 1, 2012 at 18:42 (UTC 1)
can I install this on my Zyxel NSA 310?
best regards
Jeroen
Michiel
January 1, 2012 at 20:54 (UTC 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.