It looks like it's a tool designed for After Effects, but AME has much more output configurations while AE doesn't, like, nowadays AE doesn't have H.264/MP4 codec by default.
update 2020-02-02: AME scripting guide docs
It was designed for a bit older AE versions indeed. They still had h264 codec.
I'm not sure however if there is a way to bridge those two. However thats something im planning on researching in the future
https://forums.adobe.com/thread/2230567
ability to create a a render job for AME using scripting
// Scripting support for Queue in AME.
// Requires Adobe Media Encoder 11.0.
{
if (app.project.renderQueue.canQueueInAME == true)
{
// Send queued items to AME, but do not start rendering.
app.project.renderQueue.queueInAME(false);
}
else {
alert("There are no queued item in the Render Queue.");
}
}
possibly can be implemented as an additional driver alongside the default aerender
AME is still a good alternative to AERender, especially with its multiprocessing/multicore rendering functionality, not only the codecs part. It's really helpful and life-saving on reducing rendering time. This feature of implementing an optional AME driver should be considered to have a higher priority.
Hi! is there any updates on this? I tried rendering a 1 frame JPEG image and it takes 15 seconds, which is already impressive being outside of AfterFX but its still a lot of time for a single frame.
Unfortunately no updates.
@inlife thanks for the reply.
My current solution is to take a screenshot within a JSX script:
// Takes a screenshot of a composition and saves it.
{
var curItem, myComp;
var compNames = [];
var theCompName = "TEST_COMP_PREVIEW_FRAME";
for(var i = 1; i < app.project.items.length; i++){
curItem = app.project.items[i];
if(curItem instanceof CompItem){
compNames.push(curItem.name);
if(curItem.name == theCompName){ //Will grab only the first name match
alert("FOUND COMP, attempting to take a Screenshot...");
// Select the newly found item as activeItem
app.project.item(i).selected = true;
// Global Vars
var theComp = app.project.activeItem;
var time = 0;
// Save frame to PNG
theComp.saveFrameToPng(time, File("C:/path/" + curItem.name + ".png"));
break;
}
}
}
}
Is there any way to avoid rendering and just execute a script?
Also, I didn't know how to properly add a composition to the queue, so for anyone that's wondering, here's the code I've gathered :
// Scripting support for Queue in AME.
// Requires Adobe Media Encoder 11.0.
{
var curItem, myComp;
for(var i = 1; i < app.project.items.length; i++){
curItem = app.project.items[i];
if(curItem instanceof CompItem){
if(curItem.name == "TEST_COMP_PREVIEW_FRAME"){ //Will grab only the first name match
var qItem = app.project.renderQueue.items.add(curItem);
qItem.outputModules[1].file = new File("C:/path/output.mp4");
break;
}
}
}
if (app.project.renderQueue.canQueueInAME == true) { // Send queued items to AME, but do not start rendering.
app.project.renderQueue.queueInAME(true);
} else {
alert("There are no queued item in the Render Queue.");
}
}
I just found the AME scripting documentation and attached it to the issue. A quick look and I found it's possible to start AME render queue by run app.getEncoderHost().runBatch(). I don't have much time currently. Let's see if someone would like to dive into it.
Also, I didn't know how to properly add a composition to the queue, so for anyone that's wondering, here's the code I've gathered :
// Scripting support for Queue in AME. // Requires Adobe Media Encoder 11.0. { var curItem, myComp; for(var i = 1; i < app.project.items.length; i++){ curItem = app.project.items[i]; if(curItem instanceof CompItem){ if(curItem.name == "TEST_COMP_PREVIEW_FRAME"){ //Will grab only the first name match var qItem = app.project.renderQueue.items.add(curItem); qItem.outputModules[1].file = new File("C:/path/output.mp4"); break; } } } if (app.project.renderQueue.canQueueInAME == true) { // Send queued items to AME, but do not start rendering. app.project.renderQueue.queueInAME(true); } else { alert("There are no queued item in the Render Queue."); } }
I used this and it started rendering in AME. Although, it does not pick up any of the dynamic assets that I pass in the jobn.json file. I'm injecting the jsx script as a type:"script" in the job.json file.
How do I make sure it picks up all the dynamic assets and then renders in AME?
Ah, I just answered my question.
If I pass the script as the last object in the assets array, it works as expected!
Which brings me to my next question. How do I make sure aerender does not start rendering. Right now, both AME and aerender starts rendering the comp.
Thanks!
Hey @atitkothari
Essentially what aerender does is triggers commandLineRenderer.jsx script, which in turn eventually triggers the execution of this line: https://github.com/inlife/nexrender/blob/master/packages/nexrender-core/src/assets/commandLineRenderer.jsx#L783
What you could do, is comment out this line in your version of the file in the Scripts folder and you would achieve what you are looking for.
@inlife Thanks for getting back so quickly!
Commenting that line in /Applications/Adobe After Effects CC 2019/Scripts/Startup/commandLineRenderer.jsx worked!
Thanks 馃帄
Most helpful comment
I just found the AME scripting documentation and attached it to the issue. A quick look and I found it's possible to start AME render queue by run
app.getEncoderHost().runBatch(). I don't have much time currently. Let's see if someone would like to dive into it.