How to get the Start Timecode (SMPTE) of a Quicktime-Movie?


April 2019


896 time


I'm working on Windows with the Quicktime-API and I wonder, how to get the start timecode (SMPTE) of a movie file? Can someone post a link or an example how to do that?

1 answers


You'll need to get the timecode track's media handler using {GetMovieIndTrackType(theMovie, 1, TimeCodeMediaType, movieTrackMediaType)}, {GetTrackMedia}, {GetMediaHandler}. Go to the beginning of the movie, then use {TCGetCurrentTimeCode} and possibly {TCTimeCodeToString} to get the current time code. Alternatively look at {TCFrameNumberToTimeCode} with frame set to the first frame of the movie.

If you have several TC tracks with each not spanning all of the movie, you might have to loop over GetMovieIndTrackType to get the right one.