Skip to main content
Participant
May 31, 2024
Question

Cannot run AME script while AME is open

  • May 31, 2024
  • 1 reply
  • 524 views

As a sort of follow up to my last question, I am trying to run an AME script from After Effects. I'm able to succesfully do this by constructing my command, writing it to a file, and running 'system.callSystem();'

 

Something like this:

 

 

var cmd = '"/Path/To/AME" --console es.processFile "/Path/To/TMP/File"';
var result = system.callSystem(cmd);

 

 

This works successfully but only if AME is closed when the script is run and provided that I close AME again ('app.exit()') at the end of my script.

 

If AME is open when the script is run I get several errors (which I'll paste below) and if I don't exit the app at the end of my script, then After Effects hangs (or my terminal window if I run it directly) indefinitely.

 

Does anyone know how I can sort out this issue so that I can run the script even if AME is already open and leave it open after the script is finished processing?

 

Thank you!

 

Adam

 

ps here are the error messages I'm getting:

 

objc[98067]: Class CertificateVerifier is implemented in both /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/Frameworks/Registration.framework/Versions/A/Registration (0x142c608f0) and /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/MacOS/Adobe Media Encoder 2024 (0x107422e20). One of the two will be used. Which one is undefined.

objc[98067]: Class HttpRequestDelegate is implemented in both /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/Frameworks/Registration.framework/Versions/A/Registration (0x142c60940) and /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/MacOS/Adobe Media Encoder 2024 (0x107422e70). One of the two will be used. Which one is undefined.

objc[98067]: Class CustomWKWebView is implemented in both /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/Frameworks/Registration.framework/Versions/A/Registration (0x142c60968) and /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/MacOS/Adobe Media Encoder 2024 (0x107422e98). One of the two will be used. Which one is undefined.

objc[98067]: Class NativeBrowser is implemented in both /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/Frameworks/Registration.framework/Versions/A/Registration (0x142c609b8) and /Applications/Adobe Media Encoder 2024/Adobe Media Encoder 2024.app/Contents/MacOS/Adobe Media Encoder 2024 (0x107422ee8). One of the two will be used. Which one is undefined.

This topic has been closed for replies.

1 reply

Participant
June 2, 2024

Small clarification: I wrote 'app.exit()' above when I meant 'app.quit()'

EckiAME
Community Manager
Community Manager
June 3, 2024

If you use the command line, you need to pass in the script on launch. If you use IDE, you can pass the script to the app for execution while it is running. You can also use other mechanisms, such as scripting Premiere Pro, to send the job over while AME is already runnning. You can also use an AME script that monitors a folder and executes scripts. You can also use watch folders. There are a lot of options, depending on what you exactly need.

Participant
June 4, 2024

In my scenario, I would like to send selected comps from After Effects to AME for rendering with specific AME presets. I know I can use After Effect's app.project.renderQueue.queueInAME() function but that doesn't allow me to choose the AME format/preset. So I figured that I could have AE create a script to run in AME to add the items to the queue using the frontend.addDLToBatch() function and call it using 'system.callSystem'.

However, this solution has the two problems mentioned above, as well as the fact that AE is unresponsive until the AME processes are finished anf the app is closed again.

 

The AE script I'm working on is meant for various members of our team to use, I would like it to be, to some degree, user friendly.

Is there any solution to that or perhaps a different way of going about solving my problem? The AE function app.project.renderQueue.queueInAME() would be perfect, if only there was a way to also pass the render format and preset.