Copy link to clipboard
Copied
Hello,
Premiere ExtendScript API has an API to use AME to render a sequence from a project - app.encoder.encodeFile(filePath, outputPath, presetPath, workArea, removeUponCompletion).
As its fourth parameter, it takes a "workArea" which can be ENCODE_IN_TO_OUT, meaning the AME should render the part that is between the in and out points set on the sequence in the Premiere project.
This in and out point of the sequence is also automatically honoured when dropping the prproj file to a watch folder that AME is configured to watch.
Now I am looking for a similar option in the AME ExtendScript API - app.getExporter().exportItem(source, destination, preset).
But I could not find it. As a result, the sequence in my prproj file is being rendered in full instead of only the part between in and out points.
I noticed a different method (exportSequence) which accepts leadingFramesToTrim/trailingFramesToTrim but it does not look like there is any easy way to get those frame numbers from the prproj from my AME script that I use to render a sequence. Please note that I only have access to the prproj file, which makes it difficult to know programmatically about the in and out points set on the sequence inside of the prproj.
So, is there any way in the AME API to make it honour the in and out points set on the sequence?
If not, it would be really convenient if that can be added in the next release.
Thanks,
Andaleeb
please use frontend.addDLToBatch() to add a project to the queue.
You can get the guid of the sequence / sequences with the call frontend.getDLItemsAtRoot()
When you set the workarea type "InToOut", then it should take the in and out points, that you set on the sequence in the project. The parameter startTime and endTime are only used when the workarea type is set to "Custom".
Best regards.
Copy link to clipboard
Copied
Hi @Andaleeb Roomy
you can already do that in AME.
Please check the Documentation at https://ame-scripting.docsforadobe.dev/reference/index.html
Search for: setWorkArea
There is even a sample script, that shows the usage.
Best regards
Copy link to clipboard
Copied
Hi @H.Hahn ,
Thanks for the reply. There are some confusions:
So it seems the setWorkArea API on the encoderWrapper does not fulfill my use case. It would be useful if a similar API can be added for app.getExporter().exportItem case.
Thanks,
Andaleeb
Copy link to clipboard
Copied
please use frontend.addDLToBatch() to add a project to the queue.
You can get the guid of the sequence / sequences with the call frontend.getDLItemsAtRoot()
When you set the workarea type "InToOut", then it should take the in and out points, that you set on the sequence in the project. The parameter startTime and endTime are only used when the workarea type is set to "Custom".
Best regards.
Copy link to clipboard
Copied
Hi @H.Hahn ,
Thank you for the answer! That worked after I reimplemented it with addDLToBatch instead of exportItem. I was a bit confused when it was not working when I specified encoderWrapper.setWorkArea(1) thinking that the other two parameters are not needed. But then I realized that with addDLToBatch, the in/out points are honoured by default, and I do not need to call setWorkArea at all.
Thanks again!
Andaleeb