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
I started with an application that only writes video buffers to a file, and this works fine, producing a ProRes encoded .mov as expected. However when i add the Audio AssetWriterInput to the AssetWriter, the file that gets created appears to be invalid.
But even if your video is a single shot of someone talking, write the visual and audio aspects into your script. The script is a set of directions for whoever is shooting the video, and you want the video team to know, without a doubt, what’s supposed to be happening with both the visual and audio elements.
Before I go there, let’s explore some of the “rules” I often see about writing scripts for video and audio and why I’m not such a fan of them: Use shorter words instead of longer ones. Use contractions instead of full words (e.g., “can’t” instead of “cannot,” and “don’t” instead of “do not”). Use teleprompters or memorize your scripts always.
It’s easy to read and see how the video will look and sound. This is a brief two-column video script example: Add as many boxes as you need to cover all the shots in your video. Depending on the sort of video you’re making, you may need to cram everything into 15 or 30 seconds, or you could have a full three minutes or more to work with.
If you include source we might be able to help you more, but this is a method with which I have had success in writing many audio and video tracks to a quicktime movie – I use a single AVMutableComposition with AVMutableVideoComposition and AVAudioMix. I then write it like so:
AVAssetExportSession *session = [[[AVAssetExportSession alloc] initWithAsset:[project.composition copy] presetName:presetName] retain];
session.outputFileType = [session.supportedFileTypes objectAtIndex:0];
session.outputURL = [NSURL fileURLWithPath:[VeporterAppDelegate createMoviePath]];
session.videoComposition = project.videoComposition;
session.audioMix = project.audioMix;
session.metadata = project.metadata;
[session exportAsynchronouslyWithCompletionHandler:^{}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With