Install ReadyMedia miniDLNA 1.1.4 on Raspbian

Source: Install ReadyMedia miniDLNA 1.1.4 Raspberry Pi

The latest version of ReadyMedia miniDLNA in the Raspbian repos is ancient so we are going to compile miniDLNA (now ReadyMedia) from source on Raspbian. This should fix avi problems you may have had in the past like them not showing up in the library.

Remove your old miniDLNA 1.0.24 (if they exist)

sudo apt-get purge minidlna -y
sudo apt-get remove minidlna
sudo apt-get autoremove -y

Make sure you have a source repository, default Raspbian does not include this

echo "deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free" | sudo tee -a /etc/apt/sources.list

OR:

edit /etc/apt/sources.list file:

sudo nano /etc/apt/sources.list

and add next line:

deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi

Update repositories so it will detect your new source repo

sudo apt-get update

Grab dependencies for building it from source

sudo apt-get build-dep minidlna -y

If you get any errors you can install the dependencies manually

sudo apt-get install libjpeg-dev libsqlite3-dev libexif-dev libid3tag0-dev libvorbis-dev libflac-dev -y

Download miniDLNA 1.1.4 source

wget http://sourceforge.net/projects/minidlna/files/minidlna/1.1.4/minidlna-1.1.4.tar.gz

Unpack it

tar -xvf minidlna-1.1.4.tar.gz

Enter the miniDLNA directory

cd minidlna-1.1.4

Configure, make and install miniDLNA, it will take 5 minutes.

./configure && make && sudo make install

Copy the default configuration file

sudo cp minidlna.conf /etc/

Copy the startup daemon script to autostart ReadyMedia miniDLNA on boot

sudo cp linux/minidlna.init.d.script /etc/init.d/minidlna

Make the startup script executable

sudo chmod 755 /etc/init.d/minidlna

Update rc to use the miniDLNA defaults

sudo update-rc.d minidlna defaults

Edit the configuration

sudo nano /etc/minidlna.conf

Note: Edit the following to point to your media

This version of minidlna will give you multiple folders under Video. Before movies and TV would have been under separate categories, now movies and TV will both be under the category video. It will also show the folder structure of them instead of showing just the video files. Avi files will also show up and be streamable.

inotify uses resources because it autoupdates your library, if you don’t use inotify you will have to manually restart and reload the miniDLNA service

The friendly name is how your miniDLNA server will show up to its streaming clients

media_dir=V,/mnt/usbstorage/Movies
media_dir=V,/mnt/usbstorage/TV
media_dir=A,/mnt/usbstorage/Music
media_dir=P,/mnt/usbstorage/Pictures
# Names the DLNA server
friendly_name=RasPi Media Server
# Tells the DLNA to update the library when there are changes
inotify=yes

Ctrl+X, Y and Enter to save and exit

Start the minidlna service

sudo service minidlna start

Now make sure it starts on boot

sudo reboot

Your Raspberry Pi DLNA server will now be accessible to stream media to your clients: PCs, XBOX, PS3, Phones, TVs and more.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s