How to Install Xupnpd DLNA Media Server From Source - Debian

Xupnpd is a light DLNA Media Server which provides ContentDirectory:1 service for sharing IPTV unicast streams over local area network (with udpxy for multicast to HTTP unicast conversion).

Features

  • Builtin DLNA/UPnP media server for sharing local media files and external IPTV/Radio streams
  • Builtin multicast proxy for MPEG-TS streams
  • YouTube, Vimeo and GameTrailers plugins (HD)
  • No transcoding
  • HDTV ready
  • Parent control (Access Control List)
  • Web-based user interface
  • LUA scripting

 

Setup Debian from point A or B, depends which router do you have

A - For Arm routers, setup Debian Jessie from here

B - For Mipsel routers, setup Debian Wheezy from here

1 - Enter chrooted debian with:

debian enter

2 - Update Debian

apt update && apt upgrade -y

3 - Install necessary packages

apt install nano git build-essential uuid-dev psmisc -y

- Clone and compile xupnpd source code

cd /var/tmp
git clone https://github.com/clark15b/xupnpd.git
cd xupnpd/src
make

5 - Move files to /etc folder

mkdir -p /etc/xupnpd
mv /var/tmp/xupnpd/src/* /etc/xupnpd
rm -r /var/tmp/xupnpd

6 - Create startup script, paste in terminal

cat >> /etc/init.d/S99xupnpd-debian << 'EOF'
#!/bin/sh
### BEGIN INIT INFO
# Provides: xupnpd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Light DLNA IPTV media server
### END INIT INFO
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting Light DLNA IPTV media server" "xupnpd" || true
if /etc/xupnpd/xupnpd; then
log_end_msg 0 || true
else
log_eng_msg 1 || true
fi
;;stop)
log_daemon_msg "Stopping Light DLNA IPTV media server" "xupnpd" || true
if killall xupnpd >/dev/null; then
log_end_msg 0 || true
else
log_end_msg 1 || true
fi
;;status)
pidof xupnpd >/dev/null 2>&1 && {
echo "xupnpd is running." || true
exit 0
}
echo "xupnpd is not running." || true
;;*)
log_action_msg "Usage: /etc/init.d/xupnpd {start|stop|status}" || true
exit 1
esac
exit 0
EOF

Press ENTER
7 - Make script executable

chmod 755 /etc/init.d/S99xupnpd-debian

8 - Fix network and fork daemon to background by editing configuration file

sed -i "s|interface='lo'|interface='br0'|g" "/etc/xupnpd/xupnpd.lua"
sed -i "s|cfg.daemon=false|cfg.daemon=true|g" "/etc/xupnpd/xupnpd.lua"

9 - To enable startup script we need to exit debian

exit

10 - Add xupnpd to chrooted services list

echo "" >>/opt/etc/chroot-services.list
echo "S99xupnpd-debian" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list

11 - Start xupnpd

debian restart

12 - Go to 192.168.1.1:4044 (this is the default router ip, modify to your router ip if you change it previously) and configure settings, add your playlists and feeds...

xupnpd-page

13 - Watch videos on your preferred dlna client

REVIEW (CLICK ON THE STARS TO RATE!)
4
Sending
User Review
4.75 (4 votes)