/**Prefetch **/
Skip to content
Fill 1
Blog
11 Mar 2022

Easy ways to add subtitles in Adobe After Effects

Add subtitles to Adobe After Effects

How to Add Subtitles in Adobe After Effects

Whether you’re creating videos for local or international audiences, you need to ensure that they’re getting and understanding your message. 

This is where subtitles may come in handy for you. Creating and adding subtitles to your videos increases their visibility and engagement rate. 

If you’re a seasoned artist or a content creator, you would already be using Adobe After Effects. It is an app that helps professionals create visually-appealing content for TV, videos, and movies.

As easy-to-use app as After Effects is, adding subtitles to the videos might be a little hard or time-consuming. 

Unfortunately, it doesn’t offer a separate screen for inserting subtitles, so you have to use text layers to create and add them to your videos. However, you can also use ready-made scripts from Amberscript and import them to After Effects.

Let’s learn how to add subtitles in After Effects.

Creating Subtitles in Adobe After Effects 

To get started with Adobe After Effects, you need to first create certain template graphics and then duplicate those layers. 

However, you’d still have to take care of the perfect trimming and timing of the subtitles.

Let’s go through this step-by-guide to learn how to create and add subtitles to Adobe After Effects.

Write the Text or Generate Subtitles with Amberscript

First things first, you need to get that video’s audio to which you want to add subtitles. 

For instance, if it’s just your everyday vlog, you need to extract its final audio to create subtitles with an alpha channel in After Effects.

Now, listen to the audio and write all the spoken text. 

Keep in mind to create the line breaks where necessary while making subtitles in After Effects. To clear the confusion and keep the subtitles in line with the audio, you can use a blank line in the document at places that don’t require subtitles.

However, if you want to do everything on your own, move on to the next steps.

Generate Markers

Once your text document is prepared, you can paste the content in a text layer and drop the audio in a similar composition in After Effects. 

Then, preview the audio (“.” on the keypad) and adjust the preview’s frame rate to twice the normal speed, i.e., 2x of original. Listen to the whole video half the time.

While listening to the audio, keep generating markers in the text layer for each line break by using “*” on the keypad. When you’re done, you’ll see that the subtitles are ready to be rendered.

Expressions to Separate the Text

The entire process of separating the text and adjusting it on the appropriate time frames is performed by “expressions.” If you’re generating the subtitles entirely on your own, you can use the following expressions:

Split ()

It is the most useful expression that helps break any text into different parts through any character you want to use. 

Some people also use it to extract the composition name from After Effects, the title, and subtitles of one lower third. 

If you’re using it specifically to break the subtitle’s line, the syntax for it is:

text.sourceText.split(‘/’)[i]

Translating this computer’s language into human’s gives us:

Extract the content from this text (text.sourceText) and break it into separate blocks each time “/” appears (split(‘/’). Just show block 4 (you can write any number in place of “i.” Thanks!

You may be wondering: “how to set the appearance of each block at the exact moment?” That’s what markers are for.

Counting Markers

By creating an expression to count the number of markers in a layer, you can make each block appear at the right time. For that, you can use the following expression:

m = thisLayer.marker;

i = m.nearestKey(time).index;

if (m.nearestKey(time).time > time){ i–;}

if (i < 1) { i = 1};

I–;

Yes, we know it must be pretty hard for you to understand this expression, but let us make it simpler for you. 

The “i” is the reference number of every marker that you will pass through in the entire process. This expression keeps an envelope of this reference number.

If the third marker is the last one that you pass through, you will replace the “i” with 3. Similarly, if it’s fourth, the “i” will be 4.

Until now, you probably have got an idea of how both of the above expressions work. 

Now, let’s do a quick recap. Every time you pass a marker, the “Split” will analyze the envelope to identify the reference number it holds. This way, it shows us the right text block at the right time.

But, here is a real problem – the expression might show an error if the counted blocks are less than the markers. So, what will you do in such a situation? The next expression will help you out.

The Error Code

In After Effects Expressions tutorials on WordPress by Thomas Euvrie, he explained that After Effects CC 2015 (13.5) doesn’t take simple expression issues into account; it simply ignores them without disabling them. 

The only way it reminds you of an error is the orange banner that pops up on the screen. 

But if you don’t like receiving notifications, you can just use the following expression:

try {code1} catch(err) {code2}

Translating it into human language, we get:

Please try code 1. If it doesn’t work, use code 2

That’s it!

Final Code

Now, after collecting all this information together, the final step is to apply the below code into the Source Text of the text box:

m = thisLayer.marker;

i = m.nearestKey(time).index;

if (m.nearestKey(time).time > time){ i–;}

if (i < 1) { i = 1};

i–;

try {text.sourceText.split(‘/’)[i]} catch(err) {”}

And that’s it – you’ve created and added the subtitles in After Effects.

Now, you can just give your video some final touches, like the color and font of the text, to ensure the viewer easily reads and understands them. 

Adding Your Subtitles into Adobe After Effects

If you’re not tech-savvy, you may be wondering: “How to add subtitles in After Effects with fewer efforts?”

So, if you want to avoid the hassle of manually transforming interviews, television shows, or any other types of video and audio into texts and subtitles, you use a ready-made script from automatic subtitle software provided by Amberscript

It provides the most accurate speech-to-text tooling that gives you subtitle scripts within minutes. 

Once you download the SRT file, a text layer with markers and keyframes will be generated based on the file.

However, you need to have an SRT Importer or Plugin to import them. They allow users to import subtitles, customize them, and add different graphics according to their desire.

Once the subtitles are generated, they can be easily rendered or directly imported into After Effects.

  • High accurate, on demand service
  • Competitive pricing with the fastest turnaround using AI
  • Upload, search edit and export with ease.

FAQ

Q1: What is Adobe After Effects?

Adobe After Effects is a digital app that offers visual effects and motion graphics used in the post-production of video games, films, and TV series. Generally, After Effects is used to enhance recorded videos and for keying, compositing, and animations.

Q2: How do I add subtitles to Adobe After Effects?

Unlike Adobe Premiere Pro, After Effects doesn’t offer a separate screen for inserting subtitles and captions. So, you have to use several text layers to create subtitles via writing the text from the audio, creating markers, and using expressions, like split, counting markers, and the error code. 

However, you can get automatic subtitles from software like Amberscript and insert them in After Effects.

Q3: Can I import SRT Files into Adobe After Effects?

Yes, you can import SRT files into Adobe After Effects via an SRT Importer Script or a Plugin. 

It allows you to import subtitles, customize them, and add graphics to them. The downloaded SRT file from Amberscript has a text layer with markers and keyframes that you can copy/paste into the text layer.

Q4: Can I import VTT Files into Adobe After Effects?

Yes, you can. Just use a subtitle Importer or a Plugin to do so.

Our services allow you to create text and subtitles from audio or video.
  • Upload audio or video file
  • Automatic or manual speech to text
  • Edit and export text or subtitles