Copy link to clipboard
Copied
Hi guys,
I have a question about MOGRTs in Premiere Pro.
Let's say I have a Media Replacement slot in the MOGRT (which was created in AE) - to insert your media there (sequence, photo or video) you have to manually drag and drop it from Project Panel, into the Essential Graphics media replacement slot.
My question is - can this be done by scripting? Is there any way to insert your media (sequence, photo or video) inside Media Replacement slot of MOGRT? I'm more interested in inserting your sequence from the project panel, into a certain media replacement slot - with scripting.
I'd appreciate any feedback on this - Can I communicate with Media Replacement via scripting in any way at all?
Thanks!
2 Correct answers
While it remains possible to insert a .mogrt, and change values of any modify-able parameters, no media replacement APIs have been added.
Once the .mogrt and commensurate media have been added to tracks in the sequence, they're all trackItems, as far as the API is concerned; your ExtendScript could perform it's own media replacement.
Media replacement came into existence well after PPro's ExtendScript APIs for .mogrt manipulation were created.
No further ExtendScript API work is planned or scheduled.
Improved .mogrt APIs, and any other API-related feature requests, will not be available until after PPro's UXP extensibility approaches parity with what was possible, via ExtendScript.
Copy link to clipboard
Copied
While it remains possible to insert a .mogrt, and change values of any modify-able parameters, no media replacement APIs have been added.
Once the .mogrt and commensurate media have been added to tracks in the sequence, they're all trackItems, as far as the API is concerned; your ExtendScript could perform it's own media replacement.
Copy link to clipboard
Copied
I'm currently struggling with MOGRTs. Media Replacement is great, and I want to use it as much as possible, because it can save hours of work for my editors. My problem is that I need to send not only media to MOGRT but also filename of media that's is replaced. I need it because we use filenames to specify sources of media that's need to be shown on screen (as text layer). Do you think that's possible? I will write down my aproches.
1. I tried to get filename in AE, but it looks like that MOGRTs work in sandbox and it's no way possble to get filename of media that is replaced with. I tired to get filename of layer in comp by using thisComp.layer([media layer number]).source.name , this gave me filename of placeholder even after replacing it with other media.
2. I'm trying to build Extendscript for Premire pro that will detect media replacent in Essential Graphics panel and then it will paste filename of replaced media in form of text to MOGRT. Problem with this method is that I don't know if it's possible to determate when media replacement happens using ExtendScript. I know it's possible to get item focused on timeline and ProjectView panel. Is it possible to detect on which panel use is focused?
app.project.activeSequence.getSelection();
//gets list of item selected on Timeline
app.getCurrentProjectViewSelection();
//gets list of item selected on ProjectView panel
I'd appreciate any feedback on this.
Thank you!
Copy link to clipboard
Copied
It seems like we are after the same thing. In my case, I am trying to replace media placeholder in MOGRT with a certain sequence in PPro.
Copy link to clipboard
Copied
I'm just beginning to script and spent hours wiith AI trying different methods of replacing media only to learn the one function a script is useful isn't even part of the API. This post is 4 years old so guess they don't care and again I'm confused what Adobe is thinking on something so obvious as this or am I missing something? I'd like to simply use mogrt templates and replace media in them via a script to automate tedious tasks.
Copy link to clipboard
Copied
Automating media replacement in MOGRTs via scripting remains unsupported after 4 years, which is crazy indeed.
Copy link to clipboard
Copied
Media replacement came into existence well after PPro's ExtendScript APIs for .mogrt manipulation were created.
No further ExtendScript API work is planned or scheduled.
Improved .mogrt APIs, and any other API-related feature requests, will not be available until after PPro's UXP extensibility approaches parity with what was possible, via ExtendScript.
Copy link to clipboard
Copied
Hi Bruce - thanks for responding.
I have a question regarding UXP - Once it's introduced and fully integrated in AE and PR, will older extensions that are created with ExtendScript work seamlessy there? I have a number of extensions that are written with ExtendScript - so I'm curious if they will start having bugs or whatnot, once UXP is fully introduced.
Copy link to clipboard
Copied
The presence of UXP extensibility will not interfere with the continued existence and operation of CEP+ExtendScript extensions.
[Some day, CEP + ExtendScript will be retired in both apps; no timelines currently available.]
Copy link to clipboard
Copied
Understood, that's good news!

