Cocoa QTMovie - How can i change the duration of each frame being added to my movie?

StackOverflow https://stackoverflow.com/questions/3602727

  •  25-09-2019
  •  | 
  •  

Question

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];
}
Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top