views:

369

answers:

3

With the new video features in AVFoundation that are included with iOS4, it is possible to access the raw video frames as they are captured by the camera by using AVCaptureVideoDataOutput.

I would like to overlay text and other information on top of these frames, then output them to a movie file which at some point will be saved to the asset library.

Unfortunately it doesn't appear that Apple has given us an easy way to save these frames to a movie file.

What are my options for saving the frames to a movie file that will be compatible with the asset library?

Is there any way to accomplish this using only the iPhone SDK?

If not, what third party libraries exist that are iPhone compatible and could be utilized to accomplish this?

A: 

I've found no included means for either encoding the frames captured with AVCaptureVideoDataOutput or writing them to a Quicktime .mov file.

You may want to look at ffmpeg to see if it meets your needs—it can handle both the container format and encoding.

Art Gillespie
Any other options besides ffmpeg that I should look at?
Avalanchis
A: 

AVCaptureMovieFileOutput lets you capture data to a QuickTime movie, maybe this helps...

majestix508
Yes, but if I use AVCaptureMovieFileOutput, then I can't use AVCaptureVideoDataOutput to manipulate the frame data.
Avalanchis
A: 

Hey! If you just need to do some sort of watermarks over your video then it would be easy just to capture movie with your camera and then use AVVideoCompositionCoreAnimationTool of AVVideoComposition. You can add any sorts of animation, texts as overlay for your video.

Steve