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

ExtendScript and Metadata -- accessing any and all metadata

Enthusiast ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Haven't found a way access many of the metadata entries offered offered up under PPro's Metadata" panel and the "Metadata Display..." popup

e.g. from "Dublin Core": "Keywords", "Title", "Type" or those under "Rights Management", "Media Management" etc.

Can ExtendScript 'get' and 'set' any and all metadata properties or are there limits?

TOPICS
SDK

Views

3.0K

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

correct answers 1 Correct answer

Adobe Employee , May 22, 2018 May 22, 2018

PProPanel demonstrates getting and setting XMP metadata, both the media-specific XMP metadata, and PPro's own private project metadata.

General XMP:  Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub

Private project metadata: Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub

Votes

Translate

Translate
Adobe Employee ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

PProPanel demonstrates getting and setting XMP metadata, both the media-specific XMP metadata, and PPro's own private project metadata.

General XMP:  Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub

Private project metadata: Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub

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
Enthusiast ,
May 22, 2018 May 22, 2018

Copy link to clipboard

Copied

Yes, familiar with that.  Where I was having trouble was targeting specific fields of a projectItem.

So, referencing an old post How to use ExtendScript to edit metadata on project items?​, if you're trying to get/set Comments for a projectItem, the namespace for that is Column.PropertyText.Comment.

For MediaStart the namespace is Column.Intrinsic.MediaStart

There's even access to Hide & Good Column.PropertyBool.Hide and Column.PropertyBool.Good

Those namespaces don't relate to the metadata categories under which the above properties fall in Metadata Panel and Metadata display... popup

Comment, MediaStart, Hide, and Good are found under the "Premiere Pro Project Metadata" section of the Metadata display... popup

There is another, unrelated Comment and a Good under "Dynamic Media"

So what I was getting at was accessing any and all properties, across the variety of metadata categories.

The mungeXMP function at Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub  didn't seem to reveal how that might work.

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
Enthusiast ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

Why this matters: I've got a real-world case: clients asking if we can code up abilities to control Metadata not included in the 26 listed in the table below, including customized categories.

Trying to get them a "yes" answer asap.  Any ideas?

NameColumn.Intrinsic.Name
TapeNameColumn.Intrinsic.TapeName
DescriptionColumn.PropertyText.Description
CommentColumn.PropertyText.Comment
LabelColumn.PropertyText.Label
MediaTypeColumn.Intrinsic.MediaType
MediaTimebaseColumn.Intrinsic.MediaTimebase
MediaStartColumn.Intrinsic.MediaStart
MediaEndColumn.Intrinsic.MediaEnd
MediaDurationColumn.Intrinsic.MediaDuration
MarkInColumn.Intrinsic.VideoInPoint
MarkOutColumn.Intrinsic.VideoOutPoint
TimeDisplaytime_display
VideoInfoColumn.Intrinsic.VideoInfo
AudioInfoColumn.Intrinsic.AudioInfo
VideoUsageColumn.Intrinsic.VideoUsage
AudioUsageColumn.Intrinsic.AudioUsage
FilePathColumn.Intrinsic.FilePath
StatusColumn.PropertyText.Status
GoodColumn.PropertyBool.Good
HideColumn.PropertyBool.Hide
PropogateHideColumn.PropertyBool.PropagatedHide
SoundTimeCodeColumn.Intrinsic.SoundTimeCode
SyncOffsetColumn.PropertyText.SyncOffset
CodecColumn.PropertyText.Codec
FieldOrderColumn.PropertyText.FieldOrder

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
Adobe Employee ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

Those sound like you're limiting yourself to PPro's private project metadata, as exercised here:

https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/PPRO/Premiere.jsx#L791

...and not reading/writing the broader XMP metadata, as exercised here:

https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/PPRO/Premiere.jsx#L632

MungeXMP() is the right function to start from; which specific field(s) would you like to munge?

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
Enthusiast ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

https://forums.adobe.com/people/Bruce+Bullis  wrote

Those sound like you're limiting yourself to PPro's private project metadata, as exercised here:

https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/PPRO/Premiere.jsx#L791

...and not reading/writing the broader XMP metadata, as exercised here:

https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/PPRO/Premiere.jsx#L632

MungeXMP() is the right function to start from; which specific field(s) would you like to munge?

I had, in fact, tried xmpMunge, but got nowhere.

Thanks to your suggestion I returned to it and got some results... and questions.

I tested using "scene".  It worked!

BUT.... There are two metadata properties using the name "scene", one under the metadata set "Premiere Pro Project Data", the other under "Dynamic Media".

I put entries in both, and the one that returned came from "Dynamic Media".  Is there a way to specifically target the "scene" under "Premiere Pro Project Data"?

Also tested using some other properties w/o success:

     "Name" (using "name" and "Name" as properties),

     "Video Usage" (using "videoUsage" and "VideoUsage"),

     "status",

     "Description"

     "Comment"

     "Keywords".

No luck on any of those.  Are they accessible?

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
Adobe Employee ,
Jun 19, 2018 Jun 19, 2018

Copy link to clipboard

Copied

Is there a way to specifically target the "scene" under "Premiere Pro Project Data"?

Yes. You'll need to, as a User, UN-link the Scene fields (in the 'Clip' or 'Dynamic Media sections of the metadata panel, click the little chain link to the right of the field.)

You can then look for the field (and value), in PPro's private project metadata.

These lines work, when added to PProPanel's 'modifyProjectMetadata' function.

        var scene        = "Column.PropertyText.Scene";

        var foundScene     = xmp.doesPropertyExist(kPProPrivateProjectMetadataURI, scene);

        ...

        xmp.setProperty(kPProPrivateProjectMetadataURI, scene, "New value for Scene field!");

        array[4]    = scene;

     "Name" (using "name" and "Name" as properties),

     "Video Usage" (using "videoUsage" and "VideoUsage"),

     "status",

     "Description"

     "Comment"

     "Keywords".

     No luck on any of those.

About 'no luck'; what, specifically, did you try, on those?

Testing hint: in modifyProjectMetadata, look at the contents of the projectMetadata variable (once instantiated), in a text editor.  All Will Become Clearâ„¢.

Name = Works fine. This is already exercised in modifyProjectMetadata (search for 'nameField').

Description = Works fine. This is already exercised in modifyProjectMetadata (search for 'desc').

Video Usage =  Works fine. The field you're looking for = 'Column.Intrinsic.VideoUsage'.

status = Works fine. The field you're looking for = 'Column.PropertyText.Status'.

Comment = Works fine. The field you're looking for = 'Column.PropertyText.Comment'.

Keywords = Works fine, but hidden in the multi-line XMPConst.NS_DC, "Subject" field.

         <dc:subject>

            <rdf:Bag>

               <rdf:li>This is the actual keyword value</rdf:li>

            </rdf:Bag>

         </dc:subject>

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
Enthusiast ,
Jun 19, 2018 Jun 19, 2018

Copy link to clipboard

Copied

Thanks Bruce Bullis

Wow.  Very helpful.  All working.

There are a number of quirks to get used to (correct me if I've got any of this wrong)

1 - There are TWO (or actually 4) functions avail. to Project Items that are in play.

yourProjectItem.getProjectMetadata();//and its associated .setProjectMetadata()

yourProjectItem.getXMPMetadata();//and its associated .setXMPMetadata()

It takes all the above for ExtendScript to access to all meta data properties.

Correct?

2 - To get access to all the available MetaData groups and fields requires more than the namespaces XMPConst.NS_DC & "ns.adobe.com/premierePrivateProjectMetaData/1.0/" (aka kPProPrivateProjectMetadataURI).  A more complete list of namespaces can be revealed in by running

XMPMeta.dumpNamespaces();

In other words the function and namespace you use depends on which field you're targeting for the .get and .set property functions as well as .doesPropertyExist,

Correct?

3 - Re "UN-Linking the Scene fields": I didn't notice a difference there.  Linked or unlinked I was able to control those fields independently.  What is that link icon about?

There are more mind addling idiosyncrasies, so the above is hardly a full explanation, but hopefully helpful.  So far I've got it working perfectly.

A very welcome breakthrough.  Thanks Bruce.

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
Adobe Employee ,
Jun 19, 2018 Jun 19, 2018

Copy link to clipboard

Copied

It takes all the above for ExtendScript to access to all metadata properties.

True! PPro's private project metadata, while properly-formatted XMP, is nearly entirely distinct from media-specific XMP metadata.

I say 'nearly', because by default many of the fields in the private metadata are linked to corresponding XMP fields, for the convenience of normal humans.

...the function and namespace you use depends on which field you're targeting for the .get and .set property functions as well as .doesPropertyExist

Correct. That's also how we introduce the flexibility to work with whatever schemae you may have, rather than restricting things to "the 2,327 canonical fields in the schemae shipped with PPro", or something.

Linked or unlinked I was able to control those fields independently.  What is that link icon about?

That suggests to me that the API takes precedence, over the user-facing link icons.

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
Participant ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

LATEST

If you want to access "MasterComment3" for example, you can see inside the metadata, that its identifier looks like "Master_Comment_3" without that other stuff "Column.Intrinsic.Something".

So if you do not find your metadata field, look into the data you get from projectItem.getProjectMetadata():

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 7.1-c000 79.b0f8be9, 2021/12/08-19:11:22        ">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about=""
            xmlns:premierePrivateProjectMetaData="http://ns.adobe.com/premierePrivateProjectMetaData/1.0/">
         <premierePrivateProjectMetaData:Column.Intrinsic.Name>USA/ARIZONA: NB - HOBBYFILMER NIMMT SELTENEN JAGUAR MIT KAMERA AUF</premierePrivateProjectMetaData:Column.Intrinsic.Name>
         <premierePrivateProjectMetaData:Column.PropertyText.Label>BE.Prefs.LabelColors.1</premierePrivateProjectMetaData:Column.PropertyText.Label>
   
[...]
 
 <premierePrivateProjectMetaData:Column.PropertyText.FieldOrder>Upper Field First</premierePrivateProjectMetaData:Column.PropertyText.FieldOrder>
         <premierePrivateProjectMetaData:Column.PropertyText.Proxy>Attached</premierePrivateProjectMetaData:Column.PropertyText.Proxy>
         <premierePrivateProjectMetaData:Master_Comment_3>SOME VALUE</premierePrivateProjectMetaData:Master_Comment_3>
      </rdf:Description>
   </rdf:RDF>
</x:xmpmeta>            
<?xpacket end="w"?>

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