How to use TimedText for subtitling
Last Updated on Monday, 29 March 2010 12:09
TimedText is quite simple. It is a straightforward XML file and it has the begin time, end time and the sentence to display. These are enclosed by a paragraph tag (HTML) per subtitle line. Below you see an example of a subtitling with the video below it.
It looks more complicated then it is. Have a quick look and I will explain how this works below. You may want to copy this part and save it in a plain text file. Do not use any formatting on XML files or they won't work. Do not use sophisticated editors either. A Notepad (PC) or SimpleText(Mac) will do just fine.
<tt xmlns="http://www.w3.org/2006/10/ttaf1">
<body>
<div xml:id="captions">
<p begin="00:02" end="00:03">That's very good</p>
<p begin="00:08" end="00:09.2">Well, that is very nice.</p>
<p begin="00:09.3" end="00:10.5">No, it isn't.</p>
<p begin="00:18" end="00:19">How is it going, Data?</p>
<p begin="00:20.5" end="00:21">I have finished.</p>
<p begin="00:22" end="00:25">The dimensions are accurate to within one point three percent.</p>
<p begin="00:25.2" end="00:27">I am sure they are...</p>
<p begin="00:28" end="00:31">Data,you obviously don't have a problem with realism...</p>
<p begin="00:32" end="00:34.5">but, you are here to work on your imagination.</p>
<p begin="00:35" end="00:37">Maybe, you should try to something little more...</p>
<p begin="00:37.2" end="00:38">abstract?</p>
<p begin="00:46" end="00:46.8">It's a start...</p>
<p begin="01:05.5" end="01:06">Deck thirty-six</p>
<p begin="01:13.2" end="01:14">Hello, Data!</p>
<p begin="01:18" end="01:19">What are you doing?</p>
<p begin="01:19.8" end="01:20.2">No!!!</p>
<p begin="01:20.8" end="01:21.5">No!!!</p>
<p begin="01:28" end="01:29">Honey?</p>
<p begin="01:30" end="01:30.6">I'm home!</p>
</div>
</body>
</tt>
OK, let's fiddle around with this! Only the red-bold part needs to be changed:
<tt xmlns="http://www.w3.org/2006/10/ttaf1">
<body>
<div xml:id="captions">
<p begin="00:02" end="00:03">That's very good</p>
00:02 means, start to show the text That's very good on 2 seconds after the start of the video (or audio!).
00:03 means, stop showing this line after 3 seconds from the beginning. Thus, this line shows during 1 second imposed over the video. You may have noticed that not all times have round number, like this one:
<p begin="01:30" end="01:30.6">I'm home!</p>
Here the sentence I'm home! shows up after 1 minute 30 seconds, and only shows for 6/10 of a second. You will experience that you have to use these decimal fractions quite a lot.
So if we change this:
<p begin="01:30.5" end="01:31.1">I'm coming home!</p>
You see here that I moved up the time, but did not change the display time, which is still 6/10. As I added the word coming, 6/10 of a second might fall a bit short, but it depends how fast the speaker is.
Fine, but how do I know when to show what?
Pure practice! You will have to place the video in a module and play it bit by bit, looking for the seconds on the right hand side of the control bar, while listening to every sentence. So, you need to have your text editor open and the video. I tend to do this with the online version of the video because there might be a small difference in speed between the online version and a local version on your computer. You will notice that 1/10 of a second makes a difference.
When you think you are ready, save the xml file and call it whatever you like, as long as it ends with .xml (lowercase).
Our extension S3Media Pro expects the TimedText file to be in images/stories/. If you want to put it in a sub folder of images/stories/, that is fine, just remember that and add the sub folder in front of the xml file when you want to use it with S3Media Pro. But you can use this tutorial for handwritten embedding code as well.
Do not expect this to be perfect from the first time
After you uploaded the TimedText file and connected it either in handwritten code or using our Joomla extension, you have to test. We call this the synchronization process. You will find that some sentences show up right on the dot, others don't.
Adapt your times in the TimedText file until they are perfect. Do not show subtitles longer then needed. Getting this right doesn't take that long(depending on the length of the video or audio), but it demands quite some concentration, so don't do this with a house full of kids or barking dogs begging for your attention. It has to be correct or the viewers will get distracted.
And this is the result:
Nice detail: you can also import your timedtext xml file into your videos on YouTube as well. It doesn't always play in sync with speech, while this will work perfect on your own site using JW Player for instance (provided you got the timings rights). But I'm sure that will improve it time.
Voeg deze pagina toe aan jouw sociale netwerk

