MiniDLNA employs Universal Plug and Play (UPnP) thus you can have clients such as TVs, consoles and smartphones.
In this post I'll describe the steps needed to install and configure it to run on FreeBSD, though the steps were performed on 7.4-RELEASE they'll work on more recent FreeBSD branches such as 8.x and 9.x.
Let's start by installing the net/minidlna port:
# cd /usr/ports/net/minidlna
# make config-recursive
# make install clean
Having installed the port, it's time to edit the configuration file. As an example, I'll leave my own as reference. Make sure that you edit network_interface, media_dir and friendly_name.
# vim /usr/local/etc/minidlna.conf
# port for HTTP (descriptions, SOAP, media transfer) traffic
# network interfaces to serve, comma delimited
# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
# can prepend the type, followed by a comma, to the directory:
# + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)
# + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
# + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
# set this if you want to customize the name that shows up on your clients
friendly_name=FreeBSD DLNA Server
# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
# set this if you would like to specify the directory where you want MiniDLNA to store its log file
# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
# which may hurt JPEG serving performance on (at least) Sony DLNA products.
# default presentation url is http address on port 80
# notify interval in seconds. default is 895 seconds.
# serial and model number the daemon will report to clients
# in its XML description
# specify the path to the MiniSSDPd socket
# use different container as root of the tree
# possible values:
# + "." - use standard container (this is the default)
# + "B" - "Browse Directory"
# + "M" - "Music"
# + "V" - "Video"
# + "P" - "Pictures"
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
To have MiniDLNA working properly the dlna user must be made owner of the /var/db/minidlna directory:
# mkdir -p /var/db/minidlna
# chown dlna:dlna /var/db/minidlna
To start using MiniDLNA immediately issue the following command:
# /usr/local/etc/rc.d/minidlna onestart
If you want to have it start up automatically whenever FreeBSD boots, add it to /etc/rc.conf like so:
# echo 'minidlna_enable="YES"' >> /etc/rc.conf
Finally MiniDLNA's log file can be monitored for errors:
# tail -f /var/db/minidlna/minidlna.log
MiniDLNA it's quite simple and lightweight however it is missing features that can be found in more complete UPnP servers. Those operating on old hardware might find it very useful.
Be advised that if you're planning on sharing multimedia files over a local network composed mainly of desktops and laptops, NFS and Samba are more flexible filesharing alternatives. On the other hand, if you want to stream to a TV, console or smartphone then by all means go for an UPnP server like MiniDLNA or MediaTomb.
If you're using an Android smartphone have a look at the MediaHouse app. From my experience it works just fine with MiniDLNA.