FORUMS: list search recent posts

Time Unit Calculation

COW Forums : Apple Final Cut Pro Legacy

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Pierre-Andre Malbrough
Time Unit Calculation
on Jun 3, 2013 at 8:14:41 pm

I am trying to customize a fcpxml and cant tell what unit of measurement the "duration" tag indicates:

What is "2917.699951"?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.0">
<project>
<resources>
<format id="f1"/>
<asset id="r1" name="2001-02-11-sac_night_side_1.mp3" uid="nlfCPHaGRK2gxWUwYo0t" src="file://localhost/Volumes/music/audio/2001/2001-02-11-sac_night_side_1.mp3" start="0s" duration="64335744.000000/22050.000000s" hasVideo="0" hasAudio="1" audioSources="1" audioChannels="1" audioRate="22050.000000"/>
</resources>
<clip name="2001-02-11-sac_night_side_1.mp3" start="0/30s" duration="2917.699951s" format="f1">
<audio ref="r1" start="0/30s" duration="2917.699951s" offset="0/30s" role="dialogue"/>
<marker start="463.933319s" duration="1/30s" value="better ressurection"/>
</clip>
</project>
</fcpxml>


Return to posts index

Michael Gissing
Re: Time Unit Calculation
on Jun 3, 2013 at 10:49:57 pm

My guess is samples in kHz. Is the clip 60 seconds approx? If you divide the number by 48 it is just over 60 seconds. That is assuming a sample rate of 48kHz.

Also the clip is mp3, a codec badly handled by FCP. It should have been converted to aif or wav 16 or 24 bit 48khz before editing.


Return to posts index

Pierre-Andre Malbrough
Re: Time Unit Calculation
on Jun 4, 2013 at 2:50:35 am

Thanks for the post.

The duration of this whole track is actually 25:06 min

I think you're on to something though, I'm thinking that number is somehow related to the frame/bit rate. These XMLs are meant for tagging video at a particular point in time (relative to audio). If you have any further insight as to the formula I would use to deduce the actual point in time (preferably in units of seconds/milliseconds/minutes) that would be awesome.

Thanks!


Return to posts index


Pierre-Andre Malbrough
Re: Time Unit Calculation
on Jun 4, 2013 at 2:59:53 am

Here is another example of one of a video track:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fcpxml>
<fcpxml version="1.0">
<project>
<resources>
<format id="f1" frameDuration="1/29s" width="640.000000" height="480.000000"/>
<asset id="r1" name="1985-11-10-Berkeley_part_2.m4v" uid="O2wWMxasJdyRavHND5dJ" src="video/1985/1985-11-10-Berkeley_part_2.m4v" start="0/29s" duration="136647/29s" hasVideo="1" hasAudio="1" audioSources="1" audioChannels="2" audioRate="48000.000000"/>
</resources>
<clip name="1985-11-10-Berkeley_part_2.m4v" start="0/29s" duration="136647/29s" format="f1">
<video ref="r1" start="0/29s" duration="136647/29s" offset="0/29s">
<audio lane="-1" ref="r1" start="0/29s" duration="136647/29s" offset="0/29s" role="dialogue"/>
</video>
<marker start="43703/29s" duration="1/29s" value="final thought"/>
</clip>
</project>
</fcpxml>


Return to posts index

Pierre-Andre Malbrough
Re: Time Unit Calculation
on Jun 4, 2013 at 3:09:44 am

okay so...from developer documentation, this only partially answers my question but a start:

"Time values are expressed as a rational number of seconds with a 64-bit numerator and a 32-bit denominator. Frame rates for NTSC-compatible media, for example, use a frame duration of "1001/30000s" (29.97 fps) or "1001/60000s" (59.94 fps). If a time value is equal to a whole number of seconds, the fraction may be reduced into whole seconds (for example, ā€œ5sā€)."

I found this by googling "fcpxml audio tag" and clicking on the pdf


Return to posts index

Michael Gissing
Re: Time Unit Calculation
on Jun 4, 2013 at 4:01:47 am

Being a video edit XML I imagine that there is a formula based on frame rate. I know broadcast wav timecode data is based purely on number of samples from a zero point. I am guessing it is for FCPX as roles are mentioned.

However I have no real skill in this area apart from some involvement in beta testing and software development with some audio companies.


Return to posts index


Nick Meyers
Re: Time Unit Calculation
on Jun 4, 2013 at 11:51:39 am

if you ask at the apple developer site, you will definitely get your answer.


nick


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]