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

ENCODE_IN_TO_OUT in AME ExtendScript API app.getExporter().exportItem

Explorer ,
Dec 02, 2023 Dec 02, 2023

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

TOPICS
Export or render

Views

186

Translate

Translate

Report

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

correct answers 1 Correct answer

Adobe Employee , Dec 04, 2023 Dec 04, 2023

Hi @Andaleeb Roomy 

 

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.

Votes

Translate

Translate
Adobe Employee ,
Dec 04, 2023 Dec 04, 2023

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

Votes

Translate

Translate

Report

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
Explorer ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

Hi @H.Hahn ,

 

Thanks for the reply. There are some confusions:

 

  1. The examples show that it needs to be set on the encoderWrapper which is returned from frontend.addFileToBatch. When I had tried the addFileToBatch API, it did not work when given a prproj source (it seems it works if the source is a media file like an mp4, which is not my case).
  2. In order to render a sequence from a prproj file, the only suitable API seemed to be app.getExporter().exportItem, which I am using currently. This also returns an encoderWrapper object. But setting the workarea to 1 for InToOut does not seem to have any effect - I am thinking because exportItem has already been called, and setting workarea after that does not take effect.
  3. setWorkArea API also needs to explicitly specify start and end times - which I do not have access to. I only have the prproj file and those in and out points are set on a sequence inside that project file. I need AME to render that sequence honouring those boundaries.

 

 

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

Votes

Translate

Translate

Report

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 ,
Dec 04, 2023 Dec 04, 2023

Copy link to clipboard

Copied

Hi @Andaleeb Roomy 

 

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.

Votes

Translate

Translate

Report

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
Explorer ,
Dec 05, 2023 Dec 05, 2023

Copy link to clipboard

Copied

LATEST

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

 

Votes

Translate

Translate

Report

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