MediaScript & Custom Metadata


Hi there,

Just wondering if it’s possibly to get custom metadata - set in Portfolio - in a media script?
I’m trying to generate a custom XML file that requires values from some custom fields e.g. Series & Episode numbers.

To clarify, I’m working with video files not images so the EXIF/IPTC/XMP fields do not apply.




When last I asked this of support, the answer was “No” (though I think that was a guess). The NMM interface is undocumented and the MediaRich (MR) implementation is custom and thus not directly covered via the MediaRich PDF provided. It’s not clear from poking around the MR script files in the Server app if/where the bridge from MR to custom data is undertaken.

I realise the following doesn’t use NMM but if you have an Enterprise licence you’ve access in v10.2+ to the new API (via C#/Java/PHP). I’m not 100% clear if the latter will talk to an FDB or only SQL catalogues.

Given the API, I suspect that if NMM scripting of custom fields isn’t currently supported it won’t be developed as the answer will be to use the new API to access custom field data.


For the API it doesn’t matter if your catalog database is FDB or SQL, it can query it. MediaScript works with embedded data and has no mechanism to talk to a Portfolio database. So the first question would be are you an ‘Enterprise’ edition customer who has access to the API? If so, we have separate private forums for those who need assistance with API development and you should contact your Extensis Sales representative for more information on that.

However I’ve done example MediaScripts that work with custom field data from Portfolio, but where that data is being embedded (automatically if in the Web Client) into the original, usually into the ‘xap’ namespace which MediaScript can then read. But you say that’s not workable to you as it’s video files you’re working with? However, our product information page for “What’s New in Portfolio Server 10” states:

So maybe it can work for you, but the second question is therefore what video file format(s) are you working with? Maybe it’s one that’s supported for XMP metadata embed. If so, then yes you could use MediaScript to read your custom field data that you embed into the original assets. Without using this though, the only data MediaScript will take from video files is your typical video information, for example width, height, duration, frame count and frame rate. Not data that you’re defining in Portfolio therefore.


Thanks Mark and Chris.

I should have clarified that I’m not using the Enterprise version yet. We may further down the track.

My mistake, I must have missed that line. I was under the impression that XMP was only for images. Learnt something new. :slightly_smiling:

The video files are MXF files. I’ve just googled and it appears that they do support XMP metadata which is great.

By the way, is there an easier way to develop/test MediaScripts without having to restart the Portfolio Server every time?



Just a quick follow up… (and a brain dump in case anyone has any other ideas)

It appears I can extract metadata from an MXF file, but can’t embed it.

My plan was:

  • Fill in custom fields

  • Select embed properties

  • Run MediaScript[list]*]Get metadata

  • Create XML file


I was hoping to define my custom fields and map them to custom metadata codes and then read those out in my script.
However seeing as I can’t embed metadata into MXF files (and I don’t yet understand metadata codes) I’m going to have to find another method.

Perhaps an AppleScript.


[quote]By the way, is there an easier way to develop/test MediaScripts without having to restart the Portfolio Server every time?

I’ve never had to restart Portfolio server. I just replace an old ‘.ms’ file with my new edited one, then re-run the script via the Web Client. So long as the file is named the same, you don’t need to edit the xml file that controls how scripts appear, and so don’t need to restart Portfolio Server for it to pick up changes. Just the first time that you’re installing the MediaScript, but not as you go along editing it whilst installed.

As for MXF files, indeed they’re not currently listed as supported by Portfolio Server 10 in our file formats PDF, so you probably want to add a feature request for that, which is best done directly with technical support so we can obtain some samples. We’ll also need to know precise information as to the source of the files (be it application or hardware).


@BPerry, You should be able to embed via AppleScript/Automator as long as you use some other app to do the embedding. FWIW, I’d not suggest Adobe Bridge - no slur on the latter but it uses a fast embed trick that results in multiple XMP packets rather than one consolidated one and some apps (usually at an inaccessible under-the-hood point) can’t read multi-packet data correctly. It’s in the XMP spec but not widely implemented if I understand.

Separately, the Portfolio AppleScript ‘interface’ is unchanged since v8.5.x but works with v10 desktop clients. There is a known bug - with no workaround - whereby some catalogues won’t let you get/set data with custom fields (likely those with your custom metadata). IIRC, if you encounter things the only solution - if scripting is needed - is to start a new catalogue from scratch and port across the data.

Basically the Applescript and VB interfaces stopped being developed because NMM and/or the new API (Enterprise-only for v10.2+) replace the functionality - which they don’t. Not ideal but I hope that saves you some head scratching.