Installing the MiniDLNA media streaming server in Ubuntu

First kill minidlna:

sudo service minidlna stop
sudo killall minidlna

Then run:

sudo sudo apt-get build-dep minidlna

and let it install any dependencies.

Then run:

sudo gedit /etc/minidlna.conf

And make your minidlna.conf read:-

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

# network interfaces to serve, comma delimited
network_interface=wlan0

# 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=A,/home/bally/Music
media_dir=P,/home/bally/Pictures
media_dir=V,/home/bally/Videos

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

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

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

# 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://192.168.0.2:48200/

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

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

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

then run:

sudo gedit /etc/default/minidlna

and make it read:-

# Defaults for minidlna initscript
# sourced by /etc/init.d/minidlna
# installed at /etc/default/minidlna by the maintainer scripts

# These options can be set to modify the behavior of the minidlna init script.
# The options commented out show the default values.

# Start the daemon if set to "yes"
START_DAEMON="yes"

# Path to the configuration file
CONFIGFILE="/etc/minidlna.conf"

# Path to the log file
#LOGFILE="/var/log/minidlna.log"

# User and group the daemon should run as
USER="bally"
GROUP="bally"

# Additional options that are passed to the daemon
#DAEMON_OPTS=""

then run:

sudo mkdir -v /var/cache/minidlna
sudo service minidlna stop
minidlna -R
sudo chown -R bally:bally /var/cache/minidlna

Now REBOOT and go test the it on your phone/Xbox/whatever … there should be a device listed as BALLY-LAPTOP, and you should be able to access any supported media files you put in the:-

~/Music
~/Pictures
~/Videos

directories on the Ubuntu box.

Works like a charm. Cheers old yin! ;D

Using MediaHouse from the Play store, as suggested by Mark. I’m on the free version, and it suits my needs perfectly.

Now all I need to do, is install minidlna on my home-server. Can I use a comma to add extra folders to the minidlna.conf?

I don’t know if it supports comma separated values … but there’s nothing stopping you doing it like this:

media_dir=A,/home/bally/Music
media_dir=P,/home/bally/Pictures
media_dir=V,/home/bally/Videos
media_dir=/path/to/new/share1
media_dir=/path/to/new/share2
media_dir=/path/to/new/share3
media_dir=/path/to/new/share4

etc.


Thanks for the feedback on the MediaHouse UPnP / DLNA Browser software … as one of my sons has jujst become the proud owner of an HTC Desire C … so we finally have sommat Android in the house :slight_smile:

For other readers the MediaHouse UPnP / DLNA Browser can be found at these links

MediaHouse UPnP / DLNA Browser (free edition)
or
MediaHouse Pro-Edition UPnP / DLNA Browser (commercial edition)

Tell your son I wish him good luck with his HTC… ::slight_smile: Not a problem, streams HD 1080p video just fine on my S3, quality is amazing as well.

I’ll give that suggestion a try, it might be a cleaner way of keeping track of folders, etc, as well. Now to read over the PPA instructions. I should really update the NAS to 12.04… I’ll do it later.

What were the rolled eyes about ? … the kids a college student that just went out and got himself a job (his first “proper” job) during the holidays … he can’t afford an S3, and I think he’s done himself proud earning the money for his HTC himself … I’m certainly proud of him :slight_smile:

You’ve gotten the wrong end of the stick, I wasn’t meaning that in a bad way. It’s great he’s got a job, just HTC’s are notorious for hardware faults, and lack of updates from the manufacturer. I thought you of all people would’ve understood that, assuming you read The Reg, and what not?

All I meant was, expect him to ask you to fix it when it breaks.

Ahh … apologies then … nope, I’ve had no real need to follow what goes on with smartphones … and the choice was his anyway :slight_smile:

Just be armed with a USB cable. ;D


Anyway, looks like that PPA is outdated. My home-server can’t get the fingerprint, and if it does, it closes the TLS connection.

Error: can't find signing_key_fingerprint at https://launchpad.net/api/1.0/~stedy6/+archive/stedy-minidlna bks@bally-server:~$ sudo add-apt-repository ppa:stedy6/stedy-minidlna Error reading https://launchpad.net/api/1.0/~stedy6/+archive/stedy-minidlna: Peer closed the TLS connection bks@bally-server:~$

Looks like I’m moving nowhere fast.

Forget that PPA if the one in 12.04 is now working.

[EDIT]

OK, which version you runnin on the server ?

[EDIT 2]

Try manually adding the signing key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 661F5D0B

It seems my box not getting the PPA seems to be a problem in itself. It’s not adding any ppa I try. It fails, yet all my packages are up-to-date. So either an update has broke it, or it’s a sign to update the damn thing. I really don’t wanna go through all the hassle of setting everything up again. -___-

You still haven’t mentioned which distro/version have you ?

Oh sorry, I totally forgot. Server is running Ubuntu 10.04 Server. :slight_smile:

is it always the same error when you try to add different PPA’s

Error: can’t find signing_key_fingerprint at https://launchpad.net/api/1.0/~stedy6/+archive/stedy-minidlna
bks@bally-server:~$ sudo add-apt-repository ppa:stedy6/stedy-minidlna
Error reading https://launchpad.net/api/1.0/~stedy6/+archive/stedy-minidlna: Peer closed the TLS connection

?

The first error yeah, it can’t find fingerprints.

What’s the output from:

sudo apt-key list

Have you tried the standard fix for messed up sources and gpg kekyfiles ?

sudo apt-get clean
cd /var/lib/apt
sudo mv -v lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update
 sudo apt-key list
bks@bally-server:~$ sudo apt-key list /etc/apt/trusted.gpg -------------------- pub 1024D/437D05B5 2004-09-12 uid Ubuntu Archive Automatic Signing Key sub 2048g/79164387 2004-09-12

pub 1024D/FBB75451 2004-12-30
uid Ubuntu CD Image Automatic Signing Key cdimage@ubuntu.com

pub 1024R/661F5D0B 2009-12-23
uid Launchpad PPA for stedy

I then ran the cleaning procedure and the last command returned the following.

sudo apt-get update
W: Failed to fetch http://ppa.launchpad.net/nilarimogard/wedupd8/ubuntu/dists/lucid/main/binary-i386/Packages.gz 404 Not Found

W: Failed to fetch http://ppa.launchpad.net/stedy6/stedy-minidlna/ubuntu/dists/lucid/main/binary-i386/Packages.gz 404 Not Found

I don’t think your system is broken, I think it’s those PPA’s that are broken.

Download the .deb directly:-
wget https://launchpad.net/~stedy6/+archive/stedy-minidna/+files/minidlna_1.1.0stedy7lucidubuntu1_i386.deb
or
https://launchpad.net/~stedy6/+archive/stedy-minidna/+files/minidlna_1.1.0stedy7lucidubuntu1_amd64.deb

then install with

sudo dpkg -i

Still keep getting errors. I must be doing something wrong?

dpkg: dependency problems prevent configuration of minidlna: minidlna depends on libavcodec52 (>= 4:0.5.1-1) | libavcodec-extra-52 (>= 4:0.5.1-1); however: Package libavcodec52 is not installed. Package libavcodec-extra-52 is not installed. minidlna depends on libavformat52 (>= 4:0.5.1-1) | libavformat-extra-52 (>= 4:0.5.1-1); however: Package libavformat52 is not installed. Package libavformat-extra-52 is not installed. minidlna depends on libavutil49 (>= 4:0.5.1-1) | libavutil-extra-49 (>= 4:0.5.1-1); however: Package libavutil49 is not installed. Package libavutil-extra-49 is not installed. minidlna depends on libid3tag0 (>= 0.15.1b); however: Package libid3tag0 is not installed. dpkg: error processing minidlna (--install): dependency problems - leaving unconfigured Processing triggers for man-db ... Processing triggers for ureadahead ... Errors were encountered while processing: minidlna

From the look of things the dependencies minidlna relies on, are the same dependencies VLC does. I remember this from when I tried compiling VLC twoflower.

See here’s my thoughts.

I’ll try:

sudo apt-get install vlc

then

sudo dpkg -i minidlna_1.1.0stedy7lucidubuntu1_i386.deb

Hopefully that’ll work.

[EDIT] IT WORKS!!! AHHHH!! YES! :smiley:

NOTE: I had to do:

sudo apt-get -f install

to clear some broken packages.

Heh … wouldn’t it have been easier to just install the dependencies it was telling you were missing:-

sudo apt-get install libavcodec52 libavcodec-extra-52 libavformat52 libavformat-extra-52 libavutil49 libavutil-extra-49 libid3tag0

THEN installing minidlna :wink:

Probably, but let’s face it. I’m lazy, so I’ll do it the lazy way, plus I get the added bonus of having VLC on my system should I have to use the desktop at any point. :slight_smile: