ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

After Effects reading XMP image data via scripting

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tim Smith
After Effects reading XMP image data via scripting
on Aug 4, 2015 at 1:02:12 am

Looking for information or good resources to learn more about scripting After Effects to read XMP image information?

I've read the XMP sections in the Extendscript Javascript Tools Guide and I am still struggling with accessing the info via AE scripting.

Any help/pointers would be greatly appreciated.


Return to posts index

Dave LaRonde
Re: After Effects reading XMP image data via scripting
on Aug 4, 2015 at 4:48:08 pm
Last Edited By Dave LaRonde on Aug 4, 2015 at 6:16:51 pm

Two words: Pro Import. 'Nuff said. That's about all you could get. AE doesn't give you access to a lot of metadata, nor do I know of any script that can reveal more of it.

You'd probably have more luck importing the XMPs into Premiere Pro.

What are you trying to accomplish in AE with the extra metadata? Please know that AE doesn't lend itself to very much automation at all, if that's your goal.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Tim Smith
Re: After Effects reading XMP image data via scripting
on Aug 5, 2015 at 12:52:10 am

Thanks for the reply Dave.

The idea is to access camera information from images and use it later as a variable within the script.
I know that the information is there as I can see it in PS/Bridge.

I'll post the same question that I asked over on AE forums just in case you have any thoughts about it:

-----From AE Forum-----------------
I've been trying to get the code below to work and it keeps throwing an error "Undefined is not an object."

if (ExternalObject.AdobeXMPScript == undefined) {
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
}
var metaFile = File.openDialog("Select file to import");
var xmpFile = new XMPFile(metaFile.fsName, XMPConst.FILE_UNKNOWN, XMPConst.OPEN_FOR_READ);
var xmp = xmpFile.getXMP();
alert(xmp.getProperty(XMPConst.NS_TIFF, "Model").toString()); //throws error "Undefined is not an object"
xmpFile.closeFile();
metaFile.close();


Is there something key missing or that I don't understand?
----------------------

Thanks in advance for your help.


Return to posts index


Walter Soyka
Re: After Effects reading XMP image data via scripting
on Aug 5, 2015 at 1:43:59 am

getProperty() should return undefined when the property isn't found. Any chance you can post a sample image file so we can play along?

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Tim Smith
Re: After Effects reading XMP image data via scripting
on Aug 5, 2015 at 2:06:11 am

Thanks Walter.

Here's a sample image taken on iPhone that I'm playing with:
https://dl.dropboxusercontent.com/u/44182853/IMG_5351.JPG

I'm giving this another shot today too, hope I can get it going.

Let me know how you go :-)


Return to posts index

Tim Smith
Re: After Effects reading XMP image data via scripting
on Aug 5, 2015 at 2:50:03 am

So this is embarrassing...

Seams that after a rebooting and running this script again this morning (in Australia) it's working.

Something must have been stuck in memory somewhere because I ran this exact same script yesterday on the same file and it threw back undefined every single time. Even after restarting AE and Extendscript multiple times.

Now it's returning the camera model like it's suppose to.

Rather annoying waste of time but good that the script works now!

Thanks for being willing to help guys. Sorry if I've wasted your time.

Cheers, Tim


Return to posts index


Walter Soyka
Re: After Effects reading XMP image data via scripting
on Aug 5, 2015 at 1:26:31 pm

Glad you're sorted.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]