Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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?

Thanks

share|improve this question

1 Answer 1

up vote 2 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! –  Chris Aug 15 at 8:04

Your Answer

 
discard

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.