What's new

<testers needed> [TUTORIAL] Minidlna through debian-entware-mipsel

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

How this works for you

  • Working fine on my router

    Votes: 20 66.7%
  • Not working on my router

    Votes: 1 3.3%
  • Not yet installed

    Votes: 2 6.7%
  • Not interested

    Votes: 7 23.3%

  • Total voters
    30

TeHashX

Very Senior Member
[TUTORIAL] Minidlna v1.1.3 through debian-entware-mipsel

New site with updated guide



Updated 1.1.4 version here

OPTWARE mipsel version here http://forums.smallnetbuilder.com/showthread.php?p=110071#post110071
OPTWARE ARM version here http://forums.smallnetbuilder.com/showthread.php?t=16147

Many users complains about media server issues in this forum and by pm (until my inbox was full :() so I decided to share with you a piece of my work, it wasn't easy for me because I'm not a developer but I use "search" function a lot.
I setup chrooted debian from here, thanks @ryzhov_al and @RMerlin for all the work.
It's only for mipsel devices, like RT-N16, RT-N66U/R, RT-AC66U/R
Advantages: easy to update without waiting for asus, easy to apply patches, very stable with zero crashes at least for me on RT-AC66U, I enabled movie thumbnails with filmstrip (will take a little bit longer to scan db) and bookmarks for resuming videos on samsung E series.

Let's start

1 - Turn off Media server from router ui, insert an usb drive in to the router, should be formatted as ext2 or ext3, if your drive has a label, you have to replace sda1 with your label in all instances in this guide

2 - Setup entware from this guide

3 - Open terminal and input the next command:
Code:
cd /mnt/[COLOR="Red"][B]sda1[/B][/COLOR]/
4 - Download prepared debian with all necesary libs and decompress
Code:
opkg install wget
/opt/bin/wget -c -O debian-minidlna-1.1.3-2.tgz http://goo.gl/RM1YaV --no-check-certificate
tar -xvzf ./debian-minidlna-1.1.3-2.tgz
5 - Download start-stop script, in this script is a path EXT_DIR to your media folder witch will be mounted in debian as /mnt, mine is /mnt/sda1/Media and if your disk has a label change sda1 from CHROOT_DIR with your disk label, modify the script to match your settings with vi or nano editor, use this command nano /opt/etc/init.d/S99debian
Code:
/opt/bin/wget -c -O /opt/etc/init.d/S99debian http://goo.gl/F4OqIq --no-check-certificate
chmod a+rx /opt/etc/init.d/S99debian
opkg install nano
6 - Download services-list that will run in chrooted debian, for now is only minidlna but if you want to install another packages in debian like transmission-daemon, you need to add transmission start-stop script name, ex. S50transmission
Code:
/opt/bin/wget -c -O /opt/etc/chroot-services.list http://goo.gl/oaH4ev --no-check-certificate
chmod a+rx /opt/etc/chroot-services.list
7 - Reboot router
Code:
reboot
8 - 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 5 carefully

6f8nlh.png


9 - If you want to enter chrooted debian to install other packages or to modify some options, use this commands:
Code:
mount -o bind /dev/ /mnt/[COLOR="Red"]sda1[/COLOR]/debian/dev/
mount -o bind /proc/ /mnt/[COLOR="red"]sda1[/COLOR]/debian/proc/
mount -o bind /sys/ /mnt/[COLOR="red"]sda1[/COLOR]/debian/sys/
chroot /mnt/[COLOR="red"]sda1[/COLOR]/debian /bin/bash
To exit, just type
Code:
exit
 
Last edited:
Example of thumbnails on my tv

wvwyg5.jpg


If you just want to update from v1.1.2 follow this instructions http://forums.smallnetbuilder.com/showpost.php?p=109613&postcount=29

1.1.3 - Released 05-June-2014
--------------------------------
- Enhance log level settings.
- Fix Samsung browsing when root_container is set.
- Add Clang compiling support.
- Fix compiling on systems without iconv.
- Add merge_media_dirs option, to revert to the old behavior.
- Add Asus O!Play client support.
- Fix Broken SSDP multicast membership addition.
- Fix crash bug with an emtpy filter argument.
- Accept SMI subtitles in addition to SRT.
- Add BubbleUPnP detection and enable subtitle support.
- Allow the user to specify an arbitrary root container.
- Add libavcodec > 54 / libav 10 compatibility.
- Get embedded cover art from video files with recent libavformat versions.
- Disable Samsung DCM10 capability, as it breaks compatibility with new models.
- Add subtitle support for NetFront™ Living Connect middleware-based clients.

1.1.2 - Released 06-Mar-2014
--------------------------------
- Show client status on our basic presentation page.
- Add a new force_sort_criteria option, to globally override the SortCriteria value sent by the client.
- Fix a couple resource leaks.
- Add configuration include file support.
- Support DLNA/UPnP-AV searches issued by clients using the Grilo framework.
- Fix some clients playing artwork instead of movie.
- Fix bookmarks on Samsung Series E clients.
- Add an extra folder level if there are multiple media locations.
- Fix some multicast membership issues with changing network settings.
- Make max number of children (connections) configurable.
- Fix choppy playback with some file types on Panasonic clients by increasing the max connection limit.
 
Last edited:
This looks like fun - thanks for all your efforts. I have it up and running on an RT-N66U (still scanning at the moment). Your guide was great overall, although I think there are a couple things you might want to change:

1) Your instructions and S99debian script assume that the entware installation is at /opt but the installation script (entware-setup.sh) puts it in a folder "entware" on whatever drive is chosen during installation.

2) In step 8 you're assuming that the router is at 192.168.1.1, which isn't always the case.

I'll let you know if I run into any issues..... Thanks again!
 
Last edited:
This looks like fun - thanks for all your efforts. I have it up and running on an RT-N66U (still scanning at the moment). Your guide was great overall, although I think there are a couple things you might want to change:

1) Your instructions and S99debian script assume that the entware installation is at /opt but the installation script (entware-setup.sh) puts it in a folder "entware" on whatever drive is chosen during installation.

2) In step 8 you're assuming that the router is at 192.168.1.1, which isn't always the case.

I'll let you know if I run into any issues..... Thanks again!

Thanx for feedback, at point 1 is correct, because /opt is a symlink if you try:
Code:
cd /mnt/[COLOR="Red"]sda1[/COLOR]/entware
is the same thing with
Code:
cd /opt
try it and don't forget to complete the poll
 
/opt is a symlink....

ah, hadn't noticed that entware had done that - thanks.

Scanning seems to be progressing apace, but I'm getting the following error (in the logfile) when I attempt to stream a video (.mkv or .mp4):

upnphttp.c:1330: warn: Client tried to specify transferMode as Streaming with an image!

The files are played fine when accessed via samba (and via the standard minidlna server). Any ideas on what might be going on?

[maybe it's worth mentioning that the scan process does count these under "Video files", not "Image files"]
 
Last edited:
From witch device are you trying to stream?
When I start media server on my tv, I have to choice from videos, photos or songs and if I choose photos and go to movies folder, get the same error
 
If a folder has inside a movie file and a .jpg for some players will not work fine and the solution is simple: delete all jpg with the same name with movie and should work. ex. movie123.mkv and movie123.jpg

Try to watch a movie witch is alone in the folder.
Maybe you should recreate the database if it's not working
Code:
/opt/etc/init.d/S99debian stop
rm -r /mnt/[COLOR="Red"]sda1[/COLOR]/debian/opt/minidlna
/opt/etc/init.d/S99debian start
 
Wiped and regenerated the database and things seem to be working now - thanks for your help.
 
I installed it yesterday but stop scanning after few video files. I guess I messed up with changing directory. How to wipe off the whole minidlna to reinstall from scratch.

I have a EXT 3 formatted 3TB hard drive with volume label "Goflex_3TB". Most of my files are under a dir "Media". How should i mount my directory in setting? currently my settings are as follows


#!/bin/sh

PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
# Folder with Debian Squeeze
CHROOT_DIR=/mnt/Goflex_3TB/debian
# Some folder outside of sandbox, will be mounted to /mnt folder in Debian
# Leave commented if not needed
EXT_DIR=/mnt/Goflex_3TB/Media


I also installed Transmission via Entware. The "Torrent" folder in in the root directory. I like to see this folder in "Media" directory to be accessible via minidlana. Can I just change the dir settings in Transmission like this?

mnt/Goflex_3TB/Media/Torrent
 
I installed it yesterday but stop scanning after few video files. I guess I messed up with changing directory.
Check minidlna log first, see witch file stopped the scan
Code:
nano /mnt/Goflex_3TB/debian/opt/minidlna/minidlna.log

How to wipe off the whole minidlna to reinstall from scratch.
Code:
/opt/etc/init.d/S99debian stop
rm -r /mnt/Goflex_3TB/debian/opt/minidlna
/opt/etc/init.d/S99debian start

I have a EXT 3 formatted 3TB hard drive with volume label "Goflex_3TB". Most of my files are under a dir "Media". How should i mount my directory in setting? currently my settings are as follows


#!/bin/sh

PATH=/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin
# Folder with Debian Squeeze
CHROOT_DIR=/mnt/Goflex_3TB/debian
# Some folder outside of sandbox, will be mounted to /mnt folder in Debian
# Leave commented if not needed
EXT_DIR=/mnt/Goflex_3TB/Media
It's ok

I also installed Transmission via Entware. The "Torrent" folder in in the root directory. I like to see this folder in "Media" directory to be accessible via minidlana. Can I just change the dir settings in Transmission like this?

mnt/Goflex_3TB/Media/Torrent
Exactly, I do the same :)
put a /tmp before mnt
Code:
/tmp/mnt/Goflex_3TB/Media/Torrent
 
Check minidlna log first, see witch file stopped the scan
Code:
nano /mnt/Goflex_3TB/debian/opt/minidlna/minidlna.log

I already removed a folder and let it rescan ( by deleting the minidlna folder as you said), then it got stuck at another folder. all these are video files, worked with native minidlna in my router.


Do i have to put "/tmp" in front of /mnt folder? that was the default and I deleted /tmp. Now i just changed back to /tmp/mnt/ and doing a rescan and will post the minidlna.log


Exactly, I do the same :)
put a /tmp before mnt
Code:
/tmp/mnt/Goflex_3TB/Media/Torrent

Thanks, I will play with this one after i fix my minidlna issues.

I really appreciate you, ryzhov_al , RMerlin for the tutorials. I had zero experience with Linux before, did not even know what Telnet means. I started with Transmisiion via Optware, then Entware, now minidlna. I learned a lot, and have more confident playing in Putty
 
Just followed Your tutorial and got minidlna all set up and running on my RT-N66U. Also tested with Bravia EX320 and didn't even know that I can view thumbnails on that TV :).
 
How to remove the whole thing then reinstall everything from scratch? it is getting stuck at some other files now.
 
How to remove the whole thing then reinstall everything from scratch? it is getting stuck at some other files now.

Code:
/opt/etc/init.d/S99debian stop
rm -r /mnt/Goflex_3TB/debian/opt/minidlna
/opt/etc/init.d/S99debian start

Sent from my HTC One using Tapatalk
 
Code:
/opt/etc/init.d/S99debian stop
rm -r /mnt/Goflex_3TB/debian/opt/minidlna
/opt/etc/init.d/S99debian start

Sent from my HTC One using Tapatalk

Thanks for your help
I recently installed merlin 374.38_1-em build, reformatting my hdd now. I will reinstaal minidlna and post you my results.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top