{"id":68380,"date":"2019-08-21T02:04:01","date_gmt":"2019-08-20T18:04:01","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=68380"},"modified":"2019-08-22T02:09:05","modified_gmt":"2019-08-21T18:09:05","slug":"m3u8-%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2019\/08\/21\/68380.htm","title":{"rendered":"m3u8 \u6587\u4ef6\u683c\u5f0f\u8be6\u89e3"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u7b80\u4ecb<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/M3U#M3U8\" target=\"_blank\" rel=\"noreferrer noopener\">M3U8<\/a> \u662f Unicode \u7248\u672c\u7684 <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/M3U\" target=\"_blank\" rel=\"noreferrer noopener\">M3U<\/a>\uff0c\u7528 UTF-8 \u7f16\u7801\u3002&#8221;M3U&#8221; \u548c &#8220;M3U8&#8221; \u6587\u4ef6\u90fd\u662f\u82f9\u679c\u516c\u53f8\u4f7f\u7528\u7684 <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP Live Streaming\uff08HLS\uff09<\/a> \u534f\u8bae\u683c\u5f0f\u7684\u57fa\u7840\uff0c\u8fd9\u79cd\u534f\u8bae\u683c\u5f0f\u53ef\u4ee5\u5728 iPhone \u548c Macbook \u7b49\u8bbe\u5907\u64ad\u653e\u3002<\/p><\/blockquote>\n\n\n\n<p>\u4e0a\u8ff0\u6587\u5b57\u5b9a\u4e49\u6765\u81ea\u4e8e<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/Wikipedia:%E9%A6%96%E9%A1%B5\" target=\"_blank\" rel=\"noreferrer noopener\">\u7ef4\u57fa\u767e\u79d1<\/a>\u3002\u53ef\u4ee5\u770b\u5230\uff0c<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/M3U#M3U8\" target=\"_blank\" rel=\"noreferrer noopener\">m3u8<\/a> \u6587\u4ef6\u5176\u5b9e\u662f <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP Live Streaming\uff08\u7f29\u5199\u4e3a HLS\uff09<\/a> \u534f\u8bae\u7684\u90e8\u5206\u5185\u5bb9\uff0c\u800c <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u662f\u4e00\u4e2a\u7531\u82f9\u679c\u516c\u53f8\u63d0\u51fa\u7684\u57fa\u4e8e <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a> \u7684<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/%E6%B5%81%E5%AA%92%E4%BD%93\" target=\"_blank\" rel=\"noreferrer noopener\">\u6d41\u5a92\u4f53<\/a><a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/%E7%BD%91%E7%BB%9C%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE\" target=\"_blank\" rel=\"noreferrer noopener\">\u7f51\u7edc\u4f20\u8f93\u534f\u8bae<\/a>\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u7684\u5de5\u4f5c\u539f\u7406\u662f\u628a\u6574\u4e2a\u6d41\u5206\u6210\u4e00\u4e2a\u4e2a\u5c0f\u7684\u57fa\u4e8e <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a> \u7684\u6587\u4ef6\u6765\u4e0b\u8f7d\uff0c\u6bcf\u6b21\u53ea\u4e0b\u8f7d\u4e00\u4e9b\u3002\u5f53\u5a92\u4f53\u6d41\u6b63\u5728\u64ad\u653e\u65f6\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u9009\u62e9\u4ece\u8bb8\u591a\u4e0d\u540c\u7684\u5907\u7528\u6e90\u4e2d\u4ee5\u4e0d\u540c\u7684\u901f\u7387\u4e0b\u8f7d\u540c\u6837\u7684\u8d44\u6e90\uff0c\u5141\u8bb8\u6d41\u5a92\u4f53\u4f1a\u8bdd\u9002\u5e94\u4e0d\u540c\u7684\u6570\u636e\u901f\u7387\u3002\u5728\u5f00\u59cb\u4e00\u4e2a\u6d41\u5a92\u4f53\u4f1a\u8bdd\u65f6\uff0c\u5ba2\u6237\u7aef\u4f1a\u4e0b\u8f7d\u4e00\u4e2a\u5305\u542b\u5143\u6570\u636e\u7684 extended M3U (m3u8) playlist\u6587\u4ef6\uff0c\u7528\u4e8e\u5bfb\u627e\u53ef\u7528\u7684\u5a92\u4f53\u6d41\u3002<br>\n<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u53ea\u8bf7\u6c42\u57fa\u672c\u7684 <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a> \u62a5\u6587\uff0c\u4e0e<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/%E5%AE%9E%E6%97%B6%E4%BC%A0%E8%BE%93%E5%8D%8F%E8%AE%AE\" target=\"_blank\" rel=\"noreferrer noopener\">\u5b9e\u65f6\u4f20\u8f93\u534f\u8bae\uff08RTP\uff09<\/a>\u4e0d\u540c\uff0c<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u53ef\u4ee5\u7a7f\u8fc7\u4efb\u4f55\u5141\u8bb8 <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a> \u6570\u636e\u901a\u8fc7\u7684\u9632\u706b\u5899\u6216\u8005\u4ee3\u7406\u670d\u52a1\u5668\u3002\u5b83\u4e5f\u5f88\u5bb9\u6613\u4f7f\u7528<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/%E5%85%A7%E5%AE%B9%E5%88%86%E7%99%BC%E7%B6%B2%E7%B5%A1\" target=\"_blank\" rel=\"noreferrer noopener\">\u5185\u5bb9\u5206\u53d1\u7f51\u7edc<\/a>\u6765\u4f20\u8f93\u5a92\u4f53\u6d41\u3002<\/p><\/blockquote>\n\n\n\n<p>\u7b80\u800c\u8a00\u4e4b\uff0c<a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u662f\u65b0\u4e00\u4ee3\u6d41\u5a92\u4f53\u4f20\u8f93\u534f\u8bae\uff0c\u5176\u57fa\u672c\u5b9e\u73b0\u539f\u7406\u4e3a\u5c06\u4e00\u4e2a\u5927\u7684\u5a92\u4f53\u6587\u4ef6\u8fdb\u884c\u5206\u7247\uff0c\u5c06\u8be5\u5206\u7247\u6587\u4ef6\u8d44\u6e90\u8def\u5f84\u8bb0\u5f55\u4e8e m3u8 \u6587\u4ef6\uff08\u5373 playlist\uff09\u5185\uff0c\u5176\u4e2d\u9644\u5e26\u4e00\u4e9b\u989d\u5916\u63cf\u8ff0\uff08\u6bd4\u5982\u8be5\u8d44\u6e90\u7684\u591a\u5e26\u5bbd\u4fe1\u606f\u00b7\u00b7\u00b7\uff09\u7528\u4e8e\u63d0\u4f9b\u7ed9\u5ba2\u6237\u7aef\u3002\u5ba2\u6237\u7aef\u4f9d\u636e\u8be5 m3u8 \u6587\u4ef6\u5373\u53ef\u83b7\u53d6\u5bf9\u5e94\u7684\u5a92\u4f53\u8d44\u6e90\uff0c\u8fdb\u884c\u64ad\u653e\u3002<\/p>\n\n\n\n<p>\u56e0\u6b64\uff0c\u5ba2\u6237\u7aef\u83b7\u53d6 <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u6d41\u6587\u4ef6\uff0c\u4e3b\u8981\u5c31\u662f\u5bf9 m3u8 \u6587\u4ef6\u8fdb\u884c\u89e3\u6790\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u90a3\u4e48\uff0c\u4e0b\u9762\u5c31\u7b80\u5355\u4ecb\u7ecd\u4e0b m3u8 \u6587\u4ef6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">M3U8 \u6587\u4ef6\u7b80\u4ecb<\/h2>\n\n\n\n<p>m3u8 \u6587\u4ef6\u5b9e\u8d28\u662f\u4e00\u4e2a\u64ad\u653e\u5217\u8868\uff08playlist\uff09\uff0c\u5176\u53ef\u80fd\u662f\u4e00\u4e2a\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Media Playlist\uff09\uff0c\u6216\u8005\u662f\u4e00\u4e2a\u4e3b\u5217\u8868\uff08Master Playlist\uff09\u3002\u4f46\u65e0\u8bba\u662f\u54ea\u79cd\u64ad\u653e\u5217\u8868\uff0c\u5176\u5185\u90e8\u6587\u5b57\u4f7f\u7528\u7684\u90fd\u662f utf-8 \u7f16\u7801\u3002<\/p>\n\n\n\n<p>\u5f53 m3u8 \u6587\u4ef6\u4f5c\u4e3a\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Meida Playlist\uff09\u65f6\uff0c\u5176\u5185\u90e8\u4fe1\u606f\u8bb0\u5f55\u7684\u662f\u4e00\u7cfb\u5217\u5a92\u4f53\u7247\u6bb5\u8d44\u6e90\uff0c\u987a\u5e8f\u64ad\u653e\u8be5\u7247\u6bb5\u8d44\u6e90\uff0c\u5373\u53ef\u5b8c\u6574\u5c55\u793a\u591a\u5a92\u4f53\u8d44\u6e90\u3002\u5176\u683c\u5f0f\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">#EXTM3U\n#EXT-X-TARGETDURATION:10\n\n#EXTINF:9.009,\nhttp:\/\/media.example.com\/first.ts\n#EXTINF:9.009,\nhttp:\/\/media.example.com\/second.ts\n#EXTINF:3.003,\nhttp:\/\/media.example.com\/third.ts\n<\/pre>\n\n\n\n<p>\u5bf9\u4e8e\u70b9\u64ad\u6765\u8bf4\uff0c\u5ba2\u6237\u7aef\u53ea\u9700\u6309\u987a\u5e8f\u4e0b\u8f7d\u4e0a\u8ff0\u7247\u6bb5\u8d44\u6e90\uff0c\u4f9d\u6b21\u8fdb\u884c\u64ad\u653e\u5373\u53ef\u3002\u800c\u5bf9\u4e8e\u76f4\u64ad\u6765\u8bf4\uff0c\u5ba2\u6237\u7aef\u9700\u8981\u5b9a\u65f6\u91cd\u65b0\u8bf7\u6c42\u8be5 m3u8 \u6587\u4ef6\uff0c\u770b\u4e0b\u662f\u5426\u6709\u65b0\u7684\u7247\u6bb5\u6570\u636e\u9700\u8981\u8fdb\u884c\u4e0b\u8f7d\u5e76\u64ad\u653e\u3002<\/p>\n\n\n\n<p>\u5f53 m3u8 \u4f5c\u4e3a\u4e3b\u64ad\u653e\u5217\u8868\uff08Master Playlist\uff09\u65f6\uff0c\u5176\u5185\u90e8\u63d0\u4f9b\u7684\u662f\u540c\u4e00\u4efd\u5a92\u4f53\u8d44\u6e90\u7684\u591a\u4efd\u6d41\u5217\u8868\u8d44\u6e90\uff08Variant Strean\uff09\u3002\u5176\u683c\u5f0f\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">#EXTM3U\n#EXT-X-STREAM-INF:BANDWIDTH=150000,RESOLUTION=416x234,CODECS=\"avc1.42e00a,mp4a.40.2\"\nhttp:\/\/example.com\/low\/index.m3u8\n#EXT-X-STREAM-INF:BANDWIDTH=240000,RESOLUTION=416x234,CODECS=\"avc1.42e00a,mp4a.40.2\"\nhttp:\/\/example.com\/lo_mid\/index.m3u8\n#EXT-X-STREAM-INF:BANDWIDTH=440000,RESOLUTION=416x234,CODECS=\"avc1.42e00a,mp4a.40.2\"\nhttp:\/\/example.com\/hi_mid\/index.m3u8\n#EXT-X-STREAM-INF:BANDWIDTH=640000,RESOLUTION=640x360,CODECS=\"avc1.42e00a,mp4a.40.2\"\nhttp:\/\/example.com\/high\/index.m3u8\n#EXT-X-STREAM-INF:BANDWIDTH=64000,CODECS=\"mp4a.40.5\"\nhttp:\/\/example.com\/audio\/index.m3u8\n<\/pre>\n\n\n\n<p>\u8be5\u5907\u7528\u6d41\u8d44\u6e90\u6307\u5b9a\u4e86\u591a\u79cd\u4e0d\u540c\u7801\u7387\uff0c\u4e0d\u540c\u683c\u5f0f\u7684\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff0c\u5e76\u4e14\uff0c\u8be5\u5907\u7528\u6d41\u8d44\u6e90\u4e5f\u53ef\u540c\u65f6\u63d0\u4f9b\u4e0d\u540c\u7248\u672c\u7684\u8d44\u6e90\u5185\u5bb9\uff0c\u6bd4\u5982\u4e0d\u540c\u8bed\u8a00\u7684\u97f3\u9891\u6587\u4ef6\uff0c\u4e0d\u540c\u89d2\u5ea6\u62cd\u6444\u7684\u89c6\u5c4f\u6587\u4ef6\u7b49\u7b49\u3002\u5ba2\u6237\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u7684\u7f51\u7edc\u72b6\u6001\u9009\u53d6\u5408\u9002\u7801\u6d41\u7684\u8d44\u6e90\uff0c\u5e76\u4e14\u6700\u597d\u6839\u636e\u7528\u6237\u559c\u597d\u9009\u62e9\u5408\u9002\u7684\u8d44\u6e90\u5185\u5bb9\u3002<\/p>\n\n\n\n<p>\u66f4\u591a\u8be6\u7ec6\u5185\u5bb9\uff0c\u53ef\u67e5\u770b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a rel=\"nofollow\" href=\"https:\/\/developer.apple.com\/documentation\/http_live_streaming\/example_playlists_for_http_live_streaming\/creating_a_master_playlist\" target=\"_blank\" rel=\"noreferrer noopener\">Creating a Master Playlist<\/a><\/li><li><a rel=\"nofollow\" href=\"https:\/\/developer.apple.com\/documentation\/http_live_streaming\/example_playlists_for_http_live_streaming\/adding_alternate_media_to_a_playlist\" target=\"_blank\" rel=\"noreferrer noopener\">Adding Alternate Media to a Playlist<\/a><\/li><\/ul>\n\n\n\n<p>\u4ee5\u4e0a\uff0c\u5c31\u662f m3u8 \u6587\u4ef6\u7684\u5927\u6982\u5185\u5bb9\u3002\u4e0b\u9762\uff0c\u6211\u4eec\u5c31\u5bf9 m3u8 \u5185\u5bb9\u683c\u5f0f\u8fdb\u884c\u8bb2\u89e3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">m3u8 \u6587\u4ef6\u683c\u5f0f\u7b80\u89e3<\/h2>\n\n\n\n<p>m3u8 \u7684\u6587\u4ef6\u683c\u5f0f\u4e3b\u8981\u5305\u542b\u4e09\u65b9\u9762\u5185\u5bb9\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\n<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-10\" target=\"_blank\" rel=\"noreferrer noopener\">\u6587\u4ef6\u64ad\u653e\u5217\u8868\u683c\u5f0f\u5b9a\u4e49<\/a><\/strong>\uff1a\u64ad\u653e\u5217\u8868\uff08Playlist\uff0c\u4e5f\u5373 m3u8 \u6587\u4ef6\uff09 \u5185\u5bb9\u9700\u4e25\u683c\u6ee1\u8db3<a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-10\" target=\"_blank\" rel=\"noreferrer noopener\">\u89c4\u8303\u5b9a\u4e49<\/a>\u6240\u63d0\u8981\u6c42\u3002\u4e0b\u9762\u7f57\u5217\u4e00\u4e9b\u4e3b\u8981\u9075\u5faa\u7684\u6761\u4ef6\uff1a<\/li><\/ol>\n\n\n\n<p>\u2002\u261b m3u8 \u6587\u4ef6\u5fc5\u987b\u4ee5 utf-8 \u8fdb\u884c\u7f16\u7801\uff0c\u4e0d\u80fd\u4f7f\u7528 Byte Order Mark\uff08BOM\uff09\u5b57\u8282\u5e8f\uff0c \u4e0d\u80fd\u5305\u542b utf-8 \u63a7\u5236\u5b57\u7b26\uff08U+0000 ~ U_001F \u548c U+007F ~ u+009F\uff09\u3002<\/p>\n\n\n\n<p>\u2002\u261b m3u8 \u6587\u4ef6\u7684\u6bcf\u4e00\u884c\u8981\u4e48\u662f\u4e00\u4e2a URI\uff0c\u8981\u4e48\u662f\u7a7a\u884c\uff0c\u8981\u4e48\u5c31\u662f\u4ee5 <strong>#<\/strong> \u5f00\u5934\u7684\u5b57\u7b26\u4e32\u3002\u4e0d\u80fd\u51fa\u73b0\u7a7a\u767d\u5b57\u7b26\uff0c\u9664\u4e86\u663e\u793a\u58f0\u660e\u7684\u5143\u7d20\u3002<\/p>\n\n\n\n<p>\u2002\u261b m3u8 \u6587\u4ef6\u4e2d\u4ee5 <strong>#<\/strong> \u5f00\u5934\u7684\u5b57\u7b26\u4e32\u8981\u4e48\u662f\u6ce8\u91ca\uff0c\u8981\u4e48\u5c31\u662f\u6807\u7b7e\u3002\u6807\u7b7e\u4ee5 <strong>#EXT<\/strong> \u5f00\u5934\uff0c\u5927\u5c0f\u5199\u654f\u611f\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\n<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-11\" target=\"_blank\" rel=\"noreferrer noopener\">\u5c5e\u6027\u5217\u8868\uff08Attribute Lists\uff09<\/a><\/strong>\uff1a\u9ed8\u5199\u7279\u5b9a\u7684\u6807\u7b7e\u62e5\u6709\u503c\uff0c\u8fd9\u4e9b\u503c\u5373\u4e3a\u5c5e\u6027\u5217\u8868\u3002\u6807\u7b7e\u540e\u9762\u7684\u5c5e\u6027\u5217\u8868\u4ee5 <em>\u9017\u53f7<\/em> \u4f5c\u4e3a\u5206\u9694\u7b26\uff0c\u5206\u79bb\u51fa\u591a\u7ec4\u4e0d\u5e26\u7a7a\u683c\u7684 <em>\u5c5e\u6027\/\u503c<\/em> \u5bf9\u3002<br>\n<strong>\u5c5e\u6027\/\u503c<\/strong> \u5bf9\u7684\u8bed\u6cd5\u683c\u5f0f\u5982\u4e0b\uff1a<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">AttributeName=AttributeValue\n<\/pre>\n\n\n\n<p>\u5176\u4e2d\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>\u5c5e\u6027<code>AttributeName<\/code><\/strong>\u662f\u7531 [A..Z],[0..9] \u548c <code>-<\/code> \u7ec4\u6210\u7684\u4e0d\u5e26\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u3002\u56e0\u6b64\uff0c<strong>\u5c5e\u6027<code>AttributeName<\/code>\u53ea\u80fd\u4f7f\u7528\u5927\u5199\u5b57\u6bcd\uff0c\u4e0d\u80fd\u4f7f\u7528\u5c0f\u5199\u5b57\u6bcd<\/strong>\uff0c\u5e76\u4e14<code>AttributeName<\/code>\u548c<code>=<\/code>\u4e2d\u95f4\u4e0d\u80fd\u6709\u7a7a\u683c\uff0c\u540c\u7406\uff0c<code>=<\/code>\u548c<code>AttributeValue<\/code>\u4e4b\u95f4\u4e5f\u4e0d\u80fd\u6709\u7a7a\u683c\u3002<\/li><li><strong>\u503c<code>AttributeValue<\/code><\/strong>\u7684\u53ea\u80fd\u53d6\u4ee5\u4e0b\u7c7b\u578b\uff1a<br>\n\u261b <strong>\u5341\u8fdb\u5236\u6574\u578b\uff08decimal-interger\uff09<\/strong>\uff1a\u7531 [0..9] \u4e4b\u95f4\u7ec4\u6210\u7684\u5341\u8fdb\u5236\u4e0d\u5e26\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\uff0c\u8303\u56f4\u4e3a 0 ~ 2^64\uff0818446744073709551615\uff09\uff0c\u5b57\u7b26\u957f\u5ea6\u4e3a 1 ~ 20 \u4e4b\u95f4\u3002<br>\n\u261b <strong>\u5341\u516d\u8fdb\u5236\u5e8f\u5217<\/strong>\uff1a\u7531 [0..9] \u548c [A..F] \u4e14\u524d\u7f00\u4e3a 0x \u6216 0X \u7ec4\u5408\u6210\u7684\u4e0d\u5e26\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u3002\u5176\u5e8f\u5217\u7684\u6700\u5927\u957f\u5ea6\u53d6\u51b3\u4e8e\u4ed6\u7684\u5c5e\u6027\u540d<code>AttributeNames<\/code>\u3002<br>\n\u261b <strong>\u5e26\u7b26\u53f7\u5341\u8fdb\u5236\u6d6e\u70b9\u578b\uff08signed-decimal-floating-point\uff09<\/strong>\uff1a\u7531 [0..9]\uff0c<code>-<\/code>\u548c<code>.<\/code>\u7ec4\u5408\u6210\u7684\u4e0d\u5e26\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u3002<br>\n\u261b <strong>\u5b57\u7b26\u4e32\uff08quoted-string\uff09<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u8868\u793a\u7684\u5b57\u7b26\u4e32\u3002\u5176\u4e2d\uff0c0xA\uff0c0xD \u548c \u53cc\u5f15\u53f7<code>\"<\/code>\u4e0d\u80fd\u51fa\u73b0\u5728\u8be5\u5b57\u7b26\u4e32\u4e2d\u3002\u8be5\u5b57\u7b26\u4e32\u533a\u5206\u5927\u5c0f\u5199\u3002<br>\n\u261b <strong>\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\uff08enumerated-string\uff09<\/strong>\uff1a\u7531<code>AttributeName<\/code>\u663e\u793a\u5b9a\u4e49\u7684\u4e00\u7cfb\u5217\u4e0d\u5e26\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\u3002\u8be5\u5b57\u7b26\u4e32\u4e0d\u80fd\u5305\u542b\u53cc\u5f15\u53f7<code>\"<\/code>\uff0c\u9017\u53f7<code>,<\/code>\u548c\u7a7a\u767d\u5b57\u7b26\u3002<br>\n\u261b <strong>decimal-resolution<\/strong>\uff1a\u7531\u5b57\u7b26<code>x<\/code>\u8fdb\u884c\u9694\u79bb\u7684\u4e24\u4e2a\u5341\u8fdb\u5236\u6574\u578b\u6570\u3002\u7b2c\u4e00\u4e2a\u6574\u578b\u8868\u793a\u6c34\u5e73\u5bbd\u5ea6\u5927\u5c0f\uff0c\u7b2c\u4e8c\u4e2a\u6574\u578b\u6570\u8868\u793a\u5782\u76f4\u65b9\u5411\u9ad8\u5ea6\u5927\u5c0f\uff08\u5355\u4f4d\uff1a\u50cf\u7d20\uff09\u3002<\/li><\/ul>\n\n\n\n<ol class=\"wp-block-list\"><li>\n<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-12\" target=\"_blank\" rel=\"noreferrer noopener\">\u6807\u7b7e<\/a><\/strong>\uff1a\u6807\u7b7e\u7528\u4e8e\u6307\u5b9a m3u8 \u6587\u4ef6\u7684\u5168\u5c40\u53c2\u6570\u6216\u5728\u5176\u540e\u9762\u7684\u5207\u7247\u6587\u4ef6\/\u5a92\u4f53\u64ad\u653e\u5217\u8868\u7684\u4e00\u4e9b\u4fe1\u606f\u3002<\/li><\/ol>\n\n\n\n<p>\u6807\u7b7e\u7684\u7c7b\u578b\u53ef\u5206\u4e3a\u4e94\u79cd\u7c7b\u578b\uff1a<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#section-4.3.1\" target=\"_blank\" rel=\"noreferrer noopener\">\u57fa\u7840\u6807\u7b7e\uff08Basic Tags\uff09<\/a><\/strong>\uff0c<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-13\" target=\"_blank\" rel=\"noreferrer noopener\">\u5a92\u4f53\u7247\u6bb5\u7c7b\u578b\u6807\u7b7e\uff08Media Segment Tags\uff09<\/a><\/strong>\uff0c<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-22\" target=\"_blank\" rel=\"noreferrer noopener\">\u5a92\u4f53\u64ad\u653e\u5217\u8868\u7c7b\u578b\u6807\u7b7e<\/a><\/strong>\uff0c<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-25\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e3b\u64ad\u653e\u5217\u8868\u7c7b\u578b\u6807\u7b7e<\/a><\/strong> \u548c <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-35\" target=\"_blank\" rel=\"noreferrer noopener\">\u64ad\u653e\u5217\u8868\u7c7b\u578b\u6807\u7b7e<\/a><\/strong>\u3002\u5176\u5177\u4f53\u5185\u5bb9\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#section-4.3.1\" target=\"_blank\" rel=\"noreferrer noopener\">\u57fa\u7840\u6807\u7b7e\uff08Basic Tags\uff09<\/a><\/strong>\uff1a\u53ef\u540c\u65f6\u9002\u7528\u4e8e\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Media Playlist\uff09\u548c\u4e3b\u64ad\u653e\u5217\u8868\uff08Master Playlist\uff09\u3002\u5177\u4f53\u6807\u7b7e\u5982\u4e0b\uff1a<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-12\" target=\"_blank\" rel=\"noreferrer noopener\">EXTM3U<\/a><\/strong>\uff1a\u8868\u660e\u8be5\u6587\u4ef6\u662f\u4e00\u4e2a m3u8 \u6587\u4ef6\u3002\u6bcf\u4e2a <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/M3U\" target=\"_blank\" rel=\"noreferrer noopener\">M3U<\/a> \u6587\u4ef6\u5fc5\u987b\u5c06\u8be5\u6807\u7b7e\u653e\u7f6e\u5728\u7b2c\u4e00\u884c\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-12\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-VERSION<\/a><\/strong>\uff1a\u8868\u793a <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP_Live_Streaming\" target=\"_blank\" rel=\"noreferrer noopener\">HLS<\/a> \u7684\u534f\u8bae\u7248\u672c\u53f7\uff0c\u8be5\u6807\u7b7e\u4e0e\u6d41\u5a92\u4f53\u7684\u517c\u5bb9\u6027\u76f8\u5173\u3002\u8be5\u6807\u7b7e\u4e3a\u5168\u5c40\u4f5c\u7528\u57df\uff0c\u4f7f\u80fd\u6574\u4e2a m3u8 \u6587\u4ef6\uff1b\u6bcf\u4e2a m3u8 \u6587\u4ef6\u5185\u6700\u591a\u53ea\u80fd\u51fa\u73b0\u4e00\u4e2a\u8be5\u6807\u7b7e\u5b9a\u4e49\u3002\u5982\u679c m3u8 \u6587\u4ef6\u4e0d\u5305\u542b\u8be5\u6807\u7b7e\uff0c\u5219\u9ed8\u8ba4\u4e3a\u534f\u8bae\u7684\u7b2c\u4e00\u4e2a\u7248\u672c\u3002<\/li><li><strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-13\" target=\"_blank\" rel=\"noreferrer noopener\">\u5a92\u4f53\u7247\u6bb5\u7c7b\u578b\u6807\u7b7e\uff08Media Segment Tags\uff09<\/a><\/strong>\uff1a\u6bcf\u4e2a\u5207\u7247 URI \u524d\u9762\u90fd\u6709\u4e00\u7cfb\u5217\u5a92\u4f53\u7247\u6bb5\u6807\u7b7e\u5bf9\u5176\u8fdb\u884c\u63cf\u8ff0\u3002\u6709\u4e9b\u7247\u6bb5\u6807\u7b7e\u53ea\u5bf9\u5176\u540e\u5207\u7247\u8d44\u6e90\u6709\u6548\uff1b\u6709\u4e9b\u7247\u6bb5\u6807\u7b7e\u5bf9\u5176\u540e\u6240\u6709\u5207\u7247\u90fd\u6709\u6548\uff0c\u76f4\u5230\u540e\u7eed\u9047\u5230\u53e6\u4e00\u4e2a\u8be5\u6807\u7b7e\u63cf\u8ff0\u3002<strong>\u5a92\u4f53\u7247\u6bb5\u7c7b\u578b\u6807\u7b7e\u4e0d\u80fd\u51fa\u73b0\u5728\u4e3b\u64ad\u653e\u5217\u8868\uff08Master Playlist\uff09\u4e2d<\/strong>\u3002\u5177\u4f53\u6807\u7b7e\u5982\u4e0b\uff1a<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-13\" target=\"_blank\" rel=\"noreferrer noopener\">EXTINF<\/a><\/strong>\uff1a\u8868\u793a\u5176\u540e URL \u6307\u5b9a\u7684\u5a92\u4f53\u7247\u6bb5\u65f6\u957f\uff08\u5355\u4f4d\u4e3a\u79d2\uff09\u3002\u6bcf\u4e2a URL \u5a92\u4f53\u7247\u6bb5\u4e4b\u524d\u5fc5\u987b\u6307\u5b9a\u8be5\u6807\u7b7e\u3002\u8be5\u6807\u7b7e\u7684\u4f7f\u7528\u683c\u5f0f\u4e3a\uff1a<code>#EXTINF:&lt;duration&gt;,[&lt;title&gt;]<\/code>,\u5176\u4e2d\uff0c\u53c2\u6570<code>duration<\/code>\u53ef\u4ee5\u4e3a\u5341\u8fdb\u5236\u7684\u6574\u578b\u6216\u8005\u6d6e\u70b9\u578b\uff0c\u5176\u503c\u5fc5\u987b\u5c0f\u4e8e\u6216\u7b49\u4e8e <strong>EXT-X-TARGETDURATION<\/strong> \u6307\u5b9a\u7684\u503c\uff08\u6ce8\uff1a\u5efa\u8bae\u59cb\u7ec8\u4f7f\u7528\u6d6e\u70b9\u578b\u6307\u5b9a\u65f6\u957f\uff0c\u8fd9\u53ef\u4ee5\u8ba9\u5ba2\u6237\u7aef\u5728\u5b9a\u4f4d\u6d41\u65f6\uff0c\u51cf\u5c11\u56db\u820d\u4e94\u5165\u9519\u8bef\u3002\u4f46\u662f\u5982\u679c\u517c\u5bb9\u7248\u672c\u53f7 <strong>EXT-X-VERSION<\/strong> \u5c0f\u4e8e 3\uff0c\u90a3\u4e48\u5fc5\u987b\u4f7f\u7528\u6574\u578b\uff09\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-14\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-BYTERANGE<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u8868\u793a\u63a5\u4e0b\u6765\u7684\u5207\u7247\u8d44\u6e90\u662f\u5176\u540e URI \u6307\u5b9a\u7684\u5a92\u4f53\u7247\u6bb5\u8d44\u6e90\u7684\u5c40\u90e8\u8303\u56f4\uff08\u5373\u622a\u53d6 URI \u5a92\u4f53\u8d44\u6e90\u90e8\u5206\u5185\u5bb9\u4f5c\u4e3a\u4e0b\u4e00\u4e2a\u5207\u7247\uff09\u3002\u8be5\u6807\u7b7e\u53ea\u5bf9\u5176\u540e\u4e00\u4e2a URI \u8d77\u4f5c\u7528\u3002\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-BYTERANGE:&lt;n&gt;[@&lt;o&gt;]<\/code>\uff0c\u5176\u4e2d\uff0c<code>n<\/code>\u662f\u4e00\u4e2a\u5341\u8fdb\u5236\u6574\u578b\uff0c\u8868\u793a\u622a\u53d6\u7247\u6bb5\u5927\u5c0f\uff08\u5355\u4f4d\uff1a\u5b57\u8282\uff09\u3002\u53ef\u9009\u53c2\u6570<code>o<\/code>\u4e5f\u662f\u4e00\u4e2a\u5341\u8fdb\u5236\u6574\u578b\uff0c\u6307\u793a\u622a\u53d6\u8d77\u59cb\u4f4d\u7f6e\uff08\u4ee5\u5b57\u8282\u8868\u793a\uff0c\u5728 URI \u6307\u5b9a\u7684\u8d44\u6e90\u5f00\u5934\u79fb\u52a8\u8be5\u5b57\u8282\u4f4d\u7f6e\u540e\u8fdb\u884c\u622a\u53d6\uff09\u3002\u5982\u679c<code>o<\/code>\u672a\u6307\u5b9a\uff0c\u5219\u622a\u53d6\u8d77\u59cb\u4f4d\u7f6e\u4ece\u4e0a\u4e00\u4e2a\u8be5\u6807\u7b7e\u622a\u53d6\u5b8c\u6210\u7684\u4e0b\u4e00\u4e2a\u5b57\u8282\uff08\u5373\u4e0a\u4e00\u4e2a<code>n+o+1<\/code>\uff09\u5f00\u59cb\u622a\u53d6\u3002<br>\n\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u8be5\u6807\u7b7e\uff0c\u5219\u8868\u660e\u7684\u5207\u5206\u8303\u56f4\u4e3a\u6574\u4e2a URI \u8d44\u6e90\u7247\u6bb5\u3002<br>\n\u6ce8\uff1a\u4f7f\u7528 <strong>EXT-X-BYTERANGE<\/strong> \u6807\u7b7e\u8981\u6c42\u517c\u5bb9\u7248\u672c\u53f7 <strong>EXT-X-VERSION<\/strong> \u5927\u4e8e\u7b49\u4e8e 4\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-14\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-DISCONTINUITY<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u8868\u660e\u5176\u524d\u4e00\u4e2a\u5207\u7247\u4e0e\u4e0b\u4e00\u4e2a\u5207\u7247\u4e4b\u95f4\u5b58\u5728\u4e2d\u65ad\u3002\u5176\u683c\u5f0f\u4e3a\uff1a<code>EXT-X-DISCONTINUITY<\/code>\u3002\u5f53\u51fa\u73b0\u4ee5\u4e0b\u60c5\u51b5\u65f6\uff0c\u5fc5\u987b\u4f7f\u7528\u8be5\u6807\u7b7e\uff1a<br>\n\u261b file format<br>\n\u261b number, type, and identifiers of tracks<br>\n\u261b timestamp sequence<br>\n\u5f53\u51fa\u73b0\u4ee5\u4e0b\u60c5\u51b5\u65f6\uff0c\u5e94\u8be5\u4f7f\u7528\u8be5\u6807\u7b7e\uff1a<br>\n\u261b encoding parameters<br>\n\u261b encoding sequence<br>\n\u6ce8\uff1a<strong>EXT-X-DISCONTINUITY<\/strong> \u7684\u4e00\u4e2a\u7ecf\u5178\u4f7f\u7528\u573a\u666f\u5c31\u662f\u5728\u89c6\u5c4f\u6d41\u4e2d\u63d2\u5165\u5e7f\u544a\uff0c\u7531\u4e8e\u89c6\u5c4f\u6d41\u4e0e\u5e7f\u544a\u89c6\u5c4f\u6d41\u4e0d\u662f\u540c\u4e00\u4efd\u8d44\u6e90\uff0c\u56e0\u6b64\u5728\u8fd9\u4e24\u79cd\u6d41\u5207\u6362\u65f6\u4f7f\u7528 <strong>EXT-X-DISCONTINUITY<\/strong> \u8fdb\u884c\u6307\u660e\uff0c\u5ba2\u6237\u7aef\u770b\u5230\u8be5\u6807\u7b7e\u540e\uff0c\u5c31\u4f1a\u5904\u7406\u8fd9\u79cd\u5207\u6362\u4e2d\u65ad\u95ee\u9898\uff0c\u8ba9\u4f53\u9a8c\u66f4\u4f73\u3002\u66f4\u591a\u8be6\u7ec6\u5185\u5bb9\uff0c\u8bf7\u67e5\u770b\uff1a<a rel=\"nofollow\" href=\"https:\/\/developer.apple.com\/documentation\/http_live_streaming\/example_playlists_for_http_live_streaming\/incorporating_ads_into_a_playlist\" target=\"_blank\" rel=\"noreferrer noopener\">Incorporating Ads into a Playlist<\/a><br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-15\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-KEY<\/a><\/strong>\uff1a\u5a92\u4f53\u7247\u6bb5\u53ef\u4ee5\u8fdb\u884c\u52a0\u5bc6\uff0c\u800c\u8be5\u6807\u7b7e\u53ef\u4ee5\u6307\u5b9a\u89e3\u5bc6\u65b9\u6cd5\u3002\u8be5\u6807\u7b7e\u5bf9\u6240\u6709 <em>\u5a92\u4f53\u7247\u6bb5<\/em> \u548c \u7531\u6807\u7b7e <strong>EXT-X-MAP<\/strong> \u58f0\u660e\u7684\u56f4\u7ed5\u5176\u95f4\u7684\u6240\u6709 <em>\u5a92\u4f53\u521d\u59cb\u5316\u5757\uff08Meida Initialization Section\uff09<\/em> \u90fd\u8d77\u4f5c\u7528\uff0c\u76f4\u5230\u9047\u5230\u4e0b\u4e00\u4e2a <strong>EXT-X-KEY<\/strong>\uff08\u82e5 m3u8 \u6587\u4ef6\u53ea\u6709\u4e00\u4e2a <strong>EXT-X-KEY<\/strong> \u6807\u7b7e\uff0c\u5219\u5176\u4f5c\u7528\u4e8e\u6240\u6709\u5a92\u4f53\u7247\u6bb5\uff09\u3002\u591a\u4e2a <strong>EXT-X-KEY<\/strong> \u6807\u7b7e\u5982\u679c\u6700\u7ec8\u751f\u6210\u7684\u662f\u540c\u6837\u7684\u79d8\u94a5\uff0c\u5219\u4ed6\u4eec\u90fd\u53ef\u4f5c\u7528\u4e8e\u540c\u4e00\u4e2a\u5a92\u4f53\u7247\u6bb5\u3002<br>\n\u8be5\u6807\u7b7e\u4f7f\u7528\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-KEY:&lt;attribute-list&gt;<\/code>\uff0c\u5c5e\u6027\u5217\u8868\u53ef\u4ee5\u5305\u542b\u5982\u4e0b\u51e0\u4e2a\u952e\uff1a<br>\n\u261b <strong>METHOD<\/strong>\uff1a\u8be5\u503c\u662f\u4e00\u4e2a\u53ef\u679a\u4e3e\u7684\u5b57\u7b26\u4e32\uff0c\u6307\u5b9a\u4e86\u52a0\u5bc6\u65b9\u6cd5\u3002\u8be5\u952e\u662f\u5fc5\u987b\u53c2\u6570\u3002\u5176\u503c\u53ef\u4e3a<code>NONE<\/code>\uff0c<code>AES-128<\/code>\uff0c<code>SAMPLE-AES<\/code>\u5f53\u4e2d\u7684\u4e00\u4e2a\u3002<br>\n\u5176\u4e2d\uff1a<code>NONE<\/code>\u8868\u793a\u5207\u7247\u672a\u8fdb\u884c\u52a0\u5bc6\uff08\u6b64\u65f6\u5176\u4ed6\u5c5e\u6027\u4e0d\u80fd\u51fa\u73b0\uff09\uff1b<code>AES-128<\/code>\u8868\u793a\u8868\u793a\u4f7f\u7528 <a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#ref-AES_128\" target=\"_blank\" rel=\"noreferrer noopener\">AES-128<\/a> \u8fdb\u884c\u52a0\u5bc6\u3002<code>SAMPLE-AES<\/code>\u610f\u5473\u7740\u5a92\u4f53\u7247\u6bb5\u5f53\u4e2d\u5305\u542b\u6837\u672c\u5a92\u4f53\uff0c\u6bd4\u5982\u97f3\u9891\u6216\u89c6\u9891\uff0c\u5b83\u4eec\u4f7f\u7528 <a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#ref-AES_128\" target=\"_blank\" rel=\"noreferrer noopener\">AES-128<\/a> \u8fdb\u884c\u52a0\u5bc6\u3002\u8fd9\u79cd\u60c5\u51b5\u4e0b <strong>IV<\/strong> \u5c5e\u6027\u53ef\u4ee5\u51fa\u73b0\u4e5f\u53ef\u4ee5\u4e0d\u51fa\u73b0\u3002<br>\n\u261b <strong>URI<\/strong>\uff1a\u6307\u5b9a\u5bc6\u94a5\u8def\u5f84\u3002\u8be5\u952e\u662f\u5fc5\u987b\u53c2\u6570\uff0c\u9664\u975e <strong>METHOD<\/strong> \u4e3a<code>NONE<\/code>\u3002\u8be5\u5bc6\u94a5\u662f\u4e00\u4e2a 16 \u5b57\u8282\u7684\u6570\u636e\u3002<br>\n\u261b <strong>IV<\/strong>\uff1a\u8be5\u503c\u662f\u4e00\u4e2a 128 \u4f4d\u7684\u5341\u516d\u8fdb\u5236\u6570\u503c\u3002<a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#ref-AES_128\" target=\"_blank\" rel=\"noreferrer noopener\">AES-128<\/a> \u8981\u6c42\u4f7f\u7528\u76f8\u540c\u7684 16\u5b57\u8282 IV \u503c\u8fdb\u884c\u52a0\u5bc6\u548c\u89e3\u5bc6\u3002\u4f7f\u7528\u4e0d\u540c\u7684 IV \u503c\u53ef\u4ee5\u589e\u5f3a\u5bc6\u7801\u5f3a\u5ea6\u3002<br>\n\u5982\u679c\u5c5e\u6027\u5217\u8868\u51fa\u73b0 <strong>IV<\/strong>\uff0c\u5219\u4f7f\u7528\u8be5\u503c\uff1b\u5982\u679c\u672a\u51fa\u73b0\uff0c\u5219\u9ed8\u8ba4\u4f7f\u7528\u5a92\u4f53\u7247\u6bb5\u5e8f\u5217\u53f7\uff08\u5373 <strong>EXT-X-MEDIA-SEQUENCE<\/strong>\uff09\u4f5c\u4e3a\u5176 <strong>IV<\/strong> \u503c\uff0c\u4f7f\u7528\u5927\u7aef\u5b57\u8282\u5e8f\uff0c\u5f80\u5de6\u586b\u5145 0 \u76f4\u5230\u5e8f\u5217\u53f7\u6ee1\u8db3 16 \u5b57\u8282\uff08128 \u4f4d\uff09\u3002<br>\n\u261b <strong>KEYFORMAT<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u6807\u8bc6\u5bc6\u94a5\u5728\u5bc6\u94a5\u6587\u4ef6\u4e2d\u7684\u5b58\u50a8\u65b9\u5f0f\uff08\u5bc6\u94a5\u6587\u4ef6\u4e2d\u7684 <a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#ref-AES_128\" target=\"_blank\" rel=\"noreferrer noopener\">AES-128<\/a> \u5bc6\u94a5\u662f\u4ee5\u4e8c\u8fdb\u5236\u65b9\u5f0f\u5b58\u50a8\u768416\u4e2a\u5b57\u8282\u7684\u5bc6\u94a5\u3002\uff09\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\uff0c\u5176\u9ed8\u8ba4\u503c\u4e3a &#8220;identity&#8221;\u3002\u4f7f\u7528\u8be5\u5c5e\u6027\u8981\u6c42\u517c\u5bb9\u7248\u672c\u53f7 <strong>EXT-X-VERSION<\/strong> \u5927\u4e8e\u7b49\u4e8e 5\u3002<br>\n\u261b <strong>KEYFORMATVERSIONS<\/strong>\uff1a\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u88ab &#8220;\/&#8221; \u5206\u5272\u7684\u6b63\u6574\u578b\u6570\u503c\u6784\u6210\u7684\u5e26\u5f15\u53f7\u7684\u5b57\u7b26\u4e32\uff08\u6bd4\u5982\uff1a&#8221;1&#8243;\uff0c&#8221;1\/2&#8243;\uff0c&#8221;1\/2\/5&#8243;\uff09\u3002\u5982\u679c\u6709\u4e00\u4e2a\u6216\u591a\u7279\u5b9a\u7684 <strong>KEYFORMT<\/strong> \u7248\u672c\u88ab\u5b9a\u4e49\u4e86\uff0c\u5219\u53ef\u4f7f\u7528\u8be5\u5c5e\u6027\u6307\u793a\u5177\u4f53\u7248\u672c\u8fdb\u884c\u7f16\u8bd1\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\uff0c\u5176\u9ed8\u8ba4\u503c\u4e3a &#8220;1&#8221;\u3002\u4f7f\u7528\u8be5\u5c5e\u6027\u8981\u6c42\u517c\u5bb9\u7248\u672c\u53f7 <strong>EXT-X-VERSION<\/strong> \u5927\u4e8e\u7b49\u4e8e 5\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-17\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-MAP<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u6307\u660e\u4e86\u83b7\u53d6\u5a92\u4f53\u521d\u59cb\u5316\u5757\uff08Meida Initialization Section\uff09\u7684\u65b9\u6cd5\u3002\u8be5\u6807\u7b7e\u5bf9\u5176\u540e\u6240\u6709\u5a92\u4f53\u7247\u6bb5\u751f\u6548\uff0c\u76f4\u81f3\u9047\u5230\u53e6\u4e00\u4e2a <strong>EXT-X-MAP<\/strong> \u6807\u7b7e\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-MAP:&lt;attribute-list&gt;<\/code>\uff0c\u5176\u5c5e\u6027\u5217\u8868\u53d6\u503c\u8303\u56f4\u5982\u4e0b\uff1a<br>\n\u261b <strong>URI<\/strong>\uff1a\u7531\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u6307\u5b9a\u4e86\u5305\u542b\u5a92\u4f53\u521d\u59cb\u5316\u5757\u7684\u8d44\u6e90\u7684\u8def\u5f84\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>BYTERANGE<\/strong>\uff1a\u7531\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u6307\u5b9a\u4e86\u5a92\u4f53\u521d\u59cb\u5316\u5757\u5728 <strong>URI<\/strong> \u6307\u5b9a\u7684\u8d44\u6e90\u7684\u4f4d\u7f6e\uff08\u7247\u6bb5\uff09\u3002\u8be5\u5c5e\u6027\u6307\u5b9a\u7684\u8303\u56f4\u5e94\u5f53\u53ea\u5305\u542b\u5a92\u4f53\u521d\u59cb\u5316\u5757\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\uff0c\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u8868\u793a <strong>URI<\/strong> \u6307\u5b9a\u7684\u8d44\u6e90\u5c31\u662f\u5168\u90e8\u7684\u5a92\u4f53\u521d\u59cb\u5316\u5757\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-18\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-PROGRAM-DATE-TIME<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u4f7f\u7528\u4e00\u4e2a\u7edd\u5bf9\u65e5\u671f\/\u65f6\u95f4\u8868\u660e\u7b2c\u4e00\u4e2a\u6837\u672c\u7247\u6bb5\u7684\u53d6\u6837\u65f6\u95f4\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-PROGRAM-DATE-TIME:&lt;date-time-msec&gt;<\/code>\uff0c\u5176\u4e2d\uff0c<code>date-time-msec<\/code>\u662f\u4e00\u4e2a ISO\/IEC 8601:2004 \u89c4\u5b9a\u7684\u65e5\u671f\u683c\u5f0f\uff0c\u5f62\u5982\uff1aYYYY-MM-DDThh:mm:ss.SSSZ\u3002<br>\n\u25b7 <strong>EXT-X-DATERANGE<\/strong>\uff1a\u8be5\u6807\u7b7e\u5b9a\u4e49\u4e86\u4e00\u7cfb\u5217\u7531\u5c5e\u6027\/\u503c\u5bf9\u7ec4\u6210\u7684\u65e5\u671f\u8303\u56f4\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-DATERANGE:&lt;attribute-list&gt;<\/code>\uff0c\u5176\u5c5e\u6027\u5217\u8868\u53d6\u503c\u5982\u4e0b\uff1a<br>\n\u261b <strong>ID<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u552f\u4e00\u6307\u660e\u65e5\u671f\u8303\u56f4\u7684\u6807\u8bc6\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>CLASS<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u7531\u5ba2\u6237\u5b9a\u4e49\u7684\u4e00\u7cfb\u5217\u5c5e\u6027\u4e0e\u4e0e\u4e4b\u5bf9\u5e94\u7684\u8bed\u610f\u503c\u3002\u6240\u6709\u62e5\u6709\u540c\u4e00 <strong>CLASS<\/strong> \u5c5e\u6027\u7684\u65e5\u671f\u8303\u56f4\u5fc5\u987b\u9075\u5b88\u5bf9\u5e94\u7684\u8bed\u610f\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>START-DATE<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u65e5\u671f\u8303\u56f4\u8d77\u59cb\u503c\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>END-DATE<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u65e5\u671f\u8303\u56f4\u7ed3\u675f\u503c\u3002\u8be5\u5c5e\u6027\u503c\u5fc5\u987b\u5927\u4e8e\u6216\u7b49\u4e8e <strong>START-DATE<\/strong>\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>DURATION<\/strong>\uff1a\u65e5\u671f\u8303\u56f4\u7684\u6301\u7eed\u65f6\u95f4\u662f\u4e00\u4e2a\u5341\u8fdb\u5236\u6d6e\u70b9\u578b\u6570\u503c\u7c7b\u578b\uff08\u5355\u4f4d\uff1a\u79d2\uff09\u3002\u8be5\u5c5e\u6027\u503c\u4e0d\u80fd\u4e3a\u8d1f\u6570\u3002\u5f53\u8868\u8fbe\u7acb\u5373\u65f6\u95f4\u65f6\uff0c\u5c06\u8be5\u5c5e\u6027\u503c\u8bbe\u4e3a 0 \u5373\u53ef\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>PLANNED-DURATION<\/strong>\uff1a\u8be5\u5c5e\u6027\u4e3a\u65e5\u671f\u8303\u56f4\u7684\u671f\u671b\u6301\u7eed\u65f6\u957f\u3002\u5176\u503c\u4e3a\u4e00\u4e2a\u5341\u8fdb\u5236\u6d6e\u70b9\u6570\u503c\u7c7b\u578b\uff08\u5355\u4f4d\uff1a\u79d2\uff09\u3002\u8be5\u5c5e\u6027\u503c\u4e0d\u80fd\u4e3a\u8d1f\u6570\u3002\u5728\u9884\u5148\u65e0\u6cd5\u5f97\u77e5\u771f\u5b9e\u6301\u7eed\u65f6\u957f\u7684\u60c5\u51b5\u4e0b\uff0c\u53ef\u4f7f\u7528\u8be5\u5c5e\u6027\u4f5c\u4e3a\u65e5\u671f\u8303\u56f4\u7684\u671f\u671b\u9884\u4f30\u65f6\u957f\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>X-&lt;client-attribute&gt;<\/strong>\uff1a&#8221;X-&#8220;\u524d\u7f00\u662f\u9884\u7559\u7ed9\u5ba2\u6237\u7aef\u81ea\u5b9a\u4e49\u5c5e\u6027\u7684\u547d\u540d\u7a7a\u95f4\u3002\u5ba2\u6237\u7aef\u81ea\u5b9a\u4e49\u5c5e\u6027\u540d\u65f6\uff0c\u5e94\u5f53\u4f7f\u7528\u53cd\u5411 DNS\uff08reverse-DNS\uff09\u8bed\u6cd5\u6765\u907f\u514d\u51b2\u7a81\u3002\u81ea\u5b9a\u4e49\u5c5e\u6027\u503c\u5fc5\u987b\u662f\u4f7f\u7528\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u6216\u8005\u662f\u5341\u516d\u8fdb\u5236\u5e8f\u5217\uff0c\u6216\u8005\u662f\u5341\u8fdb\u5236\u6d6e\u70b9\u6570\uff0c\u6bd4\u5982\uff1aX-COM-EXAMPLE-AD-ID=&#8221;XYZ123&#8243;\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>SCTE35-CMD, SCTE35-OUT, SCTE35-IN<\/strong>\uff1a\u7528\u4e8e\u643a\u5e26 SCET-35 \u6570\u636e\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>END-ON-NEXT<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\uff0c\u5176\u503c\u5fc5\u987b\u4e3a YES\u3002\u8be5\u5c5e\u6027\u8868\u660e\u8fbe\u5230\u8be5\u8303\u56f4\u672b\u5c3e\uff0c\u4e5f\u5373\u7b49\u4e8e\u540e\u7eed\u8303\u56f4\u7684\u8d77\u59cb\u4f4d\u7f6e <strong>START-DATE<\/strong>\u3002\u540e\u7eed\u8303\u56f4\u662f\u6307\u5177\u6709\u76f8\u540c <strong>CLASS<\/strong> \u7684\uff0c\u5728\u8be5\u6807\u7b7e <strong>START-DATE<\/strong> \u4e4b\u540e\u7684\u5177\u6709\u6700\u65e9 <strong>START-DATE<\/strong> \u503c\u7684\u65e5\u671f\u8303\u56f4\u3002\u8be5\u5c5e\u6027\u65f6\u53ef\u9009\u53c2\u6570\u3002<\/li><li><strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-22\" target=\"_blank\" rel=\"noreferrer noopener\">\u5a92\u4f53\u64ad\u653e\u5217\u8868\u7c7b\u578b\u6807\u7b7e<\/a><\/strong>\uff1a\u5a92\u4f53\u64ad\u653e\u5217\u8868\u6807\u7b7e\u4e3a m3u8 \u6587\u4ef6\u7684\u5168\u5c40\u53c2\u6570\u4fe1\u606f\u3002\u8fd9\u4e9b\u6807\u7b7e\u53ea\u80fd\u5728 m3u8 \u6587\u4ef6\u4e2d\u81f3\u591a\u51fa\u73b0\u4e00\u6b21\u3002\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Media Playlist\uff09\u6807\u7b7e\u4e0d\u80fd\u51fa\u73b0\u5728\u4e3b\u64ad\u653e\u5217\u8868\uff08Master Playlist\uff09\u4e2d\u3002\u5a92\u4f53\u64ad\u653e\u5217\u8868\u5177\u4f53\u6807\u7b7e\u5982\u4e0b\u6240\u793a\uff1a<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-22\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-TARGETDURATION<\/a><\/strong>\uff1a\u8868\u793a\u6bcf\u4e2a\u89c6\u9891\u5206\u6bb5\u6700\u5927\u7684\u65f6\u957f\uff08\u5355\u4f4d\u79d2\uff09\u3002\u8be5\u6807\u7b7e\u4e3a\u5fc5\u9009\u6807\u7b7e\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-TARGETDURATION:&lt;s&gt;<\/code>\uff0c\u5176\u4e2d\uff0c\u53c2\u6570<code>s<\/code>\u8868\u793a\u76ee\u6807\u65f6\u957f\uff08\u5355\u4f4d\uff1a\u79d2\uff09\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-22\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-MEDIA-SEQUENCE<\/a><\/strong>\uff1a\u8868\u793a\u64ad\u653e\u5217\u8868\u7b2c\u4e00\u4e2a URL \u7247\u6bb5\u6587\u4ef6\u7684\u5e8f\u5217\u53f7\uff0c\u6bcf\u4e2a\u5a92\u4f53\u7247\u6bb5 URL \u90fd\u62e5\u6709\u4e00\u4e2a\u552f\u4e00\u7684\u6574\u578b\u5e8f\u5217\u53f7\u3002\u6bcf\u4e2a\u5a92\u4f53\u7247\u6bb5\u5e8f\u5217\u53f7\u6309\u51fa\u73b0\u987a\u5e8f\u4f9d\u6b21\u52a0 1\u3002\u5a92\u4f53\u7247\u6bb5\u5e8f\u5217\u53f7\u4e0e\u7247\u6bb5\u6587\u4ef6\u540d\u65e0\u5173\u3002\u5982\u679c\u8be5\u6807\u7b7e\u672a\u6307\u5b9a\uff0c\u5219\u9ed8\u8ba4\u5e8f\u5217\u53f7\u4ece 0 \u5f00\u59cb\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-MEDIA-SEQUENCE:&lt;number&gt;<\/code>\uff0c\u5176\u4e2d\uff0c\u53c2\u6570<code>number<\/code>\u5373\u4e3a\u5c3e\u968f\u5207\u7247\u5e8f\u5217\u53f7\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-23\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-DISCONTINUITY-SEQUENCE<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u4f7f\u80fd\u540c\u6b65\u76f8\u540c\u6d41\u7684\u4e0d\u540c Rendition \u548c \u5177\u5907 <strong>EXT-X-DISCONTINUITY<\/strong> \u6807\u7b7e\u7684\u4e0d\u540c\u5907\u4efd\u6d41\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-DISCONTINUITY-SEQUENCE:&lt;number&gt;<\/code>\uff0c\u5176\u4e2d\uff0c\u53c2\u6570<code>number<\/code>\u4e3a\u4e00\u4e2a\u5341\u8fdb\u5236\u6574\u578b\u6570\u503c\u3002<br>\n\u5982\u679c\u64ad\u653e\u5217\u8868\u672a\u8bbe\u7f6e <strong>EXT-X-DISCONTINUITY-SEQUENCE<\/strong> \u6807\u7b7e\uff0c\u90a3\u4e48\u5bf9\u4e8e\u7b2c\u4e00\u4e2a\u5207\u7247\u7684\u4e2d\u65ad\u5e8f\u5217\u53f7\u5e94\u5f53\u4e3a 0\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-23\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-ENDLIST<\/a><\/strong>\uff1a\u8868\u660e m3u8 \u6587\u4ef6\u7684\u7ed3\u675f\u3002\u8be5\u6807\u7b7e\u53ef\u51fa\u73b0\u5728 m3u8 \u6587\u4ef6\u4efb\u610f\u4f4d\u7f6e\uff0c\u4e00\u822c\u662f\u7ed3\u5c3e\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-ENDLIST<\/code>\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-24\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-PLAYLIST-TYPE<\/a><\/strong>\uff1a\u8868\u660e\u6d41\u5a92\u4f53\u7c7b\u578b\u3002\u5168\u5c40\u751f\u6548\u3002\u8be5\u6807\u7b7e\u4e3a\u53ef\u9009\u6807\u7b7e\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-PLAYLIST-TYPE:&lt;type-enum&gt;<\/code>\uff0c\u5176\u4e2d\uff0c<code>type-enum<\/code>\u53ef\u9009\u503c\u5982\u4e0b\uff1a<br>\n\u261b <strong>VOD<\/strong> \u5373 Video on Demand\uff0c\u8868\u793a\u8be5\u89c6\u5c4f\u6d41\u4e3a\u70b9\u64ad\u6e90\uff0c\u56e0\u6b64\u670d\u52a1\u5668\u4e0d\u80fd\u66f4\u6539\u8be5 m3u8 \u6587\u4ef6\uff1b<br>\n\u261b <strong>EVENT<\/strong> \u8868\u793a\u8be5\u89c6\u9891\u6d41\u4e3a\u76f4\u64ad\u6e90\uff0c\u56e0\u6b64\u670d\u52a1\u5668\u4e0d\u80fd\u66f4\u6539\u6216\u5220\u9664\u8be5\u6587\u4ef6\u4efb\u610f\u90e8\u5206\u5185\u5bb9\uff08\u4f46\u662f\u53ef\u4ee5\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u65b0\u5185\u5bb9\uff09\uff08\u6ce8\uff1a<strong>VOD<\/strong> \u6587\u4ef6\u901a\u5e38\u5e26\u6709 <strong>EXT-X-ENDLIST<\/strong> \u6807\u7b7e\uff0c\u56e0\u4e3a\u5176\u4e3a\u70b9\u64ad\u6e90\uff0c\u4e0d\u4f1a\u6539\u53d8\uff1b\u800c <strong>EVEVT<\/strong> \u6587\u4ef6\u521d\u59cb\u5316\u65f6\u4e00\u822c\u4e0d\u4f1a\u6709 <strong>EXT-X-ENDLIST<\/strong> \u6807\u7b7e\uff0c\u6697\u793a\u6709\u65b0\u7684\u6587\u4ef6\u4f1a\u6dfb\u52a0\u5230\u64ad\u653e\u5217\u8868\u672b\u5c3e\uff0c\u56e0\u6b64\u4e5f\u9700\u8981\u5ba2\u6237\u7aef\u5b9a\u65f6\u83b7\u53d6\u8be5 m3u8 \u6587\u4ef6\uff0c\u4ee5\u83b7\u53d6\u65b0\u7684\u5a92\u4f53\u7247\u6bb5\u8d44\u6e90\uff0c\u76f4\u5230\u8bbf\u95ee\u5230 <strong>EXT-X-ENDLIST<\/strong> \u6807\u7b7e\u624d\u505c\u6b62\uff09\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-24\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-I-FRAMES-ONLY<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u8868\u793a\u6bcf\u4e2a\u5a92\u4f53\u7247\u6bb5\u90fd\u662f\u4e00\u4e2a I-frame\u3002I-frames \u5e27\u89c6\u5c4f\u7f16\u7801\u4e0d\u4f9d\u8d56\u4e8e\u5176\u4ed6\u5e27\u6570\uff0c\u56e0\u6b64\u53ef\u4ee5\u901a\u8fc7 I-frame \u8fdb\u884c\u5feb\u901f\u64ad\u653e\uff0c\u6025\u901f\u7ffb\u8f6c\u7b49\u64cd\u4f5c\u3002\u8be5\u6807\u7b7e\u5168\u5c40\u751f\u6548\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-I-FRAMES-ONLY<\/code>\u3002<br>\n\u5982\u679c\u64ad\u653e\u5217\u8868\u8bbe\u7f6e\u4e86 <strong>EXT-X-I-FRAMES-ONLY<\/strong>\uff0c\u90a3\u4e48\u5207\u7247\u7684\u65f6\u957f\uff08<strong>EXTINF<\/strong> \u6807\u7b7e\u7684\u503c\uff09\u5373\u4e3a\u5f53\u524d\u5207\u7247 I-frame \u5e27\u5f00\u59cb\u5230\u4e0b\u4e00\u4e2a I-frame \u5e27\u51fa\u73b0\u7684\u65f6\u957f\u3002<br>\n\u5a92\u4f53\u8d44\u6e90\u5982\u679c\u5305\u542b I-frame \u5207\u7247\uff0c\u90a3\u4e48\u5fc5\u987b\u63d0\u4f9b\u5a92\u4f53\u521d\u59cb\u5316\u5757\u6216\u8005\u901a\u8fc7 <strong>EXT-X-MAP<\/strong> \u6807\u7b7e\u63d0\u4f9b\u5a92\u4f53\u521d\u59cb\u5316\u5757\u7684\u83b7\u53d6\u9014\u5f84\uff0c\u8fd9\u6837\u5ba2\u6237\u7aef\u5c31\u80fd\u901a\u8fc7\u8fd9\u4e9b I-frame \u5207\u7247\u4ee5\u4efb\u610f\u987a\u5e8f\u8fdb\u884c\u52a0\u8f7d\u548c\u89e3\u7801\u3002\u5982\u679c I-frame \u5207\u7247\u8bbe\u7f6e\u4e86 <strong>EXT-BYTERANGE<\/strong>\uff0c\u90a3\u4e48\u5c31\u7edd\u5bf9\u4e0d\u80fd\u63d0\u4f9b\u5a92\u4f53\u521d\u59cb\u5316\u5757\u3002<br>\n\u4f7f\u7528 <strong>EXT-X-I-FRAMES-ONLY<\/strong> \u8981\u6c42\u7684\u517c\u5bb9\u7248\u672c\u53f7 <strong>EXT-X-VERSION<\/strong> \u5927\u4e8e\u7b49\u4e8e 4\u3002<\/li><li><strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-25\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e3b\u64ad\u653e\u5217\u8868\u7c7b\u578b\u6807\u7b7e<\/a><\/strong>\uff1a\u4e3b\u64ad\u653e\u5217\u8868\uff08Master Playlist\uff09\u5b9a\u4e49\u4e86\u5907\u4efd\u6d41\uff0c\u591a\u8bed\u8a00\u7ffb\u8bd1\u6d41\u548c\u5176\u4ed6\u5168\u5c40\u53c2\u6570\u3002\u4e3b\u64ad\u653e\u5217\u8868\u6807\u7b7e\u7edd\u4e0d\u80fd\u51fa\u73b0\u5728\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Media Playlist\uff09\u4e2d\u3002\u5176\u5177\u4f53\u6807\u7b7e\u5982\u4e0b\uff1a<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-25\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-MEDIA<\/a><\/strong>\uff1a\u7528\u4e8e\u6307\u5b9a\u76f8\u540c\u5185\u5bb9\u7684\u53ef\u66ff\u6362\u7684\u591a\u8bed\u8a00\u7ffb\u8bd1\u64ad\u653e\u5a92\u4f53\u5217\u8868\u8d44\u6e90\u3002\u6bd4\u5982\uff0c\u901a\u8fc7\u4e09\u4e2a <strong>EXT-X-MEIDA<\/strong> \u6807\u7b7e\uff0c\u53ef\u4ee5\u63d0\u4f9b\u5305\u542b\u82f1\u6587\uff0c\u6cd5\u8bed\u548c\u897f\u73ed\u7259\u8bed\u7248\u672c\u7684\u76f8\u540c\u5185\u5bb9\u7684\u97f3\u9891\u8d44\u6e90\uff0c\u6216\u8005\u901a\u8fc7\u4e24\u4e2a <strong>EXT-X-MEDIA<\/strong> \u63d0\u4f9b\u4e24\u4e2a\u4e0d\u540c\u62cd\u6444\u89d2\u5ea6\u7684\u89c6\u5c4f\u8d44\u6e90\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-MEDIA:&lt;attribute-list&gt;<\/code>\uff0c\u5176\u4e2d\uff0c\u5c5e\u6027\u5217\u8868\u53d6\u503c\u8303\u56f4\u5982\u4e0b\uff1a<br>\n\u261b <strong>TYPE<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\u3002\u5176\u503c\u6709\u5982\u4e0b\u56db\u79cd\uff1a<code>AUDIO<\/code>\uff0c<code>VIDEO<\/code>\uff0c<code>SUBTITLES<\/code>\uff0c<code>CLOSED-CAPTIONS<\/code>\u3002\u901a\u5e38\u4f7f\u7528\u7684\u90fd\u662f<code>CLOSED-CAPTIONS<\/code>\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>URI<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5a92\u4f53\u8d44\u6e90\u64ad\u653e\u5217\u8868\u8def\u5f84\u3002\u5982\u679c <strong>TYPE<\/strong> \u5c5e\u6027\u503c\u4e3a <code>CLOSED-CAPTIONS<\/code>\uff0c\u90a3\u4e48\u5219\u4e0d\u80fd\u63d0\u4f9b <strong>URI<\/strong>\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>GROUP-ID<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u8868\u793a\u591a\u8bed\u8a00\u7ffb\u8bd1\u6d41\u6240\u5c5e\u7ec4\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>LANGUAGE<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u6307\u5b9a\u6d41\u4e3b\u8981\u4f7f\u7528\u7684\u8bed\u8a00\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>ASSOC-LANGUAGE<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u5176\u5185\u5305\u542b\u4e00\u4e2a\u8bed\u8a00\u6807\u7b7e\uff0c\u7528\u4e8e\u63d0\u4f9b\u591a\u8bed\u8a00\u6d41\u7684\u5176\u4e2d\u4e00\u79cd\u8bed\u8a00\u7248\u672c\u3002\u8be5\u53c2\u6570\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>NAME<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u4e3a\u7ffb\u8bd1\u6d41\u63d0\u4f9b\u53ef\u8bfb\u7684\u63cf\u8ff0\u4fe1\u606f\u3002\u5982\u679c\u8bbe\u7f6e\u4e86 <strong>LANGUAGE<\/strong> \u5c5e\u6027\uff0c\u90a3\u4e48\u4e5f\u5e94\u5f53\u8bbe\u7f6e <strong>NAME<\/strong> \u5c5e\u6027\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>DEFAULT<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\u3002\u53ef\u9009\u503c\u4e3a<code>YES<\/code>\u548c<code>NO<\/code>\u3002\u5982\u679c\u8be5\u5c5e\u6027\u8bbe\u4e3a<code>YES<\/code>\uff0c\u90a3\u4e48\u5ba2\u6237\u7aef\u5728\u7f3a\u4e4f\u5176\u4ed6\u53ef\u9009\u4fe1\u606f\u65f6\u5e94\u5f53\u64ad\u653e\u8be5\u7ffb\u8bd1\u6d41\u3002\u8be5\u5c5e\u6027\u672a\u6307\u5b9a\u65f6\u9ed8\u8ba4\u503c\u4e3a<code>NO<\/code>\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>AUTOSELECT<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\u3002\u5176\u6709\u6548\u503c\u4e3a<code>YES<\/code>\u6216<code>NO<\/code>\u3002\u672a\u6307\u5b9a\u65f6\uff0c\u9ed8\u8ba4\u8bbe\u4e3a<code>NO<\/code>\u3002\u5982\u679c\u8be5\u5c5e\u6027\u8bbe\u7f6e<code>YES<\/code>\uff0c\u90a3\u4e48\u5ba2\u6237\u7aef\u5728\u7528\u6237\u6ca1\u6709\u663e\u793a\u8fdb\u884c\u8bbe\u7f6e\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9\u64ad\u653e\u8be5\u7ffb\u8bd1\u6d41\uff0c\u56e0\u4e3a\u5176\u80fd\u914d\u7f6e\u5f53\u524d\u64ad\u653e\u73af\u5883\uff0c\u6bd4\u5982\u7cfb\u7edf\u8bed\u8a00\u9009\u62e9\u3002<br>\n\u5982\u679c\u8bbe\u7f6e\u4e86\u8be5\u5c5e\u6027\uff0c\u90a3\u4e48\u5f53 <strong>DEFAULT<\/strong> \u8bbe\u7f6e<code>YES<\/code>\u65f6\uff0c\u8be5\u5c5e\u6027\u4e5f\u5fc5\u987b\u8bbe\u7f6e\u4e3a<code>YES<\/code>\u3002<br>\n\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>FORCED<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\u3002\u5176\u6709\u6548\u503c\u4e3a<code>YES<\/code>\u6216<code>NO<\/code>\u3002\u672a\u6307\u5b9a\u65f6\uff0c\u9ed8\u8ba4\u8bbe\u4e3a<code>NO<\/code>\u3002\u53ea\u6709\u5728\u8bbe\u7f6e\u4e86 <strong>TYPE<\/strong> \u4e3a <strong>SUBTITLES<\/strong> \u65f6\uff0c\u624d\u53ef\u4ee5\u8bbe\u7f6e\u8be5\u5c5e\u6027\u3002<br>\n\u5f53\u8be5\u5c5e\u6027\u8bbe\u4e3a<code>YES<\/code>\u65f6\uff0c\u5219\u6697\u793a\u8be5\u7ffb\u8bd1\u6d41\u5305\u542b\u91cd\u8981\u5185\u5bb9\u3002\u5f53\u8bbe\u7f6e\u4e86\u8be5\u5c5e\u6027\uff0c\u5ba2\u6237\u7aef\u5e94\u5f53\u9009\u62e9\u64ad\u653e\u5339\u914d\u5f53\u524d\u64ad\u653e\u73af\u5883\u6700\u4f73\u7684\u7ffb\u8bd1\u6d41\u3002<br>\n\u5f53\u8be5\u5c5e\u6027\u8bbe\u4e3a<code>NO<\/code>\u65f6\uff0c\u5219\u8868\u793a\u8be5\u7ffb\u8bd1\u6d41\u5185\u5bb9\u610f\u56fe\u7528\u4e8e\u56de\u590d\u7528\u6237\u663e\u793a\u8fdb\u884c\u8bf7\u6c42\u3002<br>\n\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>INSTREAM-ID<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u6307\u793a\u5207\u7247\u7684\u8bed\u8a00\uff08Rendition\uff09\u7248\u672c\u3002\u5f53 <strong>TYPE<\/strong> \u8bbe\u4e3a <strong>CLOSED-CAPTIONS<\/strong> \u65f6\uff0c\u5fc5\u987b\u8bbe\u7f6e\u8be5\u5c5e\u6027\u3002\u5176\u53ef\u9009\u503c\u4e3a\uff1a&#8221;CC1&#8243;, &#8220;CC2&#8221;, &#8220;CC3&#8221;, &#8220;CC4&#8221; \u548c &#8220;SERVICEn&#8221;\uff08n \u7684\u503c\u4e3a 1~63\uff09\u3002<br>\n\u5bf9\u4e8e\u5176\u4ed6 <strong>TYPE<\/strong> \u503c\uff0c\u8be5\u5c5e\u6027\u7edd\u4e0d\u80fd\u8fdb\u884c\u8bbe\u7f6e\u3002<br>\n\u261b <strong>CHARACTERISTICS<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u7531\u4e00\u4e2a\u6216\u591a\u4e2a\u7531\u9017\u53f7\u5206\u9694\u7684 UTI \u6784\u6210\u7684\u5b57\u7b26\u4e32\u3002\u6bcf\u4e2a UTI \u8868\u793a\u4e00\u79cd\u7ffb\u8bd1\u6d41\u7684\u7279\u5f81\u3002\u8be5\u5c5e\u6027\u53ef\u5305\u542b\u79c1\u6709 UTI\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>CHANNELS<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u6709\u5e8f\uff0c\u7531\u53cd\u659c\u6760\uff08&#8221;\/&#8221;\uff09\u5206\u9694\u7684\u53c2\u6570\u5217\u8868\u7ec4\u6210\u7684\u5b57\u7b26\u4e32\u3002<br>\n\u6240\u6709\u97f3\u9891 <strong>EXT-X-MEDIA<\/strong> \u6807\u7b7e\u5e94\u5f53\u90fd\u8bbe\u7f6e <strong>CHANNELS<\/strong> \u5c5e\u6027\u3002\u5982\u679c\u4e3b\u64ad\u653e\u5217\u8868\u5305\u542b\u4e24\u4e2a\u76f8\u540c\u7f16\u7801\u4f46\u662f\u5177\u6709\u4e0d\u540c\u6570\u76ee channed \u7684\u7ffb\u8bd1\u6d41\uff0c\u5219\u5fc5\u987b\u8bbe\u7f6e <strong>CHANNELS<\/strong> \u5c5e\u6027\uff1b\u5426\u5219\uff0c<strong>CHANNELS<\/strong> \u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-29\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-STREAM-INF<\/a><\/strong>\uff1a\u8be5\u5c5e\u6027\u6307\u5b9a\u4e86\u4e00\u4e2a\u5907\u4efd\u6e90\u3002\u8be5\u5c5e\u6027\u503c\u63d0\u4f9b\u4e86\u8be5\u5907\u4efd\u6e90\u7684\u76f8\u5173\u4fe1\u606f\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">#EXT-X-STREAM-INF:&lt;attribute-list>\n   &lt;URI>\n<\/pre>\n\n\n\n<p>\u5176\u4e2d\uff1a<br>\n\u261b <strong>URI<\/strong> \u6307\u5b9a\u7684\u5a92\u4f53\u64ad\u653e\u5217\u8868\u643a\u5e26\u4e86\u8be5\u6807\u7b7e\u6307\u5b9a\u7684\u7ffb\u8bd1\u5907\u4efd\u6e90\u3002<strong>URI<\/strong> \u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n<strong>EXT-X-STREAM-INF<\/strong> \u6807\u7b7e\u7684\u53c2\u6570\u5c5e\u6027\u5217\u8868\u6709\u5982\u4e0b\u9009\u9879\uff1a<br>\n\u261b <strong>BANDWIDTH<\/strong>\uff1a\u8be5\u5c5e\u6027\u4e3a\u6bcf\u79d2\u4f20\u8f93\u7684\u6bd4\u7279\u6570\uff0c\u4e5f\u5373\u5e26\u5bbd\u3002\u4ee3\u8868\u8be5\u5907\u4efd\u6d41\u7684\u5dc5\u5cf0\u901f\u7387\u3002\u8be5\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>AVERAGE-BANDWIDTH<\/strong>\uff1a\u8be5\u5c5e\u6027\u4e3a\u5907\u4efd\u6d41\u7684\u5e73\u5747\u5207\u7247\u4f20\u8f93\u901f\u7387\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>CODECS<\/strong>\uff1a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5305\u542b\u7531\u9017\u53f7\u5206\u9694\u7684\u683c\u5f0f\u5217\u8868\u7ec4\u6210\u7684\u5b57\u7b26\u4e32\u3002\u6bcf\u4e2a <strong>EXT-X-STREAM-INF<\/strong> \u6807\u7b7e\u90fd\u5e94\u5f53\u643a\u5e26 <strong>CODECS<\/strong> \u5c5e\u6027\u3002<br>\n\u261b <strong>RESOLUTION<\/strong>\uff1a\u8be5\u5c5e\u6027\u63cf\u8ff0\u5907\u4efd\u6d41\u89c6\u5c4f\u6e90\u7684\u6700\u4f73\u50cf\u7d20\u65b9\u6848\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\uff0c\u4f46\u5bf9\u4e8e\u5305\u542b\u89c6\u5c4f\u6e90\u7684\u5907\u4efd\u6d41\u5efa\u8bae\u589e\u52a0\u8be5\u5c5e\u6027\u8bbe\u7f6e\u3002<br>\n\u261b <strong>FRAME-RATE<\/strong>\uff1a\u8be5\u5c5e\u6027\u7528\u4e00\u4e2a\u5341\u8fdb\u5236\u6d6e\u70b9\u578b\u6570\u503c\u4f5c\u4e3a\u63cf\u8ff0\u5907\u4efd\u6d41\u6240\u6709\u89c6\u5c4f\u6700\u5927\u5e27\u7387\u3002\u5bf9\u4e8e\u5907\u4efd\u6d41\u4e2d\u4efb\u610f\u89c6\u5c4f\u6e90\u5e27\u6570\u8d85\u8fc7\u6bcf\u79d2 30 \u5e27\u7684\uff0c\u5e94\u5f53\u589e\u52a0\u8be5\u5c5e\u6027\u8bbe\u7f6e\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\uff0c\u4f46\u5bf9\u4e8e\u5305\u542b\u89c6\u5c4f\u6e90\u7684\u5907\u4efd\u6d41\u5efa\u8bae\u589e\u52a0\u8be5\u5c5e\u6027\u8bbe\u7f6e\u3002<br>\n\u261b <strong>HDCP-LEVEL<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\u3002\u5176\u6709\u6548\u503c\u4e3a<code>TYPE-0<\/code>\u6216<code>NONE<\/code>\u3002\u5176\u4e3a\u5efa\u8bae\u6027\u5c5e\u6027\u3002\u503c\u4e3a<code>TYPE-0<\/code>\u8868\u793a\u8be5\u5907\u4efd\u6d41\u53ef\u80fd\u4f1a\u64ad\u653e\u5931\u8d25\uff0c\u9664\u975e\u8f93\u51fa\u88ab\u9ad8\u5e26\u5bbd\u6570\u5b57\u5185\u5bb9\u4fdd\u62a4\uff08HDCP\uff09\u3002\u503c\u4e3a<code>NONE<\/code>\u8868\u793a\u6d41\u5185\u5bb9\u65e0\u9700\u8f93\u51fa\u62f7\u8d1d\u4fdd\u62a4\u3002<br>\n\u4f7f\u7528\u4e0d\u540c\u7a0b\u5ea6\u7684 HDCP \u52a0\u5bc6\u5907\u4efd\u6d41\u5e94\u5f53\u4f7f\u7528\u4e0d\u540c\u7684\u5a92\u4f53\u52a0\u5bc6\u5bc6\u94a5\u3002<br>\n\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002\u5728\u7f3a\u4e4f HDCP \u53ef\u80fd\u5b58\u5728\u64ad\u653e\u5931\u8d25\u7684\u60c5\u51b5\u4e0b\uff0c\u5e94\u5f53\u63d0\u4f9b\u8be5\u5c5e\u6027\u3002<br>\n\u261b <strong>AUDIO<\/strong>\uff1a\u5c5e\u6027\u503c\u7531\u53cc\u5f15\u53f7\u5305\u88f9\uff0c\u5176\u503c\u5fc5\u987b\u4e0e\u5b9a\u4e49\u5728\u4e3b\u64ad\u653e\u5217\u8868\u67d0\u5904\u7684\u8bbe\u7f6e\u4e86 <strong>TYPE<\/strong> \u5c5e\u6027\u503c\u4e3a <strong>AUDIO<\/strong> \u7684 <strong>EXT-X-MEDIA<\/strong> \u6807\u7b7e\u7684 <strong>GROUP-ID<\/strong> \u5c5e\u6027\u503c\u76f8\u5339\u914d\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>VIDEO<\/strong>\uff1a\u5c5e\u6027\u503c\u7531\u53cc\u5f15\u53f7\u5305\u88f9\uff0c\u5176\u503c\u5fc5\u987b\u4e0e\u5b9a\u4e49\u5728\u4e3b\u64ad\u653e\u5217\u8868\u67d0\u5904\u7684\u8bbe\u7f6e\u4e86 <strong>TYPE<\/strong> \u5c5e\u6027\u503c\u4e3a <strong>VIDEO<\/strong> \u7684 <strong>EXT-X-MEDIA<\/strong> \u6807\u7b7e\u7684 <strong>GROUP-ID<\/strong> \u5c5e\u6027\u503c\u76f8\u5339\u914d\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>SUBTITLES<\/strong>\uff1a\u5c5e\u6027\u503c\u7531\u53cc\u5f15\u53f7\u5305\u88f9\uff0c\u5176\u503c\u5fc5\u987b\u4e0e\u5b9a\u4e49\u5728\u4e3b\u64ad\u653e\u5217\u8868\u67d0\u5904\u7684\u8bbe\u7f6e\u4e86 <strong>TYPE<\/strong> \u5c5e\u6027\u503c\u4e3a <strong>SUBTITLES<\/strong> \u7684 <strong>EXT-X-MEDIA<\/strong> \u6807\u7b7e\u7684 <strong>GROUP-ID<\/strong> \u5c5e\u6027\u503c\u76f8\u5339\u914d\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>CLOSED-CAPTIONS<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u53ef\u4ee5\u662f\u4e00\u4e2a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\u6216<code>NONE<\/code>\u3002\u5982\u679c\u5176\u503c\u4e3a\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u5219\u5fc5\u987b\u4e0e\u5b9a\u4e49\u5728\u4e3b\u64ad\u653e\u5217\u8868\u67d0\u5904\u7684\u8bbe\u7f6e\u4e86 <strong>TYPE<\/strong> \u5c5e\u6027\u503c\u4e3a <strong>CLOSED-CAPTIONS<\/strong> \u7684 <strong>EXT-X-MEDIA<\/strong> \u6807\u7b7e\u7684 <strong>GROUP-ID<\/strong> \u5c5e\u6027\u503c\u76f8\u5339\u914d\u3002\u5982\u679c\u5176\u503c\u4e3a<code>NONE<\/code>\uff0c\u5219\u6240\u6709\u7684 <strong>ext-x-stream-inf<\/strong> \u6807\u7b7e\u5fc5\u987b\u540c\u6837\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e<code>NONE<\/code>\uff0c\u8868\u793a\u4e3b\u64ad\u653e\u5217\u8868\u5907\u4efd\u6d41\u5747\u6ca1\u6709\u5173\u95ed\u7684\u6807\u9898\u3002\u5bf9\u4e8e\u67d0\u4e2a\u5907\u4efd\u6d41\u5177\u5907\u5173\u95ed\u6807\u9898\uff0c\u53e6\u4e00\u4e2a\u5907\u4efd\u6d41\u4e0d\u5177\u5907\u5173\u95ed\u6807\u9898\u53ef\u80fd\u4f1a\u89e6\u53d1\u64ad\u653e\u4e0d\u8fde\u7eed\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-33\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-I-FRAME-STREAM-INF<\/a><\/strong>\uff1a\u8be5\u5c5e\u6027\u8868\u660e\u5a92\u4f53\u64ad\u653e\u5217\u8868\u6587\u4ef6\u5305\u542b\u591a\u79cd\u5a92\u4f53\u8d44\u6e90\u7684 I-frame \u5e27\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-I-FRAME-STREAM-INF:&lt;attribute-list&gt;<\/code>\uff0c\u8be5\u6807\u7b7e\u7684\u5c5e\u6027\u5217\u8868\u5305\u542b\u4e86 <strong>EXT-X-I-FRAME-STREAM-INF<\/strong> \u6807\u7b7e\u540c\u6837\u7684\u5c5e\u6027\u5217\u8868\u9009\u9879\uff0c\u9664\u4e86 <strong>FRAME-RATE<\/strong>\uff0c<strong>AUDIO<\/strong>\uff0c<strong>SUBTITLES<\/strong> \u548c <strong>CLOSED-CAPTIONS<\/strong>\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u5176\u4ed6\u7684\u5c5e\u6027\u8fd8\u6709\uff1a<br>\n\u261b <strong>URI<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u6307\u793a\u4e86 I-frame \u5a92\u4f53\u64ad\u653e\u5217\u8868\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u8be5\u5a92\u4f53\u64ad\u653e\u5217\u8868\u6587\u4ef6\u5fc5\u987b\u5305\u542b <strong>EXT-X-I-FRAMES-ONLY<\/strong> \u6807\u7b7e\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-34\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-SESSION-DATA<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u5141\u8bb8\u4e3b\u64ad\u653e\u5217\u8868\u643a\u5e26\u4efb\u610f session \u6570\u636e\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-SESSION-DATA:&lt;attribute-list&gt;<\/code>\uff0c\u5176\u4e2d\uff0c\u5176\u53c2\u6570\u5c5e\u6027\u5217\u8868\u503c\u5982\u4e0b\u53ef\u9009\u9879:<br>\n\u261b <strong>DATA-ID<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u4ee3\u8868\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\u636e\u503c\u3002\u8be5\u5c5e\u6027\u5e94\u5f53\u4f7f\u7528\u53cd\u5411 DNS \u8fdb\u884c\u547d\u540d\uff0c\u5982 &#8220;com.example.movie.title&#8221;\u3002\u7136\u800c\uff0c\u7531\u4e8e\u6ca1\u6709\u4e2d\u592e\u6ce8\u518c\u673a\u6784\uff0c\u6240\u4ee5\u53ef\u80fd\u51fa\u73b0\u51b2\u7a81\u60c5\u51b5\u3002\u7ed9\u5c5e\u6027\u4e3a\u5fc5\u9009\u53c2\u6570\u3002<br>\n\u261b <strong>VALUE<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u53cc\u5f15\u53f7\u5305\u88f9\u7684\u5b57\u7b26\u4e32\uff0c\u5176\u5305\u542b <strong>DATA-ID<\/strong> \u6307\u5b9a\u7684\u503c\u3002\u5982\u679c\u8bbe\u7f6e\u4e86 <strong>LANGUAGE<\/strong>\uff0c\u5219 <strong>VALUE<\/strong> \u5e94\u5f53\u5305\u542b\u4e00\u4e2a\u7528\u8be5\u8bed\u8a00\u4e66\u5199\u7684\u53ef\u8bfb\u5b57\u7b26\u4e32\u3002<br>\n\u261b <strong>URI<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684 URI \u5b57\u7b26\u4e32\u3002\u7531\u8be5 URI \u6307\u793a\u7684\u8d44\u6e90\u5fc5\u9009\u4f7f\u7528 JSON \u683c\u5f0f\uff0c\u5426\u5219\uff0c\u5ba2\u6237\u7aef\u53ef\u80fd\u4f1a\u89e3\u6790\u5931\u8d25\u3002<br>\n\u261b <strong>LANGUAGE<\/strong>\uff1a\u7531\u53cc\u5f15\u53f7\u5305\u88f9\u7684\uff0c\u5305\u542b\u4e00\u4e2a\u8bed\u8a00\u6807\u7b7e\u7684\u5b57\u7b26\u4e32\u3002\u6307\u793a\u4e86 <strong>VALUE<\/strong> \u6240\u4f7f\u7528\u7684\u8bed\u8a00\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-35\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-SESSION-KEY<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u5141\u8bb8\u7528\u4e8e\u5a92\u4f53\u64ad\u653e\u5217\u8868\u7684\u52a0\u5bc6\u5bc6\u94a5\u7531\u4e3b\u64ad\u653e\u5217\u8868\u6307\u5b9a\u3002\u8fd9\u4f7f\u5f97\u5ba2\u6237\u7aef\u53ef\u4ee5\u9884\u5148\u52a0\u8f7d\u8fd9\u4e9b\u5bc6\u94a5\uff0c\u800c\u65e0\u9700\u4ece\u5a92\u4f53\u64ad\u653e\u5217\u8868\u4e2d\u83b7\u53d6\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-SESSION-KEY:&lt;attribute-list&gt;<\/code>,\u5176\u5c5e\u6027\u5217\u8868\u4e0e <strong>EXT-X-KEY<\/strong> \u76f8\u540c\uff0c\u9664\u4e86 <strong>METHOD<\/strong> \u5c5e\u6027\u7684\u503c\u5fc5\u987b\u4e0d\u4e3a<code>NONE<\/code>\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\n<strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-35\" target=\"_blank\" rel=\"noreferrer noopener\">\u64ad\u653e\u5217\u8868\u7c7b\u578b\u6807\u7b7e<\/a><\/strong>\uff1a\u4ee5\u4e0b\u6807\u7b7e\u53ef\u540c\u65f6\u8bbe\u7f6e\u4e0e\u4e3b\u64ad\u653e\u5217\u8868\uff08Master Playlist\uff09\u548c\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Media Playlist\uff09\u4e2d\u3002\u4f46\u662f\u5bf9\u4e8e\u5728\u4e3b\u64ad\u653e\u5217\u8868\u4e2d\u8bbe\u7f6e\u4e86\u7684\u6807\u7b7e\uff0c\u4e0d\u5e94\u5f53\u518d\u6b21\u8bbe\u7f6e\u5728\u4e3b\u64ad\u653e\u5217\u8868\u6307\u5411\u7684\u5a92\u4f53\u64ad\u653e\u5217\u8868\u4e2d\u3002\u540c\u65f6\u51fa\u73b0\u5728\u4e24\u8005\u64ad\u653e\u5217\u8868\u7684\u76f8\u540c\u6807\u7b7e\u5fc5\u987b\u5177\u5907\u76f8\u540c\u7684\u503c\u3002\u8fd9\u4e9b\u6807\u7b7e\u5728\u64ad\u653e\u5217\u8868\u4e2d\u4e0d\u80fd\u51fa\u73b0\u591a\u6b21\uff08\u53ea\u80fd\u4f7f\u7528\u4e00\u6b21\uff09\u3002\u5177\u4f53\u6807\u7b7e\u5982\u4e0b\u6240\u793a\uff1a<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-35\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-INDEPENDENT-SEGMENTS<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u8868\u660e\u6240\u6709\u5a92\u4f53\u7247\u6bb5\u4e2d\u7684\u6240\u6709\u5a92\u4f53\u6837\u672c\u65e0\u9700\u5176\u4ed6\u5207\u7247\u4fe1\u606f\u5373\u53ef\u72ec\u7acb\u8fdb\u884c\u89e3\u7801\u3002\u8be5\u5c5e\u6027\u5bf9\u5217\u8868\u5185\u6240\u6709\u5a92\u4f53\u7247\u6bb5\u751f\u6548\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-INDEPENDENT-SEGMENTS<\/code>\u3002<br>\n\u5982\u679c\u8be5\u6807\u7b7e\u51fa\u73b0\u5728\u4e3b\u64ad\u653e\u5217\u8868\u4e2d\uff0c\u5219\u5176\u5bf9\u6240\u6709\u5a92\u4f53\u64ad\u653e\u5217\u8868\u7684\u6240\u6709\u5a92\u4f53\u7247\u6bb5\u90fd\u751f\u6548\u3002<br>\n\u25b7 <strong><a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#page-36\" target=\"_blank\" rel=\"noreferrer noopener\">EXT-X-START<\/a><\/strong>\uff1a\u8be5\u6807\u7b7e\u8868\u793a\u64ad\u653e\u5217\u8868\u64ad\u653e\u8d77\u59cb\u4f4d\u7f6e\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5ba2\u6237\u7aef\u5f00\u542f\u4e00\u4e2a\u64ad\u653e\u4f1a\u8bdd\u65f6\uff0c\u5e94\u5f53\u4f7f\u7528\u8be5\u6807\u7b7e\u6307\u5b9a\u7684\u4f4d\u7f6e\u8fdb\u884c\u64ad\u653e\u3002\u8be5\u6807\u7b7e\u4e3a\u53ef\u9009\u6807\u7b7e\u3002<br>\n\u5176\u683c\u5f0f\u4e3a\uff1a<code>#EXT-X-START:&lt;attribute-list&gt;<\/code>\uff0c\u5176\u53c2\u6570\u5c5e\u6027\u5217\u8868\u7684\u53d6\u503c\u8303\u56f4\u5982\u4e0b\uff1a<br>\n\u261b <strong>TIME-OFFSET<\/strong>\uff1a\u8be5\u5c5e\u6027\u503c\u4e3a\u4e00\u4e2a\u5e26\u7b26\u53f7\u5341\u8fdb\u5236\u6d6e\u70b9\u6570\uff08\u5355\u4f4d\uff1a\u79d2\uff09\u3002\u4e00\u4e2a\u6b63\u6570\u8868\u793a\u4ee5\u64ad\u653e\u5217\u8868\u8d77\u59cb\u4f4d\u7f6e\u5f00\u59cb\u7684\u65f6\u95f4\u504f\u79fb\u91cf\u3002\u4e00\u4e2a\u8d1f\u6570\u8868\u793a\u64ad\u653e\u5217\u8868\u4e0a\u4e00\u4e2a\u5a92\u4f53\u7247\u6bb5\u6700\u540e\u4f4d\u7f6e\u5f80\u524d\u7684\u65f6\u95f4\u504f\u79fb\u91cf\u3002<br>\n\u8be5\u5c5e\u6027\u7684\u7edd\u5bf9\u503c\u5e94\u5f53\u4e0d\u8d85\u8fc7\u64ad\u653e\u5217\u8868\u7684\u65f6\u957f\u3002\u5982\u679c\u8d85\u8fc7\uff0c\u5219\u8868\u793a\u5230\u8fbe\u6587\u4ef6\u7ed3\u5c3e\uff08\u6570\u503c\u4e3a\u6b63\u6570\uff09\uff0c\u6216\u8005\u8fbe\u5230\u6587\u4ef6\u8d77\u59cb\uff08\u6570\u503c\u4e3a\u8d1f\u6570\uff09\u3002<br>\n\u5982\u679c\u64ad\u653e\u5217\u8868\u4e0d\u5305\u542b <strong>EXT-X-ENDLIST<\/strong> \u6807\u7b7e\uff0c\u90a3\u4e48 <strong>TIME-OFFSET<\/strong> \u5c5e\u6027\u503c\u4e0d\u5e94\u5f53\u5728\u64ad\u653e\u6587\u4ef6\u672b\u5c3e\u4e09\u4e2a\u5207\u7247\u65f6\u957f\u4e4b\u5185\u3002<br>\n\u261b <strong>PRECISE<\/strong>\uff1a\u8be5\u503c\u4e3a\u4e00\u4e2a\u53ef\u679a\u4e3e\u5b57\u7b26\u4e32\u3002\u6709\u6548\u7684\u53d6\u503c\u4e3a<code>YES<\/code> \u6216 <code>NO<\/code>\u3002\u5982\u679c\u503c\u4e3a<code>YES<\/code>\uff0c\u5ba2\u6237\u7aef\u5e94\u5f53\u64ad\u653e\u5305\u542b <strong>TIME-OFFSET<\/strong> \u7684\u5a92\u4f53\u7247\u6bb5\uff0c\u4f46\u4e0d\u8981\u6e32\u67d3\u8be5\u5757\u5185\u4f18\u5148\u4e8e <strong>TIME-OFFSET<\/strong> \u7684\u6837\u672c\u5757\u3002\u5982\u679c\u503c\u4e3a<code>NO<\/code>\uff0c\u5ba2\u6237\u7aef\u5e94\u5f53\u5c1d\u8bd5\u6e32\u67d3\u5728\u5a92\u4f53\u7247\u6bb5\u5185\u7684\u6240\u6709\u6837\u672c\u5757\u3002\u8be5\u5c5e\u6027\u4e3a\u53ef\u9009\u53c2\u6570\uff0c\u672a\u6307\u5b9a\u5219\u8ba4\u4e3a<code>NO<\/code>\u3002<\/li><\/ul>\n\n\n\n<p>\u5230\u6b64\uff0cm3u8 \u76f8\u5173\u7684\u6807\u7b7e\u6211\u4eec\u5df2\u7ecf\u5b8c\u5168\u4ecb\u7ecd\u5b8c\u6bd5\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u6211\u4eec\u518d\u7b80\u7b54\u4ecb\u7ecd\u4e0b\u8d44\u6e90\u6587\u4ef6\u7684\u83b7\u53d6\u5177\u4f53\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u4e0a\u6587\u63d0\u5230\uff0cm3u8 \u6587\u4ef6\u8981\u4e48\u662f\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff0c\u8981\u4e48\u662f\u4e3b\u64ad\u653e\u5217\u8868\u3002\u4f46\u65e0\u8bba\u662f\u54ea\u79cd\u5217\u8868\uff0c\u5176\u6709\u6548\u7ec4\u6210\u5747\u7531\u4e24\u90e8\u5206\u6784\u6210\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u4ee5 <strong>#EXT<\/strong> \u5f00\u5934\u7684\u4e3a\u6807\u7b7e\u4fe1\u606f\uff0c\u4f5c\u4e3a\u5bf9\u5a92\u4f53\u8d44\u6e90\u7684\u8fdb\u4e00\u6b65\u63cf\u8ff0\uff1b<\/li><li>\u5269\u4f59\u7684\u4e3a\u8d44\u6e90\u4fe1\u606f\uff0c\u8981\u4e48\u662f\u7247\u6bb5\u8d44\u6e90\uff08Media Playlist\uff09\u8def\u5f84\uff0c\u8981\u4e48\u662f m3u8 \u8d44\u6e90\uff08Master Playlist\uff09\u8def\u5f84\uff1b<\/li><\/ul>\n\n\n\n<p>\u6211\u4eec\u5148\u7b80\u5355\u4ecb\u7ecd\u4e0b m3u8 \u6587\u4ef6\u5a92\u4f53\u7247\u6bb5\u7684\u8868\u793a\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>m3u8 \u6587\u4ef6\u4e2d\uff0c\u5a92\u4f53\u7247\u6bb5\u53ef\u4ee5\u91c7\u7528\u5168\u8def\u5f84\u8868\u793a\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">#EXTINF:10.0,\nhttp:\/\/example.com\/movie1\/fileSequenceA.ts\n<\/pre>\n\n\n\n<p>\u8fd9\u6837\uff0c\u83b7\u53d6\u8d44\u6e90\u7247\u6bb5\u7684\u8def\u5f84\u5c31\u662f m3u8 \u6587\u4ef6\u5185\u6307\u5b9a\u7684\u8def\u5f84\uff0c\u5373\uff1a<a rel=\"nofollow\" href=\"http:\/\/example.com\/movie1\/fileSequenceA.ts\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/example.com\/movie1\/fileSequenceA.ts<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>m3u8 \u6587\u4ef6\u4e2d\uff0c\u5a92\u4f53\u7247\u6bb5\u8fd8\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u8868\u793a\u3002\u5982\u4e0b\u6240\u793a\uff1a<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-syntaxhighlighter-code\">#EXTINF:10.0,\nfileSequenceA.ts\n<\/pre>\n\n\n\n<p>\u8fd9\u8868\u793a\u7247\u6bb5\u6587\u4ef6\u7684\u8def\u5f84\u662f\u76f8\u5bf9\u4e8e m3u8 \u6587\u4ef6\u8def\u5f84\u7684\uff0c\u5373\u5047\u8bbe\u5f53\u524d m3u8 \u7684\u8def\u5f84\u4e3a\uff1a<a rel=\"nofollow\" href=\"https:\/\/127.0.0.1\/hls\/m3u8\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/127.0.0.1\/hls\/m3u8<\/a>\uff0c\u90a3\u4e48\uff0c\u7247\u6bb5\u6587\u4ef6 fileSequenceA.ts \u7684\u8def\u5f84\u5373\u4e3a\uff1a<a rel=\"nofollow\" href=\"https:\/\/127.0.0.1\/hls\/fileSequenceA.ts\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/127.0.0.1\/hls\/fileSequenceA.ts<\/a><\/p>\n\n\n\n<p>\u5c3d\u7ba1\u53ef\u4ee5\u5728 m3u8 \u6587\u4ef6\u4e2d\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u6307\u5b9a\u5a92\u4f53\u7247\u6bb5\u8d44\u6e90\u8def\u5f84\uff0c\u4f46\u662f\u66f4\u597d\u7684\u9009\u62e9\u662f\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\u3002\u76f8\u5bf9\u8def\u5f84\u76f8\u8f83\u4e8e\u7edd\u5bf9\u8def\u5f84\u66f4\u8f7b\u4fbf\uff0c\u540c\u65f6\u662f\u76f8\u5bf9\u4e8e m3u8 \u6587\u4ef6\u7684 URL\u3002\u76f8\u6bd4\u4e4b\u4e0b\uff0c\u7edd\u5bf9\u8def\u5f84\u589e\u52a0\u4e86 m3u8 \u6587\u4ef6\u5185\u5bb9\uff08\u66f4\u591a\u5b57\u7b26\uff09\uff0c\u589e\u5927\u4e86\u6587\u4ef6\u5185\u5bb9\uff0c\u540c\u65f6\u4e5f\u589e\u5927\u4e86\u7f51\u7edc\u4f20\u8f93\u91cf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5176\u4f59\u4e00\u4e9b\u6ce8\u610f\u4e8b\u9879<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6709\u4e24\u79cd\u8bf7\u6c42 m3u8 \u64ad\u653e\u5217\u8868\u7684\u65b9\u6cd5\uff1a\u4e00\u662f\u901a\u8fc7 m3u8 \u7684 URI \u8fdb\u884c\u8bf7\u6c42\uff0c\u5219\u8be5\u6587\u4ef6\u5fc5\u987b\u4ee5 .m3u8 \u6216 .m3u \u7ed3\u5c3e\uff1b\u4e8c\u662f\u901a\u8fc7 <a rel=\"nofollow\" href=\"https:\/\/zh.wikipedia.org\/wiki\/HTTP\" target=\"_blank\" rel=\"noreferrer noopener\">HTTP<\/a> \u8fdb\u884c\u8bf7\u6c42\uff0c\u5219\u8bf7\u6c42\u5934 Content-Type \u5fc5\u987b\u8bbe\u7f6e\u4e3a &#8220;application\/vnd.apple.mpegurl&#8221; \u6216\u8005 &#8220;audio\/mpegurl&#8221;\u3002<\/li><li>\u7a7a\u884c\u548c\u6ce8\u91ca\u884c\u5728\u89e3\u6790\u65f6\u90fd\u5ffd\u7565\u3002<\/li><li>\u5a92\u4f53\u64ad\u653e\u5217\u8868\uff08Media Playlist\uff09\u7684\u6d41\u8d44\u6e90\u603b\u65f6\u957f\u5c31\u662f\u5404\u5207\u7247\u8d44\u6e90\u7684\u65f6\u957f\u4e4b\u548c\u3002<\/li><li>\u6bcf\u4e2a\u5207\u7247\u7684\u7801\u7387\uff08bit rate\uff09\u5c31\u662f\u5207\u7247\u7684\u5927\u5c0f\u9664\u4ee5\u5b83\u5bf9\u5e94\u7684\u65f6\u957f\uff08<strong>EXTINF<\/strong> \u6307\u5b9a\u7684\u65f6\u957f\uff09\u3002<\/li><li>\u4e00\u4e2a\u6807\u7b7e\u7684\u5c5e\u6027\u5217\u8868\u7684\u540c\u4e00\u4e2a\u5c5e\u6027<code>AttributeName<\/code>\u53ea\u80fd\u51fa\u73b0\u4e00\u6b21\u3002<\/li><li><strong>EXT-X-TARGETDURATION<\/strong> \u6307\u5b9a\u7684\u65f6\u957f\u7edd\u5bf9\u4e0d\u80fd\u8fdb\u884c\u66f4\u6539\u3002\u901a\u5e38\u8be5\u503c\u6307\u5b9a\u7684\u65f6\u957f\u4e3a 10 \u79d2\u3002<\/li><li>\u5bf9\u4e8e\u6307\u5b9a\u4e86 <strong>EXT-X-I-FRAMES-ONLY<\/strong> \u4e14 \u7b2c\u4e00\u4e2a\u5a92\u4f53\u7247\u6bb5\uff08\u6216\u8005\u7b2c\u4e00\u4e2a\u5c3e\u968f <strong>EXT-X-DISCONTINUITY<\/strong> \u7684\u7247\u6bb5\uff09\u5176\u8d44\u6e90\u6ca1\u6709\u7acb\u5373\u643a\u5e26\u5a92\u4f53\u521d\u59cb\u5316\u5757\u7684\u5207\u7247\uff0c\u5e94\u5f53\u589e\u52a0\u4f7f\u7528\u6807\u7b7e <strong>EXT-X-MAP<\/strong> \u6307\u5b9a\u5a92\u4f53\u521d\u59cb\u5316\u5757\u83b7\u53d6\u9014\u5f84\u3002<\/li><li>\u4f7f\u7528 <strong>EXT-X-MAP<\/strong> \u6807\u7b7e\u5185\u542b\u6807\u7b7e <strong>EXT-X-I-FRAMES-ONLY<\/strong> \u8981\u6c42\u7684\u517c\u5bb9\u7248\u672c\u53f7 <strong>EXT-X-VERSION<\/strong> \u8981\u5927\u4e8e\u7b49\u4e8e 5\uff1b\u53ea\u4f7f\u7528 <strong>EXT-X-MAP<\/strong> \u8981\u6c42\u7684\u517c\u5bb9\u7248\u672c\u53f7\u8981\u5927\u4e8e\u7b49\u4e8e 6\u3002<\/li><li>\u7531\u6807\u7b7e <strong>EXT-X-MAP<\/strong> \u58f0\u660e\u7684\u5a92\u4f53\u521d\u59cb\u5316\u5757\u53ef\u4f7f\u7528 <a rel=\"nofollow\" href=\"https:\/\/tools.ietf.org\/html\/rfc8216#ref-AES_128\" target=\"_blank\" rel=\"noreferrer noopener\">AES-128<\/a> \u65b9\u6cd5\u8fdb\u884c\u52a0\u5bc6\uff0c\u6b64\u65f6\uff0c\u4f5c\u7528\u4e8e <strong>EXT-X-MAP<\/strong> \u6807\u7b7e\u7684 <strong>EXT-X-KEY<\/strong> \u6807\u7b7e\u5fc5\u987b\u8bbe\u7f6e <strong>IV<\/strong> \u5c5e\u6027\u3002<\/li><li>\u5e26\u6709\u5c5e\u6027 <strong>END-ON-NEXT=YES<\/strong> \u7684\u6807\u7b7e <strong>EXT-X-DATERANGE<\/strong> \u5fc5\u987b\u643a\u5e26 <strong>CLASS<\/strong> \u5c5e\u6027\uff0c\u4f46\u4e0d\u80fd\u643a\u5e26 <strong>DURATION<\/strong> \u548c <strong>END-DATE<\/strong> \u5c5e\u6027\u3002\u5176\u4f59\u5e26\u6709\u76f8\u540c <strong>CLASS<\/strong> \u7684\u6807\u7b7e <strong>EXT-X-DATERANGE<\/strong> \u4e0d\u80fd\u6307\u5b9a\u91cd\u53e0\u7684\u65e5\u671f\u8303\u56f4\u3002<\/li><li>\u65e5\u671f\u8303\u56f4\u5982\u679c\u672a\u6307\u660e <strong>DURATION<\/strong>\uff0c<strong>END_DATE<\/strong>,<strong>END-ON-NEXT=YES<\/strong> \u5c5e\u6027\u65f6\uff0c\u5219\u5176\u65f6\u957f\uff08duration\uff09\u672a\u77e5\uff0c\u5373\u4f7f\u5176\u8bbe\u7f6e\u4e86 <strong>PLANNED-DURATION<\/strong> \u5c5e\u6027\u3002<\/li><li>\u5982\u679c\u64ad\u653e\u5217\u8868\u8bbe\u7f6e\u4e86 <strong>EXT-X-DATERANGE<\/strong> \u6807\u7b7e\uff0c\u5219\u5fc5\u987b\u540c\u65f6\u8bbe\u7f6e <strong>EXT-X-PROGRAM-DATE-TIME<\/strong> \u6807\u7b7e\u3002<\/li><li>\u5982\u679c\u64ad\u653e\u5217\u8868\u8bbe\u7f6e\u4e86\u62e5\u6709\u76f8\u540c <strong>ID<\/strong> \u5c5e\u6027\u503c\u7684\u4e24\u4e2a <strong>EXT-X-DATERANGE<\/strong> \u6807\u7b7e\uff0c\u5219\u5bf9\u4e8e\u76f8\u540c\u7684\u5c5e\u6027\u540d\uff0c\u5728\u8fd9\u4e24\u4e2a <strong>EXT-X-DATERANGE<\/strong> \u4e2d\u5bf9\u5e94\u7684\u503c\u5fc5\u987b\u4e00\u81f4\u3002<\/li><li>\u5982\u679c <strong>EXT-X-DATERANGE<\/strong> \u540c\u65f6\u8bbe\u7f6e\u4e86 <strong>DURATION<\/strong> \u548c <strong>END-DATE<\/strong> \u5c5e\u6027\uff0c\u5219 <strong>END-DATE<\/strong> \u5c5e\u6027\u503c\u5fc5\u987b\u7b49\u4e8e <strong>START-DATE<\/strong> \u5c5e\u6027\u503c\u52a0\u4e0a <strong>DURATION<\/strong> \u5c5e\u6027\u503c\u3002<\/li><li><strong>EXT-X-MEDIA-SEQUENCE<\/strong> \u6807\u7b7e\u5fc5\u987b\u51fa\u73b0\u5728\u64ad\u653e\u5217\u8868\u7b2c\u4e00\u4e2a\u5207\u7247\u4e4b\u524d\u3002<\/li><li><strong>EXT-X-DISCONTINUITY-DEQUENCE<\/strong> \u6807\u7b7e\u5fc5\u987b\u51fa\u73b0\u5728\u64ad\u653e\u5217\u8868\u7b2c\u4e00\u4e2a\u5207\u7247\u4e4b\u524d\u3002<\/li><li><strong>EXT-X-DISCONTINUITY-DEQUENCE<\/strong> \u6807\u7b7e\u5fc5\u987b\u51fa\u73b0\u5728\u4efb\u610f <strong>EXT-X-DISCONTINUITY<\/strong> \u6807\u7b7e\u4e4b\u524d\u3002<\/li><li>m3u8 \u6587\u4ef6\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e <strong>EXT-X-PLAYLIST-TYPE<\/strong> \u6807\u7b7e\uff0c\u90a3\u4e48\u64ad\u653e\u5217\u8868\u53ef\u4ee5\u968f\u65f6\u8fdb\u884c\u66f4\u6539\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u66f4\u65b0\u6216\u5220\u9664\u64ad\u653e\u5217\u8868\u4e2d\u7684\u5a92\u4f53\u7247\u6bb5\u3002<\/li><li>\u6bcf\u4e2a <strong>EXT-X-I-FRAME-STREAM-INF<\/strong> \u6807\u7b7e\u5fc5\u987b\u5305\u542b\u4e00\u4e2a <strong>BANDWIDTH<\/strong> \u548c <strong>URI<\/strong> \u5c5e\u6027\u3002<\/li><li>\u6bcf\u4e2a <strong>EXT-X-SESSION-DATA<\/strong> \u6807\u7b7e\u90fd\u5fc5\u987b\u5305\u542b\u4e00\u4e2a <strong>VALUE<\/strong> \u6216 <strong>URI<\/strong> \u5c5e\u6027\uff0c\u4f46\u4e0d\u80fd\u540c\u65f6\u5305\u542b\u4e24\u8005\u3002<\/li><li>\u4e00\u4e2a\u64ad\u653e\u5217\u8868\u53ef\u4ee5\u5305\u542b\u591a\u4e2a\u643a\u5e26\u76f8\u540c <strong>DATA-ID<\/strong> \u5c5e\u6027\u7684 <strong>EXT-X-SESSION-DATA<\/strong> \u6807\u7b7e\u3002\u4f46\u662f\u4e0d\u80fd\u5305\u542b\u591a\u4e2a\u643a\u5e26\u76f8\u540c <strong>DATA-ID<\/strong> \u548c\u76f8\u540c <strong>LANGUAGE<\/strong> \u5c5e\u6027\u7684 <strong>EXT-X-SESSION-DATA<\/strong> \u6807\u7b7e\u3002<\/li><li>\u5982\u679c\u8bbe\u7f6e\u4e86 <strong>EXT-X-SESSION-KEY<\/strong>\uff0c\u90a3\u4e48\u5176 <strong>METHOD<\/strong>\uff0c<strong>KEYFORMAT<\/strong> \u548c <strong>KEYFORMATVERSIONS<\/strong> \u5c5e\u6027\u503c\u5fc5\u987b\u4e0e\u4efb\u610f\u76f8\u540c <strong>URI<\/strong> \u7684 <strong>EXT-X-KEY<\/strong> \u6807\u7b7e\u503c\u76f8\u540c\u3002<\/li><li>\u5982\u679c\u591a\u4efd\u5907\u7528\u6d41\u6216\u8005\u591a\u8bed\u8a00\u6d41\u4f7f\u7528\u76f8\u540c\u7684\u52a0\u5bc6\u5bc6\u94a5\u548c\u683c\u5f0f\uff0c\u5219\u5e94\u5f53\u8bbe\u7f6e <strong>EXT-X-SESSION-KEY<\/strong> \u6807\u7b7e\u3002<\/li><li>\u4e3b\u64ad\u653e\u5217\u8868\u5fc5\u987b\u4e0d\u80fd\u8bbe\u7f6e\u591a\u4e2a\u5177\u6709\u76f8\u540c <strong>METHOD<\/strong>\uff0c<strong>URI<\/strong>\uff0c<strong>IV<\/strong>\uff0c<strong>KEYFORMAT<\/strong> \u548c <strong>KEYFORMATVERSIONS<\/strong> \u5c5e\u6027\u503c\u5f97 <strong>EXT-X-SESSION-KEY<\/strong> \u6807\u7b7e\u3002<\/li><\/ul>\n\n\n\n<p>\u4f5c\u8005\uff1aWhyn<br>\u94fe\u63a5\uff1ahttps:\/\/www.jianshu.com\/p\/e97f6555a070<br>\u6765\u6e90\uff1a\u7b80\u4e66<br>\u7b80\u4e66\u8457\u4f5c\u6743\u5f52\u4f5c\u8005\u6240\u6709\uff0c\u4efb\u4f55\u5f62\u5f0f\u7684\u8f6c\u8f7d\u90fd\u8bf7\u8054\u7cfb\u4f5c\u8005\u83b7\u5f97\u6388\u6743\u5e76\u6ce8\u660e\u51fa\u5904\u3002\n\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb M3U8 \u662f Unicode \u7248\u672c\u7684 M3U\uff0c\u7528 UTF-8 \u7f16\u7801\u3002&#8221;M3U&#8221; \u548c &#8220;M3U8&#8221; \u6587\u4ef6\u90fd\u662f\u82f9\u679c\u516c\u53f8\u4f7f\u7528\u7684 HTTP Live Streaming\uff08HLS\uff09 \u534f\u8bae\u683c\u5f0f\u7684\u57fa\u7840&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-68380","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=68380"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68380\/revisions"}],"predecessor-version":[{"id":68381,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/68380\/revisions\/68381"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=68380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=68380"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=68380"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=68380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}