tags:

views:

28

answers:

1

I am creating a movie by addoing image frames to my QTMovie, every frame is suppose to show up for about 0.2 seconds. But the closest I have got was 1 second per frame. I tried etering amounts less than 1 into my QTTime but that way my movie length would be 0 seconds, the documentation doesn't describe what the parameters in QTMakeTime are. Any idea how to achieve this?

QTTime frameDuration = QTMakeTime(1, 1);
for (//here goes my loop to read each frame)
{
     [movie addImage:img forDuration:frameDuration withAttributes:dict];
}
A: 

the second parameterf is the number of frames per second QTTime frameDuration = QTMakeTime(1, 7); this means 7 frames per second which worked fine

aryaxt
Not *frames* per second exactly (the image lasts exactly one frame; the duration expresses the length of that frame in time), but you've got the math of it right. Here's Apple's definition: http://developer.apple.com/mac/library/documentation/QuickTime/RM/MovieInternals/MTTimeSpace/B-Chapter/2MovieTimeandSpace.html#//apple_ref/doc/uid/TP40000911-MovieTimeandSpace-TimeCoordinateSystems
Peter Hosey