My motivation for building this tool was to conform a Premiere offline in Flame with as little hand work as possible.
Reading the XML gets you the cuts, but that’s where the long part begins: fixing position, scale and rotation shot by shot in Action, checking speed-changed shots for in-point drift, working out the factor by hand when the proxy and online resolutions differ. Since it’s all eyeballed, mistakes are easy to miss.
So I let the native importer handle the cuts, durations and timewarps, and rewrite only the parts it gets wrong — calculated from the numbers already in the XML and written back into the Action.
Put
z_xml2action_panel_EN.py
z_xml2action_core_EN.py
into /opt/Autodesk/shared/python
Restart Flame, or rescan the Python hooks.
In the MediaHub, right-click the XML
→ z Tools → “XML2Action: Prep XML (1-frame cut drift)”
This writes _prepped.xml next to it
(it fixes the one-frame cut drift on speed-changed clips).
Import _prepped.xml (not the original), conform it and link the media.
Select all the segments in the timeline, right-click
→ z Tools → “XML2Action: Apply Premiere Motion to Selected Segments”
Point it at the same _prepped.xml and press Run.
Tick “Dry run” the first time to write the .action files out and inspect them.
About offline/online resolution differences: the tool compares the proxy size written in the XML against the size of the image that actually reaches the Action (the Layer resolution), and puts the difference on a dedicated Axis called scale_fix.
Premiere’s own numbers stay on the original Axis, so you can still read them.
That should hold for any combination of resolutions. If the image comes in at the wrong size, switch “Scale reference” between native and frame by hand — it is auto-detected, and the detection is a heuristic that can occasionally be wrong.
Good stuff, thanks for sharing! I wonder if we should incorporate some of these ideas in the other XML Prep script. Like maybe we add a note of the proxy size in the comment for each shot, and then use that to “Auto Scale” each shot were the proxy size is different from the online resolution vs going back to the _prepped xml.
Thanks for the kind words, and that’s a great point to raise.
The good news is that the proxy size is already in the XML — Premiere writes it per clipitem in <file>/media/video/samplecharacteristics/width/height. So there’s no need to add a note in the comment; the information is there for every shot.
What the XML doesn’t contain is the online resolution. So the tool reads the proxy size from the XML, and measures the online size on the Flame side, per segment: after creating the Action it saves the setup and reads ResWidth/ResHeight from the # layers block — that is the actual image entering the Action. The factor is simply:
k = proxy_width / action_layer_width
Since Premiere’s scale = 100 means “1 proxy pixel = 1 sequence pixel”, that resolves uniquely, and it works per shot, so a timeline mixing HD proxies against 4K/6K/8K onlines is handled without any manual input. The factor goes on a separate scale_fix Axis between the Premiere Axis and the surface, so Premiere’s own numbers stay readable on the original Axis.
If you end up trying it and something doesn’t behave as expected, just let me know.
Does the proxy metadata still work when the user used “scale to framesize” in Premiere? and what if you link proxies inside of premiere (( which is the right way to do it btw ))
Example:
a 1920x1080 timeline
UHD “halfres” Proxy file
8K (16/9) raw media .
Editor drags proxy clip into timeline, its scaled to 100% by default, they they hit “scale to frame size”
This LEAVES all scale transform keys on 100% but the proxy size is now bascially 1920x1080 as there is a 50% scale BEFORE the timeline that you cant see or i ASSUME read out via xml , right ?
and then the other thing to consider which is actually the best way to deal with it imho , but might trip the scripts up? idk needs investigation:
If you load in the raw clips into premiere and attach half/quaterres proxies and then export a XML the
scale values are based on original media res not on proxy res (GOOD) so its directly action compatible, so no scaling needed (so we would need a button to skip scaling the actions and just fix them from the bug) - HOWEVER again if they use scale to frame size it allready all breaks .
“easy” enough to tell people to not use that scale to framesize button but we need maybe some more smart workarounds in order to covert it
On Premiere’s Scale to Frame Size — there’s nothing about it in the XML, so I can’t support it. The only way would be a separate script that exports that information from Premiere itself.
On proxies, something was off there, so I’m uploading a fixed version. That should handle proxies properly now.
I’ve fixed a few other things that weren’t right as well. What this conversion covers:
source in-point drift on speed-changed clips
cut drift when stills (jpg and the like) are in the timeline
in-point drift on media whose frame rate differs from the sequence
reproducing Premiere’s scale, position and rotation in Flame
What it can’t do:
Premiere’s Scale to Frame Size
frame hold segments
Neither is in the XML, so there’s nothing to reproduce them from.
Let me know if anything else comes up. Thanks to you I found things I hadn’t noticed myself.
Thank you
Yes, maybe there should be a radio button to set the proxy size to timeline res with a letterbox fit as thats what scale to frame size does (basically) its easy to see / but maybe hard to code around as if you have a lot of 4K footage thats at 100% scale in a HD timeline there probably was another scale before that.
One other thing you can do thats even more elaborate - you can parse the proroj instead of the xml and get a bunch kore information , its also just a xml formatted file (but i do understand - you cant always get the proj files
This is the way… and if you run mcp bridges to scope any 2 apps at once, you can translate/propagate just about anything instantly. I’ve been receiving offlines with all the tw/scale done in AE, and having scoped everything, now it’s just one click to propagate anything into batch. Bézier curves match perfectly
I can share the AE code but AE is still extendscript. I think Premiere is moving on
Friends - we are working on building out the Logik Github organization so we can share things like this. Give us a couple of weeks and it should be up and running. Then we can combine our forces into one project instead of individuals all working towards the same result with different paths.
Let me know if you have any suggestions or feedback!
I’ve updated the Fix Premiere XML script in the Logik Portal to include a lot of @ken5319’s work as well as @KuleshovEffect’s work like remove xml crap while not changing everything about the original script. Now it’ll adjust for anchor points, adjust the framerate of stills (flag as sequence framerate), and adjust durations of clips with fades/dissolves and following segments on a timeline. It also injects the Offline/proxy resolution into a comment of a clip so you can Auto Scale using both the Offline and Online resolution. The way it works is:
Run the xml prep script in the mediaHub as usual.
Import prepped xml and conform (don’t adjust actions)
Once everything has been linked, run XML Prep → Auto Scale
a. There are two options here, but you never know which one to try.
If things line up, you’re done. If they don’t, you can use XML Prep → Auto Scale Undo
If needed, run Auto Scale again with the other option