-
-
Couldn't load subscription status.
- Fork 334
Description
In this forum the question was raised about parsing information from an After Effects project file.
Link
Because I needed a Web-UI solution to list the compositions that are inside a project to create Nexrender API calls, I have found a way to do so.
It is a tricky thing as it is not about parsing an .aep file actually. My solution is to run After Effects from commandline and pass a script that creates a JSON file with information like composition names. This JSON file than can be easily parsed - in my case in a VueJS Web UI. The tricky part is to have a little server running that is allowed to run the "afterfx.com" command and and returning the data back to the UI. In my case it is a little Flask server.
So my setup is
- A client windows machine running a Web UI and a Flask server
- A RaspberryPI running Nexrender Server
- A worker machine windows
- A shared network drive on a NAS where all collected projects are saved to be rendered
My workflow is:
- Working on a project on the client machine and then collect the After Effects project on the shared network drive
- The Web UI waits for new projects on the shared network drive and lists them
- A click on a project starts an API call on the Flask server which starts the "afterfx.com -noui" command, adds some arguments and an extendscript
- After Effects opens in background and starts the script which opens the given project file and saves all needed information in a json-file next to the project
- This information again is taken by the Flask server and returned to the Web UI
- On the Web UI, in my case all compositions, are listed
- Click on a composition name runs a call on Nexrender API and starts the render process as usual
Of course there are some stages where error handling is needed because there are parts that can break the chain. But my setup is working now for some weeks and I am happy to not to write templates manually anymore :)
And of course any information that you can get via Extendscript in After Effects can be added into the JSON to later be processed.
Screenshot of listing the projects on the shared network drive
Screenshot after having clicked on one of the projects in the list.
Screenshot of all the jobs fetched by Nexrender API
Screenshot of a detail page of a job
