Home » HTPC » Setup MiniDLNA on Ubuntu
HTPC

Setup MiniDLNA on Ubuntu

DLNA allows you to play home network media on all compatible devices over the network. Last year I wrote a post on how to setup MiniDLNA, the free media server software in ubuntu 10.04. I also pointed out the limitations of MiniDLNA media server and why I moved away from it. Since then there has been several updates to MiniDLNA and it is being very actively developed. At the time of writing this the latest version was 1.0.24, which several good fixes and upgrades. I am particularly happy that it now supports subtitles. The full change log can be found here. This post explains how to setup MiniDLNA server for Ubuntu for streaming content to media players over the network.

UPDATE (July 6, 2013): Check this post for an updated guide on how to compile and install the latest version of MiniDLNA (now ReadyMedia) on Ubuntu.

Setup MiniDLNAI was intrigued by the changes and decided to take one more dip and test the new version on my Ubuntu Server 12.04 LTS Precise Pangolin. That said, the description below should work most past releases too. My TV and Bluray player setup is still the same: LG 42″ LED TV and LG Bluray Player. With that taken care of, below is how I installed and configured MiniDLNA.

Download and Setup MiniDLNA

To install MiniDLNA, download it from here: http://sourceforge.net/projects/minidlna/files/minidlna/. Go into the latest version folder and download the file named minidlna_X.X.XX_static.tar.gz. Alternatively, you could add the PPA repository to your /etc/apt/sources.list and install as described below:

sudo add-apt-repository ppa:stedy6/stedy-minidna
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install minidlna

Sourceforge normally has the most recent versions and is my preferred way of installing MiniDLNA. My MiniDLNA runs on a headless server with Webmin running. If yours is a similar setup then this webmin module offers a easy way to edit your configuration file, restart, and rescan MiniDLNA.

Best Android TV Boxes in 2016RatingPrice
NVIDIA SHIELD TV Streaming Media Player 2nd Geneditors pick
$199.99
Amazon Fire TV Box 2nd Gen
$99.99
KDLINKS® A300 4K Android Quad Core 3D Media Player
$199.99
Matricom G-Box Q² Android TV Streaming Media Mini PC
$97.00
Henscoqi MXIII MX3 Quad Core Amlogic S802 2G/8G Smart HTPC TV Box
$49.99

Configure MiniDLNA

The next step to setup MiniDLNA on Ubuntu is to configure MiniDLNA. Extract the downloaded tar file:

tar -zxvf filename.tar.gz

This results in files: /usr/sbin/minidlna, /etc/minidlna.conf, and a bunch of files within /usr/share folder. Normally you can ignore the /usr/share folder and everything within this. CD into the location of first 2 files (minidlna and minidlna.conf) and move them as follows:

sudo mv minidlna /usr/sbin/
sudo mv minidlna.conf /etc/minidlna.conf

Then configure minidlna.conf file. Below is my new minidlna.conf file:

# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited.
# network_interface=eth0

# 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)
media_dir=V,/home/user/media/Movies
media_dir=P,/home/user/media/Photos
media_dir=A,/home/user/media/Music

# set this if you want to customize the name that shows up on your clients
friendly_name=My-MiniDLNA

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/home/user/.minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log

# 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
log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=fatal

# 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 ("/")
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

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# 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.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=895

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1

# specify the path to the MiniSSDPd socket
# minissdpdsocket=/var/run/minissdpd.sock

# 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
# root_container=.

Continue to next page to fully setup MiniDLNA.

About the author

Anand

Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, XBMC, and related HOW-TOs (read more).

Archives

Join the other 110,000 followers