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

Replace Media in MOGRT using script?

Explorer ,
Aug 26, 2021 Aug 26, 2021

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!

TOPICS
How to , SDK
1.2K
Translate
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 2 Correct answers

Adobe Employee , Aug 26, 2021 Aug 26, 2021

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. 

Translate
Adobe Employee , Mar 31, 2025 Mar 31, 2025

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. 

Translate
Adobe Employee ,
Aug 26, 2021 Aug 26, 2021

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. 

Translate
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
Community Beginner ,
Aug 27, 2021 Aug 27, 2021

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!

 

Translate
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 ,
Aug 27, 2021 Aug 27, 2021

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.

Translate
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
Participant ,
Mar 29, 2025 Mar 29, 2025

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.

Translate
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 ,
Mar 31, 2025 Mar 31, 2025

Automating media replacement in MOGRTs via scripting remains unsupported after 4 years, which is crazy indeed.

Translate
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 ,
Mar 31, 2025 Mar 31, 2025

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. 

Translate
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 ,
Mar 31, 2025 Mar 31, 2025

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.

Translate
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 ,
Mar 31, 2025 Mar 31, 2025

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.]

Translate
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 ,
Mar 31, 2025 Mar 31, 2025
LATEST

Understood, that's good news!

Translate
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