What's new
  • 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!

Dual instances of Minidlna possible?

Hexabion

Occasional Visitor
I did some digging (googling), which I often do when I get "crazy" ideas, and lo and behold, I found examples and descriptions on how to run multiple instances of minidlna, so I tried it - to no success.

When doing "minidlna -?", it says you can use a -u parameter to give the instance its own UUID, so i tried that, starting two different minidlna's with two different conf's, two different db-dirs and mediadirs and friendly-names etc, and then tried to start them both with each their -u setting i commandline. basically something like this:

/opt/bin/minidlna -u 898989 -h -f /opt/var/minidlna-a.conf
/opt/bin/minidlna -u 676767 -h -f /opt/var/minidlna-b.conf

All that happends is that first one gets started, but second one, nothing. The second instance gives no error-output in the shell, it creates an empty logfile in its db-dir, but doesnt stick in memory / just finishes like nothing ever happened.

Have anyone tried this? Am I chasing down a mythical bird here that doesn't actually exist? (meaning, its been included in the help/manual, but not actually been implemented yet - at least not for the entware compilation).

Shared experiences would be much appreciated, and thanks in advance.
 
Hi,

you cannot load minidlna multiple times; that was the issue I had. I also had the problem of playing FLAC files from my Asus RT-AC87U, so that my Roberts Radio would work with any audio format: I needed to transcode the files. I therefore had to compile from source ReadyMedia (an offshoot of minidlna) to use its transcoding features. I also modified the source code and added the -M option, so I could create multiple instances of ReadyMedia e.g

Usage:
ReadyMedia2 [-d] [-v] [-f config_file] [-p port]
[-i network_interface] [-u uid_to_run_as]
[-t notify_interval] [-P pid_filename]
[-s serial] [-m model_number]
[-w url] [-M MACaddress] [-R] [-L] [-S] [-V] [-h]

I ended up - after a couple of weeks - in getting the executable ReadyMedia2 working on both my RT-AC68U and my RT-AC87U successfully. Another issue is loading LIBSQLITE3 i.e not a static library. A LDD dump of ReadyMedia2 shows it successfully loads from a different directory, as do some of the other libraries:

admin@RT-AC87U-F390:/tmp/mnt/SAMSUNG/minidlna# ldd ReadyMedia2
libexif.so.12 => /usr/lib/libexif.so.12 (0x401de000)
libvorbis.so.0 => /usr/local/lib/libvorbis.so.0 (0x40119000)
libid3tag.so.0 => /usr/local/lib/libid3tag.so.0 (0x40149000)
libjpeg.so => /usr/lib/libjpeg.so (0x40163000)
libogg.so.0 => /usr/local/lib/libogg.so.0 (0x40185000)
libFLAC.so.8 => /usr/local/lib/libFLAC.so.8 (0x40214000)
libpostproc.so.53 => /usr/local/lib/libpostproc.so.53 (0x40191000)
libswresample.so.1 => /usr/local/lib/libswresample.so.1 (0x400e7000)
libavutil.so.54 => /usr/local/lib/libavutil.so.54 (0x40262000)
libavformat.so.56 => /usr/local/lib/libavformat.so.56 (0x402c9000)
libavcodec.so.56 => /usr/local/lib/libavcodec.so.56 (0x4033e000)
libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x406ef000)
libfdk-aac.so.0 => /usr/local/lib/libfdk-aac.so.0 (0x40795000)
libMagickCore-6.Q16.so.2 => /usr/local/lib/libMagickCore-6.Q16.so.2 (0x4081f000)
libMagickWand-6.Q16.so.2 => /usr/local/lib/libMagickWand-6.Q16.so.2 (0x40b58000)
libpthread.so.0 => /lib/libpthread.so.0 (0x401a7000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40103000)
libc.so.0 => /lib/libc.so.0 (0x40c56000)
libm.so.0 => /lib/libm.so.0 (0x401c1000)
libogg.so.0 => /usr/lib/libogg.so.0 (0x40cca000)
libz.so.1 => /usr/lib/libz.so.1 (0x400c5000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x4006b000)

I also had to slim down FFMPEG, so that it didn't run out of memory. Here is a PS dump of ReadyMedia2 processes running on my system using the -M option:

1985 admin 13072 S /usr/local/bin/ReadyMedia2 -M OST -P /mnt/SAMSUNG/minidlna/OST.pid -f /mnt/SAMSUNG/minidlna/OST.conf
1986 admin 13072 S /usr/local/bin/ReadyMedia2 -M OST -P /mnt/SAMSUNG/minidlna/OST.pid -f /mnt/SAMSUNG/minidlna/OST.conf
1987 admin 13072 S N /usr/local/bin/ReadyMedia2 -M OST -P /mnt/SAMSUNG/minidlna/OST.pid -f /mnt/SAMSUNG/minidlna/OST.conf
2008 admin 13680 S /usr/local/bin/ReadyMedia2 -M MYSONGS -P /mnt/SAMSUNG/minidlna/MYSONGS.pid -f /mnt/SAMSUNG/minidlna/MYSON
2010 admin 13680 S /usr/local/bin/ReadyMedia2 -M MYSONGS -P /mnt/SAMSUNG/minidlna/MYSONGS.pid -f /mnt/SAMSUNG/minidlna/MYSON
2011 admin 13680 S N /usr/local/bin/ReadyMedia2 -M MYSONGS -P /mnt/SAMSUNG/minidlna/MYSONGS.pid -f /mnt/SAMSUNG/minidlna/MYSON
2028 admin 13472 S /usr/local/bin/ReadyMedia2 -M MYSONGS2 -P /mnt/SAMSUNG/minidlna/MYSONGS2.pid -f /mnt/SAMSUNG/minidlna/MYS
2030 admin 13472 S /usr/local/bin/ReadyMedia2 -M MYSONGS2 -P /mnt/SAMSUNG/minidlna/MYSONGS2.pid -f /mnt/SAMSUNG/minidlna/MYS
2031 admin 13472 S N /usr/local/bin/ReadyMedia2 -M MYSONGS2 -P /mnt/SAMSUNG/minidlna/MYSONGS2.pid -f /mnt/SAMSUNG/minidlna/MYS
2049 admin 13612 S /usr/local/bin/ReadyMedia2 -M DISCOGS -P /mnt/SAMSUNG/minidlna/DISCOGS.pid -f /mnt/SAMSUNG/minidlna/DISCO
2051 admin 13612 S /usr/local/bin/ReadyMedia2 -M DISCOGS -P /mnt/SAMSUNG/minidlna/DISCOGS.pid -f /mnt/SAMSUNG/minidlna/DISCO
2052 admin 13612 S N /usr/local/bin/ReadyMedia2 -M DISCOGS -P /mnt/SAMSUNG/minidlna/DISCOGS.pid -f /mnt/SAMSUNG/minidlna/DISCOGS

Therefore, OST, MYSONGS, MYSONG2 and DISCOGS are all separate SQLite3 databases with their own PID's.

Regards

After Note:

It should be noted that -M MACaddress option in ReadyMedia2 can be a literal string e.g. MYSONGS (a maximum of 12 characters), as the name is converted internally to a MAC address.
 
Last edited:
Thanks for the info nairn, maybe you could post/upload your compilation.

I suspect your solution won't work on a N66U though, since the version you have of ReadyMedia(2) is most likely for arm-cpu's, but for all those with arm (most, if not all ACXXXX routers) this would be very usefull.
 

Similar threads

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!
Back
Top