Linux Media Server with miniDLNA 3
I received a WD TV Live, TVL, for Christmas to replace my aging MediaGate MG35 network media player. The MG35 is still working and has a nice GUI, but doesn’t support many of the newer media file formats like x264, mkv or high definition content. Also, the MG35 requires anonymous access via samba to the media. I’ve locked it down by IP, but would rather have userid/password controls.
Install miniDLNA instructions below.
More Media Formats and HiDef
The TVL supports these newer media formats, hidef content and adds a DLNA client. Personally, I don’t really see the need for DLNA, since samba just works. However, due to a caching bug of the TVL that never gets refreshed or flushed until the client connection is restarted, I found myself wanting to try DLNA too. Sadly, the caching problem exists with the DLNA connection as well, so any updated, transcoded TV shows from yesterday can’t be seen in the file list without either a forced reconnect via samba or a reboot of the TVL device. Boo to WD – this is definitely a bug.
Get MiniDLNA
Enough complaining. MiniDLNA is a free DLNA server that supports photos, music and video media. It isn’t perfect (I didn’t see the source code, just a statically built version) but extremely trivial to setup on Linux. There are other DLNA servers available, but they seem to be more trouble that I wanted.
miniDLNA Install Steps
- Download a copy
- Place the config file in /etc/minidlna.conf (without source code this is the only place)
- Place the binary file in /usr/sbin/minidlna
- chmod +x /usr/sbin/minidlna
- Edit the config file to add your Music, Photo and Video directories
- As any user, start /usr/sbin/minidlna and give it a few seconds (or minutes) to scan all the media you have. I have thousands of photos, lots of Music and some videos.
- From your DLNA client, like the WD TV Live, browse Media Servers and it should show up in the list.
That’s it. From the TVL, I see my Linux server listed next to my Windows7 Media Center PCs. Music is organized, video files are available by folder or alphabetically. Photos are organized with some neat options – Date, camera, etc. This DLNA thing may be worth the effort.
You may want to add a daily minidlna stop/start around 4 am and force the minidlna cache files to be rebuilt occasionally.
There are other DLNA servers that run on Linux. Let me know in the comments which you are using.
Trackbacks
Use the following link to trackback from your own site:
https://blog.jdpfu.com/trackbacks?article_id=443
MediaTomb
MiniDLNA wouldn’t update the DB without killing the process and manually deleting the cache. Boo. So I needed a better answer and MediaTomb seemed easy and is capable of automatic media refresh.
MediaTomb Installation
That was it. Then just browse to the internal MediaTomb web page and find the directories that you’d like it to index. There is an XML configuration file, but there’s no need to edit it that I can see. The web interface seems to handle it.
Since I don’t run inotify (at least, not yet), I specified that my Music directories should be indexed every week and my Videos every few hours in the web GUI. This will refresh any new content that arrives without too much issue. Making these settings through the XML file would be nicer for me, but I guess the web gui will work too.
With DLNA, the server allows search queries. I recorded Deliverance this weekend and wanted to watch it. Searching for “Deliver” found it immediately from the WD-TVLive player. Good to know that Search is good for something, since it didn’t work with Samba mounted media.
The video update took about 20 minutes and the Music is still running an hour later, just to give you an idea of the index time. I did specifically browse to a deep directory and add 1 video, it showed up immediately in the playback device.
So far, I’m pleased with MediaTomb. Simple, effective, I just wish it had any security at all.
Kudos on your site content! You should check out the Amahi Home Server project. http://amahi.org The miniDLNA server has been packaged as a One Click app for Amahi, along with many media-centric apps. We are also looking for bloggers to spread the word about Amahi after trying it out. Drop us a line at marketing at amahi.org if you do.
Cheers,
Pat
WD TV Live HD caching bug was fixed in a firmware update a few months ago. To for a directory re-read, just traverse the the directory below the know that need to be refreshed and reenter it. That should force a refresh. It does for me.
At this point I’ve stopped using DLNA of any kind. It was simply too much hassle for my needs. I use samba to stream content multiple times a day, so the WD TV Live HD is definitely under very heavy use. Further, the Win7 Media Center box never really provided content with DLNA in a useful way. Again, the list of media was always stale.