新增startRecordTask接口,支持录制事件视频

用户可以录制当前时间前后一定时间内的视频,配置文件gop_cache设置较大时历史视频才能录全
This commit is contained in:
xia-chu
2025-08-02 20:47:49 +08:00
parent b1e1a0f174
commit c9a0025620
4 changed files with 176 additions and 2 deletions

View File

@@ -1380,6 +1380,62 @@
},
"response": []
},
{
"name": "开始事件视频录制(startRecordTask)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{ZLMediaKit_URL}}/index/api/startRecordTask?secret={{ZLMediaKit_secret}}&vhost={{defaultVhost}}&app=live&stream=test&path=1.mp4&back_ms=10000&forward_ms=10000",
"host": [
"{{ZLMediaKit_URL}}"
],
"path": [
"index",
"api",
"startRecordTask"
],
"query": [
{
"key": "secret",
"value": "{{ZLMediaKit_secret}}",
"description": "api操作密钥(配置文件配置)"
},
{
"key": "vhost",
"value": "{{defaultVhost}}",
"description": "虚拟主机例如__defaultVhost__"
},
{
"key": "app",
"value": "live",
"description": "应用名,例如 live"
},
{
"key": "stream",
"value": "test",
"description": "流id例如 obs"
},
{
"key": "path",
"value": "1.mp4",
"description": "录像文件保存相对路径,包括名称"
},
{
"key": "back_ms",
"value": "10000",
"description": "回溯录制时长"
},
{
"key": "forward_ms",
"value": "10000",
"description": "后续录制时长"
}
]
}
},
"response": []
},
{
"name": "设置录像速度(setRecordSpeed)",
"request": {