Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Cannot run AME script while AME is open

New Here ,
May 31, 2024 May 31, 2024

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.

TOPICS
Dynamic link , Error or problem , Freeze or hang
262
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 02, 2024 Jun 02, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 03, 2024 Jun 03, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 04, 2024 Jun 04, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jun 05, 2024 Jun 05, 2024
LATEST

Hi AdamHoward, 

 

here is Süky from the AME Team. As my colleague mentioned above the command line is a pass on launch. If AME is already running then you can not pass any scripts per command line. But his suggestion to use WatchFolders is very promising. 
I have looked at AfterEffects scripting code and found that you can use 

 

app.project.save([file]) 

 

to save your project file. [project-save in AE ]

In AME you can either prepare watchfolders manually or per scripting. Every and each WatchFolder is specifically defined for a preset, that means the selected preset will be applied to every and each project file you put in that folder. If you want to have the same source exported with different presets so you can define for each and every preset another watchfolder. That may be it. You can define a location for a folder that might be called something like below:

 

C::\\watchFolderWithMatchSource
for mac: "/Users/Shared/testdata/watchFolderWithMatchSource"

 

or another 

 

C:\\watchFolderWithHighQuality1080HD
for mac "/Users/Shared/testdata/watchFolderWithHighQuality1080HD"

 


This way you can define per Scripting in AME a WatchFolder. 

 

var watchFolder = app.getWatchFolder();
if (watchFolder) {
  var watchFolderSuccess = watchFolder.createWatchFolder(
    folderFilePath,
    destinationFilePath,
    presetFilePath
  );
}

 

watchfolderscript 


Other than that you may consider having a so called CEP Panel which I assume you can use in AE as Panel to pass  projects to AME too as many do in PremierePro. Please reach out to my colleague if you are interested in having a look into an example of CEP Panel.

Best regards, 

Süky
 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines