Using the After Effects command line render

Sébastien Lavoie
keyframedtv
Published in
3 min readSep 11, 2013

Adobe provides us some command line interface to start renders without having to start After Effects (here’s the documentation). This can be really useful when using multiple computers on remote desktops or just to give you the ability to alt+tab, start your render and keep on working. It offers a lot of options and possibilities. We won’t go over all of them, but we’ll instead focus on creating bash aliases to execute what we would probably mostly want. Don’t worry if you’ve never used the command line, we’ll go over all there is to know.

So here’s what we will create our aliases (shortcuts) for.

  1. Start rendering an After Effects render queue for a specific aep file.
  2. Start rendering all aep files in the current folder.

Setting up

Before we get to the code, we’ll make sure you have all that is needed to use it properly.

Windows

  • Download Git Bash (having a bash command line interface will help you do a lot of cool nerdy stuff on Windows).
  • Open Git Bash and write cd ~ && explorer .
  • Open .bash_profile in a text editor (you may need to show hidden files to see it)
  • Paste this code at the very bottom of the file:
# Adobe After Effects command line aliases# Change this according to your version
AEVERSION=”CS6"
AEPATH=”C:/Program Files/Adobe/Adobe After Effects ${AEVERSION}/Support Files/aerender.exe”# $ aerenderproject name-of-file.aep
aerenderproject() {
PATH=$(pwd)/$*
“${AEPATH}” -project “${PATH}”
}
# $ aerenderallprojects
aerenderallprojects() {
for file in $(pwd)/*.aep
do
“${AEPATH}” -project “${file}”
done
}
  • Change AEVERSION value in the previously pasted code

OSX

  • Open your Terminal and type:
touch .bash_profile && open -e .bash_profile
  • Paste this code at the very bottom of the file.
# Adobe After Effects command line aliases# Change this according to your version
AEVERSION=”CS6"
AEPATH=”/Applications/Adobe After Effects ${AEVERSION}/aerender”# $ aerenderproject name-of-file.aep
aerenderproject() {
PATH=$(pwd)/$*
“${AEPATH}” -project “${PATH}”
}
# $ aerenderallprojects
aerenderallprojects() {
for file in $(pwd)/*.aep
do
“${AEPATH}” -project “${file}”
done
}
  • Change AEVERSION value in the previously pasted code

Usage

1. Navigate to your .aep containing folder

To navigate to a folder

  • On OSX, just drag the current folder to your terminal icon.
  • On Windows, right click on the folder and click Git Bash Here
  • On both platforms, if you want to move from a folder to another, you can use these these commands
# To move to a folder
cd name-of-the-folder
# To move back one folder
cd ..

note that you will need to put the name of the folder between single or double quotes if it contains spaces. More information here.

2. Use these commands

  • To render one file:
aerenderproject name-of-your-project.aep
  • To render all files:
aerenderallprojects

This technique can help you improve your rendering speed in many ways. It is also a good use of command line which we’ll probably use in further articles.

Do you have any other geeky tricks to improve your rendering techniques?

This article was orginally published on keyframed.tv.

--

--

Sébastien Lavoie
keyframedtv

Freelance motion designer and After Effects scripts developer. Sloths enthousiast, casual beatboxer, serial high-fiver.