Files
SnapOtter/apps/docs/ja/tools/video/video-to-gif.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

2.0 KiB
Raw Blame History

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
動画クリップをアニメーション GIF に変換します。 f729dde8cd55 human da1c75fa9071

Video to GIF

動画クリップを、フレームレート、幅、開始時刻、再生時間を設定できるアニメーション GIF に変換します。

API Endpoint

POST /api/v1/tools/video/video-to-gif

動画ファイルと JSON の settings フィールドを含む multipart フォームデータを受け付けます。これは非同期エンドポイントで、即座に 202 Accepted を返し、進捗は GET /api/v1/jobs/{jobId}/progress の SSE でストリーミングされます。

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

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

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

Notes

  • fpswidth の値を低くすると、GIF ファイルは小さくなります。幅 480px、12 fps の GIF は通常バランスが良好です。
  • 最大再生時間は 60 秒です。それより長いクリップは非常に大きなファイルを生成します。
  • ジョブが完了するまで、進捗の更新は GET /api/v1/jobs/{jobId}/progress の SSE で確認できます。