This version is for Arm routers: RT-AC56U, RT-AC68U, RT-AC87U, AC-3200, RT-AC5300...
Mipsel version here
1 - Setup Debian Jessie from here (stock minidlna should be disabled from router ui)
2 - Enter chrooted debian with:
3 - Update Debian
apt-get upgrade
4 - Install necessary packages
5 - Download and install minidlna
wget -c -O minidlna_1.1.4-2_armel.deb https://bit.ly/2sNMAMI
dpkg -i minidlna_1.1.4-2_armel.deb
6 - Download startup script
chmod 755 /etc/init.d/S98minidlna-debian
7 - Download configuration file
chmod 755 /etc/minidlna.conf
8 - To create startup script we need to exit debian
9 - Add minidlna to chroted services list
echo "S98minidlna-debian" >>/opt/etc/chroot-services.list
chmod 755 /opt/etc/chroot-services.list
10 - Start minidlna from outside debian together with mounted external folder
12 - Go to 192.168.1.1:8200 (this is the default router ip, modify to your router ip if you change it previously) and see how minidlna is creating db, press refresh on your browser for progress.
If all numbers are 0 (zero) after some time, you forget to set the right path to your media folder, read again point 4 from here
This is how it looks like on my Samsung TV with thumbnails and filmstrip enabled
Enjoy...