ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

why aescript takes longer to render?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Julien-Robert Legault Salvailwhy aescript takes longer to render?
by on Sep 7, 2016 at 1:22:55 am

I'm using aescript to automize the import of movies, put some effects and render them.

When I trigger the render with aescript, it takes approximately 33 sec but when I manually trigger the render, it takes about 10 sec.

Could somebody tell what's wrong with aescript and if there is any workaround?

AE 2015 13.5, 10.11.6

This is my script:


//path du dossier de travail
var path = "/Users/jrls/Projets locaux/installation FITC Topo/installation-travail/";
var pathRender="/Users/jrls/Projets locaux/installation FITC Topo/clips/"; //pour tester localement
//var pathRender="/Volumes/macpro-installation/Desktop/installation/fichiers/clips/";

//chercher le nom du nouveau fichier vidéo

var curDoc=new File(path+"nouveau.txt");"r");
var nomfichier=curDoc.readln();

var fichiervideo=nomfichier+".mov";

// create project (if necessary)

var proj = app.project;
// if(!proj) proj = app.newProject();
proj = app.newProject();

//importer les fichiers

var io = new ImportOptions(File(path+fichiervideo));
if (io.canImportAs(ImportAsType.FOOTAGE));
io.importAs = ImportAsType.FOOTAGE;

monmovie = app.project.importFile(io); = "MyFoorage";

io=new ImportOptions(File(path+"reference.png"));
if (io.canImportAs(ImportAsType.FOOTAGE));
io.importAs = ImportAsType.FOOTAGE;


// aller voir les propriétés du film

//var monmovie = app.project.activeItem;
var compL=monmovie.duration;
var compW=monmovie.width;
var compH=monmovie.height;

// create new comp named 'my comp'

var compRate = 30; // comp frame rate

var myItemCollection = app.project.items;
var myComp = myItemCollection.addComp(nom +"_difference",compW,compH,1,compL*4,compRate);

var nouveauLayer2 = myComp.layers.add(lareference);
var nouveauLayer = myComp.layers.add(monmovie);


// ajouter effets

effet ="Effects").addProperty("Masquage par différence");
effet ="Effects")("Masquage par différence")("Calque de masquage").setValue(2);
effet ="Effects")("Masquage par différence")("Lissage").setValue(5);
effet ="Effects")("Masquage par différence")("Flou préalable").setValue(2);
effet ="Effects")("Masquage par différence")("Tolérance").setValue(0);

effet ="Effects").addProperty("Luminosité et contraste");
effet ="Effects")("Luminosité et contraste")("Luminosité").setValue(40);

// effet ="Effects").addProperty("CC Time blend");
// effet ="Effects")("CC Time Blend")("Accumulation").setValue(.90);

// composition principale

var compPrinc = myItemCollection.addComp(nom,compW,compH,1,compL*4,compRate);
var nouveauLayer = compPrinc.layers.add(myComp);
//stretch=nouveauLayer.stretch=400;"Effects").addProperty("Déformation temporelle")("Vitesse").setValue(25);

//fade-in fade-out


theRender = app.project.renderQueue.items.add(compPrinc);
app.project.renderQueue.item(1).outputModule(1).file=new File(pathRender+nomfichier+"");

//préparer le watch folder
var myFolder = new Folder(path+"process"+nomfichier);

var doc=new File(path+"/process"+nomfichier+"/process"+nomfichier+"_RCF.txt");"w");
doc.write("After Effects 13.2v1 Render Control File\rmax_machines=5\rnum_machines=0\rinit=0\rhtml_init=0\rhtml_name=\"\"");
//sauver le projet dans le watchfolder de After-effect

var myQueue = app.project.renderQueue // Creates a shortcut for the Render Queue.

// Start rendering.
myQueue.render(); escape("/process"+nomfichier+"/process"+nomfichier+".aep")));


Return to posts index

Walter SoykaRe: why aescript takes longer to render?
by on Sep 7, 2016 at 2:24:09 pm

Confirming -- have you cleared the cache in between tests? It's not a fair comparison if one render is able to read cached frames and the other is not.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]

Return to posts index

Julien-Robert Legault SalvailRe: why aescript takes longer to render?
by on Sep 7, 2016 at 7:56:41 pm

Thanks Walter.

Just did the test and making sure I cleared all the cache before (even started the project from scratch) and it's a bit slower, 15 sec instead of 10 sec. But still 2 times faster than with the script...

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved