This tutorial is now outdated - Thanks to input from Mad Penguin, there is now a better way of installing/configuring the MiniDLNA media streaming server.
Those starting the tutorial from scratch, please use the new tutorial here:
http://linuxforums.org.uk/index.php?topic=9822.msg70397#msg70397
Those that have already completed the tutorial in this posting … see here:
http://linuxforums.org.uk/index.php?topic=9822.msg70396#msg70396
If you are running Ubuntu 11.10, you can skip the section about adding the PPA … 11.10 has minidlna in the default repositories, earlier versions of Ubuntu don’t.
If your Ubuntu box doesn’t have a static IP address … give it one now … and remember it, you’ll need it later.
Theoretically this should work without a static IP, but if you decide NOT to give your Ubuntu box a static IP … when you get to the section about editing the /etc/minidlna.conf file, comment out this line -
presentation_url=http://172.16.0.2:48200/
so it reads
#presentation_url=http://172.16.0.2:48200/
Adding the PPA repository
For Ubuntu 11.04 (Natty), open a terminal and enter:
sudo add-apt-repository ppa:nathan-renniewaldock/ppa
Ubuntu 9.10 (Karmic), 10.04 (Lucid), and 10.10 (Maverick) users can use this PPA:sudo add-apt-repository ppa:stedy6/stedy-minidna
And the rest of the instructions should be the same, but I haven’t tested them with anything other than Natty and Oneiric
Now update the package list with:
sudo apt-get update
This section is for ALL Ubuntu versions (9.10 → 11.10) …
Install the minidlna package with:
sudo apt-get install minidlna gstreamer0.10-ffmpeg
This section is for 11.04 (Natty) users …
We’re now going to disable the PPA as it contains a lot of other packages which may cause issues at your next system update.
Open a terminal and enter:
sudo software-properties-gtk
When the “Software Sources” window opens … select the Other Software tab, and UNtick the lines -
Index of /nathan-renniewaldock/ppa/ubuntu natty main
and
Index of /nathan-renniewaldock/ppa/ubuntu natty main (Source Code)
Click the “Close” button.
Back in the terminal run:
sudo apt-get update
(9.10 → 10.10 users don’t need to disable the PPA, as it only contains minidlna … but you can if you wish)
This section is for ALL Ubuntu versions
Configuring the MiniDLNA Server
Open the /etc/minidlna.conf file for editing:
sudo gedit /etc/minidlna.conf
At this point it would probably be easiest to show you MY /etc/minidlna.conf file contents.
It will share your -
Music
Pictures
Videos
directories.
[spoiler]# port for HTTP (descriptions, SOAP, media transfer) traffic
port=48200
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=A,/home/mark/Music
media_dir=P,/home/mark/Pictures
media_dir=V,/home/mark/Videos
set this if you want to customize the name that shows up on your clients
friendly_name=Ubuntu MiniDLNA Server
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://172.16.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=.[/spoiler]
You may need to change the eth0 to YOUR network interface.
You will need to change the mark entries to YOUR username.
You will need to change the 172.16.0.2 IP address to the static IP of your Ubuntu box.
(or comment this line out altogether if your Ubuntu box is getting its IP via DHCP)
SAVE the file and exit gedit.
Test the MiniDLNA server
Reboot, and see if there is a device listed on your Xbox or Network TV called Ubuntu MiniDLNA Server
if there is … you’re done
if there isn’t … and there wasn’t on either of mine (Natty and Oneiric) … read on
This section is for 11.10 Oneiric ONLY (with minidlna installed from the default repos)
Open a terminal, and run:
sudo killall minidlna
then
minidlna
then
minidlna -R
Now check the Xbox, or Network TV (you may have to restart the Xbox or TV)
If there is a device listed called Ubuntu MiniDLNA Server …
Back in the terminal enter:
sudo update-rc.d -f minidlna remove
Now create an entry in Startup Applications with these settings -
Name: MiniDLNA Server
Command: minidlna
Comment: Media Streaming Server
SAVE it … make sure it’s ticked … REBOOT … done.
This section is for ALL OTHER versions of Ubuntu (9.10 → 11.04) with minidlna installed from a PPA
Open a terminal, and run:
sudo killall minidlna
then
sudo chmod 777 /var/cache/minidlna/files.db
then
minidlna
then
minidlna -R
Now check the Xbox, or Network TV (you may have to restart the Xbox or TV)
If there is a device listed called Ubuntu MiniDLNA Server …
Back in the terminal enter:
sudo update-rc.d -f minidlna remove
Now create an entry in Startup Applications with these settings -
Name: MiniDLNA Server
Command: minidlna
Comment: Media Streaming Server
SAVE it … make sure it’s ticked … REBOOT … done.