IWH Software
My projects
Retro stuff
Random stuff
About me
Contact me
Admin login

Raspberry Pi DLNA Server

Once your external drive is properly attached, samba sharing is set up, and you've carefully loaded all your media into the correct folders on your Raspberry Pi. You'll be able to play the media on computers around your network that can access the drive through that devices network file sharing feature.

However, what about devices that don't do network sharing, like games consoles, smart DVD players and TV boxes..?

That's where a DLNA server comes in, and the one I've been using is MiniDLNA.

So to start, SSH in as normal and run this command...

ian@Home:/$ sudo apt-get install minidlna

Once that's complete, you'll have to do some configuration, so run this command to get to the config file...

ian@Home:/$ sudo nano /etc/minidlna.conf

Which runs the nano text editor which you should be familiar with by now.
So firstly, scroll down with the cursor keys and find the three lines that start media_dir=. A means Audio, P means Pictures and V means Video. These lines tell MiniDLNA where to look to find your media, so change them so that they end up like the following, I've used my paths, obviously you need to use your own paths...


Once that's finished, look for #friendly_name=, this is the name that's displayed on the network when other devices are browsing and change it to whatever you want, don't forget to remove the #...


Finally, I increased the time MiniDLNA waits between refreshing it's database, as my media doesn't change that often, there's no point in scanning it every few minutes, so I reduced it to once an hour, however there is an option on my webserver to start a scan immediately if I need to...

So find the notify_internal= option and change it to 3600...


Once you're happy press CTRL+O and CTRL+X to exit back to the shell, then restart MiniDLNA by this command...

ian@Home:/$ sudo service minidlna force-reload

Depending on the amount of content you have stored, this may take a while, so give it some time, eventually you'll be able to see all of your media on your DLNA network devices...

You can check the status of MiniDLNA by visiting its internal webpage on port 8200, ie, Use your IP address obviously.
This will present a simple screen with the total amount of content in it's database.

MiniDLNA status

Audio files: 18105
Video files: 281
Image files: 0
Happy streaming!

© 2019 IWH Software (Ian Hill)