Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Source Text Expression for Subtitles

  • Source Text Expression for Subtitles

    Posted by Jennifer Arani on March 15, 2013 at 4:37 pm

    Hello,
    I found a tutorial on how to bring in the speech/text metadata from premier to AE and then assign an expression to display the text 5 words at a time.
    The good news is that I got the script to work and work very well. The bad news is that the script will look for and display 5 words at a time. But there are pauses and music in between some scenes. I need to either add or adjust the script so that I can either have it look for some kind of end cap or notation so that it will, for example, show only 3 words. Stop displaying any text until it sees a second notation that tells it to start displaying it again.

    Any help would be appreciated! If not I will have to copy and paste the script for like 20 videos!

    Here is a link to the tutorial – https://www.realeyes.com/blog/2010/03/05/caption/

    And a copy of the script (adjusted for CS6 and per the instructions in the tutorial)
    L = thisComp.layer(“Module1.mov”);
    max = 9;
    n = 0;
    if (L.marker.numKeys > 0) {
    n = L.marker.nearestKey(time).index;
    if (L.marker.key(n).time > time) {
    n–;
    }
    }
    s = ” “;
    if (n> 0){
    base = Math.floor((n-1)/max)*max + 1;
    for (i = base; i < base + max; i++){
    if (i <= L.marker.numKeys){
    s += L.marker.key(i).comment + ” “;
    }
    }
    }
    s

    Thank you!

    Jennifer Arani

    Todd Kopriva replied 13 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • John Cuevas

    March 15, 2013 at 4:44 pm

    You might want to post this on the AE expressions forum, there are a couple of guys who read that forum regularly(they sometimes miss things on this forum) who might be able to help you out.

    Johnny Cuevas, Editor
    Thinkck.com

    “I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work.”
    —THOMAS EDISON on inventing the light bulb.

  • Todd Kopriva

    March 15, 2013 at 11:32 pm

    Dan Ebberts wrote the code that is in that tutorial, and he’s active on the Expressions forum. So, as Johnny said, that’s a good place for this question.

    ———————————————————————————————————
    Todd Kopriva, Adobe Systems Incorporated
    After Effects quality engineering
    After Effects team blog
    ———————————————————————————————————

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy