Appearance
视频补帧
请求地址
POST 方法:/api/video/rife
请求参数
参数名 | 类型 | 必填 | 说明 |
---|---|---|---|
content | string | 是 | 输入路径,视频文件或文件夹 |
target | int | 是 | 目标帧率,示例 30/60/90/120/240/360/720 |
max_pool | int | 是 | 最大并发数,示例:4 |
示例代码
python
import requests
url = 'http://127.0.0.1:5699/api/video/rife'
data = {
'content': '/path/to/video.mp4',
'target': 60,
'max_pool': 4
}
r = requests.post(url, data=data)
print(r.json())
import requests
url = 'http://127.0.0.1:5699/api/video/rife'
data = {
'content': '/path/to/video.mp4',
'target': 60,
'max_pool': 4
}
r = requests.post(url, data=data)
print(r.json())
js
let formData = new FormData();
formData.append("content", "/path/to/video.mp4");
formData.append("target", 60);
formData.append("max_pool", 4);
fetch("http://127.0.0.1:5699/api/video/rife", {
method: "POST",
body: formData,
})
.then((response) => response.json())
.then((data) => {
console.log(data);
});
let formData = new FormData();
formData.append("content", "/path/to/video.mp4");
formData.append("target", 60);
formData.append("max_pool", 4);
fetch("http://127.0.0.1:5699/api/video/rife", {
method: "POST",
body: formData,
})
.then((response) => response.json())
.then((data) => {
console.log(data);
});
bash
curl -X POST -F 'content=@/path/to/video.mp4' -F 'target=60' -F 'max_pool=4' http://127.0.0.1:5699/api/video/rife
curl -X POST -F 'content=@/path/to/video.mp4' -F 'target=60' -F 'max_pool=4' http://127.0.0.1:5699/api/video/rife
响应结果
json
{ "status": "success", "msg": "ok" }
{ "status": "success", "msg": "ok" }