Ios AVAssetWriter错误代码561211770
我正在尝试使用图像/音频创建电影文件。音频输出格式属性Ios AVAssetWriter错误代码561211770,ios,iphone,Ios,Iphone,我正在尝试使用图像/音频创建电影文件。音频输出格式属性 { AVFormatIDKey : @(kAudioFormatMPEG4AAC), AVEncoderBitRateKey : @120000, AVNumberOfChannelsKey : @1, AVSampleRateKey : @44100.0 }; { AVVideoCodecKey : AVVideoCodecH264, AVVideoWidthKey : @(600), AVVideoHeightKey : @(400)
{ AVFormatIDKey : @(kAudioFormatMPEG4AAC), AVEncoderBitRateKey : @120000, AVNumberOfChannelsKey : @1, AVSampleRateKey : @44100.0 };
{ AVVideoCodecKey : AVVideoCodecH264, AVVideoWidthKey : @(600), AVVideoHeightKey : @(400) };
视频输出格式属性
{ AVFormatIDKey : @(kAudioFormatMPEG4AAC), AVEncoderBitRateKey : @120000, AVNumberOfChannelsKey : @1, AVSampleRateKey : @44100.0 };
{ AVVideoCodecKey : AVVideoCodecH264, AVVideoWidthKey : @(600), AVVideoHeightKey : @(400) };
当我在AVAssetWriter上使用CompletionHandler完成写操作时,我在iPhone 7上收到此错误消息。完全相同的代码适用于iPhone 4s/5s
由于错误域=AVFoundationErrorDomain,未保存
代码=-11800“操作无法完成”
UserInfo={NSLocalizedDescription=操作无法完成,
NSUnderlyingError=0x14e1eb90{Error Domain=NSOSStatusErrorDomain
代码=561211770“(null)”},NSLocalizedFailureReason=未知错误
发生(561211770)}
这个特定的错误代码是什么意思?谢谢。不久前我用过它。这是我使用的设置:
settings = [NSDictionary dictionaryWithObjectsAndKeys:
[ NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,
[ NSNumber numberWithInt: ch], AVNumberOfChannelsKey,
[ NSNumber numberWithFloat: rate], AVSampleRateKey,
[ NSNumber numberWithInt: 64000 ], AVEncoderBitRateKey,
nil];
从基础视频接收的通道数和采样器数