Copy link to clipboard
Copied
Hi there
I’m trying to get the duration of a clip from an exported finalcut pro xml out of premiere pro cc. Somehow it seems my following calculation is wrong. TICKS_PER_SECOND is 254,016,000,000 (Source Post).
TimeInSec = (pproTicksOut / TICKS_PER_SECOND) – (pproTicksIn / TICKS_PER_SECOND)
With example data attached that results in TimeInSec = 37.32. Adobe Premiere shows duration for that clip of “00:00:36:20” (920 Frames).
Is someone able to explain, how to calculate the same duration as premiere with the data given from an exported finalcut pro xml?
Thanks a lot
JW
Example ClipItem Node from exported xml:
<clipitem id="clipitem-13051" frameBlend="FALSE" premiereChannelType="stereo">
<masterclipid>masterclip-4999</masterclipid>
<name>Test_audio.wav</name>
<enabled>TRUE</enabled>
<duration>3750</duration>
<rate>
<timebase>25</timebase>
<ntsc>FALSE</ntsc>
</rate>
<start>82</start>
<end>-1</end>
<in>0</in>
<out>933</out>
<pproTicksIn>0</pproTicksIn>
<pproTicksOut>9479877120000</pproTicksOut>
<file id="file-4999"/>
<sourcetrack>
<mediatype>audio</mediatype>
<trackindex>1</trackindex>
</sourcetrack>
<filter>
<effect>
<name>Audio Levels</name>
<effectid>audiolevels</effectid>
<effectcategory>audiolevels</effectcategory>
<effecttype>audiolevels</effecttype>
<mediatype>audio</mediatype>
<parameter authoringApp="PremierePro">
<parameterid>level</parameterid>
<name>Level</name>
<valuemin>0</valuemin>
<valuemax>3.98109</valuemax>
<value>0.530654</value>
</parameter>
</effect>
</filter>
<link>
<linkclipref>clipitem-13051</linkclipref>
<mediatype>audio</mediatype>
<trackindex>5</trackindex>
<clipindex>1</clipindex>
<groupindex>1</groupindex>
</link>
<link>
<linkclipref>clipitem-13063</linkclipref>
<mediatype>audio</mediatype>
<trackindex>6</trackindex>
<clipindex>1</clipindex>
<groupindex>1</groupindex>
</link>
<logginginfo>
<description></description>
<scene></scene>
<shottake></shottake>
<lognote></lognote>
</logginginfo>
<labels>
<label2>Caribbean</label2>
</labels>
</clipitem>
<transitionitem>
<start>990</start>
<end>1015</end>
<alignment>center</alignment>
<cutPointTicks>121927680000</cutPointTicks>
<rate>
<timebase>25</timebase>
<ntsc>FALSE</ntsc>
</rate>
<effect>
<name>Cross Fade (+3dB)</name>
<effectid>KGAudioTransCrossFade3dB</effectid>
<effecttype>transition</effecttype>
<mediatype>audio</mediatype>
<wipecode>0</wipecode>
<wipeaccuracy>100</wipeaccuracy>
<startratio>0</startratio>
<endratio>1</endratio>
<reverse>FALSE</reverse>
</effect>
</transitionitem>
<!-- Further clipitems -->
Hi guys and thx for your answers
As Eddie said was my confusion that i could calculate back the values to the ones displayed by Premiere. All values are correct. But i think i did the trick for my problem now. Adobe also includes/excludes following transitionitem times under some circumstances. After implement that logic i my own code, i'm able the get the same values as premiere, heureka
Thanks again
Copy link to clipboard
Copied
There are 254016000000 ticks per second.
Copy link to clipboard
Copied
Yea, thats the known part as described in my post.The question is, how to calculate the same time in seconds as Adobe Premiere CC does to get the same results.
Thanks for your help in advance
Copy link to clipboard
Copied
john,
the 37.32 duration is just the same as the in/out duration (0/933).
So the calc is (frame number) / (fps) * 254,016,000,000 to get the ticks.
Copy link to clipboard
Copied
I believe JW understands the calculation. His post includes the correctly calculated time in seconds. What he is asking is why PPro is showing the timecode of the duration of the clip as "00:00:36:20" instead of "00:00:37:08" which is what it should be, given the 25 fps setting.
JW, is it possible the user interface is showing the duration of something else? If you could post a screen shot showing the clip with its properties and the panel that is showing the strange timecode, it would be helpful to figure out where the disconnect is occurring.
Cheers
Eddie
Copy link to clipboard
Copied
Hi guys and thx for your answers
As Eddie said was my confusion that i could calculate back the values to the ones displayed by Premiere. All values are correct. But i think i did the trick for my problem now. Adobe also includes/excludes following transitionitem times under some circumstances. After implement that logic i my own code, i'm able the get the same values as premiere, heureka
Thanks again
Copy link to clipboard
Copied
Hi guys,
I'm getting the picture now. I was just confused because the transition item in the c&p snippet does not seem to overlap with the clipitem.
The basic concept of describing a sequence this way has been around for many years since Final Cut 3 (or maybe even before that), and it does quite make sense.
Good to hear you figured it out and got it working, John!