Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions after effects expressions, text, and subtitles

  • after effects expressions, text, and subtitles

    Posted by Andrew Baker on August 30, 2011 at 5:14 am

    I am trying to get the marker audio transcription from premiere that i’ve imported (into after effects) to show in after effects, there is an expression for it when used the audio transcription markers will turn into words on screen therefore turning into automatic subtitles.

    There is an expression given in the picture tutorial but it isn’t clear how to input them in the expression for text, it’s long and separated so not sure that i’ve inputted it right so it’s giving me an error for the expression that i’ve submitted.

    Found in these websites:
    https://www.adobe.com/devnet/video/articles/metadata_video.html

    https://www.realeyes.com/blog/2010/03/05/caption/

    The expression sort of looks like this:

    L = thisComp.layer(“Legato_Ames_BTS_02_trans.mov”); max = 5; // number of words
    to display 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 for your time.


    L = thisComp.layer("Legato_Ames_BTS_02_trans.mov"); max = 5; // number of words
    to display 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 &lt; base + max; i++){ if (i &lt;= L.marker.numKeys){ s += L.marker.key(i).comment
    + " "; } } } s

    Andrew Baker replied 14 years, 8 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 30, 2011 at 6:07 pm

    It looks like some of the code got converted to HTML. This should work:


    L = thisComp.layer("Legato_Ames_BTS_02_trans.mov");
    max = 5; // number of words to display
    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

    Dan

  • Andrew Baker

    August 30, 2011 at 6:31 pm

    Thanks we figured it out, I wasn’t adding cap or the non space to the video file written in the expression.

    Thanks for your time!

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