Copy link to clipboard
Copied
Hey there,
I have been trying to access the metadata section under "File Properties" to see the source size of an individual piece of footage. This information will help while generating a report about the Premiere Project through a panel.
I have tried accessing this through XML and XMP, but I am somewhat new to using these, and can't find the access I need. Any insights?
Thanks
In case anyone needs this information in the future, I ended up gathering file size by looking at the footage item's filepath. You can then throw the path in a file object and calculate the size in bytes. Hopefully it'll be useful for someone, someday.
var target = File ( path );
if(target.length){
size = (target.length / 1000000000);
}
Copy link to clipboard
Copied
That's all from the OS; I don't think we preserve that info, but I'll have a look...
Confirmed, we don't store that info in either the XMP, or the projectItem's private metadata.
Copy link to clipboard
Copied
In case anyone needs this information in the future, I ended up gathering file size by looking at the footage item's filepath. You can then throw the path in a file object and calculate the size in bytes. Hopefully it'll be useful for someone, someday.
var target = File ( path );
if(target.length){
size = (target.length / 1000000000);
}
Copy link to clipboard
Copied
Embarrassed that I didn't think of that; the JavaScript Tools Guide (that ships with ESTK) is a wealth of information, and covers the File object.