Scripting AME: onEncodeProgress tracks only last added item in Queue
I understand scripting for Adobe Media Encoder is not supported and/but I still try to find a way to boost my workflow and output.
With my script (CEP) I add an After Effects comp (Dynamic Link) to the AME Queue. I can start the Queue, and I can get track of the progress of the item. So far everything goes smooth.
// works
function addToQueue(myProject, myFormat, myPreset, myGUID, myDestination){
queueItem = app.getFrontend().addDLToBatch(myProject, myFormat, myPreset, myGUID, myDestination);
queueItem.onEncodeProgress = function(progress){
// keeps track of progress 0 to 100
}
}
If I run this function multiple times, multiple items are added to the Queue. When I start the Queue I would wish to see the progress per item. But I only get track of the last item. All the previous ones render normally but give 0 as progress, finally the last item gives 0 to 100.
When I try this, it adds both items, but only tracks the last added item.
queueItem = app.getFrontend().addDLToBatch(myProject, myFormat, myPreset, myGUID, myDestination);
queueItem.onEncodeProgress = function(progress){
// keeps track of progress of queueItem2, which is 0
}
queueItem2 = app.getFrontend().addDLToBatch(myProject, myFormat, myPreset, myGUID, myDestination);
queueItem2.onEncodeProgress = function(progress){
// keeps track of progress, 0 to 100
}I might miss a step here, but I don’t see it.
It would be really usefull if there is some ID per added item available. Maybe it’s there, but am I overlooking it. Any pointers in the right direction are much appreciated.
I mix the info of these source,
http://www.openspc2.org/book/MediaEncoderCC/
https://ame-scripting.docsforadobe.dev/introduction/index.html
Using AE en AME CC 2021 (OSX)
