In Part 2 we shared files using a Samba server. Now a more advanced way to share media (video, music, pictures) is to use a media server.
A Raspberry Pi can make for a great Media Centre experience. Most modern smart TVs can automatically detect a media server on your network. The go to media server app is ReadyMedia (formally known as miniDLNA). It runs light on resources and gives enough functionality to sort and share your media files.
- Connect to your pi over terminal/cmd
- Install ReadyMediasudo apt-get update
sudo apt-get upgrade
sudo apt-get install minidlna
Choose a Folder to Share
- Any directory can be created and shared.
- Option 1 – Continue sharing the folder you created in Part 1.
- Option 2 – Create a new folder with the proper permissions using the command
sudo mkdir -m 1777 <directory>
Ex sudo mkdir -m 1777 /media/myusbdriveshare/videos
- Create other folders as needed
sudo mkdir -m 1777 /media/myusbdriveshare/audio
sudo mkdir -m 1777 /media/myusbdriveshare/pictures
- If the folder already exists, just set the permissions
sudo chmod 1777 /media/myusbdriveshare/videos
Configure the Media Server
- Open the Configuration file
sudo nano /etc/minidlna.conf
- Quick note on the basic settings:
friendly_name – you can change the name of your DLNA servicemedia_dir the type of files and what directory you want to share ex.
Now to make our changes:
Restart the Service
sudo service minidlna restart
Force a refresh its contents or skip this step and wait for the automatic update
sudo service minidlna force-reload
Note that the cache can be found here. If you ever have trouble with stale or old information shared about your library, simply delete this file and restart.