{"id":1213,"date":"2024-11-22T16:08:25","date_gmt":"2024-11-22T08:08:25","guid":{"rendered":"http:\/\/192.168.1.104\/?p=1213"},"modified":"2024-12-11T10:26:50","modified_gmt":"2024-12-11T02:26:50","slug":"smart-rtmpd-web-%e6%8e%a5%e5%8f%a3","status":"publish","type":"post","link":"http:\/\/alextop.top\/?p=1213","title":{"rendered":"smart rtmpd \u5c40\u57df\u7f51\u63a8\u6d41\u4f7f\u7528\u6307\u5357"},"content":{"rendered":"\n<p>\u9879\u76ee\u5730\u5740:<a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\">https:\/\/github.com\/superconvert\/smart_rtmpd<\/a><\/p>\n\n\n\n<p>\u5f00\u7bb1\u5373\u7528\uff0c\u63a8\u6d41\u7801=\u63a8\u6d41\u5bc6\u5319=smart rtmpd\u76f4\u64ad\u95f4\u540d\u5b57\u6216\u6d41\u7684\u540d\u5b57<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"687\" src=\"http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/image-10-1024x687.png\" alt=\"\" class=\"wp-image-1266\" srcset=\"http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/image-10-1024x687.png 1024w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/image-10-300x201.png 300w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/image-10-768x515.png 768w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/image-10-670x450.png 670w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/image-10.png 1176w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u9ed8\u8ba4\u63a8\u6d41\u5730\u5740\uff1a192.168.x.x:1935<\/p>\n\n\n\n<p>web\u754c\u9762\uff1a192.168.x.x:8080<\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u5916\u7f51\u8bbf\u95ee\u9700\u914d\u7f6econfig.xml\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"727\" src=\"http:\/\/192.168.1.104\/wp-content\/uploads\/2024\/11\/\u5fae\u4fe1\u56fe\u7247_20241211102612.png\" alt=\"\" class=\"wp-image-1351\" srcset=\"http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/\u5fae\u4fe1\u56fe\u7247_20241211102612.png 1024w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/\u5fae\u4fe1\u56fe\u7247_20241211102612-300x213.png 300w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/\u5fae\u4fe1\u56fe\u7247_20241211102612-768x545.png 768w, http:\/\/alextop.top\/wp-content\/uploads\/2024\/11\/\u5fae\u4fe1\u56fe\u7247_20241211102612-670x476.png 670w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u9700\u8981\u4fee\u6539\u7ea2\u6846\u5185\u5b57\u6bb5\u4e3a\u5916\u7f51\u7f51\u5740\uff0c\u53ef\u4ee5\u53ea\u6539\u9700\u8981\u7684\u884c<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md\">https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">smart rtmpd web \u63a5\u53e3\u5206\u4e3a\u4e0b\u9762\u51e0\u7c7b<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#smart-rtmpd-web-%E6%8E%A5%E5%8F%A3%E5%88%86%E4%B8%BA%E4%B8%8B%E9%9D%A2%E5%87%A0%E7%B1%BB\"><\/a><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u5206\u7c7b\u540d\u79f0<\/th><th>\u529f\u80fd\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td>live<\/td><td>\u76f4\u64ad\u64ad\u653e\u63a5\u53e3\uff0c\u5bf9\u5e94\u670d\u52a1\u5668\u4e0a\u7684 live \u76ee\u5f55<\/td><\/tr><tr><td>rec<\/td><td>\u5f55\u50cf\u56de\u653e\u63a5\u53e3\uff0c\u5bf9\u4e8e\u670d\u52a1\u5668\u4e0a\u7684 rec \u76ee\u5f55<\/td><\/tr><tr><td>vod<\/td><td>\u70b9\u64ad\u63a5\u53e3\uff0c\u652f\u6301\u5b50\u76ee\u5f55\uff0c\u5bf9\u5e94\u670d\u52a1\u5668\u4e0a\u7684 vod \u76ee\u5f55<\/td><\/tr><tr><td>api<\/td><td>web \u7ba1\u7406\u7f16\u7a0b\u63a5\u53e3\uff0c\u5f53\u7136\u524d\u7aef\u9875\u9762\u53ef\u80fd\u4e5f\u6709\u53ef\u80fd\u7528\u5230<\/td><\/tr><tr><td>web<\/td><td>\u901a\u7528\u7684 web \u63a5\u53e3\uff0c\u5bf9\u5e94\u670d\u52a1\u5668\u4e0a\u7684 html \u76ee\u5f55<\/td><\/tr><tr><td>ws_im<\/td><td>IM \u901a\u8baf\u63a5\u53e3\uff0cwebsocket \u5b9e\u73b0\u7684 IM \u4f1a\u8bdd\u63a5\u53e3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">web live \u63a5\u53e3\u8bf4\u660e<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web-live-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E\"><\/a><\/p>\n\n\n\n<p><strong>\u529f\u80fd\uff1a<\/strong><\/p>\n\n\n\n<p>\u7528\u4e8e\u76f4\u64ad\u6d41\u64ad\u653e<\/p>\n\n\n\n<p><strong>\u683c\u5f0f\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u76f4\u64ad\u64ad\u653e\n# HTTP GET\nhttp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740\u6216\u57df\u540d&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/live\/&lt;\u6d41\u7684\u540d\u5b57&gt;.&lt;\u7c7b\u578b&gt;<\/pre>\n\n\n\n<p><strong>\u4f8b\u5b50\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/192.168.1.1:8080\/live\/stream.flv<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>\u670d\u52a1\u5668\u5730\u5740<\/td><td>192.168.1.1 \u652f\u6301\u57df\u540d\uff0c\u652f\u6301 NAT \u6620\u5c04<\/td><\/tr><tr><td>\u670d\u52a1\u5668\u7aef\u53e3<\/td><td>8080<\/td><\/tr><tr><td>\u6d41\u7684\u540d\u5b57<\/td><td>stream<\/td><\/tr><tr><td>\u7c7b\u578b<\/td><td>flv \u4e5f\u652f\u6301 m3u8, mpd \u7b49<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u76f4\u64ad\u6d41\u63a8\u9001\u6210\u529f\u540e\uff0cWEB \u670d\u52a1\u7aef\u81ea\u52a8\u4ea7\u751f\u4e0b\u9762\u683c\u5f0f\u7684\u6d41<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7c7b\u578b<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>flv<\/td><td>\u8fd9\u4e2a\u652f\u6301&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/live\/stream.flv\">http:\/\/192.168.1.1:8080\/live\/stream.flv<\/a>&nbsp;\u7684\u64ad\u653e\uff0c \u540c\u65f6\u4e5f\u652f\u6301 ws:\/\/192.168.1.1:8080\/live\/stream.flv \u7684\u64ad\u653e<\/td><\/tr><tr><td>hls<\/td><td>\u8fd9\u4e2a\u652f\u6301&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/live\/stream.m3u8\">http:\/\/192.168.1.1:8080\/live\/stream.m3u8<\/a>&nbsp;\u7684\u64ad\u653e<\/td><\/tr><tr><td>dash<\/td><td>\u8fd9\u4e2a\u652f\u6301&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/live\/stream.mpd\">http:\/\/192.168.1.1:8080\/live\/stream.mpd<\/a>&nbsp;\u7684\u64ad\u653e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8fd9\u4e9b URL \u90fd\u662f\u63a8\u6d41\u540e\uff0c\u81ea\u52a8\u4ea7\u751f\u7684\uff0c\u5177\u4f53\u53ef\u4ee5\u901a\u8fc7&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/api\/stream\">http:\/\/192.168.1.1:8080\/api\/stream<\/a>&nbsp;\u8fdb\u884c\u67e5\u8be2\u6240\u6709\u7684\u76f4\u64ad\u6d41<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">web rec \u63a5\u53e3\u8bf4\u660e<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web-rec-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E\"><\/a><\/p>\n\n\n\n<p><strong>\u529f\u80fd\uff1a<\/strong><\/p>\n\n\n\n<p>\u7528\u4e8e\u5f55\u50cf\u67e5\u8be2\u548c\u56de\u653e<\/p>\n\n\n\n<p>smart rtmpd \u7684\u5f55\u50cf\u65b9\u5f0f\u5c31\u662f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u63a8 rtmp \u6d41\u8fdb\u884c\u76f4\u64ad\u5e76\u540c\u65f6\u5f55\u50cf\nrtmp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/rec\/&lt;\u6d41\u7684\u540d\u5b57&gt;<\/pre>\n\n\n\n<p>smart rtmpd \u7684\u5f55\u50cf\u90fd\u4f1a\u81ea\u52a8\u5b58\u50a8\u5230\u670d\u52a1\u5668\u7684 rec \u76ee\u5f55\u4e0b\uff0crec \u76ee\u5f55\u4e0b\u7684\u4e00\u7ea7\u5b50\u76ee\u5f55\uff0c\u5c31\u662f\u4e0a\u8ff0 URL \u4e2d\u7684\u670d\u52a1\u5668\u5730\u5740\uff0c\u6bd4\u5982\uff1a\u670d\u52a1\u5668\u6709\u591a\u4e2a\u57df\u540d&nbsp;<a href=\"http:\/\/www.qiyicc.com\/\">www.qiyicc.com<\/a>,&nbsp;<a href=\"http:\/\/www.smartrtmpd.xn--com,-yj5fp826a\/\">www.smartrtmpd.com\uff0c\u90a3\u4e48<\/a>&nbsp;rec \u76ee\u5f55\u4e0b\u5c31\u4f1a\u5b58\u5728\u76ee\u5f55<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f16\u53f7<\/th><th>\u4e00\u7ea7\u5b50\u76ee\u5f55<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td><a href=\"http:\/\/www.qiyicc.com\/\">www.qiyicc.com<\/a><\/td><\/tr><tr><td>2<\/td><td><a href=\"http:\/\/www.smartrtmpd.com\/\">www.smartrtmpd.com<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4e0b\u9762\u6211\u4eec\u5c31\u8fd9\u4e2a URL \u5c55\u5f00\u8bf4\u660e<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u6bd4\u5982\uff1a\u63a8\u9001\u4e0b\u8ff0\u4e24\u8def\u6d41\nrtmp:\/\/www.qiyicc.com\/rec\/music\nrtmp:\/\/www.qiyicc.com\/rec\/sport<\/pre>\n\n\n\n<p>\u90a3\u4e48\u4e0a\u8ff0\u4e24\u4e2a\u5f55\u50cf URL \u4f1a\u5728\u670d\u52a1\u5668\u7684\u76ee\u5f55 \/rec\/<a href=\"http:\/\/www.qiyicc.com\/\">www.qiyicc.com\/<\/a>&nbsp;\u4e0b\u4ea7\u751f\u4e8c\u7ea7\u5b50\u76ee\u5f55\uff0c\u4e00\u7ea7\u5b50\u76ee\u5f55\u4ee5\u670d\u52a1\u5668\u5730\u5740\u547d\u540d\uff0c\u4e8c\u7ea7\u5b57\u76ee\u5f55\u4ee5\u6d41\u7684\u540d\u5b57\u547d\u540d<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f16\u53f7<\/th><th>\u4e8c\u7ea7\u5b50\u76ee\u5f55<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>music<\/td><\/tr><tr><td>2<\/td><td>sport<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4e8c\u7ea7\u5b50\u76ee\u5f55\u4e0b\uff0c\u4f1a\u6309\u65e5\u671f\u7cbe\u786e\u5230\u5929\u547d\u540d\u4ea7\u751f\u4e09\u7ea7\u5b50\u76ee\u5f55<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f16\u53f7<\/th><th>\u4e09\u7ea7\u5b50\u76ee\u5f55<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>2022-05-21<\/td><\/tr><tr><td>2<\/td><td>2022-05-22<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4e09\u7ea7\u5b50\u76ee\u5f55\u4e0b\u4f1a\u8bb0\u5f55\u5177\u4f53\u7684\u5f55\u50cf\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u5b57\u4ee5\u65f6\u5206\u79d2\u8fdb\u884c\u547d\u540d\uff0c\u7c7b\u578b\u89c1\u6587\u4ef6\u540e\u7f00\uff0c\u76ee\u524d\u53ea\u652f\u6301 m3u8 \u6216 mpd \uff0c\u5efa\u8bae\u7528 m3u8 \u8fdb\u884c\u5b58\u50a8\uff0c\u5177\u4f53\u53c2\u89c1 config.xml \u91cc\u7684\u8bf4\u660e<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f16\u53f7<\/th><th>\u5f55\u50cf\u6587\u4ef6<\/th><\/tr><\/thead><tbody><tr><td>1<\/td><td>08-56-33.m3u8<\/td><\/tr><tr><td>2<\/td><td>09-12-35.m3u8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u683c\u5f0f\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u83b7\u53d6\u5f55\u50cf\u4fe1\u606f\u6216\u64ad\u653e\u5f55\u50cf\u6587\u4ef6\n# HTTP GET\nhttp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740\u6216\u57df\u540d&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/rec\/&lt;\u6d41\u7684\u540d\u79f0&gt;\/[day=\u5e74\u6708\u65e5]\/[time=\u65f6\u5206\u79d2].[ext=\u6269\u5c55\u540d(m3u8\u6216dash)]\nexample : http:\/\/192.168.1.2:8080\/rec\/stream\/2023-10-18\/13-17-49.m3u8<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>\u65e0\u53c2<\/td><td>\u67e5\u8be2\u5f55\u50cf\u65e5\u671f\u5217\u8868<\/td><\/tr><tr><td>day<\/td><td>\u67e5\u8be2\u6307\u5b9a\u65e5\u671f\u5f55\u50cf\u6587\u4ef6\u5217\u8868\u8868<\/td><\/tr><tr><td>time<\/td><td>\u64ad\u653e\u5f55\u50cf\uff0c\u6b64\u53c2\u6570\u5fc5\u987b\u5305\u542b day \u53c2\u6570\uff0c\u5426\u5219\u65e0\u6548\uff0c\u76f4\u63a5\u64ad\u653e\u6b64\u8def\u5f55\u50cf<\/td><\/tr><tr><td>ext<\/td><td>\u5f55\u50cf\u7c7b\u578b\uff0c\u4e00\u822c\u4e3a m3u8 \u6216 mpd<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u65e0\u53c2\u4f8b\u5b50\u5982\u4e0b<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/rec\/stream\n\n\u54cd\u5e94\uff1a\n{\n    \"dirs\" : \n    [\n        \"2022-05-21\"\n    ]\n}<\/pre>\n\n\n\n<p>\u8fd9\u8868\u660e\u6b64\u8def\u5f55\u50cf\u53ea\u6709 2022-05-21 \u90a3\u5929\u6709\u5f55\u50cf\u5b58\u5728<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53c2\u6570 day \u4f8b\u5b50\u5982\u4e0b<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/rec\/stream\/2022-05-21\n\n\u54cd\u5e94\uff1a\n{\n    \"files\" :\n    [\n        \"18-22-11.m3u8\",\n        \"18-24-33.m3u8\",\n        \"18-34-02.m3u8\"\n    ]\n}<\/pre>\n\n\n\n<p>\u8fd9\u8868\u660e\u6b64\u8def\u5f55\u50cf 2022-05-21 \u5b58\u5728\u4e09\u4e2a\u65f6\u95f4\u70b9\u7684\u5f55\u50cf\uff0c\u5206\u522b\u662f 18-22-11\uff0c 18-24-33\uff0c18-34-02<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53c2\u6570 time \u4f8b\u5b50\u5982\u4e0b<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/rec\/stream\/2022-05-21\/18-22-11.m3u8\n\n\u54cd\u5e94\uff1a\n\u5f55\u50cf\u6570\u636e\u6d41\uff0c\u64ad\u653e\u5668\u62ff\u5230\u6570\u636e\u6d41\u5c31\u53ef\u4ee5\u64ad\u653e\u4e86<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">web vod \u63a5\u53e3\u8bf4\u660e<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web-vod-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E\"><\/a><\/p>\n\n\n\n<p><strong>\u529f\u80fd\uff1a<\/strong><\/p>\n\n\n\n<p>\u7528\u4e8e\u70b9\u64ad\u7684\u529f\u80fd\uff0c\u7528\u6237\u53ef\u4ee5\u628a\u81ea\u5df1\u7684 mp4, mkv\u6216\u5176\u5b83\u7c7b\u578b\u7684\u89c6\u9891\u6587\u4ef6\u653e\u5230\u670d\u52a1\u5668\u4e0a\u7684 \/vod \u76ee\u5f55\u4e0b\u6216\u6b64\u76ee\u5f55\u7684\u5b50\u76ee\u5f55\u4e0b\uff0c\u5b50\u76ee\u5f55\u53ef\u4ee5\u52a8\u6001\u521b\u5efa\uff0c\u652f\u6301\u591a\u7ea7\uff0c\u7528\u6237\u7aef\u53ea\u8981\u8bbf\u95ee\u5bf9\u5e94\u7684 URL \u5c31\u80fd\u5b9e\u73b0\u70b9\u64ad\u4e86\uff0c\u63a8\u8350\u7528 fmp4 \u683c\u5f0f\u7684\u6587\u4ef6<\/p>\n\n\n\n<p><strong>\u683c\u5f0f\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u83b7\u53d6\u70b9\u64ad\u4fe1\u606f\u6216\u64ad\u653e\u70b9\u64ad\u6587\u4ef6\n# HTTP GET\nhttp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740\u6216\u57df\u540d&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/vod\/[\u4e00\u7ea7\u5b57\u76ee\u5f55]\/[\u4e8c\u7ea7\u5b50\u76ee\u5f55]\/&lt;\u6587\u4ef6\u540d&gt;<\/pre>\n\n\n\n<p><strong>\u4f8b\u5b50\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/192.168.1.1:8080\/vod\/sport\/football\/worldcup.mp4<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>sport<\/td><td>\u4e00\u7ea7\u5b50\u76ee\u5f55<\/td><\/tr><tr><td>football<\/td><td>\u4e8c\u7ea7\u5b50\u76ee\u5f55<\/td><\/tr><tr><td>worldcup.mp4<\/td><td>\u89c6\u9891\u6587\u4ef6<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>VOD \u6587\u4ef6\u5217\u8868\u67e5\u8be2\uff0c\u53c2\u89c1\u4e0b\u9762\u7684 web api \u63a5\u53e3\u6709\u5173 vod \u7684\u8bf4\u660e<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">web api \u63a5\u53e3\u8bf4\u660e<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web-api-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E\"><\/a><\/p>\n\n\n\n<p><strong>\u529f\u80fd\uff1a<\/strong><\/p>\n\n\n\n<p>\u4e3a\u540e\u53f0 WEB \u7ba1\u7406\u6216 WEB \u524d\u7aef\u4e1a\u52a1\u7684\u9700\u6c42\uff0c\u63d0\u4f9b\u7684\u7efc\u5408\u63a5\u53e3\u3002<\/p>\n\n\n\n<p>** \u683c\u5f0f\uff1a**<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># HTTP GET,PUT\nhttp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/api\/&lt;\u4e1a\u52a1\u6807\u8bc6&gt;<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u4e1a\u52a1\u6807\u8bc6<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>live<\/td><td>\u76f4\u64ad\u4fe1\u606f\u67e5\u8be2\u63a5\u53e3<\/td><\/tr><tr><td>rec<\/td><td>\u5f55\u50cf\u4fe1\u606f\u67e5\u8be2\u63a5\u53e3<\/td><\/tr><tr><td>vod<\/td><td>\u70b9\u64ad\u4fe1\u606f\u67e5\u8be2\u63a5\u53e3<\/td><\/tr><tr><td>status<\/td><td>\u670d\u52a1\u5668\u72b6\u6001\u67e5\u8be2\u63a5\u53e3<\/td><\/tr><tr><td>config<\/td><td>\u914d\u7f6e\u6587\u4ef6\u83b7\u53d6\u4e0e\u8bbe\u7f6e\u63a5\u53e3<\/td><\/tr><tr><td>policy<\/td><td>\u670d\u52a1\u5668\u8f6c\u53d1\u7b56\u7565\u914d\u7f6e<\/td><\/tr><tr><td>statistics<\/td><td>\u670d\u52a1\u5668\u7edf\u8ba1\u4fe1\u606f\u63a5\u53e3<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u4e1a\u52a1\u6807\u8bc6 live<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u83b7\u53d6\u76f4\u64ad\u6d41\u76f8\u5173\u4fe1\u606f\n# HTTP GET\nhttp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/api\/live<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>\u65e0\u53c2<\/td><td>\u8fd4\u56de\u5f53\u524d\u6240\u6709\u5728\u7ebf\u6d41\u5217\u8868<\/td><\/tr><tr><td>vhost<\/td><td>\u76f4\u64ad\u6d41\u7684 vhost \u901a\u5e38\u5c31\u662f\u670d\u52a1\u5668\u5730\u5740\uff0capp \u76f4\u64ad\u6d41\u7684 app \u6807\u7b7e\uff0cname \u76f4\u64ad\u6d41\u7684\u540d\u5b57 vhost, app, name \u5fc5\u987b\u540c\u65f6\u9644\u5e26\uff0c\u8bf7\u6c42\u8fd4\u56de\u6b64\u8def\u6d41\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u53c2\u6570\u4fe1\u606f\u4ee5 rtmp url \u4e3a\u4e3b\uff0c\u9ed8\u8ba4\u7aef\u53e3\u53ef\u4ee5\u4e0d\u5e26<\/td><\/tr><tr><td>cmd<\/td><td>\u76ee\u524d\u53ea\u652f\u6301 cmd=count\uff0c\u67e5\u8be2\u6b64\u8def\u89c6\u9891\u5f53\u524d\u64ad\u653e\u7aef\u7684\u4e2a\u6570\uff0c\u8fd9\u4e2a\u80af\u5b9a\u4e0d\u662f\u7cbe\u786e\u7684\u7edf\u8ba1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u65e0\u53c2\u4f8b\u5b50<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u4f8b\u5b50\u5982\u4e0b\n\n\u8bf7\u6c42\uff1a\n\nhttp:\/\/192.168.1.1:8080\/api\/live\n\n\u54cd\u5e94\uff1a\n\n{\n    \"stream\" : \n    [\n        \"rtmp:\/\/192.168.1.1:1935\/live\/stream\"\n    ]\n} \n\u6bcf\u8def\u76f4\u64ad\u6d41\u7684 RTMP \u7684 URL \u5217\u8868<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>vhost \u53c2\u6570\u4f8b\u5b50<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/live?vhost=192.168.1.1:1935&app=live&name=stream\n\u56e0\u4e3a rtmp \u9ed8\u8ba4\u7aef\u53e3\u662f 1935\uff0c\u4e5f\u53ef\u4ee5\u5199\u6210\nhttp:\/\/192.168.1.1:8080\/api\/live?vhost=192.168.1.1&app=live&name=stream\n\n\u54cd\u5e94\uff1a\n{\n\t\"app\" : \n\t{\n\t\t\"duration\" : \"PT2S\",\n\t\t\"from\" : \"rtmp\",\n\t\t\"rate\" : \"91.81 b\/s\",\n\t\t\"rec\" : false\n\t},\n\t\"media\" : \n\t{\n\t\t\"audio\" : \n\t\t{\n\t\t\t\"channel\" : 2,\n\t\t\t\"codec\" : \"aac\",\n\t\t\t\"samplebit\" : 16,\n\t\t\t\"samplerate\" : 48000\n\t\t},\n\t\t\"video\" : \n\t\t{\n\t\t\t\"codec\" : \"h264\",\n\t\t\t\"fps\" : 30,\n\t\t\t\"gop\" : 0,\n\t\t\t\"height\" : 720,\n\t\t\t\"width\" : 1280\n\t\t}\n\t},\n\t\"urls\" : \n\t[\n\t\t{\n\t\t\t\"type\" : \"rtmp\",\n\t\t\t\"url\" : \"rtmp:\/\/192.168.1.6\/live\/stream\"\n\t\t},\n\t\t{\n\t\t\t\"type\" : \"http-flv\",\n\t\t\t\"url\" : \"http:\/\/192.168.1.6:8080\/live\/stream.flv\"\n\t\t},\n\t\t{\n\t\t\t\"type\" : \"ws-flv\",\n\t\t\t\"url\" : \"ws:\/\/192.168.1.6:8080\/live\/stream.flv\"\n\t\t},\n\t\t{\n\t\t\t\"type\" : \"webrtc\",\n\t\t\t\"url\" : \"https:\/\/192.168.1.6:8181\/live\/stream.wms\"\n\t\t},\n\t\t{\n\t\t\t\"type\" : \"http-hls\",\n\t\t\t\"url\" : \"http:\/\/192.168.1.6:8080\/live\/stream.m3u8\"\n\t\t},\n\t\t{\n\t\t\t\"type\" : \"rtsp\",\n\t\t\t\"url\" : \"rtsp:\/\/118.145.6.103:554\/live\/stream\"\n\t\t},\n\t\t{\n\t\t\t\"type\" : \"srt\",\n\t\t\t\"url\" : \"srt:\/\/192.168.1.6:9000\/live\/stream\"\n\t\t}\n\t]\n}<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>cmd \u53c2\u6570\u4f8b\u5b50<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/live?vhost=192.168.1.1:1935&app=live&name=stream&cmd=count\n\n\u54cd\u5e94 \uff1a\nrtmp:0\nflv:0\nrtsp:0\n\u540e\u7eed\u53ef\u80fd\u4fee\u8ba2\u4e3a json \u683c\u5f0f<\/pre>\n\n\n\n<p><strong>\u4e1a\u52a1\u6807\u8bc6 rec<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u83b7\u53d6\u5f55\u50cf\u5217\u8868\u4fe1\u606f\n# HTTP GET\nhttp:\/\/&lt;\u670d\u52a1\u5668\u5730\u5740&gt;:[\u670d\u52a1\u5668\u7aef\u53e3]\/api\/rec<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>\u65e0\u53c2<\/td><td>\u83b7\u53d6\u670d\u52a1\u5668\u4e0a \/rec \u76ee\u5f55\u4e0b\u4ee5\u670d\u52a1\u5668\u5730\u5740\u547d\u540d\u7684\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u5f55\u50cf\u540d\u79f0\u5217\u8868<\/td><\/tr><tr><td>vhos<\/td><td>\u83b7\u53d6\u670d\u52a1\u5668\u4e0a \/rec \u76ee\u5f55\u4e0b\u4ee5 vhost \u547d\u540d\u7684\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u5f55\u50cf\u540d\u79f0\u5217\u8868<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u65e0\u53c2\u4f8b\u5b50<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/rec\n\n\u54cd\u5e94\uff1a\n{\n    \"dirs\" : \n    [\n        \"stream\"\n    ]\n} <\/pre>\n\n\n\n<p>\u67e5\u8be2\u5230\u4e00\u8def\u5f55\u50cf\uff0c\u540d\u5b57\u4e3a stream\uff0c\u4e0d\u5e26\u53c2\u6570\uff0c\u9ed8\u8ba4\u53c2\u6570 vhost \u5c31\u4e3a 192.168.1.1<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>vhost \u53c2\u6570\u4f8b\u5b50<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/rec?vhost=www.qiyicc.com\n\n\u54cd\u5e94\uff1a\n{\n    \"dirs\" : \n    [\n        \"music\",\n        \"sport\"\n    ]\n} <\/pre>\n\n\n\n<p>\u67e5\u8be2\u5230\u4e24\u8def\u5f55\u50cf\uff0c\u540d\u5b57\u4e3a music, sport<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u6574\u4e2a\u5f55\u50cf\u6d41\u7a0b\u5efa\u8bae\u5982\u4e0b<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u5229\u7528&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/api\/rec\">http:\/\/192.168.1.1:8080\/api\/rec<\/a>&nbsp;\u67e5\u8be2\u5f55\u50cf\u5217\u8868\uff0c\u83b7\u53d6\u6240\u6709\u7684\u5f55\u50cf\u540d\u79f0 example :&nbsp;<a href=\"http:\/\/192.168.1.2:8080\/api\/rec\">http:\/\/192.168.1.2:8080\/api\/rec<\/a><\/li>\n\n\n\n<li>\u5229\u7528&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/rec\/\">http:\/\/192.168.1.1:8080\/rec\/<\/a>&lt;\u6d41\u540d\u79f0&gt; \u67e5\u8be2\u90a3\u5929\u6709\u5f55\u50cf\u4ea7\u751f example :&nbsp;<a href=\"http:\/\/192.168.1.2:8080\/rec\/stream\">http:\/\/192.168.1.2:8080\/rec\/stream<\/a><\/li>\n\n\n\n<li>\u5229\u7528&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/rec\/\">http:\/\/192.168.1.1:8080\/rec\/<\/a>&lt;\u6d41\u540d\u79f0&gt;\/day \u67e5\u8be2\u5f55\u50cf\u6587\u4ef6\u5217\u8868 example :&nbsp;<a href=\"http:\/\/192.168.1.2:8080\/rec\/stream\/2023-10-18\">http:\/\/192.168.1.2:8080\/rec\/stream\/2023-10-18<\/a><\/li>\n\n\n\n<li>\u5229\u7528&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/rec\/\">http:\/\/192.168.1.1:8080\/rec\/<\/a>&lt;\u6d41\u540d\u79f0&gt;\/day\/time \u64ad\u653e\u5f55\u50cf example :&nbsp;<a href=\"http:\/\/192.168.1.2:8080\/rec\/stream\/2023-10-18\/13-17-49.m3u8\">http:\/\/192.168.1.2:8080\/rec\/stream\/2023-10-18\/13-17-49.m3u8<\/a><\/li>\n<\/ol>\n\n\n\n<p>\u5177\u4f53\u4f7f\u7528\u65b9\u6cd5\uff0c\u53c2\u89c1\u4e0a\u8ff0\u7684 rec \u7ae0\u8282\u8bf4\u660e<\/p>\n\n\n\n<p><strong>\u4e1a\u52a1\u6807\u8bc6 vod<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># HTTP GET\nhttp:\/\/192.168.1.1:8080\/api\/vod<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u67e5\u8be2 vod \u6839\u76ee\u5f55<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/vod\n \n\u54cd\u5e94\uff1a\n \n{\n    \"dirs\" : \n    [\n        \"discovery\"\n    ],\n    \"files\" : \n    [\n        \"video.mp4\"\n    ]\n}<\/pre>\n\n\n\n<p>\u6211\u4eec\u770b\u5230\u67e5\u8be2\u5230\u4e00\u4e2a\u5b50\u76ee\u5f55\u548c\u4e00\u4e2a\u6587\u4ef6<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u67e5\u8be2\u5b50\u76ee\u5f55<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/vod\/discovery\n\n\u54cd\u5e94\uff1a\n{ \n    \"dirs\" :\n    [ \n        \"\" \n    ], \n    \"files\" : \n    [ \n        \"river.mkv\"\n    ] \n}<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u64ad\u653e\u70b9\u64ad\u6587\u4ef6<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/192.168.1.1:8080\/api\/vod\/discovery\/river.mkv<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e0a\u4f20\u70b9\u64ad\u89c6\u9891\u5230\u670d\u52a1\u5668<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\"># HTTP POST\nhttp:\/\/192.168.1.1:8080\/vod\/stream<\/pre>\n\n\n\n<p>\u652f\u6301\u591a\u6587\u4ef6\u4e0a\u4f20\uff0c\u53ef\u4ee5\u5229\u7528 postman \u8fdb\u884c\u5b9e\u9a8c<\/p>\n\n\n\n<p><strong>\u4e1a\u52a1\u6807\u8bc6 status<\/strong><\/p>\n\n\n\n<p>\u83b7\u53d6\u670d\u52a1\u5668\u72b6\u6001<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># HTTP GET\nhttp:\/\/192.168.1.1:8080\/api\/status\n \n\u8bf7\u6c42\uff1a\nhttp:\/\/192.168.1.1:8080\/api\/status\n \n\u54cd\u5e94\uff1a\n{\n\t\"http\" : \n\t{\n\t\t\"port\" : 8080,\n\t\t\"run\" : true\n\t},\n\t\"https\" : \n\t{\n\t\t\"port\" : 8181,\n\t\t\"run\" : false\n\t},\n\t\"rtmp\" : \n\t{\n\t\t\"port\" : 1935,\n\t\t\"run\" : true,\n\t\t\"ssl\" : false\n\t},\n\t\"rtsp\" : \n\t{\n\t\t\"port\" : 8554,\n\t\t\"run\" : true,\n\t\t\"ssl\" : false\n\t},\n\t\"srt\" : \n\t{\n\t\t\"port\" : 9000,\n\t\t\"run\" : true\n\t},\n\t\"start_time\" : \"2023-02-18 06:30:33\"\n}<\/pre>\n\n\n\n<p><strong>\u4e1a\u52a1\u6807\u8bc6 config<\/strong><\/p>\n\n\n\n<p>\u83b7\u53d6\u914d\u7f6e\u4fe1\u606f\u548c\u8bbe\u7f6e\u914d\u7f6e\u4fe1\u606f\uff0c\u9700\u8981\u4e00\u4e2a\u590d\u6742\u7684\u903b\u8f91\uff0c\u9700\u8981\u91cd\u542f\u670d\u52a1\u5668\uff0c\u51b5\u4e14\u53ea\u80fd 127.0.0.1 \u5730\u5740\u8bbf\u95ee\uff0c\u8fd9\u91cc\u4e0d\u591a\u8bf4\u4e86\uff0c\u5927\u5bb6\u53ef\u4ee5\u53c2\u8003\u6211\u4eec github \u4e0a\u7684 WEB \u7ba1\u7406\u540e\u53f0\u7684\u63a5\u53e3\u90e8\u5206\u8c03\u7528<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u83b7\u53d6\u914d\u7f6e\u4fe1\u606f\n# HTTP GET\nhttp:\/\/127.0.0.1:8080\/api\/config\n \n# \u66f4\u65b0\u914d\u7f6e\u4fe1\u606f\n# HTTP POST\nhttp:\/\/127.0.0.1:8080\/api\/config<\/pre>\n\n\n\n<p><strong>\u96c6\u7fa4\/\u6d41\u8f6c\u53d1\u6807\u8bc6 policy<\/strong><\/p>\n\n\n\n<p>\u8fd9\u5757\u540c\u4e0a\uff0c\u76f8\u5bf9\u590d\u6742\uff0c\u8fd9\u91cc\u4e0d\u505a\u8be6\u7ec6\u89e3\u91ca<\/p>\n\n\n\n<p><strong>\u4e1a\u52a1\u6807\u8bc6 statistics<\/strong><\/p>\n\n\n\n<p>\u8fd9\u4e2a\u662f\u83b7\u53d6\u7684\u7edf\u8ba1\u4fe1\u606f\uff0c\u76ee\u524d\u610f\u4e49\u4e0d\u5927<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \u83b7\u53d6\u670d\u52a1\u5668\u7edf\u8ba1\u4fe1\u606f\n# HTTP GET\nhttp:\/\/192.168.1.1:8080\/api\/statistics<\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">WEB ( web ) \u901a\u7528\u63a5\u53e3\u8bf4\u660e<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web--web--%E9%80%9A%E7%94%A8%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E\"><\/a><\/p>\n\n\n\n<p>\u8fd9\u4e2a\u63a5\u53e3\u5bf9\u5e94\u7684\u670d\u52a1\u5668\u4e0a\u7684 \/html \u76ee\u5f55\uff0c\u8fd9\u4e2a\u662f\u4e2a\u7b80\u5355\u7684 http \u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u628a\u64ad\u653e\u5668\u9875\u9762\u4e0e\u811a\u672c\uff0c\u804a\u5929\u5ba4\u9875\u9762\u4e0e\u811a\u672c\u5230\u6b64\u76ee\u5f55\uff0c\u76ee\u5f55\u4e0e\u6587\u4ef6\u540d\u5b57\u7981\u6b62\u4e0e\u4e0a\u8ff0 URL \u4e2d\u7684\u91cd\u590d\uff0c\u90a3\u6837\u4f1a\u5bfc\u81f4\u4f18\u5148\u8bbf\u95ee\u4e0a\u8ff0 URL\uff0c\u628a index.html \u653e\u5230 \/html \u76ee\u5f55\u4e0b\uff0c\u76f4\u63a5\u8f93\u5165&nbsp;<a href=\"http:\/\/192.168.1.1:8080\/\">http:\/\/192.168.1.1:8080<\/a>&nbsp;\u5c31\u80fd\u76f4\u63a5\u663e\u793a\u4e86\uff0c\u8fd9\u91cc\u4e0d\u505a\u8fc7\u591a\u4ecb\u7ecd<\/p>\n\n\n\n<p>\u4f8b\u5b50\uff0c\u8bbf\u95ee\u64ad\u653e\u5668 \uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">http:\/\/192.168.1.1:8080\/webrtc.html<\/pre>\n\n\n\n<p>\u6548\u679c\u5982\u4e0b&nbsp;<a target=\"_blank\" rel=\"noreferrer noopener\" href=\"https:\/\/camo.githubusercontent.com\/d07a8145fa8d7c7c30d7c7b36da3f91bf80436f1665ee538fc103af92af5405d\/68747470733a2f2f6f7363696d672e6f736368696e612e6e65742f6f73636e65742f75702d64383931666265373365656364623339323663376661306631353530323761643561642e706e67\"><\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">WEB IM \u63a5\u53e3\u8bf4\u660e<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web-im-%E6%8E%A5%E5%8F%A3%E8%AF%B4%E6%98%8E\"><\/a><\/p>\n\n\n\n<p>\u8fd9\u4e2a\u5bf9\u5e94\u670d\u52a1\u5668\u4e0b \/html \u76ee\u5f55\u4e0b\u7684 webrtc.html \u4ee5\u53ca\u811a\u672c\u6587\u4ef6\uff0c\u6709\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u81ea\u884c\u7814\u7a76\u4e00\u4e0b\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u8fd9\u4e2a\u91cc\u9762\u5b9e\u73b0\u70b9\u5bf9\u70b9\u804a\u5929\uff0c\u7fa4\u7ec4\u804a\u5929\uff0c\u5229\u7528\u6d4f\u89c8\u5668\u81ea\u5e26\u7684 webrtc \u8fdb\u884c\u97f3\u89c6\u9891\u804a\u5929\u3002\u8fd9\u91cc\u5c31\u4e0d\u505a\u8fc7\u591a\u8bf4\u660e\uff0c\u5177\u4f53\u5b9e\u73b0\u5c31\u662f\u4e0a\u56fe webrtc.html<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">WEB \u63a5\u53e3\u8ba4\u8bc1<\/h1>\n\n\n\n<p><a href=\"https:\/\/github.com\/superconvert\/smart_rtmpd\/blob\/master\/web_dev.md#web-%E6%8E%A5%E5%8F%A3%E8%AE%A4%E8%AF%81\"><\/a><\/p>\n\n\n\n<p>\u53c2\u89c1\u670d\u52a1\u5668\u7684\u914d\u7f6e\u6587\u4ef6 config.xml<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;config&gt;\n    &lt;authurl timeout=\"3000\"&gt;http:\/\/www.qiyicc.com:80\/api\/auth&lt;authurl\/&gt;\n&lt;\/config&gt;<\/pre>\n\n\n\n<p>\u4e3a\u4e86\u9632\u6b62\u975e\u6cd5\u64cd\u4f5c\u4e0a\u8ff0 web \u63a5\u53e3\uff0c\u9700\u8981\u5bf9\u6bcf\u4e2a web \u8bf7\u6c42\u8fdb\u884c\u9274\u6743\u9a8c\u8bc1\u3002\u5c31\u9700\u8981\u5728\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u7c7b\u4f3c\u7684\u9a8c\u8bc1\u4fe1\u606f\u3002\u670d\u52a1\u5668\u4f5c\u4e3a web client\uff0c\u9274\u6743\u670d\u52a1\u5668\u4f5c\u4e3a web server \uff0c\u8bbf\u95ee\u65b9\u5f0f\u5c31\u662f\u4e00\u4e2a HTTP GET \u8bf7\u6c42 \u5fc5\u987b\u914d\u7f6e\u4e3a\u4e00\u4e2a\u6807\u51c6\u7684 http url , \u4f8b\u5982\uff1a<a href=\"http:\/\/www.qiyicc.com\/api\/auth\">http:\/\/www.qiyicc.com\/api\/auth<\/a>&nbsp;\u6216&nbsp;<a href=\"https:\/\/qiyicc.com\/api\/auth%EF%BC%8C%E5%90%A6%E5%88%99%E5%B0%B1%E6%98%AF%E6%97%A0%E6%95%88%E9%85%8D%E7%BD%AE%EF%BC%8C%E9%89%B4%E6%9D%83%E5%8A%9F%E8%83%BD%E5%B0%B1%E5%A4%B1%E6%95%88%E3%80%82\">https:\/\/qiyicc.com\/api\/auth\uff0c\u5426\u5219\u5c31\u662f\u65e0\u6548\u914d\u7f6e\uff0c\u9274\u6743\u529f\u80fd\u5c31\u5931\u6548\u3002<\/a><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u53c2\u6570<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>timeout<\/td><td>\u8fde\u63a5\u9274\u6743\u670d\u52a1\u5668\u8d85\u65f6\u65f6\u95f4\uff0c\u6beb\u79d2<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-preformatted\">GET \/api\/auth?type=http&amp;role=api HTTP\/1.1\nUser-Agent: smart_rtmpd\nHost: www.qiyicc.com:80\nConnection: close\n<\/pre>\n\n\n\n<p>\/api\/auth?type=http&amp;role=api<\/p>\n\n\n\n<p>\/api\/auth \u5c31\u662f config.xml \u91cc\u9762\u914d\u7f6e\u7684 url \u7684 path \u90e8\u5206\uff0c\u53c2\u6570\u4e3a smart_rtmpd \u81ea\u52a8\u52a0\u4e0a\u7684 ?type=http&amp;role=api<br>\u4e0a\u8ff0\u53c2\u6570 type \u4e3a http \u8bf7\u6c42\uff0crole \u8868\u793a\u662f\u6709 api \u63a5\u53e3\u7684\u8c03\u7528\u8fc7\u6765<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u540d\u79f0<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>http<\/td><td>\u6765\u81ea http \u8bf7\u6c42\u7684\u9274\u6743<\/td><\/tr><tr><td>rtmp<\/td><td>\u6765\u81ea rtmp \u8bf7\u6c42\u7684\u9274\u6743<\/td><\/tr><tr><td>rtsp<\/td><td>\u6765\u81ea rtsp \u8bf7\u6c42\u7684\u9274\u6743<\/td><\/tr><tr><td>srt<\/td><td>\u6765\u81ea srt \u8bf7\u6c42\u7684\u9274\u6743<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u53c2\u6570 role \u8868\u793a\u8fd9\u4e2a\u9274\u6743\u8bf7\u6c42\u662f\u6765\u81ea api \u8fd9\u4e2a\u4e1a\u52a1\u6807\u8bc6<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u540d\u79f0<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td>api<\/td><td>\u8fd9\u662f http api \u63a5\u53e3<\/td><\/tr><tr><td>upload<\/td><td>\u8fd9\u662f http \u4e0a\u4f20<\/td><\/tr><tr><td>download<\/td><td>\u8fd9\u662f http vod \u4e0b\u8f7d<\/td><\/tr><tr><td>publisher<\/td><td>\u8fd9\u662f\u63a8\u6d41\u89d2\u8272 rtmp, rtsp, srt<\/td><\/tr><tr><td>player<\/td><td>\u8fd9\u662f\u62c9\u6d41\u89d2\u8272 rtmp, rtsp, srt, http rec, http flv, hls, dash, webrtc<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5982\u679c router \u914d\u7f6e\u4e3a\u7a7a\u90a3\u4e48\u8bf7\u6c42\u5c31\u53d8\u6210<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">GET \/api\/auth?type=http&amp;role=api HTTP\/1.1\nUser-Agent: smart_rtmpd\nHost: www.qiyicc.com:80\nConnection: close<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9879\u76ee\u5730\u5740:https:\/\/gi&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-1213","post","type-post","status-publish","format-standard","hentry","category-server"],"_links":{"self":[{"href":"http:\/\/alextop.top\/index.php?rest_route=\/wp\/v2\/posts\/1213"}],"collection":[{"href":"http:\/\/alextop.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/alextop.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/alextop.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/alextop.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1213"}],"version-history":[{"count":5,"href":"http:\/\/alextop.top\/index.php?rest_route=\/wp\/v2\/posts\/1213\/revisions"}],"predecessor-version":[{"id":1352,"href":"http:\/\/alextop.top\/index.php?rest_route=\/wp\/v2\/posts\/1213\/revisions\/1352"}],"wp:attachment":[{"href":"http:\/\/alextop.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/alextop.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/alextop.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}