timeValue, timeScale and SMPTE – II

Glenn Anderson at the QuickTime-API mailing list answered to my question as follows :

On 10.5 there is also QTStringFromSMPTETime. You could use
QTMakeTimeScaled to get a time in the frame rate you want, fill out an
SMPTETime record, and pass it to QTStringFromSMPTETime. I’m not seeing
a convenient API for turning a frame number in to a SMPTETime.

A more general case that handles different frame rates isn’t simple,
as a QuickTime movie can handle arbitrary frame rates, and doesn’t
need to have a consistent frame rate, where SMPTE time code only
supports certain fixed frame rates. To try and do this as a general
case, you would need to look at the timescale of the movie, and the
durations of the frames, and try and work out if that is consistent
and what the best SMTPE frame rate is that would represent that. This
is further complicated by NTSC frame rates often being incorrectly set
as exactly 29.97fps, when it should be exactly 30/1.001, or rounded
values close to those.


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: