2

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

4

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.

  • This answers my question. Thanks for the response! – cwiggo Aug 15 '14 at 8:04
2

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 http://blogs.adobe.com/aftereffects/2014/04/new-changed-after-effects-cc-2014.html

  • To update your answer Output Module setSetting only allow these keys: Audio Bit Depth Audio Channels Audio Sample Rate Channels : Color : Premultiplied (Matted) Crop : false Crop Bottom Crop Left Crop Right Crop Top : 0 Depth : Millions of Colors Format : QuickTime Include Project Link : true Include Source XMP Metadata : false Lock Aspect Ratio : true Output Audio : Auto Output File Info : [object Object] Post-Render Action : Resize : false Resize Quality : High Resize to : HDV/HDTV 720 25 Starting # Use Comp Frame Number Use Region of Interest Video Output – Trinh Hoang Nhu Sep 10 '16 at 0:12
  • No codecs allowed – Trinh Hoang Nhu Sep 10 '16 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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