I have a file called "test.mp4" containing a h.264 video, ACC Audio Track, and a Timed Text track.
I added the Timed Text track via MP4Box. (see link in previous post).
The text track uses a ttxt-Format from Mp4Box.
See Test suite Nr.9 out of GPAC-Projekt Page:
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<!-- GPAC 3GPP Text Stream -->
<TextStream version="1.0">
<TextStreamHeader width="176" height="174" layer="65535" translation_x="0" translation_y="0">
<TextSampleDescription horizontalJustification="left" verticalJustification="top" backColor="ff ff ff ff" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="None">
<FontTable>
<FontTableEntry fontName="Serif" fontID="0"/>
</FontTable>
<TextBox top="144" left="0" bottom="174" right="176"/>
<Style styles="Normal" fontSize="12" color="0 0 ff ff"/>
</TextSampleDescription>
<TextSampleDescription horizontalJustification="left" verticalJustification="top" backColor="ff ff ff ff" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="In" scrollMode="Marquee">
<FontTable>
<FontTableEntry fontName="Serif" fontID="0"/>
</FontTable>
<TextBox top="144" left="0" bottom="174" right="176"/>
<Style styles="Normal" fontSize="12" color="0 0 ff ff"/>
</TextSampleDescription>
<TextSampleDescription horizontalJustification="left" verticalJustification="center" backColor="0 ff 0 ff" verticalText="no" fillTextRegion="no" continuousKaraoke="no" scroll="None">
<FontTable>
<FontTableEntry fontName="Serif" fontID="0"/>
</FontTable>
<TextBox top="144" left="0" bottom="174" right="176"/>
<Style styles="Normal" fontSize="12" color="0 0 ff ff"/>
</TextSampleDescription>
</TextStreamHeader>
<TextSample sampleTime="00:00:00.000" sampleDescriptionIndex="1" text="'This is demonstration No9'">
</TextSample>
<TextSample sampleTime="00:00:03.000" sampleDescriptionIndex="2" text="'1. text-color is ''GREEN and RED'">
<Style fromChar="18" toChar="23" styles="Normal" fontSize="12" color="0 ff 0 ff"/>
<Style fromChar="28" toChar="31" styles="Normal" fontSize="12" color="ff 0 0 ff"/>
</TextSample>
<TextSample sampleTime="00:00:08.000" sampleDescriptionIndex="3" text="'2. HILIGHT with Red'" highlightColor="ff 0 0 ff">
<Style fromChar="3" toChar="10" styles="Bold " fontSize="12" color="0 0 ff ff"/>
<Highlight fromChar="3" toChar="10" />
</TextSample>
<TextSample sampleTime="00:00:13.000" sampleDescriptionIndex="1" text="'3. Karaoke1 Karaoke2 ''Karaoke3'" highlightColor="0 ff 0 ff">
<Style fromChar="12" toChar="20" styles="Underlined " fontSize="12" color="0 0 ff ff"/>
<Style fromChar="22" toChar="30" styles="Bold " fontSize="12" color="0 0 ff ff"/>
<Karaoke startTime="2">
<KaraokeRange fromChar="3" toChar="11" endTime="5"/>
<KaraokeRange fromChar="12" toChar="20" endTime="8"/>
<KaraokeRange fromChar="22" toChar="30" endTime="11"/>
</Karaoke>
</TextSample>
<TextSample sampleTime="00:00:26.000" sampleDescriptionIndex="1" text="'4. text-box is located at'' the top of the video.'">
<TextBox top="0" left="0" bottom="30" right="176"/>
<Style fromChar="31" toChar="34" styles="Bold " fontSize="12" color="ff 0 0 ff"/>
</TextSample>
<TextSample sampleTime="00:00:31.000" sampleDescriptionIndex="1" text="'End of demonstration No9'">
</TextSample>
</TextStream>
MP4Box uses the fourcc tx3g for MPEG-4 Timed Text!
When i try to play this mp4 file in my VLC Player 0.8.6c and select the subtitle Track, I can only see the following parts of the Subtitle Text.
'3. Karaoke1 Karaoke2 ''Karaoke3
4. text-box is located at'' the top of the video.
End of demonstration No9
'
...and the text has no style. It is only simple white text displayed at the bottom of the video.
Preferences -> Input/codecs -> Other codes -> subtitle: formated subtitle is checked.
(I don`t have the english Verison of VLC so I hope the menu is correctly spelled)
How do I use Subtitle within the MPEG-4 container and display the TimedText incl. style information in VLC?