{"id":5678,"date":"2022-05-05T17:28:16","date_gmt":"2022-05-05T09:28:16","guid":{"rendered":"http:\/\/123.57.164.21\/?p=5678"},"modified":"2022-05-05T17:28:16","modified_gmt":"2022-05-05T09:28:16","slug":"avfoundation-%e7%9a%84%e4%b8%80%e4%ba%9b-%e5%9f%ba%e7%a1%80%e7%9f%a5%e8%af%86","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=5678","title":{"rendered":"AVFoundation \u7684\u4e00\u4e9b \u57fa\u7840\u77e5\u8bc6"},"content":{"rendered":"\n<h6 class=\"wp-block-heading\"><strong>\u97f3\u9891\u91c7\u6837<\/strong><\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5927\u81ea\u7136\u4e2d\u7684\u58f0\u97f3\uff0c\u4ed6\u7684\u5f62\u6001\u662f\u4e00\u79cd\u6ce2\u3002\u6211\u4eec\u901a\u8fc7\u91c7\u6837\uff0c\u5c06\u8fd9\u79cd\u6ce2\u91cf\u5316\u6210\u6570\u636e\uff0c\u8bb0\u5f55\u4e0b\u6765\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2022\/05\/\u56fe\u7247.png\" alt=\"\" class=\"wp-image-5679\" width=\"406\" height=\"392\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247.png 1022w, https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247-300x289.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247-768x741.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247-830x801.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247-230x222.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247-350x338.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2022\/05\/\u56fe\u7247-480x463.png 480w\" sizes=\"(max-width: 406px) 100vw, 406px\" \/><\/figure><\/div>\n\n\n\n<p>\u5982\u4e0a\u56fe\u6240\u793a\uff0c\u91c7\u6837\u7684\u6570\u636e\u5e76\u4e0d\u80fd\u5b8c\u6574\u7684\u8fd8\u539f\u51fa\u539f\u6765\u7684\u6ce2\u5f62\uff0c\u53ea\u80fd\u505a\u5230\u5c3d\u91cf\u63a5\u8fd1\u539f\u6ce2\u5f62\u3002\u5e76\u4e14\u91c7\u6837\u7387\uff08\u91c7\u6837\u7684\u6b21\u6570\uff09\u8d8a\u9ad8\uff0c\u6ce2\u5f62\u8d8a\u63a5\u8fd1\u539f\u6ce2\u5f62\u3002\u4e0d\u8fc7\u91c7\u6837\u7684\u6b21\u6570\u589e\u591a\uff0c\u5fc5\u7136\u4f1a\u5bfc\u81f4\u5b58\u50a8\u7684\u6570\u636e\u91cf\u8981\u589e\u52a0\uff0c\u6240\u4ee5\u6211\u4eec\u4e0d\u53ef\u80fd\u65e0\u9650\u63d0\u5347\u91c7\u6837\u7387\u3002\u7ecf\u8fc7\u957f\u671f\u7684\u7814\u7a76\u4eba\u4eec\u53d1\u73b0\uff0c\u5f53\u91c7\u6837\u7387\u7b49\u4e8e\u6ce2\u5f62\u4e2d\u6700\u9ad8\u9891\u7387\u76842\u500d\u65f6\uff0c\u5df2\u7ecf\u8db3\u591f\u5c06\u6ce2\u5f62\u8fd8\u539f\u5230\u53ef\u63a5\u53d7\u7684\u7a0b\u5ea6\u4e86\u3002\u8fd9\u4e2a\u9891\u7387\u79f0\u4e3a<a href=\"https:\/\/link.jianshu.com?t=http:\/\/baike.baidu.com\/link?url=uznAc6udCar8O7I3kwBt_QZhRByp4_79Y-TaGDoCAmp_jCYyNCFqkLAdZ_mVwkmbKxuhLwEM4gErQy01HwkgL_\" target=\"_blank\" rel=\"noreferrer noopener\">\u5948\u594e\u65af\u7279\u9891\u7387<\/a>\u3002\u4eba\u8033\u80fd\u63a5\u53d7\u7684\u6700\u9ad8\u9891\u7387\u4e3a20kHz\uff0c\u6240\u4ee5\u53ea\u8981\u91c7\u6837\u7387\u8d85\u8fc740kHz\uff0c\u5c31\u53ef\u4ee5\u5448\u73b0\u51fa\u53ef\u63a5\u53d7\u7684\u58f0\u97f3\u3002\u76ee\u524d\u5e38\u89c1\u7684CD\u91c7\u6837\u7387\u4e3a44.1kHz\u3002<\/p>\n\n\n\n<p>\u9664\u4e86\u91c7\u6837\u7387\u4e4b\u5916\uff0c\u97f3\u9891\u91c7\u6837\u8fd8\u6709\u4e00\u4e2a\u91cd\u8981\u53c2\u6570\u53eb\u505a<a href=\"https:\/\/link.jianshu.com?t=http:\/\/zhidao.baidu.com\/link?url=Af7OKj4bCFEp5LK3nGgIrrAOcv8wP0onN_u_fevah0ENxmSQl-HOSGeylSrpJrp6IO1ETCtGA6IKUCXhGiuAwHVvjovypCOYar_zOQaXnQa\" target=\"_blank\" rel=\"noreferrer noopener\">\u97f3\u9891\u7684\u4f4d\u5143\u6df1\u5ea6<\/a>\u3002\u8868\u793a\u7528\u591a\u5c11\u4f4d(bit)\u5b9a\u4e49\u7ebf\u6027\u7ef4\u5ea6\u4e0a\u7684\u79bb\u6563\u5ea6\u6765\u4fdd\u5b58\u4e00\u4e2a\u97f3\u9891\u6837\u672c\u3002\u4f4d\u6570\u8d8a\u9ad8\uff0c\u79bb\u6563\u5ea6\u8d8a\u591a\uff0c\u8868\u793a\u7684\u58f0\u97f3\u8d8a\u7cbe\u786e\uff08\u97f3\u8d28\u8d8a\u597d\uff09\u3002\u4e00\u822c\u6765\u8bf416bit\u6bd4\u8f83\u5e38\u89c1\uff0c\u53ef\u4ee5\u8868\u793a65536\u4e2a\u79bb\u6563\u5ea6\u3002<\/p>\n\n\n\n<p>\u4e00\u4e2a\u97f3\u9891\u6587\u4ef6\u7684\u4f53\u79ef\uff0c\u6709\u5982\u4e0b\u7b97\u6cd5\uff1a<code>\u4f53\u79ef=\u91c7\u6837\u7387*\u4f4d\u5143\u6df1\u5ea6*\u97f3\u9053\u6570*\u65f6\u95f4<\/code>\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">\u97f3\u9891\u538b\u7f29<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u5bf9\u58f0\u97f3\u8fdb\u884c\u91c7\u6837\u3001\u91cf\u5316\u8fc7\u7a0b\u88ab\u79f0\u4e3a\u8109\u51b2\u7f16\u7801\u8c03\u5236\uff08Pulse Code Modulation\uff09\uff0c\u76f4\u63a5\u8109\u51b2\u7f16\u7801\u8c03\u5236(Linear Pulse Code Modulation)\u4ea7\u751f\u7684\u6570\u636e\u79f0\u4e3aLinear PCM\u6570\u636e\uff0cLPCM\u6570\u636e\u662f\u6700\u539f\u59cb\u7684\u97f3\u9891\u6570\u636e\u5b8c\u5168\u65e0\u635f\uff0c\u4f46\u662f\u4ed6\u7684\u4f53\u79ef\u975e\u5e38\u5927\uff0c\u6bd4\u5982\u4e00\u4e2a44.1kHz\uff0c16bit\uff0c\u53cc\u97f3\u9053\u7684\u97f3\u9891\u6587\u4ef6\uff0c\u6bcf\u5206\u949f\u7684\u6570\u636e\u91cf\u4e3a44.1*16*2*60kbit=10.3M\u3002\u4e00\u4e2a\u666e\u901a5\u5206\u949f\u7684\u97f3\u4e50\u5c31\u5f9750M\uff0c\u8fd9\u4e2a\u6570\u636e\u91cf\u5bf9\u666e\u901a\u7528\u6237\u6765\u8bf4\u662f\u8fc7\u4e8e\u5e9e\u5927\u7684\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u8bde\u751f\u4e86\u4e00\u7cfb\u5217\u7684\u538b\u7f29\u7b97\u6cd5\uff0c\u5176\u4e2d\u4e3b\u8981\u5206\u4e3a\u6709\u65e0\u635f\u538b\u7f29\uff08ALAC\u3001APE\u3001FLAC\uff09\u548c\u6709\u635f\u538b\u7f29\uff08MP3\u3001AAC\u3001OGG\u3001WMA\uff09\u4e24\u79cd\u3002\u5176\u5177\u4f53\u7684\u538b\u7f29\u7b97\u6cd5\u5bf9\u5e94\u5230AVFoundation\u7684<code>CoreAudioTypes.h<\/code>\u4e2d\u6709\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CF_ENUM(AudioFormatID)\n{\n    kAudioFormatLinearPCM               = 'lpcm',\n    kAudioFormatAC3                     = 'ac-3',\n    kAudioFormat60958AC3                = 'cac3',\n    kAudioFormatAppleIMA4               = 'ima4',\n    kAudioFormatMPEG4AAC                = 'aac ',\n    kAudioFormatMPEG4CELP               = 'celp',\n    kAudioFormatMPEG4HVXC               = 'hvxc',\n    kAudioFormatMPEG4TwinVQ             = 'twvq',\n    kAudioFormatMACE3                   = 'MAC3',\n    kAudioFormatMACE6                   = 'MAC6',\n    kAudioFormatULaw                    = 'ulaw',\n    kAudioFormatALaw                    = 'alaw',\n    kAudioFormatQDesign                 = 'QDMC',\n    kAudioFormatQDesign2                = 'QDM2',\n    kAudioFormatQUALCOMM                = 'Qclp',\n    kAudioFormatMPEGLayer1              = '.mp1',\n    kAudioFormatMPEGLayer2              = '.mp2',\n    kAudioFormatMPEGLayer3              = '.mp3',\n    kAudioFormatTimeCode                = 'time',\n    kAudioFormatMIDIStream              = 'midi',\n    kAudioFormatParameterValueStream    = 'apvs',\n    kAudioFormatAppleLossless           = 'alac',\n    kAudioFormatMPEG4AAC_HE             = 'aach',\n    kAudioFormatMPEG4AAC_LD             = 'aacl',\n    kAudioFormatMPEG4AAC_ELD            = 'aace',\n    kAudioFormatMPEG4AAC_ELD_SBR        = 'aacf',\n    kAudioFormatMPEG4AAC_ELD_V2         = 'aacg',    \n    kAudioFormatMPEG4AAC_HE_V2          = 'aacp',\n    kAudioFormatMPEG4AAC_Spatial        = 'aacs',\n    kAudioFormatAMR                     = 'samr',\n    kAudioFormatAMR_WB                  = 'sawb',\n    kAudioFormatAudible                 = 'AUDB',\n    kAudioFormatiLBC                    = 'ilbc',\n    kAudioFormatDVIIntelIMA             = 0x6D730011,\n    kAudioFormatMicrosoftGSM            = 0x6D730031,\n    kAudioFormatAES3                    = 'aes3',\n    kAudioFormatEnhancedAC3             = 'ec-3'\n};\n<\/pre>\n\n\n\n<h6 class=\"wp-block-heading\">\u8272\u5f69\u4e8c\u6b21\u62bd\u6837<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u7ecf\u8fc7\u5927\u91cf\u7684\u7814\u7a76\u8868\u660e\uff0c\u4eba\u7684\u773c\u775b\u5bf9\u4eae\u5ea6\u975e\u5e38\u654f\u611f\uff0c\u4f46\u662f\u5bf9\u8272\u5f69\u4fe1\u606f\u6bd4\u8f83\u8fdf\u949d\u3002<a href=\"https:\/\/link.jianshu.com?t=http:\/\/baike.baidu.com\/link?url=uzAKqqx5WHQ8uzf3nof6psfXhwYFiK_58kq7RzahQn0FINyBydspn0922il4TlBAyjgRlftdHkmdzoGIqbBr8q\" target=\"_blank\" rel=\"noreferrer noopener\">\u8272\u5f69\u4e8c\u6b21\u62bd\u6837<\/a>\u662f\u6307\u5728\u539f\u6709\u7684\u56fe\u7247\u6837\u672c\u4e2d\uff0c\u4e8c\u6b21\u62bd\u6837\uff0c\u51cf\u5c11\u5bf9\u8272\u5f69\u4fe1\u606f\u7684\u62bd\u6837\uff0c\u800c\u8fbe\u5230\u51cf\u5c0f\u56fe\u7247\u4f53\u79ef\uff08\u6837\u672c\u6570\u51cf\u5c0f\uff09\uff0c\u53c8\u4e0d\u600e\u4e48\u5f71\u54cd\u56fe\u7247\u8d28\u91cf\uff08\u773c\u775b\u5bf9\u8272\u5f69\u4e0d\u654f\u611f\uff09\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u89c6\u9891\u6570\u636e\u4f7f\u7528\u7684\u662fYCbCr\u7684\u989c\u8272\u6a21\u578b\uff0c<a href=\"https:\/\/link.jianshu.com?t=http:\/\/baike.baidu.com\/link?url=akHeVBwkpYoLuiv0Y5It_O1IeeO34zWl2PwR1MkdjBtbvP0pdidUA0iXZQCDiCFf-HkrWk5mohBkwOQ0rxRcG_\" target=\"_blank\" rel=\"noreferrer noopener\">YCbCr<\/a>\u4e5f\u79f0\u4e3aYUV\u3002\u5176\u4e2dY\u8868\u793a\u4eae\u5ea6\u5206\u91cf\uff0cCb\u8868\u793a\u84dd\u8272\u5206\u91cf\uff0cCr\u8868\u793a\u7ea2\u8272\u5206\u91cf\u3002<br>\u5e38\u7528\u7684YCbCr\u67094:4:4\u30014:2:2\u30014:2:0\u30014:1:1\u3002<\/p>\n\n\n\n<ul><li>4:4:4 \u4eae\u5ea6\u548c\u8272\u5f69\u4fe1\u606f\u7684\u6bd4\u503c\u4e3a1:1\uff0c\u6240\u6709\u8272\u5f69\u4fe1\u606f\u90fd\u4f1a\u88ab\u62bd\u6837\uff0c\u4e5f\u5c31\u662f\u5168\u5f69\u3002<\/li><li>4:2:2 \u4eae\u5ea6\u548c\u8272\u5f69\u4fe1\u606f\u7684\u6bd4\u503c\u4e3a2:1\uff0c\u53ea\u67091\/2\u7684\u8272\u5f69\u4fe1\u606f\u88ab\u62bd\u6837<\/li><li>4:2:0\u548c4:1:1 \u4eae\u5ea6\u548c\u8272\u5f69\u4fe1\u606f\u6bd4\u503c\u4e3a4:1\uff0c\u53ea\u67091\/4\u7684\u8272\u5f69\u4fe1\u606f\u88ab\u62bd\u6837<\/li><\/ul>\n\n\n\n<p>\u5bf9\u5e94\u5230AVFoundation\u7684<code>CVImageBuffer.h<\/code>\u4e2d\u6709\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferChromaSubsamplingKey __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0);        \/\/ CFString\/CFNumber with one of the following values\nCV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferChromaSubsampling_420 __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0);\nCV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferChromaSubsampling_422 __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0);\nCV_EXPORT const CFStringRef CV_NONNULL kCVImageBufferChromaSubsampling_411 __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_4_0);\n<\/pre>\n\n\n\n<p>\u4e00\u4e9b\u7279\u522b\u4e13\u4e1a\u7684\u76f8\u673a\u53ef\u80fd\u4f1a\u7528\u52304:4:4\u53c2\u6570\u6355\u6349\u56fe\u7247\uff0c\u5927\u90e8\u5206\u60c5\u51b5\u4e0b\u4f1a\u75284:2:2\u53c2\u6570\uff0c\u666e\u901a\u7684\u6444\u50cf\u5934\uff08\u5982\uff1aiPhone\u6444\u50cf\u5934\uff09\u4e00\u822c\u90fd\u662f4:2:0\u30014:1:1<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">H.264<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u8ddf\u97f3\u9891\u6587\u4ef6\u76f8\u6bd4\uff0c\u89c6\u9891\u6587\u4ef6\u4f53\u79ef\u66f4\u5927\u3002\u6211\u4eec\u5e73\u65f6\u4f7f\u7528\u7684\u89c6\u9891\u6587\u4ef6\u90fd\u662f\u7ecf\u8fc7\u538b\u7f29\u5904\u7406\u7684\u3002\u5927\u90e8\u5206\u97f3\u89c6\u9891\u90fd\u4f7f\u7528\u7f16\u89e3\u7801\u5668(codec)\u6765\u8fdb\u884c\u538b\u7f29\u548c\u89e3\u538b\uff0ciOS\u4e2d\u4f7f\u7528\u7684\u4e3b\u8981\u7f16\u89e3\u7801\u5668\u6807\u51c6\u4e3a<a href=\"https:\/\/link.jianshu.com?t=http:\/\/baike.baidu.com\/link?url=t7bMVaWYsO9F8HEOAol5xcSYo6y0Yzno_y2lY_AsL8KADZkkH3XHCIvdi0kEaPIZA1FfhX2Wlkl2_lS0SLiDRq\" target=\"_blank\" rel=\"noreferrer noopener\">H.264<\/a>\uff0cH.264\u5bf9\u5e94AVFoundation\u7684<code>AVVideoSettings.h<\/code>\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">AVF_EXPORT NSString *const AVVideoCodecKey \/* NSString (CMVideoCodecType) *\/                NS_AVAILABLE(10_7, 4_0);\n    AVF_EXPORT NSString *const AVVideoCodecH264 \/* @\"avc1\" *\/                               NS_AVAILABLE(10_7, 4_0);<\/pre>\n\n\n\n<p>H.264\u901a\u8fc7\u7a7a\u95f4\u548c\u65f6\u95f42\u4e2a\u7ef4\u5ea6\u6765\u538b\u7f29\u4f53\u79ef\uff1a<\/p>\n\n\n\n<ul><li>\u7a7a\u95f4\uff1a\u7a7a\u95f4\u4e0a\u7684\u538b\u7f29\u72ec\u7acb\u4e8e\u89c6\u9891\u5e27\uff0c\u4e5f\u79f0\u4e3a\u5e27\u5185\u538b\u7f29\u3002\u4e3b\u8981\u901a\u8fc7\u538b\u7f29\u56fe\u7247\u7684\u65b9\u5f0f\uff08\u5982\u8272\u5f69\u4e8c\u6b21\u62bd\u6837\u7b49\uff09\u6765\u51cf\u5c0f\u4f53\u79ef\uff0c\u5e27\u5185\u538b\u7f29\u4e00\u822c\u4e3a\u6709\u635f\u538b\u7f29<\/li><li>\u65f6\u95f4\uff1a\u65f6\u95f4\u4e0a\u7684\u538b\u7f29\u4e5f\u79f0\u4e3a\u5e27\u95f4\u538b\u7f29\u3002\u89c6\u9891\u662f\u7531\u8fde\u7eed\u7684\u5e27\uff08\u56fe\u7247\uff09\u7ec4\u6210\u3002\u4e00\u6bb5\u89c6\u9891\u4e2d\uff08\u5f88\u591a\u5f20\u56fe\u7247\uff09\u6709\u5f88\u591a\u4e0d\u53d8\u7684\u5197\u4f59\u5143\u7d20\uff0c\u901a\u8fc7\u51cf\u5c0f\u8fd9\u4e9b\u5197\u4f59\u5143\u7d20\u6765\u8fbe\u5230\u538b\u7f29\u7684\u76ee\u7684\uff0c\u8fd9\u5c31\u662f\u5e27\u95f4\u538b\u7f29\uff0c\u5e27\u95f4\u538b\u7f29\u4e00\u822c\u4e3a\u65e0\u635f\u538b\u7f29<\/li><\/ul>\n\n\n\n<p>H.264\u67093\u79cdprofile\uff0c\u7528\u4e8e\u786e\u5b9a\u7f16\u7801\u8fc7\u7a0b\u4e2d\u5e27\u95f4\u538b\u7f29\u4f7f\u7528\u7684\u7b97\u6cd5:<\/p>\n\n\n\n<ul><li>BaseLine\uff1a\u8fd9\u4e2a\u6807\u51c6\u63d0\u4f9b\u4e86\u6700\u4f4e\u6548\u7684\u538b\u7f29\uff0c\u7ecf\u8fc7\u8fd9\u4e2a\u6807\u51c6\u538b\u7f29\u540e\u7684\u6587\u4ef6\u4f53\u79ef\u4efb\u7136\u6bd4\u8f83\u5927\uff0c\u4f46\u662f\u8fd9\u79cd\u7b97\u6cd5\u8ba1\u7b97\u5f3a\u5ea6\u6700\u5c0f<\/li><li>Main\uff1a\u8fd9\u4e2a\u6807\u51c6\u7684\u8ba1\u7b97\u5f3a\u5ea6\u6bd4BaseLine\u5927\uff0c\u4f46\u662f\u80fd\u8fbe\u5230\u66f4\u9ad8\u7684\u538b\u7f29\u6548\u679c<\/li><li>High\uff1a\u8fd9\u4e2a\u6807\u51c6\u80fd\u8fbe\u5230\u6700\u9ad8\u8d28\u91cf\u7684\u538b\u7f29\u6548\u679c\uff0c\u4f46\u4ed6\u7684\u538b\u7f29\u7b97\u6cd5\u6700\u590d\u6742<\/li><\/ul>\n\n\n\n<p>H.264\u9664\u4e86profile\u8fd8\u6709\u4e00\u4e2a\u7b49\u7ea7(Level)\u6807\u51c6\uff0cLevel\u662f\u5bf9\u81ea\u8eab\u7279\u6027\u7684\u4e00\u4e9b\u63cf\u8ff0(\u7801\u7387\uff0c\u5206\u8fa8\u7387,fps\u7b49)\uff0cLevel\u8d8a\u9ad8\uff0c\u89c6\u9891\u7684\u7801\u7387\u3001\u5206\u8fa8\u7387\u3001fps\u8d8a\u9ad8\u3002<\/p>\n\n\n\n<p>\u5bf9\u5e94AVfoundation\u7684<code>AVVideoSettings.h<\/code>\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">AVF_EXPORT NSString *const AVVideoProfileLevelKey \/* NSString, H.264 only, one of: *\/                    NS_AVAILABLE(10_8, 4_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264Baseline30 \/* Baseline Profile Level 3.0 *\/        NS_AVAILABLE(10_8, 4_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264Baseline31 \/* Baseline Profile Level 3.1 *\/        NS_AVAILABLE(10_8, 4_0);\n       AVF_EXPORT NSString *const AVVideoProfileLevelH264Baseline41 \/* Baseline Profile Level 4.1 *\/        NS_AVAILABLE(10_8, 5_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264BaselineAutoLevel \/* Baseline Profile Auto Level *\/ NS_AVAILABLE(10_9, 7_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264Main30 \/* Main Profile Level 3.0 *\/                NS_AVAILABLE(10_8, 4_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264Main31 \/* Main Profile Level 3.1 *\/                NS_AVAILABLE(10_8, 4_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264Main32 \/* Main Profile Level 3.2 *\/                NS_AVAILABLE(10_8, 5_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264Main41 \/* Main Profile Level 4.1 *\/                NS_AVAILABLE(10_8, 5_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264MainAutoLevel \/* Main Profile Auto Level *\/        NS_AVAILABLE(10_9, 7_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264High40 \/* High Profile Level 4.0 *\/                NS_AVAILABLE(10_9, 6_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264High41 \/* High Profile Level 4.1 *\/                NS_AVAILABLE(10_9, 6_0);\n    AVF_EXPORT NSString *const AVVideoProfileLevelH264HighAutoLevel \/* High Profile Auto Level *\/        NS_AVAILABLE(10_9, 7_0);\n<\/pre>\n\n\n\n<p>\u4e00\u4e9b\u79fb\u52a8\u8bbe\u5907\uff08\u624b\u673a\u3001\u6e38\u620f\u673a\u3001PMP\uff09\u7531\u4e8e\u6027\u80fd\u6709\u9650\uff0c\u4e0d\u652f\u6301\u5168\u90e8\u9ad8\u7ea7\u89c6\u9891\u538b\u7f29\u7279\u6027\u548c\u9ad8\u5206\u8fa8\u7387\u56fe\u50cf\uff0c\u53ea\u652f\u6301\u57fa\u7840\u538b\u7f29\u7279\u6027\u548c\u5206\u8fa8\u7387\u4f4e\u4e00\u4e9b\u7684\u56fe\u50cf\u3002<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">\u89c6\u9891\u7801\u7387(bitRate)<\/h6>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u7801\u7387\u662f\u6307\u5355\u4f4d\u65f6\u95f4\u5185\u4f20\u8f93\u7684\u6570\u636e\u4f4d\u6570\u3002<code>\u89c6\u9891\u4f53\u79ef=\u89c6\u9891\u7801\u7387*\u65f6\u95f4<\/code>\uff0c\u7531\u6b64\u53ef\u89c1\u56fa\u5b9a\u957f\u5ea6\u7684\u89c6\u9891\uff0c\u7801\u7387\u662f\u51b3\u5b9a\u5927\u5c0f\u7684\u552f\u4e00\u56e0\u7d20\u3002\u89c6\u9891\u7801\u7387\u51b3\u5b9a\u7740\u89c6\u9891\u7684\u538b\u7f29\u6548\u679c\uff0c\u4e5f\u51b3\u5b9a\u4e86\u89c6\u9891\u662f\u8d28\u91cf\u3002\u7801\u7387\u8d8a\u9ad8\uff0c\u8d28\u91cf\u8d8a\u597d\uff0c\u4f53\u79ef\u8d8a\u5927\u3002\u7801\u7387\u8d8a\u4f4e\uff0c\u4f53\u79ef\u8d8a\u5c0f\uff0c\u89c6\u9891\u8d28\u91cf\u4e5f\u8d8a\u5dee\u3002<br>\u7f16\u7801\u65f6\uff0c\u6839\u636e\u7801\u7387\u53ef\u4ee5\u5206\u4e3a\u56fa\u5b9a\u7801\u7387(CBR)\u7f16\u7801\u548c\u53ef\u53d8\u7801\u7387(VBR)\u7f16\u7801\u3002<\/p>\n\n\n\n<ul><li>\u56fa\u5b9a\u7801\u7387\uff1a\u6307\u7f16\u7801\u5668\u8f93\u51fa\u7684\u7801\u7387\u4e00\u76f4\u4e3a\u4e00\u4e2a\u56fa\u5b9a\u503c\uff0c\u8fd9\u79cd\u7f16\u7801\u65b9\u5f0f\u8ba1\u7b97\u91cf\u5c0f\uff0c\u7f16\u7801\u901f\u5ea6\u5feb\uff0c\u4f46\u662f\u7f16\u7801\u6548\u679c\u4e0d\u600e\u4e48\u597d\u3002\u5bf9\u4e8e\u753b\u9762\u53d8\u5316\u5927\u7684\u89c6\u9891\u7247\u6bb5\uff0c\u7531\u4e8e\u7801\u7387\u9650\u5236\uff0c\u5bfc\u81f4\u89c6\u9891\u975e\u5e38\u6a21\u7cca\uff0c\u7136\u800c\u5bf9\u4e8e\u753b\u9762\u53d8\u5316\u5c0f\u7684\u7247\u6bb5\uff0c\u5374\u4f1a\u9020\u6210\u7801\u7387\u6d6a\u8d39\u3002<\/li><li>\u53ef\u53d8\u7801\u7387\uff1a\u6307\u7f16\u7801\u5668\u7684\u8f93\u51fa\u7801\u7387\u53ef\u4ee5\u6839\u636e\u7f16\u7801\u5668\u7684\u8f93\u5165\u6e90\u4fe1\u53f7\u7684\u590d\u6742\u5ea6\u81ea\u9002\u5e94\u7684\u8c03\u6574\uff0c\u8fd9\u79cd\u65b9\u5f0f\u7f16\u7801\u6548\u679c\u6bd4\u8f83\u597d<\/li><\/ul>\n\n\n\n<p>\u7801\u7387\u5bf9\u5e94\u4e8eAVFoundation\u4e2d<code>AVVideoSettings.h<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">AVF_EXPORT NSString *const AVVideoAverageBitRateKey \/* NSNumber (bits per second, H.264 only) *\/         NS_AVAILABLE(10_7, 4_0);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u97f3\u9891\u91c7\u6837 \u5927\u81ea\u7136\u4e2d\u7684\u58f0\u97f3\uff0c\u4ed6\u7684\u5f62\u6001\u662f\u4e00\u79cd\u6ce2\u3002\u6211\u4eec\u901a\u8fc7\u91c7\u6837\uff0c\u5c06\u8fd9\u79cd\u6ce2\u91cf\u5316\u6210\u6570\u636e\uff0c\u8bb0\u5f55\u4e0b\u6765\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a \u5982\u4e0a\u56fe\u6240 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/5678"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5678"}],"version-history":[{"count":5,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/5678\/revisions"}],"predecessor-version":[{"id":5684,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/5678\/revisions\/5684"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}