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

Export frame from Source Monitor via Timeline

Explorer ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

I need to export a frame from Source monitor, since I don't have a direct Source Monitor API for doing so, I use the Sequence API this way:

  1. I select a frame in the Souce Monitor using the time indicator.
  2. I add the media to a new sequence
  3. I set the sequence time indicator like this:

 

seq.setPlayerPosition(app.sourceMonitor.getPosition().ticks) 

 

  • I export the frame in Timeline:

 

  activeSequence.exportFrameJPEG(timecode, outPath)​

 

My issue is that I get one frame back relative to my selection in Source Monitor.

Any suggestions how can I get through it?

TOPICS
Export , How to , SDK

Views

346

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 , Oct 14, 2020 Oct 14, 2020

Is there a way to do it without opening AME?

Not using the supported API; you could continue to use activeSequence.exportFrameJPEG(), from QE DOM. 

I can theoretically set one frame back in the timecode I pass to exportFrameJPEG, but it seems to me a like a bad approach.


For a complete solution, you'd need to get the sequence frame rate, factor in non-zero start times (if you're not sure the sequence starts at 00;00;00;00), and move to the next frame boundary before attempting to export.

Votes

Translate

Translate
Adobe Employee ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

Ticks are more accurate than timecode; I think you may be running into rounding error.

If the clip in the Source Monitor is also in the project, it has a projectItem, which you could then use encodeProjectItem() to transcode (rather than relying on the QE DOM).



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 ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

encodeProjectItem starts a AME interaction, right? I aim to do this flow without interfering the user.

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 ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

Yes, like most of the PPro API, encodeProjectItem relies on AME for rendering—we prefer to think of that as "doing what the user wanted", rather than "interference". 🙂

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 ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

I understand. In my case the user should not be aware of all this. The user selects a frame on the Source Monitor and should be able to see it in the extension. 

Is there a way to do it without opening AME? I can theoretically set one frame back in the timecode I pass to exportFrameJPEG, but it seems to me a like a bad approach.

 
 

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 ,
Oct 14, 2020 Oct 14, 2020

Copy link to clipboard

Copied

LATEST

Is there a way to do it without opening AME?

Not using the supported API; you could continue to use activeSequence.exportFrameJPEG(), from QE DOM. 

I can theoretically set one frame back in the timecode I pass to exportFrameJPEG, but it seems to me a like a bad approach.


For a complete solution, you'd need to get the sequence frame rate, factor in non-zero start times (if you're not sure the sequence starts at 00;00;00;00), and move to the next frame boundary before attempting to export.

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