{"id":167557,"date":"2020-10-15T01:59:29","date_gmt":"2020-10-14T17:59:29","guid":{"rendered":"http:\/\/4563.org\/?p=167557"},"modified":"2020-10-15T01:59:29","modified_gmt":"2020-10-14T17:59:29","slug":"ios-swift-%e6%b1%82%e5%8f%af%e4%bb%a5%e6%92%ad%e6%94%be%e6%9c%ac%e5%9c%b0-m3u8ts-hls%e8%a7%86%e9%a2%91%e7%9a%84%e6%92%ad%e6%94%be%e5%99%a8%e6%88%96%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=167557","title":{"rendered":"ios\/ Swift : \u6c42\u53ef\u4ee5\u64ad\u653e\u672c\u5730 m3u8+ts (hls)\u89c6\u9891\u7684\u64ad\u653e\u5668\u6216\u65b9\u6cd5"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  ios\/ Swift : \u6c42\u53ef\u4ee5\u64ad\u653e\u672c\u5730 m3u8+ts (hls)\u89c6\u9891\u7684\u64ad\u653e\u5668\u6216\u65b9\u6cd5               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sprinter <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u8bf7\u6559\u5404\u4f4d:<\/p>\n<p>\u7531\u4e8e APP \u8981\u79bb\u7ebf\u79bb\u7f51\u4f7f\u7528, \u6240\u4ee5\u4e0d\u5f97\u4e0d\u628a hls \u89c6\u9891\u7684 m3u8 \u548c ts \u6587\u4ef6\u4e0b\u8f7d\u5230\u672c\u5730\u624b\u673a\u5b58\u50a8, \u4f46\u662f\u627e\u4e0d\u5230 ios\/swift \u64ad\u653e\u5668\u6216\u547d\u4ee4\u80fd\u64ad\u653e\u672c\u5730\u624b\u673a\u4e0a\u7684 m3u8+ts (hls)\u89c6\u9891, \u6c42\u89e3\u51b3\u4e4b\u6cd5.<\/p>\n<p>\u6211\u5df2\u7ecf\u8bd5\u8fc7 AVAssetDownloadURLSession \u7c7b, \u4f46\u662f\u4e0b\u8f7d\u540e\u7684 hls \u6587\u4ef6\u4e0d\u80fd\u81ea\u5b9a\u4e49\u4f4d\u7f6e\u6240\u4ee5\u5f88\u96be\u7ba1\u7406, \u6240\u4ee5\u5bfb\u6c42\u53ef\u4ee5\u64ad\u653e\u6307\u5b9a\u4f4d\u7f6e\u5185\u7684 m3u8+ts (hls)\u89c6\u9891\u7684\u65b9\u6cd5\u6216\u64ad\u653e\u5668.<\/p>\n<p>\u8bf7\u5404\u4f4d\u6307\u6559.<\/p>\n<p>\u8c22\u8c22!!<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3717506\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : devjia <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u9700\u6c42\u6211 5 \u5e74\u524d\u505a\u8fc7\uff0c\u672c\u5730\u641e\u4e2a http server \u5c31\u884c\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3717507\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wangkun025 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ffmpeg -i source.m3u8 -c copy target.mp4<br \/>\u6211\u4e00\u822c\u662f\u4e0b\u8f7d\u4e0b\u6765\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3717508\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wangkun025 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5ba1\u9519\u9898\u4e86\uff0c\u8bf7\u5ffd\u7565\u3002\u5bf9\u4e0d\u8d77\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3717509\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : sprinter <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @devjia \u672c\u5730\u641e\u4e2a http server \u5c31\u884c\u4e86==&gt;\u8c22\u8c22, \u4f46\u8fd9\u4e2a\u542c\u8d77\u6765\u9ebb\u70e6\u4e14\u8017\u8d44\u6e90, \u6709\u5565\u7b80\u5355\u7684\u65b9\u6cd5\u5417? \u8c22\u8c22                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3717510\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : myCupOfTea <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/github.com\/qi-shun-wang\/HLSDownloader<br \/>\u968f\u4fbf\u641c\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3717511\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : James369 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Core Video \u5e95\u5c42\u5e93\u641e\u4e0d\u5b9a\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>ios\/ Swift : \u6c42\u53ef\u4ee5\u64ad&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/167557"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=167557"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/167557\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167557"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}