Comment markers trigger and fill in automatic lower third ?

What type of scripts do you need?

Moderator: byronnash

Post Reply
frank e
Posts: 1
Joined: February 16th, 2014, 9:01 am


I'm currently trying to solve a new workflow idea based on the idea of script Guru Dan Ebberts of creating automatic subtitles from speech transcription markers (here is his script which works great for subtitling):
// This expression creates a text string consisting
// of groups of five marker comment fields
// (separated by spaces). Each text string is displayed
// when the current time has reached the first marker
// of that group.

L = thisComp.layer("");
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){

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 + " ";

This script reads out the comment contents on the specific layer "" (which have automatically been created via analyzing speech).

My idea was to modify the script that it reads not only the markes on the specific layer but in ALL (!) layers within this composition.

Then I created a lower third animation (e.g. a new composition) which I also want to trigger its start everytime where a marker is placed on one of the layers within the composition so that when the playbar hits a marker, the script reads out the comment content (which already works by the script above) and also starts the background lower third animation comp.

If this is not possible I would have to do without the animation and only create a second graphic lower third layer where only its opacity is triggered "on" and "off" (like fade in / fade out after 5 sec).

My second idea is to separate the two actions in two scripts: the first which reads out the content of the markers and automatically creates the text and on a second layer a script which triggers the animation comp to start at the same time.

I already got specific markers labeled "hit" to trigger e.g. an effect on an adjustment layer by the other great script of Dan:
m = thisComp.layer("Layer 1").marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
if (n > 0 && m.key(n).comment != "hit"){
while (n > 0){
if (m.key(n).comment == "hit") break;
if (n > 0)
linear(time - m.key(n).time,0,2,100,0)

I tried to figure out how I get these to actions combined but unless I'm not a coder I got stuck wiht that.

Anybody has an idea who to do combine these?

Post Reply