動画・音声
Trim Video
trim-video
Use Trim Video through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · HeadlessI · Interactive
クイック操作
入力ファイル 1出力ファイル 1
入力
この Tool が受け付ける入力形式とファイル数です。
| 入力種類 | file |
|---|---|
| ファイル数 | 1 – 1 |
| 対応 MIME | video/mp4, video/webm, video/quicktime |
パラメータ
これらの値は request.options で渡します。
| パラメータ | 型 | 必須 | 既定値 | 許可値 / 範囲 | 説明 |
|---|---|---|---|---|---|
start |
number | 任意 | 0 |
0 – ∞ | Trim start time in seconds. |
end |
number | 任意 | 0 |
0 – ∞ | Trim end time in seconds. 0 means the end of the video. |
mode |
enum | 任意 | fast |
fast | exact | fast copies original streams; exact re-encodes for more precise cut points. |
出力
処理完了後に返される結果形式です。
| 型 | files |
|---|---|
| ファイル数 | 1 – 1 |
| 出力 MIME | video/mp4, video/webm, video/quicktime |
| Metadata | duration, selection, width, height, inputBytes, outputBytes, outputCount |
| ZIP アーカイブ | 非対応 |
基本例
対応する統合モードを確認し、生成された開始コードをコピーできます。
Headless
const result = await client.run("trim-video", {
file,
options: { start: 0, end: 0, mode: "fast" }
});
console.log(result.files, result.data, result.metadata);
Interactive
await client.open({
tool: "trim-video",
input: { file },
options: { start: 0, end: 0, mode: "fast" },
onComplete(result) { console.log(result.files, result.data, result.metadata); }
});
Embedded
await client.mount({ tool: "trim-video", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.