Skip to main content
Inspiring
March 8, 2023
Question

Scripting AME: odd addDLToBatch behaviour

  • March 8, 2023
  • 1 reply
  • 504 views

Dear all,

 

I stumbled upon, what it looks to me, odd behaviour in the addDLToBatch Code Sample that I don’t understand.

 

https://ame-scripting.docsforadobe.dev/reference/index.html?highlight=addDLToBatch#methods-4 (Thank you Schücky for this guide!)

 

Situation:

I have an AfterEffects project opened in AEFT with just 1 comp and 1 layer without any effects.

I save it.

With a button I run the code sample and the project gets added to the queue and gets rendered. All this works as expected. Without any problem I can repeat this over and over.

 

Where it goes wrong:

I change a layer property in my project, save it (same project name as before), and run the same script.

The project gets added to the batch again, but fails to render. The script result: “Encoding result for the batch item: Failed!”

 

From the log:

Export Error Error compiling movie. Accelerated Renderer Error Unable to produce frame. Error code: -1609629695

 

I dealt with this error code before and could always fix it by deleting some effect and applying it again, free up space and what not. But in this case there is not much left to change.

Maybe this is very obvious behaviour, please enlighten me! I just want to change my project and using one click render it in the AME.

 

I tried a lot, for example: I re-save the aep, manually clear the AME batch/queue and add the project using the script. Then it renders! But emptying the batch with script using removeAllBatchItems() does clear the batch first, but still fails the render.

Adding alerts in the scripts between the various methods also worked, which let me to think that the project was not entirely saved yet before handling, but then replacing alerts with 5000 ms timers (I know… but I was trying to pinpoint the problem) and gave the same failed status again.

 

Hope somebody can point me in the right direction! Many Thanks!

 

OSX 13.0.1 (i7) AEFT + AME 23.2.1

This topic has been closed for replies.

1 reply

Community Manager
March 9, 2023

Hello J_Nas,
there was one known issue should be fixed in the actual AME Beta, please check. In the meantime please test if addCompToBatch could be a working solution too.

Inspiring
March 9, 2023

Hi Sven, Thanks for your reply. Yes, I really should add trying in the beta in my workflow, thanks for reminding. I did not choose for addCompToBatch because it needs the comp to be rendered in the root of the project and I will have situations where that's not the case. I could automaticly prepare the project in these cases, but thought the DL route was already pointing to the right comp anyway. Also, this extra prepared file would apear in the Open Recent items menu which could add confusion to clients.

 

And I just came up with another solution: saving the project, duplicate the file with an incremental name and send that duplicate to the encoder. I could have tried that earlier because it seems AEFT is doing that too with 'Add To Adobe Media Encoder Queue...' sending the 'tmpAEtoAME_filename' to the AME instead of the project itself. 

 

I will try the beta first and let you know. Many Thanks!

Inspiring
March 9, 2023

AME beta 23.4 gave me same behaviour.

 

So I went for the solution where I send duplicates of my AEFT project to AME. Which is not even so bad, because it saves all renderd projects as separate .aep's for possible later use (like AME does) and keeps AEFT's 'Open Recent' clean.

 

If you want me to check this issue in next beta's, let me know.