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

2 Answers 2

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.

1
  • This answers my question. Thanks for the response!
    – cwiggo
    Commented Aug 15, 2014 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

2
  • 1
    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
    – James
    Commented Sep 10, 2016 at 0:12
  • 1
    No codecs allowed
    – James
    Commented Sep 10, 2016 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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