I want to export every frame in a *.mov-Movie-File, so I do this:
GoToBeginningOfMovie(movie);
TimeValue startPoint = 0;
long gnitFrames = 0;
while (startPoint >= 0) {
GetMovieNextInterestingTime(movie, nextTimeStep, 0, &whichMediaType, startPoint, 0, &startPoint, NULL);
gnitFrames++;
}
the problem is, the count of gnitFrames
is different (many more) than when I call this:
Track track = GetMovieIndTrack(movie, 1);
Media media = GetTrackMedia(track);
OSType mediatype;
MediaHandler mediahandler = GetMediaHandler(media);
GetMediaHandlerDescription(media, &mediatype, nil, nil);
MediaGetName(mediahandler, medianame, 0, nil);
long nsamples = GetMediaSampleCount(media);
nsamples
gives me the correct frame-count. So now my question: how can I do that to get to every frame in a movie just once? (When I export the frame now after I called GetNextInterestingTime
, a frame is exported multiple times, sometimes even 25 times)
My operating system is Windows XP.