Quick & Easy: Turning your Raspberry Pi into a headless DLNA/UPNP Audio Endpoint Render

  • sudo apt-get update && sudo apt-get upgrade
  • sudo apt-get install build-essential git automake libglib2.0-dev libupnp-dev libxml2-dev pulseaudio gstreamer0.10-alsa gstreamer0.10-tools gstreamer0.10-plugins-* gstreamer1.0-libav gstreamer0.10-pulseaudio
  • git clone https://github.com/hzeller/gmrender-resurrect.git
  • cd gmrender-resurrect && ./autogen.sh
  • ./configure LIBS=-lm && make -j4
  • sudo make install
  • gmediarender -f Pi --logfile=/dev/stdout (test if it works)
  • sudo crontab -e
  • insert @reboot /sbin/runuser -l pi -c 'gmediarender -f Pi -d'
  • ctrl + o to save, then ctrl + x to quit
  • gmediarender -f Pi -d (now daemonize it)

Tips*

  • change Pi to your favorite anime character
  • pkill -9 "gmediarender" will kill all instances
  • gmediarender -f Pi --logfile=/home/pi/g.log will log to g.log

if you want to disable onboard audio, you can run

  • echo "blacklist snd_bcm2835" >> /etc/modprobe.d/alsa-blacklist.conf
  • reboot

startup altenative: rc.local

  • sudo cp /etc/rc.local /etc/rc.local.bak (backup rc.local)
  • sudo nano /etc/rc.local
  • insert /sbin/runuser -l pi -c 'gmediarender -f Pi -d' above exit 0
  • save file (ctrl + o) and exit (ctrl + x)

Sources:
westernwillow (Ubuntu),
scphillips (Raspbian)