<?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">
      <accounts enabled="yes" session-timeout="30">
        <account user="smunk" password="munk"/>
      </accounts>
    </ui>
    <name>MediaTomb</name>
    <udn>uuid:2795c4e6-3cd9-4c3b-89ee-8a0d6c972697</udn>
    <home>/var/lib/mediatomb</home>
    <webroot>/usr/share/mediatomb/web</webroot>
    <storage>
      <sqlite3 enabled="yes">
        <database-file>mediatomb.db</database-file>
      </sqlite3>
      <mysql enabled="no">
        <host>localhost</host>
        <database>mediatomb</database>
        <username>mediatomb</username>
        <password>mediatomb</password>
      </mysql>
    </storage>
    <protocolInfo extend="yes"/>
  </server>
  <import hidden-files="no">
    <filesystem-charset>UTF-8</filesystem-charset>
    <scripting script-charset="UTF-8">
      <common-script>/usr/share/mediatomb/js/common.js</common-script>
      <playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
      <virtual-layout type="builtin">
        <import-script>/usr/share/mediatomb/js/import.js</import-script>
      </virtual-layout>
    </scripting>

    <autoscan>
    </autoscan>

    <mappings>
      <extension-mimetype ignore-unknown="yes">
        <map from="avi" to="video/divx"/>
        <map from="divx" to="video/divx"/>
	<map from="mpg" to="video/mpeg"/>
	<map from="mpeg" to="video/mpeg"/>

        <map from="mp3" to="audio/mpeg"/>
        <map from="ogg" to="application/ogg"/>
        <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"/>
	
	<map from="jpg" to="image/jpeg" />
	<map from="jpeg" to="image/jpeg" />
	<map from="png" to="image/png" />
	<map from="svg" to="image/svg" />

	<map from="mkv" to="video/x-matroska"/>
	<map from="vob" to="video/iso"/>
	<map from="VOB" to="video/iso"/>
	<map from="iso" to="video/iso"/>
	<map from="ISO" to="video/iso"/>
	<map from="img" to="video/iso"/>
	<map from="IMG" to="video/iso"/>
      </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="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="video/divx" as="avi"/>
      </mimetype-contenttype>
    </mappings>
  </import>
  <transcoding enabled="yes">
	<mimetype-profile-mappings>
		<transcode mimetype="application/ogg" using="audio-common"/>
		<transcode mimetype="audio/x-flac" using="audio-common"/>

		<transcode mimetype="video/divx" using="video-thumbnail"/>

		<transcode mimetype="video/x-flv" using="video-common"/>
		<transcode mimetype="application/ogg" using="video-common"/>

		<transcode mimetype="video/x-matroska" using="video-common"/>
		<transcode mimetype="video/iso" using="video-iso"/>
	</mimetype-profile-mappings>
	<profiles>
		<profile name="video-thumbnail" enabled="yes" type="external">
			<mimetype>image/jpeg</mimetype>
			<accept-url>yes</accept-url>
			<thumbnail>yes</thumbnail>
			<resolution>128x128</resolution>
			<agent command="/usr/bin/ffmpegthumbnailer" arguments="-i %in -o %out -s 128"/>
			<buffer size="524288" chunk-size="512" fill-size="1024"/>
		</profile>

		<profile name="audio-common" enabled="yes" type="external">
			<mimetype>audio/x-wav</mimetype>
			<accept-url>yes</accept-url>
			<first-resource>yes</first-resource>
			<hide-original-resource>yes</hide-original-resource>
			<accept-ogg-theora>no</accept-ogg-theora>
			<agent command="/usr/bin/mediatomb-transcode-audio" arguments="%in %out"/>
			<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
		</profile>

		<profile name="video-common" enabled="yes" type="external">
			<avi-fourcc-list mode="ignore">
				<fourcc>DX50</fourcc>
				<fourcc>DM4V</fourcc>
				<fourcc>M4S2</fourcc>
			</avi-fourcc-list>
			<mimetype>video/mpeg</mimetype>
			<accept-url>yes</accept-url>
			<first-resource>yes</first-resource>
			<hide-original-resource>yes</hide-original-resource>
			<accept-ogg-theora>yes</accept-ogg-theora>
			<agent command="/usr/bin/mediatomb-transcode-video" arguments="%in %out"/>
			<buffer size="1048576" chunk-size="26214" fill-size="52428" />
		</profile>

		<profile name="video-iso" enabled="yes" type="external">
			<mimetype>video/mpeg</mimetype>
			<first-resource>yes</first-resource>
			<hide-original-resource>yes</hide-original-resource>
			<accept-ogg-theora>yes</accept-ogg-theora>
			<agent command="/usr/bin/mediatomb-transcode-video-iso" arguments="%in %out"/>
			<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
		</profile>
	</profiles>
</transcoding>

</config>
