Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions batch process proxies with window burn-ins (Clip Name)

  • batch process proxies with window burn-ins (Clip Name)

    Posted by Antony Dupsta on May 3, 2017 at 10:22 pm

    I may be going about this in the wrong direction.
    I am trying to automate making low res proxies from hi-res master QTs. I want the proxies to have window burns “frame numbers” and most importantly “source clip name”

    I can get close with BatchProcessor.jsx, but it will need some modification to the script?
    My first hang up here is I need to use an expression on a text layer which shows an overlay of the file’s layer name. Text with some “med size” so it is visible on screen.
    I can batch process an “animation preset” for the frame counter, that is working well so that takes car of the frame counter window burn.
    But I can’t figure out how to (because I am not very good with scripting) add Dan’s “clip layer name expression” to the Batch Processor script.

    I am using the BatchProcessor.jsx
    I need to add Dan’s expression which works great when you add it to each layer individualy. How can I merge this into the Batch Script to avoid hand doing this to hundreds of comps?

    Hope you can give some friendly advice, I am not the slightest experienced with scripting, I copy and paste stuff together is about my extent of scripting lol.

    //This is how I thought I could add Dan's clip expression to a text layer. This does not work for me. AECC2017
    {
    activeComp=app.project.activeItem;

    T=activeComp.layers.addText();
    T.text.sourceText.expression = txt = "";
    for (j = 1; j <= thisComp.numLayers; j++){
    if (j == index) continue;
    L = thisComp.layer(j);
    if (! (L.hasVideo && L.active)) continue;
    if (time >= L.inPoint && time < L.outPoint){
    try{
    txt = L.source.name;
    }catch(err1){
    txt = L.name
    }
    break;
    }
    }
    txt;
    T.transform.position.setValue([100,80,0]);
    }

    note: this code does not work yet.

    Antony Dupsta replied 9 years, 4 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    May 3, 2017 at 10:53 pm

    Try it this way:


    var activeComp=app.project.activeItem;
    var T=activeComp.layers.addText();
    T.text.sourceText.expression = """txt = '';
    for (i = 1; i <= thisComp.numLayers; i++){
    if (i == index) continue;
    L = thisComp.layer(i);
    if (! (L.hasVideo && L.active)) continue;
    try{
    txt = L.source.name;
    }catch(err){
    txt = L.name
    }
    break;
    }
    txt""";
    T.transform.position.setValue([100,80,0]);

    Dan

  • Antony Dupsta

    May 3, 2017 at 11:58 pm

    Hi Dan,
    Thanks for your help. This is really getting close to what I am after. The expression withing the script will now overlay over the clip as a window burn…
    However, maybe I am doing something wrong.
    Just one comp out of the hundreds gets the clip name applied.
    I would have to run this script for each comp individually.

    Maybe is has something to do with active comp or active comp layers?
    Could that be why only one comp get this expression applied and no others?

  • Dan Ebberts

    May 4, 2017 at 12:11 am

    If you wanted to apply it to all comps in the project, you’d have to loop through all the items in the project bin and process each CompItem:


    var currentComp;
    var T;
    var expr = """txt = '';
    for (i = 1; i <= thisComp.numLayers; i++){
    if (i == index) continue;
    L = thisComp.layer(i);
    if (! (L.hasVideo && L.active)) continue;
    try{
    txt = L.source.name;
    }catch(err){
    txt = L.name
    }
    break;
    }
    txt""";
    for (var i = 1; i <= app.project.numItems; i++){
    if (app.project.item(i) instanceof CompItem){
    currentComp = app.project.item(i);
    T=currentComp.layers.addText();
    T.text.sourceText.expression = expr;
    T.transform.position.setValue([100,80,0]);
    }
    }

    Dan

  • Antony Dupsta

    May 4, 2017 at 12:34 am

    Wow that was brilliant.

    Looks likes like the clip names are all there for all the comps. And through bacthProcessor I can add some animation presets to get the frame counter going, I will even throw a LUT in there.

    This is really nice automation building dailies/proxies for a small project like this.
    Thank you for your time and help, much appreciated.

    I owe you

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