从Cocoa应用程序中的.mov导出音频(aiff)文件格式
朋友,我尝试从.mov导出到.aif,在我的应用程序中使用了下面的代码。文件正在正确导出。但文件格式类型为AAC。所以,您能告诉我如何在cocoa应用程序中导出aif格式吗。但文件已保存。仅保存aif文件。但它只显示AAC。我想换一种格式 显示每个样本的位在导出文件中不算什么。但我从quciktime player手动将mov导出为m4a格式。在我从iTunes导出m4a到aiff导出后。格式正确。请告诉我遗漏或错误的地方从Cocoa应用程序中的.mov导出音频(aiff)文件格式,cocoa,avfoundation,avassetexportsession,avplayerlayer,Cocoa,Avfoundation,Avassetexportsession,Avplayerlayer,朋友,我尝试从.mov导出到.aif,在我的应用程序中使用了下面的代码。文件正在正确导出。但文件格式类型为AAC。所以,您能告诉我如何在cocoa应用程序中导出aif格式吗。但文件已保存。仅保存aif文件。但它只显示AAC。我想换一种格式 显示每个样本的位在导出文件中不算什么。但我从quciktime player手动将mov导出为m4a格式。在我从iTunes导出m4a到aiff导出后。格式正确。请告诉我遗漏或错误的地方 [manager createDirectoryAtPath:outpu
[manager createDirectoryAtPath:outputURL withIntermediateDirectories:YES attributes:nil error:nil];
outputURL = [outputURL stringByAppendingPathComponent:@"output.aif"];
//Remove Existing File
[manager removeItemAtPath:outputURL error:nil];
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:mixComposition presetName:AVAssetExportPresetAppleM4A];
exportSession.outputURL = [NSURL fileURLWithPath:outputURL]; // output path;
exportSession.outputFileType = AVFileTypeAppleM4A;
exportSession.shouldOptimizeForNetworkUse = YES;
我有点晚了,但万一
AVFileTypeAIFF
而不是AVFileTypeAppleM4A
您需要将mov中使用的音频格式转换为aiff。@volker您能推荐一段要检查的代码吗?