这是一些代码段:
AVURLAsset *songAsset = [AVURLAsset URLAssetWithURL:assetURL options:nil];
AVAssetExportSession *exporter = [[AVAssetExportSession alloc]
initWithAsset: songAsset
presetName: AVAssetExportPresetAppleM4A];
NSLog (@"created exporter. supportedFileTypes: %@", exporter.supportedFileTypes);
exporter.outputFileType = @"com.apple.m4a-audio";
[exporter exportAsynchronouslyWithCompletionHandler:^{}.....
我用它从 ipod 库中导出 m4a。
这个m4a文件的大小是10M。
我可以通过设置比特率的采样率来压缩m4a吗?
谢谢!
最佳答案
您不能直接指定它。您唯一的选择是:
NSString *const AVAssetExportPresetLowQuality;
NSString *const AVAssetExportPresetMediumQuality;
NSString *const AVAssetExportPresetHighestQuality;
关于iphone - 我可以分配由 AVAssetExportSession 导出的 m4a 的采样率或比特率吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10223302/