mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "添加纯色条以适应目标宽高比。"
|
||||
i18n_source_hash: b8e17dffc341
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: d73866ab6253
|
||||
---
|
||||
|
||||
# Aspect Pad {#aspect-pad}
|
||||
|
||||
添加纯色的信箱或邮筒式条框,使视频在不裁剪的情况下适应目标宽高比。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/aspect-pad`
|
||||
|
||||
接受包含一个视频文件和一个 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| target | string | No | `"9:16"` | 目标宽高比:`16:9`、`9:16`、`1:1`、`4:3`、`3:4` |
|
||||
| color | string | No | `"#000000"` | 填充条的十六进制颜色(例如 `"#000000"` 表示黑色) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/aspect-pad \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"target": "1:1", "color": "#ffffff"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 13200000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 如果视频已经匹配目标宽高比,则文件将原样返回。
|
||||
- 竖屏/纵向社交媒体格式(TikTok、Reels、Shorts)请使用 `9:16`。
|
||||
- 若要使用模糊填充而不是纯色,请使用 Blur Pad 工具。
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "使用 AI 从视频音轨生成字幕文件。"
|
||||
i18n_source_hash: 35b1e78501ad
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 7487846234fe
|
||||
---
|
||||
|
||||
# Auto Subtitles {#auto-subtitles}
|
||||
|
||||
使用 AI 驱动的语音识别(faster-whisper)从视频的音轨生成字幕文件。支持自动检测和 10 种显式指定的语言。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/auto-subtitles`
|
||||
|
||||
接受包含一个视频文件和一个 JSON `settings` 字段的 multipart 表单数据。这是一个异步端点,它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| language | string | No | `"auto"` | 语音语言:`auto`、`en`、`de`、`fr`、`es`、`zh`、`ja`、`ko`、`id`、`th`、`vi` |
|
||||
| format | string | No | `"srt"` | 输出字幕格式:`srt`、`vtt` |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/auto-subtitles \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"language": "en", "format": "srt"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 这是一个 AI 工具,需要安装 **transcription** 功能包。如果未安装该功能包,API 将返回 `501 Feature Not Installed`,并附带通过管理界面安装它的说明。
|
||||
- `auto` 语言选项使用 whisper 内置的语言检测。显式指定语言可提高准确性和速度。
|
||||
- SRT 是支持最广泛的字幕格式。VTT(WebVTT)是网页视频播放器的标准格式。
|
||||
- 在作业完成之前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 获取进度更新。
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "用视频的模糊副本填充条框。"
|
||||
i18n_source_hash: 0c72aaefc6de
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 6ecab728c928
|
||||
---
|
||||
|
||||
# Blur Pad {#blur-pad}
|
||||
|
||||
通过用视频的模糊、缩放副本填充填充区域(而不是纯色条框),使视频适应目标宽高比。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/blur-pad`
|
||||
|
||||
接受包含一个视频文件和一个 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| target | string | No | `"16:9"` | 目标宽高比:`16:9`、`9:16`、`1:1`、`4:3`、`3:4` |
|
||||
| blur | number | No | `20` | 背景的高斯模糊 sigma(2-50) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/blur-pad \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"target": "16:9", "blur": 30}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 14100000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 模糊值越高,背景越柔和、越抽象。值越低,保留的细节越多。
|
||||
- 如果视频已经匹配目标宽高比,则文件将原样返回。
|
||||
- 若要使用纯色填充,请改用 Aspect Pad 工具。
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
description: "将字幕永久渲染到视频画面上。"
|
||||
i18n_source_hash: 2d3111589db0
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 55fe2195ffc4
|
||||
---
|
||||
|
||||
# Burn Subtitles {#burn-subtitles}
|
||||
|
||||
将 SRT、VTT 或 ASS 文件中的字幕永久渲染(硬编码)到视频的每一帧画面上。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/burn-subtitles`
|
||||
|
||||
接受包含视频文件和字幕文件的 multipart 表单数据。这是一个异步端点:它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| fontSize | integer | No | `24` | 字幕字号,单位为像素(8-72) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/burn-subtitles \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F "file=@subtitles.srt" \
|
||||
-F 'settings={"fontSize": 28}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 上传两个文件:第一个必须是视频,第二个必须是字幕文件(.srt、.vtt 或 .ass)。
|
||||
- 烧录的字幕会永久成为视频的一部分,观看者无法关闭。若需要可切换的字幕,请改用 Embed Subtitles 工具。
|
||||
- 在任务完成前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处获取进度更新。
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "更改视频的帧率。"
|
||||
i18n_source_hash: 2bffbd04a1cb
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 6b4462cd3b90
|
||||
---
|
||||
|
||||
# Change FPS {#change-fps}
|
||||
|
||||
将视频的帧率更改为 1 到 120 fps 之间的目标值。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/change-fps`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| fps | number | No | `30` | 目标帧率(1-120) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/change-fps \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"fps": 24}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 10200000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 降低帧率会丢弃帧并减小文件大小。提高帧率会复制帧以填补空缺,但不会增加真实的运动细节。
|
||||
- 常用目标值:24(电影)、30(网络/广播)、60(流畅播放)。
|
||||
- 音轨会按其原始采样率保留。
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
description: "通过质量控制减小视频文件大小。"
|
||||
i18n_source_hash: 9cc1f1acf74e
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 361abadd94fa
|
||||
---
|
||||
|
||||
# Compress Video {#compress-video}
|
||||
|
||||
使用可配置的压缩强度和可选的分辨率降采样来减小视频文件大小。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/compress-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。这是一个异步端点:它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| quality | string | No | `"balanced"` | 压缩强度:`light`、`balanced`、`strong` |
|
||||
| resolution | string | No | `"original"` | 输出分辨率:`original`、`1080p`、`720p`、`480p` |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/compress-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"quality": "strong", "resolution": "720p"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- `light` 预设可保留接近原始的质量。`strong` 预设以牺牲视觉保真度为代价,激进地减小文件大小。
|
||||
- 降低分辨率(例如从 4K 降到 720p)与压缩叠加,可显著减小文件大小。
|
||||
- 在任务完成前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处获取进度更新。
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
description: "在 MP4、MOV、WebM、AVI 和 MKV 之间转换视频。"
|
||||
i18n_source_hash: 8f9e6418b1c6
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 67bec3789b19
|
||||
---
|
||||
|
||||
# Convert Video {#convert-video}
|
||||
|
||||
在 MP4、MOV、WebM、AVI 和 MKV 格式之间转换视频,并可配置质量预设。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/convert-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。这是一个异步端点:它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | No | `"mp4"` | 输出格式:`mp4`、`mov`、`webm`、`avi`、`mkv` |
|
||||
| quality | string | No | `"balanced"` | 质量预设:`high`、`balanced`、`small` |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/convert-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"format": "webm", "quality": "balanced"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- `high` 质量预设可获得最佳视觉保真度,但文件较大。`small` 预设会激进压缩以获得最小文件大小。
|
||||
- WebM 输出使用 VP9 编码。MP4 和 MOV 使用 H.264。AVI 和 MKV 可用于传统或归档工作流。
|
||||
- 在任务完成前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处获取进度更新。
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
description: "从视频中裁剪出一个区域。"
|
||||
i18n_source_hash: fab11f71a202
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 5c0d802b3666
|
||||
---
|
||||
|
||||
# Crop Video {#crop-video}
|
||||
|
||||
通过指定区域的尺寸和位置,从视频中裁剪出一个矩形区域。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/crop-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| width | integer | Yes | - | 裁剪区域宽度,单位为像素(最小 16) |
|
||||
| height | integer | Yes | - | 裁剪区域高度,单位为像素(最小 16) |
|
||||
| x | integer | No | `0` | 相对于左上角的水平偏移 |
|
||||
| y | integer | No | `0` | 相对于左上角的垂直偏移 |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/crop-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"width": 640, "height": 480, "x": 100, "y": 50}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 5200000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 裁剪区域必须位于视频尺寸范围内。如果 `x + width` 或 `y + height` 超出源尺寸,请求将返回 400 错误。
|
||||
- 最小裁剪尺寸为 16x16 像素。
|
||||
- 根据大多数视频编解码器的要求,尺寸会被舍入为偶数。
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "将字幕轨道复用(mux)进视频容器。"
|
||||
i18n_source_hash: be272730fff5
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 9d1245067173
|
||||
---
|
||||
|
||||
# Embed Subtitles {#embed-subtitles}
|
||||
|
||||
将字幕文件复用(mux)进视频容器,作为观看者可自行开启或关闭的软字幕轨道。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/embed-subtitles`
|
||||
|
||||
接受包含视频文件、字幕文件以及 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| language | string | No | `"eng"` | ISO 639-2/B 语言代码(3 个小写字母,例如 `"eng"`、`"fra"`、`"deu"`) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/embed-subtitles \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F "file=@subtitles.srt" \
|
||||
-F 'settings={"language": "fra"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12520000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 上传两个文件:第一个必须是视频,第二个必须是字幕文件(.srt、.vtt 或 .ass)。
|
||||
- 内嵌的(软)字幕可由观看者在其媒体播放器中切换。若需要永久可见的字幕,请改用 Burn Subtitles 工具。
|
||||
- 语言代码以元数据形式存储在容器中,有助于媒体播放器为字幕轨道标注标签。
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "从视频中提取音轨。"
|
||||
i18n_source_hash: f5b8330a5f89
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 9529adf6332c
|
||||
---
|
||||
|
||||
# Extract Audio {#extract-audio}
|
||||
|
||||
从视频文件中提取音轨,并保存为 MP3、WAV、M4A 或 OGG。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/extract-audio`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | No | `"mp3"` | 输出音频格式:`mp3`、`wav`、`m4a`、`ogg` |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/extract-audio \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"format": "mp3"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp3",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 3200000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 如果视频没有音轨,请求将返回 400 错误。
|
||||
- MP3 是有损格式,但兼容性广泛。WAV 是无损格式,但体积大。M4A(AAC)在质量与大小之间取得良好平衡。OGG 可用于开放编解码器工作流。
|
||||
- 当源音频已是 AAC 且输出格式为 M4A 时,音频流会被直接复制而不重新编码。
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
description: "将视频中的字幕轨道提取为 SRT 文件。"
|
||||
i18n_source_hash: 48db860f6676
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 53e76c0a839c
|
||||
---
|
||||
|
||||
# Extract Subtitles {#extract-subtitles}
|
||||
|
||||
从视频容器中提取内嵌的字幕轨道,并将其下载为 SRT 文件。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/extract-subtitles`
|
||||
|
||||
接受包含视频文件的 multipart 表单数据。此工具没有可配置的设置。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有参数。它会提取视频容器中找到的第一个字幕轨道。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/extract-subtitles \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.srt",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 4500
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 视频必须包含内嵌的字幕轨道。如果未找到字幕轨道,请求将返回 400 错误。
|
||||
- 如果视频包含多个字幕轨道,则提取第一个。
|
||||
- 无论容器中原始字幕格式如何,输出格式均为 SRT。
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "将动画 GIF 转换为 MP4、WebM 或 MOV 视频。"
|
||||
i18n_source_hash: c3737b31146d
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 6ca9b1d058c3
|
||||
---
|
||||
|
||||
# GIF to Video {#gif-to-video}
|
||||
|
||||
将动画 GIF 转换为紧凑的 MP4、WebM 或 MOV 视频文件。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/gif-to-video`
|
||||
|
||||
接受包含 GIF 文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| format | string | No | `"mp4"` | 输出格式:`mp4`、`webm`、`mov` |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/gif-to-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@animation.gif" \
|
||||
-F 'settings={"format": "mp4"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/animation.mp4",
|
||||
"originalSize": 8500000,
|
||||
"processedSize": 950000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 将 GIF 转换为视频通常可在保持相同视觉质量的同时将文件大小减小 80-90%。
|
||||
- 仅接受动画 GIF 文件。静态图像应使用图像 Convert 工具。
|
||||
- MP4 和 MOV 使用 H.264 编码,WebM 使用 VP9。
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
description: "将一组图像制作成幻灯片视频。"
|
||||
i18n_source_hash: 2c6f183feb6d
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 19a2be9d6a78
|
||||
---
|
||||
|
||||
# Images to Video {#images-to-video}
|
||||
|
||||
将一组图像制作成幻灯片视频,并可配置每张图像的显示时长、分辨率和帧率。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/images-to-video`
|
||||
|
||||
接受包含两个或更多图像文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| secondsPerImage | number | No | `2` | 每张图像的显示时长,单位为秒(0.5-10) |
|
||||
| resolution | string | No | `"720p"` | 输出分辨率:`1080p`、`720p`、`square` |
|
||||
| fps | integer | No | `30` | 输出帧率(10-60) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/images-to-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@slide1.jpg" \
|
||||
-F "file=@slide2.jpg" \
|
||||
-F "file=@slide3.jpg" \
|
||||
-F "file=@slide4.jpg" \
|
||||
-F 'settings={"secondsPerImage": 3, "resolution": "1080p"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/slideshow.mp4",
|
||||
"originalSize": 3500000,
|
||||
"processedSize": 1200000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 每次请求接受 2-60 个图像文件。图像按上传顺序出现在视频中。
|
||||
- 图像会被缩放并填充以适应目标分辨率,同时保持宽高比。
|
||||
- `square` 分辨率选项会生成 1080x1080 的视频,适用于社交媒体。
|
||||
- 输出格式始终为 MP4(H.264)。
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "将多个视频片段合并为一个文件。"
|
||||
i18n_source_hash: 90463dfbb580
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 3ee706e3e2c9
|
||||
---
|
||||
|
||||
# Merge Videos {#merge-videos}
|
||||
|
||||
将多个视频片段合并为单个 MP4 文件。所有输入都会归一化为第一个视频的分辨率和 30 fps。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/merge-videos`
|
||||
|
||||
接受包含两个或更多视频文件的 multipart 表单数据。这是一个异步端点:它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有设置参数。上传 2-10 个视频文件作为多个 `file` 部分。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/merge-videos \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@intro.mp4" \
|
||||
-F "file=@main.mp4" \
|
||||
-F "file=@outro.mp4"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 片段按上传顺序拼接。
|
||||
- 所有片段都会重新编码以匹配第一个片段的分辨率、帧率(30 fps)和编解码器(H.264)。不匹配的输入会自动归一化。
|
||||
- 每次请求接受 2-10 个视频文件。
|
||||
- 在任务完成前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处获取进度更新。
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
description: "从视频中移除音轨。"
|
||||
i18n_source_hash: 9a0c60bbcaa3
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: bd8745f68463
|
||||
---
|
||||
|
||||
# Mute Video {#mute-video}
|
||||
|
||||
从视频中移除音轨,仅保留视觉流。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/mute-video`
|
||||
|
||||
接受包含视频文件的 multipart 表单数据。此工具没有可配置的设置。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有参数。它会从上传的视频中剥离音轨。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/mute-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 8900000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 视频流会被直接复制而不重新编码,因此没有质量损失。
|
||||
- 如果输入视频没有音轨,文件将原样返回。
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "用另一个文件替换视频的音轨。"
|
||||
i18n_source_hash: fabc2a953103
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: a37f3fa77f2b
|
||||
---
|
||||
|
||||
# Replace Audio {#replace-audio}
|
||||
|
||||
用音频文件替换视频的音轨。同时上传一个视频和一个音频文件。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/replace-audio`
|
||||
|
||||
接受恰好包含两个文件的 multipart 表单数据:先是视频文件,然后是音频文件。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有设置参数。上传一个视频文件和一个音频文件,作为两个 `file` 部分。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/replace-audio \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F "file=@voiceover.mp3"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 13100000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 必须恰好上传两个文件:第一个必须是视频,第二个必须是音频文件。
|
||||
- 如果音频文件比视频长,它会被裁剪以匹配视频时长。如果较短,视频剩余部分将静音播放。
|
||||
- 视频流会被直接复制而不重新编码,因此没有视频质量损失。
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
description: "将视频缩放到新的分辨率或预设尺寸。"
|
||||
i18n_source_hash: bb1f67871fea
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 686f8a6eaf6c
|
||||
---
|
||||
|
||||
# Resize Video {#resize-video}
|
||||
|
||||
使用自定义像素尺寸或标准预设将视频缩放到新的分辨率。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/resize-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| width | integer | No | - | 目标宽度,单位为像素(16-7680) |
|
||||
| height | integer | No | - | 目标高度,单位为像素(16-4320) |
|
||||
| preset | string | No | `"custom"` | 分辨率预设:`custom`、`2160p`、`1440p`、`1080p`、`720p`、`480p`、`360p` |
|
||||
|
||||
当 `preset` 为 `"custom"` 时,必须至少提供 `width` 或 `height` 之一。另一个维度会按比例缩放。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/resize-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"preset": "720p"}'
|
||||
```
|
||||
|
||||
缩放到自定义尺寸:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/resize-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"width": 1280, "height": 720}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 25000000,
|
||||
"processedSize": 8500000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 预设值映射到标准高度(例如 `720p` = 1280x720,`1080p` = 1920x1080)。宽度会根据源宽高比按比例缩放。
|
||||
- 根据大多数视频编解码器的要求,尺寸会被舍入为偶数。
|
||||
- 支持的最大分辨率为 7680x4320(8K UHD)。
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
description: "倒放视频片段。"
|
||||
i18n_source_hash: 98226f4e092d
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 5ab5e17aa139
|
||||
---
|
||||
|
||||
# Reverse Video {#reverse-video}
|
||||
|
||||
倒放视频片段。音轨也会被反转。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/reverse-video`
|
||||
|
||||
接受包含视频文件的 multipart 表单数据。此工具没有可配置的设置。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有参数。它会反转整个视频。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/reverse-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12600000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 限制为最长 5 分钟的片段。较长的视频会被拒绝并返回 400 错误。
|
||||
- 视频轨道和音轨都会被反转。若要在不含音频的情况下反转视频,请先将其静音。
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
description: "旋转或翻转视频。"
|
||||
i18n_source_hash: cf9620ca62c7
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 13f01d85fafe
|
||||
---
|
||||
|
||||
# Rotate Video {#rotate-video}
|
||||
|
||||
将视频旋转 90、180 或 270 度,或水平/垂直翻转。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/rotate-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| transform | string | Yes | - | 要应用的变换:`cw90`、`ccw90`、`180`、`hflip`、`vflip` |
|
||||
|
||||
### Transform Values {#transform-values}
|
||||
|
||||
- **cw90** - 顺时针旋转 90 度
|
||||
- **ccw90** - 逆时针旋转 90 度
|
||||
- **180** - 旋转 180 度
|
||||
- **hflip** - 水平翻转(镜像)
|
||||
- **vflip** - 垂直翻转
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/rotate-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"transform": "cw90"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12400000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 旋转 90 或 270 度会交换视频的宽度和高度。
|
||||
- 翻转操作(hflip、vflip)不会改变视频尺寸。
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
description: "通过双通道稳定处理减少画面抖动。"
|
||||
i18n_source_hash: ec908e91a752
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 546a198fbb78
|
||||
---
|
||||
|
||||
# Stabilize Video {#stabilize-video}
|
||||
|
||||
使用 FFmpeg 的双通道 vidstab 稳定处理来减少手持拍摄画面中的抖动。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/stabilize-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。这是一个异步端点:它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| smoothing | integer | No | `15` | 平滑窗口大小,单位为帧(5-60)。数值越高,运动越平滑 |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/stabilize-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"smoothing": 30}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 稳定处理是双通道过程:第一通道分析画面运动,第二通道应用校正。这大约需要单通道工具两倍的时间。
|
||||
- 更高的平滑值可去除更多抖动,但可能在边缘引入轻微的缩放裁切。
|
||||
- 在任务完成前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处获取进度更新。
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
description: "通过指定起止时间从视频中剪出片段。"
|
||||
i18n_source_hash: c84481641979
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: e845514289a2
|
||||
---
|
||||
|
||||
# Trim Video {#trim-video}
|
||||
|
||||
通过以秒为单位指定起止时间,从视频中剪出片段,并可选择帧精确剪辑。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/trim-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| startS | number | No | `0` | 起始时间,单位为秒(必须 >= 0) |
|
||||
| endS | number | Yes | - | 结束时间,单位为秒(必须晚于 startS) |
|
||||
| precise | boolean | No | `false` | 重新编码以实现帧精确剪辑,而非关键帧定位 |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/trim-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"startS": 5, "endS": 30, "precise": true}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 4200000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 当 `precise` 为 `false`(默认)时,工具使用关键帧定位,速度快,但可能在所请求时间之前几帧开始。
|
||||
- 将 `precise` 设置为 `true` 会重新编码该片段以获得精确的帧边界,但耗时更长。
|
||||
- `endS` 值必须大于 `startS`。
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
description: "调整视频的亮度、对比度、饱和度和伽马。"
|
||||
i18n_source_hash: 40483b79d44b
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 3adaee4befd8
|
||||
---
|
||||
|
||||
# Video Color {#video-color}
|
||||
|
||||
调整视频的亮度、对比度、饱和度和伽马校正。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-color`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| brightness | number | No | `0` | 亮度调整(-1 到 1) |
|
||||
| contrast | number | No | `1` | 对比度倍数(0-4) |
|
||||
| saturation | number | No | `1` | 饱和度倍数(0-3)。设为 0 表示灰度 |
|
||||
| gamma | number | No | `1` | 伽马校正(0.1-10) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-color \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"brightness": 0.1, "contrast": 1.2, "saturation": 1.5}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12300000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 所有值都为默认值(亮度 0,对比度 1,饱和度 1,伽马 1)时不会产生任何变化。
|
||||
- 将饱和度设置为 `0` 会将视频转换为灰度。
|
||||
- 伽马值低于 1 会提亮阴影,高于 1 会加深阴影。
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
description: "将视频音频音量归一化到广播标准。"
|
||||
i18n_source_hash: 078f1e819c9a
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 3523e302d9c6
|
||||
---
|
||||
|
||||
# Normalize Audio {#normalize-audio}
|
||||
|
||||
将视频音频音量归一化到 EBU R128 广播响度标准。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-loudnorm`
|
||||
|
||||
接受包含视频文件的 multipart 表单数据。此工具没有可配置的设置。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有参数。它会对音轨应用 EBU R128 响度归一化。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-loudnorm \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12500000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 使用 FFmpeg 的 `loudnorm` 滤镜,目标为 -16 LUFS 综合响度、-1.5 dBTP 真峰值和 11 LU 响度范围(EBU R128 广播标准)。
|
||||
- 源音频采样率会在输出中保留。
|
||||
- 如果视频没有音轨,请求将返回 400 错误。
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
description: "从视频中剥离元数据并报告发现的内容。"
|
||||
i18n_source_hash: 69621bfb98ca
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: c93ff604aaa7
|
||||
---
|
||||
|
||||
# Clean Video Metadata {#clean-video-metadata}
|
||||
|
||||
从视频中剥离元数据(创建日期、GPS 坐标、相机型号、软件标记等)并报告已移除的内容。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-metadata`
|
||||
|
||||
接受包含视频文件的 multipart 表单数据。此工具没有可配置的设置。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具没有参数。它会从视频容器中剥离所有元数据。
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-metadata \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4"
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip_clean.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12480000,
|
||||
"metadata": {
|
||||
"container": "mov,mp4,m4a,3gp,3g2,mj2",
|
||||
"durationS": 42.5,
|
||||
"bitrateKbps": 2350,
|
||||
"streams": [
|
||||
{ "type": "video", "codec": "h264", "width": 1920, "height": 1080 },
|
||||
{ "type": "audio", "codec": "aac", "sampleRate": 48000 }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 被剥离的元数据包括创建时间戳、GPS/位置数据、相机/设备信息和软件标记。
|
||||
- 视频流和音频流会被直接复制而不重新编码,因此没有质量损失。
|
||||
- 在公开分享视频前有助于保护隐私。
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "加快或放慢视频速度。"
|
||||
i18n_source_hash: 98dfc75c0507
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: dbdc2ed96092
|
||||
---
|
||||
|
||||
# Video Speed {#video-speed}
|
||||
|
||||
加快或放慢视频速度,并可选择保留音频音调。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-speed`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| factor | number | No | `2` | 速度倍数(0.25-4)。大于 1 加速,小于 1 减速 |
|
||||
| keepPitch | boolean | No | `true` | 改变速度时保留音频音调 |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-speed \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"factor": 0.5, "keepPitch": true}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 24800000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- `2` 的倍数会使播放速度加倍(时长减半)。`0.5` 的倍数会使播放速度减半(时长加倍)。
|
||||
- 当 `keepPitch` 为 `true` 时,音频会被时间拉伸,使人声听起来自然。当为 `false` 时,音调会随速度成比例变化。
|
||||
- 有效范围为 0.25x 到 4x。
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
description: "将视频中的帧提取为图像 ZIP 包。"
|
||||
i18n_source_hash: b06f038dafb3
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 940e8089bda5
|
||||
---
|
||||
|
||||
# Video to Frames {#video-to-frames}
|
||||
|
||||
从视频中提取单独的帧,并将其下载为包含 PNG 或 JPG 图像的 ZIP 归档。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-to-frames`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| mode | string | No | `"all"` | 提取模式:`all`、`nth`、`timestamps` |
|
||||
| n | integer | No | `10` | 每隔第 N 帧提取一次(2-1000)。仅当 mode 为 `"nth"` 时使用 |
|
||||
| timestamps | string | No | `""` | 以逗号分隔的时间戳,单位为秒。当 mode 为 `"timestamps"` 时必填 |
|
||||
| format | string | No | `"png"` | 提取帧的图像格式:`png`、`jpg` |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
每隔第 30 帧提取一次,格式为 JPG:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-to-frames \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"mode": "nth", "n": 30, "format": "jpg"}'
|
||||
```
|
||||
|
||||
在特定时间戳处提取帧:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-to-frames \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"mode": "timestamps", "timestamps": "1.5,5,12.3"}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip-frames.zip",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 45000000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- `all` 模式会提取每一帧,对于长视频可能生成非常大的 ZIP 文件。请使用 `nth` 或 `timestamps` 模式进行选择性提取。
|
||||
- PNG 保留完整质量,但生成的文件较大。JPG 更小,但为有损格式。
|
||||
- 响应会下载为包含按顺序编号的图像文件的 ZIP 归档。
|
||||
@@ -0,0 +1,49 @@
|
||||
---
|
||||
description: "将视频片段转换为动画 GIF。"
|
||||
i18n_source_hash: f729dde8cd55
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 1f4d73d93ecc
|
||||
---
|
||||
|
||||
# Video to GIF {#video-to-gif}
|
||||
|
||||
将视频片段转换为动画 GIF,并可配置帧率、宽度、起始时间和时长。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-to-gif`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。这是一个异步端点:它会立即返回 `202 Accepted`,进度通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处流式传输。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| fps | integer | No | `12` | 输出帧率(1-30) |
|
||||
| width | integer | No | `480` | 输出宽度,单位为像素(64-1280)。高度按比例缩放 |
|
||||
| startS | number | No | `0` | 起始时间,单位为秒(必须 >= 0) |
|
||||
| durationS | number | No | `5` | 时长,单位为秒(大于 0,最大 60) |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-to-gif \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"fps": 15, "width": 320, "startS": 2, "durationS": 8}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 较低的 `fps` 和 `width` 值会生成更小的 GIF 文件。480px 宽、12 fps 的 GIF 通常是不错的平衡。
|
||||
- 最长时长为 60 秒。更长的片段会生成非常大的文件。
|
||||
- 在任务完成前,可通过 SSE 在 `GET /api/v1/jobs/{jobId}/progress` 处获取进度更新。
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
description: "将视频片段转换为动画 WebP 图像。"
|
||||
i18n_source_hash: 7b1a22459bd1
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 94fe44796987
|
||||
---
|
||||
|
||||
# Video to WebP {#video-to-webp}
|
||||
|
||||
将视频片段转换为动画 WebP 图像,并可配置帧率、宽度和质量。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-to-webp`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| fps | integer | No | `12` | 输出帧率(1-30) |
|
||||
| width | integer | No | `480` | 输出宽度,单位为像素(16-1920)。高度按比例缩放 |
|
||||
| quality | integer | No | `75` | WebP 压缩质量(1-100) |
|
||||
| loop | boolean | No | `true` | 循环播放动画 |
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/video-to-webp \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"fps": 15, "width": 640, "quality": 80}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.webp",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 2800000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 动画 WebP 生成的文件比 GIF 更小,且色彩支持更好(24 位对比 8 位调色板)。
|
||||
- 较低的 `quality` 值会以牺牲视觉保真度为代价生成更小的文件。
|
||||
- 对于应播放一次即停止的动画,将 `loop` 设置为 `false`。
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
description: "将文本水印烧录到视频画面上。"
|
||||
i18n_source_hash: 937bb075b894
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: f1708b74c3f6
|
||||
---
|
||||
|
||||
# Watermark Video {#watermark-video}
|
||||
|
||||
将文本水印烧录到视频的每一帧画面上,并可配置位置、大小、不透明度和颜色。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/watermark-video`
|
||||
|
||||
接受包含视频文件和 JSON `settings` 字段的 multipart 表单数据。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| text | string | Yes | - | 水印文本(1-200 个字符) |
|
||||
| position | string | No | `"br"` | 画面上的位置:`tl`、`tc`、`tr`、`l`、`c`、`r`、`bl`、`bc`、`br` |
|
||||
| fontSize | integer | No | `36` | 字号,单位为像素(8-120) |
|
||||
| opacity | number | No | `0.5` | 水印不透明度(0.05-1) |
|
||||
| color | string | No | `"#ffffff"` | 文本的十六进制颜色(例如 `"#ffffff"`) |
|
||||
|
||||
### Position Values {#position-values}
|
||||
|
||||
- **tl** - 左上,**tc** - 顶部居中,**tr** - 右上
|
||||
- **l** - 左中,**c** - 居中,**r** - 右中
|
||||
- **bl** - 左下,**bc** - 底部居中,**br** - 右下
|
||||
|
||||
## Example Request {#example-request}
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:1349/api/v1/tools/video/watermark-video \
|
||||
-H "Authorization: Bearer si_your-api-key" \
|
||||
-F "file=@clip.mp4" \
|
||||
-F 'settings={"text": "PREVIEW", "position": "c", "fontSize": 48, "opacity": 0.3}'
|
||||
```
|
||||
|
||||
## Example Response {#example-response}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 12400000
|
||||
}
|
||||
```
|
||||
|
||||
## Notes {#notes}
|
||||
|
||||
- 水印会永久渲染进视频画面,处理后无法移除。
|
||||
- 水印使用 FFmpeg 内置的无衬线字体。
|
||||
- 对于图像水印,请改用图像 Watermark 工具。
|
||||
Reference in New Issue
Block a user