iOS   发布时间:2022-05-04  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了AVVideoProfileLevelH264High41破解iPhone 4大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

我正在使用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 NSException
NSDictionary *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
@H_618_34@

大佬总结

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

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

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。