wgp*_*ubs 16 video-capture objective-c avfoundation ios4 avassetwriter
一直试图弄明白这一点,但没有成功.
我可以写视频输出没问题...但是一旦我尝试引入第二个AVAssetWriterInput来包含音频,最后的quicktime电影是跳跃的,帧左右丢失,音频不断进出.
谢谢 - wg
如果您包含源代码,我们也许能够为您提供更多帮助,但这是一种方法,我已经成功地将许多音频和视频轨道写入快速电影 \xe2\x80\x93 我使用单个 AVMutableComposition 与 AVMutableVideoComposition 和 AVAudioMix 。然后我这样写:
\n\nAVAssetExportSession *session = [[[AVAssetExportSession alloc] initWithAsset:[project.composition copy] presetName:presetName] retain];\n session.outputFileType = [session.supportedFileTypes objectAtIndex:0];\n session.outputURL = [NSURL fileURLWithPath:[VeporterAppDelegate createMoviePath]];\n session.videoComposition = project.videoComposition;\n session.audioMix = project.audioMix;\n\n session.metadata = project.metadata;\n\n [session exportAsynchronouslyWithCompletionHandler:^{}];\nRun Code Online (Sandbox Code Playgroud)\n