I have been fighting with this for well over two days. I have read the faq on how to piggyback the subtitles into my transcoded video. But I am at a loss as what to do.
Can anyone point me in the right direction on how to get this working?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the same problem, i cant do it working. :( i follow " the how to piggyback the subtitles" and is not working this is my config.xml:
<?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/1http://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:871f4fdc-0b2d-4b64-9028-7dd1a7351523</udn>
<home>/home/jorge/.mediatomb/</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="yes">
<database-file>sqlite3.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>
I got it working. Some things that were not mentioned in the documentation, but will be obvious to some people:
* the external transcode-script has to be made executable
* check the location of the font-file and adapt the script accordingly
* mencoder has to be installed
* in your transcoding profile, you need entries for mime-type and … among others
If it still doesn't work, start mediatomb as a daemon and watch the output in your terminal. You could also try to run the transcoding script manually and check the output.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Which Mediatomb version are you guys using? I built my 0.12 on 2009-09-24. I dont remember which revision. I tried all of the above (from zenlord), but I guess the piggybacking-script is exiting or something. My PS3 only shows the files as "Incompatible data"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
2010-03-16 17:44:02 INFO: Arguments: %in %out
Last message repeated 1 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
The first time there is a Corrupted Data error, the next time it says there is a Netwerk error (0x0000000) while I can still go on the internet..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your reply. Unfortunately I f*cked up.. I got all segfaults after my latests post.. Still I'm not sure what segfaults mean..
Anyway I tried rebuilding mediatomb from svn after the segfaults.. Well that didn't go as planned so i'm rebuilding all the needed libs again too..
If I have it working again I will try your subtitle script and I'll get back to you..
Thanks again for the reply :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
MediaTomb is working again with all-new libraries :D yay! Well, that's the good news. I setup the script mentioned above, but the bad news is, it doesn't even display the .srt files on the PS3. I checked my config several times but I couldn't find what was missing.
I made a " <map from="srt" to="video/subtitle" />" entry and a transcoding profile but the .srt files still dont show up. I even tried adding them manually from the webinterface.
Does any of you guys know a solution for this? It's driving me mad that I can't test the subtitlescript mentioned above :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-03-22
I don't know if I can be helpful, anyway…
When something doesn't seem to work on mediatomb I start it from commandline (not daemon) so I can see all the messages.
You should print the command launched when you click on the video, then try to launch manually the command in a separate terminal and check if that command creates the video with subtitles.
I didn't tried to transcoding subtitles, but this method helped me to transcode youtube/apple video on my PS3.
For example if your script launches something like
mencoder $1 -opt1 $opt1 -opt2 $opt2
you should also print:
echo mencoder $1 -opt1 $opt1 -opt2 $opt2
Hope it helps to track what's wrong.
Cheers
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well in this case I have trouble adding the .srt files, I read somewhere that if modify the extensions, you have to build your mediadb from scratch.. im gonna try this tonight when im back at home
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Uhm… actually, you need just the vlcmpeg profile with the soverlay option, then simply put your .srt or other subtitle files in the same directory as the video file, and name it exactly the same, just with the different extension,i.e.:
video.avi
video.srt
VLC, with the soverlay parameter, will then pick up the subtitles automatically and blend them into the stream.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've finally managed to come around and try your suggestions. I tried them with filenames withouth spaces in them, just to be sure..
@headrush69: Again, the subtitle configuration did not work me, It says "Incompatibe Data" alreade in thee PS3 file browser.
@jin_eld Apart from not seeing the subtitles, I also saw you can't pauze or seek in the stream if you encode with vlc. I've always used ffmpeg in my previous configuration and it looks like ffmpeg can allow these actions while playing. That's a big plus for me.
Thank you both for your replies, unfortunately they didn't work for my situation :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Let's separate whther this is a encoder or mediatomb problem.
If you take the mencoder code I gave above, and run it manually substituting your pathname for vieo and subtitle files, does it play and add the subtitles.
If no, please post any message from mencoder.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@jin_eld Apart from not seeing the subtitles, I also saw you can't pauze or seek in the stream if you encode with vlc. I've always used ffmpeg in my previous configuration and it looks like ffmpeg can allow these actions while playing. That's a big plus for me.
No, it does not matter - as soon as you transcode something you lose the ability to seek (pause depends on the player).
I would also suggest to try the VLC options on command line first, once you have it working you can then integrate this options into your config.xml
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it finally works! I screwed up my config.xml again, but I let it regenerate now adding only the code needed for the .srt files. I had two version of the transcoder script, the wiki version and the one headrush69 provided me.
I only fixed the font path in the wiki script, but I was working with headrush's…. STUPID STUPID STUPID!
Now it work, so thanks a lot to all of you guys who replied! I adjusted the font using the "-subfont-text-scale" option and adjusted the framerate to 25. The default value of 30 cause the audio/video to get out of sync.
It's too bad I cant pause the file. I don't mind not being able to seek. Do you know which players offer this option or whether you can enable this using mencoder?
I have been fighting with this for well over two days. I have read the faq on how to piggyback the subtitles into my transcoded video. But I am at a loss as what to do.
Can anyone point me in the right direction on how to get this working?
I have the same problem, i cant do it working. :( i follow " the how to piggyback the subtitles" and is not working this is my config.xml:
<?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:871f4fdc-0b2d-4b64-9028-7dd1a7351523</udn>
<home>/home/jorge/.mediatomb/</home>
<webroot>/usr/share/mediatomb/web</webroot>
<storage>
<sqlite3 enabled="yes">
<database-file>sqlite3.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>
->
</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"/>
<map from="avi" to="video/avi"/>
<map from="mkv" to="video/x-matroska"/>
<map from="srt" to="video/subtitle"/>
<!- 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="video/x-msvideo" as="avi"/>
</mimetype-contenttype>
</mappings>
</import>
<transcoding enabled="no">
<mimetype-profile-mappings>
<transcode mimetype="video/subtitle" using="mencoder-srt"/>
<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 -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>
<profiles>
<agent command="/home/jorge/.mediatomb/mediatomb-mencoder-srt" arguments="%in %out"/>
</profiles>
</transcoding>
</config>
No one to help for subtitles??
I got it working. Some things that were not mentioned in the documentation, but will be obvious to some people:
* the external transcode-script has to be made executable
* check the location of the font-file and adapt the script accordingly
* mencoder has to be installed
* in your transcoding profile, you need entries for mime-type and … among others
If it still doesn't work, start mediatomb as a daemon and watch the output in your terminal. You could also try to run the transcoding script manually and check the output.
Which Mediatomb version are you guys using? I built my 0.12 on 2009-09-24. I dont remember which revision. I tried all of the above (from zenlord), but I guess the piggybacking-script is exiting or something. My PS3 only shows the files as "Incompatible data"
My setup is still working and I have rebuilt my mediatomb-svn several times.
What is the output you are getting when you start mediatomb manually and you start a srt-file from your ps3?
I just tried it and this is what I get..
2010-03-16 17:44:02 INFO: Arguments: %in %out
Last message repeated 1 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
Last message repeated 1 times
Invalid and inefficient vfw-avi packed B frames detected
Invalid and inefficient vfw-avi packed B frames detected
The first time there is a Corrupted Data error, the next time it says there is a Netwerk error (0x0000000) while I can still go on the internet..
Just retried it, and now it only displays the
2010-03-16 17:44:02 INFO: Arguments: %in %out
It seems the "invalid and inefficient" message is not related to the srt-file..
I just updated mediaTomb by building it again from SVN, using the existing config. It now outputs something:
Exiting…
is it the libavcode that I need or is it something else that I might have missed?
I convert all my videos to h.264 now but when I did use trancoding I had the same problem.
I had to send extra options to mencoder to get the transcoding to work.
Here is what is in my /usr/local/bin/mencoder-srt script:
Thanks for your reply. Unfortunately I f*cked up.. I got all segfaults after my latests post.. Still I'm not sure what segfaults mean..
Anyway I tried rebuilding mediatomb from svn after the segfaults.. Well that didn't go as planned so i'm rebuilding all the needed libs again too..
If I have it working again I will try your subtitle script and I'll get back to you..
Thanks again for the reply :)
Hey there,
MediaTomb is working again with all-new libraries :D yay! Well, that's the good news. I setup the script mentioned above, but the bad news is, it doesn't even display the .srt files on the PS3. I checked my config several times but I couldn't find what was missing.
I made a " <map from="srt" to="video/subtitle" />" entry and a transcoding profile but the .srt files still dont show up. I even tried adding them manually from the webinterface.
Does any of you guys know a solution for this? It's driving me mad that I can't test the subtitlescript mentioned above :(
I don't know if I can be helpful, anyway…
When something doesn't seem to work on mediatomb I start it from commandline (not daemon) so I can see all the messages.
You should print the command launched when you click on the video, then try to launch manually the command in a separate terminal and check if that command creates the video with subtitles.
I didn't tried to transcoding subtitles, but this method helped me to transcode youtube/apple video on my PS3.
For example if your script launches something like
mencoder $1 -opt1 $opt1 -opt2 $opt2
you should also print:
echo mencoder $1 -opt1 $opt1 -opt2 $opt2
Hope it helps to track what's wrong.
Cheers
Well in this case I have trouble adding the .srt files, I read somewhere that if modify the extensions, you have to build your mediadb from scratch.. im gonna try this tonight when im back at home
Uhm… actually, you need just the vlcmpeg profile with the soverlay option, then simply put your .srt or other subtitle files in the same directory as the video file, and name it exactly the same, just with the different extension,i.e.:
video.avi
video.srt
VLC, with the soverlay parameter, will then pick up the subtitles automatically and blend them into the stream.
hi jin_eld and headrush69,
I've finally managed to come around and try your suggestions. I tried them with filenames withouth spaces in them, just to be sure..
@headrush69: Again, the subtitle configuration did not work me, It says "Incompatibe Data" alreade in thee PS3 file browser.
@jin_eld Apart from not seeing the subtitles, I also saw you can't pauze or seek in the stream if you encode with vlc. I've always used ffmpeg in my previous configuration and it looks like ffmpeg can allow these actions while playing. That's a big plus for me.
Thank you both for your replies, unfortunately they didn't work for my situation :(
Some extra information about jin_eld's suggestion: the video itself runst fine but without the subtitles…
Running mediatomb from the commandline doesnt give anything as the video wont play with head_rush69's solution
Let's separate whther this is a encoder or mediatomb problem.
If you take the mencoder code I gave above, and run it manually substituting your pathname for vieo and subtitle files, does it play and add the subtitles.
If no, please post any message from mencoder.
P.S. Depending on your Linux distro, you might have to correct the pathname to your font location used on that encoder line also.
No, it does not matter - as soon as you transcode something you lose the ability to seek (pause depends on the player).
I would also suggest to try the VLC options on command line first, once you have it working you can then integrate this options into your config.xml
Yes, it finally works! I screwed up my config.xml again, but I let it regenerate now adding only the code needed for the .srt files. I had two version of the transcoder script, the wiki version and the one headrush69 provided me.
I only fixed the font path in the wiki script, but I was working with headrush's…. STUPID STUPID STUPID!
Now it work, so thanks a lot to all of you guys who replied! I adjusted the font using the "-subfont-text-scale" option and adjusted the framerate to 25. The default value of 30 cause the audio/video to get out of sync.
It's too bad I cant pause the file. I don't mind not being able to seek. Do you know which players offer this option or whether you can enable this using mencoder?
In the gentoo forums they play with ffmpegthumbnailer, so pause will be enabled http://forums.gentoo.org/viewtopic-p-6136607.html?sid=975d4f5f210c1443916b4e38f0813d1f#6136607
An interesting thought although I'm very sure that doesnt play subtitles hahaha
Well, if the whole Pause thing isn't possible, I could live with it.
Thanks a million again you guys for trying, and succeeding, to help me!
You can pause the movie on PS3 pressing the Playstation button ;)
This is running on a headless server, so not sure if I can test it?
I have checked my font path and the config.xml 3 times.
I have even tried using the mediatomb --debug option, but so much flies past the screen, I am not sure what to search for.
Does anyone else run mediatomb on a headless server and how do I test it from a laptop before I go running it on the Smart TV?
Thanks!