Minidlna UPnP Media Server through Debian Wheezy Arm

This version is for Arm routers: RT-AC56U, RT-AC68U, Rt-AC87U, AC-3200...

Mipsel version here

1 - Setup Debian Wheezy from here (stock minidlna should be disabled from router ui)

2 - Enter chrooted debian with:

debian enter

3 - Update Debian

apt-get update
apt-get upgrade

4 - Install necessary packages

apt-get install wget libavutil-dev libexif-dev libjpeg8-dev libid3tag0-dev libFLAC-dev libvorbis-dev libsqlite3-dev libffmpegthumbnailer-dev

- Download and install minidlna

cd /var/tmp
wget -c -O /var/tmp/minidlna_1.1.4-a875cd-R.L.Horn_armel.deb http://goo.gl/8mb86U
dpkg -i /var/tmp/minidlna_1.1.4-a875cd-R.L.Horn_armel.deb

6 - Download startup script

wget -c -O /etc/init.d/S98minidlna-debian http://goo.gl/m5myjI
chmod 755 /etc/init.d/S98minidlna-debian

7 - Download configuration file

wget -c -O /etc/minidlna.conf http://goo.gl/T1AFL2
chmod 755 /etc/minidlna.conf

8 - To create startup script we need to exit debian

exit

9 - Add minidlna to chroted services list

echo "" >>/opt/etc/chroot-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

debian restart

11 - 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

minidlna
This is how it looks like on my Samsung TV with thumbnails and filmstrip enabled

Minidla-bookmarks

Enjoy...


CUSTOM LOGO ICON

If for some reason you don't like default penguin minidlna icon, I compiled a special version of minidlna where you can choose any icon as minidlna logo, thanks @R.L.Horn :)

1 - Enter chrooted debian with:

debian enter

2 - Stop minidlna

/etc/init.d/S98minidlna-debian stop

3 - Remove old minidlna db

rm -r /opt/minidlna

4 - Open minidlna.conf

nano /etc/minidlna.conf

Paste after the last line

# PNG image to use for an icon, optionally followed by a hex background
# color
icon=/mnt/icons/myicon.png,7f7f7f

# Background color (hex rgb triplet) for PNG images converted to jpeg.
# Two colors indicate that a checkerboard background, in those colors,
# should be used.
#bgcolor=666666,999999

Save with CTRL-O, press ENTER and exit nano with CTRL-X

Some explanations, for ex. put an icon on EXT_DIR in icons folder and name it myicon.png, or any other place, ex. inside debian etc folder, now icon path should look like this "icon=/etc/myicon.png,7f7f7f"

6 - Exit debian

exit

7 - Restart services

debian restart

Now you have custom logo icon, see two different logos in my pics, one is volvo logo and another from my favorite football team:
minidlna-custom-icon1
minidlna-custom-icon2

  • anthr4x

    Hello.. I have encounter a error when i try to "debian start" this is the msg i get on PuTTy.. With this i can make see the wed miniDLNA

    Stopping chroot'ed Debian services...
    [FAIL] Stopping minidlna: failed!
    Stopping bittorrent client transmission-daemon...
    Stopping bittorrent client transmission-daemon succeeded
    Restarting chroot'ed Debian services...
    [....] Starting minidlna:/usr/local/sbin/minidlnad: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory
    failed!
    Starting bittorrent client transmission-daemon...
    Starting bittorrent client transmission-daemon succeeded
    Done.

  • anthr4x

    The link " wget -c -O minidlna_1.1.4-1_armel.deb http://goo.gl/HSRZfi " it doesn't work can we get an alternative link?

    • Thanks for feedback, I updated links, refresh page and try again.

  • StrIk3r

    package libjpeg8-dev has no installation candidate

  • Hippo

    And after minidlna install.. 11. point--

    Stopping chroot'ed Debian services...

    /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

    [FAIL] Stopping minidlna: failed!

    umount: can't forcibly umount /tmp/mnt/SYSTEM/entware.arm/debian/dev/pts: No such file or directory

    Restarting chroot'ed Debian services...

    /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

    [....] Starting minidlna:/usr/local/sbin/minidlnad: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory

    failed!

  • Hippo

    After Update Debian...

    Fetched 14.1 MB in 7s (1783 kB/s)

    FATAL -> Failed to fork.

    Why? Please help me. I tried "apt-get update" and "apt-get upgrade", but the problem same.. :(

    • Did you enabled swap?
      This is a memory issue, reboot router and try again

      • Hippo

        I created swap file in entware.arm folder. I followed the instructions.

        • Ok, reboot router and continue from apt-get update...

      • Hippo

        After router restart OK! :)

        But after "debian enter" command errror:

        Zozz4ever@RT-N18U:/tmp/home/root# debian enter

        bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

        • Can I assist you through team viewer?

          • Hippo

            Ok, thank you!

            809 038 594

            4502

          • Not here, use contact form next time :)

          • Hippo

            Very, very thank You!! :)

          • You are welcome!!!
            Don't forget to rate...

  • Василий Нуштакин

    Hi, only one mistake dont take me relax:

    # debian restart

    Stopping chroot'ed Debian services...

    [FAIL] Stopping minidlna: failed!

    [FAIL] Stopping minidlna: failed!

    [FAIL] Stopping minidlna: failed!

    umount: can't forcibly umount /tmp/mnt/sda1/entware.arm/debian/dev/pts: No such file or directory

    Restarting chroot'ed Debian services...

    [....] Starting minidlna:/usr/local/sbin/minidlnad: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory

    failed!

    [....] Starting minidlna:/usr/local/sbin/minidlnad: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory

    failed!

    [....] Starting minidlna:/usr/local/sbin/minidlnad: error while loading shared libraries: libavformat.so.53: cannot open shared object file: No such file or directory

    failed!

    Done.

    • I think, I need to recompile minidlna

      • Try this version:

        debian enter
        dpkg -r minidlna
        wget -c -O /var/tmp/minidlna_1.1.4-2_armel.deb http://goo.gl/yL36Pw
        dpkg -i /var/tmp/minidlna_1.1.4-2_armel.deb

  • SlowBrute

    Hello, when I try to run the S98minidlna-debian start, I get the following error:

    "Starting minidlna:/usr/local/sbin/minidlnad: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory failed!"

    I can't figure out how to resolve this. Any ideas?

    Thanks!

    • Are you inside or outside debian when running this command?

      • SlowBrute

        Inside

        • Inside debian:
          apt-get remove libjpeg-dev
          apt-get install libjpeg8-dev

          • SlowBrute

            Unfortunately this didn't work for me; I got the below error. I also tried installing libjpeg62-turbo-dev hoping that it would expose the required libjpeg8 lib, but this was not the case.

            root@HomeUSB:/# apt-get install libjpeg8-dev
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            Package libjpeg8-dev is not available, but is referred to by another package.
            This may mean that the package is missing, has been obsoleted, or is only available from another source
            However the following packages replace it:
            libjpeg62-turbo-dev

            E: Package 'libjpeg8-dev' has no installation candidate

          • SlowBrute

            Hey TeHashX, do you think you could help with the above problem? I can't figure out how to resolve it.

          • Replace sources in /etc/apt/sources.list with:

            deb http://ftp.us.debian.org/debian stable main contrib
            deb http://ftp.debian.org/debian/ wheezy-updates main contrib
            deb http://security.debian.org/ wheezy/updates main contrib

            And then

            apt-get update
            apt-get upgrade
            apt-get install libjpeg8-dev

          • SlowBrute

            Sadly, I get the same error.

            My sources.list (inside debian) was this before I changed it to your suggestion:

            deb http://ftp.us.debian.org/debian stable main contrib non-free
            deb http://ftp.debian.org/debian/ wheezy-updates main contrib non-free
            deb http://security.debian.org/ wheezy/updates main contrib non-free

          • Can I assist you through TeamViewer?
            Send me ID and temp pass https://www.hqt.ro/contact

          • SlowBrute

            I really appreciate you helping TeHashX, and I also really appreciate you creating these tutorials for others, but I don't feel comfortable setting up TeamViewer on my computer.

          • No problem, I don't have arm device anymore and I have to find someone to grant me access to debug.

  • SebZab

    I have noticed something important - when I added "iptables -I INPUT -p tcp --destination-port 8200 -j ACCEPT" to JFFS scripts, my minidlna server started to be randomly not visible for my dlna devices.
    Maybe somebody is experiencing similar problems

  • SebZab

    I have changed to Debian Weezy and the problem with missing libs still exist

    • Did you installed from scratch? Step by step?

      • SebZab

        Yes, on clean EXT4 partition in both cases

        • Send me team viewer id and pass
          contact@hqt.ro

          • SebZab

            I did steps from tutorial "Compile Minidlna Upnp Media Server" and started working!

  • SebZab

    I have installed Debian Jessie & miniDLNA exactly according above instruction. Unfortunatelly when I run minidlna I have got information about missing file libjpeg.so.8. When I manually install this file from libjpeg8-dev I receive info that another file is missing : libavformat.so.53. What is gooing on ?

    • I didn't tried minidlna on jessie, try to recompile minidlna, search on this site how to compile packages

  • Gary Chu

    after transmission is work fine, i install step 11: debian exit and go to Go to 192.168.1.1:8200, it display 0.
    and i use deb restart it show this message.
    mount: mounting /tmp/mnt/sda1/transmission on /tmp/mnt/sda1/entware.arm/debian/mnt failed: No such file or directory

    • You have to mount a folder called "Media" (just an example) in S99debian script and in that folder transmission will create another folder "Transmission"
      like
      EXT_DIR=/tmp/mnt/sda1
      Inside debian, transmission settings.json should have download-dir": "/mnt/Transmission"
      Torrents will be downloaded in debian to /mnt/Transmission
      which in entware become
      /mnt/sda1/Media/Transmission
      If you installed minidlna from debian, inside minidlna conf file (which is located in /etc/minidlna.conf) media_dir=/mnt
      This mean, files should be in Media dir, in you case are in /tmp/mnt/sda1/Media
      If you have transmission installed, minidlna will scan for files in /tmp/mnt/sda1/Media/Transmission or any other folder inside Media
      If you install pyload from debian, files will be in /tmp/mnt/sda1/Media/pyload
      If you install aria2 from debian, files will be in /tmp/mnt/sda1/Media/aria2
      and so on
      ...

  • mich

    Hi. I have asus ac56u and tv samsung f siries. Install minidlna arm bebian evrything ok, but is not thumbnails with filmstrip for tv sams, lg ok. And where i can find minidlna.conf?

    • Hi, I only tested on E series tv but since user reported thumbnails working on D series to. Try to ask here for F series http://sourceforge.net/p/minidlna/patches/92/
      minidlna.conf is located in /opt/debian/etc/minidlna.conf
      Restart server after editing file

      • mich

        Ок thank

          • mich

            Please. Explain what I need to do. I'm not good at Linux . Maybe the owners will assist f series: -)

          • mich

            :-(

          • Try this special version

            Enter debian
            dpkg -r minidlna
            rm -r /opt/minidlna
            wget -c -O /var/tmp/minidlna_1.1.4-mich-2_armel.deb http://goo.gl/bKhy8i
            dpkg -i /var/tmp/minidlna_1.1.4-mich-2_armel.deb

            Exit debian
            Start debian services
            Enjoy....

          • mich

            Install new version minidlna it work, but is not thumbnails with filmstrip for tv sams, lg ok. :-(

          • On samsung F series you get thumbnails but not filmstrip?
            Or no thumbnails and no filmstrip?

          • mich

            no thumbnails and no filmstrip

          • mich

            no thumbnails and no filmstrip on sams f series

          • I will try to find another patch

          • mich

            O. Thank you very mach.

          • mich

            Hi. Do you have any news?

          • About what, thumbnails?
            Find me a patch and I will apply it for you :)

  • Gary Chu

    I got more question, it was unable to pause, fast forward or rewind in my android phone when i play the movie

  • Gary

    AC68U Step 4 FATAL -> Failed to fork.
    Can any one help thx

    • Reboot router and continue from step 2, be sure swap file is activated, check with "free" command

      • Gary Chu

        thx installed

    • Gary Chu

      solved doff ^^

Get Email Notification When a Server or Port is Unreachable
SoftEther VPN Running on AsusWRT Routers
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Minidlna UPnP Media Server through Debian Jessie Arm
How to Mount Samba Shares inside Chrooted Debian
Spreed WebRTC server and web client
Asterisk VoIP Server running on AsusWRT Routers
Get Email Notification When a Server or Port is Unreachable
SoftEther VPN Running on AsusWRT Routers
NZBGet through Entware
Minidlna UPnP Media Server through Debian Jessie Arm

SUBSCRIBE

To be notified by email when a new tutorial is posted :)

Thanks for Subscribing! I'll keeping you up-to-date with latest tutorials!

Something went wrong, try again...