New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

subtitle support for mediatomb (Samsung series 7 TV)

Got problems with your B2 or B3? Share and get helped!
Post Reply
nick85
Posts: 10
Joined: 25 Jul 2011, 10:46

subtitle support for mediatomb (Samsung series 7 TV)

Post by nick85 »

Hi,

I am not able to get subtitles to work using Mediatomb on my Bubba3 server.
Streaming the avi, mkv, mpeg and wmv videos works great - but it is not possible to get the srt support.

Of course the srt files are named exactly as the video files.

I have been running Serviio DLNA server earlier on Ubuntu, and that worked great for my Samsung TV.

Any ideas on how to get support for srt files for Mediatomb?


Thanks
nick85
Posts: 10
Joined: 25 Jul 2011, 10:46

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by nick85 »

Okay after a few days of working on this issue I have finally solved it, and I believe it is a good idea to reply to my own post just for future reference for other people.

This is what I did to get subtitle support for Mediatomb and Samsung TV-sets.

Step 1: Uninstall everything that has to do with Mediatomb if it is installed.
Step 2: Compiled mediatomb from source with subtitle patch:

Get mediatomb source from subversion:
Then generate the configure script by running autotools:
cd mediatomb
autoreconf -i
Then, you can get the patch file from Marcin's post: https://sourceforge.net/tracker/?func=d ... tid=715782

While in the mediatomb directory, run the following command to apply the patch:
patch -p0 -i <path-to-patch>
If there are no errors, you can configure the project and build it:
./configure
make && sudo make install
Finally, edit the config.xml file to enable the Samsung subtitle support (see the comments in Marcin's post for more info):
<protocolInfo extend="yes" samsung-hack="yes"/>

Step 3: Edit the config.xml file with additional information so that our files will be encoded correctly for Samsung TV. I have copied my config.xml file down here, and highlighted the important stuff.
<?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>
<name>Bubba Server</name>
<interface>eth1</interface>
<port>49150</port>
<manufacturerURL>http://www.excito.com/</manufacturerURL>
<modelname>BUBBA|3</modelname>
<modelnumber>1.0.0</modelnumber>
<udn>uuid:d47de824-9e92-49b8-906c-b38e14b1bad5</udn>
<home>/home/nick/.mediatomb</home>
<webroot>/usr/local/share/mediatomb/web</webroot>

<autoscan>
<directory location="/home/storage/video" mode="inotify" recursive="yes" hidden-files="no"/>
<directory location="/home/storage/music" mode="inotify" recursive="yes" hidden-files="no"/>
<directory location="/home/storage/pictures" mode="inotify" recursive="yes" hidden-files="no"/>
</autoscan>

<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>

<!-- Enable extended protocolInfo and samsung-hack -->
<protocolInfo extend="yes" samsung-hack="yes"/>

<!-- Use these http-headers for Samsung to recognize the correct headers -->
<custom-http-headers>
<add header="transferMode.dlna.org: Streaming"/>
<add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=017000 00000000000000000000000000"/>
</custom-http-headers>



<!-- Uncomment the line below if you have a Telegent TG100 -->
<!--
<upnp-string-limit>101</upnp-string-limit>
-->
<extended-runtime-options>
<ffmpegthumbnailer enabled="yes">
<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>
</extended-runtime-options>
</server>
<import hidden-files="no">
<scripting script-charset="UTF-8">
<common-script>/usr/local/share/mediatomb/js/common.js</common-script>
<playlist-script>/usr/local/share/mediatomb/js/playlists.js</playlist-script>
<virtual-layout type="builtin">
<import-script>/usr/local/share/mediatomb/js/import.js</import-script>
<dvd-script>/usr/local/share/mediatomb/js/import-dvd.js</dvd-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"/>

<!-- Comment this or simply delete it from your config file -->
<!--<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"/>

<!-- Comment this, or simply delete it from your config file -->
<!--<map from="mkv" to="video/x-matroska"/>-->

<map from="mka" to="audio/x-matroska"/>
<!-- 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"/> -->


<map from="avi" to="video/mpeg"/>
<map from="mkv" to="video/mpeg"/>
<map from="wmv" to="video/mpeg"/>

</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"/>
</mimetype-contenttype>
</mappings>
<online-content>
<YouTube enabled="no" refresh="28800" update-at-start="no" purge-after="604800" racy-content="exclude" format="mp4" hd="no">
<favorites user="mediatomb"/>
<standardfeed feed="most_viewed" time-range="today"/>
<playlists user="mediatomb"/>
<uploads user="mediatomb"/>
<standardfeed feed="recently_featured" time-range="today"/>
</YouTube>
<Weborama enabled="no" refresh="28800" update-at-start="no">
<playlist name="Active" type="playlist" mood="active"/>
<playlist name="Metal" type="playlist">
<filter>
<genres>metal</genres>
</filter>
</playlist>
</Weborama>
<AppleTrailers enabled="no" refresh="43200" update-at-start="no" resolution="640"/>
</online-content>
</import>
<transcoding enabled="no">
<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"/>
</mimetype-profile-mappings>
<profiles>
<profile name="oggflac2raw" enabled="no" type="external">
<mimetype>audio/L16</mimetype>
<accept-url>no</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>no</accept-ogg-theora>
<agent command="ogg123" arguments="-d raw -o byteorder:big -f %out %in"/>
<buffer size="1048576" chunk-size="131072" fill-size="262144"/>
</profile>
<profile name="vlcmpeg" enabled="no" type="external">
<mimetype>video/mpeg</mimetype>
<accept-url>yes</accept-url>
<first-resource>yes</first-resource>
<accept-ogg-theora>yes</accept-ogg-theora>
<agent command="vlc" arguments="-I dummy %in --sout #transcode{venc=ffmpeg,vcodec=mp2v,vb=4096,fps=25,aenc=ffmpeg,acodec=mpga,ab=192,samplerate=44100,channels=2}:standard{access=file,mux=ps,dst=%out} vlc:quit"/>
<buffer size="14400000" chunk-size="512000" fill-size="120000"/>
</profile>
</profiles>
</transcoding>
</config>

Then just start mediatomb and connect to it on your Samsung TV. You will now have srt support, and video files such as avi, mkv, mpeg will work (together with support for MP3 and pictures).
Raptor21
Posts: 3
Joined: 31 Aug 2011, 10:01

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by Raptor21 »

When I try to recompile mediatomb on my wireless Asus router, I get the folowing error

uname -a
Linux 2.4.20 #18 Sun Mar 30 13:13:29 MSD 2008 mips GNU/Linux

autoreconf -i

Use of uninitialized value in split at /opt/lib/perl5/5.8.8/mipsel-linux/DynaLoader.pm line 80.
/opt/share/automake-1.11/Automake/ChannelDefs.pm line 23:

This Perl hasn't been configured and built properly for the threads
module to work. (The 'useithreads' configuration option hasn't been used.)

Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module. (In other words, threaded and non-threaded Perls
are binary incompatible.)

If you want to the use the threads module, please contact the people
who built your Perl.

Cannot continue, aborting.
BEGIN failed--compilation aborted at /opt/lib/perl5/5.8.8/mipsel-linux/threads.pm line 28.
Compilation failed in require at /opt/share/automake-1.11/Automake/ChannelDefs.pm line 23.
BEGIN failed--compilation aborted at /opt/share/automake-1.11/Automake/ChannelDefs.pm line 26.
Compilation failed in require at /opt/share/automake-1.11/Automake/Configure_ac.pm line 26.
BEGIN failed--compilation aborted at /opt/share/automake-1.11/Automake/Configure_ac.pm line 26.
Compilation failed in require at /opt/bin/aclocal line 39.
BEGIN failed--compilation aborted at /opt/bin/aclocal line 39.
autoreconf: aclocal failed with exit status: 255

The patch is working fine, but no configure script is generated.

patch -p0 -i samsung_video_subtitles.patch
patching file src/config_manager.cc
patching file src/common.h
patching file src/config_manager.h
patching file src/cds_resource_manager.cc
patching file src/file_request_handler.cc
patching file src/upnp_cds_actions.cc
patching file src/upnp_xml.cc
patching file src/upnp_xml.h
DanielM
Posts: 637
Joined: 28 Mar 2008, 06:37
Location: Sweden

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by DanielM »

Raptor21 wrote:When I try to recompile mediatomb on my wireless Asus router, I get the folowing error
Sorry for asking, but is this in any way related to Bubba?

/Daniel
Raptor21
Posts: 3
Joined: 31 Aug 2011, 10:01

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by Raptor21 »

No. Is related to subtitles offered by mediatomb to a Samsung TV/Home theater system.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by Ubi »

But your problem is different. You are running an embedded MIPS linux, and bubba is not. Your issue seems to arise from specific problems with your edition of Perl and/or other software. Using Bubba as a reference, having a different architecture and a different Perl version, will probably do you more harm than good.
Raptor21
Posts: 3
Joined: 31 Aug 2011, 10:01

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by Raptor21 »

Yes, I know, but I think it is possible he knows about MIPS linux architecture also. The mediacomb was compiled for MIPS linux with that version of Perl and mediacomb works fine. I would like to can see the subtitles on my Samsung, as the topic of this thread.
maniootek
Posts: 1
Joined: 06 May 2014, 17:31

Re: subtitle support for mediatomb (Samsung series 7 TV)

Post by maniootek »

nick85 wrote:Step 3: Edit the config.xml file with additional information so that our files will be encoded correctly for Samsung TV. I have copied my config.xml file down here, and highlighted the important stuff.
what is location of this config.xml file? is it /etc/mediatomb/config.xml?
after that whole installation how can I run that mediatomb? command "service mediatomb start" doesn't work
Post Reply