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: 6e6951cb1cc8
|
||||
---
|
||||
|
||||
# 長寬比填充 {#aspect-pad}
|
||||
|
||||
加上純色的上下黑邊或左右黑邊,讓影片在不裁切的情況下符合目標長寬比。
|
||||
|
||||
## API 端點 {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/aspect-pad`
|
||||
|
||||
接受包含影片檔案與 JSON `settings` 欄位的 multipart 表單資料。
|
||||
|
||||
## 參數 {#parameters}
|
||||
|
||||
| 參數 | 類型 | 必填 | 預設值 | 說明 |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| target | string | 否 | `"9:16"` | 目標長寬比:`16:9`、`9:16`、`1:1`、`4:3`、`3:4` |
|
||||
| color | string | 否 | `"#000000"` | 填充橫條的十六進位色碼(例如 `"#000000"` 代表黑色) |
|
||||
|
||||
## 範例請求 {#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}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 13200000
|
||||
}
|
||||
```
|
||||
|
||||
## 注意事項 {#notes}
|
||||
|
||||
- 若影片已符合目標長寬比,則會原封不動地回傳檔案。
|
||||
- 對於垂直/直向的社群媒體格式(TikTok、Reels、Shorts),請使用 `9:16`。
|
||||
- 若想使用模糊填充而非純色,請使用「模糊填充」工具。
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
description: "使用 AI 從影片音軌產生字幕檔案。"
|
||||
i18n_source_hash: 35b1e78501ad
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 40a2fcb5205c
|
||||
---
|
||||
|
||||
# 自動字幕 {#auto-subtitles}
|
||||
|
||||
使用 AI 驅動的語音辨識(faster-whisper)從影片的音軌產生字幕檔案。支援自動偵測與 10 種明確指定的語言。
|
||||
|
||||
## API 端點 {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/auto-subtitles`
|
||||
|
||||
接受包含影片檔案與 JSON `settings` 欄位的 multipart 表單資料。這是一個非同步端點,它會立即回傳 `202 Accepted`,並透過 SSE 於 `GET /api/v1/jobs/{jobId}/progress` 串流進度。
|
||||
|
||||
## 參數 {#parameters}
|
||||
|
||||
| 參數 | 類型 | 必填 | 預設值 | 說明 |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| language | string | 否 | `"auto"` | 語音語言:`auto`、`en`、`de`、`fr`、`es`、`zh`、`ja`、`ko`、`id`、`th`、`vi` |
|
||||
| format | string | 否 | `"srt"` | 輸出字幕格式:`srt`、`vtt` |
|
||||
|
||||
## 範例請求 {#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}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"async": true
|
||||
}
|
||||
```
|
||||
|
||||
## 注意事項 {#notes}
|
||||
|
||||
- 這是一個需要安裝 **transcription** 功能套件包的 AI 工具。若未安裝該套件包,API 會回傳 `501 Feature Not Installed`,並附上透過管理員 UI 安裝的說明。
|
||||
- `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: 794aee3ed44b
|
||||
---
|
||||
|
||||
# 模糊填充 {#blur-pad}
|
||||
|
||||
以影片經模糊、縮放後的副本填充填充區域,而非純色橫條,讓影片符合目標長寬比。
|
||||
|
||||
## API 端點 {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/blur-pad`
|
||||
|
||||
接受包含影片檔案與 JSON `settings` 欄位的 multipart 表單資料。
|
||||
|
||||
## 參數 {#parameters}
|
||||
|
||||
| 參數 | 類型 | 必填 | 預設值 | 說明 |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| target | string | 否 | `"16:9"` | 目標長寬比:`16:9`、`9:16`、`1:1`、`4:3`、`3:4` |
|
||||
| blur | number | 否 | `20` | 背景的高斯模糊 sigma 值(2-50) |
|
||||
|
||||
## 範例請求 {#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}
|
||||
|
||||
```json
|
||||
{
|
||||
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
||||
"downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
|
||||
"originalSize": 12500000,
|
||||
"processedSize": 14100000
|
||||
}
|
||||
```
|
||||
|
||||
## 注意事項 {#notes}
|
||||
|
||||
- 模糊值越高,背景越柔和、越抽象。數值越低則保留越多細節。
|
||||
- 若影片已符合目標長寬比,則會原封不動地回傳檔案。
|
||||
- 若想使用純色填充,請改用「長寬比填充」工具。
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
description: "將字幕永久燒錄到影片畫面上。"
|
||||
i18n_source_hash: 2d3111589db0
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 98e68c301be3
|
||||
---
|
||||
|
||||
# Burn Subtitles {#burn-subtitles}
|
||||
|
||||
將 SRT、VTT 或 ASS 檔案中的字幕永久渲染(硬編碼)到影片的每一個畫面上。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/burn-subtitles`
|
||||
|
||||
接受包含一個影片檔案和一個字幕檔案的 multipart form data。這是一個非同步端點,它會立即回傳 `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: 19fe422d205e
|
||||
---
|
||||
|
||||
# Change FPS {#change-fps}
|
||||
|
||||
將影片的影格率變更為介於 1 到 120 fps 之間的目標值。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/change-fps`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: d17464ca5f60
|
||||
---
|
||||
|
||||
# Compress Video {#compress-video}
|
||||
|
||||
使用可設定的壓縮強度和選用的解析度縮放,縮小影片檔案大小。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/compress-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。這是一個非同步端點,它會立即回傳 `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: 7d4733c9c797
|
||||
---
|
||||
|
||||
# Convert Video {#convert-video}
|
||||
|
||||
在 MP4、MOV、WebM、AVI 和 MKV 格式之間轉換影片,並可設定品質預設。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/convert-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。這是一個非同步端點,它會立即回傳 `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: ec906499aa1d
|
||||
---
|
||||
|
||||
# Crop Video {#crop-video}
|
||||
|
||||
透過指定區域的大小和位置,從影片中裁切出一個矩形區域。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/crop-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: "將字幕軌混流到影片容器中。"
|
||||
i18n_source_hash: be272730fff5
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 8e0aaddba20c
|
||||
---
|
||||
|
||||
# Embed Subtitles {#embed-subtitles}
|
||||
|
||||
將字幕檔案混流到影片容器中,作為觀看者可自行開啟或關閉的軟字幕軌。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/embed-subtitles`
|
||||
|
||||
接受包含一個影片檔案和一個字幕檔案,以及一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: 83f38576dff2
|
||||
---
|
||||
|
||||
# Extract Audio {#extract-audio}
|
||||
|
||||
從影片檔案中擷取音訊軌,並儲存為 MP3、WAV、M4A 或 OGG。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/extract-audio`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: c6d767bd995c
|
||||
---
|
||||
|
||||
# Extract Subtitles {#extract-subtitles}
|
||||
|
||||
從影片容器中擷取嵌入的字幕軌,並以 SRT 檔案的形式下載。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/extract-subtitles`
|
||||
|
||||
接受包含一個影片檔案的 multipart form data。此工具沒有可設定的選項。
|
||||
|
||||
## 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: bf239f5dfc24
|
||||
---
|
||||
|
||||
# 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 form data。
|
||||
|
||||
## 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: 873816ebcc4e
|
||||
---
|
||||
|
||||
# Images to Video {#images-to-video}
|
||||
|
||||
將一組圖片變成幻燈片影片,並可設定每張圖片的顯示時長、解析度和影格率。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/images-to-video`
|
||||
|
||||
接受包含兩個或以上圖片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: d27fda098d78
|
||||
---
|
||||
|
||||
# Merge Videos {#merge-videos}
|
||||
|
||||
將多個影片片段合併為單一 MP4 檔案。所有輸入都會正規化為第一段影片的解析度和 30 fps。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/merge-videos`
|
||||
|
||||
接受包含兩個或以上影片檔案的 multipart form data。這是一個非同步端點,它會立即回傳 `202 Accepted`,進度則透過 SSE 於 `GET /api/v1/jobs/{jobId}/progress` 串流傳送。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
此工具沒有設定參數。以多個 `file` 部分上傳 2-10 個影片檔案。
|
||||
|
||||
## 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: 6bf2ce5d48c5
|
||||
---
|
||||
|
||||
# Mute Video {#mute-video}
|
||||
|
||||
從影片中移除音訊軌,只保留視覺串流。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/mute-video`
|
||||
|
||||
接受包含一個影片檔案的 multipart form data。此工具沒有可設定的選項。
|
||||
|
||||
## 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: 1ce24d60f423
|
||||
---
|
||||
|
||||
# Replace Audio {#replace-audio}
|
||||
|
||||
用一個音訊檔案替換影片的音訊軌。同時上傳一個影片和一個音訊檔案。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/replace-audio`
|
||||
|
||||
接受包含剛好兩個檔案的 multipart form data:一個影片檔案後接一個音訊檔案。
|
||||
|
||||
## 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: 4f44eb3d05bd
|
||||
---
|
||||
|
||||
# Resize Video {#resize-video}
|
||||
|
||||
使用自訂像素尺寸或標準預設,將影片縮放至新的解析度。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/resize-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: aafd7dd1ba0c
|
||||
---
|
||||
|
||||
# Reverse Video {#reverse-video}
|
||||
|
||||
倒轉播放影片片段。音訊軌也會一併倒轉。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/reverse-video`
|
||||
|
||||
接受包含一個影片檔案的 multipart form data。此工具沒有可設定的選項。
|
||||
|
||||
## 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: 9d645dee841f
|
||||
---
|
||||
|
||||
# Rotate Video {#rotate-video}
|
||||
|
||||
將影片旋轉 90、180 或 270 度,或進行水平或垂直翻轉。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/rotate-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: 93de1e595b71
|
||||
---
|
||||
|
||||
# Stabilize Video {#stabilize-video}
|
||||
|
||||
使用 FFmpeg 的兩階段 vidstab 穩定化,減少手持拍攝畫面的相機晃動。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/stabilize-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。這是一個非同步端點,它會立即回傳 `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: 52b49fa2d4b6
|
||||
---
|
||||
|
||||
# Trim Video {#trim-video}
|
||||
|
||||
透過以秒為單位指定開始和結束時間,從影片中剪出一個片段,並可選擇進行影格精準的剪輯。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/trim-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: "調整影片的亮度、對比度、飽和度和 gamma。"
|
||||
i18n_source_hash: 40483b79d44b
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 3c8006222812
|
||||
---
|
||||
|
||||
# Video Color {#video-color}
|
||||
|
||||
調整影片的亮度、對比度、飽和度和 gamma 校正。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-color`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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` | Gamma 校正(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、gamma 1)不會產生任何變化。
|
||||
- 將飽和度設為 `0` 會將影片轉為灰階。
|
||||
- Gamma 值低於 1 會提亮陰影,高於 1 則會使其變暗。
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
description: "將影片音訊音量正規化為廣播標準。"
|
||||
i18n_source_hash: 078f1e819c9a
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: 6bfd06fe9eb2
|
||||
---
|
||||
|
||||
# Normalize Audio {#normalize-audio}
|
||||
|
||||
將影片音訊音量正規化為 EBU R128 廣播響度標準。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-loudnorm`
|
||||
|
||||
接受包含一個影片檔案的 multipart form data。此工具沒有可設定的選項。
|
||||
|
||||
## 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: 977d877207fb
|
||||
---
|
||||
|
||||
# Clean Video Metadata {#clean-video-metadata}
|
||||
|
||||
從影片中移除中繼資料(建立日期、GPS 座標、相機型號、軟體標籤等),並回報移除了哪些內容。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-metadata`
|
||||
|
||||
接受包含一個影片檔案的 multipart form data。此工具沒有可設定的選項。
|
||||
|
||||
## 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: c4997a201c13
|
||||
---
|
||||
|
||||
# Video Speed {#video-speed}
|
||||
|
||||
加速或減慢影片速度,並可選擇保留音訊音高。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-speed`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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: 29449012b96a
|
||||
---
|
||||
|
||||
# Video to Frames {#video-to-frames}
|
||||
|
||||
從影片中擷取個別影格,並以 PNG 或 JPG 圖片的 ZIP 封存檔形式下載。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-to-frames`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## Parameters {#parameters}
|
||||
|
||||
| Parameter | Type | Required | Default | Description |
|
||||
|-----------|------|----------|---------|-------------|
|
||||
| mode | string | No | `"all"` | 擷取模式:`all`、`nth`、`timestamps` |
|
||||
| n | integer | No | `10` | 每隔 N 個影格擷取一次(2-1000)。僅在模式為 `"nth"` 時使用 |
|
||||
| timestamps | string | No | `""` | 以逗號分隔、以秒為單位的時間戳記。當模式為 `"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: 9566f701d1ec
|
||||
---
|
||||
|
||||
# Video to GIF {#video-to-gif}
|
||||
|
||||
將影片片段轉換為動畫 GIF,並可設定影格率、寬度、開始時間和時長。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-to-gif`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。這是一個非同步端點,它會立即回傳 `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: 89558bda5e15
|
||||
---
|
||||
|
||||
# Video to WebP {#video-to-webp}
|
||||
|
||||
將影片片段轉換為動畫 WebP 圖片,並可設定影格率、寬度和品質。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/video-to-webp`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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 位元 vs 8 位元調色盤)。
|
||||
- 較低的 `quality` 值會產生較小的檔案,代價是視覺保真度。
|
||||
- 對於應只播放一次即停止的動畫,將 `loop` 設為 `false`。
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
description: "將文字浮水印燒錄到影片畫面上。"
|
||||
i18n_source_hash: 937bb075b894
|
||||
i18n_provenance: human
|
||||
i18n_output_hash: c752499f18db
|
||||
---
|
||||
|
||||
# Watermark Video {#watermark-video}
|
||||
|
||||
將文字浮水印燒錄到影片的每一個畫面上,並可設定位置、大小、不透明度和顏色。
|
||||
|
||||
## API Endpoint {#api-endpoint}
|
||||
|
||||
`POST /api/v1/tools/video/watermark-video`
|
||||
|
||||
接受包含一個影片檔案和一個 JSON `settings` 欄位的 multipart form data。
|
||||
|
||||
## 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