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

Essential Graphics Can't retrieve media size?

Participant ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

Hello everyone,

 

this caught me unexpectedly. Imagine you want to prepare a design as mogrt, which, adapts based on added media image size. 

When image is replaced, specific borders appears around the image, ratio specific, dependant on resolution. I setup everything in AE - works as expected. Here things got interesting.

Whenever image is added in Essential Graphics - it fails to read newly replaced image size. Can 100% confim this happens, as adding two text layers pointing to image width/height in AE results them as not being changed in Premiere after image replacement. 

Am I missing something, or how come such fundamental thing can fail to work? 

Thanks!

Bug Acknowledged
TOPICS
Graphics

Views

132

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 Pinned Reply

Adobe Employee , Jun 28, 2023 Jun 28, 2023

This is As Designed and a limitation that was necessary to make the feature work. Workaround has been shared.

Status Acknowledged

Votes

Translate

Translate
3 Comments
Adobe Employee ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

Hi @Tomas B. aka Tom10

 

The Media Replacement Control is bound to the dimensions, duration, and frame rate of the image or video that the control was created with. So there is no way for the frame to match the aspect ratio of the new media even if you had access to it with expressions if you were also trying to use Media Replacement. 

This is set in stone and was foundational to get the feature working to begin with so I don’t see it changing any time soon. There are some interesting workarounds that I have heard about that use sampleImage() that look for where the alpha begins to determine a border. 

There is a lengthy discussion about the matter here.

and the awesome A.Cobb has shared a solution and sample project on that thread as well. I'll quote here: 

 
 
 

 

A. Cobb AUTHOR
Enthusiast 
Jun 26, 2023

Copy link to clipboard

 
 
LATEST

Here is a project file with examples of the static and dynamic bounding box detection.

 

I'm demonstrating this using comps with nested text and shape layers here rather than include footage, but the method is relying entirely on the alpha channels of the resulting comps to measure the bounds.

 

The very brief version is that for each of the four sides of the bounding box I'm using Minimax and Transform effects to isolate the portion of the comp that is on the empty-alpha side of that boundary. Then I'm using a unidirectional box blur to average the alpha values of the pixels across that divide. That alpha value then represents the ratio of the number of pixels on each side of the boundary. Sample that value with sampleImage, and then the location of the boundary can be calculated through very basic arithmetic. Do this for each of the four boundaries (top, bottom, left, right) and you have the bounding box.

 

Hope this helps! 

Cheers,

 

- Dacia Saenz, AE Engineering Team

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

This is As Designed and a limitation that was necessary to make the feature work. Workaround has been shared.

- Dacia Saenz, AE Engineering Team
Status Acknowledged

Votes

Translate

Translate

Report

Report
Participant ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

LATEST

Thanks a lot for sharing, Dacia! I will give this a try and share outcomes in this thread.

What I noticed already is that "media replacement" box in Premiere where media has to be dragged, when hovered, shows "original" image size, thus that was an "oh no" indication :)) Anyways, will take a look, thanks for speedy response!

Votes

Translate

Translate

Report

Report