This script will import .ssa or .ass files from subtitling apps such as Substation Alpha. (requested by Hiji)

Any text that is found will be converted into After Effects text layers, along with any karaoke timing information. Currently the script ignores all other information such as layout and text styles.

How to use it:1. Create a new text layer with your chosen text style. Make sure it's centered text if that's what you want and make it paragraph text (by click-dragging when creating the text layer) if you want long lines to word wrap.

2. With the text layer selected, run this script and choose a .ssa/.ass file to import. A new text layer is created for each line of text and keyframes are added to control word/syllable highlighting if there is any karaoke data.

NOTE: I've written this script with only a few .ssa files to test it on. So it's likely that some .ssa files won't import so well, especially if they include advanced subtitling features. Let me know if this happens to you and I'll see if I can make it more robust.

Hope you like it Hiji.

Paul T

How to change highlighting style for karaoke subtitles:Two text animators are created, a Default Animator with a white Fill Color and a Highlight Animator (for Karaoke highlighting) with a red fill. Delete the default Fill Color if you want your original text color. By adding/removing properties from these text animators, you can create all kinds of different karaoke highlighting styles.

This is the default style:

In the next example I've removed the Fill Colors and added two Opacity properties. The main text is 50% opacity, while highlighted text is 100%.

Here I've used a Postion property on the Highlight Animator with a y-axis offset, so highlighted text jumps above the rest.

Finally, this example uses both Scale and Tracking properties to make the highlighted text bigger.

Hi, being a fansubber this script is of great interest for me. I was going to request it, until I saw it had already been done. I tested it out and it loads the text fine, but it always fails to include the karaoke data. For example when I use this SSA script

It's not really surprising your .ssa file didn't work. As I mentioned in my first post, I've only had a few .ssa files to test the script on. The problem in this case is that the script is looking for a 'karaoke' effect type in each 'dialogue' line to decide whether to treat it as karaoke or as a normal subtitle.

If I change the line in your posted example:Dialogue: Marked=0,0:00:00.00,0:00:02.00,Default,,0000,0000,0000,,{\k25}A{\k25}B {\k25}C{\k25}D {\k25}E{\k25}F{\k25}G{\k25}HTo this: (inserted "Karaoke")Dialogue: Marked=0,0:00:00.00,0:00:02.00,Default,,0000,0000,0000,Karaoke,{\k25}A{\k25}B {\k25}C{\k25}D {\k25}E{\k25}F{\k25}G{\k25}HThen when I run the script it properly adds the text with the karaoke effect.

As I get more examples of .ssa files, I'll get a better understanding of the file format and will be able to improve the script. It may be a while before I have the time to update it, but meanwhile you could try this:
1. Make a copy of the SSA_Import_1.0.jsx script.
2. In the copy of the script, locate the line createSubtitle(startTime, endTime, theText);3. Replace that line with createKaraoke(startTime, endTime, theText);

Then you'll have a copy of the script that always tries to interpret the data as karaoke.

edit2: Also is it possible to use any of the text animation presets for the karaoke highlight?

edit3: Whenever I change the keyframe interpolation from hold to something like Beizer or Linear for smooth fill-in etc, at the end of the line the range selector seems to move backwards relatively quickly and highlighting the words. Is there any way to avoid/bypass this?

I'm going to try and find some time to work on the script. I'll start with some of the easier problems and gradually work my way through the feedback.

finest,
I'd say it's unlikely that just applying a text animation preset will give you your desired effect. Can you create and send me an example AE project of what you'd like it to do?

Also maybe you or Hiji could send an example of what this 'smooth fill-in' thing would look like. The Range Selector needs a Hold keyframe at the end of each line because the script currently places all the lines of text on a single text layer and the start/end values need to return to zero for the beginning of each new line, I'm planning on breaking it up into multiple layers which should be a step in the right direction.

hiji,
Please do send me an example of a script which includes unicode/japanese characters. But I'm guessing this will be one of the harder things to implement so don't expect it any time soon.

phil,
The first thing on my to do list is to rework the script to make it a bit more robust and adaptable, so hopefully I'll be able to get it working with your script pretty soon.

In general, the most helpful thing for me would be if you could all send me a few example scripts <paul.tuersley@btinternet.com> that cover the things that you'd like to be able to do, along with examples or descriptions of what you see when these script are open in your fansub application.

I've changed the url in my original post, it now links to an updated version of the script.

Changes in SSA_Import_v1.1:
1. A new text layer is created for each line of text. This means it should behave better if you want to change the Hold interpolation on the keyframes. Also, you can apply different styles or effects to each line of text if you wish.

2. The script should be able to handle a wider range of .ssa and .ass files. Basically it's better at dealing with the small differences found in files exported from different subtitling apps. For example, the script that finest was having problems with now imports properly.

3. A readout in the Info palette displays the text as it is imported.

4. Text layers are named to match their content.

I'm sure there are still occasions when the script will break, the most likely being those that contain {/kf...} style modifiers. As always, send me a copy of any files you have trouble importing.

Unicode character support:
Regarding Hiji's request for supporting unicode characters, now when I importing one of your example files I get extra lines that look like this Ã­NÃ‡â€¡Ã­mÃ‡ÃÃ‡Â»Ã‡Â¢Ã¥Ã¦Ã³tÃ‡?. Are they unicode characters by any chance? Anyway, I think there must be a bug in AE when dealing with these characters because I've found they only import if I reorder the lines in the .ssa file so these are the first dialogue lines.

about what I asked before, is there a way to use the effects such as blur etc for the highlight animation. So when the syllable starts there is no blur, but as it gets sung the syllable gets blurred to a specific point and maybe goes back to original. Similar with the text animation presets.

edit: I guess one way to do that would be to duplicate the line. set highlight and default animator to 0% opacity respectively. Apply blur to the highlight animation text layer with keyframes duplicated from the highlight animator range and with appropriate values to the effect applied. Altough I don't know how one would go about doing that. If you just set blur without keyframes then you get a static blur for the sung syllables. I am looking to do is increasing the blur as the syllable is sung.

edit2: You script does not seem to be inserting keyframes for silences. But it's not a major issue. Also please check your pm for an example of what I was talking about in the first edit.

I would apply an effect to the highlighted text in just the way you described. After running the import script, duplicate one of the text layers and on one of the layers, use the 'Add' pulldown beside the Highlight Animator to add an Opacity property which you set to 0%. On the other layer, add a 0% Opacity property to the Default Animator and a 100% Opacity property to the Highlight Animator, then add a blur effect to this layer. I'll have a think about ways to vary amounts of effects like blur.

Unfortunately, now the script generates multiple text layers, you'll have to do this for each one. It would be pretty simple for me to get the script to do all this automatically. The only question is whether to make this a separate script, or create a UI that gives various choices like this when you run the script.

Regarding your comments about silences, do you mean that words wouldn't be highlighted, one straight after another, but there would be gaps when nothing is highlighted? Presumably this would need a .ssa file that contained {/k35} type duration modifers that were followed by no text data. I'm not sure I have any examples that do this, but I can imagine why my script may not deal with these cases properly.