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

programming premiere pro with extend script

New Here ,
Feb 21, 2021 Feb 21, 2021

Hi I have just started using extend script for premiere pro.
I need to know the size of an object that makes up a clip it uses
some photographs.
The script I should complete is the following:


var oggetto =app.project.rootItem;

//alert(oggetto.children[0].name );
for(i =0;i<oggetto.children.numItems;i++){
// $.writeln(i);
$.writeln(i+" "+oggetto.children[i].name ); //26 2014_10_14_21_33_29_DSC_0227.JPG
$.writeln(oggetto.children[i].children);

}

I have to get the X and Y dimensions of the photograph:
26 2014_10_14_21_33_29_DSC_0227.JPG.

Thanks for any advice.

TOPICS
SDK
760
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 1 Correct answer

Adobe Employee , Feb 22, 2021 Feb 22, 2021

Confirming: You want the dimensions of the associated projectItem, not the dimensions the media had before it was imported into PPro, correct? 

 

If so, you can get that info in the private project metadata, associated with that projectItem.

Translate
LEGEND ,
Feb 21, 2021 Feb 21, 2021

This would need staffer @Bruce Bullis  to help.

 

Neil

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 ,
Feb 22, 2021 Feb 22, 2021

Confirming: You want the dimensions of the associated projectItem, not the dimensions the media had before it was imported into PPro, correct? 

 

If so, you can get that info in the private project metadata, associated with that projectItem.

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
New Here ,
Feb 24, 2021 Feb 24, 2021
Thanks for the prompt intervention.

My problem is to get the dimensions of the imported photo photograph
in the Premiere project.
In the following example what is missing are the domains I would like to
use for
complete lines 26-27.

var progetto = app.project;
var elementiProg = progetto.rootItem;
$.writeln(progetto.name);
$.writeln(elementiProg.children.numItems);
var immagini = cerco_immagini(elementiProg);
for(var e = 0;e$.writeln(e+' '+immagini[e].name);
//$.writeln(e+'****'+immagini[e].type);
}



function cerco_immagini(elementiProg){
var elementi =[];
var nome;
for(var i = 0; i < elementiProg.children.numItems; i++) {
nome = elementiProg.children[i].name;
if(nome.substring(nome.length - 3, nome.length).toLowerCase() == "jpg"
|| nome.substring(nome.length - 4, nome.length).toLowerCase() == "jpeg"
|| nome.substring(nome.length - 3, nome.length).toLowerCase() == "png")
{
elementi.push(elementiProg.children[i]);
//==================================================================
// How do you get these dimensions?

//$.writeln(elementiProg.children[i].width);
// $.writeln(elementiProg.children[i].height);

//==================================================================

}
}
return elementi;
}


I thank everyone and I am waiting for 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
Adobe Employee ,
Feb 24, 2021 Feb 24, 2021

That information may be available in PPro's private project metadata: Here's how to access it. 

https://github.com/Adobe-CEP/Samples/blob/63f176a4903b9be9e6aa73133ae689a3904f78c8/PProPanel/jsx/PPR...

Note: That may NOT be the size of the images as used in sequences; I'm not sure what value those original dimensions will have...?

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
New Here ,
Feb 24, 2021 Feb 24, 2021

Thank you but I don't know how to use the script you sent me. I am beginner, beginner ....

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 ,
Feb 24, 2021 Feb 24, 2021

I'll reach out directly. 

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
New Here ,
Feb 24, 2021 Feb 24, 2021
LATEST

Ok

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