C# interoperability for Adobe After Effects

2.2k views Asked by At

I am working on a project where we have an After Effects project already created but wish to dynamically change one of the label in one of the scene based on a database field. In this case, we are talking about customer's name.

I am able to render the After Effects project via command line, what I need to do is for each customer's name available in the database, I want to replace the label place holder that I've created in After Effects. Therefore, if I have 5 customers in the database, I should end up with 5 After Effects project file each with different name. Once I have 5 After Effects file, I can then send to network rendering to complete video rendering.

Anyone know how to achieve this? I prefer to do this in C#, but if it can only be done using C++ or other programming languages, I can do that as well.

Thank you all in advanced

2

There are 2 answers

0
fabianmoronzirfas On BEST ANSWER

You can access the sourceText property with Extendscript (Javascript).
If you have a project with one comp and one text layer in that comp called "mytextlayer" set the text to that layer like this:

app.project.item(1).layer("mytextlayer").property("Text").property("Source Text").setValue("Hello World")  

Take a look into the After Effects Scripting Guide.

There are better solutions already out there e.g.:

0
ariestav On

Just wanted to add that Templater for After Effects does this as well. Take a look at the Templater Bot edition. From Dataclay's website:

Templater Bot is an enterprise solution for custom video on demand. It works as an automated system. Use it to periodically check for incoming data, pull new data in, and render video as a background process. Or use the command line interface to push data in to create new renders. Once your AE project is prepared, use Bot to customize and render it without operating the After Effects user interface. Developers can create front end applications, such as web or mobile apps, that feed data into Templater's data source, offering a collaborative, custom video content creation solution.