1

我正在使用https://developer.apple.com/library/ios/qa/qa1730/_index.html#//apple_ref/doc/uid/DTS40010629上的代码来修剪音频,它一直工作到 iOS 7 更新. 媒体被裁剪到正确的持续时间并按原样播放,但在 iTunes 中查看时,裁剪的剪辑显示的持续时间元数据与原始音频文件相同。任何帮助将不胜感激。谢谢。

更新:

AVMutableMetadataItem *titleMetadata = [[AVMutableMetadataItem alloc] init];
titleMetadata.keySpace = AVMetadataKeySpaceCommon;
titleMetadata.key = AVMetadataCommonKeyTitle;
titleMetadata.value = @"Title";

AVMutableMetadataItem *durationMetadata = [[AVMutableMetadataItem alloc] init];
durationMetadata.keySpace = AVMetadataKeySpaceID3;
durationMetadata.key = AVMetadataID3MetadataKeyLength;
durationMetadata.value = [NSNumber numberWithDouble:30.0];


NSArray *metadeta = [[NSArray alloc] initWithObjects:titleMetadata,durationMetadata, nil];

exporter.metadata = metadeta;
4

0 回答 0