MT is ignoring my transcoding settings.

  • Jon

    Jon - 2011-12-15

    I am one of those people who hates to ask for help.  I'm usually able to solve almost any problem like this by googling, searching forums, etc, but I'm completely stumped.

    I'm trying to get MediaTomb to transcode an external URL so I can play it to a device that wouldn't normally support the stream type.  I've set the config file up for transcoding (see the file below) and added a new item as an external URL using my meta type (see below).  The result, no matter how much fiddling, tweaking, or testing I get is always the same.  MediaTomb completely ignores the transcoding settings and just passes on the URL directly to the player.  I wrote a UPNP library using perl that browses the contents of MediaTomb, so I'm positive it's outputting the original URL.  It also shows the direct URL when you click on the item in the MT web GUI.  I've turned the debug option on and looked through the logfile and there is nothing pertaining to transcoding at all.

    What I'm expecting to happen is this:

    Take the external URL of and mask it as something like this: (or whatever MT generates)

    just like all the other normal, playable files.  Then, once the request is received for that file, MT passes on the meta type I provided in the config file and pull the external URL and transcode it on the fly to the player.  Am I wrong about this?

    Here is my config file:

    <?xml version="1.0" encoding="UTF-8"?>
    <config version="2" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
        <ui enabled="yes" show-tooltips="yes">
          <accounts enabled="no" session-timeout="30">
            <account user="mediatomb" password="mediatomb"/>
        <storage caching="yes">
          <sqlite3 enabled="yes">
          <mysql enabled="no">
        <protocolInfo extend="no"/><!-- For PS3 support change to "yes" -->
        <custom-http-headers><!-- Samsung needs it -->
          <add header=" Streaming"/>
          <add header=" DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"/>
          <add header="Connection: close"/>
          <add header="ETag: 45114-22d484428-4b37c52c76c9d"/>
        <pc-directory upnp-hide="yes"/>
          <mark-played-items enabled="no" suppress-cds-updates="yes">
            <string mode="prepend">*</string>
          <lastfm enabled="no">
      <import hidden-files="no">
        <scripting script-charset="UTF-8">
          <virtual-layout type="js">
        <autoscan use-inotify="auto">
          <directory location="/usr/local/mh/media" mode="inotify" level="full" recursive="yes" hidden-files="no"/>
          <extension-mimetype ignore-unknown="yes">
            <map from="asf" to="video/x-ms-asf"/>
            <map from="asx" to="video/x-ms-asx"/>
            <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="mkv" to="video/x-mkv"/>
            <map from="m2ts" to="video/mpeg"/>
            <map from="avi" to="video/avi"/>
            <map from="mov" to="video/quicktime"/>
            <map from="flv" to="video/x-flv"/>
            <map from="audio/*" to="object.item.audioItem.musicTrack"/>
            <map from="video/*" to="object.item.videoItem"/>
            <map from="image/*" to="object.item.imageItem"/>
            <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="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/x-ms-asx" as="asx"/>
          <YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
            <favorites user="mediatomb"/>
            <standardfeed feed="most_viewed" time-range="today"/>
            <playlists user="mediatomb"/>
            <uploads user="mediatomb"/>
            <standardfeed feed="recently_featured" time-range="today"/>
      <transcoding enabled="yes">
          <transcode mimetype="video/x-flv" using="vlcmpeg"/>
          <transcode mimetype="application/ogg" using="vlcmpeg"/>
          <transcode mimetype="application/ogg" using="oggflac2raw"/>
          <transcode mimetype="audio/x-flac" using="oggflac2raw"/>
          <transcode mimetype="video/x-ms-asx" using="vlcmpeg"/>
          <transcode mimetype="video/transcode" using="vlcmpeg"/>
          <profile name="oggflac2raw" enabled="no" type="external">
            <agent command="ogg123" arguments="-d raw -f %out %in"/>
            <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
          <profile name="vlcmpeg" enabled="yes" type="external">
            <agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
            <buffer size="14400000" chunk-size="512000" fill-size="120000"/>

    My 'mediatomb -compile-info' output is:

    MediaTomb UPnP Server version 0.12.1 -
    Copyright 2005-2010 Gena Batsyan, Sergey Bostandzhyan, Leonhard Wimmer.
    MediaTomb is free software, covered by the GNU General Public License version 2
    Compile info:
            host:                   i386-redhat-linux-gnu
            sqlite3:                yes
            mysql:                  yes
            libjs:                  yes
            libmagic:               yes
            inotify:                yes
            libexif:                yes
            id3lib:                 disabled
            taglib:                 yes
            ffmpeg                  missing
            libmp4v2:               yes
            external transcoding:   yes
            curl:                   yes
            YouTube:                yes
            libextractor            disabled
            db-autocreate:          yes
            debug log:              yes
            protocol info extension:yes
            ffmpegthumbnailer:      missing
            lastfmlib:              yes
            data directory:         /usr/share/mediatomb

    My External URL item is setup as follows:

    Type: External Link (URL)
    Title: MyFile
    Protocol: http-get
    Class: object.item.videoItem
    Description: *blank*
    Mimetype: video/transcode

    Thank you all so much for your help. 

  • Jin

    Jin - 2011-12-15

    Change this <hide-original-resource>no</hide-original-resource> to yes in your profile, I think that should do it. And btw, I suggest to not reinvent the wheel and have a look at gupnp tools which are very useful for debugging UPnP related problems.

    Kind regards,


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks