avassetwriter

How do I use AVAssetWriter?

Hello! I’d like to take some video frames and encode them into a video. It looks like that’s exactly what AVAssetWriter was meant for, but no matter how I eyeball the docs and Google I can’t find any way to actually use it. From the docs it looks like I need an input (AVAssetWriterInput) to feed the writer from. Fine. But the AVAssetWrit...

How to append a UIImage or CGImage to an AVAssetWriter?

Is it possible to convert a UIImage instance to a CMSampleBufferRef so that it can be appended to a specified output file using AVAssetWriter's appendSampleBuffer: method? If so ... how? Thanks ...

Anyone have an example of how to write audio and video simultaneously using AVAssetWriter?

Been trying to figure this out with zero success. I can write video output no problem ... but once I try to introduce a second AVAssetWriterInput to include audio the final quicktime movie is jumpy with frames being loss left and right and audio constantly going in and out. Thanks - wg ...

IPhone RGBA to ARGB

Hi, Im using glReadPixels to grab screen shots of my opengl scene and then turning them into a video using AVAssetWriter on IOS 4. My problem is i need to pass the alpha channel to the video which only accepts kCVPixelFormatType_32ARGB and glReadPixels on retrieves RGBA. So basically i need a way to convert my RGBA to ARGB, in other wor...

Continuing the prev question of ASSETWriterInput for making Video from UIImages on Iphone Issues

I want a new thread because I like to post some codes , the little comment section wouldn't do it. Thanks peter Deweese previously, but I still have issues.. I have a loop, getting a screen capture 30 times. Each time I got an image I call convert to append that image to video. After that, close the video file so, anything I did w...

How to use CVPixelBufferPool in conjunction with AVAssetWriterInputPixelBufferAdaptor in iphone?

Hi Everybody, I have successfully created video from images using the following code -(void)writeImageAsMovie:(NSArray *)array toPath:(NSString*)path size:(CGSize)size duration:(int)duration { NSError *error = nil; AVAssetWriter *videoWriter = [[AVAssetWriter alloc] initWithURL: [NSURL fileURLWithPath:pat...

progress of AVAssetWriter

How can I calculate the progress of an AVAssetWriter process? So if I have something like: [assetWriterInput requestMediaDataWhenReadyOnQueue:queue usingBlock:^{ while (1){ if ([assetWriterInput isReadyForMoreMediaData]) { CMSampleBufferRef sampleBuffer = [audioMixOutput copyNextSampleBuffer]; if (sampleBuffer) { ...