Code: Select all
<?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="no" session-timeout="30">
<account user="mediatomb" password="#######"/>
</accounts>
</ui>
<name>Lyalls Media</name>
<udn>uuid:####</udn>
<home>/var/lib/mediatomb</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="no">
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled="yes">
<host>localhost</host>
<database>mediatomb</database>
<username>#######</username>
<password>#######</password>
</mysql>
</storage>
<protocolInfo extend="yes"/>
</server>
<import hidden-files="no">
<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>
<mappings>
<extension-mimetype ignore-unknown="no">
<map from="mp3" to="audio/mpeg"/>
<map from="m4a" to="audio/mp4a-latm"/>
<map from="m4v" to="video/x-m4v"/>
<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="avi" to="video/divx"/>
</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="audio/m4a-latm" as="m4a"/>
<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/divx" as="avi"/>
</mimetype-contenttype>
</mappings>
</import>
<transcoding enabled="yes">
<mimetype-profile-mappings>
<transcode mimetype="application/ogg" using="audio2pcm"/>
<transcode mimetype="application/ogg" using="video2mpeg"/>
<transcode mimetype="audio/x-flac" using="audio2pcm"/>
<transcode mimetype="audio/m4a-latm" using="audio2pcm"/>
<transcode mimetype="video/x-flv" using="video2mpeg"/>
<transcode mimetype="video/quicktime" using="video2mpeg"/>
<transcode mimetype="video/x-flv" using="video2jpeg"/>
<transcode mimetype="video/quicktime" using="video2jpeg"/>
<transcode mimetype="video/divx" using="video2jpeg"/>
<transcode mimetype="video/x-ms-asf" using="video2jpeg"/>
<transcode mimetype="video/x-ms-wmf" using="video2jpeg"/>
</mimetype-profile-mappings>
<profiles>
<profile name="audio2pcm" enabled="yes" type="external">
<mimetype>audio/L16</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/local/bin/mediatomb-audio2pcm.sh" arguments="%in %out"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="video2mpeg" enabled="yes" type="external">
<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/local/bin/mediatomb-video2mpeg.sh" arguments="%in %out"/>
<buffer size="10485760" chunk-size="262144" fill-size="524288"/>
</profile>
<profile name="video2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<thumbnail>yes</thumbnail>
<resolution>160x160</resolution>
<agent command="ffmpegthumbnailer" arguments="-i %in -o %out -s 160"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
</profiles>
</transcoding>
</config>
Code: Select all
<map from="m4a" to="audio/mp4"/>
<map from="m4v" to="video/mp4"/>Code: Select all
<transcode mimetype="audio/m4a-latm" using="audio2pcm"/>Code: Select all
<treat mimetype="audio/m4a-latm" as="m4a"/Code: Select all
#!/bin/bash
action="$1"
shift
in="$1"
shift
out="$1"
if [ "${action}" = "pic" ]
then
dcraw -c -e "$in" "${out}"
else
dcraw -c -e "$in" | convert - -geometry 160x160 "${out}"
fi
Code: Select all
#!/bin/bash
VLC_PATH="/usr/bin/vlc"
INPUT="$1"
OUTPUT="$2"
AUDIO_CODEC="s16b"
AUDIO_BITRATE="192"
AUDIO_SAMPLERATE="44100"
AUDIO_CHANNELS="2"
FORMAT="raw"
exec "${VLC_PATH}" "${INPUT}" -I dummy --sout="#transcode{acodec=${AUDIO_CODEC},\
ab=${AUDIO_BITRATE},samplerate=${AUDIO_SAMPLERATE},channels=${AUDIO_CHANNELS}}:\
standard{access=file,mux=${FORMAT},dst=${OUTPUT}}" vlc://quit
Code: Select all
#!/bin/bash
VLC_PATH="/usr/bin/vlc"
INPUT="$1"
OUTPUT="$2"
VIDEO_CODEC="mp2v"
VIDEO_BITRATE="4096"
VIDEO_FRAMERATE="25"
AUDIO_CODEC="mpga"
AUDIO_BITRATE="192"
AUDIO_SAMPLERATE="48000"
AUDIO_CHANNELS="2"
FORMAT="ps"
exec "${VLC_PATH}" "${INPUT}" -I dummy --sout="#transcode{vcodec=${VIDEO_CODEC},\
vb=${VIDEO_BITRATE},fps=${VIDEO_FRAMERATE},acodec=${AUDIO_CODEC},ab=${AUDIO_BITRATE},\
samplerate=${AUDIO_SAMPLERATE},channels=${AUDIO_CHANNELS},audio-sync,soverlay}:\
standard{access=file,mux=${FORMAT},dst=${OUTPUT}}" vlc://quit
Code: Select all
<?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="no" session-timeout="30">
<account user="####" password="####"/>
</accounts>
</ui>
<name>Lyalls Media</name>
<udn>uuid:####</udn>
<home>/var/lib/mediatomb</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="no">
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled="yes">
<host>localhost</host>
<database>####</database>
<username>####</username>
<password>####</password>
</mysql>
</storage>
<protocolInfo extend="yes"/>
</server>
<import hidden-files="no">
<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>
<mappings>
<extension-mimetype ignore-unknown="no">
<map from="mp3" to="audio/mpeg"/>
<map from="m4a" to="audio/mp4"/>
<map from="m4v" to="video/mp4"/>
<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="avi" to="video/divx"/>
</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/divx" as="avi"/>
</mimetype-contenttype>
</mappings>
</import>
<transcoding enabled="yes">
<mimetype-profile-mappings>
<transcode mimetype="application/ogg" using="audio2pcm"/>
<transcode mimetype="application/ogg" using="video2mpeg"/>
<transcode mimetype="audio/x-flac" using="audio2pcm"/>
<transcode mimetype="video/x-flv" using="video2mpeg"/>
<transcode mimetype="video/quicktime" using="video2mpeg"/>
<transcode mimetype="video/x-flv" using="video2jpeg"/>
<transcode mimetype="video/quicktime" using="video2jpeg"/>
<transcode mimetype="video/divx" using="video2jpeg"/>
<transcode mimetype="video/x-ms-asf" using="video2jpeg"/>
<transcode mimetype="video/x-ms-wmf" using="video2jpeg"/>
<transcode mimetype="image/tiff" using="tiff2jpeg"/>
</mimetype-profile-mappings>
<profiles>
<profile name="audio2pcm" enabled="yes" type="external">
<mimetype>audio/L16</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/local/bin/mediatomb-audio2pcm.sh" arguments="%in %out"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="video2mpeg" enabled="yes" type="external">
<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/local/bin/mediatomb-video2mpeg.sh" arguments="%in %out"/>
<buffer size="10485760" chunk-size="262144" fill-size="524288"/>
</profile>
<profile name="video2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<thumbnail>yes</thumbnail>
<resolution>160x160</resolution>
<agent command="ffmpegthumbnailer" arguments="-i %in -o %out -s 160"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
<profile name="tiff2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<hide-original-resource>yes</hide-original-resource>
<resolution>800x600</resolution>
<agent command="/usr/local/bin/mediatomb-tiff2jpeg.sh" arguments="pic %in %out"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
<profile name="tiff2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<hide-original-resource>yes</hide-original-resource>
<thumbnail>yes</thumbnail>
<resolution>160x160</resolution>
<agent command="/usr/local/bin/mediatomb-tiff2jpeg.sh" arguments="thumb %in %out"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
</profiles>
</transcoding>
</config>
Code: Select all
<pc-directory upnp-hide="no"/>
<extended-runtime-options>
<ffmpegthumbnailer enabled="yes">
<thumbnail-size>160</thumbnail-size>
<seek-percentage>10</seek-percentage>
<filmstrip-overlay>no</filmstrip-overlay>
<workaround-bugs>no</workaround-bugs>
<image-quality>8</image-quality>
</ffmpegthumbnailer>
<mark-played-items enabled="no" suppress-cds-updates="yes">
<string mode="prepend">*</string>
</mark-played-items>
<lastfm enabled="no">
<username>username</username>
<password>password</password>
</lastfm>
</extended-runtime-options>
Code: Select all
<?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="no" session-timeout="30">
<account user="###" password="###"/>
</accounts>
</ui>
<name>Lyalls Media</name>
<udn>uuid:####</udn>
<home>/var/lib/mediatomb</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="no">
<database-file>mediatomb.db</database-file>
</sqlite3>
<mysql enabled="yes">
<host>localhost</host>
<database>###</database>
<username>###</username>
<password>###</password>
</mysql>
</storage>
<protocolInfo extend="yes"/>
<pc-directory upnp-hide="no"/>
<extended-runtime-options>
<ffmpegthumbnailer enabled="yes">
<thumbnail-size>160</thumbnail-size>
<seek-percentage>10</seek-percentage>
<filmstrip-overlay>no</filmstrip-overlay>
<workaround-bugs>no</workaround-bugs>
<image-quality>8</image-quality>
</ffmpegthumbnailer>
<mark-played-items enabled="no" suppress-cds-updates="yes">
<string mode="prepend">*</string>
</mark-played-items>
<lastfm enabled="no">
<username>username</username>
<password>password</password>
</lastfm>
</extended-runtime-options> </server>
<import hidden-files="no">
<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>
<mappings>
<extension-mimetype ignore-unknown="no">
<map from="mp3" to="audio/mpeg"/>
<map from="m4a" to="audio/mp4"/>
<map from="m4v" to="video/mp4"/>
<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="avi" to="video/divx"/>
</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/divx" as="avi"/>
</mimetype-contenttype>
</mappings>
</import>
<transcoding enabled="yes">
<mimetype-profile-mappings>
<transcode mimetype="application/ogg" using="audio2pcm"/>
<transcode mimetype="application/ogg" using="video2mpeg"/>
<transcode mimetype="audio/x-flac" using="audio2pcm"/>
<transcode mimetype="video/x-flv" using="video2mpeg"/>
<transcode mimetype="video/quicktime" using="video2mpeg"/>
<transcode mimetype="video/x-flv" using="video2jpeg"/>
<transcode mimetype="video/quicktime" using="video2jpeg"/>
<transcode mimetype="video/divx" using="video2jpeg"/>
<transcode mimetype="video/x-ms-asf" using="video2jpeg"/>
<transcode mimetype="video/x-ms-wmf" using="video2jpeg"/>
<transcode mimetype="image/tiff" using="tiff2jpeg"/>
</mimetype-profile-mappings>
<profiles>
<profile name="audio2pcm" enabled="yes" type="external">
<mimetype>audio/L16</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/local/bin/mediatomb-audio2pcm.sh" arguments="%in %out"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="video2mpeg" enabled="yes" type="external">
<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/local/bin/mediatomb-video2mpeg.sh" arguments="%in %out"/>
<buffer size="10485760" chunk-size="262144" fill-size="524288"/>
</profile>
<!--
<profile name="video2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<thumbnail>yes</thumbnail>
<resolution>160x160</resolution>
<agent command="ffmpegthumbnailer" arguments="-i %in -o %out -s 160"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
-->
<profile name="tiff2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<hide-original-resource>yes</hide-original-resource>
<resolution>800x600</resolution>
<agent command="/usr/local/bin/mediatomb-tiff2jpeg.sh" arguments="pic %in %out"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
<profile name="tiff2jpeg" enabled="yes" type="external">
<mimetype>image/jpeg</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<hide-original-resource>yes</hide-original-resource>
<thumbnail>yes</thumbnail>
<resolution>160x160</resolution>
<agent command="/usr/local/bin/mediatomb-tiff2jpeg.sh" arguments="thumb %in %out"/>
<buffer size="524288" chunk-size="512" fill-size="1024"/>
</profile>
</profiles>
</transcoding>
</config>
You just forget to remove the info in the 0.11 section I added previously about SVN having the built in thumbnail suppport.lyallp wrote:I updated the MediaTomb wiki article to include my stuff. http://en.gentoo-wiki.com/wiki/MediaTomb
I see where I went wrong with regard to '>' - I must have accidentally left the '-c' in - it should not be in the 'pic' extract.BT wrote:
Thanks for your contribution. I tested your raw image config but it didn't work. It would lock the PS3 navigation and only a MediaTomb restart would unlock it. I replaced your config and script with known working ones that I helped create for Funtoo. It's much simpler and doesn't need ImageMagick. I tested with CR2 and NEF images and it worked perfectly.
Your mediatomb-tiff2jpeg.sh script also has some issues. Firstly, it's missing exec statements before the dcraw commands. Without them MediaTomb will have no way of killing the dcraw process which is launched for each image. If you check your process list you will probably have a bunch of them still running! Secondly, when dcraw is called for the "pic" action it fails because it's missing a redirect (>). This is probably why it never worked for me. You also don't need to generate thumbnails for images so the second tiff2jpeg profile is redundant.
Cool, will also do that when I get home.BT wrote: I also cleaned up the thumbnail section. Since the config for 0.12.0 comes with a thumbnail section, you don't need to add anything to the config. You just need to enable it.
Whilst I understand the sentiment, the problem with pastebin is it's temporary. The problem with personal sites, they also tend to be temporary.BT wrote: Another thing I want to mention is the "Complete Working Setup" section you posted. I think it's a good idea but it could be done better. The wiki will get bloated very quickly if users started posted their configs and scripts directly to the wiki. Maybe users should post their configs and scripts in pastebins or personal pages and link to them via the wiki?
Actually since dcraw doesn't support specifying an output file the complete command should be, exec dcraw -e -c "$in" > "${out}"lyallp wrote:I see where I went wrong with regard to '>' - I must have accidentally left the '-c' in - it should not be in the 'pic' extract.
No problem just leave it for now since yours is the only config posted so farlyallp wrote:Regardless, I will update the 'Complete Working Section' to reflect your input and should the Wiki Powers that be feel that the section is superfluous, then I am ok with that.
There is no point in doing this for 0.11.0 since 0.12.0 is scheduled to be released this month. The 0.12.0 SVN ebuild already has a "complete" config and almost everything should work after enabling the relevant sections. The 0.11.0 config is barebones which is why it needs lots for configuration to get going.lyallp wrote:Maybe I/we should contribute a patch to the MediaTomb ebuild to include all this sort of configuration, out of the box, some use flags come to mind, 'raw' (because of the requirement for dcraw), 'thumbnails' (requirement for ffmpegthumbnailer), 'aac' (requirement to transcode aac/m4a) - this way, the whole 'working config' section in the wiki becomes redundant.