DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-10-10 06:48:34

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

MediaTomb 0.12.0 SVN Working Great

I just wanted to share my experiences in getting MediaTomb working on my DNS-323.  I stream to a DirecTV HR20 and the 0.11.0 release doesn't work with this device, so I had the go the 0.12.0 SVN route.  I compiled everything on my DNS-323, and I have to thank Fonz for the outstanding build environment!

First off, I used the libraries ffp 0.5 had available for the ffp 0.11.0 MediaTomb, and I also compiled the spidermonkey, taglib, and curl libraries.  After downloading the SVN code, I found that the autoreconf in ffp 0.5 didn't work (I forgot to document the issue), but the autoreconf I found in optware worked fine.  Next, in the ./configure, I had to specify where the js stuff was located (--with-js-h=/ffp/include/smjs --with-js-libs=/ffp/lib).  It compiled with no issues (took about 30 mins) and I manually set up the directory environment like MediaTomb uses in its static builds.

Next comes the transcoding setup.  The DirecTV HR20 is a really weak DLNA client and it uses the bare minimum of formats.  It only knows mpeg2 (ts and ps) for video, wav and lpcm for audio, and jpeg for photos.  Anything else requires transcoding.  The main thing needed for transcoding applications are that they need to use fixed point math,  I managed to find what I needed and here is what I am using:

MP3 to WAV : madplay (from optware)
MP4 (m4a, AAC) to WAVL faad2 (fixed point build from optware)
FLAC to WAV: flac (courtesy of Delekhan in his Firefly package)
OGG to WAV: oggdec (courtesy of Delekhan in his Firefly package)
WMA to WAV: Custom build based on Fixed Point WMA decoder from the Rockbox community.
Online MMS stream to WAV: Custom built Fixed Point WMA decoder using customized libmms library for DNS-323 (some byte ordering was a little screwy)
Online MP3 stream to WAV : Using curl feature of MediaTomb decoded by madplay.

What surprised me was the small amount of CPU usage with these apps:

MP3: 14%
MP4 audio: 20%
Flac: 8%
Ogg Vorbis: 25%
WMA: 11%

MPEG2 video streaming (no transcoding) is working great and photos are working as well as can be expected with this client.

If anyone is interested, I would like to make this available in ffp 0.5 packages.  Is there a how-to on packaging for ffp 0.5?

--John

Offline

 

#2 2008-10-10 10:48:52

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: MediaTomb 0.12.0 SVN Working Great

Good work - I use Mediatomb to stream to my PS3 so I would be interested in the update - I do not use transcoding so not too worried about that.

I note from the mediatomb pages that 0.12 is not yest released so i guess there could still be some issues in the SVN version ??

RAP

Offline

 

#3 2008-10-10 15:09:01

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: MediaTomb 0.12.0 SVN Working Great

rap wrote:

Good work - I use Mediatomb to stream to my PS3 so I would be interested in the update - I do not use transcoding so not too worried about that.

I note from the mediatomb pages that 0.12 is not yest released so i guess there could still be some issues in the SVN version ??

RAP

There are some other features that Jin wants to add to 0.12.0 before it is released.   As far as I can tell, this code is pretty stable.  There are some PS3 related changes in this version, notably the ability to listen to online streaming audio.   Also the YouTube stuff is nice, but not doable on a NAS because the flv format needs to be transcoded.

Offline

 

#4 2008-10-14 10:58:50

rap
Member
From: Reading - UK
Registered: 2008-02-28
Posts: 119

Re: MediaTomb 0.12.0 SVN Working Great

Any luck with making this a ffp 0.5 package?

RAP

Offline

 

#5 2008-10-14 15:53:41

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: MediaTomb 0.12.0 SVN Working Great

I've figured out how to create ffp 0.5 packages and I have created them for the dependency libs that are not already part of ffp 0.5 (taglib, spidermonkey, and curl).  With the MediaTomb files, I do not want to install them as part of the ffp tree because I do not want to interfere with what fonz already has in place.  Right now, I have the MediaTomb specific files installed in /mnt/HD_a2/mt very similar to the way MediaTomb structures its static binaries.  I have tried to compile MediaTomb statically, but have no luck so far.

All I need now is a way to distribute these files.  I would prefer not to serve them from my home network.

rap wrote:

Any luck with making this a ffp 0.5 package?

RAP

Offline

 

#6 2008-10-26 21:53:56

swieep
Member
Registered: 2008-05-11
Posts: 7

Re: MediaTomb 0.12.0 SVN Working Great

Hi boilerjt,

I used the 0.11.0 version from HaydnH and upgraded to your version.. It is running fine, but importing my photo's only imports the first file found..

I use EXIF and created the following script.. it worked with the other version I used..

function addImage(obj)
{
    var chain = new Array('4_pictures', 'All Pictures');
    addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER);

    var date_split = obj.aux['EXIF_TAG_DATE_TIME'];
    var date_split_result = date_split.split(" ");
    var date = date_split_result[0];
    var year = date.substr(0,4);
    var month = year + "-" + date.substr(5,2);
    if (year)
   {
       chain = new Array('4_pictures', 'Year', year);
        addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER);
    }
    if (month)
    {
       chain = new Array('4_pictures', 'Month', month);
       addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER);
   }

}

Offline

 

#7 2008-10-26 22:57:13

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: MediaTomb 0.12.0 SVN Working Great

I'll check into it.  Thanks for the feedback smile

UPDATE: I think I figured it out (sort of).  I could not get the EXIF to work in MediaTomb at all, even though the command line EXIF program was reading the exif metadata from my jpgs just fine.  What I had to do was delete config.xml and mediatomb.db (after backing then up of course).  Then I started Mediatomb and let it create fresh copies.  Next, I added the back the aux-data definition to config.xml (under the <import> tag)

    <library-options>
       <libexif>
          <auxdata>
             <add-data tag="EXIF_TAG_DATE_TIME"/>
          </auxdata>
       </libexif>
    </library-options>

After restarting MediaTomb, I imported some jpgs and your script worked.  I know this is not a good solution and importing everything back in a fresh database is a pain, but this is the only way I could get it to work.

swieep wrote:

Hi boilerjt,

I used the 0.11.0 version from HaydnH and upgraded to your version.. It is running fine, but importing my photo's only imports the first file found..

I use EXIF and created the following script.. it worked with the other version I used..

function addImage(obj)
{
    var chain = new Array('4_pictures', 'All Pictures');
    addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER);

    var date_split = obj.aux['EXIF_TAG_DATE_TIME'];
    var date_split_result = date_split.split(" ");
    var date = date_split_result[0];
    var year = date.substr(0,4);
    var month = year + "-" + date.substr(5,2);
    if (year)
   {
       chain = new Array('4_pictures', 'Year', year);
        addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER);
    }
    if (month)
    {
       chain = new Array('4_pictures', 'Month', month);
       addCdsObject(obj, createContainerChain(chain), UPNP_CLASS_CONTAINER);
   }

}

Last edited by boilerjt (2008-10-27 06:44:22)

Offline

 

#8 2008-10-27 10:58:16

swieep
Member
Registered: 2008-05-11
Posts: 7

Re: MediaTomb 0.12.0 SVN Working Great

Hi,

No problem, I will reimport the jpeg's.. I'm at work right now.. so will check later tonight.. and reply with the findings..

Thank you for this solution..

boilerjt wrote:

I'll check into it.  Thanks for the feedback smile

UPDATE: I think I figured it out (sort of).  I could not get the EXIF to work in MediaTomb at all, even though the command line EXIF program was reading the exif metadata from my jpgs just fine.  What I had to do was delete config.xml and mediatomb.db (after backing then up of course).  Then I started Mediatomb and let it create fresh copies.  Next, I added the back the aux-data definition to config.xml (under the <import> tag)

Offline

 

#9 2008-11-04 10:26:10

swieep
Member
Registered: 2008-05-11
Posts: 7

Re: MediaTomb 0.12.0 SVN Working Great

Hi,

Well I finished reindexing the jpegs..
They are all there, only the date is correct, all the timestamps are 0:00..
So almost there.

Regards.

boilerjt wrote:

I'll check into it.  Thanks for the feedback smile

UPDATE: I think I figured it out (sort of).  I could not get the EXIF to work in MediaTomb at all, even though the command line EXIF program was reading the exif metadata from my jpgs just fine.  What I had to do was delete config.xml and mediatomb.db (after backing then up of course).  Then I started Mediatomb and let it create fresh copies.  Next, I added the back the aux-data definition to config.xml (under the <import> tag)

    <library-options>
       <libexif>
          <auxdata>
             <add-data tag="EXIF_TAG_DATE_TIME"/>
          </auxdata>
       </libexif>
    </library-options>
]

Offline

 

#10 2009-12-28 00:48:45

rafaqat
Member
Registered: 2007-12-26
Posts: 10

Re: MediaTomb 0.12.0 SVN Working Great

any luck with getting a static binary yet?
I'm not familiar enough with Linux build tools or the layout of the DNS323 file system to be confident about not shafting it.  smile

cheers

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB