SMOLNET PORTAL home about changes

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 (https://chirale.wordpress.com)


 sudo apt get install minidlna sudo nano /etc/minidlna.conf


Change media dir to:

 media_dir=A,/media/MYDRIVE/music/


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:

 db_dir=/media/MYDRIVE/cache/minidlna


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

 friendly_name=RaspberryPiMusic


Then Ctrl+O to save.

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

 mkdir /media/MYDRIVE/cache mkdir /media/MYDRIVE/cache/minidlna


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

previous howto (https://chirale.wordpress.com)


 sudo nano /etc/init.d/minidlna


And add USER=pi under the DEFAULT line:

 PIDFILE=$PIDDIR/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME DEFAULT=/etc/default/$NAME USER=pi


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

 sudo service minidlna force-reload


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:

 media_dir=A,/media/MYDRIVE/music/ media_dir=/media/MYDRIVE/anime/


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 (http://blog.scphillips.com)


Note: this post originated from this question by Fanie.

this question by Fanie (https://chirale.wordpress.com)


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)
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)
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)
https://web.archive.org/web/20130410000000*/https://chirale.wordpress.com/2012/08/31/turn-raspberry-into-a-small-nas-with-samba/#comment-1742 (https://web.archive.org)
Response: 20 (Success), text/gemini
Original URLgemini://chirale.org/2013-04-10_1068.gmi
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8