Today we will show you how to make a media server in your local network. We will use Raspberry Pi and MiniDLNA software for this purpose.
I have already described the installation of Raspberry in the first article of the Raspberry series.
I have described how to connect to Raspberry via Samba and upload files (such as a movie) to it in the second article.
Now we will show you how to install the MiniDLNA server. In order to share media from Raspberry in our network and play it on Xbox, mobile, laptop or smart TV.
MiniDLNA is an open source program that uses the UPnP protocol. Its installation is primitive:
sudo apt-get update sudo apt-get upgrade sudo apt-get install minidlna
In the previous article, we created a folder /home/pi/share in Raspberry, which we will now use as a source of media. Open the configuration file:
Open the configuration file in the “nano” editor:
sudo nano /etc/minidlna.conf
And we can write our own settings at the end of the file. Be careful with the media_dir line - that will be our famous shared folder.
inotify=yes media_dir=/home/pi/share merge_media_dirs=yes
Save using Ctrl+X and then Y.
Start MiniDLNA as a service with this command.
sudo service minidlna start
Make sure the service starts automatically when Raspberry is turned on.
sudo update-rc.d minidlna defaults
So that’s it. Now we have a functional media server in our local network that we can access from anywhere. For example, if we have Xbox One or a computer with Windows 10, we use the Films & TV app. Switch to “Media servers” and we will see media on Raspberry.