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

2.0 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
開始時刻と終了時刻を指定して動画からクリップを切り出します。 c84481641979 human 14640a0c1434

Trim Video

開始時刻と終了時刻を秒単位で指定して動画からクリップを切り出します。フレーム単位で正確に切り出すオプションもあります。

API Endpoint

POST /api/v1/tools/video/trim-video

動画ファイルと JSON の settings フィールドを含む multipart フォームデータを受け付けます。

Parameters

Parameter Type Required Default Description
startS number No 0 開始時刻(秒単位、0 以上である必要があります)
endS number Yes - 終了時刻(秒単位、startS より後である必要があります)
precise boolean No false キーフレームシークではなく、フレーム単位で正確に切り出すために再エンコードします

Example Request

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

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/clip.mp4",
  "originalSize": 12500000,
  "processedSize": 4200000
}

Notes

  • precisefalse(デフォルト)の場合、ツールはキーフレームシークを使用します。これは高速ですが、要求した時刻より数フレーム前から始まる場合があります。
  • precisetrue に設定すると、正確なフレーム境界のためにセグメントを再エンコードしますが、時間が長くかかります。
  • endS の値は startS より大きい必要があります。