Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Working Apple Trailer 2012 ?

Help
Eel
2012-02-11
2013-05-30
  • Eel
    Eel
    2012-02-11

    Hi,
    I've been reading many post about apple trailer without being able to do more than just browse the trailer list, is it still working ? i use SVN Trunk.

    regards.

     
  • Eel
    Eel
    2012-02-16

    Hi,

    Apple trailer need a little fix in /src/atrailers_content_handler.cc line 143
               

    temp = temp.replace(_("movies"), _("www"));
    

    should be
              

     temp = temp.replace(_("movies"), _("movies"));
    

    Trailer start normally but it stop before the end of the video, here is a log example for ONE trailer, TWO mt_trancode_XXXX files are created successively, as soon as the first mt_trancode fle is deleted trailer stop and the second mt_transcode file is created then deleted very quickly.

    2012-02-14 21:24:12   DEBUG: [../src/server.cc:423] upnp_callback(): returning 0
    2012-02-14 21:24:33   DEBUG: [../src/web_callbacks.cc:72] create_request_handler(): Filename: /content/online/object_id/2417/res_id/none/pr_name/video-generic/tr/1, Path: (null)
    2012-02-14 21:24:33   DEBUG: [../src/url_request_handler.cc:182] open(): start
    2012-02-14 21:24:33   DEBUG: [../src/url_request_handler.cc:195] open(): full url (filename): /content/online/object_id/2417/res_id/none/pr_name/video-generic/tr/1, parameters: object_id/2417/res_id/none/pr_name/video-generic/tr/1
    2012-02-14 21:24:33   DEBUG: [../src/url_request_handler.cc:231] open(): Online content url: http://trailers.apple.com/movies/wb/thehobbit1/thehobbit-tlr1_a720p.m4v
    2012-02-14 21:24:33   DEBUG: [../src/transcoding/transcode_ext_handler.cc:90] open(): start
    2012-02-14 21:24:33   DEBUG: [../src/tools.cc:1056] normalizePath(): Normalizing path: /tmp//mt_transcode_P3KG9V
    2012-02-14 21:24:33   DEBUG: [../src/transcoding/transcode_ext_handler.cc:322] open(): creating fifo: /tmp/mt_transcode_P3KG9V
    2012-02-14 21:24:33    INFO: Arguments: %in %out
    2012-02-14 21:24:33   DEBUG: [../src/process_executor.cc:77] ProcessExecutor(): Launched process /usr/bin/mediatomb-video-generic, pid: 3556
    2012-02-14 21:24:33   DEBUG: [../src/process_executor.cc:71] ProcessExecutor(): Launching process: /usr/bin/mediatomb-video-generic
    2012-02-14 21:24:33   DEBUG: [../src/io_handler_buffer_helper.cc:224] staticThreadProc(): starting buffer thread... thread: -1322333328
    2012-02-14 21:26:41   DEBUG: [../src/io_handler_buffer_helper.cc:227] staticThreadProc(): buffer thread shut down. thread: -1322333328
    2012-02-14 21:26:42   DEBUG: [../src/process_io_handler.cc:438] close(): terminating process, closing /tmp/mt_transcode_P3KG9V
    2012-02-14 21:26:42   DEBUG: [../src/process_io_handler.cc:438] close(): terminating process, closing /tmp/mt_transcode_P3KG9V
    2012-02-14 21:26:43   DEBUG: [../src/web_callbacks.cc:72] create_request_handler(): Filename: /content/online/object_id/2417/res_id/none/pr_name/video-generic/tr/1, Path: (null)
    2012-02-14 21:26:43   DEBUG: [../src/url_request_handler.cc:182] open(): start
    2012-02-14 21:26:43   DEBUG: [../src/url_request_handler.cc:195] open(): full url (filename): /content/online/object_id/2417/res_id/none/pr_name/video-generic/tr/1, parameters: object_id/2417/res_id/none/pr_name/video-generic/tr/1
    2012-02-14 21:26:43   DEBUG: [../src/url_request_handler.cc:231] open(): Online content url: http://trailers.apple.com/movies/wb/thehobbit1/thehobbit-tlr1_a720p.m4v
    2012-02-14 21:26:43   DEBUG: [../src/transcoding/transcode_ext_handler.cc:90] open(): start
    2012-02-14 21:26:43   DEBUG: [../src/tools.cc:1056] normalizePath(): Normalizing path: /tmp//mt_transcode_GYZQ9V
    2012-02-14 21:26:43   DEBUG: [../src/transcoding/transcode_ext_handler.cc:322] open(): creating fifo: /tmp/mt_transcode_GYZQ9V
    2012-02-14 21:26:43    INFO: Arguments: %in %out
    2012-02-14 21:26:43   DEBUG: [../src/process_executor.cc:77] ProcessExecutor(): Launched process /usr/bin/mediatomb-video-generic, pid: 3563
    2012-02-14 21:26:43   DEBUG: [../src/process_executor.cc:71] ProcessExecutor(): Launching process: /usr/bin/mediatomb-video-generic
    2012-02-14 21:26:43   DEBUG: [../src/io_handler_buffer_helper.cc:224] staticThreadProc(): starting buffer thread... thread: -1322333328
    2012-02-14 21:26:43   DEBUG: [../src/io_handler_buffer_helper.cc:227] staticThreadProc(): buffer thread shut down. thread: -1322333328
    2012-02-14 21:26:43   DEBUG: [../src/process_io_handler.cc:438] close(): terminating process, closing /tmp/mt_transcode_GYZQ9V
    2012-02-14 21:26:43   DEBUG: [../src/process.cc:151] kill_proc(): KILLING TERM PID: 3563
    2012-02-14 21:26:44   DEBUG: [../src/process.cc:160] kill_proc(): KILLING INT PID: 3563
    2012-02-14 21:26:45   DEBUG: [../src/process.cc:169] kill_proc(): KILLING KILL PID: 3563
    2012-02-14 21:26:46   DEBUG: [../src/process_io_handler.cc:438] close(): terminating process, closing /tmp/mt_transcode_GYZQ9V
    

    bash script for external transcode

    if [[ -n "$(echo ${INPUT} | grep ^http://trailers.apple.com)" ]]; then
    wget --quiet -U 'QuickTime/7.7.1' ${INPUT} -O ${OUTPUT} &> /dev/null
    fi
    

    config.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <config version="2" xmlns="http://mediatomb.cc/config/2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://mediatomb.cc/config/2 http://mediatomb.cc/config/2.xsd">
      <server>
        <ui enabled="yes" show-tooltips="yes">
          <accounts enabled="no" session-timeout="30">
            <account user="mediatomb" password="mediatomb"/>
          </accounts>
        </ui>
        <pc-directory upnp-hide="yes" />
        <name>PC</name>
        <udn>uuid:e71ec8ae-531e-47c7-8e7f-2c136d5e477a</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>
            <username>mediatomb</username>
            <database>mediatomb</database>
          </mysql>
        </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>
        -->
          <extended-runtime-options>
          <ffmpegthumbnailer enabled="no">
            <thumbnail-size>128</thumbnail-size>
            <seek-percentage>5</seek-percentage>
            <filmstrip-overlay>yes</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>
              <content>video</content>
            </mark>
          </mark-played-items>
          <lastfm enabled="no">
            <username>lastfmuser</username>
            <password>lastfmpass</password>
          </lastfm>
        </extended-runtime-options>
      </server>
      <import hidden-files="no">
        <filesystem-charset>iso-8859-1</filesystem-charset>
        <metadata-charset>iso-8859-1</metadata-charset>
        <playlist-charset>iso-8859-1</playlist-charset>
        <scripting script-charset="iso-8859-1">
          <common-script>/usr/share/mediatomb/js/common.js</common-script>
          <playlist-script>/usr/share/mediatomb/js/playlists.js</playlist-script>
          <virtual-layout type="js">
            <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="ogx" to="application/ogg"/>
            <map from="ogv" to="video/ogg"/>
            <map from="oga" to="audio/ogg"/>
            <map from="ogg" to="audio/ogg"/>
            <map from="ogm" to="video/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="mkv" to="video/x-matroska"/>
            <map from="mka" to="audio/x-matroska"/>
    <!--    <map from="mov" to="video/quicktime"/>-->
    <!--    <map from="mov" to="video/x-quicktime"/>-->
    <!--    <map from="m4v" to="video/x-quicktime"/>-->
        <map from="m4v" to="video/quicktime"/>
            <!-- 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="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="application/x-iso9660" as="dvd"/>
            <treat mimetype="application/x-iso9660-image" as="dvd"/>
    <!--    <treat mimetype="video/quicktime" as="mov"/>
            <treat mimetype="video/x-quicktime" as="mov"/>-->
        <treat mimetype="video/quicktime" as="m4v"/>
    <!--        <treat mimetype="video/x-quicktime" as="m4v"/>-->
    </mimetype-contenttype>
        </mappings>
        <online-content>
          <AppleTrailers enabled="yes" refresh="43200" update-at-start="yes" resolution="720p"/>
    <!--      <YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">-->
    <!--      <YouTube enabled="no" format="mp4" hd="no" refresh="28800" update-at-start="yes" purge-after="604800" racy-content="exclude">
        <favorites user="mediatomb"/>
            <standardfeed feed="most_viewed" time-range="today"/>
            <playlists user="mediatomb"/>
            <uploads user="mediatomb"/>
            <standardfeed feed="recently_featured" time-range="today"/>
          </YouTube>-->
        <YouTube enabled="no" refresh="28800" update-at-start="yes" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
        <favorites user="tarleebigood"/>
        <subscriptions user="tarleebigood"/>
        <standardfeed feed="top_rated" region_id="fr" time-range="today"/>
        <standardfeed feed="top_favorites" region_id="fr" time-range="today"/>
        <standardfeed feed="most_recent" region_id="fr" time-range="today"/>
        <standardfeed feed="most_viewed" region_id="fr" time-range="today"/>
        <standardfeed feed="most_discussed" region_id="fr" time-range="today"/>
        <standardfeed feed="most_linked" region_id="fr" time-range="today"/>
        <standardfeed feed="most_responded" region_id="fr" time-range="today"/>
        <standardfeed feed="recently_featured" region_id="fr" time-range="today"/>
    </YouTube> 
        </online-content>
      </import>
      <transcoding enabled="yes">
    <!--  <transcoding enabled="yes" fetch-buffer-size="262144" fetch-buffer-fill-size="16384">-->
        <mimetype-profile-mappings>
    <!--      <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"/>-->
    <!--    ajout    -->
    <!--      <transcode mimetype="video/x-ms-asf"    using="video-generic"/>
          <transcode mimetype="video/x-flv"       using="video-generic"/>
          <transcode mimetype="video/x-matroska"  using="video-generic"/>-->
    <!--      <transcode mimetype="video/x-quicktime" using="video-generic"/>-->
          <transcode mimetype="video/quicktime"   using="video-generic"/>
    <!--     ajout   -->
        </mimetype-profile-mappings>
        <profiles>
    <!--    ajout    -->
          <profile name="video-generic" 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>no</first-resource>
        <hide-original-resource>yes</hide-original-resource>
        <!--<accept-ogg-theora>yes</accept-ogg-theora>-->
        <agent command="/usr/bin/mediatomb-video-generic" arguments="%in %out"/>
        <buffer size="1048576" chunk-size="131072" fill-size="262144"/>
    <!--    <buffer size="28800000" chunk-size="512000" fill-size="120000"/>-->
    <!--    <buffer size="1048576" chunk-size="26214" fill-size="52428"/>-->
    <!--    <buffer size="57600000" chunk-size="2048000" fill-size="480000"/>-->
          </profile>
        </profiles>
      </transcoding>
    </config>
    

    Anyone who have same problem ? help appreciated ;-)

    O.S:Slackware 13.37

     
  • Eel
    Eel
    2012-02-16

    sorry, exact bash script is:

    1
    2
    3
    4
    5
    6
    #!/bin/bash
    INPUT="$1"
    OUTPUT="$2"
    if [[ -n "$(echo ${INPUT} | grep ^http://trailers.apple.com)" ]]; then
    wget --quiet -U 'QuickTime/7.7.1' ${INPUT} -O ${OUTPUT} &> /dev/null
    fi
    
     
  • Eel
    Eel
    2012-02-24

    I was using my Freebox Revolution (French ISP internet Box) to read trailers from Mediatomb, i have tested to read it with an Xbox 1 moded with XBMC installed and the trailer finish correctly i'm able to read all trailers normally, so bug come from my Freebox Revolution.

    The good news, my first post can be use to make apple trailers works again in Mediatomb SVN Trunk, with a know bug on some UPNP DLNA compatible players

    regards.

     

  • Anonymous
    2013-01-23

    1) is it still working at this time ? as on 2012 january 23rd ?

    2) I got the latest version of mediatomb src and the bug is still present in /src/atrailers_content_handler.cc line 143
    is this corrected in the trunk ?

     
  • Jin
    Jin
    2013-01-23

    This line has not been fixed yet, because there was no development going on for the last 3 years.

    Currently I moved from SVN to GIT and I am cleaning some things up so that the current version compiles on a recent distribution again.

    I'll have a look at the trailers too, but currently I am still busy porting the scripting part to the new SpiderMonkey 1.8.5 API.

    The hack with the user agent should work, the replace line (143) should be removed from the code.

     
  • Eel
    Eel
    2013-01-24

    Hi,

    Compile fine(SVN version, i didn't test the GIT version) on Slackware 14.0 with Slackbuild script done this two days ago for my new NAS =)

    regards.

     

  • Anonymous
    2013-01-24

    wow
    non development for 3 years now ?

    Is the project still alive or should I check some other solutions ?

     
  • Jin
    Jin
    2013-01-24

    SVN and git are currently the same, with the difference that git uses 0.12.1 as master head while trunk is in a somewhat unknown state.

    I am currently working on the git version to update it for new distributions (i.e. adapt to spidermonkey 1.8.5 API changes, ffmpeg API changes, etc.), the plan is to bring out a 0.12.2 soon that should be compatible with modern distros.

    The project is somewhat alive, let's say we are slowly picking it up again, depending on a few factors we might become more active real soon, but I won't promise anything at this point yet.

     

  • Anonymous
    2013-01-25

    Thanks a lot indeed. Mediatomb is not dead yet !