Quicktime Styled Text Track Generator for Tex Edit Plus

Quicktime text tracks are an underused but flexible multimedia format. They have many applications, from low-bandwidth multi-language subtitling to chapter tracks and hypertext.

Anyone who has tried working with text tracks will recognise fairly quickly that Quicktime Player and Simple Text are not really good tools for the job. The 'Style Replace' functionality does not seem to work as it should, so until recently, making heterogeneous text tracks, i.e. text tracks with font, size and style information which differs from sample to sample, was difficult to the point that people just didn't bother. Consequently, heterogeneous text tracks are almost unheard of. That's about to change.

While we wait for a better tool to come along, I have made a nice Applescript designed for the excellent Tex-Edit Plus styled text editor. Being the best lightweight shareware styled text editor which supports Applescript, it seemed like a natural choice. I use it all the time, and it just keeps on getting better.

The idea is that you make your styled text track in Tex-Edit Plus, applying different colors, fonts, styles and sizes to your texts, and bearing in mind that each paragraph (delimited by a carriage return) will be converted to an individual text sample. Individual samples can also be heterogeneous if necessary, so you can really go to town.

The latest version (1.1) now handles multiple justifications and fixes a few other bugs related to Tex-Edit's more recent developments.

Download binhexed stuffit archive.


Example output.


Tips and Tricks

You can embed hyperlinks and hyperreferences in your text track by using the standard descriptor syntax in your text file before (or after) you run the script. Here are some examples

For an automatic hyperreference, use;

A<http://www.apple.com/quicktime/> T<frame2>

This will cause the page specified by the url to be loaded into frame specified by the T (target) descriptor when the text sample is reached. The A and T should be upper case.

For an interactive hyperlink, use;

<http://www.apple.com/quicktime/>

This will make the entire text track a link to that url for as long as the sample is visible. If the user clicks inside the text track, the user's default web browser will go to that url.

A more fancy kind of interactive hyperlink, is hypertext proper. This can be achieved by using

{HREF:<http://www.apple.com>T<frame2>}CLICK HERE FOR DETAILS{ENDHREF}

The T parameter is optional, and urls can be relative as well as absolute.

Note: The color and style of the hypertext link will always be blue and underlined, regardless of the settings you make in Tex-Edit. This is a limitation of Quicktime itself, although it may change in future.

If the URL links to a Quicktime movie, or a file which Quicktime can import and display (such as a text file, or a MIDI file), you might want to use 'myself' as the target, so that the file loads into the Quicktime movie space on the same web page.

This will also work in Quicktime player, but in the current version of Quicktime (4.1.2), you will need to use an absolute url. Relative urls work only with the Quicktime plug-in.


Version History

I really appreciate feedback so that I can develop the tool further. I'm particularly interested in bug reports, but any comments are more than welcome.

Version 1.1

Justification changes from paragraph to paragraph (a new feature of Tex-Edit 4.0) are now handled.

Version 1.0.2

I have fixed another problem with constants not coercing properly to strings, and I have now taken into account the fact that plain text is given as {plain} in more recent versions of Tex-Edit Plus (version 4 and above). Previously it was given as {} and that lead to some incorrect styling of the output movie. It should be working a lot better now.

Version 1.0.1

I have fixed a problem with justification constants not coercing properly to strings in some configurations.

Version 1.0

Released with great joy.


Download the damn thing!

You can download a binhexed stuffit archive containing the compiled script and some sample files here. The archive contains the source, which is commented, so I'd be very interested to hear about any successful modifications or extensions of it.

You will need Applescript, Tex-Edit Plus and a pro license of Quicktime to make this work. That might sound like a tall order, but they are very commonly installed on media authors computers so I'm confident there will be a bit of an audience for this. For best results, you should put the script in the Tex-Edit Plus Scripts folder. Open the file called testTrack and run the script. It's that easy. (I think).

Future plans

I'd like to support the other descriptors, such as chromakeyed text, text boxes and so on. I'd also like to provide a simple interface, so that people can adjust the size of such things, but I'm still thinking about the best way to do this. Suggestions are welcome.

I'd also like to make the code run as a droplet, so that it does not require Tex-Edit Plus at all. Tex-Edit Plus has a wonderful dictionary which makes the manipulations of styled text a breeze. I shall be looking into the standard Applescript commands, or perhaps an OSAX for manipulating styled text, so if anyone has any tips about this, please let me know.

Here are some related links

The official Tex Edit Plus Applecript Archives

The homepage of Tex Edit Plus, Trans Tex Software


back to

b

a

c

k

s

t

a

g

e