Posted: Sun Oct 10, 2010 1:25 Post subject: Guide to Mediatomb (UPnP Media Server) with K26-only Routers
It had always been my intent to get a UPnP server going with a DDWRT router. I think I have finally figured out how to do this. We will be using Mediatomb as our UPnP server. Although it's no Twonky, I think it does the trick better than uShare, with auto-updating directories and a web UI.
As you may already know, K26 builds don't let UPnP media servers to run. We overcome this by flashing a modded build that seems to fix this (Synapse).
I am running a WRT610n V2, which is limited to K26-builds. I can also see this solution working for other routers as well, such as the WNR3500L, though this config is untested. I think E3K owners are SOL, as there do not appear to be Synapse builds with the proper headers.
4. Mediatomb will NOT work out of the box. A few items need to be cleaned up. First, we need to fix/create the database. Run the following command in terminal.
5. We need to set the network interface to which Mediatomb will point to. Do this by setting the following option in /opt/etc/mediatomb.conf. Find the line MT_OPTIONS at the beginning and add the following inside the quotes:
Code:
-e br0
6. Look through /opt/etc/mediatomb/config.xml. See if anything applies any of your UPnP devices. Uncomment and change as you need. For example, PS3 support requires a change of a simple boolean value.
Code:
<protocolInfo extend="yes"/>
7. Edit the file /opt/etc/default/mediatomb to enable daemon mode.
Code:
MT_ENABLE=true
8. Check to make sure S90mediatomb is executable in /opt/etc/init.d. I don't remember if it is with a fresh install. Reboot the router!
9. Visit Mediatomb's Web UI at port 50500 of your router. Add the files you want to share.
10. Impress any lady friends that come over with your TV streaming router!
Notes
- Optware the Right Way was previously installed on the HDD attached to the router, and continues to work without hassle with this modded build.
- Settings saved from a non-modded DDWRT K26 build can be restored to the Synapse build without issue as well. At least for me. So far.
Outstanding Issues
- The default browsing experience via your UPnP device is somewhat ugly (though functional). It is presented either as a single list of ALL your videos in your library or you need to wade through several folders before you can actually get to your content. Although, Mediatomb is supposed to be flexible in this regard (see Mediatomb Scripting), any changes I made to the import.js file seem to cause the program to hang and make it unkillable, requiring a reboot of the router. If you're playing with this, make a backup of the corresponding files.
- The version of Mediatomb in Optware is 0.11.0-5 or about 2 years old. The current version of Mediatomb is 0.12.1. Perhaps this is related to the issue above.
- I tried to crosscompile from the newer sources using the makefile included with the toolchain, but the block seems to be a non-existant patch file (mediatomb_nas.patch). It exists for 0.11.0-5 but not for newer versions. I do not know who's responsibility it is (the Optware guys or Mediatomb developers) so I do not know who to approach.
Update (Apr 17/11)
Hooray, a precompiled version of mediatomb 0.12.1 has been found. Simply run:
I flashed straight from a big build. I guess the only part to note is that flashes on the WRT610n take a while (the countdown goes down into the double digits) vs other routers, so be patient!
Posted: Wed Dec 01, 2010 8:05 Post subject: Re: Guide to Mediatomb (UPnP Media Server) with K26-only Rou
ppg wrote:
It had always been my intent to get a UPnP server going with a DDWRT router. I think I have finally figured out how to do this. We will be using Mediatomb as our UPnP server. Although it's no Twonky, I think it does the trick better than uShare, with auto-updating directories and a web UI.
optware comes with Twonky. why not use that as opposed to mediatomb?
Posted: Tue Dec 07, 2010 13:11 Post subject: Re: Guide to Mediatomb (UPnP Media Server) with K26-only Rou
strict wrote:
ppg wrote:
optware comes with Twonky. why not use that as opposed to mediatomb?
Twonky doesn't work with k26 builds, even the paperboy build.
Twonky does also have an attitude which sux.
They provide precompiled binaries for various cpu's (the source is not GPL) but give no support for these binary blobs.
If there is a need to change anything for running it then the change has to be done on the host system and not in the twonky code.
No support but you still have to pay the $20 license fee in case you should happen to get it working.... _________________ Kernel panic: Aiee, killing interrupt handler!
Posted: Mon Jan 03, 2011 1:51 Post subject: Re: Guide to Mediatomb (UPnP Media Server) with K26-only Rou
LOM wrote:
No support but you still have to pay the $20 license fee in case you should happen to get it working....
I wouldn't mind paying $20-35 for proper UPnP streaming. However, than money can also go towards a true NAS unit.
In my mind, the ideal solution is a QNAP TS-x19 series NAS. It does optware, and comes with a ton of memory and a Twonky licence. Don't take this as a plug for the company though!
Found a copy of Mediatomb 0.12.1-1 compiled for MIPSR2. I have it running on my WRT610Nv2. However, have not had any success as yet getting any of its advanced features to work (transcoding H264 and Matroska), and there is no version of ffmpegthumbnailer for Optware that I can find. Anyway, here it is: http://wl500g.googlecode.com/svn/ipkg/optware/mediatomb_0.12.1-1_mipsel.ipk _________________ WRT610Nv2 + 2x2TB HDD NAS
Kong's dd-wrt-usb-ftp-samba3-dlna-v24-K26-broadcom
Optware the Right Way
Thanks for finding that. I've put it in the original post. I'm not able to test it right now, as I'm away from my router (a moment of boredom caused me to wander back to the thread). However, can you or someone test out to see if the menu layouts here actually work?
Under 0.11.something, most of the menu layouts (what you actually see on the media renderer) caused mediatomb to lock up as soon as I went browsing under the web UI. There was only one very simple layout that I actually got to work, for reasons unknown.