Skip to main content
Known Participant
May 1, 2024
Answered

Get the path to media opened in source monitor

  • May 1, 2024
  • 2 replies
  • 1162 views

Hello,

 

Is there any way at all to get any information about what current media is opened in source monitor, such as the file path? I know we can open a project item or raw file paths in source monitor:

app.sourceMonitor.openProjectItem(someProjectItem)
app.sourceMonitor.openFilePath(someFilePath)

 

If there is no straight forward way to just get the path of whatever is opened in source monitor e.g. via the SourceMonitor object, is it simply impossible via any other method (event callbacks, inspecting project metadata etc)?

 

I have seen this thread and other that hints at such functionality being added soon, almost a decade ago: https://community.adobe.com/t5/premiere-pro-discussions/get-info-for-clip-loaded-in-source-monitor-using-extendscript/m-p/7346496#M292586

Where we see this comment from @Bruce Bullis :

 

Partial workaround = get the path from the Source monitor, then use app.project.findItemsMatchingMediaPath() to find related projectItems.

 

Reading that it sounds like there must be a way to actually "get the path from Source monitor". But how?? 🙂

 

Kind regard

This topic has been closed for replies.
Correct answer bbb_999

Ivan's right, if there is a projectItem corresponding to the media open in the Source monitor. 🙂

And, yes, that's a documentation bug; we'll add getProjectItem().

2 replies

Ivan Stepanov
Legend
May 2, 2024

This should work:

 

app.sourceMonitor.getProjectItem().getMediaPath()

 

Known Participant
May 2, 2024

Wow.. it actually seems like it does. That call does not seem to be documented anywhere for the SourceMonitor object as far as I can see. How did you figure that/where did you find it? 

bbb_999
Adobe Employee
bbb_999Correct answer
Adobe Employee
May 2, 2024

Ivan's right, if there is a projectItem corresponding to the media open in the Source monitor. 🙂

And, yes, that's a documentation bug; we'll add getProjectItem().

Bruce Bullis
Community Manager
Community Manager
May 1, 2024

There's no supported API that lets you obtain the path of the currently open media, from the Source monitor. 

 

Known Participant
May 1, 2024

No unsupported API:s (i.e. QE) either I suppose?

Bruce Bullis
Community Manager
Community Manager
May 1, 2024

Nothing an Adobe employee would recommend, on a public forum, no. 🙂