0

I need to load a movie file, insert several frames in the beginning of it, and save the video file (preserving it's original video and audio format, which is important).

QTKit Overview document describes how to retrieve and apply different filters to the existing movie. But how to add new frames, without changing the rest of the movie? Could you point me in the right direction? Thanks!

O.W.Grant
  • 163
  • 11

1 Answers1

0

To add frames to the movie use

[QTMovie addImage:forDuration:withAttributes:]

Save the movie into the file:

[movie writeToFile:fileName withAttributes:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:QTMovieFlatten]]

This will create a new video file preserving the original codec.

Davyd Geyl
  • 4,578
  • 1
  • 28
  • 35