rpellerin/raspberry-pi-home-automation

Add tuto on miniDLNA

Closed this issue · 2 comments

sudo apt install build-essential gettext
# gettext is needed on Raspberry Pi:
# reddit.com/r/raspberry_pi/comments/9qq3y5/readymedia_12x_fails_with_cannot_stat_tdagmo_no/

wget https://nav.dl.sourceforge.net/project/minidlna/minidlna/1.3.2/minidlna-1.3.2.tar.gz
tar -xvf minidlna-1.3.2.tar.gz
cd minidlna-1.3.2

./configure
# Based on errors you get, you'll have to
# sudo apt install libavutil-dev libavcodec-dev libavformat-dev libjpeg-dev libsqlite3-dev libexif-dev \
#   libid3tag0-dev libogg-dev libvorbis-dev libflac-dev

make
sudo make install

sudo cp minidlna.conf /etc/
sudo mkdir /var/cache/minidlna
sudo mkdir /var/lib/minidlna
sudo chown minidlna:minidlna /var/cache/minidlna
sudo chown minidlna:minidlna /var/lib/minidlna
sudo chmod -R o+rX /var/lib/minidlna

sudo vim /etc/minidlna.conf
# Change friendly_name for something nicer
# log_dir=/var/log
# media_dir=/var/lib/minidlna

sudo systemctl minidlna start

TODO: put the above in the README.md file