# Success! MediaTomb Transcoding Music On a NAS



## boilerjt (Jan 12, 2007)

It is confirmed :joy: Audio transcoding is possible from a NAS Box.

NAS: D-Link DNS-323 (500MHz ARM CPU, 64MB RAM) with two 1TB Seagate ST31000340AS SATA Drives
MediaTomb SVN-1895 Pre-0.12.0 code (compiled on the NAS)

I have been able to get music, video, and photos to stream to my HR20-700.

Music - MP3, Flac, Ogg, AAC, M4A, WMA Real Time Transcoded to WAV.
Video - MPEG2 (.mpg), TS Not Transcoded. VOB (Video Track & Audio Track 1) Transcoded (Muxed) from PS to TS
Photos - JPEG, Real Time Transcoded to strip metadata before sending to HR20.
Online Audio Streams: Will play MP3 and MMS streams in a playlist.

When transcoding Music, here are the CPU usage percentages:
MP3: 14%
AAC, M4A: 20%
Flac: 8%
Ogg Vorbis: 25%
WMA: 11%

These are a lot better than I anticipated and do not interfere with normal NAS file sharing.

Before you ask, it was a royal PITA to compile MediaTomb (and half of the dependencies) directly on the NAS. Please don't ask for a How-To on how I got this to compile. I probably couldn't reproduce it anyway  This is just a proof of concept that a NAS box is powerful enough to transcode audio. I was just impatient to see if this would work and couldn't wait for the official release when pre-compiled binaries would be available.

I will provide a How-To on how to setup this NAS (to get shell access) and how to install/setup MediaTomb with a pre-compiled install. Also, I have no idea when the 0.12.0 will be released. The MediaTomb developer has been tight lipped lately.

UPDATE: I have now packaged the software for installation on the DNS-323. Instructions and download links are here:
http://forum.dsmg600.info/t3098-[REL]-MediaTomb-0.12.0-1899.html


----------



## RunnerFL (Jan 5, 2006)

Care to share your config.xml? 

I'm trying to get Mediatomb running on my FreeBSD machine. Finally got it to install and it's running but I have X's next to file names on my HR2X's.


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> Care to share your config.xml?
> 
> I'm trying to get Mediatomb running on my FreeBSD machine. Finally got it to install and it's running but I have X's next to file names on my HR2X's.


This is the config.xml for the NAS Box. All of the transcoding applications are fixed point (integer math):


```
<?xml version="1.0" encoding="UTF-8"?>
<config version="1" xmlns="http://mediatomb.cc/config/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/1 http://mediatomb.cc/config/1.xsd">
  <server>
    <ui enabled="yes" show-tooltips="yes">
      <accounts enabled="no" session-timeout="30">
        <account user="mediatomb" password="mediatomb"/>
      </accounts>
    </ui>
    <name>MT NAS</name>
    <udn>uuid:30c0d5f5-abaf-458b-9235-d605b630f75f</udn>
    <home>/mnt/HD_a2/mt/config</home>
    <webroot>/mnt/HD_a2/mt/usr/share/mediatomb/web</webroot>
    <storage>
      <sqlite3 enabled="yes">
        <database-file>mediatomb.db</database-file>
      </sqlite3>
    </storage>
    <protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
    <!--
       Uncomment the lines below to get rid of jerky avi playback on the
       DSM320 or to enable subtitles support on the DSM units
    -->
    <!--
    <custom-http-headers>
      <add header="X-User-Agent: redsonic"/>
    </custom-http-headers>

    <manufacturerURL>redsonic.com</manufacturerURL>
    <modelNumber>105</modelNumber>
    -->
    <!-- Uncomment the line below if you have a Telegent TG100 -->
    <!--
       <upnp-string-limit>101</upnp-string-limit>
    -->
  </server>
  <import hidden-files="no">
    <scripting script-charset="UTF-8">      
    <common-script>/mnt/HD_a2/mt/usr/share/mediatomb/js/common.js</common-script>
    <playlist-script>/mnt/HD_a2/mt/usr/share/mediatomb/js/playlists.js</playlist-script>
      <virtual-layout type="js">
         <import-script>/mnt/HD_a2/mt/usr/share/mediatomb/js/import.js</import-script>
      </virtual-layout>
    </scripting>
    <mappings>
      <extension-mimetype ignore-unknown="no">
        <map from="mp3" to="audio/mpeg"/>
        <map from="ogg" to="application/ogg"/>
        <map from="aac" to="audio/x-aac"/>
        <map from="m4a" to="audio/mp4"/>
        <map from="flac" to="audio/x-flac"/>
        <map from="jpg" to="image/jpeg"/>
        <map from="JPG" to="image/jpeg"/>
        <map from="wav" to="audio/wav"/>
        <map from="vob" to="video/mpeg"/>
        <map from="ts" to="video/mpeg"/>
        <map from="mpg" to="video/mpeg"/>
        <map from="asf" to="video/x-ms-asf"/>
        <map from="asx" to="video/x-ms-asf"/>
        <map from="wma" to="audio/x-ms-wma"/>
        <map from="wax" to="audio/x-ms-wax"/>
        <map from="wmv" to="video/x-ms-wmv"/>
        <map from="wvx" to="video/x-ms-wvx"/>
        <map from="wm" to="video/x-ms-wm"/>
        <map from="wmx" to="video/x-ms-wmx"/>
        <map from="m3u" to="audio/x-mpegurl"/>
        <map from="pls" to="audio/x-scpls"/>
        <map from="flv" to="video/x-flv"/>
        <!-- Uncomment the line below for PS3 divx support -->
        <!-- <map from="avi" to="video/divx"/> -->
        <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
        <!-- <map from="avi" to="video/avi"/> -->
      </extension-mimetype>
      <mimetype-upnpclass>
        <map from="audio/*" to="object.item.audioItem.musicTrack"/>
        <map from="video/*" to="object.item.videoItem"/>
        <map from="image/*" to="object.item.imageItem"/>
      </mimetype-upnpclass>
      <mimetype-contenttype>
        <treat mimetype="audio/mpeg" as="mp3"/>
        <treat mimetype="application/ogg" as="ogg"/>
        <treat mimetype="audio/x-flac" as="flac"/>
        <treat mimetype="image/jpeg" as="jpg"/>
        <treat mimetype="image/jpeg" as="JPG"/>
        <treat mimetype="audio/x-mpegurl" as="playlist"/>
        <treat mimetype="audio/x-scpls" as="playlist"/>
        <treat mimetype="audio/x-wav" as="pcm"/>
        <treat mimetype="audio/L16" as="pcm"/>
        <treat mimetype="video/x-msvideo" as="avi"/>
        <treat mimetype="video/mp4" as="mp4"/>
        <treat mimetype="audio/mp4" as="mp4"/>
        <treat mimetype="audio/wav" as="wav"/>
        <treat mimetype="audio/x-aac" as="aac"/>
      </mimetype-contenttype>
    </mappings>
  </import>
  <transcoding enabled="yes">
    <mimetype-profile-mappings>
      <transcode mimetype="audio/mpeg" using="madwav"/>
      <transcode mimetype="application/ogg" using="oggwav"/>
      <transcode mimetype="audio/x-flac" using="flacwav"/>
      <transcode mimetype="audio/x-aac" using="faadwav"/>
      <transcode mimetype="audio/mp4" using="faadwav"/>
      <transcode mimetype="audio/x-ms-wma" using="wmawav"/>
      <transcode mimetype="image/jpeg" using="stripexif"/>  
    </mimetype-profile-mappings>
    <profiles>
      <profile name="madwav" enabled="yes" type="external">
        <mimetype>audio/wav</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="madplay" arguments="--output=wave:%out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="oggwav" enabled="yes" type="external">
        <mimetype>audio/wav</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="oggdec" arguments="-o %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="flacwav" enabled="yes" type="external">
        <mimetype>audio/wav</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="flac" arguments="-d -f -o %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="faadwav" enabled="yes" type="external">
        <mimetype>audio/wav</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="faad" arguments="-o %out %in"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="wmawav" enabled="yes" type="external">
        <mimetype>audio/wav</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="wma2wav" arguments="%in %out"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
      </profile>
      <profile name="stripexif" enabled="yes" type="external">
        <mimetype>image/jpeg</mimetype>
        <accept-url>no</accept-url>
        <first-resource>yes</first-resource>
        <accept-ogg-theora>no</accept-ogg-theora>
        <agent command="jhead2" arguments="-purejpg -outfile %out %in"/>
        <buffer size="5000" chunk-size="100" fill-size="100"/>
      </profile>
    </profiles>
  </transcoding>
</config>
```
The config.xml and transcoding scripts for a more powerful machine (with floating point unit) are posted on the MediaTomb transcoding wiki:

http://mediatomb.cc/dokuwiki/transcoding:transcoding#directv_hr2x_transcoding


----------



## Thaedron (Jun 29, 2007)

Congratz!


----------



## Cmnore (Sep 22, 2008)

Awesome!


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:


> This is the config.xml for the NAS Box. All of the transcoding applications are fixed point (integer math):
> 
> The config.xml and transcoding scripts for a more powerful machine (with floating point unit) are posted on the MediaTomb transcoding wiki:
> 
> http://mediatomb.cc/dokuwiki/transcoding:transcoding#directv_hr2x_transcoding


Thanks boilerjt! Got it working perfectly!

My transcoding settings were off.


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> Thanks boilerjt! Got it working perfectly!
> 
> My transcoding settings were off.


Great!  Another happy MediaTomb user :hurah:


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:


> Great!  Another happy MediaTomb user :hurah:


Yeah, maybe. 

Now to get Video working. :lol:


----------



## RunnerFL (Jan 5, 2006)

I have mpeg video working now. 

And I'm working my way thru the monster "Mediatomb is now working" thread hoping to get wmv and avi working as well. :lol:


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> I have mpeg video working now.
> 
> And I'm working my way thru the monster "Mediatomb is now working" thread hoping to get wmv and avi working as well. :lol:


Just curious...what kind of hardware are you running FreeBSD? As far as video transcoding goes, the ffmpegvideo script will transcode just about format  You may have to compile a custom ffmpeg and you'll need to install mediainfo... Also, Greg Lee is working on a new script using VLC.


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:


> Just curious...what kind of hardware are you running FreeBSD? As far as video transcoding goes, the ffmpegvideo script will transcode just about format  You may have to compile a custom ffmpeg and you'll need to install mediainfo... Also, Greg Lee is working on a new script using VLC.


I'm running it on an i386 machine.

I have ffmpeg installed, from ports, but I get errors on avi and wmv formats.

When I try to play an avi or wmv file I get:

2008-09-28 20:57:58 INFO: Arguments: %in %out 5900k 256k
2008-09-28 20:57:58 ERROR: process terminated early


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> I'm running it on an i386 machine.
> 
> I have ffmpeg installed, from ports, but I get errors on avi and wmv formats.
> 
> ...


Do you have mediainfo installed? The first thing the script does is call mediainfo to get information about the video. Other things to check are that the ffmpegvideo +x bit is set (chmod +x) and whether the script actually runs without errors. I don't know if the script runs on FreeBSD the way it runs on Linux.

You can test the script by running it from the command line (ffmpegvideo inputfile.avi outputfile.ts 5900k 256k) and see if it transcodes and writes to the specified output file. If any errors occur, they should be sent to the console.


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:



> Do you have mediainfo installed? The first thing the script does is call mediainfo to get information about the video. Other things to check are that the ffmpegvideo +x bit is set (chmod +x) and whether the script actually runs without errors. I don't know if the script runs on FreeBSD the way it runs on Linux.
> 
> You can test the script by running it from the command line (ffmpegvideo inputfile.avi outputfile.ts 5900k 256k) and see if it transcodes and writes to the specified output file. If any errors occur, they should be sent to the console.


Ok, this is odd... I'm getting "command not found" but I know ffmpegvideo is in /usr/local/bin and set executable.

Yes, mediainfo is installed and responding. And ffmpeg is installed and working as well.


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> Ok, this is odd... I'm getting "command not found" but I know ffmpegvideo is in /usr/local/bin and set executable.
> 
> Yes, mediainfo is installed and responding. And ffmpeg is installed and working as well.


Are you using a bash shell? The script calls /bin/bash and you should make sure this is correct.


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:


> Are you using a bash shell? The script calls /bin/bash and you should make sure this is correct.


You know, I should have noticed that. Duh!

I changed it to /usr/local/bin/bash and now avi's and wmv's work. 

Thanks again boilerjt!


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> You know, I should have noticed that. Duh!
> 
> I changed it to /usr/local/bin/bash and now avi's and wmv's work.
> 
> Thanks again boilerjt!


Cool :icon_da: Now can I officially call you a happy MediaTomb user ? :lol:


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:


> Cool :icon_da: Now can I officially call you a happy MediaTomb user ? :lol:


Yes, you can.


----------



## boilerjt (Jan 12, 2007)

Update: WMA transcoding is now working on my DNS-323 NAS  More info in Post #1.


----------



## boilerjt (Jan 12, 2007)

If there are any D-Link DNS-323 owners out there and would like to try the pre-0.12.0 MediaTomb code, please let me know. I was able to package the relevant files and I can email them to you. The package has been tested by another user and seems to be working


----------



## Sharkie_Fan (Sep 26, 2006)

I got the 0.12.0 files from boilerjt, and while I've only tested photos thus far, this is some good stuff!

I've tried twonky, tversity, and WMP11 on various machines with not alot of luck.

I have about 15GB of photos (12K, roughly) and I've done a little messing with it in the last hour or so. I can view most of my photos - I'm guessing about 80%. The 20% that I can't view were taken on my Nikon D40 and are high resolution. The file size of these is roughly 2MB each. I've looked through a bunch of my photos, and I'm nearly 100% certain that the only photos I can see are those on the D40.

My assumption is that the fault lies on the HR2x, but I haven't done enough messing around to confirm whether or not that is, in fact, the case, but I'll work on it.

Either way, this is much, much more success than I had previously with any of my media servers. And even better, it's running on my NAS, which means no computers running 24/7 to have my photos accessible.

Now that I've made it this far, I'll track down my music & movies and start working on those.

All in all, I'm well on my way to becoming a very happy Mediatomb user!


----------



## boilerjt (Jan 12, 2007)

I've got another transcode working on the DNS-323. It can now transcode VOB files from DVDs to an MPEG Transport Stream (TS) on the fly. This is especially useful since most DVDs come with an AC-3 soundtrack and the HR2x cannot play AC-3 in a VOB (MPEG PS). When transcoding (remuxing) the video into a TS, the HR2x can play the AC-3 soundtrack.

If the VOB has multiple audio tracks, only the first track will be used. From what I've seen, the first track is normally English AC-3 and this should work for most DVDs. PCM audio should work as well, but I haven't tested it. DTS will not work. Also, you may get a foreign language or commentary on the first track and there is nothing I can do about this right now.


----------



## boilerjt (Jan 12, 2007)

Here is another addition:

I can now stream online MMS audio from the DNS-323 NAS to my HR-20 There are a lot of radio stations streaming in MMS format and one of my major goals was getting this to work. Once again, if there are any DNS-323 owners out there and want to give MediaTomb pre-0.12.0 a try, let me know.


----------



## monkeyhouse (Sep 24, 2008)

boilerjt said:


> Great!  Another happy MediaTomb user :hurah:


So you guys have all networked your receivers and have no lockups? I didn't see anyone repond who had a HR21-100, but did see a few HR21-700's, no lockups on those? I know they are just made by different manufacturers, but if I connect mine to a network, it will only go about 2-3 hours(less if I'm actually using it) before it locks up.


----------



## David MacLeod (Jan 29, 2008)

monkeyhouse said:


> So you guys have all networked your receivers and have no lockups? I didn't see anyone repond who had a HR21-100, but did see a few HR21-700's, no lockups on those? I know they are just made by different manufacturers, but if I connect mine to a network, it will only go about 2-3 hours(less if I'm actually using it) before it locks up.


hr20-100 and hr21-100r networked and not locking. not streaming media with them but still hooked up.


----------



## monkeyhouse (Sep 24, 2008)

David MacLeod said:


> hr20-100 and hr21-100r networked and not locking. not streaming media with them but still hooked up.


thank you sir, that definitely helps.


----------



## thekochs (Oct 7, 2006)

monkeyhouse said:


> but if I connect mine to a network, it will only go about 2-3 hours(less if I'm actually using it) before it locks up.


Are you saying your HR2x locks up or that access to a PC after few hours locks up ? If the latter, here is some things to check out...especially item #2. These are some of the setup instructions from enabling file sharing with PC for WMP11.....I recall alot of folks called HR2x lockups when in fact PC was going into standby.

1) Right click on Desktop, select Power, go to Advanced Tab and make sure all states do not allow Standby modes. Go to Hibernate Tab and disable.
*2) Go to Device Manager under Control Panel>System. Highlight Network Adapters in list and Right click, goto Properties. Go to Power Management Tab and uncheck (disable) all boxes that are power down/standby modes.*
3) Go to Control Panel, Add/Remove Programs. Click on Add/Remove Windows Components on right. Scroll down to Networking Services, highlight it, click on Details. Scroll down and make sure Internet Gateway Device Discovery and Control Client AND UPnP User Interface are checked.
4) Go to Start Menu, Admin Tools, then Services. Scroll down and highlight each of these services, double lick on them, make sure they are running and also are set to automatic. You'll see the button to Start and the dropdown box to select Automatic for each.
==>a) SSDP Discovery Service
==>b) HTTP SSL
==>c) Universal Plug & Play Device Host


----------



## thekochs (Oct 7, 2006)

boilerjt said:


> It is confirmed Audio transcoding is possible from a NAS Box.
> NAS: D-Link DNS-323 (500MHz ARM CPU, 64MB RAM) with two 1TB Seagate ST31000340AS SATA Drives
> MediaTomb SVN-1895 Pre-0.12.0 code (compiled on the NAS)
> 
> ...


Look forward to the How-To and the files associated. 



boilerjt said:


> I've got another transcode working on the DNS-323. It can now transcode VOB files from DVDs to an MPEG Transport Stream (TS) on the fly. This is especially useful since most DVDs come with an AC-3 soundtrack and the HR2x cannot play AC-3 in a VOB (MPEG PS). When transcoding (remuxing) the video into a TS, the HR2x can play the AC-3 soundtrack. If the VOB has multiple audio tracks, only the first track will be used. From what I've seen, the first track is normally English AC-3 and this should work for most DVDs. PCM audio should work as well, but I haven't tested it. DTS will not work. Also, you may get a foreign language or commentary on the first track and there is nothing I can do about this right now.


Are you saying you don't have to use MPEG Streamclip to convert VOBs to TS and rename to MPG ?
{I think the audio on this is just MP2 after conversion ?}
Will all the several VOBs of one movie stream back-to-back like when Video_TS.IFOs are launched ?


----------



## monkeyhouse (Sep 24, 2008)

thekochs said:


> Are you saying your HR2x locks up or that access to a PC after few hours locks up ? If the latter, here is some things to check out...especially item #2. These are some of the setup instructions from enabling file sharing with PC for WMP11.....I recall alot of folks called HR2x lockups when in fact PC was going into standby.
> 
> 1) Right click on Desktop, select Power, go to Advanced Tab and make sure all states do not allow Standby modes. Go to Hibernate Tab and disable.
> *2) Go to Device Manager under Control Panel>System. Highlight Network Adapters in list and Right click, goto Properties. Go to Power Management Tab and uncheck (disable) all boxes that are power down/standby modes.*
> ...


No, actually, it appears that this was actually a problem with the software in the receiver. It was in fact the receiver that was locking up. However, My receiver has been lockup free for getting close to 24 hours now since I downloaded the 0x28a CE last night.


----------



## boilerjt (Jan 12, 2007)

thekochs said:


> Look forward to the How-To and the files associated.
> 
> Are you saying you don't have to use MPEG Streamclip to convert VOBs to TS and rename to MPG ?
> {I think the audio on this is just MP2 after conversion ?}
> Will all the several VOBs of one movie stream back-to-back like when Video_TS.IFOs are launched ?


This linux application I found will read a VOB file, demux the video and audio streams, mux the video stream and first audio stream into ts format, and then MediaTomb can stream the ts to the HR2x on the fly. From what I have seen, it only works for one file at a time and you must select the next VOB manually after one is finished playing. Not an elegant solution, but you can play VOBs on the HR2x with an AC3 soundtrack 

A new feature in MediaTomb currently under development uses libdvdread to parse DVD files and stream them. I don't know if it works on VOBs, IFO, or ISO mode. Hopefully, it won't require much CPU and memory and will work on a NAS. I'll let you know more when I have more info.


----------



## RunnerFL (Jan 5, 2006)

boilerjt, I need your help on this one more time...

I decided to add photos to mediatomb now and it's not working.

If I run my transjpeg script manually it works fine however I'm getting "Unable To Access Media" errors on my HR2X's.

I've included my setup below, can you see anything obvious as to why it's not working?

My Config.xml Entries:

In extention-mimetype I have:

In mimetype-contenttype I have:

<treat mimetype="image/jpeg" as="jpg"/>
<treat mimetype="image/jpeg" as="JPG"/>

In mimetype-profile-mappings I have:

<transcode mimetype="image/jpeg" using="rescalejpeg"/>

For profile I have:

<profile name="rescalejpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="/usr/local/bin/transjpeg" arguments="%in %out"/>
<buffer size="50000" chunk-size="100" fill-size="100"/>
</profile>

My transjpeg:

#!/usr/local/bin/bash

exec convert -size 640x480 "$1" -resize 640x480 +profile '*' - > "$2"

Error I'm Getting from Mediatomb:

2008-10-14 12:52:30 INFO: Arguments: %in %out


----------



## boilerjt (Jan 12, 2007)

Do you have imagemagick installed? The convert binary is part of imagemagick.



RunnerFL said:


> boilerjt, I need your help on this one more time...
> 
> I decided to add photos to mediatomb now and it's not working.
> 
> ...


----------



## RunnerFL (Jan 5, 2006)

boilerjt said:


> Do you have imagemagick installed? The convert binary is part of imagemagick.


Yeah, it's installed.

Like I said if I manually type out what's in the script [convert -size 640x480 "infile.jpg" -resize 640x480 +profile '*' - > "outfile.jpg"] it works fine and converts the file. It just won't display on my HR2X's.


----------



## boilerjt (Jan 12, 2007)

RunnerFL said:


> Yeah, it's installed.
> 
> Like I said if I manually type out what's in the script [convert -size 640x480 "infile.jpg" -resize 640x480 +profile '*' - > "outfile.jpg"] it works fine and converts the file. It just won't display on my HR2X's.


Oops, I missed the part about it running OK manually. I just tried it on my HR20-700 mostly to verify that the latest CE didn't break anything and it still works fine for me.

I am looking at my current config.xml on my Ubuntu installation and I see a couple of differences. In my extention-mimetype I do not have any jpg entries.

In mimetype-contenttype I only have:
<treat mimetype="image/jpeg" as="jpg"/>

Everything else is identical.

If you make changes, you can also try to delete and reimport some of your jpegs. Also check the Web UI on the individual jpeg files by making sure the mimetype is correct (click edit button).

FYI, the INFO: Arguments: %in %out is not an error. MediaTomb displays this type of message when a transcoding profile is used.


----------



## boilerjt (Jan 12, 2007)

For those you you who may have a DNS-323, I have packaged the MediaTomb software and dependencies for download. Instructions are here:

http://forum.dsmg600.info/t3098-[REL]-MediaTomb-0.12.0-1899.html


----------



## thekochs (Oct 7, 2006)

boilerjt said:


> For those you you who may have a DNS-323, I have packaged the MediaTomb software and dependencies for download. Instructions are here:
> 
> http://forum.dsmg600.info/t3098-[REL]-MediaTomb-0.12.0-1899.html


John.....since many of us may not be aware can you explain ffp and some background here for us Metatomb NEWBS ?

Just in case anyone has problems with the link now or in future here is John's post.............
**********************************************************************
I am sharing my build of MediaTomb 0.12.0 SVN 1899 if anyone is interested. I am using MediaTomb to stream media to my DirecTV HR20 and the current release (0.11.0) doesn't work with this device. I (and others) have worked with the MediaTomb developer and have gotten the SVN code to work. With the HR20, it only supports a minimal amount of formats (Audio: wav, lpcm, Video: Mpeg2, Photo: jpeg) so I have taken full advantage of the transcoding features of MediaTomb.

To get started, you need ffp 0.5 installed on your DNS-323. You will need these files:

mediatomb-0.12.0-SVN1899-dns323.tar.gz Download: http://www.fileqube.com/shared/AyxZjjBPz133720
curl-7.19.0-ffp0.5.tgz Download: http://www.fileqube.com/shared/hNHaUTO133721
js-1.7.0-ffp0.5.tgz Download: http://www.fileqube.com/shared/qNtVt133722
taglib-1.5-ffp0.5.tgz Download: http://www.fileqube.com/shared/zyTCAWpp133725

Place the mediatomb tarball in /mnt/HD_a2 and the *.tgz files in /ffp/pkg/additional

Install the *.tgz files with funpkg -i. 
To install mediatomb, tar xzf mediatomb-0.12.0-SVN1899-dns323.tar.gz This will create a mediatomb12 directory and I would recommend running MediaTomb from here to prevent it from interfering with fonz's MediaTomb package.
To start MediaTomb, run ./mediatomb.sh from /mnt/HD_a2/mediatomb12. This will start it in daemon mode.  It will automatically create a config.xml and mediatomb.db in /mnt/HD_a2/mediatomb12/config. I have included a sample config file (config.xml.hr2x) that I use with my HR20. 
At this point, you can access the web UI and start importing files.

If you are interested in the transcoding features, here are some additional files. They all use fixed point math and work well on the DNS-323:

If you wish to transcode flac or ogg audio to wav (or pcm), download all *.tgz packages (you do not need mt-daapd) from here:
http://files.hesse-n.com/ch3snas/ (thanks to Delekhan)
and place them in /ffp/pkg/additional. Use funpkg -i to install them. Then, look at config.xml.hr2x as a reference to create the transcoding profiles in config.xml.

To transcode mp3 to wav, wmv to wav, mms streams to wav, mp4 audio to wav, transcode jpg by stripping exif metadata, or MPEG PS to TS, download these packages:

mediatomb-transcode-bin-1.0-ffp0.5.tgz Download: http://www.fileqube.com/shared/rxxXvbk133724
libmms-0.4-ffp0.5.tgz Download: http://www.fileqube.com/shared/QQzzbvr133727
glib-2.18.1-ffp0.5.tgz Download: http://www.fileqube.com/shared/bBdWPg133726

Once again, place all of these in /ffp/pkg/additional and use funpkg -i to install them. Use config.xml.hr2x as a reference to create the transcoding profiles in config.xml.

Enjoy

--John


----------



## boilerjt (Jan 12, 2007)

thekochs said:


> John.....since many of us may not be aware can you explain ffp and some background here for us Metatomb NEWBS ?


ffp (fonz fun-plug) is a software package that can be installed on the DNS-323 that essentially gives you everything you need to use the NAS as a linux machine. ffp even includes a build environment so that you can compile applications directly on the DNS-323 and this is how I built MediaTomb. Installing ffp is as easy to accessing a shared drive from Windows and copying two files, then rebooting. You can then telnet into the NAS and pretty much do anything you please 

This wiki page contains everything you need to know about the DNS-323:

http://wiki.dns323.info/


----------



## thekochs (Oct 7, 2006)

boilerjt said:


> ffp (fonz fun-plug) is a software package that can be installed on the DNS-323 that essentially gives you everything you need to use the NAS as a linux machine. ffp even includes a build environment so that you can compile applications directly on the DNS-323 and this is how I built MediaTomb. Installing ffp is as easy to accessing a shared drive from Windows and copying two files, then rebooting. You can then telnet into the NAS and pretty much do anything you please
> 
> This wiki page contains everything you need to know about the DNS-323:
> 
> http://wiki.dns323.info/


I have a Windows XP Pro Sp3 PC connected to home network thru wired Linksys Router. The HR20 is connected to this network. I'm reasonably technical but never used Linux...ever...only C/C++ many..many years ago. I can do all the above with this setup and just some installs/folder creations ?

Never used Telnet either. :scratch: ...it looks like you can brick your DNS-323 using Telnet ?http://wiki.dns323.info/howto:telnet
What do you or should I use for Telnet Client on Windows PC...Putty ?http://www.chiark.greenend.org.uk/~sgtatham/putty/
Can you outline what you did to install Telnet ? 
I also found reference to MLDonkey for Linux newbs that will install TelNet and funplug (is this same as ffp ?) http://www.shadowandy.net/2007/10/mldonkey-292-real-simple.htm

FYI...did you see you can install Twonky on the DNS-323: http://wiki.dns323.info/howto:twonkyupnpserver
Thoughts on this versus Mediatomb...also vs Tversity ? Found an earlier post in July from *you* on the Twonky subject.............
Quote: _Actually, Twonky will not transcode MP3s unless you have the lame add-on, which Twonky does not provide anymore. When MediaTomb 0.12.0 is released (hopefully soon), you will be able to use this on a NAS box and it will transcode audio (mp3, aac, m4a, wma, lame, ogg, etc)._

I know you are busy but a EASY NEWB *step-by-step *(baby step) would be MOST appreciated bowdown if/when you have time.


----------



## boilerjt (Jan 12, 2007)

thekochs said:


> I have a Windows XP Pro Sp3 PC connected to home network thru wired Linksys Router. The HR20 is connected to this network. I'm reasonably technical but never used Linux...ever...only C/C++ many..many years ago. I can do all the above with this setup and just some installs/folder creations ?
> 
> Never used Telnet either. :scratch: ...it looks like you can brick your DNS-323 using Telnet ?http://wiki.dns323.info/howto:telnet
> What do you or should I use for Telnet Client on Windows PC...Putty ?http://www.chiark.greenend.org.uk/~sgtatham/putty/
> ...


Actually, it is very simple if you have a DNS-323. After you get the DNS-323 NAS installed and setup (per the NAS instructions), the NAS shares (one for each hard drive) will be visible in the Windows Network. Next, download the two ffp 0.5 files (http://www.inreto.de/dns323/fun-plug/0.5/) onto the Volume_1 share and reboot the NAS from it's web page. When the NAS is finished booting, ffp 0.5 will be installed and you will have telnet access with no password. You can use the telnet client that come in Windows. Telnet will not brick your box! As long as you don't flash any custom firmware onto the NAS, you should be safe.

Next, following the instructions here:

http://forum.dsmg600.info/t3098-[REL]-MediaTomb-0.12.0-1899.html

After you download the files, move them to the NAS from Windows. You cannot copy files directly to the /ffp directory, so you need to move things (from Windows) to /Volume_1 then telnet into the NAS. Next, a simple linux mv (move) command will allow you to move the files to where I specify in the instructions.

Once you own this NAS, these instructions are fairly obvious and it will be just as easy running mediatomb from the NAS as it is from a computer.

I wouldn't bother with Twonky anymore. Since they released the beta in April, there has not been a single word from Twonky. Also, there are rumors that the consumer version of Twonky as we know it will soon be obsolete as they will be focusing on OEM and hardware manufacturers. These are rumors from the Twonky forums and not confirmed. Besides, their support is non-existent.


----------



## boilerjt (Jan 12, 2007)

I have updated the DNS-323 MediaTomb build to SVN 1903 and it is now easier to install since all dependent libraries are compiled into the mediatomb binary  Details are here:

http://forum.dsmg600.info/t3098-[R...12.0-1899.html

The reason I place the information on that forum is that I've opened this MediaTomb build to all DNS-323 users worldwide. It is much easier posting the information in one place and there are more DNS-323 owners over there. Also, I am trying to help the MediaTomb developer with creating static builds for this family of hardware.

My heart is still on DBSTalk, though


----------



## thekochs (Oct 7, 2006)

boilerjt said:


> I have updated the DNS-323 MediaTomb build to SVN 1903 and it is now easier to install since all dependent libraries are compiled into the mediatomb binary  Details are here:
> 
> http://forum.dsmg600.info/t3098-[R...12.0-1899.html
> 
> ...


Thanks...saw your post on other DBSTalk NAS thread_..."From the latest I've heard, version 0.12.0 will be released before the end of the year." _ Is there value to wait until this rev ? Frankly, I may not even get to buying the DNS-323 until after the first of the year...too many other projects on my list first. What would this rev do and/or simply the above processes ?

Thanks !!!


----------



## dave29 (Feb 18, 2007)

i wish i would have seen this thread before i bought the buffalo nas:lol:


----------



## boilerjt (Jan 12, 2007)

thekochs said:


> Thanks...saw your post on other DBSTalk NAS thread_..."From the latest I've heard, version 0.12.0 will be released before the end of the year." _ Is there value to wait until this rev ? Frankly, I may not even get to buying the DNS-323 until after the first of the year...too many other projects on my list first. What would this rev do and/or simply the above processes ?
> 
> Thanks !!!


When I saw the MediaTomb news page about the release timeframe (http://mediatomb.cc/news), this is what motivated me to build it myself for my DNS-323.

If you get the DNS-323 now, you can install the MediaTomb code that I've compiled. If you buy any other NAS that works with MediaTomb, you'll probably have to wait for the release (unless someone else builds it). The current release (0.11.0) will not work on the HR2x. Simply put, MediaTomb is the only media server that will transcode on a NAS and it does it extremely well  And from experience, MediaTomb is the best media server for the HR2x, period, because of it's transcoding abilities, especially on a PC. Nothing available for Windows even comes close to what it can do. I've been using it on my Linux install since May without a single hiccup. I'm not the only one who can make this claim 

*Executive Summary:* MediaTomb 0.12.0 is the only media server software out there that provides the transcoding needed to listen to music on your HR2x from a NAS. Also, it's open source code and free


----------



## boilerjt (Jan 12, 2007)

dave29 said:


> i wish i would have seen this thread before i bought the buffalo nas:lol:


The Linkstation Live was #2 on my list when deciding on a NAS  What part of IN are your from? I am originally from Elkhart.


----------



## dave29 (Feb 18, 2007)

lawrenceburg. southeastern corner of the state. ~30 miles west of cincinnati


----------



## jaystizo (Dec 2, 2004)

Here's my setup. I have a Buffalo Linkstation Pro. I downloaded the pre-release of 0.12.0 using svn, compiled and installed it successfully. I installed vlc which is what I saw was being used in the Transcoding page for the Mediatomb wiki. I edited the config.xml file according to the wiki as well and created the vlcaudio shell script. But when I go to try and play an mp3, I get silence and on the console screen, I get this:

MediaTomb UPnP Server version 0.12.0

===============================================================================
Copyright 2005-2008 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
MediaTomb is free software, covered by the GNU General Public License version 2

2008-11-02 13:41:00 INFO: Loading configuration from: /root/.mediatomb/config.xml
2008-11-02 13:41:01 INFO: Checking configuration...
2008-11-02 13:41:01 INFO: Setting filesystem import charset to ISO-8859-1
2008-11-02 13:41:01 INFO: Setting metadata import charset to ISO-8859-1
2008-11-02 13:41:01 INFO: Setting playlist charset to ISO-8859-1
2008-11-02 13:41:01 INFO: Configuration check succeeded.
2008-11-02 13:41:01 INFO: Initialized port: 49152
2008-11-02 13:41:01 INFO: Server bound to: 200.200.0.201
2008-11-02 13:41:02 INFO: MediaTomb Web UI can be reached by following this link:
*2008-11-02 13:43:32 INFO: Arguments: %in %out
2008-11-02 13:43:38 INFO: Arguments: %in %out
2008-11-02 13:43:46 INFO: Arguments: %in %out*

Boilerjt, is there a reason why you're using mad as opposed to vlc to transcode the files? I really only want mp3s to play from the HR20 for now since I don't plan on viewing video on it.

Thanks in advance for your help


----------



## jaystizo (Dec 2, 2004)

OK, I got it to work using madplay but the audio is ridiculously jerky. Any ideas?


----------



## boilerjt (Jan 12, 2007)

jaystizo said:


> Here's my setup. I have a Buffalo Linkstation Pro. I downloaded the pre-release of 0.12.0 using svn, compiled and installed it successfully. I installed vlc which is what I saw was being used in the Transcoding page for the Mediatomb wiki. I edited the config.xml file according to the wiki as well and created the vlcaudio shell script. But when I go to try and play an mp3, I get silence and on the console screen, I get this:
> 
> MediaTomb UPnP Server version 0.12.0
> 
> ...


I'm using vlc on my Ubuntu setup, but not for my DNS-323 NAS. For mp3 transcoding on my NAS, I am using the madplay command line. When transcoding on a NAS, you have to use fixed point applications (the NAS will try to emulate floating point and it is too slow.) I also have fixed point apps to transcode flac, m4a, ogg, and wma. Look at post #3 in the thread to see my config.xml. In the transcoding profiles, I call the command line apps directly and do not use any scripts.


----------



## boilerjt (Jan 12, 2007)

jaystizo said:


> OK, I got it to work using madplay but the audio is ridiculously jerky. Any ideas?


Madplay works really well on my NAS and uses only 14% of the CPU. I've never used MediaTomb on any NAS other than my D-Link DNS-323 so I cannot know for sure how well it works on yours. Did you compile MAD yourself?

You can try to use the same transcoding profile I am with the same buffering settings and see if that works for you.


----------



## jaystizo (Dec 2, 2004)

I installed mad via aptitude repository; my NAS is running Debian. The cpu usage of mad according to top is below 10%. My HR20 is connected via a linksys WGA600N. Could it be the wireless bandwidth that is causing an issue?


----------



## boilerjt (Jan 12, 2007)

jaystizo said:


> I installed mad via aptitude repository; my NAS is running Debian. The cpu usage of mad according to top is below 10%. My HR20 is connected via a linksys WGA600N. Could it be the wireless bandwidth that is causing an issue?


I wouldn't think wireless bandwidth would be an issue streaming a transcoded mp3, unless the connection is pretty bad. My HR20 is wired and I haven't had any issues. I am also streaming MPEG2 home movies (without transcoding) and they play good from my NAS.

I was thinking of installing Debian on mine, but since someone has come up with a development environment and toolchain, I can compile almost anything on it. There is an optware repository, but I find a lot of the stuff there just doesn't work on the DNS-323.


----------



## jaystizo (Dec 2, 2004)

Hmm.. I just tried it and now everything is working fine. No stuttering at all. I don't know what to make of it. Maybe my NAS was experiencing some heavy disk activity.


----------



## thekochs (Oct 7, 2006)

jaystizo said:


> I downloaded the pre-release of 0.12.0.............
> MediaTomb UPnP Server version 0.12.0
> 
> ===============================================================================
> ...


Boilerjp,

Metatomb 0.12.0 is out ? How does this change/effect/improve the install/use ?

Thx.


----------



## boilerjt (Jan 12, 2007)

thekochs said:


> Boilerjp,
> 
> Metatomb 0.12.0 is out ? How does this change/effect/improve the install/use ?
> 
> Thx.


Not yet. You chopped off the sentence too early...



> Originally Posted by jaystizo View Post
> I downloaded the pre-release of 0.12.0 using svn, compiled and installed it successfully.


Here are the install instructions for a NAS using 0.11.0 code (from the MediaTomb download page.) You still have to have to have shell access (telnet or SSH).



> The installation is very easy, however there is one requirement: you need to have shell access (telnet/ssh/serial) to your NAS device. Download the package and unpack it on the mounted harddisk - do not install it in flash!
> 
> Here is a sample installation procedure:
> tar -zxvf mediatomb-static-0.11.0-r1-linux-uclibc-mips32el.tar.gz
> ...


----------



## boilerjt (Jan 12, 2007)

jaystizo said:


> Hmm.. I just tried it and now everything is working fine. No stuttering at all. I don't know what to make of it. Maybe my NAS was experiencing some heavy disk activity.


Happy to see it is working for you now


----------



## jdhoover (Dec 2, 2008)

I have an HR21-100 and Fedora 10 running mediatomb from the svn. It appears to be running. When I try to look at an mpeg I get in /var/log/mediatomb:

2008-12-02 07:34:29 INFO: Arguments: %in %out 8000k 256k

And when I go to look at an image, I get:

2008-12-02 07:34:37 ERROR: object is not an item

Neither the mpeg or the jpg come up, and I get similar problems with vob files. Any thoughts? I've been at it for several hours. I did have version 0.11 first from "yum install mediatomb" and then saw/read that that doesn't work. So, I got the svn version and installed that over top.


----------



## boilerjt (Jan 12, 2007)

jdhoover said:


> I have an HR21-100 and Fedora 10 running mediatomb from the svn. It appears to be running. When I try to look at an mpeg I get in /var/log/mediatomb:
> 
> 2008-12-02 07:34:29 INFO: Arguments: %in %out 8000k 256k
> 
> ...


Could you please repost in this thread:

http://www.dbstalk.com/showthread.php?t=128910

I think someone had this same issue in that thread. This thread is for running MediaTomb on a NAS.

Thanks


----------



## jaystizo (Dec 2, 2004)

I hate to resurrect this thread but I was wondering if anyone has had any luck streaming MKV(.264) files from their NAS. Everytime, I try to play a file, I get a message saying "No playable video files"

Here's a snippet of my config.xml file

......
<transcode mimetype="video/x-matroska" using="transvidmt"/>
......
<profile name="transvidmt" enabled="yes" type="external">
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command="mt-transcode-video" arguments="%in %out"/>
<buffer size="10485760" chunk-size="262144" fill-size="524288"/>
</profile>

And here's the mt-transcode-video script I mention above

#!/bin/bash
FFMPEG_PATH="/usr/bin/ffmpeg"
INPUT="$1"
OUTPUT="$2"
VIDEO_CODEC="mpeg2video"
VIDEO_BITRATE="4096k"
VIDEO_FRAMERATE="25"
AUDIO_CODEC="copy"
FORMAT="dvd"
exec "${FFMPEG_PATH}" -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
-r ${VIDEO_FRAMERATE} -acodec ${AUDIO_CODEC} -f ${FORMAT} - > "${OUTPUT}"

Any ideas? My NAS is a Buffalo Linkstation. Could it be a hardware limitation?


----------



## boilerjt (Jan 12, 2007)

jaystizo said:


> I hate to resurrect this thread but I was wondering if anyone has had any luck streaming MKV(.264) files from their NAS. Everytime, I try to play a file, I get a message saying "No playable video files"
> 
> Here's a snippet of my config.xml file
> 
> ...


It's definitely a hardware limitation as the NAS will not be able to transcode h264 video fast enough for real time viewing. It takes a fairly powerful PC to decode h264. Using my NAS (D-Link DNS-323), the most I can do with video is to remux mpeg2 ps to ts using tstools.


----------



## rakstr (Aug 23, 2007)

Sorry for such a basic question but I've read as much as I can  I've been able to get MediaTomb 0.11.0 up and running on my Maxtor NAS. My PS3 sees the uPnP server and plays the MP3's and displays the JPG files.

HOWEVER, ... my HR21-700 is different. It sees the MediaTomb server, lists all my MP3 files but all have 0 length and an X next to them. For the JPG's it gives me an error, can't acces media (or something similar).

I've looked at the discussion on transcoding but am not clear on what specifically I need to do to get the MP3's and JPG's accessible on the HR21 and I'm curious if any of these changes will effect the access I have on the PS3.

My last question is probably more stupid but I really don't get why MP3's and JPG's aren't "native" to the HR21 system for playback so I ask WHY? 

THanks in advance folks, these forums have been most beneficial.


----------



## boilerjt (Jan 12, 2007)

The simple answer is MediaTomb 0.11 does not work with MediaShare. You need a 0.12 pre-release build and I don't know if anyone has built 0.12 for the Maxtor NAS like I have for the D-Link DNS-323.

Even if you have a 0.12 build, you need transcoding to play MP3 and other audio formats. MediaShare will only play lpcm and wav formats and all other audio formats need transcoding. Jpeg photos and mpeg2ts videos stream fine without transcoding with 0.12.



rakstr said:


> Sorry for such a basic question but I've read as much as I can  I've been able to get MediaTomb 0.11.0 up and running on my Maxtor NAS. My PS3 sees the uPnP server and plays the MP3's and displays the JPG files.
> 
> HOWEVER, ... my HR21-700 is different. It sees the MediaTomb server, lists all my MP3 files but all have 0 length and an X next to them. For the JPG's it gives me an error, can't acces media (or something similar).
> 
> ...


----------



## mdavej (Jan 31, 2007)

Before I try to get this working, what's the picture quality like on videos? I mean are 1080i videos still 1080i on the HR2x. From the photo sharing, I can see that they are much lower resolution than the actual files. Just wondering if videos took the same hit.

Thanks


----------



## boilerjt (Jan 12, 2007)

MediaShare has no issue playing 1080p, 1080i, 720p, etc., but there is a bitrate limit somewhere around 8000kbps. Anything above this and the video will only play for a few seconds and the HR2x will show an error. Also, the only video format you can stream to the HR2x is mpeg2. If the video has AC3 audio, it must be in a transport stream (TS). DVDs and VOBs are typically program stream (PS) and must be converted to TS. The NAS is not powerful enough to transcode video, so all video conversions must be done ahead of time.



mdavej said:


> Before I try to get this working, what's the picture quality like on videos? I mean are 1080i videos still 1080i on the HR2x. From the photo sharing, I can see that they are much lower resolution than the actual files. Just wondering if videos took the same hit.
> 
> Thanks


----------



## mdavej (Jan 31, 2007)

Great info. Thanks.


----------



## MrAP (Aug 5, 2009)

jaystizo said:


> Here's my setup. I have a Buffalo Linkstation Pro. I downloaded the pre-release of 0.12.0 using svn, compiled and installed it successfully.


Did you compile it on the Linkstation? I have an older Linkstation (LS1/PPC) with the customized OpenLink firmware and have used ipkg for installing packages. Since there is only 0.11.0-5 available, I'm going to have to figure out how to compile and install 0.12.0 :eek2: and I would appreciate help from someone who has done it before!

I'm really only interested in local audio streaming (MP3's), and viewing JPG's and AVI's/MOV's that come from my camera; but I want to stream them from the NAS which is always on, rather than my Windows box which is mostly off 

Thanks.


----------



## biomecanoid (Jul 14, 2015)

Hello, 

I realize that this is an ancient topic, but this is one of the most relevant i could find. 

whenever i tried to playback movies with DTS on my Thomson UHD TV i get and error message "audio is not supported". 

Can anyone help me transcode only the audio part on the MKV from DTS to AC3 ? the video is playing OK 

I used to have miniDLNA but i moved to mediatomb and it works far better with my TV. 

I installed mediatomb on a CentOS headless embedded board with dual code intel atom 

Thanks


----------

