Re: Creating a 30fps QTTime structure?
Re: Creating a 30fps QTTime structure?
- Subject: Re: Creating a 30fps QTTime structure?
- From: Derrick Bass <email@hidden>
- Date: Sun, 1 Apr 2007 17:22:18 -0700
On Apr 1, 2007, at 10:11 AM, Alan Smith wrote:
quicktime-api list is not. If I should have posted this on the
quicktime-api list anyhow, slap me, but not hard.
Slap. (Gently.)
I've done thorough research on this but I still don't know how the
timeValue and timeScale affect each other or… anything. In other
words, how does a QTTime structure represent a time?
QuickTime essentially represents times as rational numbers. Each
movie has a time scale, which represnts the number of ticks per
second of a clock associated with the movie. All movie events happen
on a tick, never between ticks. Each track also has a time scale
(well, technically, it's the media in the track), which can be
different from the movie time scale, and all media durations and
events are also in numbers of ticks.
So, for example, for 25 fps video, most like the video track's media
time scale will be 25 and each frame will have a duration of 1 (i.e.
1/25 seconds). But it could be 2 and 50 or 24 and 600. For 29.97 fps
video, usually the time scale is 2997 and the frame duration is 100
(100/2997 seconds).
So, in a QTTime structure, essentially the timeValue is the numerator
and the timeScale is the denominator of a fraction whose value is the
time it represents.
Derrick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden