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

Export Metadata from MXF Files

Engaged ,
Jun 29, 2019 Jun 29, 2019

Copy link to clipboard

Copied

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!

TOPICS
SDK

Views

3.1K

Translate

Translate

Report

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
Community Expert ,
Jun 29, 2019 Jun 29, 2019

Copy link to clipboard

Copied

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"])

Votes

Translate

Translate

Report

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
Engaged ,
Jun 30, 2019 Jun 30, 2019

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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
Community Expert ,
Jun 30, 2019 Jun 30, 2019

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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
Advisor ,
Jun 30, 2019 Jun 30, 2019

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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