Files
SnapOtter/apps/docs/zh-CN/tools/video/stabilize-video.md
T
SnapOtterandGitHub 4963ab3bbd 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.
2026-07-11 13:52:47 +08:00

1.5 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
通过双通道稳定处理减少画面抖动。 ec908e91a752 human 546a198fbb78

Stabilize Video

使用 FFmpeg 的双通道 vidstab 稳定处理来减少手持拍摄画面中的抖动。

API Endpoint

POST /api/v1/tools/video/stabilize-video

接受包含视频文件和 JSON settings 字段的 multipart 表单数据。这是一个异步端点:它会立即返回 202 Accepted,进度通过 SSE 在 GET /api/v1/jobs/{jobId}/progress 处流式传输。

Parameters

Parameter Type Required Default Description
smoothing integer No 15 平滑窗口大小,单位为帧(5-60)。数值越高,运动越平滑

Example Request

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

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "async": true
}

Notes

  • 稳定处理是双通道过程:第一通道分析画面运动,第二通道应用校正。这大约需要单通道工具两倍的时间。
  • 更高的平滑值可去除更多抖动,但可能在边缘引入轻微的缩放裁切。
  • 在任务完成前,可通过 SSE 在 GET /api/v1/jobs/{jobId}/progress 处获取进度更新。