Highlighted

Export frame from Source Monitor via Timeline

Explorer ,
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?

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.

TOPICS
Export, How to, SDK

Views

65

Likes

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

Export frame from Source Monitor via Timeline

Explorer ,
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?

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.

TOPICS
Export, How to, SDK

Views

66

Likes

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
Oct 14, 2020 0
Adobe Employee ,
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).



Likes

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
Reply
Loading...
Oct 14, 2020 0
Explorer ,
Oct 14, 2020

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Oct 14, 2020 0
Adobe Employee ,
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". 🙂

Likes

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
Reply
Loading...
Oct 14, 2020 0
Explorer ,
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.

 
 

Likes

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
Reply
Loading...
Oct 14, 2020 0
Adobe Employee ,
Oct 14, 2020

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Oct 14, 2020 1