From f3de902d2184dd4ec6e5af40e047d079cc95553a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=A4=E5=8F=88?= <104784428+guyou45@users.noreply.github.com> Date: Mon, 3 Nov 2025 11:39:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B0=83=E7=94=A8ABGI?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=9A=84OBS=20(#2301)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * OBS录制 * Enhance README with usage instructions and notes Updated the README to include detailed instructions and notes on using the OBS recording script with auto-bgi software. --- repo/js/OBS录制/README.md | 47 +++++++++++++++++++++++++++++++++++ repo/js/OBS录制/main.js | 21 ++++++++++++++++ repo/js/OBS录制/manifest.json | 26 +++++++++++++++++++ repo/js/OBS录制/settings.json | 18 ++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 repo/js/OBS录制/README.md create mode 100644 repo/js/OBS录制/main.js create mode 100644 repo/js/OBS录制/manifest.json create mode 100644 repo/js/OBS录制/settings.json diff --git a/repo/js/OBS录制/README.md b/repo/js/OBS录制/README.md new file mode 100644 index 000000000..2e72ce295 --- /dev/null +++ b/repo/js/OBS录制/README.md @@ -0,0 +1,47 @@ +# OBS录制 + +## 介绍 +#### 该脚本是搭配auto-bgi软件使用,进行开启本地开启OBS录制和结束 +#### 不了解的可以去BetterGI的QQ频道搜索【auto-bgi】 +#### 也可以电脑点击【[ABGI](https://gitee.com/wangjian0327/auto-bgi/blob/ginVue/README.md)】,进行学习,了解 + +------ + + ## 注意 + #### 使用`OBS录制`脚本时,`ABGI`最低版本为【3.1】 + +------ + +## 使用方法 + +#### 在`调度器`中新建`配置组`,`配置组`添加`OBS录制`右键脚本名字,找到【修改通用配置】将里面的【JS HTTP权限】下的`禁用`选择`启用`,在【修改JS脚本自定义设置】,选or填相关内容 + +------ + +####图文教程步骤一: +image + +####图文教程步骤二: +image + +####图文教程步骤三: +image + +####图文教程步骤四: +image + +####图文教程步骤五 +image + +####图文教程步骤六 +image + +------ + +## 版本 +#### 0.0.1 +有啥不懂的,八九十群,可以艾特【古又】 + + + + diff --git a/repo/js/OBS录制/main.js b/repo/js/OBS录制/main.js new file mode 100644 index 000000000..337a2e6dc --- /dev/null +++ b/repo/js/OBS录制/main.js @@ -0,0 +1,21 @@ + +(async function () { + try { + // 判断你是否运行ABGI + await http.request('GET', `http://localhost:8082/api/index`, null, null); + + if (settings.selectScript == "开启录制") { + await http.request('POST', `http://localhost:8082/api/abgiObs/StartRecording`, null, null); + } else if (settings.selectScript == "关闭录制") { + if (settings.rename == "") { + await http.request('POST', `http://localhost:8082/api/abgiObs/StopRecording`, null, null); + return; + }; + const fileName = settings.rename; + await http.request('POST', `http://localhost:8082/api/abgiObs/StopRecording?videoName=${fileName}`, null, null); + }; + return; + } catch (error) { + log.error("你的ABGI未运行!!!") + }; +})(); \ No newline at end of file diff --git a/repo/js/OBS录制/manifest.json b/repo/js/OBS录制/manifest.json new file mode 100644 index 000000000..41af976a4 --- /dev/null +++ b/repo/js/OBS录制/manifest.json @@ -0,0 +1,26 @@ +{ + "manifest_version": 1, + "name": "OBS录制", + "version": "0.0.1", + "tags": [ + "abgi" + ], + "description": "录制哪个脚本", + "saved_files": [ + ], + "authors": [ + { + "name": "隔壁老王", + "links": "https://github.com/wjdsg0327" + }, + { + "name": "古又", + "links": "https://github.com/guyou45" + } + ], + "http_allowed_urls": [ + "http://localhost:8082/api/*" + ], + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/OBS录制/settings.json b/repo/js/OBS录制/settings.json new file mode 100644 index 000000000..0ab47fcf7 --- /dev/null +++ b/repo/js/OBS录制/settings.json @@ -0,0 +1,18 @@ +[ + { + "name": "selectScript", + "type": "select", + "label": "开启or关闭录制", + "options": [ + "开启录制", + "关闭录制" + ], + "default": "" + }, + { + "name": "rename", + "type": "input-text", + "label": "是否重命名录制视频名称,只需选择关闭录制时填写", + "default": "" + } +] \ No newline at end of file