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