2010年8月30日 星期一

Automating rendering with aerender

The executable file aerender (aerender.exe on Windows) is a program with a command-line interface with which you can automate rendering. The executable file is located in the same folder as the primary After Effects application. The default locations:

  • Windows: \Program Files\Adobe\Adobe After Effects CS4\Support Files

  • Mac OS: /Applications/Adobe After Effects CS4

You can use the aerender application to perform rendering operations on multiple computers as part of a render farm, or you can use the aerender application on a single computer as part of a batch operation.

You use the program by entering the command aerender on the command line (or in a batch script), followed by a series of optional arguments. Some of the arguments are simple options that take no arguments of their own (for example, -reuse), whereas others take arguments of their own (for example, -project project_path).

Enter the command aerender -help to show usage information.

The version and build number of the application are written to standard output (stdout).

The render may be performed either by an already running instance of After Effects or by a newly started instance. By default, aerender starts a new instance of After Effects, even if one is already running. To instead use the currently running instance, use the –reuse argument.

This example command tells After Effects to render frames 1 through 10 of Composition_1 in project_1.aep to a numbered sequence of Photoshop files using a multi-computer render:

aerender -project c:\projects\project_1.aep -comp "Composition_1" -s 1 -e 10
-RStemplate "Multi-Machine Settings" -OMtemplate "Multi-Machine Sequence"
-output c:\output\project_1\frames[####].psd

To render just Composition_1 to a specified file, enter this command:

aerender -project c:\projects\project_1.aep -comp "Composition_1" -output c :\output\project_1\project_1.avi

To render everything in the render queue with current settings in the project file, enter this command:

aerender -project c:\projects\project_1.aep

Argument

Description

–help

Print usage message.

–version

Display the version number of aerender to the console. Does not render.

–v verbose_flag

verbose_flag specifies the kind of messages reported:

ERRORS : Reports only fatal and problem errors.

ERRORS_AND_PROGRESS : (default) Reports errors and progress of rendering.

–reuse

Reuse the currently running instance of After Effects (if found) to perform the render. When an already running instance is used, aerender saves preferences to disk when rendering has completed, but does not quit After Effects. If this argument is not used, aerender starts a new instance of After Effects, even if one is already running. It quits that instance when rendering has completed, and does not save preferences.

–mem_usage image_cache_percentmax_mem_percent

image_cache_percent specifies the maximum percentage of memory used to cache already rendered images and footage. max_mem_percent specifies the total percentage of memory that After Effects can use. For both values, if installed RAM is less than a given amount (n gigabytes), the value is a percentage of the installed RAM, and is otherwise a percentage of n. The value of n is 2 GB for 32-bit Windows, 4 GB for 64-bit Windows, and 3.5 GB for Mac OS.

–project project_path

project_path is a file path or URI specifying a project file to open. If this argument is not used, aerender works with the currently open project. If no project is specified and no project is open, the result is an error.

–comp comp_name

comp_name specifies a composition to render. If the composition is in the render queue already, then the first instance of that composition in the render queue is rendered. If the composition is in the project but not in the render queue, then it is added to the render queue and rendered. If this argument is not used, aerender renders the entire render queue; in this case, only the –project, –log, –output, –v, –mem_usage, and –close arguments are used, and all other arguments are ignored.

–s start_frame

start_frame is the first frame to render. If this argument is not used, aerender uses the start frame in the file.

–e end_frame

end_frame is the last frame to render. If this argument is not provided, aerender uses the end frame in the file.

–i increment

increment is the number of frames to advance before rendering a new frame. A value of 1 (the default) causes normal rendering of all frames. Higher values render a frame and use it increment times in output, and then skip ahead increment frames to begin the cycle again. Higher values result in faster renders but choppier motion.

–OMtemplate output_module_template

output_module_template is the name of a template to apply to the output module. If the template does not exist, using this argument causes an error. If this argument is not used, aerender uses the template already defined for the output module.

–RStemplate render_sett ings_template

render_settings_template is the name of a template to apply to the render item. If the template does not exist, using this argument causes an error. If this argument is not used, aerender uses the render template already defined for the item.

–output output_path

output_path is a file path or URI specifying the destination for the final output file. If this argument is not used, aerender uses the path defined in the project file.

–log log_file_path

log_file_path is a file path or URI specifying the location of the log file. If this argument is not used, aerender uses standard output (stdout).

–sound sound_flag

If sound_flag is ON, a sound is played when rendering is complete. Default is OFF.

–close close_flag

close_flag specifies whether or not to close the project when rendering is complete, and whether or not to save changes:

DO_NOT_SAVE_CHANGES : (default) The project is closed without saving changes.

SAVE_CHANGES : The project is closed and changes are saved.

DO_NOT_CLOSE : The project is left open if using an already-running instance of After Effects. (New instances of After Effects must always quit when done.)

-rqindex index_in_render_queue

-rqindex works just like -comp, except that it won’t create a render item from the composition automatically.

-mp enable_flag

If enable_flag is 0, additional processes are not created to render multiple frames simultaneously.

If enable_flag is 1, additional processes may be created to render multiple frames simultaneously, depending on system configuration and preference settings. (See Memory & Multiprocessing preferences.)

-continueOnMissingFootage

The render operation continues even if a source footage item is missing.

Lloyd Alvarez provides a script on his After Effects Scripts website that takes items that are ready to render in the render queue and sends them to render in the background using aerender.

沒有留言:

張貼留言

google ad