What's new

[Feedback] Minidlna

  • 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!

RMerlin

Asuswrt-Merlin dev
Hi folks,

I've been taking a look at minidlna these past few days. Asus has been doing a couple of customizations over the past months, some of which are actually quite useful, so I'd rather try to figure out which of these are causing issues rather than blindly revert ALL of them.

I need to know from people with issues which the following:

  • Which was the last firmware to work properly?
  • Which firmware started showing issues?
  • Can you describe what issues you are experiencing?

I currently have a couple of options in front of me.

1) Upgrade ffmpeg, in case newer releases might be more robust while processing corrupted files. Asus is on 0.6, I already easily got 0.6.6 working, and 0.7.x was also working correctly after some quick tests (0.7 is based on the same older ABI as 0.6).

2) Revert only the specific Asus changes that introduced issues. By knowing which build work and which don't, I can pinpoint which of these customizations is causing issues, and I could revert them.

3) Switch the build system to the newer from minidlna 1.1 (Asus is still reusing pre-generated build environment files from 1.0.x). I already got that done.
 
Dear Merlin,
Thank you for taking this ticket.

I'm using an AC66U in bridge mode against an AC88U.
I never found a Merlin/Asus FW that worked.
The issue with all FW is lack of responsiveness, problems connecting after power off and on again. Folders show, then don't show. Playback hangs for many seconds.
When using DD-WRT on the AC66u/Bridge I get super fast responses all the time and HD-playback is great, but I have problems getting connection after power off and on again. Resetting my Blyray player fixes the issue every time, or by using direct connection to AC88U through WIFI. This is also the case with Merlin/Asus FW.

I suspect some problems with UPNP on the AC87U in addition to the DLNA.

Have a nice day, and again a huge thank you.
 
Dear Merlin,
Thank you for taking this ticket.

I'm using an AC66U in bridge mode against an AC88U.
I never found a Merlin/Asus FW that worked.
The issue with all FW is lack of responsiveness, problems connecting after power off and on again. Folders show, then don't show. Playback hangs for many seconds.
When using DD-WRT on the AC66u/Bridge I get super fast responses all the time and HD-playback is great, but I have problems getting connection after power off and on again. Resetting my Blyray player fixes the issue every time, or by using direct connection to AC88U through WIFI. This is also the case with Merlin/Asus FW.

This has nothing to do with Asus's minidlna customizations. What you describe is related to either your network bridge, or your BD player's DLNA client.

I only look into specifically isolating the issues introduced by Asus's customizations to minidlna, most likely their recent memory usage optimizations.
 
Ok,
Sorry for that. The only thing I can say for certain is that the DD-WRT DLNA support works much faster and without hangu-ps compared to the Asus DLNA.
The DLNA on my Bluray player works flawless when connecting through WIFI directly to AC87U, so I think as you that this is a bridge/UPNP hangup/issue? I can't even connect to Internet when this happens.
 
Last edited:
My AC68U which also acts as streaming device for a few TB of media went through the following:
- all of John's fork versions between 374.43_2-07 and 374.43_2-11, used extensively, builtin minidlna performed rock solid
- the need for USB hub support forced me to a newer version, which brought me to Merlin 376.49_5. Builtin minidlna seemed to work (the scanning part at least), monitored it briefly however because some other issues with the firmware forced me to upgrade it.
- 378.50, media scanning stops randomly with builtin minidlna
- 378.54_2, same with 378.50. Disabled builtin daemon, installed 1.1.4-2 from Entware along with its dependencies, running smoothly, both scanning and streaming.
 
Last edited:
Since I couldn't get any additional data point to determine at which release Asus's changes introduced scanning issues, I'll have to fly blind and try reverting the last change they did, which was memory optimizations to the scanner process. I've uploaded a few test builds that have that optimization removed, minidlna recompiled using its up-to-date build system, and ffmpeg upgraded from 0.6.0 to 0.7.17. Test builds are available here:

https://www.mediafire.com/folder/bj94sbhrh7e49//Test Builds

Please report your results.

IMPORTANT: The GPL code on which these test builds are based on is moving the OpenVPN keys and certificates into the JFFS partition, to save on nvram usage. If you revert back to a previous firmware version, you must re-enter all your keys and certificates. You can either retrieve their original values from the files stored in /jffs/openvpn/ , or more simply by making a backup of your configuration BEFORE upgrading to these test builds, and restoring that backup after downgrading back to 378.54.
 
47 seems to be the last one that can i can wake the drive from any device on my set up. Also it's the last one that AirPlay seems to always work and my Apple TV is always visible across bands. 2.4 to 5




Since I couldn't get any additional data point to determine at which release Asus's changes introduced scanning issues, I'll have to fly blind and try reverting the last change they did, which was memory optimizations to the scanner process. I've uploaded a few test builds that have that optimization removed, minidlna recompiled using its up-to-date build system, and ffmpeg upgraded from 0.6.0 to 0.7.17. Test builds are available here:

https://www.mediafire.com/folder/bj94sbhrh7e49//Test Builds

Please report your results.

IMPORTANT: The GPL code on which these test builds are based on is moving the OpenVPN keys and certificates into the JFFS partition, to save on nvram usage. If you revert back to a previous firmware version, you must re-enter all your keys and certificates. You can either retrieve their original values from the files stored in /jffs/openvpn/ , or more simply by making a backup of your configuration BEFORE upgrading to these test builds, and restoring that backup after downgrading back to 378.54.
 
47 seems to be the last one that can i can wake the drive from any device on my set up. Also it's the last one that AirPlay seems to always work and my Apple TV is always visible across bands. 2.4 to 5

Neither of these have to do with DLNA.
 
AC-RT87U
Browsing through folders and playback seems smoother and faster.
 
Last edited:
Confirmed a bug in MiniDLNA 1.1.4. The problem manifests itself as a bug with INotify where it does not see the new files added. The bug is actually with how MiniDLNA scans the files within a newly added directory.

Specifically, do not use the feature in minidlna.conf that restricts media types to a combination of two types of: Audio, Video, or Images. Examples:

OK to use:
Code:
media_dir=/opt/home/media1
media_dir=/opt/home/media2
media_dir=/opt/home/media3

Not OK to use (buggy):
Code:
media_dir=AV,/opt/home/media1
media_dir=PV,/opt/home/media2
media_dir=AP,/opt/home/media3

The bug is in this file here. The codes is not checking a combination of two media types for the enum parameter 'dir_type'. The problem is a switch statement in the function resolve_unknown_type(). File: utils.c, Line# 475.
SOURCE: https://github.com/RMerl/asuswrt-me...63fa2bfbc/release/src/router/minidlna/utils.c

If you put trace statements and recompile, you will see!
 
Confirmed a bug in MiniDLNA 1.1.4. The problem manifests itself as a bug with INotify where it does not see the new files added. The bug is actually with how MiniDLNA scans the files within a newly added directory.

You should report it to the minidlna author.
 
I had problem with inotify when I was adding *.mts files.
When I used ASAT's solution with splitting media types, my problem has gone...
 
The problem I have on my AC87 it never stop scanning on firmware version 378.54
i am now using 378.53 with no problrm with minidlna

Hope that helps
 
The problem I have on my AC87 it never stop scanning on firmware version 378.54
i am now using 378.53 with no problrm with minidlna

Hope that helps

Any luck with these alpha builds? It reverts the memory optimizations Asus had introduced in 378.54, and also upgrades ffmpeg to a newer version (hoping they might have improved its robustness when dealing with damaged files).
 
Any luck with these alpha builds? It reverts the memory optimizations Asus had introduced in 378.54, and also upgrades ffmpeg to a newer version (hoping they might have improved its robustness when dealing with damaged files).
I will give it a try today amd will keep you posted
 
Minidlna is working good now. however i notice the RAM a little higher than usual
2015_06_26_16_41_02.png
 
Minidlna is working good now. however i notice the RAM a little higher than usual
2015_06_26_16_41_02.png

Check the detailed RAM usage with "free -m" over SSH. I no longer tell the router to constantly flush its buffers, which improves overall performance - best to buffer things rather than leave RAM completely unused. Those caches will be freed whenever something actually needs the RAM.

Here's the difference between my current router state, and what happens after I force it to flush its buffers:

Code:
admin@Stargate87:/tmp/home/root# free -m
             total         used         free       shared      buffers
Mem:        255744       181188        74556            0        30280
-/+ buffers:             150908       104836
Swap:            0            0            0
admin@Stargate87:/tmp/home/root# echo 1 > /proc/sys/vm/drop_caches 
admin@Stargate87:/tmp/home/root# free -m
             total         used         free       shared      buffers
Mem:        255744        75280       180464            0          288
-/+ buffers:              74992       180752
Swap:            0            0            0
admin@Stargate87:/tmp/home/root#
 
Thanks for the feedback on minidlna BTW.
 
Dear Merlin,
Thank you for this experimental FW!
AC66U in repeater mode against an AC87U works great with the new DLNA engine. No crashes. Fast responses. Loading of folders much faster I think. Exelent playback. In bridge mode though it is still buggy...
I've got an anoying fault which I hope can get resolved:
After powerering off my Bluray player and on again. The player refuses to obtain an IP address from the router. No internet, no DLNA.
Powering of all routers, Bluray player does not solve the issue.
I have to hard reset the player to get internet and DLNA access for one session. If I'm lucky two sessions.
Connecting the Bluray player directly to AC88U through wifi. No crash at all.
Please help!
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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