2

朋友我尝试在我的应用程序中使用以下代码从 .mov 导出到 .aif。文件正在导出正确。但文件格式类型是 AAC。那么你能告诉我如何在可可应用程序中导出aif格式吗?但文件仅保存为 .aif 文件。但它只显示AAC。我想要 AIFF 格式。

在该导出文件中显示每个样本的位没有任何内容。但是我从 quciktime 播放器手动将 mov 导出为 m4a 格式。在我从 itune 导出 m4a 到 aiff 导出之后。格式正确。请告诉我我错过或错误的地方

[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;  
4

1 回答 1

1

我有点晚了,但以防万一......AVFileTypeAIFF而不是AVFileTypeAppleM4A;

于 2015-11-26T19:43:45.200 回答