1,420
社区成员
发帖
与我相关
我的任务
分享
let exportSession = AVAssetExportSession(asset: composition, presetName: AVAssetExportPresetHighestQuality)
exportSession?.outputFileType = AVFileType.mov
exportSession?.outputURL = URL(fileURLWithPath: path)
exportSession?.shouldOptimizeForNetworkUse = true
exportSession?.videoComposition = videoComposition
exportSession?.exportAsynchronously {
DispatchQueue.main.async {
if exportSession?.status == .completed {
completeHandler(path, nil)
} else {
completeHandler(nil, exportSession?.error)
}
}
}
exportSession?.videoComposition = videoComposition