Expressions/Scripts/Presets

Moderator: byronnash

 
julienrobert
Topic Author
Posts: 3
Joined: Fri Feb 20, 2015 2:06 pm

post render script to move the rendered file

Fri Feb 20, 2015 2:18 pm

I'm using After-effects Render engine to render automatically new projects coming inside a watched folder.
As soon as the files are rendered, I take them with another software (Max-Msp-Jitter) with a watch folder action which play them in a huge mosaic in real-time.

The problem is that After-effects creates the file been rendering before they are completely rendered and Max sees them and takes them before the end of the render.

I see 2 possible solutions for my problem:

1. is it possible to ask After-effects to not create the file while it's been rendering?
2. find a way to do a custom post render action that could move the file to another folder

any help?
 
julienrobert
Topic Author
Posts: 3
Joined: Fri Feb 20, 2015 2:06 pm

Re: post render script to move the rendered file

Wed Jan 25, 2017 5:27 am

Haven't found a solution yet...
 
julienrobert
Topic Author
Posts: 3
Joined: Fri Feb 20, 2015 2:06 pm

Re: post render script to move the rendered file

Wed Jan 25, 2017 9:21 am

Is it possible to call a command shell from an aescript?
 
runegan
Posts: 19
Joined: Fri Nov 04, 2016 3:18 pm
Contact:

Re: post render script to move the rendered file

Sun Jan 29, 2017 9:07 pm

Here is a script that adds a comp to the renderqueue, sets its output file, watches the renderqueue item's status changes and when the item is done, uses the MacOS shell command "mv" to move the file to the correct location.
function renderAndMoveFile( compToRender ) {
    var outputFolder = new Folder("~/Desktop/test"); // The folder where the file will be moved to

    var rqItem = app.project.renderQueue.items.add(compToRender); // Add comp to renderqueue
    rqItem.outputModules[1].file = new File("~/Desktop/newFile.mov"); // Set output to temp location

    rqItem.onStatusChanged = function() { // Watch for changes to item status changes
        if (this.status === RQItemStatus.DONE) { // Check if render is done
            system.callSystem("mv " + this.outputModules[1].file.fsName + " " + outputFolder.fsName); // Move file
        }
    };

    app.project.renderQueue.render(); // Start render
}


You can look at http://docs.aenhancers.com/renderqueue/ ... eue-render or http://docs.aenhancers.com/renderqueueitem/#renderqueueitem-onstatuschanged to find out how to create a post-render action. And you can use http://docs.aenhancers.com/system/#system-callsystem to call a shell command from AE.

Who is online

Users browsing this forum: No registered users and 1 guest