1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Voxel - R9000 - minidlna.conf replacement

Discussion in 'NETGEAR AC Wireless' started by TheOnly, Jul 20, 2018.

  1. TheOnly

    TheOnly New Around Here

    Joined:
    Jul 20, 2018
    Messages:
    6
    Hi all,

    Is there a way to change the minidlna.conf file on the router permanently?
    I know that a reboot will remove the change - but in other custom builds there are workarounds
    to overcome the limitation.

    best regards

    TheOnly
     
  2. Voxel

    Voxel Very Senior Member

    Joined:
    Dec 9, 2014
    Messages:
    942
    minidlna is started from the script /sbin/cmddlna. To use your own config you should correct this script. Most simple correction is to find all the strings "/usr/sbin/minidlna -f $MINIDLNA_CONF" and replace it by e.g. "/usr/sbin/minidlna -f /mnt/sda1/myminidlna.conf". Keeping your own myminidlna.conf on your USB drive.

    Voxel.
     
    kamoj likes this.
  3. TheOnly

    TheOnly New Around Here

    Joined:
    Jul 20, 2018
    Messages:
    6
    Thanks Voxel, this drive me crazy - I found a solution but this is not perfect :).

    Short description what I want to achieve - and what I have already performed.

    Goal: Using DLNA and having "Poster" embedded in the mp4 files displayed on all my TV (most of them are Samsung)

    Steps what I have performed:

    1) Install entware
    2) Install latest ReadyDNLA
    3) change cmddlna to need my requirements -> change values in "dlna_conf" section.

    So now the miracles starts.
    disable "MediaServer" via Gui --> doesn't work
    /sbin/cmddlna restart -> doesn't work --> reboot --> helped

    minidlna starts but with wrong config --> used /opt/etc/minidlna.conf
    --> adpated this file also
    enable "MediaServer" via Gui --> worked - but used now again /tmp/etc/minidlna.conf

    Playing around with Gui enable/disable MediaServer leeds to the following conclusion:

    1) is the MediaServer enabled --> ReadyDLNA starts via cmddlna and
    /tmp/etc/minidlna.conf is used
    2) is the MediaServer disabled --> Ready DLNA Start - how? and
    /opt/etc/minidlna.conf is used

    I'am a little bit confused but as long as my requirement is achieved, I'm happy.

    best regards
    TheOnly

    PS: Can you point me to some documentation how this kind of firmware is structured
    (not how to build it) - to find out how, when and which file will be used.
     
  4. Voxel

    Voxel Very Senior Member

    Joined:
    Dec 9, 2014
    Messages:
    942
    I'd not suggest to use two versions of minidlna at the same time: from firmware and from Entware. FW version is quite OK. As I wrote above you just should change the file /sbin/cmddlna and to place your own config into root of USB drive.

    Now cmddlna runs:

    Code:
    . . .
    /usr/sbin/minidlna -f $MINIDLNA_CONF
    . . .
    
    where MINIDLNA_CONF=/tmp/etc/minidlna.conf and it is re-generated after every reboot.

    if you change two such lines in cmddlna to:

    Code:
    . . .
    /usr/sbin/minidlna -f /mnt/sda1/myminidlna.conf
    . . .
    
    it will use your custom minidlna.conf stored in the root of your USB drive (/mnt/sda1/myminidlna.conf). And after reboot this your conf will not be changed/re-generated.

    If you prefer use of minidlna from Entware, you have to disable minidlna from FW in WebGUI.


    Voxel.
     
  5. TheOnly

    TheOnly New Around Here

    Joined:
    Jul 20, 2018
    Messages:
    6
    Hi Voxel,

    thanks again for the reply - I want to be smarter than it was possible ;-)
    That was also the reason - why I asked how the distribution is structured / builded.

    My assumption was that whatever lays in entware will be used before the stock firmware.
    So I will revert my changes and use your proposal.

    best regards
    TheOnly
     
  6. TheOnly

    TheOnly New Around Here

    Joined:
    Jul 20, 2018
    Messages:
    6
    Hi Voxel,

    your proposal of changing the cmddlna starts now the Readydlna server with the Gui again, but there are no "Posters" anymore available.

    The config include
    enable_thumbnail=yes
    thumbnail_width=160
    thumbnail_quality=8​
    which should generate the "Poster" in the "art_cache" folder of the minidlna db.

    Have you any ideas?

    TheOnly
     
  7. Voxel

    Voxel Very Senior Member

    Joined:
    Dec 9, 2014
    Messages:
    942
    Posters... Well, probably the bad news for you. If you mean thumbnails for your Samsung TV it is currently impossible for fw version of minidlna. And the same for Entware as I guess. There are problems with this because of the the relatively old ucLibc used by NG (and what I have to use). Thumbnails generation feature is not compatible with this version of uClibc. I just cannot compile it.

    I suppose that I know what you need. I have Samsung TV and I use minidlna. My child need to know what to start from TV and she is using thumbnail icons for movies to understand what she has to chose. But minidlna from my PC server. Not with obsolete uClibc.

    Well. Resolving this is in my 2do list. So some hopes...

    Voxel.
     
  8. TheOnly

    TheOnly New Around Here

    Joined:
    Jul 20, 2018
    Messages:
    6
    Hi Voxel,

    sorry for the late replay. I was busy.

    Good news, thumbnails of mp4 (named as posters in Plex) are available with the minidlna entware version.
    (minidlna fw version is 1.2.1 - entware is 1.2.1-3 and it seems to be different compiled - with 1.2.1-3 the "thumbnail" flag is set at compiling)

    It was not easy to get it working, but a reset of the fw and a scratch installation of entware and minidlna solve all of the problems except one.

    There is sometimes still a connection dropout of the stream (I guess it is the miniupnpd or the swapfile is on the wrong disk), but no hangs of minidlna anymore and the thumbnails are available on all of may Samsung TVs.

    If you want more details how I have done this - don't bother to ask.

    best regards

    TheOnly

    PS: Can you point me to some documentation of the firmware (structure, changing/adapting)
     
    Voxel and kamoj like this.