Skip to main content
johnt53984649
Inspiring
June 30, 2019
Question

Export Metadata from MXF Files

  • June 30, 2019
  • 2 replies
  • 3668 views

I have a directory with 281 MXF files in it, not all of which are the same duration.  Is it possible to somehow create a text file that is essentially a table of the metadata of these files using Premiere Pro, or by scripting in Premiere?  Essentially, I'm wanting some way to obtain the information displayed in list view:

HjFmqYK.png

in a parsable, plain-text format. I am primarily interested in obtaining the "Meda Duration" column (with the associated filepath as the key), but it would be nice if I could get the other metadata as well.

Is this possible with a Premiere Pro script, or within Premiere directly?  If so, can you give an example of how to do it?  Thanks!

This topic has been closed for replies.

2 replies

Legend
June 30, 2019

In Avid you can export an ALE file from a bin, not sure if similar exists in PP

Justin Taylor-Hyper Brew
Community Expert
Community Expert
June 30, 2019

Yes, using the XMP External Object, more details in the PPRO Sample Panel. Here's an example of how I get projectItem duration in one of my extensions:

function getPrMetadata(projectItem, fieldNames) {

                var kPProPrivateProjectMetadataURI = "http://ns.adobe.com/premierePrivateProjectMetaData/1.0/";

                if (app.isDocumentOpen()) {

                    if (projectItem) {

                        if (ExternalObject.AdobeXMPScript === undefined)

                            ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');

                        if (ExternalObject.AdobeXMPScript !== undefined) {

                            var retArray = []

                            var retArray2 = []

                            var projectMetadata = projectItem.getProjectMetadata();

                            var xmp = new XMPMeta(projectMetadata);

                            for (var pc = 0; pc < fieldNames.length; pc++) {

                                if (xmp.doesPropertyExist(kPProPrivateProjectMetadataURI, fieldNames[pc])) {

                                    retArray.push([fieldNames[pc], xmp.getProperty(kPProPrivateProjectMetadataURI, fieldNames[pc])])

                                    retArray2.push([xmp.getProperty(kPProPrivateProjectMetadataURI, fieldNames[pc])])

                                }

                            }

                            return (retArray2);

                        }

                    }

                }

                return (false);

        }

// usage

getPrMetadata(thisItem, ["Column.Intrinsic.MediaDuration"])

johnt53984649
Inspiring
June 30, 2019

Thank you, this is helpful.  However, what exactly is the "kPProPrivateProjectMetadataURI" variable?  It seems like it's a link to something.  When I attempt to put that link in my web browser, it just gives me a "this site cannot be reached" error.

Justin Taylor-Hyper Brew
Community Expert
Community Expert
June 30, 2019

It’s just the unique XML Namespace uri for Adobe’s XMP metadata, not a functioning website.