Copy link to clipboard
Copied
I'm building an app that reads the XML output of a Premiere project. For text graphics, Premiere appears to encode all the properties of the text (the string itself, font, size, etc.) as a JSON string stored in a base64-encoded string. Like this:
<parameter authoringApp="PremierePro">
<parameterid>1</parameterid>
<name>Source Text</name>
<hash>4e081bff-5365-dc02-2a20-2ed4000001a4</hash>
<value>jAEAAAAAAABEMyIRDAAAAAAABgAKAAQABgAAAGQAAAAAAF4ARAAUABAAQAA8ADgAAAA0ADAAAAAAACwAAAAoAAAAJAAAACAAAAAAAAAAAAAAAAAAHAAAAAAAGgAAABkAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAgAAAAAABsABwBeAAAAAAAAATwAAAAAAAABSAAAAGAAAAAAAAEAAQAAAAAA8EEAACBBychIQiQAAAAAAMhCMzMjwQIAAAAAAERCAACtQ1z///9g////ZP///1b///8AAAAAAQAAAAQAAAAMAAAAQVZTcXVhZFNsYXRlAAAAAAEAAAAMAAAACAAOAAQACAAIAAAAhAAAADwAAAAAADYAHAAAABgAFAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAACAAEADYAAAACAAAAFAAAABgAAAAAAIBAKAAAAAAAJEL8////BAAEAAQAAAAEAAYABAAAAAAACgAIAAUABgAHAAoAAAAAgICABwAAADUuMTcuMjMA</value>
</parameter>
The trouble is that this base64 string does not decode to a valid JSON string in ANY known string encoding format (I've tried 28 of them). The XML file itself is UTF-8 encoded. I found old documentation that said Premiere used UTF-16LE for these base64 strings, but that appears to be outdated:
(The example <value> string from this old thread *does* properly decode into a JSON string when the string encoding is set to UTF-16 Little Endian.)
There is something weird going on with this base64 string and I just need to know how Adobe encoded the data so that I can decode and read it. Thanks!
Follow-up: Due to the type of .mogrts in use, the information requested is not available via the ExtendScript API. Parsing of the PPro-specific opaque data saved into FCP XML exports is unsupported.
Copy link to clipboard
Copied
>I'm building an app that reads the XML output of a Premiere project.
Parsing the Premiere Pro project file format is 100% NOT supported, and not at all recommended.
Here's working example code from PProPanel, showing a supported method of getting and setting .mogrt text.
Copy link to clipboard
Copied
Hi Bruce, I'm not parsing the project file. As I stated: I'm parsing the XML output (the Final Cut Pro Interchange format).
The example code you linked does not appear to deal with this XML and I don't see it decoding the source text into the original JSON string. This looks like a Premiere Plugin working with APIs that I don't have access to outside of that context.
Please correct me if that's wrong. Otherwise, please remove the "correct answer" label from your post so that others might chime in with the correct way to decode this base-64 value.
Copy link to clipboard
Copied
My apologies; you didn't mention FCP XML, and wrote "the XML output of a Premiere project", which led me to believe you were parsing the .prproj file's XML.
Adobe also does not provide support for parsing of Apple's FCP XML file format.
Yes, the panel example I posted shows how to successfully access the info you're looking for, within PPro.
What's the overall workflow (from the user's perspective), which you're trying to support?
Copy link to clipboard
Copied
No worries--I should have been more clear and I didn't realize the project file itself was also XML.
The end goal is to construct a "graphics list" -- a table showing all the uses of graphics during a timeline, with the timecode and some similar metadata for each use. In this case, I just need to decode this base64 string to grab the actual text/string that appears in Premiere. I do not need to manipulate that string or modify any properties and re-encode the changes for Premiere to recognize; I just need one-way read access.
I'm not free to provide more detail than that publicly because the client is a very large Adobe customer in Hollywood. They do have their own support/account rep with Adobe if that's a possible avenue.
Copy link to clipboard
Copied
>The end goal is to construct a "graphics list"
That sounds completely possible using PPro's API through a panel...and completely impossible, once that info has been flattened into an FCP XML file. 🙂
My team handles PPro's film (Hollywood) engagements, but we'd give their account rep the same recommendation: use the API within PPro that was actually designed to provide that information, rather than attempting to extract that information from FCP XML.
Feel free to reach out to me directly, as desired.
Copy link to clipboard
Copied
Follow-up: Due to the type of .mogrts in use, the information requested is not available via the ExtendScript API. Parsing of the PPro-specific opaque data saved into FCP XML exports is unsupported.