AVVideoProfileLevelH264High41破解iPhone 4

AVVideoProfileLevelH264High41破解iPhone 4,第1张

概述我正在使用AVAssetWriter压缩视频,该代码适用于iOS7中的iPhone 5和4.我试图使用AVVideoProfileLevelH264High41的AVVideoProfileLevelKey来获得比基线或主配置文件更好的压缩.该代码适用于iOS7与iPhone 5,但在iPhone 4上发生以下错误.下面的错误中列出的大多数这些配置文件另外不起作用. 有人知道如果高分辨率的压缩在i 我正在使用AVAssetWriter压缩视频,该代码适用于iOS7中的iPhone 5和4.我试图使用AVVIDeoProfileLevelH264High41的AVVIDeoProfileLevelKey来获得比基线或主配置文件更好的压缩.该代码适用于iOS7与iPhone 5,但在iPhone 4上发生以下错误.下面的错误中列出的大多数这些配置文件另外不起作用.

有人知道如果高分辨率的压缩在iPhone 4上不起作用,苹果文档只说明它需要iOS6或更高版本.

> 2013-12-10 18:26:37.637 VIDeoCompression[677:3707] *** Terminating app> due to uncaught exception 'NSinvalidargumentexception',reason: '***> `-[AVAssetWriterinput initWithMediaType:outputSettings:sourceFormatHint:]` For compression> property ProfileLevel,vIDeo codec type avc1 only allows the following> values: H264_Baseline_1_3,H264_Baseline_3_0,H264_Baseline_3_1,> H264_Baseline_4_1,H264_Main_3_0,H264_Main_3_1,H264_Main_3_2,> H264_Main_4_0,H264_Main_4_1,H264_Main_5_0,H264_High_5_0,> H264_Baseline_autoLevel,H264_Main_autoLevel,H264_High_autoLevel'> *** First throw call stack: (0x2fd76f4b 0x3a1066af 0x2ec5d833 0x2ec5d70b 0x2ec5d67d 0xbd001 0xbba59 0x3a5e9d1b 0x3a5ea293 0x3a5ea6f7> 0x3a5fc8f9 0x3a5fcb79 0x3a72bdbf 0x3a72bc84) libc++abi.dylib:> terminating with uncaught exception of type NSExceptionNSDictionary *codecSettings = [NSDictionary dictionaryWithObjectsAndKeys:                                           [NSNumber numberWithInteger:[bitrateTF.text intValue]],AVVIDeoAverageBitRateKey,[NSNumber numberWithInt:[maxkeyframeintervalTF.text intValue]],AVVIDeoMaxKeyFrameIntervalKey,**AVVIDeoProfileLevelH264High41,AVVIDeoProfileLevelKey,**                                           vIDeoCleanAperturesettings,AVVIDeoCleanApertureKey,vIDeoAspectRatioSettings,AVVIDeoPixelAspectRatioKey,nil];NSDictionary *vIDeoSettings = [NSDictionary dictionaryWithObjectsAndKeys:                                       AVVIDeoCodecH264,AVVIDeoCodecKey,AVVIDeoScalingModeResizeAspectFill,AVVIDeoScalingModeKey,codecSettings,AVVIDeoCompressionPropertIEsKey,[NSNumber numberWithInt:[wIDthTF.text intValue]],AVVIDeoWIDthKey,[NSNumber numberWithInt:[heightTF.text intValue]],AVVIDeoHeightKey,//AVVIDeoScalingModeFit,nil];self.assetWriterVIDeoinput = [AVAssetWriterinput assetWriterinputWithMediaType:AVMediaTypeVIDeo outputSettings:vIDeoSettings];self.assetWriterVIDeoinput.transform = self.transformAssetWriter;[self.assetWriter addinput:self.assetWriterVIDeoinput];
解决方法 您无法使用iPhone4在ProfileLevelH264High41中进行编码,仅支持iPhone4S 总结

以上是内存溢出为你收集整理的AVVideoProfileLevelH264High41破解iPhone 4全部内容,希望文章能够帮你解决AVVideoProfileLevelH264High41破解iPhone 4所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1057700.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存