Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
20th July 2014, 06:45 | #1 | Link |
Registered User
Join Date: Oct 2001
Posts: 106
|
mp4box not processing <font> tags in .SRT subtitle mux
I'm trying to properly import a .SRT file, using MP4Box, that contains <xml> or <html> type tags
Code:
1 00:00:00,010 --> 00:01:55,110 <font color="#ffff80"><i><b>This is a test</b></i></font> Code:
mp4box.exe -add movie.h264 -add audio.ac3:lang=en -add subtitles.srt:lang=en:hdlr=sbtl -new output.m4v Oddly though, if you use Code:
mp4box.exe -ttxt subtitles.srt Code:
<TextSample sampleTime="00:00:00.010" xml:space="preserve"><font color="#ffff80">This is a test;</font><Style fromChar="24" toChar="71" styles="Bold Italic " fontID="1" fontSize="18" color="ff ff ff ff"/> </TextSample> |
20th July 2014, 13:24 | #2 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,504
|
Nor really surprising, that the whole html tagging of the fonts is not supported by most programs, since afaik. the official srt sepcification didn't include any formating. So all formating additions are kind of in official.
-> your might want to look at tools which specify in subtitle handling and conversion to get a better srt -> ttxt conversion |
21st July 2014, 20:16 | #4 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
Agreed...
A typical 'TTXT' header contains the following type of information: - Code:
<?xml version="1.0" encoding="UTF-8" ?> <!-- GPAC 3GPP Text Stream --> <TextStream version="1.1"> <TextStreamHeader width="1024" height="432" layer="0" translation_x="0" translation_y="0"> <TextSampleDescription horizontalJustification="center" verticalJustification="bottom" backColor="0 0 0 0" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="None"> <FontTable> <FontTableEntry fontName="Serif" fontID="1"/> </FontTable> <TextBox top="0" left="0" bottom="432" right="1024"/> <Style styles="Normal" fontID="1" fontSize="24" color="ff ff ff ff"/> </TextSampleDescription> </TextStreamHeader> <TextSample sampleTime="00:00:00.000" xml:space="preserve"></TextSample> <TextSample sampleTime="00:00:01.000" xml:space="preserve">TTXT UTF-8 Subtitle Test. For use with the High-Definition Network Media Players.</TextSample> <TextSample sampleTime="00:00:06.000" xml:space="preserve"></TextSample> Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 21st July 2014 at 20:41. |
21st July 2014, 20:45 | #5 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,938
|
Someone was having subtitle problems here. I don't know if it's related. http://forum.doom9.org/showthread.ph...68#post1686268
|
21st July 2014, 21:27 | #6 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
Quote:
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
23rd July 2014, 02:33 | #7 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,562
|
There are a variety of mutually-incompatible versions of formatted TTXT (TTML is supported here and there), I don't know if iOS supports any of them. HTML-formatted SRT files are a proprietary extension from VobSub/VSFilter, nothing else reads them but AegiSub, although there's a WebVTT that's similar but stuck in draft hell. Running yours through AegiSub will handily convert to ASS, then you can upload to Subtitle Converter and mux to see if iOS supports the creaky standard TTML. GPAC will mux that if you rename it to .ttxt.
Problem is that site isn't very stable, and the only other converter I can find is payware called EZTitles. Not much ttxt authoring support in the open source world. |
23rd July 2014, 07:54 | #8 | Link |
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
Subtitle Edit supports ttxt format as well...
Anyway, you don't need to worry about the font color during the mux for Apple devices as target because using iOS 7.1 and higher, you can override the colors for subtitles by using your own style. It's available through Settings -> General -> Accessibility -> Subtitles & Captioning : Last edited by Kurtnoise; 23rd July 2014 at 10:21. |
23rd July 2014, 09:38 | #9 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
Hmmm...
I'm of the opinion that bennynihon might be wasting his time trying to create .ttxt subtitles. As I'm not sure Apple TV or iTunes supports them. I know for sure that QuickTime player doesn't support ttxt subtitles placed within the .mp4 container...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
23rd July 2014, 14:39 | #11 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
That's encouraging...
I see there's a coloured font. Are you able to provide a short sample so I can add it to my collection? Cheers
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
31st July 2014, 17:08 | #12 | Link |
Registered User
Join Date: Oct 2001
Posts: 106
|
yeah, I've come to the conclusion that mp4box doesn' support <font> tags, as it may not even be a supported tag in the SRT format. So I've just made sure to find subtitles that don't include those tags. And yes, I've been successful getting subtitles to work just fine in iTunes, Apple TV, etc. Thanks
|
4th August 2014, 15:34 | #14 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
Thanks, that will be great
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
6th August 2014, 14:24 | #16 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
Many thanks
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
6th August 2014, 17:48 | #17 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,279
|
Hi Kurtnoise,
I've tried using Yamb to de-mux the ttxt stream from the sample you provided. But the ttxt stream was not visible! Do you have a version of MP4box that works?
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
Last edited by SeeMoreDigital; 6th August 2014 at 18:36. |
7th August 2014, 11:09 | #18 | Link |
Swallowed in the Sea
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,191
|
That's strange...Using any builds from here should work.
Anyway, here is the ttxt : Code:
<?xml version="1.0" encoding="UTF-8" ?> <!-- GPAC 3GPP Text Stream --> <TextStream version="1.1"> <TextStreamHeader width="400" height="60" layer="0" translation_x="0" translation_y="0"> <TextSampleDescription horizontalJustification="center" verticalJustification="bottom" backColor="0 0 0 0" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="None"> <FontTable> <FontTableEntry fontName="Serif" fontID="1"/> </FontTable> <TextBox top="0" left="0" bottom="60" right="400"/> <Style styles="Normal" fontID="1" fontSize="20" color="ff ff 00 ff"/> </TextSampleDescription> </TextStreamHeader> <TextSample sampleTime="00:00:00.000" xml:space="preserve"></TextSample> <TextSample sampleTime="00:00:05.570" xml:space="preserve">Aren't you eating breakfast, Nao?</TextSample> <TextSample sampleTime="00:00:07.820" xml:space="preserve">I've already eaten.</TextSample> <TextSample sampleTime="00:00:09.450" xml:space="preserve">What about you, Yuki? Today's your shift as drill instructor, isn't it?</TextSample> <TextSample sampleTime="00:00:13.580" text="" /> </TextStream> |
Thread Tools | Search this Thread |
Display Modes | |
|
|