As hard as it is for me to believe, Adobe Premiere Pro doesn't take the date code when capturing video clips from a DV camera and put it into the "shotDate" video metadata field. Instead, it (stupidly in my view) sets the shotDate to the date when the video clip is being captured, not when it was shot. I want to write a script to correct this.
So far I've been able to get access to the existing, bad shotDate property, but I can't seem to set it successfully. The relevant portion of my code is as follows. Can anyone point me in the right direction as to why my setting the property isn't working? Thanks in advance!
---
var md = thumb.synchronousMetadata;
md.namespace = "
http://ns.adobe.com/xmp/1.0/DynamicMedia/";
var BadShotDate = md.shotDate;
$.writeln("Bad Shot Date: ", BadShotDate);
// Get the XMP packet as a string and create the XMPMeta object
var xmp = new XMPMeta(md.serialize());
var d = new XMPDateTime(new Date()); // Dummy value for testing
xmp.setProperty(XMPConst.NS_XMP, "shotDate", d, XMPConst.XMPDATE);
var updatedPacket = xmp.serialize(XMPConst.SERIALIZE_OMIT_PACKET_WRAPPER | XMPConst.SERIALIZE_USE_COMPACT_FORMAT);
thumb.metadata = new Metadata(updatedPacket);