views:

269

answers:

1

How can i access the raw footage from movies taken with my camera, so i can edit or transform the raw footage ( eg: make it black/white ).

I know that you can load a mov with AVAsset make a composition with different AVAsset's and then export it to a new movie, but how do i access so i can edit the movie.

A: 

I don't know the whole process, but I know some:

You might need to use AV Foundation Framework and perhaps Core Video Framework to process individual frames. You will probably use AVWriter:

AVAssetWriter *videoWriter = [[AVAssetWriter alloc] initWithURL:
                              [NSURL fileURLWithPath:path]
                                            fileType:AVFileTypeQuickTimeMovie
                                               error:&error];

You can maintain a pixel buffer using AVFoundation or CV, and then write it like (this example is for CV):

[pixelBufferAdaptor appendPixelBuffer:buffer withPresentationTime:kCMTimeZero];

To get frames, AVAssetStillImageGenerator isn't really sufficient.

Alternatively, There may be a filter or instruction that can be used with AVVideoMutableComposition, AVMutableComposition, or AVAssetExportSession.

If you have made progress since you asked in August, please post as I'm interested!

Peter DeWeese
i'm now experimenting with the avassetwriter but it's only out since 4.1
Andy Jacobs