mediatomb transcoding to PS3
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004
    Posts
    1,186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mediatomb transcoding to PS3

    RESOLVED: Turns out it was a couple of things that I was able to monkey around with and finaly fix..

    1. vlc was transcoding with audio out of sync from the video so I used ffmpeg instead and audio/video matched
    2. put the full path to my script /usr/bin/mediatob-transcode-cideo) in the config.xml file
    3. had to tell mediatomb to transcode specific fourcc types:

    <avi-fourcc-list mode="process">
    <fourcc>DIV3</fourcc>
    <fourcc>DIV4</fourcc>
    <fourcc>XVID</fourcc>
    </avi-fourcc-list>

    and now I can play everything! cool! now if only I could get ffmpegthumbnailer to compile (>_<)

    I have been all over the net and this forum and there seem to be several different How-to's for getting mediatomb to transcode to a PS3, the problem is... none of them actually work!

    has anyone got a known to work 100% proven config.xml for mediatomb that is setup to transcode to a ps3? mine looks like this and its supposed to work, but does not transcode

    config.xml
    HTML Code:
    <?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="mediatomb"/>
          </accounts>
        </ui>
        <name>MediaTomb</name>
        <udn>uuid:755e93c3-aca0-4f2d-abfd-eb9c2f7cde02</udn>
        <home>/etc/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>
            <username>mediatomb</username>
            <database>mediatomb</database>
          </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="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"/>
            <!-- Uncomment the line below for PS3 divx support -->
    	<map from="avi" to="video/divx"/>
            <map from="divx" 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="video/divx" using="video-common"/>
        </mimetype-profile-mappings>
        
        <profiles>
          <profile name="video-common" 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="mediatomb-transcode-video" arguments="%in %out"/>
            <buffer size="10485760" chunk-size="262144" fill-size="524288"/>
    	<avi-fourcc-list mode="process"> 
    	<fourcc>DIV3</fourcc> 
    	</avi-fourcc-list>
          </profile>
        </profiles>
      </transcoding>
    </config>

    mediatomb-transcode-video
    HTML Code:
    #!/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="44100"
    AUDIO_CHANNELS="2"
    FORMAT="ps"
    SUBTITLE_LANGUAGE="eng"
    
    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},soverlay,audio-sync}:\
    standard{mux=${FORMAT},access=file,dst=${OUTPUT}}" --sub-language=${SUBTITLE_LANGUAGE} \
    vlc://quit
    Last edited by hiberphoptik; 30th December 2008 at 02:52 AM. Reason: RESOLVED

  2. #2
    rbarara Guest

    Does the transcode script change to accomodate ffmpeg

    Hi

    I am trying to get Mediatomb to transcode media for my PS3. Yours is the only post that suggests a solution that will work. How does the transcode script change to accomodate the ffmpeg - the one on your post still has vlc in it.

    Thanks

    Raj

  3. #3
    Join Date
    Apr 2004
    Posts
    1,186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rbarara
    Hi

    I am trying to get Mediatomb to transcode media for my PS3. Yours is the only post that suggests a solution that will work. How does the transcode script change to accomodate the ffmpeg - the one on your post still has vlc in it.

    Thanks

    Raj

    here is my 100% working setup:

    Code:
    <?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="mediatomb"/>
          </accounts>
        </ui>
        <name>MediaTomb</name>
        <udn>uuid:755e93c3-aca0-4f2d-abfd-eb9c2f7cde02</udn>
        <home>/etc/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>
            <username>mediatomb</username>
            <database>mediatomb</database>
          </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="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"/>
            <!-- Uncomment the line below for PS3 divx support -->
    	<map from="avi" to="video/divx"/>
            <map from="divx" 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="video/divx" using="video-common"/>
          <transcode mimetype="video/x-divx" using="video-thumbnail"/>
          <transcode mimetype="video/x-avi" using="video-thumbnail"/>
    
        </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="ffmpegthumbnailer" arguments="-i %in -o %out -s 128"/>
            <buffer size="524288" chunk-size="512" fill-size="1024"/>
          </profile>
    
          <profile name="video-common" 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/bin/mediatomb-transcode-video" arguments="%in %out"/>
            <buffer size="10485760" chunk-size="262144" fill-size="524288"/>
    	<avi-fourcc-list mode="process"> 
    	<fourcc>DIV3</fourcc> 
    	<fourcc>DIV4</fourcc> 
    	<fourcc>XVID</fourcc>
    	</avi-fourcc-list>
          </profile>
        </profiles>
      </transcoding>
    </config>


    mediatomb-transcode-video:

    Code:
    #!/bin/bash
    
    FFMPEG_PATH="/usr/bin/ffmpeg"
    INPUT="$1"
    OUTPUT="$2"
    VIDEO_CODEC="mpeg2video"
    VIDEO_BITRATE="4096k"
    VIDEO_FRAMERATE="25"
    AUDIO_CODEC="mp2"
    AUDIO_BITRATE="192k"
    AUDIO_SAMPLERATE="44100"
    AUDIO_CHANNELS="2"
    FORMAT="dvd"
    
    exec "${FFMPEG_PATH}" -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
    -r ${VIDEO_FRAMERATE} -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} \
    -ac ${AUDIO_CHANNELS} -f ${FORMAT} - > "${OUTPUT}"

  4. #4
    Join Date
    Jul 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: mediatomb transcoding to PS3

    Hello,


    I know this is an ancient topic but i just tried the script:

    #!/bin/bash

    FFMPEG_PATH="/usr/bin/ffmpeg"
    INPUT="$1"
    OUTPUT="$2"
    VIDEO_CODEC="mpeg2video"
    VIDEO_BITRATE="4096k"
    VIDEO_FRAMERATE="25"
    AUDIO_CODEC="mp2"
    AUDIO_BITRATE="192k"
    AUDIO_SAMPLERATE="44100"
    AUDIO_CHANNELS="2"
    FORMAT="dvd"

    exec "${FFMPEG_PATH}" -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
    -r ${VIDEO_FRAMERATE} -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} \
    -ac ${AUDIO_CHANNELS} -f ${FORMAT} - > "${OUTPUT}"


    And it works fine just my NAS has a Dual Core Intel Atom CPU which is too slow for the task.
    Another drawback of the script is that is transcodes all MKV files regardless if they have DTS audio or not.

    My TV can playback the video but not the DTS audio. So i want a script that will leave the video as it is and transcode only the DTS audio to AC3.

    Then i think the NAS will be able to cope with the load since it will transcode only the audio and not the video as well.

    Any ideas ?

    Thanks

Similar Threads

  1. Fedora + Mediatomb = PS3 video streaming
    By F-GT in forum Guides & Solutions (Not For Questions)
    Replies: 82
    Last Post: 23rd March 2011, 03:09 AM
  2. CentOS Mediatomb server
    By granade in forum Linux Chat
    Replies: 4
    Last Post: 23rd February 2010, 01:47 PM
  3. getting MediaTomb working for PS3 video streaming
    By TyraelOdium in forum Using Fedora
    Replies: 0
    Last Post: 8th August 2008, 02:40 AM
  4. Any mediatomb and Ps3 users out there.
    By sophosrex in forum Using Fedora
    Replies: 5
    Last Post: 12th February 2008, 05:01 PM
  5. transcoding 15 fps stream
    By raghu1111 in forum Using Fedora
    Replies: 1
    Last Post: 29th July 2005, 07:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •