After Effects: advanced command line rendering.

This is a very simple post but one that has changed my personal workflow immensely for the better.

In every project I work on now I have two text files. These files need to be updated with your own personal paths, obviously. In batch.txt you need change this: “/path/to/my/render.txt” and in render.txt you must obviously add your own projects instead of my fake nonprojects. If you open up render.txt in TextEdit and convert it to a plain text file ( shift-command-T ) you can simply drag in the project file from the Finder.
You can also drag in multiple projects at once this way.

batch.txt:
for FILE in `cat /path/to/my/render.txt`; do echo $FILE && /bin/tcsh -c "nice +20 '/Applications/Adobe After Effects CS4/aerender' -sound OFF -mem_usage 60 120 -project '$FILE'"; done

render.txt:
/Volumes/ourServer/myProject/aep/someShot/myAep_01.aep
/Volumes/ourServer/myProject/aep/someOtherShot/myAep_02.aep
/Volumes/ourServer/myProject/aep/someThirdShot/myAep_03.aep
/Volumes/ourServer/myProject/aep/someShotOfADifferentVariety/myAep_04.aep

This is a basically a simple bash script that uses cat and a for loop to process each aep in the list.
Please do note that this will not work if you have spaces in your paths. For help on eliminating spaces from your filesystems, please see
_

To actually execute the script, simply copy the contents of batch.txt and paste it into a terminal window. The reason for keeping these files somewhere on the server is so that you can access them easily from any machine you might be rendering on.

Now what this script will output is the following:
/bin/tcsh -c "nice +20 '/Applications/Adobe After Effects CS4/aerender' -sound OFF -mem_usage 60 120 -project '/Volumes/ourServer/myProject/aep/someShot/myAep_01.aep'"
/bin/tcsh -c "nice +20 '/Applications/Adobe After Effects CS4/aerender' -sound OFF -mem_usage 60 120 -project '/Volumes/ourServer/myProject/aep/someOtherShot/myAep_02.aep'"
/bin/tcsh -c "nice +20 '/Applications/Adobe After Effects CS4/aerender' -sound OFF -mem_usage 60 120 -project '/Volumes/ourServer/myProject/aep/someThirdShot/myAep_03.aep'"
/bin/tcsh -c "nice +20 '/Applications/Adobe After Effects CS4/aerender' -sound OFF -mem_usage 60 120 -project '/Volumes/ourServer/myProject/aep/someShotOfADifferentVariety/myAep_04.aep'"

To spell it out, this calls our aerender command four times, once with every project in the text file. After Effects will launch, render what is on the queue per the instructions, quit, and then proceed to the next line. If that ain’t fine I don’t know what is.


About this entry