CAPTCHA
Image CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are human.
  • Create new account
  • Reset your password

User account menu

Home
The Hyperlogos
Read Everything

Main navigation

  • Home
  • My Resumé
  • blog
  • Howtos
  • Pages
  • Contact
  • Search

MiniDLNA on Debian 5.0 "Lenny"

Breadcrumb

  • Home
  • User Blogs
  • User Blog
  • MiniDLNA on Debian 5.0 "Lenny"
By drink | Sat January 01, 2010

For some time now I have been using PS3 Media Server to stream video to my Xbox 360. Since solutions for playing various video streams on various devices have become more convenient of late I've become less picky about what I transcode to, except that I like to achieve fairly high quality. ogmrip has become less useful of late, failing on most source video on which I try to use it, so I've gone back to Handbrake, the most competent and arrogant of DVD transcoders.

When I say competent, I mean that Handbrake keeps getting better. When I say arrogant, I mean that while it can produce video files for just about anything, the administration is not interested in assisting you in actually getting your settings right if your player is not ideologically pure. That means that if you have a Playstation 3 or an Xbox 360 (that is to say, if you are in the majority) then you will need to use the settings formerly included with Handbrake (in 0.93) for the PS3 and Xbox 360; I found them in an ubuntu forums thread from which the settings can be downloaded, but I've also attached them to this blog to save you the trouble of tracking them down. I can verify that the Xbox 360 settings produce a file that my 360 can play today without transcoding.

Getting the content to the machine is another matter. When my desktop machine is running, ps3mediaserver is quite capable of doing the job, and indeed more capable than my file server could ever be; I am using a Seagate Dockstar, one of the most stripped-down versions of the PogoPlug. They were available from Woot for about thirty bucks shipped on one occasion; I run Debian Lenny on mine as they are extremely restricted and I refuse to run any swap on such a machine; best-case, swapping over USB2 is going to be very hard on it.

Consequently, I went snooping around for a more lightweight DLNA server. I don't want any transcoding; That's working great on my desktop with ps3mediaserver, and the Dockstar doesn't have the cojones to do any of that stuff anyway. I looked at ushare, (formerly?) part of GeeXBox Linux, but it's been abandoned for some time now. I looked at the GNOME solution Rygel, but that is said to be a bear to build on Lenny and the official packages are for later distributions. I might try it on my desktop in the future, though, to avoid having to deal with an out-of-management Java program, namely ps3mediaserver. Right now Rygel can only transcode video to MPEG2, which seems like it would save on CPU but not on bandwidth. Anyway, I finally found a pointer to MiniDLNA, which was billed as being small and easy to build — precisely what I was looking for!

As it turns out, the billing is entirely accurate. Detailed build instructions for Debian Lenny don't exist of course; here are some. Note that you might just be able to download the binary and run it; I am running on armv5tel architecture so compiling was necessary.

Build Instructions

Fetch the source from The Sourceforge Download Page. Get the latest version. Unpack it; there will be a directory "minidlna". Enter this directory and run:

./genconfig.sh

This will check for dependencies and if all are found, produce the Makefile. You can ensure all deps are installed with this command:

sudo aptitude install build-essential libavcodec-dev libavformat-dev libavutil-dev libflac-dev libvorbis-dev libogg-dev libid3tag-dev libexif-dev libjpeg-dev libsqlite3-dev libid3tag0-dev

Anything already installed won't be reinstalled. Once genconfig.sh runs correctly:

make

Once make runs correctly, you have successfully built minidlna. I installed it to /usr/local as per the top of the Makefile:

sudo env INSTALLPREFIX=/usr/local make install

Now edit /etc/minidlna.conf to point to your media and so on. For example, change from:

media_dir=/opt

To something like:

media_dir=A,/mnt/MyBook/Audio
media_dir=V,/mnt/MyBook/Video
media_dir=P,/mnt/MyBook/Images

You can just point it to a single directory, but if your media content is broken up like mine is, this permits minidlna to make more intelligent choices about scanning the content, which it will need to do before it becomes visible to your clients. Content becomes visible as it has been scanned, so you can start streaming content before the entire library has been indexed.

Now all you have to do is run "minidlna" to start the server. Once you've verified that it works, add it to your /etc/rc.local file before the exit 0 to make it start each time you start the system:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

if [ -d /mnt/MyBook/Video ]; then
  /usr/local/sbin/minidlna
fi
exit 0

Now the server will start up each time you start up your computer. In the above example I added a test to see if one of my media folders was present to avoid starting the server if the volume is not mounted. This means I will have to manually start the server in that case, but it also means that there should be no potential problems with the server throwing away content indexes because the library has apparently been emptied. (I don't know if this is a problem or not...)

Attachment Size
Xbox 360.plist (1.01 KB) 1.01 KB
PS3.plist (980 bytes) 980 bytes
Debian
howto
DLNA
streaming
linux

Anonymous (not verified)

14 years ago

Permalink

good!

Thanks, its just what i needed :Di did it in squeeze and work in the same way

  • Log in or register to post comments
  • Log in or register to post comments

Footer menu

  • Contact
Powered by Drupal

Copyright © 2025 Martin Espinoza - All rights reserved