{"id":3066,"date":"2021-06-06T21:56:59","date_gmt":"2021-06-06T13:56:59","guid":{"rendered":"http:\/\/123.57.164.21\/?p=3066"},"modified":"2021-06-06T21:56:59","modified_gmt":"2021-06-06T13:56:59","slug":"%e7%a7%bb%e5%8a%a8%e7%ab%af%e9%9f%b3%e8%a7%86%e9%a2%91%e4%bb%8e%e9%9b%b6%e5%88%b0%e4%b8%8a%e6%89%8b","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=3066","title":{"rendered":"\u79fb\u52a8\u7aef\u97f3\u89c6\u9891\u4ece\u96f6\u5230\u4e0a\u624b"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">\u6982\u8ff0<\/h4>\n\n\n\n<p>\u968f\u7740\u6574\u4e2a\u4e92\u8054\u7f51\u7684\u5d1b\u8d77\uff0c\u6570\u636e\u4f20\u9012\u7684\u5f62\u5f0f\u4e5f\u5728\u4e0d\u65ad\u5347\u7ea7\u53d8\u5316\uff0c\u603b\u7684\u6d41\u884c\u8d8b\u52bf\u5982\u4e0b\uff1a<\/p>\n\n\n\n<p>\u7eaf\u6587\u672c\u7684\u77ed\u4fe1\uff0cQQ -> \u7a7a\u95f4\uff0c\u5fae\u535a\uff0c\u670b\u53cb\u5708\u7684\u56fe\u7247\u6587\u5b57\u7ed3\u5408 -> \u5fae\u4fe1\u8bed\u97f3 -> \u5404\u5927\u76f4\u64ad\u8f6f\u4ef6 -> \u6296\u97f3\u5feb\u624b\u77ed\u89c6\u9891<\/p>\n\n\n\n<p>\u97f3\u89c6\u9891\u7684\u53d1\u5c55\u6b63\u5728\u5411\u5404\u4e2a\u884c\u4e1a\u4e0d\u65ad\u6269\u5c55\uff0c\u4ece\u6559\u80b2\u7684\u8fdc\u7a0b\u6388\u8bfe\uff0c\u4ea4\u901a\u7684\u4eba\u8138\u8bc6\u522b\uff0c\u533b\u7597\u7684\u8fdc\u7a0b\u5c31\u533b\u7b49\u7b49\uff0c\u97f3\u89c6\u9891\u65b9\u5411\u5df2\u7ecf\u5360\u636e\u4e00\u4e2a\u76f8\u5f53\u91cd\u8981\u7684\u4f4d\u7f6e\uff0c\u800c\u97f3\u89c6\u9891\u771f\u6b63\u5165\u95e8\u7684\u6587\u7ae0\u53c8\u5c11\u4e4b\u751a\u5c11\uff0c\u4e00\u4e2a\u521a\u6bd5\u4e1a\u5c0f\u767d\u53ef\u80fd\u5f88\u96be\u5207\u5165\u7406\u89e3,\u56e0\u4e3a\u97f3\u89c6\u9891\u4e2d\u6d89\u53ca\u5927\u91cf\u7406\u8bba\u77e5\u8bc6,\u800c\u4ee3\u7801\u7684\u4e66\u5199\u9700\u8981\u7ed3\u5408\u8fd9\u4e9b\u7406\u8bba,\u6240\u4ee5\u641e\u61c2\u97f3\u89c6\u9891,\u7f16\u89e3\u7801\u7b49\u7406\u8bba\u77e5\u8bc6\u81f3\u5173\u91cd\u8981.\u672c\u4eba\u4e5f\u662f\u4ece\u5b9e\u4e60\u5f00\u59cb\u63a5\u89e6\u97f3\u89c6\u9891\u9879\u76ee,\u770b\u8fc7\u5f88\u591a\u4eba\u7684\u6587\u7ae0\uff0c\u5728\u8fd9\u91cc\u603b\u7ed3\u4e00\u4e2a\u901a\u4fd7\u6613\u61c2\u7684\u6587\u7ae0\uff0c\u8ba9\u66f4\u591a\u51c6\u5907\u5b66\u4e60\u97f3\u89c6\u9891\u7684\u540c\u5b66\u66f4\u5feb\u5165\u95e8\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u5212\u91cd\u70b9<\/h4>\n\n\n\n<p>\u672c\u6587\u4e2d\u7406\u8bba\u77e5\u8bc6\u6765\u81ea\u4e8e\u5404\u79cd\u97f3\u89c6\u9891\u6587\u7ae0\u7684\u5f52\u7eb3\u97f3\u89c6\u9891\u7f16\u7801\u57fa\u672c\u539f\u7406\u6c47\u603b,\u5176\u4e2d\u4e5f\u4f1a\u6709\u4e00\u4e9b\u6211\u81ea\u5df1\u603b\u7ed3\u589e\u52a0\u7684\u90e8\u5206.\u82e5\u6709\u9519\u8bef\u53ef\u8bc4\u8bba,\u68c0\u67e5\u540e\u4f1a\u66f4\u6b63.<\/p>\n\n\n\n<p>\u4e3a\u4e86\u9632\u6b62\u5927\u5bb6\u7406\u89e3\u8fc7\u4e8e\u7a7a\u6d1e,\u4f5c\u8005\u82b1\u4e86\u4e09\u4e2a\u6708\u65f6\u95f4\u5c06\u6700\u5e38\u7528,\u6700\u91cd\u8981\u7684\u4e00\u4e9b\u529f\u80fd\u7684\u7406\u8bba\u77e5\u8bc6\u53ca\u5b9e\u6218Demo\u4eb2\u81ea\u5199\u51fa\u6765,\u914d\u5408\u6587\u7ae0\u9605\u8bfb\u6548\u679c\u66f4\u4f73.\u6bcf\u4e00\u90e8\u5206\u7684\u6587\u7ae0\u53ef\u4ee5\u5728\u4e0b\u9762\u6bcf\u7ae0\u7ae0\u8282\u5f00\u59cb\u7684\u6df1\u5165\u5b66\u4e60\u4e2d\u70b9\u51fb\u94fe\u63a5\u67e5\u770b, \u94fe\u63a5\u4e2d\u6587\u7ae0\u5747\u6709Github\u5730\u5740,\u6bcf\u4e2aDemo\u90fd\u4eb2\u6d4b\u53ef\u4ee5\u901a\u8fc7,\u53ef\u4ee5\u4e0b\u8f7dDemo\u8fd0\u884c.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u539f\u7406<\/h4>\n\n\n\n<ul><li>\u91c7\u96c6<\/li><\/ul>\n\n\n\n<p>\u65e0\u8bba\u662fiOS\u5e73\u53f0,\u8fd8\u662f\u5b89\u5353\u5e73\u53f0,\u6211\u4eec\u90fd\u662f\u9700\u8981\u501f\u52a9\u5b98\u65b9\u7684API\u5b9e\u73b0\u4e00\u7cfb\u5217\u76f8\u5173\u529f\u80fd.\u9996\u5148\u6211\u4eec\u8981\u660e\u767d\u6211\u4eec\u60f3\u8981\u4ec0\u4e48,\u6700\u5f00\u59cb\u6211\u4eec\u9700\u8981\u4e00\u90e8\u624b\u673a,\u667a\u80fd\u624b\u673a\u4e2d\u6444\u50cf\u5934\u662f\u4e0d\u53ef\u7f3a\u5c11\u7684\u4e00\u90e8\u5206,\u6240\u4ee5\u6211\u4eec\u901a\u8fc7\u4e00\u4e9b\u7cfb\u7edfAPI\u83b7\u53d6\u5c31\u8981\u53ef\u4ee5\u83b7\u53d6\u7269\u7406\u6444\u50cf\u5934\u5c06\u91c7\u96c6\u5230\u7684\u89c6\u9891\u6570\u636e\u4e0e\u9ea6\u514b\u98ce\u91c7\u96c6\u5230\u7684\u97f3\u9891\u6570\u636e.<\/p>\n\n\n\n<ul><li>\u5904\u7406<\/li><\/ul>\n\n\n\n<p>\u97f3\u9891\u548c\u89c6\u9891\u539f\u59cb\u6570\u636e\u672c\u8d28\u90fd\u662f\u4e00\u5927\u6bb5\u6570\u636e,\u7cfb\u7edf\u5c06\u5176\u5305\u88c5\u8fdb\u81ea\u5b9a\u4e49\u7684\u7ed3\u6784\u4f53\u4e2d,\u901a\u5e38\u90fd\u4ee5\u56de\u8c03\u51fd\u6570\u5f62\u5f0f\u63d0\u4f9b\u7ed9\u6211\u4eec,\u62ff\u5230\u97f3\u89c6\u9891\u6570\u636e\u540e,\u53ef\u4ee5\u6839\u636e\u5404\u81ea\u9879\u76ee\u9700\u6c42\u505a\u4e00\u7cfb\u5217\u7279\u6b8a\u5904\u7406,\u5982: \u89c6\u9891\u7684\u65cb\u8f6c,\u7f29\u653e,\u6ee4\u955c,\u7f8e\u989c,\u88c1\u526a\u7b49\u7b49\u529f\u80fd, \u97f3\u9891\u7684\u5355\u58f0\u9053\u964d\u566a,\u6d88\u9664\u56de\u58f0,\u9759\u97f3\u7b49\u7b49\u529f\u80fd.<\/p>\n\n\n\n<ul><li>\u7f16\u7801<\/li><\/ul>\n\n\n\n<p>\u539f\u59cb\u6570\u636e\u505a\u5b8c\u81ea\u5b9a\u4e49\u5904\u7406\u540e\u5c31\u53ef\u4ee5\u8fdb\u884c\u4f20\u8f93,\u50cf\u76f4\u64ad\u8fd9\u6837\u7684\u529f\u80fd\u5c31\u662f\u628a\u91c7\u96c6\u597d\u7684\u89c6\u9891\u6570\u636e\u53d1\u9001\u7ed9\u670d\u52a1\u5668,\u4ee5\u5728\u7f51\u9875\u7aef\u4f9b\u6240\u6709\u7c89\u4e1d\u89c2\u770b,\u800c\u4f20\u8f93\u7531\u4e8e\u672c\u8eab\u5c31\u662f\u57fa\u4e8e\u7f51\u7edc\u73af\u5883,\u5e9e\u5927\u7684\u539f\u59cb\u6570\u636e\u5c31\u5fc5\u987b\u538b\u7f29\u540e\u624d\u80fd\u5e26\u8d70,\u53ef\u4ee5\u7406\u89e3\u4e3a\u6211\u4eec\u642c\u5bb6\u8981\u5c06\u7269\u54c1\u90fd\u6253\u5305\u5230\u884c\u674e\u7bb1\u8fd9\u6837\u7406\u89e3.<\/p>\n\n\n\n<ul><li>\u4f20\u8f93<\/li><\/ul>\n\n\n\n<p>\u7f16\u7801\u540e\u7684\u97f3\u89c6\u9891\u6570\u636e\u901a\u5e38\u4ee5RTMP\u534f\u8bae\u8fdb\u884c\u4f20\u8f93,\u8fd9\u662f\u4e00\u79cd\u4e13\u95e8\u7528\u4e8e\u4f20\u8f93\u97f3\u89c6\u9891\u7684\u534f\u8bae,\u56e0\u4e3a\u5404\u79cd\u5404\u6837\u7684\u89c6\u9891\u6570\u636e\u683c\u5f0f\u65e0\u6cd5\u7edf\u4e00,\u6240\u4ee5\u9700\u8981\u6709\u4e00\u4e2a\u6807\u51c6\u4f5c\u4e3a\u4f20\u8f93\u7684\u89c4\u5219.\u534f\u8bae\u5c31\u8d77\u5230\u8fd9\u6837\u7684\u4f5c\u7528.<\/p>\n\n\n\n<ul><li>\u89e3\u7801<\/li><\/ul>\n\n\n\n<p>\u670d\u52a1\u7aef\u63a5\u6536\u5230\u6211\u4eec\u9001\u8fc7\u53bb\u7684\u7f16\u7801\u6570\u636e\u540e,\u9700\u8981\u5bf9\u5176\u89e3\u7801\u6210\u539f\u59cb\u6570\u636e,\u56e0\u4e3a\u7f16\u7801\u7684\u6570\u636e\u76f4\u63a5\u9001\u7ed9\u7269\u7406\u786c\u4ef6\u7684\u8bbe\u5907\u662f\u4e0d\u80fd\u76f4\u63a5\u64ad\u653e\u7684,\u53ea\u6709\u89e3\u7801\u4e3a\u539f\u59cb\u6570\u636e\u624d\u80fd\u4f7f\u7528.<\/p>\n\n\n\n<ul><li>\u97f3\u89c6\u9891\u540c\u6b65<\/li><\/ul>\n\n\n\n<p>\u89e3\u7801\u540e\u7684\u6bcf\u5e27\u97f3\u89c6\u9891\u4e2d\u90fd\u542b\u6709\u6700\u5f00\u59cb\u5f55\u5236\u65f6\u5019\u8bbe\u7f6e\u7684\u65f6\u95f4\u6233,\u6211\u4eec\u9700\u8981\u6839\u636e\u65f6\u95f4\u6233\u5c06\u5b83\u4eec\u6b63\u786e\u7684\u64ad\u653e\u51fa\u6765,\u4f46\u662f\u5728\u7f51\u7edc\u4f20\u8f93\u4e2d\u53ef\u80fd\u4f1a\u4e22\u5931\u4e00\u4e9b\u6570\u636e,\u6216\u8005\u662f\u5ef6\u65f6\u83b7\u53d6,\u8fd9\u65f6\u6211\u4eec\u5c31\u9700\u8981\u4e00\u5b9a\u7684\u7b56\u7565\u53bb\u5b9e\u73b0\u97f3\u89c6\u9891\u7684\u540c\u6b65,\u5927\u4f53\u5206\u4e3a\u51e0\u79cd\u7b56\u7565:\u7f13\u5b58\u4e00\u5b9a\u89c6\u9891\u6570\u636e,\u89c6\u9891\u8ffd\u97f3\u9891\u7b49\u7b49.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u63a8\u6d41\uff0c\u62c9\u6d41\u6d41\u7a0b<\/h4>\n\n\n\n<ul><li>\u63a8\u6d41: \u5c06\u624b\u673a\u91c7\u96c6\u5230\u7684\u89c6\u9891\u6570\u636e\u4f20\u7ed9\u540e\u53f0\u64ad\u653e\u7aef\u8fdb\u884c\u5c55\u793a\uff0c\u64ad\u653e\u7aef\u53ef\u4ee5\u662fwindows, linux, web\u7aef\uff0c\u5373\u624b\u673a\u5145\u5f53\u91c7\u96c6\u7684\u529f\u80fd\uff0c\u5c06\u624b\u673a\u6444\u50cf\u5934\u91c7\u96c6\u5230\u89c6\u9891\u548c\u9ea6\u514b\u98ce\u91c7\u96c6\u5230\u7684\u97f3\u9891\u5408\u6210\u7f16\u7801\u540e\u4f20\u7ed9\u5bf9\u5e94\u5e73\u53f0\u7684\u64ad\u653e\u7aef\u3002<\/li><li>\u62c9\u6d41: \u5c06\u64ad\u653e\u7aef\u4f20\u6765\u7684\u89c6\u9891\u6570\u636e\u5728\u624b\u673a\u4e0a\u64ad\u653e,\u63a8\u6d41\u7684\u9006\u8fc7\u7a0b\uff0c\u5373\u5c06windows, linux, web\u7aef\u4f20\u6765\u7684\u89c6\u9891\u6570\u636e\u8fdb\u884c\u89e3\u7801\u540e\u4f20\u7ed9\u5bf9\u5e94\u97f3\u89c6\u9891\u786c\u4ef6\uff0c\u6700\u7ec8\u5c06\u89c6\u9891\u6e32\u67d3\u5728\u624b\u673a\u754c\u9762\u4e0a\u64ad\u653e.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-1024x517.png\" alt=\"\" class=\"wp-image-3071\" width=\"688\" height=\"347\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1024x517.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-300x151.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-768x387.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-830x419.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-230x116.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-350x177.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-480x242.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image.png 1332w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-1-1024x704.png\" alt=\"\" class=\"wp-image-3072\" width=\"679\" height=\"466\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-1024x704.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-300x206.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-768x528.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-830x571.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-230x158.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-350x241.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1-480x330.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-1.png 1306w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h4 class=\"wp-block-heading\">\u5177\u4f53\u5256\u6790<\/h4>\n\n\n\n<p>\u63a8\u6d41\uff0c\u62c9\u6d41\u5b9e\u9645\u4e3a\u4e92\u9006\u8fc7\u7a0b\uff0c\u8fd9\u91cc\u6309\u7167\u4ece\u91c7\u96c6\u5f00\u59cb\u4ecb\u7ecd.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">1. \u91c7\u96c6<\/h5>\n\n\n\n<p>\u91c7\u96c6\u662f\u63a8\u6d41\u7684\u7b2c\u4e00\u4e2a\u73af\u8282\uff0c\u662f\u539f\u59cb\u7684\u97f3\u89c6\u9891\u6570\u636e\u7684\u6765\u6e90.\u91c7\u96c6\u7684\u539f\u59cb\u6570\u636e\u7c7b\u578b\u4e3a\u97f3\u9891\u6570\u636ePCM\uff0c\u89c6\u9891\u6570\u636eYUV,RGB&#8230;\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">1.1. \u97f3\u9891\u91c7\u96c6<\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">1.1.1\u6df1\u5165\u7814\u7a76<\/h5>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903834293108743\">iOS Core Audio\u7b80\u4ecb<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903834385383431\">iOS Audio Session\u7ba1\u7406\u97f3\u9891\u4e0a\u4e0b\u6587<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903834574159879\">iOS Audio Queue\u91c7\u96c6\u64ad\u653e\u97f3\u9891\u6570\u636e<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903842035793933\">iOS Audio Queue\u91c7\u96c6\u97f3\u9891\u6570\u636e\u5b9e\u6218<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903838994923534\">iOS Audio Unit\u91c7\u96c6\u97f3\u9891\u6570\u636e<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903842098872327\">iOS Audio Unit\u91c7\u96c6\u97f3\u9891\u6570\u636e\u5b9e\u6218<\/a><\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">1.1.2\u91c7\u96c6\u6765\u6e90<\/h5>\n\n\n\n<ul><li>\u5185\u7f6e\u9ea6\u514b\u98ce<\/li><li>\u5916\u7f6e\u5177\u6709\u9ea6\u514b\u98ce\u529f\u80fd\u7684\u8bbe\u5907(\u76f8\u673a\uff0c\u8bdd\u7b52&#8230;)<\/li><li>\u7cfb\u7edf\u81ea\u5e26\u76f8\u518c<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">1.1.3\u97f3\u9891\u4e3b\u8981\u53c2\u6570<\/h5>\n\n\n\n<ul><li>\u91c7\u6837\u7387(samplerate): \u6a21\u62df\u4fe1\u53f7\u6570\u5b57\u5316\u7684\u8fc7\u7a0b,\u6bcf\u79d2\u949f\u91c7\u96c6\u7684\u6570\u636e\u91cf,\u91c7\u6837\u9891\u7387\u8d8a\u9ad8,\u6570\u636e\u91cf\u8d8a\u5927,\u97f3\u8d28\u8d8a\u597d\u3002<\/li><li>\u58f0\u9053\u6570(channels): \u5373\u5355\u58f0\u9053\u6216\u53cc\u58f0\u9053 (iPhone\u65e0\u6cd5\u76f4\u63a5\u91c7\u96c6\u53cc\u58f0\u9053\uff0c\u4f46\u53ef\u4ee5\u6a21\u62df,\u5373\u590d\u5236\u4e00\u4efd\u91c7\u96c6\u5230\u7684\u5355\u58f0\u9053\u6570\u636e.\u5b89\u5353\u90e8\u5206\u673a\u578b\u53ef\u4ee5)<\/li><li>\u4f4d\u5bbd: \u6bcf\u4e2a\u91c7\u6837\u70b9\u7684\u5927\u5c0f,\u4f4d\u6570\u8d8a\u591a,\u8868\u793a\u8d8a\u7cbe\u7ec6,\u97f3\u8d28\u8d8a\u597d,\u4e00\u822c\u662f8bit\u621616bit.<\/li><li>\u6570\u636e\u683c\u5f0f: iOS\u7aef\u8bbe\u5907\u91c7\u96c6\u7684\u539f\u59cb\u6570\u636e\u4e3a\u7ebf\u6027PCM\u7c7b\u578b\u97f3\u9891\u6570\u636e<\/li><li>\u5176\u4ed6: \u8fd8\u53ef\u4ee5\u8bbe\u7f6e\u91c7\u6837\u503c\u7684\u7cbe\u5ea6,\u6bcf\u4e2a\u6570\u636e\u5305\u6709\u51e0\u5e27\u6570\u636e,\u6bcf\u5e27\u6570\u636e\u5360\u591a\u5c11\u5b57\u8282\u7b49\u7b49.<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">1.1.4\u97f3\u9891\u5e27<\/h5>\n\n\n\n<p>\u97f3\u9891\u4e0e\u89c6\u9891\u4e0d\u540c,\u89c6\u9891\u6bcf\u4e00\u5e27\u5c31\u662f\u4e00\u5f20\u56fe\u7247,\u97f3\u9891\u662f\u6d41\u5f0f,\u672c\u8eab\u6ca1\u6709\u660e\u786e\u7684\u5e27\u7684\u6982\u5ff5,\u5b9e\u9645\u4e2d\u4e3a\u4e86\u65b9\u4fbf,\u53d62.5ms~60ms\u4e3a\u5355\u4f4d\u7684\u6570\u636e\u4e3a\u4e00\u5e27\u97f3\u9891.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">1.1.5 \u8ba1\u7b97<\/h5>\n\n\n\n<p>\u6570\u636e\u91cf\uff08\u5b57\u8282 \/ \u79d2\uff09=\uff08\u91c7\u6837\u9891\u7387\uff08Hz\uff09* \u91c7\u6837\u4f4d\u6570\uff08bit\uff09* \u58f0\u9053\u6570\uff09\/ 8<\/p>\n\n\n\n<p>\u5355\u58f0\u9053\u7684\u58f0\u9053\u6570\u4e3a1\uff0c\u7acb\u4f53\u58f0\u7684\u58f0\u9053\u6570\u4e3a2. \u5b57\u8282B\uff0c1MB=1024KB = 1024*1024B<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">1.2. \u89c6\u9891\u91c7\u96c6<\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">1.2.1 \u6df1\u5165\u7814\u7a76<\/h5>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903818103095303\">iOS AVCaptureSession\u91c7\u96c6\u89c6\u9891\u6570\u636e<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903818111483918\">iOS AVCaptureSession\u91c7\u96c6\u89c6\u9891\u6570\u636eDemo)<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903582504845319\">\u89c6\u9891\u539f\u59cb\u6570\u636eYUV\u4ecb\u7ecd<\/a><\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">1.2.2 \u91c7\u96c6\u6765\u6e90<\/h5>\n\n\n\n<ul><li>\u6444\u50cf\u5934<\/li><li>\u5c4f\u5e55\u5f55\u5236<\/li><li>\u5916\u7f6e\u5e26\u6444\u50cf\u5934\u91c7\u96c6\u529f\u80fd\u7684\u8bbe\u5907(\u76f8\u673a\uff0cDJI\u65e0\u4eba\u673a\uff0cOSMO&#8230;)<\/li><li>\u7cfb\u7edf\u81ea\u5e26\u76f8\u518c<\/li><\/ul>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u6ce8\u610f: \u50cf\u4e00\u4e9b\u5916\u7f6e\u6444\u50cf\u5934,\u5982\u50cf\u5229\u7528\u6444\u50cf\u673a\u7684\u6444\u50cf\u5934\u91c7\u96c6,\u7136\u540e\u7528\u624b\u673a\u5c06\u6570\u636e\u5904\u7406\u7f16\u7801\u5e76\u53d1\u51fa,\u4e5f\u662f\u53ef\u4ee5\u7684,\u4f46\u662f\u6570\u636e\u7684\u6d41\u5411\u9700\u8981\u6211\u4eec\u89e3\u6790,\u5373\u4ece\u6444\u50cf\u5934\u7684HDMI\u7ebf\u8f6c\u6210\u7f51\u7ebf\u53e3,\u7f51\u7ebf\u53e3\u518d\u8f6cUSB,USB\u8f6c\u82f9\u679cLighting\u63a5\u53e3,\u5229\u7528FFmpeg\u53ef\u4ee5\u83b7\u53d6\u5176\u4e2d\u7684\u6570\u636e.<\/p><\/blockquote>\n\n\n\n<h5 class=\"wp-block-heading\">1.2.3 \u89c6\u9891\u4e3b\u8981\u53c2\u6570<\/h5>\n\n\n\n<ul><li>\u56fe\u50cf\u683c\u5f0f: YUV, RGB (\u5373\u7ea2\u9ec4\u84dd\u4e09\u79cd\u989c\u8272\u6df7\u5408\u7ec4\u6210\u5404\u79cd\u989c\u8272).<\/li><li>\u5206\u8fa8\u7387: \u5f53\u524d\u8bbe\u5907\u5c4f\u5e55\u652f\u6301\u7684\u6700\u5927\u5206\u8fa8\u7387<\/li><li>\u5e27\u7387: \u4e00\u79d2\u949f\u91c7\u96c6\u7684\u5e27\u6570<\/li><li>\u5176\u4ed6: \u767d\u5e73\u8861,\u5bf9\u7126,\u66dd\u5149,\u95ea\u5149\u706f\u7b49\u7b49<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">1.2.4 \u8ba1\u7b97 (RGB)<\/h5>\n\n\n\n<p>1\u5e27\u6570\u636e\u91cf = \u5206\u8fa8\u7387(width * height) * \u6bcf\u4e2a\u50cf\u7d20\u7684\u6240\u5360\u5b57\u8282\u6570(\u4e00\u822c\u662f3\u4e2a\u5b57\u8282)<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u6ce8\u610f\u4e0a\u9762\u8ba1\u7b97\u7684\u65b9\u6cd5\u5e76\u4e0d\u662f\u552f\u4e00\u7684,\u56e0\u4e3a\u89c6\u9891\u7684\u6570\u636e\u683c\u5f0f\u6709\u5f88\u591a\u79cd,\u5982YUV420\u8ba1\u7b97\u65b9\u5f0f\u4e3a<code>\u5206\u8fa8\u7387(width * height) * 3\/2<\/code><\/p><\/blockquote>\n\n\n\n<h5 class=\"wp-block-heading\">1.3. \u7efc\u4e0a\u6240\u8ff0<\/h5>\n\n\n\n<p>\u6211\u4eec\u5047\u8bbe\u8981\u4e0a\u4f20\u7684\u89c6\u9891\u662f1080P 30fps(\u5206\u8fa8\u7387:1920*1080), \u58f0\u97f3\u662f48kHz,\u90a3\u4e48\u6bcf\u79d2\u949f\u6570\u636e\u91cf\u5982\u4e0b:<\/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=\"\">video = 1920 * 1080 * 30 * 3 = 186624000B = 186.624 MB\naudio = (48000 * 16 * 2) \/ 8 = 192000B = 0.192 MB <\/pre>\n\n\n\n<p>\u7531\u6b64\u6211\u4eec\u53ef\u5f97\uff0c\u5982\u679c\u76f4\u63a5\u5c06\u539f\u59cb\u91c7\u96c6\u7684\u6570\u636e\u8fdb\u884c\u4f20\u8f93,\u90a3\u4e48\u4e00\u90e8\u7535\u5f71\u5c31\u9700\u89811000\u591aG\u7684\u89c6\u9891\uff0c\u5982\u679c\u662f\u8fd9\u6837\u5c06\u591a\u4e48\u6050\u6016\uff0c\u6240\u4ee5\u5c31\u6d89\u53ca\u5230\u6211\u4eec\u540e\u9762\u7684\u7f16\u7801\u73af\u8282\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">2. \u5904\u7406<\/h5>\n\n\n\n<h5 class=\"wp-block-heading\">2.1 \u6df1\u5165\u7814\u7a76 (\u5f85\u6dfb\u52a0)<\/h5>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903566197391367\">\u9ad8\u6548\u88c1\u526a\u89c6\u9891<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903566214168590\">\u6839\u636e\u58f0\u97f3\u5927\u5c0f\u5b9e\u73b0\u97f3\u91cf\u67f1\u529f\u80fd<\/a><\/li><\/ul>\n\n\n\n<p>\u4ece\u4e0a\u4e00\u6b65\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u5f97\u5230\u91c7\u96c6\u5230\u7684\u97f3\u9891\u539f\u59cb\u6570\u636e\u548c\u89c6\u9891\u539f\u59cb\u6570\u636e\uff0c\u5728\u79fb\u52a8\u7aef\uff0c\u4e00\u822c\u662f\u901a\u8fc7\u5404\u81ea\u624b\u673a\u5e73\u53f0\u5b98\u65b9API\u4e2d\u62ff\u5230, \u524d\u6587\u94fe\u63a5\u4e2d\u7686\u6709\u5b9e\u73b0\u7684\u65b9\u6cd5.\u4e4b\u540e,\u6211\u4eec\u53ef\u4ee5\u5bf9\u539f\u59cb\u6570\u636e\u52a0\u4ee5\u5904\u7406,\u5bf9\u539f\u59cb\u64cd\u4f5c\u5904\u7406\u53ea\u80fd\u5728\u7f16\u7801\u4e4b\u524d,\u56e0\u4e3a\u7f16\u7801\u540e\u7684\u6570\u636e\u53ea\u80fd\u7528\u4e8e\u4f20\u8f93. \u6bd4\u5982\u53ef \u4ee5\u5bf9\u56fe\u50cf\u5904\u7406<\/p>\n\n\n\n<ul><li>\u7f8e\u989c<\/li><li>\u6c34\u5370<\/li><li>\u6ee4\u955c<\/li><li>\u88c1\u526a<\/li><li>\u65cb\u8f6c<\/li><li>&#8230;<\/li><\/ul>\n\n\n\n<p>\u5bf9\u97f3\u9891\u5904\u7406<\/p>\n\n\n\n<ul><li>\u6df7\u97f3<\/li><li>\u6d88\u9664\u56de\u58f0<\/li><li>\u964d\u566a<\/li><li>&#8230;<\/li><\/ul>\n\n\n\n<p>\u76ee\u524d\u6d41\u884c\u7684\u6709\u5f88\u591a\u5927\u578b\u6846\u67b6\u4e13\u95e8\u7528\u6765\u5904\u7406\u89c6\u9891,\u97f3\u9891,\u5982OpenGL, OpenAL, GPUImage&#8230;\u4ee5\u4e0a\u7684\u5404\u79cd\u5904\u7406\u7f51\u4e0a\u5747\u6709\u5f00\u6e90\u7684\u5e93\u53ef\u4ee5\u5b9e\u73b0,\u57fa\u672c\u539f\u7406\u5c31\u662f,\u6211\u4eec\u62ff\u5230\u539f\u59cb\u7684\u97f3\u89c6\u9891\u5e27\u6570\u636e,\u5c06\u5176\u9001\u7ed9\u5f00\u6e90\u5e93,\u5904\u7406\u5b8c\u540e\u518d\u62ff\u5230\u5904\u7406\u597d\u7684\u97f3\u89c6\u9891\u7ee7\u7eed\u6211\u4eec\u81ea\u5df1\u7684\u6d41\u7a0b.\u5f53\u7136\u5f88\u591a\u5f00\u6e90\u5e93\u4ecd\u9700\u8981\u6839\u636e\u9879\u76ee\u9700\u6c42\u7565\u5fae\u66f4\u6539\u5e76\u5c01\u88c5.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.\u7f16\u7801<\/h5>\n\n\n\n<p>\u6df1\u5165\u7814\u7a76<\/p>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903853800816647\">iOS\u89c6\u9891\u89c6\u9891\u7f16\u7801<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903843927425032\">iOS\u97f3\u9891\u97f3\u9891\u7f16\u7801<\/a><\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">3.1. \u4e3a\u4ec0\u4e48\u8981\u7f16\u7801<\/h5>\n\n\n\n<p>\u5728\u7b2c<code>1.<\/code>\u6b65\u91c7\u96c6\u6700\u540e\u5df2\u7ecf\u8bb2\u5230,\u539f\u59cb\u7684\u89c6\u9891\u6bcf\u79d2\u949f\u5c31\u4ea7\u751f200\u591aMB,\u5982\u679c\u76f4\u63a5\u62ff\u539f\u59cb\u6570\u636e\u4f20\u8f93,\u7f51\u7edc\u5e26\u5bbd\u5373\u5185\u5b58\u6d88\u8017\u662f\u5de8\u5927\u7684,\u6240\u4ee5\u89c6\u9891\u5728\u4f20\u8f93\u4e2d\u662f\u5fc5\u987b\u7ecf\u8fc7\u7f16\u7801\u7684.<\/p>\n\n\n\n<p>\u7c7b\u4f3c\u7684\u4f8b\u5b50\u5c31\u50cf\u6211\u4eec\u5e73\u5e38\u642c\u5bb6,\u5982\u679c\u76f4\u63a5\u642c\u5bb6,\u4e1c\u897f\u5f88\u96f6\u6563,\u9700\u8981\u8dd1\u5f88\u591a\u8d9f\u62ff,\u5982\u679c\u5c06\u8863\u670d,\u7269\u54c1\u6253\u5305,\u6211\u4eec\u4ec5\u4ec5\u9700\u8981\u51e0\u4e2a\u884c\u674e\u7bb1\u5c31\u53ef\u4ee5\u4e00\u6b21\u641e\u5b9a.\u7b49\u6211\u4eec\u5230\u8fbe\u65b0\u5bb6,\u518d\u5c06\u4e1c\u897f\u53d6\u51fa\u6765,\u91cd\u65b0\u5e03\u7f6e,\u7f16\u89e3\u7801\u7684\u539f\u7406\u5c31\u662f\u5982\u6b64.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.2. \u6709\u635f\u538b\u7f29 VS \u65e0\u635f\u538b\u7f29<\/h5>\n\n\n\n<ul><li>\u6709\u635f\u538b\u7f29<\/li><\/ul>\n\n\n\n<p>\u89c6\u9891\u5229\u7528\u4eba\u773c\u7684\u89c6\u89c9\u7279\u6027, \u4ee5\u4e00\u5b9a\u7684\u5ba2\u89c2\u5931\u771f\u6362\u53d6\u6570\u636e\u7684\u538b\u7f29,\u6bd4\u5982\u4eba\u773c\u5bf9\u4eae\u5ea6\u8bc6\u522b\u7684\u9608\u503c,\u89c6\u89c9\u9608\u503c,\u5bf9\u4eae\u5ea6\u548c\u8272\u5ea6\u7684\u654f\u611f\u5ea6\u4e0d\u540c,\u4ee5\u81f3\u4e8e\u53ef\u4ee5\u5728\u7f16\u7801\u65f6\u5f15\u5165\u9002\u91cf\u8bef\u5dee,\u4e0d\u4f1a\u88ab\u5bdf\u89c9\u51fa\u6765.<\/p>\n\n\n\n<p>\u97f3\u9891\u5229\u7528\u4e86\u4eba\u7c7b\u5bf9\u56fe\u50cf\u6216\u58f0\u6ce2\u4e2d\u7684\u67d0\u4e9b\u9891\u7387\u6210\u5206\u4e0d\u654f\u611f\u7684\u7279\u6027\uff0c\u5141\u8bb8\u538b\u7f29\u8fc7\u7a0b\u4e2d\u635f\u5931\u4e00\u5b9a\u7684\u4fe1\u606f\uff1b\u53bb\u9664\u58f0\u97f3\u4e2d\u5197\u4f59\u6210\u5206\u7684\u65b9\u6cd5\u5b9e\u73b0\u3002\u5197\u4f59\u6210\u5206\u6307\u7684\u662f\u97f3\u9891\u4e2d\u4e0d\u80fd\u88ab\u4eba\u8033\u6735\u5bdf\u89c9\u7684\u4fe1\u53f7\uff0c\u5b83\u4eec\u5bf9\u58f0\u97f3\u7684\u97f3\u8272\uff0c\u97f3\u8c03\u7b49\u4fe1\u606f\u6ca1\u6709\u4efb\u4f55\u5e2e\u52a9\u3002\u91cd\u6784\u540e\u7684\u6570\u636e\u4e0e\u539f\u6765\u7684\u6570\u636e\u6709\u6240\u4e0d\u540c\uff0c\u4f46\u4e0d\u5f71\u54cd\u4eba\u5bf9\u539f\u59cb\u8d44\u6599\u8868\u8fbe\u7684\u4fe1\u606f\u9020\u6210\u8bef\u89e3\u3002<\/p>\n\n\n\n<p>\u6709\u635f\u538b\u7f29\u9002\u7528\u4e8e\u91cd\u6784\u4fe1\u53f7\u4e0d\u4e00\u5b9a\u975e\u8981\u548c\u539f\u59cb\u4fe1\u53f7\u5b8c\u5168\u76f8\u540c\u7684\u573a\u5408\u3002<\/p>\n\n\n\n<ul><li>\u65e0\u635f\u538b\u7f29<\/li><\/ul>\n\n\n\n<p>\u89c6\u9891\u7684\u7a7a\u95f4\u5197\u4f59,\u65f6\u95f4\u5197\u4f59,\u7ed3\u6784\u5197\u4f59,\u71b5\u5197\u4f59\u7b49,\u5373\u56fe\u50cf\u7684\u5404\u4e2a\u50cf\u7d20\u95f4\u5b58\u5728\u5f88\u5f3a\u7684\u5173\u8054\u6027,\u6d88\u9664\u8fd9\u4e9b\u5197\u4f59\u4e0d\u4f1a\u5bfc\u81f4\u4fe1\u606f\u4e22\u5931<\/p>\n\n\n\n<p>\u97f3\u9891\u538b\u7f29\u683c\u5f0f\u5219\u662f\u5229\u7528\u6570\u636e\u7684\u7edf\u8ba1\u5197\u4f59\u8fdb\u884c\u538b\u7f29\uff0c\u53ef\u5b8c\u5168\u6062\u590d\u539f\u59cb\u6570\u636e\u800c\u4e0d\u5f15\u8d77\u4efb\u4f55\u5931\u771f\uff0c\u4f46\u538b\u7f29\u7387\u662f\u53d7\u5230\u6570\u636e\u7edf\u8ba1\u5197\u4f59\u5ea6\u7684\u7406\u8bba\u9650\u5236\uff0c\u4e00\u822c\u4e3a2:1\u52305:1\u3002<\/p>\n\n\n\n<p>\u6b63\u56e0\u4e3a\u6709\u7740\u4e0a\u9762\u7684\u538b\u7f29\u65b9\u6cd5,\u89c6\u9891\u6570\u636e\u91cf\u53ef\u4ee5\u6781\u5927\u7684\u538b\u7f29,\u6709\u5229\u4e8e\u4f20\u8f93\u548c\u5b58\u50a8.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.3. \u89c6\u9891\u7f16\u7801<\/h5>\n\n\n\n<p>\u539f\u7406\uff1a\u7f16\u7801\u662f\u5982\u4f55\u505a\u5230\u5c06\u5f88\u5927\u7684\u6570\u636e\u91cf\u53d8\u5c0f\u7684\u5462? \u4e3b\u8981\u539f\u7406\u5982\u4e0b<\/p>\n\n\n\n<ul><li>\u7a7a\u95f4\u5197\u4f59: \u56fe\u50cf\u76f8\u90bb\u50cf\u7d20\u4e4b\u95f4\u6709\u5f88\u5f3a\u7684\u76f8\u5173\u6027<\/li><li>\u65f6\u95f4\u5197\u4f59: \u89c6\u9891\u5e8f\u5217\u7684\u76f8\u90bb\u56fe\u50cf\u4e4b\u95f4\u5185\u5bb9\u76f8\u4f3c<\/li><li>\u7f16\u7801\u5197\u4f59: \u4e0d\u540c\u50cf\u7d20\u503c\u51fa\u73b0\u7684\u6982\u7387\u4e0d\u540c<\/li><li>\u89c6\u89c9\u5197\u4f59: \u4eba\u7684\u89c6\u89c9\u7cfb\u7edf\u5bf9\u67d0\u4e9b\u7ec6\u8282\u4e0d\u654f\u611f<\/li><li>\u77e5\u8bc6\u5197\u4f59: \u89c4\u5f8b\u6027\u7684\u7ed3\u6784\u53ef\u7531\u5148\u524d\u77e5\u8bc6\u548c\u80cc\u666f\u77e5\u8bc6\u5f97\u5230<\/li><\/ul>\n\n\n\n<p>\u538b\u7f29\u7f16\u7801\u7684\u65b9\u6cd5<\/p>\n\n\n\n<ul><li>\u53d8\u6362\u7f16\u7801 (\u4e86\u89e3\u5373\u53ef\uff0c\u5177\u4f53\u8bf7\u8c37\u6b4c)<\/li><\/ul>\n\n\n\n<p>\u5c06\u7a7a\u95f4\u57df\u63cf\u8ff0\u7684\u56fe\u50cf\u4fe1\u53f7\u53d8\u6362\u6210\u9891\u7387\u57df\uff0c\u7136\u540e\u5bf9\u53d8\u6362\u540e\u7684\u7cfb\u6570\u8fdb\u884c\u7f16\u7801\u5904\u7406\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u56fe\u50cf\u5728\u7a7a\u95f4\u4e0a\u5177\u6709\u8f83\u5f3a\u7684\u76f8\u5173\u6027\uff0c\u53d8\u6362\u9891\u7387\u57df\u53ef\u4ee5\u5b9e\u73b0\u53bb\u9664\u76f8\u5173\u4e0e\u80fd\u91cf\u96c6\u4e2d\u3002\u5e38\u7528\u7684\u6b63\u4ea4\u53d8\u6362\u6709\u79bb\u6563\u5085\u91cc\u53f6\u53d8\u6362\uff0c\u79bb\u6563\u4f59\u5f26\u53d8\u6362\u7b49\u7b49\u3002<\/p>\n\n\n\n<ul><li>\u71b5\u7f16\u7801 (\u4e86\u89e3\u5373\u53ef\uff0c\u5177\u4f53\u8bf7\u8c37\u6b4c)<\/li><\/ul>\n\n\n\n<p>\u71b5\u7f16\u7801\u662f\u56e0\u7f16\u7801\u540e\u7684\u5e73\u5747\u7801\u957f\u63a5\u8fd1\u4fe1\u6e90\u71b5\u503c\u800c\u5f97\u540d\u3002\u71b5\u7f16\u7801\u591a\u7528\u53ef\u53d8\u5b57\u957f\u7f16\u7801\uff08VLC\uff0cVariable Length Coding\uff09\u5b9e\u73b0\u3002\u5176\u57fa\u672c\u539f\u7406\u662f\u5bf9\u4fe1\u6e90\u4e2d\u51fa\u73b0\u6982\u7387\u5927\u7684\u7b26\u53f7\u8d4b\u4e88\u77ed\u7801\uff0c\u5bf9\u4e8e\u51fa\u73b0\u6982\u7387\u5c0f\u7684\u7b26\u53f7\u8d4b\u4e88\u957f\u7801\uff0c\u4ece\u800c\u5728\u7edf\u8ba1\u4e0a\u83b7\u5f97\u8f83\u77ed\u7684\u5e73\u5747\u7801\u957f\u3002\u53ef\u53d8\u5b57\u957f\u7f16\u7801\u901a\u5e38\u6709\u970d\u592b\u66fc\u7f16\u7801\u3001\u7b97\u672f\u7f16\u7801\u3001\u6e38\u7a0b\u7f16\u7801\u7b49\u3002<\/p>\n\n\n\n<ul><li>\u8fd0\u52a8\u4f30\u8ba1\u548c\u8fd0\u52a8\u8865\u507f (\u91cd\u8981)<\/li><\/ul>\n\n\n\n<p>\u8fd0\u52a8\u4f30\u8ba1\u548c\u8fd0\u52a8\u8865\u507f\u662f\u6d88\u9664\u56fe\u50cf\u5e8f\u5217\u65f6\u95f4\u65b9\u5411\u76f8\u5173\u6027\u7684\u6709\u6548\u624b\u6bb5\u3002\u4e0a\u9762\u4ecb\u7ecd\u7684\u53d8\u6362\u7f16\u7801\uff0c\u71b5\u7f16\u7801\u90fd\u662f\u5728\u4ee5\u4e00\u5e27\u56fe\u50cf\u7684\u57fa\u7840\u4e0a\u8fdb\u884c\u7684\uff0c\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u6d88\u9664\u56fe\u50cf\u5185\u90e8\u5404\u50cf\u7d20\u5728\u7a7a\u95f4\u4e0a\u7684\u76f8\u5173\u6027\u3002\u5b9e\u9645\u4e0a\u56fe\u50cf\u4fe1\u53f7\u9664\u4e86\u7a7a\u95f4\u4e0a\u7684\u76f8\u5173\u6027\u5916\uff0c\u8fd8\u6709\u65f6\u95f4\u4e0a\u7684\u76f8\u5173\u6027\u3002\u4f8b\u5982\u5bf9\u4e8e\u50cf\u65b0\u95fb\u8054\u64ad\u8fd9\u79cd\u80cc\u666f\u9759\u6b62\uff0c\u753b\u9762\u4e3b\u4f53\u8fd0\u52a8\u8f83\u5c0f\u7684\u6570\u5b57\u89c6\u9891\uff0c\u6bcf\u4e00\u5e45\u753b\u9762\u4e4b\u95f4\u7684\u533a\u522b\u5f88\u5c0f\uff0c\u753b\u9762\u4e4b\u95f4\u7684\u76f8\u5173\u6027\u5f88\u5927\u3002\u5bf9\u4e8e\u8fd9\u79cd\u60c5\u51b5\u6211\u4eec\u6ca1\u6709\u5fc5\u8981\u5bf9\u6bcf\u4e00\u5e27\u56fe\u50cf\u5355\u72ec\u8fdb\u884c\u7f16\u7801\uff0c\u800c\u662f\u53ef\u4ee5\u53ea\u5bf9\u76f8\u90bb\u89c6\u9891\u5e27\u4e2d\u53d8\u5316\u7684\u90e8\u5206\u8fdb\u884c\u7f16\u7801\uff0c\u4ece\u800c\u8fdb\u4e00\u6b65\u51cf\u5c0f\u6570\u636e\u91cf\uff0c\u8fd9\u65b9\u9762\u7684\u5de5\u4f5c\u662f\u7531\u8fd0\u52a8\u4f30\u8ba1\u548c\u8fd0\u52a8\u8865\u507f\u6765\u5b9e\u73b0\u7684\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">a. \u8fd0\u52a8\u4f30\u8ba1\u6280\u672f<\/h5>\n\n\n\n<p>\u5c06\u5f53\u524d\u7684\u8f93\u5165\u56fe\u50cf\u5206\u5272\u6210\u82e5\u5e72\u5f7c\u6b64\u4e0d\u76f8\u91cd\u53e0\u7684\u5c0f\u56fe\u50cf\u5b50\u5757\uff0c\u4f8b\u5982\u4e00\u5e27\u56fe\u50cf\u4e3a1280*720,\u9996\u5148\u5c06\u5176\u4ee5\u7f51\u683c\u72b6\u5f62\u5f0f\u5206\u621040*45\u4e2a\u5c3a\u5bf8\u4e3a16*16\u5f7c\u6b64\u6ca1\u6709\u91cd\u53e0\u7684\u56fe\u50cf\u5757\uff0c\u7136\u540e\u5728\u524d\u4e00\u56fe\u50cf\u6216\u8005\u540e\u4e00\u56fe\u50cf\u67d0\u4e2a\u641c\u7d22\u7a97\u53e3\u7684\u8303\u56f4\u5185\u4e3a\u6bcf\u4e00\u4e2a\u56fe\u50cf\u5757\u5bfb\u627e\u4e00\u4e2a\u4e0e\u4e4b\u6700\u4e3a\u76f8\u4f3c\u7684\u56fe\u50cf\u5757\uff0c\u8fd9\u4e2a\u641c\u5bfb\u7684\u8fc7\u7a0b\u53eb\u505a\u8fd0\u52a8\u4f30\u8ba1\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">b. \u8fd0\u52a8\u8865\u507f<\/h5>\n\n\n\n<p>\u901a\u8fc7\u8ba1\u7b97\u6700\u76f8\u4f3c\u7684\u56fe\u50cf\u5757\u4e0e\u8be5\u56fe\u50cf\u5757\u4e4b\u95f4\u7684\u4f4d\u7f6e\u4fe1\u606f\uff0c\u53ef\u4ee5\u5f97\u5230\u4e00\u4e2a\u8fd0\u52a8\u77e2\u91cf\u3002\u8fd9\u6837\u5728\u7f16\u7801\u7684\u8fc7\u7a0b\u4e2d\u5c31\u53ef\u4ee5\u5c06\u5f53\u524d\u56fe\u50cf\u4e2d\u7684\u5757\u4e0e\u53c2\u8003\u56fe\u50cf\u8fd0\u52a8\u77e2\u91cf\u6240\u6307\u5411\u7684\u6700\u76f8\u4f3c\u7684\u56fe\u50cf\u5757\u76f8\u51cf\uff0c\u5f97\u5230\u4e00\u4e2a\u6b8b\u5dee\u56fe\u50cf\u5757\uff0c\u7531\u4e8e\u6bcf\u4e2a\u6b8b\u5dee\u56fe\u50cf\u5757\u4e2d\u7684\u6bcf\u4e2a\u50cf\u7d20\u503c\u90fd\u5f88\u5c0f\uff0c\u6240\u4ee5\u5728\u538b\u7f29\u7f16\u7801\u4e2d\u53ef\u4ee5\u83b7\u5f97\u66f4\u9ad8\u7684\u538b\u7f29\u6bd4\u3002<\/p>\n\n\n\n<ul><li>\u538b\u7f29\u6570\u636e\u7c7b\u578b<\/li><\/ul>\n\n\n\n<p>I\u5e27: \u53ea\u4f7f\u7528\u672c\u5e27\u5185\u7684\u6570\u636e\u8fdb\u884c\u7f16\u7801\uff0c\u5728\u7f16\u7801\u8fc7\u7a0b\u4e2d\u4e0d\u9700\u8981\u8fdb\u884c\u8fd0\u52a8\u4f30\u8ba1\u548c\u8fd0\u52a8\u8865\u507f\u3002<\/p>\n\n\n\n<p>P\u5e27: \u5728\u7f16\u7801\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u524d\u9762\u7684I\u5e27\u6216P\u5e27\u4f5c\u4e3a\u53c2\u8003\u56fe\u50cf\u7684\u8fd0\u52a8\u8865\u507f\uff0c\u5b9e\u9645\u662f\u5bf9\u5f53\u524d\u56fe\u50cf\u4e0e\u53c2\u8003\u56fe\u50cf\u7684\u5dee\u503c\u8fdb\u884c\u7f16\u7801\u3002<\/p>\n\n\n\n<p>B\u5e27: \u5728\u7f16\u7801\u8fc7\u7a0b\u4e2d\u4f7f\u7528\u524d\u9762\u7684I\u5e27\u6216P\u5e27\u548c\u540e\u9762\u7684I\u5e27\u6216P\u5e27\u8fdb\u884c\u9884\u6d4b\u3002\u7531\u6b64\u53ef\u89c1\uff0c\u6bcf\u4e2aP\u5e27\u5229\u7528\u4e00\u5e27\u56fe\u50cf\u4e3a\u53c2\u8003\u56fe\u50cf\u3002\u800cB\u5e27\u9700\u8981\u4e24\u5e27\u56fe\u50cf\u4f5c\u4e3a\u53c2\u8003\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u5b9e\u9645\u5e94\u7528\u4e2d\u4f7f\u7528\u6df7\u5408\u7f16\u7801(\u53d8\u6362\u7f16\u7801+\u8fd0\u52a8\u4f30\u8ba1\uff0c\u8fd0\u52a8\u8865\u507f+\u71b5\u7f16\u7801)<\/p><\/blockquote>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-2-1024x559.png\" alt=\"\" class=\"wp-image-3087\" width=\"628\" height=\"342\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-1024x559.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-300x164.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-768x419.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-830x453.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-230x126.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-350x191.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2-480x262.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-2.png 1194w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/figure><\/div>\n\n\n\n<ul><li>\u7f16\u7801\u5668<\/li><\/ul>\n\n\n\n<p>\u7ecf\u8fc7\u6570\u5341\u5e74\u7684\u53d1\u5c55\uff0c\u7f16\u7801\u5668\u7684\u529f\u80fd\u5df2\u7ecf\u5341\u5206\u5f3a\u5927\uff0c\u79cd\u7c7b\u7e41\u591a\uff0c\u4e0b\u9762\u4ecb\u7ecd\u6700\u4e3b\u6d41\u7684\u4e00\u4e9b\u7f16\u7801\u5668\u3002<\/p>\n\n\n\n<p><strong>H.264<\/strong>:  \u4e0e\u65e7\u6807\u51c6\u76f8\u6bd4\uff0c\u5b83\u80fd\u591f\u5728\u66f4\u4f4e\u5e26\u5bbd\u4e0b\u63d0\u4f9b\u4f18\u8d28\u89c6\u9891\uff08\u6362\u8a00\u4e4b\uff0c\u53ea\u6709 MPEG-2\uff0cH.263 \u6216 MPEG-4 \u7b2c 2 \u90e8\u5206\u7684\u4e00\u534a\u5e26\u5bbd\u6216\u66f4\u5c11\uff09\uff0c\u4e5f\u4e0d\u589e\u52a0\u592a\u591a\u8bbe\u8ba1\u590d\u6742\u5ea6\u4f7f\u5f97\u65e0\u6cd5\u5b9e\u73b0\u6216\u5b9e\u73b0\u6210\u672c\u8fc7\u9ad8\u3002<\/p>\n\n\n\n<p><strong>H.265\/HEVC<\/strong> :  \u9ad8\u6548\u7387\u89c6\u9891\u7f16\u7801\uff08High Efficiency Video Coding\uff0c\u7b80\u79f0HEVC\uff09\u662f\u4e00\u79cd\u89c6\u9891\u538b\u7f29\u6807\u51c6\uff0c\u88ab\u89c6\u4e3a\u662f ITU-T H.264\/MPEG-4 AVC \u6807\u51c6\u7684\u7ee7\u4efb\u8005\u3002HEVC \u88ab\u8ba4\u4e3a\u4e0d\u4ec5\u63d0\u5347\u89c6\u9891\u8d28\u91cf\uff0c\u540c\u65f6\u4e5f\u80fd\u8fbe\u5230 H.264\/MPEG-4 AVC \u4e24\u500d\u4e4b\u538b\u7f29\u7387\uff08\u7b49\u540c\u4e8e\u540c\u6837\u753b\u9762\u8d28\u91cf\u4e0b\u6bd4\u7279\u7387\u51cf\u5c11\u4e86 50%\uff09.<\/p>\n\n\n\n<p><strong>VP8<\/strong>: VP8 \u662f\u4e00\u4e2a\u5f00\u653e\u7684\u89c6\u9891\u538b\u7f29\u683c\u5f0f\uff0c\u6700\u65e9\u7531 On2 Technologies \u5f00\u53d1\uff0c\u968f\u540e\u7531 Google \u53d1\u5e03\u3002<\/p>\n\n\n\n<p><strong>VP9<\/strong>: VP9 \u7684\u5f00\u53d1\u4ece 2011 \u5e74\u7b2c\u4e09\u5b63\u5f00\u59cb\uff0c\u76ee\u6807\u662f\u5728\u540c\u753b\u8d28\u4e0b\uff0c\u6bd4 VP8 \u7f16\u7801\u51cf\u5c11 50%\u7684\u6587\u4ef6\u5927\u5c0f\uff0c\u53e6\u4e00\u4e2a\u76ee\u6807\u5219\u662f\u8981\u5728\u7f16\u7801\u6548\u7387\u4e0a\u8d85\u8d8a HEVC \u7f16\u7801\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">3.4. \u97f3\u9891\u7f16\u7801<\/h5>\n\n\n\n<ul><li>\u539f\u7406<\/li><\/ul>\n\n\n\n<p>\u6570\u5b57\u97f3\u9891\u538b\u7f29\u7f16\u7801\u5728\u4fdd\u8bc1\u4fe1\u53f7\u5728\u542c\u89c9\u65b9\u9762\u4e0d\u4ea7\u751f\u5931\u771f\u7684\u524d\u63d0\u4e0b\uff0c\u5bf9\u97f3\u9891\u6570\u636e\u4fe1\u53f7\u8fdb\u884c\u5c3d\u53ef\u80fd\u7684\u538b\u7f29\u3002\u6570\u5b57\u97f3\u9891\u538b\u7f29\u7f16\u7801\u91c7\u53d6\u53bb\u9664\u58f0\u97f3\u4e2d\u5197\u4f59\u6210\u5206\u7684\u65b9\u6cd5\u5b9e\u73b0\u3002\u5197\u4f59\u6210\u5206\u6307\u7684\u662f\u97f3\u9891\u4e2d\u4e0d\u80fd\u88ab\u4eba\u8033\u6735\u5bdf\u89c9\u7684\u4fe1\u53f7\uff0c\u5b83\u4eec\u5bf9\u58f0\u97f3\u7684\u97f3\u8272\uff0c\u97f3\u8c03\u7b49\u4fe1\u606f\u6ca1\u6709\u4efb\u4f55\u5e2e\u52a9\u3002<\/p>\n\n\n\n<p>\u5197\u4f59\u4fe1\u53f7\u5305\u542b\u4eba\u8033\u542c\u89c9\u8303\u56f4\u5916\u7684\u97f3\u9891\u4fe1\u53f7\u4ee5\u53ca\u88ab\u63a9\u853d\u6389\u7684\u97f3\u9891\u4fe1\u53f7\u706f\u3002\u4f8b\u5982\uff0c\u4eba\u8033\u80fd\u5bdf\u89c9\u7684\u58f0\u97f3\u9891\u7387\u4e3a20Hz~20kHz,\u51fa\u6b64\u4e4b\u5916\u7684\u5176\u4ed6\u9891\u7387\u4eba\u8033\u65e0\u6cd5\u5bdf\u89c9\uff0c\u90fd\u4e3a\u5197\u4f59\u4fe1\u53f7\u3002\u6b64\u5916\uff0c\u6839\u636e\u4eba\u8033\u542c\u89c9\u7684\u751f\u7406\u548c\u5fc3\u7406\u5b66\u73b0\u8c61\u3002\u5f53\u4e00\u4e2a\u5f3a\u97f3\u4fe1\u53f7\u4e0e\u4e00\u4e2a\u5f31\u97f3\u4fe1\u53f7\u540c\u65f6\u5b58\u5728\u65f6\uff0c\u5f31\u97f3\u4fe1\u53f7\u5c06\u88ab\u5f3a\u97f3\u4fe1\u53f7\u6240\u63a9\u853d\u800c\u542c\u4e0d\u89c1\uff0c\u8fd9\u6837\u5f31\u97f3\u4fe1\u53f7\u5c31\u53ef\u4ee5\u89c6\u4e3a\u5197\u4f59\u4fe1\u53f7\u4e0d\u7528\u4f20\u9001\u3002\u8fd9\u5c31\u662f\u4eba\u8033\u542c\u89c9\u7684\u63a9\u853d\u6548\u5e94\u3002<\/p>\n\n\n\n<ul><li>\u538b\u7f29\u7f16\u7801\u65b9\u6cd5<\/li><\/ul>\n\n\n\n<p><strong>\u9891\u8c31\u63a9\u853d<\/strong>:  \u4e00\u4e2a\u9891\u7387\u7684\u58f0\u97f3\u80fd\u91cf\u5c0f\u4e8e\u67d0\u4e2a\u9608\u503c\u4e4b\u540e\uff0c\u4eba\u8033\u5c31\u4f1a\u542c\u4e0d\u5230\uff0c\u8fd9\u4e2a\u9608\u503c\u79f0\u4e3a\u6700\u5c0f\u53ef\u95fb\u9608\u3002\u5f53\u6709\u53e6\u5916\u80fd\u91cf\u8f83\u5927\u7684\u58f0\u97f3\u51fa\u73b0\u7684\u65f6\u5019\uff0c\u8be5\u58f0\u97f3\u9891\u7387\u9644\u8fd1\u7684\u9608\u503c\u4f1a\u63d0\u9ad8\u5f88\u591a\uff0c\u5373\u6240\u8c13\u7684\u63a9\u853d\u6548\u5e94.\u4eba\u8033\u5bf92KHz\uff5e5KHz\u7684\u58f0\u97f3\u6700\u654f\u611f\uff0c\u800c\u5bf9\u9891\u7387\u592a\u4f4e\u6216\u592a\u9ad8\u7684\u58f0\u97f3\u4fe1\u53f7\u90fd\u5f88\u8fdf\u949d\uff0c\u5f53\u6709\u4e00\u4e2a\u9891\u7387\u4e3a0.2KHz\u3001\u5f3a\u5ea6\u4e3a60dB\u7684\u58f0\u97f3\u51fa\u73b0\u65f6\uff0c\u5176\u9644\u8fd1\u7684\u9608\u503c\u63d0\u9ad8\u4e86\u5f88\u591a\u3002<\/p>\n\n\n\n<p><strong>\u65f6\u57df\u63a9\u853d<\/strong>: \u5f53\u5f3a\u97f3\u4fe1\u53f7\u548c\u5f31\u97f3\u4fe1\u53f7\u540c\u65f6\u51fa\u73b0\u65f6\uff0c\u8fd8\u5b58\u5728\u65f6\u57df\u63a9\u853d\u6548\u5e94\uff0c\u524d\u63a9\u853d\uff0c\u540c\u65f6\u63a9\u853d\uff0c\u540e\u63a9\u853d\u3002\u524d\u63a9\u853d\u662f\u6307\u4eba\u8033\u5728\u542c\u5230\u5f3a\u4fe1\u53f7\u4e4b\u524d\u7684\u77ed\u6682\u65f6\u95f4\u5185\uff0c\u5df2\u7ecf\u5b58\u5728\u7684\u5f31\u4fe1\u53f7\u4f1a\u88ab\u63a9\u853d\u800c\u542c\u4e0d\u5230\u3002<\/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=\"\">    - \u524d\u63a9\u853d\u662f\u6307\u4eba\u8033\u5728\u542c\u5230\u5f3a\u4fe1\u53f7\u4e4b\u524d\u7684\u77ed\u6682\u65f6\u95f4\u5185\uff0c\u5df2\u7ecf\u5b58\u5728\u7684\u5f31\u4fe1\u53f7\u4f1a\u88ab\u63a9\u853d\u800c\u542c\u4e0d\u5230\n    - \u540c\u65f6\u63a9\u853d\u662f\u6307\u5f53\u5f3a\u4fe1\u53f7\u4e0e\u5f31\u4fe1\u53f7\u540c\u65f6\u5b58\u5728\u65f6\uff0c\u5f31\u4fe1\u53f7\u4f1a\u88ab\u5f3a\u4fe1\u53f7\u6240\u63a9\u853d\u800c\u542c\u4e0d\u5230\u3002\n    - \u540e\u63a9\u853d\u662f\u6307\u5f53\u5f3a\u4fe1\u53f7\u6d88\u5931\u540e\uff0c\u9700\u7ecf\u8fc7\u8f83\u957f\u7684\u4e00\u6bb5\u65f6\u95f4\u624d\u80fd\u91cd\u65b0\u542c\u89c1\u5f31\u4fe1\u53f7\uff0c\u79f0\u4e3a\u540e\u63a9\u853d\u3002\u8fd9\u4e9b\u88ab\u63a9\u853d\u7684\u5f31\u4fe1\u53f7\u5373\u53ef\u89c6\u4e3a\u5197\u4f59\u4fe1\u53f7\u3002<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-3-1024x229.png\" alt=\"\" class=\"wp-image-3090\" width=\"700\" height=\"156\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-1024x229.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-300x67.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-768x172.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-830x186.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-230x51.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-350x78.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3-480x107.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-3.png 1234w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">4. \u5c01\u88c5\u7f16\u7801\u6570\u636e<\/h5>\n\n\n\n<p>\u6df1\u5165\u7814\u7a76<\/p>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903888638705678\">iOS\u5b8c\u6574\u63a8\u6d41\u8fc7\u7a0b<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903857097539591\">iOS FFmpeg\u73af\u5883\u642d\u5efa<\/a><\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">4.1 \u5b9a\u4e49<\/h5>\n\n\n\n<p>\u5c01\u88c5\u5c31\u662f\u628a\u7f16\u7801\u5668\u751f\u6210\u7684\u97f3\u9891,\u89c6\u9891\u540c\u6b65\u4ee5\u751f\u6210\u6211\u4eec\u8089\u773c\u53ef\u89c1,\u8033\u6735\u53ef\u542c\u5e76\u4e14\u770b\u5230\u7684\u4e0e\u542c\u5230\u7684\u662f\u540c\u6b65\u7684\u89c6\u9891\u6587\u4ef6.\u5373\u5c01\u88c5\u540e\u751f\u6210\u4e00\u4e2a\u5bb9\u5668,\u6765\u5b58\u653e\u97f3\u9891\u548c\u89c6\u9891\u6d41\u4ee5\u53ca\u4e00\u4e9b\u5176\u4ed6\u4fe1\u606f(\u6bd4\u5982\u5b57\u5e55, metadata\u7b49).<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">4.2 \u683c\u5f0f<\/h5>\n\n\n\n<ul><li>AVI(.AVI): \u4f18\u70b9\u662f\u56fe\u50cf\u8d28\u91cf\u597d\u3002\u7531\u4e8e\u65e0\u635fAVI\u53ef\u4ee5\u4fdd\u5b58 alpha \u901a\u9053\uff0c\u7ecf\u5e38\u88ab\u6211\u4eec\u4f7f\u7528.\u7f3a\u70b9\u592a\u591a\uff0c\u4f53\u79ef\u8fc7\u4e8e\u5e9e\u5927\uff0c\u800c\u4e14\u66f4\u52a0\u7cdf\u7cd5\u7684\u662f\u538b\u7f29\u6807\u51c6\u4e0d\u7edf\u4e00\uff0c<\/li><li>MOV(.MOV): \u7f8e\u56fdApple\u516c\u53f8\u5f00\u53d1\u7684\u4e00\u79cd\u89c6\u9891\u683c\u5f0f\uff0c\u9ed8\u8ba4\u7684\u64ad\u653e\u5668\u662f\u82f9\u679c\u7684QuickTime\u3002<\/li><li>MPEG(.MPG,.MPEG,MPE,.DAT,.VOB,.ASF,.3GP,.MP4):<\/li><li>WMV(.WMV,.ASF)<\/li><li>Real Video(.RM,.RMBV): \u6839\u636e\u4e0d\u540c\u7684\u7f51\u7edc\u4f20\u8f93\u901f\u7387\u5236\u5b9a\u51fa\u4e0d\u540c\u7684\u538b\u7f29\u6bd4\u7387\uff0c\u4ece\u800c\u5b9e\u73b0\u5728\u4f4e\u901f\u7387\u7684\u7f51\u7edc\u4e0a\u8fdb\u884c\u5f71\u50cf\u6570\u636e\u5b9e\u65f6\u4f20\u9001\u548c\u64ad\u653e<\/li><li>Flash Video(.FLV):\u7531 Adobe Flash \u5ef6\u4f38\u51fa\u6765\u7684\u7684\u4e00\u79cd\u6d41\u884c\u7f51\u7edc\u89c6\u9891\u5c01\u88c5\u683c\u5f0f\u3002\u968f\u7740\u89c6\u9891\u7f51\u7ad9\u7684\u4e30\u5bcc\uff0c\u8fd9\u4e2a\u683c\u5f0f\u5df2\u7ecf\u975e\u5e38\u666e\u53ca\u3002<\/li><\/ul>\n\n\n\n<h5 class=\"wp-block-heading\">4.3 \u5c06\u7f16\u7801\u6570\u636e\u5408\u6210\u6d41<\/h5>\n\n\n\n<p>\u5728\u79fb\u52a8\u7aef\u6211\u4eec\u9700\u8981\u501f\u52a9FFmpeg\u6846\u67b6,\u6b63\u5982\u4e0a\u9762\u4ecb\u7ecd\u7684,FFmpeg\u4e0d\u4ec5\u53ef\u4ee5\u505a\u7f16\u89e3\u7801,\u8fd8\u53ef\u4ee5\u5408\u6210\u89c6\u9891\u6d41,\u50cf\u5e38\u7528\u7684.flv\u6d41,.asf\u6d41.<\/p>\n\n\n\n<p>\u6700\u540e, \u5408\u6210\u597d\u7684\u6570\u636e\u5373\u53ef\u7528\u4e8e\u5199\u6587\u4ef6\u6216\u8005\u5728\u7f51\u7edc\u4e0a\u4f20\u64ad<\/p>\n\n\n\n<p><strong>\u8865\u5145: FFmpeg (\u5fc5\u5b66\u6846\u67b6)<\/strong><\/p>\n\n\n\n<p>FFmpeg \u662f\u4e00\u4e2a\u5f00\u6e90\u6846\u67b6\uff0c\u53ef\u4ee5\u8fd0\u884c\u97f3\u9891\u548c\u89c6\u9891\u591a\u79cd\u683c\u5f0f\u7684\u5f55\u5f71\u3001\u8f6c\u6362\u3001\u6d41\u529f\u80fd\uff0c\u5305\u542b\u4e86 libavcodec: \u8fd9\u662f\u4e00\u4e2a\u7528\u4e8e\u591a\u4e2a\u9879\u76ee\u4e2d\u97f3\u9891\u548c\u89c6\u9891\u7684\u89e3\u7801\u5668\u5e93\uff0c\u4ee5\u53ca libavformat \u4e00\u4e2a\u97f3\u9891\u4e0e\u89c6\u9891\u683c\u5f0f\u8f6c\u6362\u5e93\u3002<\/p>\n\n\n\n<p>\u76ee\u524d\u652f\u6301 Linux ,Mac OS,Windows \u4e09\u4e2a\u4e3b\u6d41\u7684\u5e73\u53f0\uff0c\u4e5f\u53ef\u4ee5\u81ea\u5df1\u7f16\u8bd1\u5230 Android \u6216\u8005 iOS \u5e73\u53f0\u3002 \u5982\u679c\u662f Mac OS \uff0c\u53ef\u4ee5\u901a\u8fc7 brew \u5b89\u88c5 brew install ffmpeg &#8211;with-libvpx &#8211;with-libvorbis &#8211;with-ffplay<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">4.4. FLV\u6d41\u7b80\u4ecb<\/h5>\n\n\n\n<ul><li>Overview<\/li><\/ul>\n\n\n\n<p>FLV\u5c01\u88c5\u683c\u5f0f\u5206\u6790\u5668\u3002FLV\u5168\u79f0\u662fFlash Video\uff0c\u662f\u4e92\u8054\u7f51\u4e0a\u4f7f\u7528\u6781\u4e3a\u5e7f\u6cdb\u7684\u89c6\u9891\u5c01\u88c5\u683c\u5f0f\u3002\u50cfYoutube\uff0c\u4f18\u9177\u8fd9\u7c7b\u89c6\u9891\u7f51\u7ad9\uff0c\u90fd\u4f7f\u7528FLV\u5c01\u88c5\u89c6\u9891.<\/p>\n\n\n\n<p>FLV\uff08Flash Video\uff09\u662fAdobe\u516c\u53f8\u8bbe\u8ba1\u5f00\u53d1\u7684\u4e00\u79cd\u6d41\u884c\u7684\u6d41\u5a92\u4f53\u683c\u5f0f\uff0c\u7531\u4e8e\u5176\u89c6\u9891\u6587\u4ef6\u4f53\u79ef\u8f7b\u5de7\u3001\u5c01\u88c5\u7b80\u5355\u7b49\u7279\u70b9\uff0c\u4f7f\u5176\u5f88\u9002\u5408\u5728\u4e92\u8054\u7f51\u4e0a\u8fdb\u884c\u5e94\u7528\u3002\u6b64\u5916\uff0cFLV\u53ef\u4ee5\u4f7f\u7528Flash Player\u8fdb\u884c\u64ad\u653e\uff0c\u800cFlash Player\u63d2\u4ef6\u5df2\u7ecf\u5b89\u88c5\u5728\u5168\u4e16\u754c\u7edd\u5927\u90e8\u5206\u6d4f\u89c8\u5668\u4e0a\uff0c\u8fd9\u4f7f\u5f97\u901a\u8fc7\u7f51\u9875\u64ad\u653eFLV\u89c6\u9891\u5341\u5206\u5bb9\u6613\u3002\u76ee\u524d\u4e3b\u6d41\u7684\u89c6\u9891\u7f51\u7ad9\u5982\u4f18\u9177\u7f51\uff0c\u571f\u8c46\u7f51\uff0c\u4e50\u89c6\u7f51\u7b49\u7f51\u7ad9\u65e0\u4e00\u4f8b\u5916\u5730\u4f7f\u7528\u4e86FLV\u683c\u5f0f\u3002FLV\u5c01\u88c5\u683c\u5f0f\u7684\u6587\u4ef6\u540e\u7f00\u901a\u5e38\u4e3a\u201c.flv\u201d\u3002<\/p>\n\n\n\n<ul><li>\u7ed3\u6784<\/li><\/ul>\n\n\n\n<p>FLV\u5305\u62ec\u6587\u4ef6\u5934\uff08File Header\uff09\u548c\u6587\u4ef6\u4f53\uff08File Body\uff09\u4e24\u90e8\u5206\uff0c\u5176\u4e2d\u6587\u4ef6\u4f53\u7531\u4e00\u7cfb\u5217\u7684Tag\u7ec4\u6210\u3002\u56e0\u6b64\u4e00\u4e2aFLV\u6587\u4ef6\u662f\u5982\u56fe1\u7ed3\u6784\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-4.png\" alt=\"\" class=\"wp-image-3092\" width=\"569\" height=\"66\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4.png 914w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4-300x35.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4-768x89.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4-830x96.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4-230x27.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4-350x41.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-4-480x56.png 480w\" sizes=\"(max-width: 569px) 100vw, 569px\" \/><\/figure><\/div>\n\n\n\n<p>\u6bcf\u4e2aTag\u524d\u9762\u8fd8\u5305\u542b\u4e86Previous Tag Size\u5b57\u6bb5\uff0c\u8868\u793a\u524d\u9762\u4e00\u4e2aTag\u7684\u5927\u5c0f\u3002Tag\u7684\u7c7b\u578b\u53ef\u4ee5\u662f\u89c6\u9891\u3001\u97f3\u9891\u548cScript\uff0c\u6bcf\u4e2aTag\u53ea\u80fd\u5305\u542b\u4ee5\u4e0a\u4e09\u79cd\u7c7b\u578b\u7684\u6570\u636e\u4e2d\u7684\u4e00\u79cd\u3002\u56fe2\u5c55\u793a\u4e86FLV\u6587\u4ef6\u7684\u8be6\u7ec6\u7ed3\u6784\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-5-847x1024.png\" alt=\"\" class=\"wp-image-3093\" width=\"490\" height=\"592\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-847x1024.png 847w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-248x300.png 248w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-768x928.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-830x1003.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-230x278.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-350x423.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5-480x580.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-5.png 986w\" sizes=\"(max-width: 490px) 100vw, 490px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">5. \u5c06\u6570\u636e\u901a\u8fc7RTMP\u534f\u8bae\u4f20\u8f93<\/h5>\n\n\n\n<p>\u4f18\u70b9:<\/p>\n\n\n\n<ul><li>CDN \u652f\u6301\u826f\u597d\uff0c\u4e3b\u6d41\u7684 CDN \u5382\u5546\u90fd\u652f\u6301<\/li><li>\u534f\u8bae\u7b80\u5355\uff0c\u5728\u5404\u5e73\u53f0\u4e0a\u5b9e\u73b0\u5bb9\u6613<\/li><\/ul>\n\n\n\n<p>\u7f3a\u70b9\uff1a<\/p>\n\n\n\n<ul><li>\u57fa\u4e8e TCP \uff0c\u4f20\u8f93\u6210\u672c\u9ad8\uff0c\u5728\u5f31\u7f51\u73af\u5883\u4e22\u5305\u7387\u9ad8\u7684\u60c5\u51b5\u4e0b\u95ee\u9898\u663e\u8457<\/li><li>\u4e0d\u652f\u6301\u6d4f\u89c8\u5668\u63a8\u9001<\/li><li>Adobe \u79c1\u6709\u534f\u8bae\uff0cAdobe \u5df2\u7ecf\u4e0d\u518d\u66f4\u65b0<\/li><\/ul>\n\n\n\n<p>\u6211\u4eec\u63a8\u9001\u51fa\u53bb\u7684\u6d41\u5a92\u4f53\u9700\u8981\u4f20\u8f93\u5230\u89c2\u4f17\uff0c\u6574\u4e2a\u94fe\u8def\u5c31\u662f\u4f20\u8f93\u7f51\u7edc.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">5.1. Overview<\/h5>\n\n\n\n<p>RTMP\u534f\u8bae\u662f\u4e00\u4e2a\u4e92\u8054\u7f51TCP\/IP\u4e94\u5c42\u4f53\u7cfb\u7ed3\u6784\u4e2d\u5e94\u7528\u5c42\u7684\u534f\u8bae\u3002RTMP\u534f\u8bae\u4e2d\u57fa\u672c\u7684\u6570\u636e\u5355\u5143\u79f0\u4e3a\u6d88\u606f\uff08Message\uff09\u3002\u5f53RTMP\u534f\u8bae\u5728\u4e92\u8054\u7f51\u4e2d\u4f20\u8f93\u6570\u636e\u7684\u65f6\u5019\uff0c\u6d88\u606f\u4f1a\u88ab\u62c6\u5206\u6210\u66f4\u5c0f\u7684\u5355\u5143\uff0c\u79f0\u4e3a\u6d88\u606f\u5757\uff08Chunk\uff09\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">5.2. \u6d88\u606f<\/h5>\n\n\n\n<p>\u6d88\u606f\u662fRTMP\u534f\u8bae\u4e2d\u57fa\u672c\u7684\u6570\u636e\u5355\u5143\u3002\u4e0d\u540c\u79cd\u7c7b\u7684\u6d88\u606f\u5305\u542b\u4e0d\u540c\u7684Message Type ID\uff0c\u4ee3\u8868\u4e0d\u540c\u7684\u529f\u80fd\u3002RTMP\u534f\u8bae\u4e2d\u4e00\u5171\u89c4\u5b9a\u4e86\u5341\u591a\u79cd\u6d88\u606f\u7c7b\u578b\uff0c\u5206\u522b\u53d1\u6325\u7740\u4e0d\u540c\u7684\u4f5c\u7528\u3002<\/p>\n\n\n\n<ul><li>1-7\u7684\u6d88\u606f\u7528\u4e8e\u534f\u8bae\u63a7\u5236\uff0c\u8fd9\u4e9b\u6d88\u606f\u4e00\u822c\u662fRTMP\u534f\u8bae\u81ea\u8eab\u7ba1\u7406\u8981\u4f7f\u7528\u7684\u6d88\u606f\uff0c\u7528\u6237\u4e00\u822c\u60c5\u51b5\u4e0b\u65e0\u9700\u64cd\u4f5c\u5176\u4e2d\u7684\u6570\u636e<\/li><li>Message Type ID\u4e3a8\uff0c9\u7684\u6d88\u606f\u5206\u522b\u7528\u4e8e\u4f20\u8f93\u97f3\u9891\u548c\u89c6\u9891\u6570\u636e<\/li><li>Message Type ID\u4e3a15-20\u7684\u6d88\u606f\u7528\u4e8e\u53d1\u9001AMF\u7f16\u7801\u7684\u547d\u4ee4\uff0c\u8d1f\u8d23\u7528\u6237\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u4ea4\u4e92\uff0c\u6bd4\u5982\u64ad\u653e\uff0c\u6682\u505c\u7b49\u7b49<\/li><li>\u6d88\u606f\u9996\u90e8\uff08Message Header\uff09\u6709\u56db\u90e8\u5206\u7ec4\u6210\uff1a\u6807\u5fd7\u6d88\u606f\u7c7b\u578b\u7684Message Type ID\uff0c\u6807\u5fd7\u6d88\u606f\u957f\u5ea6\u7684Payload Length\uff0c\u6807\u8bc6\u65f6\u95f4\u6233\u7684Timestamp\uff0c\u6807\u8bc6\u6d88\u606f\u6240\u5c5e\u5a92\u4f53\u6d41\u7684Stream ID<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-6-1024x193.png\" alt=\"\" class=\"wp-image-3094\" width=\"652\" height=\"123\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-1024x193.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-300x56.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-768x144.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-830x156.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-230x43.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-350x66.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6-480x90.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-6.png 1106w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">5.3.\u6d88\u606f\u5757<\/h5>\n\n\n\n<p>\u5728\u7f51\u7edc\u4e0a\u4f20\u8f93\u6570\u636e\u65f6\uff0c\u6d88\u606f\u9700\u8981\u88ab\u62c6\u5206\u6210\u8f83\u5c0f\u7684\u6570\u636e\u5757\uff0c\u624d\u9002\u5408\u5728\u76f8\u5e94\u7684\u7f51\u7edc\u73af\u5883\u4e0a\u4f20\u8f93\u3002RTMP\u534f\u8bae\u4e2d\u89c4\u5b9a\uff0c\u6d88\u606f\u5728\u7f51\u7edc\u4e0a\u4f20\u8f93\u65f6\u88ab\u62c6\u5206\u6210\u6d88\u606f\u5757\uff08Chunk\uff09\u3002<\/p>\n\n\n\n<p>\u6d88\u606f\u5757\u9996\u90e8\uff08Chunk Header\uff09\u6709\u4e09\u90e8\u5206\u7ec4\u6210\uff1a<\/p>\n\n\n\n<ul><li>\u7528\u4e8e\u6807\u8bc6\u672c\u5757\u7684Chunk Basic Header<\/li><li>\u7528\u4e8e\u6807\u8bc6\u672c\u5757\u8d1f\u8f7d\u6240\u5c5e\u6d88\u606f\u7684Chunk Message Header<\/li><li>\u4ee5\u53ca\u5f53\u65f6\u95f4\u6233\u6ea2\u51fa\u65f6\u624d\u51fa\u73b0\u7684Extended Timestamp<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-7-1024x274.png\" alt=\"\" class=\"wp-image-3095\" width=\"592\" height=\"158\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-1024x274.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-300x80.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-768x205.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-830x222.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-230x61.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-350x94.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7-480x128.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-7.png 1152w\" sizes=\"(max-width: 592px) 100vw, 592px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">5.4.\u6d88\u606f\u5206\u5757<\/h5>\n\n\n\n<p>\u5728\u6d88\u606f\u88ab\u5206\u5272\u6210\u51e0\u4e2a\u6d88\u606f\u5757\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6d88\u606f\u8d1f\u8f7d\u90e8\u5206\uff08Message Body\uff09\u88ab\u5206\u5272\u6210\u5927\u5c0f\u56fa\u5b9a\u7684\u6570\u636e\u5757\uff08\u9ed8\u8ba4\u662f128\u5b57\u8282\uff0c\u6700\u540e\u4e00\u4e2a\u6570\u636e\u5757\u53ef\u4ee5\u5c0f\u4e8e\u8be5\u56fa\u5b9a\u957f\u5ea6\uff09\uff0c\u5e76\u5728\u5176\u9996\u90e8\u52a0\u4e0a\u6d88\u606f\u5757\u9996\u90e8\uff08Chunk Header\uff09\uff0c\u5c31\u7ec4\u6210\u4e86\u76f8\u5e94\u7684\u6d88\u606f\u5757\u3002\u6d88\u606f\u5206\u5757\u8fc7\u7a0b\u5982\u56fe5\u6240\u793a\uff0c\u4e00\u4e2a\u5927\u5c0f\u4e3a307\u5b57\u8282\u7684\u6d88\u606f\u88ab\u5206\u5272\u6210128\u5b57\u8282\u7684\u6d88\u606f\u5757\uff08\u9664\u4e86\u6700\u540e\u4e00\u4e2a\uff09\u3002<\/p>\n\n\n\n<p>RTMP\u4f20\u8f93\u5a92\u4f53\u6570\u636e\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u9001\u7aef\u9996\u5148\u628a\u5a92\u4f53\u6570\u636e\u5c01\u88c5\u6210\u6d88\u606f\uff0c\u7136\u540e\u628a\u6d88\u606f\u5206\u5272\u6210\u6d88\u606f\u5757\uff0c\u6700\u540e\u5c06\u5206\u5272\u540e\u7684\u6d88\u606f\u5757\u901a\u8fc7TCP\u534f\u8bae\u53d1\u9001\u51fa\u53bb\u3002\u63a5\u6536\u7aef\u5728\u901a\u8fc7TCP\u534f\u8bae\u6536\u5230\u6570\u636e\u540e\uff0c\u9996\u5148\u628a\u6d88\u606f\u5757\u91cd\u65b0\u7ec4\u5408\u6210\u6d88\u606f\uff0c\u7136\u540e\u901a\u8fc7\u5bf9\u6d88\u606f\u8fdb\u884c\u89e3\u5c01\u88c5\u5904\u7406\u5c31\u53ef\u4ee5\u6062\u590d\u51fa\u5a92\u4f53\u6570\u636e\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-8-1024x731.png\" alt=\"\" class=\"wp-image-3098\" width=\"636\" height=\"453\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8-1024x731.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8-300x214.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8-830x593.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8-230x164.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8-350x250.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8-480x343.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-8.png 1148w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\"><br>5.5 .RTMP\u4e2d\u7684\u903b\u8f91\u7ed3\u6784<\/h5>\n\n\n\n<p>RTMP\u534f\u8bae\u89c4\u5b9a\uff0c\u64ad\u653e\u4e00\u4e2a\u6d41\u5a92\u4f53\u6709\u4e24\u4e2a\u524d\u63d0\u6b65\u9aa4<\/p>\n\n\n\n<ul><li>\u7b2c\u4e00\u6b65\uff0c\u5efa\u7acb\u4e00\u4e2a\u7f51\u7edc\u8fde\u63a5\uff08NetConnection\uff09<\/li><li>\u7b2c\u4e8c\u6b65\uff0c\u5efa\u7acb\u4e00\u4e2a\u7f51\u7edc\u6d41\uff08NetStream\uff09\u3002<\/li><\/ul>\n\n\n\n<p>\u5176\u4e2d\uff0c\u7f51\u7edc\u8fde\u63a5\u4ee3\u8868\u670d\u52a1\u5668\u7aef\u5e94\u7528\u7a0b\u5e8f\u548c\u5ba2\u6237\u7aef\u4e4b\u95f4\u57fa\u7840\u7684\u8fde\u901a\u5173\u7cfb\u3002\u7f51\u7edc\u6d41\u4ee3\u8868\u4e86\u53d1\u9001\u591a\u5a92\u4f53\u6570\u636e\u7684\u901a\u9053\u3002\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u4e4b\u95f4\u53ea\u80fd\u5efa\u7acb\u4e00\u4e2a\u7f51\u7edc\u8fde\u63a5\uff0c\u4f46\u662f\u57fa\u4e8e\u8be5\u8fde\u63a5\u53ef\u4ee5\u521b\u5efa\u5f88\u591a\u7f51\u7edc\u6d41\u3002\u4ed6\u4eec\u7684\u5173\u7cfb\u5982\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-9-1024x420.png\" alt=\"\" class=\"wp-image-3099\" width=\"547\" height=\"223\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-1024x420.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-300x123.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-768x315.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-830x340.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-230x94.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-350x144.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9-480x197.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-9.png 1112w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">5.6 \u8fde\u63a5\u6d41\u7a0b<\/h5>\n\n\n\n<p>\u64ad\u653e\u4e00\u4e2aRTMP\u534f\u8bae\u7684\u6d41\u5a92\u4f53\u9700\u8981\u7ecf\u8fc7\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<ul><li>\u63e1\u624b<\/li><li>\u5efa\u7acb\u8fde\u63a5<\/li><li>\u5efa\u7acb\u6d41<\/li><li>\u64ad\u653e<\/li><\/ul>\n\n\n\n<p>RTMP\u8fde\u63a5\u90fd\u662f\u4ee5\u63e1\u624b\u4f5c\u4e3a\u5f00\u59cb\u7684\u3002\u5efa\u7acb\u8fde\u63a5\u9636\u6bb5\u7528\u4e8e\u5efa\u7acb\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u201c\u7f51\u7edc\u8fde\u63a5\u201d\uff1b\u5efa\u7acb\u6d41\u9636\u6bb5\u7528\u4e8e\u5efa\u7acb\u5ba2\u6237\u7aef\u4e0e\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u201c\u7f51\u7edc\u6d41\u201d\uff1b\u64ad\u653e\u9636\u6bb5\u7528\u4e8e\u4f20\u8f93\u89c6\u97f3\u9891\u6570\u636e\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-10-744x1024.png\" alt=\"\" class=\"wp-image-3100\" width=\"437\" height=\"601\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-744x1024.png 744w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-218x300.png 218w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-768x1056.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-830x1142.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-230x316.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-350x481.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10-480x660.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-10.png 852w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-11.png\" alt=\"\" class=\"wp-image-3102\" width=\"453\" height=\"355\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-11.png 778w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-11-300x235.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-11-768x602.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-11-230x180.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-11-350x274.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-11-480x376.png 480w\" sizes=\"(max-width: 453px) 100vw, 453px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-12.png\" alt=\"\" class=\"wp-image-3103\" width=\"385\" height=\"188\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-12.png 822w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-12-300x146.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-12-768x374.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-12-230x112.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-12-350x170.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-12-480x234.png 480w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-13.png\" alt=\"\" class=\"wp-image-3104\" width=\"351\" height=\"277\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-13.png 782w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-13-300x236.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-13-768x605.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-13-230x181.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-13-350x276.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-13-480x378.png 480w\" sizes=\"(max-width: 351px) 100vw, 351px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">6. \u89e3\u6790\u5e76\u89e3\u7801\u89c6\u9891\u6d41<\/h5>\n\n\n\n<p>\u6df1\u5165\u7814\u7a76<\/p>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903881818767374\">iOS\u5b8c\u6574\u6587\u4ef6\u62c9\u6d41\u89e3\u6790\u89e3\u7801\u540c\u6b65\u6e32\u67d3\u97f3\u89c6\u9891\u6d41<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903863674208263\">FFmpeg\u89e3\u6790\u89c6\u9891\u6570\u636e<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903871463030792\">iOS\u5229\u7528FFmpeg\u5b9e\u73b0\u89c6\u9891\u786c\u89e3\u7801<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903874629730312\">iOS\u5229\u7528VideoToolbox\u5b9e\u73b0\u89c6\u9891\u786c\u89e3\u7801<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903877318279181\">iOS\u5229\u7528FFmpeg\u5b9e\u73b0\u97f3\u9891\u786c\u89e3\u7801<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903846951698445\">iOS\u5229\u7528\u539f\u751f\u97f3\u9891\u89e3\u7801<\/a><\/li><\/ul>\n\n\n\n<p>\u5230\u8fd9\u91cc\u4e3a\u6b62,\u5b8c\u6574\u7684\u63a8\u6d41\u8fc7\u7a0b\u5df2\u7ecf\u4ecb\u7ecd\u5b8c\u6210,\u4e0b\u9762\u7684\u8fc7\u7a0b\u5373\u4e3a\u9006\u5411\u8fc7\u7a0b-\u62c9\u6d41.<\/p>\n\n\n\n<p>\u56e0\u4e3a\u63a5\u6536\u7aef\u62ff\u5230\u7f16\u7801\u7684\u89c6\u9891\u6d41\u6700\u7ec8\u8fd8\u662f\u60f3\u5c06\u89c6\u9891\u6e32\u67d3\u5230\u5c4f\u5e55\u4e0a, \u5c06\u97f3\u9891\u901a\u8fc7\u626c\u58f0\u5668\u7b49\u8f93\u51fa\u8bbe\u5907\u64ad\u51fa,\u6240\u4ee5\u63a5\u7740\u4e0a\u9762\u7684\u6b65\u9aa4,\u63a5\u6536\u7aef\u53ef\u4ee5\u901a\u8fc7RTMP\u534f\u8bae\u62ff\u5230\u89c6\u9891\u6d41\u6570\u636e,\u7136\u540e\u9700\u8981\u5229\u7528FFmpeg parse\u6570\u636e,\u56e0\u4e3a\u6211\u4eec\u9700\u8981\u5c06\u6570\u636e\u4e2d\u7684\u97f3\u9891\u8ddf\u89c6\u9891\u5206\u5f00,\u5206\u79bb\u51fa\u97f3\u89c6\u9891\u6570\u636e\u540e\u9700\u8981\u5206\u522b\u5bf9\u5b83\u4eec\u505a\u89e3\u7801\u64cd\u4f5c.\u89e3\u7801\u7684\u89c6\u9891\u5373\u4e3aYUV\/RGB\u7b49\u683c\u5f0f,\u89e3\u7801\u540e\u7684\u97f3\u9891\u5373\u4e3a\u7ebf\u6027PCM\u6570\u636e.<\/p>\n\n\n\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f,\u6211\u4eec\u89e3\u7801\u51fa\u6765\u7684\u6570\u636e\u5e76\u4e0d\u80fd\u591f\u76f4\u63a5\u4f7f\u7528,\u56e0\u4e3a,\u624b\u673a\u7aef\u5982\u679c\u60f3\u8981\u64ad\u653e\u89e3\u7801\u51fa\u6765\u7684\u6570\u636e\u662f\u9700\u8981\u5c06\u5176\u653e\u5165\u7279\u5b9a\u7684\u6570\u636e\u7ed3\u6784\u4e2d,\u5728iOS\u4e2d,\u89c6\u9891\u6570\u636e\u9700\u8981\u653e\u5165CMSampleBufferRef\u4e2d,\u800c\u8be5\u6570\u636e\u7ed3\u6784\u53c8\u7531CMTime,CMVideoFormatDes,CMBlockBuffer\u7ec4\u6210,\u6240\u4ee5\u6211\u4eec\u9700\u8981\u63d0\u4f9b\u5b83\u6240\u9700\u8981\u7684\u4fe1\u606f\u624d\u80fd\u7ec4\u6210\u7cfb\u7edf\u80fd\u591f\u64ad\u653e\u7684\u683c\u5f0f.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2021\/06\/image-14.png\" alt=\"\" class=\"wp-image-3105\" width=\"586\" height=\"270\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14.png 970w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14-300x139.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14-768x355.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14-830x383.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14-230x106.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14-350x162.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2021\/06\/image-14-480x222.png 480w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">7. \u97f3\u89c6\u9891\u540c\u6b65\u5e76\u64ad\u653e<\/h5>\n\n\n\n<p>\u6df1\u5165\u7814\u7a76<\/p>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903870657724429\">iOS\u89c6\u9891\u6e32\u67d3<\/a><\/li><li><a rel=\"noreferrer noopener\" target=\"_blank\" href=\"https:\/\/juejin.im\/post\/6844903877091786759\">AudioQueue\u5b9e\u73b0\u97f3\u9891\u6d41\u5b9e\u65f6\u64ad\u653e\u5b9e\u6218<\/a><\/li><\/ul>\n\n\n\n<p>\u5f53\u6211\u4eec\u62ff\u5230\u89e3\u7801\u540e\u7684\u97f3\u89c6\u9891\u5e27\u65f6,\u9996\u5148\u8981\u8003\u8651\u7684\u95ee\u9898\u5c31\u662f\u5982\u4f55\u540c\u6b65\u97f3\u89c6\u9891,\u5728\u7f51\u7edc\u6b63\u5e38\u7684\u60c5\u51b5\u4e0b\u662f\u4e0d\u9700\u8981\u505a\u97f3\u89c6\u9891\u540c\u6b65\u64cd\u4f5c,\u56e0\u4e3a\u6211\u4eecparse\u5230\u7684\u97f3\u89c6\u9891\u6570\u636e\u91cc\u672c\u8eab\u5e26\u7740\u5b83\u4eec\u5728\u91c7\u96c6\u65f6\u7684\u65f6\u95f4\u6233,\u53ea\u8981\u6211\u4eec\u5728\u5408\u7406\u65f6\u95f4\u5185\u62ff\u5230\u97f3\u89c6\u9891\u5e27,\u5c06\u5b83\u4eec\u5206\u522b\u9001\u7ed9\u5c4f\u5e55\u4e0e\u626c\u58f0\u5668\u5373\u53ef\u5b9e\u73b0\u540c\u6b65\u64ad\u653e.\u4f46\u662f\u8003\u8651\u5230\u7f51\u7edc\u6ce2\u52a8,\u6240\u4ee5\u53ef\u80fd\u4e22\u5931\u4e00\u4e9b\u5e27\u6216\u5ef6\u8fdf\u540e\u624d\u80fd\u83b7\u53d6,\u5f53\u8fd9\u79cd\u60c5\u51b5\u51fa\u73b0\u65f6\u5c31\u4f1a\u9020\u6210\u58f0\u97f3\u89c6\u9891\u4e0d\u540c\u6b65,\u56e0\u6b64\u9700\u8981\u5bf9\u97f3\u89c6\u9891\u505a\u540c\u6b65\u5904\u7406.<\/p>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3: \u6709\u4e00\u628a\u5c3a\u5b50 \u4e00\u53ea\u8682\u8681\uff08\u89c6\u9891\uff09\u8ddf\u7740\u4e00\u4e2a\u6807\u6746\uff08\u97f3\u9891\uff09\u8d70\uff0c \u6807\u6746\u662f\u5300\u901f\u7684 \u8682\u8681\u6216\u5feb\u6216\u6162\uff0c\u6162\u4e86\u4f60\u5c31\u62bd\u5b83 \u8ba9\u5b83\u8dd1\u8d77\u6765\uff0c\u5feb\u4e86\u5c31\u62fd\u5b83\u3002\u8fd9\u6837\u97f3\u89c6\u9891\u5c31\u80fd\u540c\u6b65\u4e86\u3002 \u8fd9\u91cc\u6700\u5927\u7684\u95ee\u9898\u5c31\u662f\u97f3\u9891\u662f\u5300\u901f\u7684\uff0c\u89c6\u9891\u662f\u975e\u7ebf\u6027\u7684\u3002<\/p>\n\n\n\n<p>\u5206\u522b\u83b7\u5f97\u97f3\u89c6\u9891\u7684PTS\u540e\uff0c\u6211\u4eec\u6709\u4e09\u4e2a\u9009\u62e9\uff1a\u89c6\u9891\u540c\u6b65\u97f3\u9891(\u8ba1\u7b97\u97f3\u89c6\u9891PTS\u4e4b\u5dee\uff0c\u6765\u5224\u5b9a\u89c6\u9891\u662f\u5426\u6709\u5ef6\u8fdf)\u3001\u97f3\u9891\u540c\u6b65\u89c6\u9891\uff08\u6839\u636e\u97f3\u89c6\u9891PTS\u5dee\u503c\u8c03\u6574\u97f3\u9891\u53d6\u7684\u6837\u503c\uff0c\u5373\u6539\u53d8\u97f3\u9891\u7f13\u51b2\u533a\u7684\u5927\u5c0f\uff09\u548c\u97f3\u9891\u89c6\u9891\u540c\u6b65\u5916\u90e8\u65f6\u949f\uff08\u540c\u524d\u4e00\u4e2a\uff09\uff0c\u56e0\u4e3a\u8c03\u6574\u97f3\u9891\u8303\u56f4\u8fc7\u5927\uff0c\u4f1a\u9020\u6210\u4ee4\u7528\u6237\u4e0d\u9002\u7684\u5c16\u9510\u58f0\uff0c\u6240\u4ee5\u901a\u5e38\u6211\u4eec\u9009\u62e9\u7b2c\u4e00\u79cd\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u7684\u7b56\u7565\u662f\u901a\u8fc7\u6bd4\u8f83\u524d\u4e00\u4e2a PTS \u548c\u5f53\u524d\u7684 PTS \u6765\u9884\u6d4b\u4e0b\u4e00\u5e27\u7684 PTS\u3002\u4e0e\u6b64\u540c\u65f6\uff0c\u6211\u4eec\u9700\u8981\u540c\u6b65\u89c6\u9891\u5230\u97f3\u9891\u3002\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a audio clock \u4f5c\u4e3a\u5185\u90e8\u53d8\u91cf\u6765\u8ddf\u8e2a\u97f3\u9891\u73b0\u5728\u64ad\u653e\u7684\u65f6\u95f4\u70b9\uff0cvideo thread \u5c06\u7528\u8fd9\u4e2a\u503c\u6765\u8ba1\u7b97\u548c\u5224\u65ad\u89c6\u9891\u662f\u64ad\u5feb\u4e86\u8fd8\u662f\u64ad\u6162\u4e86\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a get_audio_clock \u51fd\u6570\u6765\u8fd4\u56de\u6211\u4eec audio clock\uff0c\u90a3\u5f53\u6211\u4eec\u62ff\u5230\u8fd9\u4e2a\u503c\uff0c\u6211\u4eec\u600e\u4e48\u53bb\u5904\u7406\u97f3\u89c6\u9891\u4e0d\u540c\u6b65\u7684\u60c5\u51b5\u5462\uff1f\u5982\u679c\u53ea\u662f\u7b80\u5355\u7684\u5c1d\u8bd5\u8df3\u5230\u6b63\u786e\u7684 packet \u6765\u89e3\u51b3\u5e76\u4e0d\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u65b9\u6848\u3002\u6211\u4eec\u8981\u505a\u7684\u662f\u8c03\u6574\u4e0b\u4e00\u6b21\u5237\u65b0\u7684\u65f6\u673a\uff1a\u5982\u679c\u89c6\u9891\u64ad\u6162\u4e86\u6211\u4eec\u5c31\u52a0\u5feb\u5237\u65b0\uff0c\u5982\u679c\u89c6\u9891\u64ad\u5feb\u4e86\u6211\u4eec\u5c31\u51cf\u6162\u5237\u65b0\u3002\u65e2\u7136\u6211\u4eec\u8c03\u6574\u597d\u4e86\u5237\u65b0\u65f6\u95f4\uff0c\u63a5\u4e0b\u6765\u7528 frame_timer \u8ddf\u8bbe\u5907\u7684\u65f6\u949f\u505a\u4e00\u4e0b\u6bd4\u8f83\u3002frame_timer \u4f1a\u4e00\u76f4\u7d2f\u52a0\u5728\u64ad\u653e\u8fc7\u7a0b\u4e2d\u6211\u4eec\u8ba1\u7b97\u7684\u5ef6\u65f6\u3002\u6362\u800c\u8a00\u4e4b\uff0c\u8fd9\u4e2a frame_timer \u5c31\u662f\u64ad\u653e\u4e0b\u4e00\u5e27\u7684\u5e94\u8be5\u5bf9\u4e0a\u7684\u65f6\u95f4\u70b9\u3002\u6211\u4eec\u7b80\u5355\u7684\u5728 frame_timer \u4e0a\u7d2f\u52a0\u65b0\u8ba1\u7b97\u7684 delay\uff0c\u7136\u540e\u548c\u7cfb\u7edf\u65f6\u95f4\u6bd4\u8f83\uff0c\u5e76\u7528\u5f97\u5230\u7684\u503c\u6765\u4f5c\u4e3a\u65f6\u95f4\u95f4\u9694\u53bb\u5237\u65b0\u3002<\/p>\n\n\n\n<p><br>\u8f6c\u8f7d\u4e8e\uff1ahttps:\/\/juejin.cn\/post\/6844903889007820813<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8ff0 \u968f\u7740\u6574\u4e2a\u4e92\u8054\u7f51\u7684\u5d1b\u8d77\uff0c\u6570\u636e\u4f20\u9012\u7684\u5f62\u5f0f\u4e5f\u5728\u4e0d\u65ad\u5347\u7ea7\u53d8\u5316\uff0c\u603b\u7684\u6d41\u884c\u8d8b\u52bf\u5982\u4e0b\uff1a \u7eaf\u6587\u672c\u7684\u77ed\u4fe1\uff0cQQ -> \u7a7a\u95f4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/3066"}],"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=3066"}],"version-history":[{"count":26,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/3066\/revisions"}],"predecessor-version":[{"id":3108,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/3066\/revisions\/3108"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}