Listen to your music and play video from your RaspberryPi NAS using DLNA

Note: DLNA will give access to your files on RaspberryPi through your local wireless network. Be careful choosing directories to expose.

Supposing you’ve already a RaspberryPi NAS:

RaspberryPi NAS

Change media dir to:

where /media/MYDRIVE is the mount point and music is your music directory and A is the flag for Audio (leave unchanged for music, for pictures use P, for video use V).

Change db_dir (preview, database and cache directory) in:

Look for “friendly_name” and change it into something like:

Then Ctrl+O to save.

Create the cache directory (as pi user, not superuser):

Then use pi user for minidlna service (read previous howto for details about permissions and external drives).

previous howto

And add USER=pi under the DEFAULT line:

Then force reload the service, regenerating the cache and db:

Now indexing is in progress: if you use a DLNA enabled device, like an Android phone (e.g. via DLNA application) or a Samsung Internet TV, you’ll got the list of files growing in number under the rasperrypi:RaspberryPiMusic server.

If you want to add new media directories, you have to add another media_dir to the list, specifying the media flag. I want to add my anime folder:

And then my anime folder:

This time I omit the flag to play all contents, there are some mp3 too there and I want to play those!

Every time you add a new directory to watch, rebuild the database with force-reload, but if you want only to restart service use stop, start and restart instead of force-reload.

For a more detailed howto and the use of BubbleUPnP (shared playlist among devices) read this blog post by Stephen C Phillips, source of many info here.

this blog post by Stephen C Phillips

Note: this post originated from this question by Fanie.

this question by Fanie

https://web.archive.org/web/20130410000000*/https://chirale.wordpress.com/2012/08/31/turn-raspberry-into-a-small-nas-with-samba/

https://web.archive.org/web/20130410000000*/https://chirale.wordpress.com/2012/08/31/turn-raspberry-into-a-small-nas-with-samba/

https://web.archive.org/web/20130410000000*/http://blog.scphillips.com/2013/01/using-a-raspberry-pi-with-android-phones-for-media-streaming/

https://web.archive.org/web/20130410000000*/https://chirale.wordpress.com/2012/08/31/turn-raspberry-into-a-small-nas-with-samba/#comment-1742

Proxied content from gemini://chirale.org/2013-04-10_1068.gmi (external content)

Gemini request details:

Original URL
gemini://chirale.org/2013-04-10_1068.gmi
Status code
Success
Meta
text/gemini; charset=utf-8
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.