LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-17-2012, 03:01 AM   #1
Eeel
Member
 
Registered: Feb 2012
Location: EU
Distribution: Slackware 15 and current
Posts: 94

Rep: Reputation: Disabled
Need help with Mediatomb SVN Trunk and Apple Trailer


Hi,

I have compilled the last SVN Trunk of Mediatomb on Slackware 13.37 with a little modification in /src/atrailers_content_handler.cc line 143 to correct a change on trailers adresse:

Code:
temp = temp.replace(_("movies"), _("www"));
Code:
temp = temp.replace(_("movies"), _("movies"));
The Mediatomb config.xml is configured to transcode in external mode with a bash script to use a user-agent Quicktime required by apple.com to deliver the trailer:

Code:
<?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>
Bash script:
Code:
#!/bin/bash
INPUT="$1"
OUTPUT="$2"
VIDEO_CODEC="mpeg2video"
VIDEO_BITRATE="4096k"
AUDIO_CODEC="mp2"
AUDIO_BITRATE="192k"
AUDIO_SAMPLERATE="48000"
AUDIO_CHANNELS="2"
FORMAT="dvd"

if [[ -n "$(echo ${INPUT} | grep ^http://trailers.apple.com)" ]]; then
wget --quiet -U 'QuickTime/7.7.1' ${INPUT} -O ${OUTPUT} &> /dev/null
#wget --quiet -U 'QuickTime/7.7.1' ${INPUT} -O - | ffmpeg -y -threads 2 -i - -acodec ac3 -ab 192000 -vcodec mpeg2video -vb 4096000 -f dvd ${OUTPUT} &> /dev/null
else
# Allow freebox V6 to read .mov
ffmpeg -threads 2 -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
-acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} -ac ${AUDIO_CHANNELS} \
-f ${FORMAT} - > "${OUTPUT}" 2>/dev/null
fi
Trailer just start fine but it stop before end, here is the log of one trailer read:
Code:
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
Trailer stop as soon as the /tmp/mt_transcode_P3KG9V is closed/deleted from the /tmp and player say Unknown Format File

I don't have any idear where to continue to search and help would be very appreciated.

Regards.

Last edited by Eeel; 02-24-2012 at 03:00 AM.
 
Old 02-24-2012, 03:05 AM   #2
Eeel
Member
 
Registered: Feb 2012
Location: EU
Distribution: Slackware 15 and current
Posts: 94

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
copy svn working dir without svn hidden dirs and files? erinspice Linux - Software 4 03-29-2011 05:58 PM
Svn client on FC10: remote SVN server update errs: timed out waiting for srvr ... Amol Tupe Linux - Software 0 10-01-2010 03:25 AM
ok I'm trying to compile gcc from the svn trunk and I get this error grizzlysmit Ubuntu 2 09-24-2010 08:34 AM
To Trunk or not to Trunk... kernel version craziness Seemoi Debian 7 04-09-2010 03:30 PM
Locking a sub directory in Trunk of SVN Guptarulz Linux - Desktop 1 11-25-2009 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration