----------------------------
Guide to Installing and Running MiniDLNA on an Ubuntu Server
I have recently been experimenting with running MiniDLNA on a headless Ubuntu Server and have hit a few snags. After a lot of search and a few pointers from this and other forums I have finally managed to get it running fine. In case anyone else has this problem I have written this guide to hopefully take some of the pain out of installing and configuring an amazing program.The Hardware
My server is a headless HP Microserver running Ubuntu 10.04.3 LTS 64 bit edition accessed through Putty and Webmin (www.webmin.com). I have also tried this using a virtual setup using Virtual Box and that also worked fine.
As a receiver, I am using an LG HX806SH Blu-ray player connected to my LAN by a Homeplug adapter. I have also tried using Windows Media Player and they both work fine. I would like to try this with VLC to test it on a Linux desktop but configuring VLC to receive streaming media from a server is beyond me right now.
The Server Setup
The server has a standard headless setup including Samba installed (a combination of Windows and Linux machines share files stored on it). If you need any help installing and using Webmin, I suggest you have a look at the excellent guide at http://www.kelvinwong.ca/2010/05/22/...-04-lts-lucid/.
Installing and Configuring MiniDLNA
For some reason, when I tried to install MiniDLNA, through Putty I received error messages. From reading around, it turns out that this is a common problem as some repositories are missing.
In the end, these commands installed the package:
Code:
sudo apt-get install --reinstall python-software-properties && sudo dpkg-reconfigure python-software-properties sudo add-apt-repository ppa:stedy6/stedy-minidna sudo apt-get update sudo apt-get upgrade sudo apt-get install minidlna
If you are accessing the server through Webmin and are not sure how to install the module, save it to a local location (such as your desktop on your computer). Select the "Webmin Configuration" module which is under the "Webmin" tab. Select the "Webmin Modules" and choose to load the module “From uploaded file". Once the module has been installed it will be automatically be configured and it will be available under the "Servers" tab.
Once this is installed, you need to configure the MiniDLNA conf file located at /etc/minidlna.conf.
You can use your favourite text editor or if you are accessing this through Webmin, you can use the "Edit" option in "File Manager". If you have installed the Webmin module, you can also change all of the settings from there.
My minidlna.conf file reads as follows:
[refer to link for the full text, but the only changes I had to made were adding the following]
# 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,/media/server/server/Media/Films
media_dir=V,/media/server/server/Media/TV
media_dir=V,/media/server/server/Media/Commedy
media_dir=V,/media/server/server/Music/Videos
media_dir=A,/media/server/server/Music/Music
media_dir=P,/media/server/server/Stuff/Pictures
# set this if you want to customize the name that shows up on your clients
friendly_name=MiniDLNA Server
[Basically you need to add the path to the appropriate folders you want to share, and where it says "friendly_name" you can change to something you can easily identify in your network.]
As you can see, I've made a few changes to the standard file:
- I have added various sources of videos
- I have changed the name of the server so I can recognise it easily on the network
- I have moved the location of the database to a location that I backup each day and is shared by Samba (this is for my personal benefit only)
- I have added extra filenames to the "AlbulmArt" section as I usually call the front cover of an album "Front"
Despite the line “# default presentation url is http address on port 80” MiniDLNA does not have a webpage that it can be controlled from. From what I can gather, this was going to be a future feature that was not completed for whatever reason. However, the Webmin module takes care of everything that you need.
From the "Command Shell" in Webmin or through an SSH session using Putty, you can control MiniDLNA using the commands:
Code:
sudo /etc/init.d/minidlna stop sudo /etc/init.d/minidlna start
The Webmin module has a "Restart" button but for some reason (on my set-ups) it does not work properly. It will stop MiniDLNA but when it tries to restart it, it fails. Trying to manually start it using the command "sudo /etc/init.d/minidlna start" after using this "Restart" does not seem to work and the only way I have found to resolve this is to restart the whole server.
Adding or Removing Files of Folders from the Database
In my experience, MiniDLNA tends not to notice if a file has been added or removed from the folders so the database does not update and new files are not shown on your device and old files are still shown even though they have been removed. This seems to be a problem with MiniDLNA and not the receiving soft/hardware. If you change the name of the server, the soft/hardware picks that up fine.
Some people have had success with the command:
Code:
minidlna -R
Code:
rm -rf /tmp/minidlna
Code:
minidlna -R -f /tmp/minidlna.conf
Outstanding Problems
The only thing I have not been able to get MiniDLNA to do so far is display my photos properly on the Blu-ray player even though they display fine on Windows Media Player. On the Blu-ray, it shows all of the folders where my pictures are stored and even gives me the option to search by camera but when I try to view the pictures or look into the folders, the folders are all empty. This suggests it is something to do with the Blu-ray player and not MiniDLNA however, to be honest this is not an issue for me as my main aim was to stream videos and music and it works perfectly for that.
If anyone can point me to a walkthrough of how to receive streamed videos and music on VLC I would be grateful so I can test this set-up on that and add it to this guide.
I hope you find this guide useful and it takes away some of the headaches I've had with setting up this excellent program.
No comments:
Post a Comment