Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've made a script that will loop through a (.txt) interchanging elements of a certain composition.

Within the script, I add each changed composition to the render queue and output it.

How can I pragmatically output the format in h.264 (.mp4) instead of it defaulting to (.avi).

I've discovered that you can just change the default output module via edit -> templates -> output module, but still.. is there anyway of doing this via script?


share|improve this question
up vote 3 down vote accepted

So, the answer to your question is 'yes, but...'

It's perfectly feasible, but you have to create an output module with the settings that you want, and then save it to your computer. You can create this by going to Edit -> Templates -> Output Module. Click on the 'New' button in the pop-up window, and then Edit it for the settings you need (quicktime, h.264, etc). Save it as a useful name ("H264HighQuality" or something like that). Save the output module, and you'll be able to access it from your scripts from there on out.

In order to use it in your script, just use: app.project.renderQueue.items.add(myComp).applyTemplate("H264HighQuality");

As long as you've made the template first, you can access it in your scripts as many times as you want. However, After Effects does NOT allow you to programmatically create Output Modules or alter them on the fly, unfortunately. But you only need to make the template once -- as long as you have that template on the computer you're running the script, it should work just fine.

share|improve this answer
This answers my question. Thanks for the response! – cwiggo Aug 15 '14 at 8:04

To update @MBrizzle answer, this functionality was added to After Effects CC 2014. There are 4 new methods:

  • RenderQueueItem object getSetting, setSetting methods
  • OutputModule object getSetting, setSetting methods

You can find more about them at

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.