Video & Audio
Trim Video
trim-video
Use Trim Video through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · HeadlessI · Interactive
Schnellzugriff
Eingabedateien 1Ausgabedateien 1
Eingabe
Zulässige Eingabeformate und Dateianzahl für dieses Tool.
| Eingabetyp | file |
|---|---|
| Dateianzahl | 1 – 1 |
| Zulässige MIME-Typen | video/mp4, video/webm, video/quicktime |
Parameter
Diese Werte über request.options übergeben.
| Parameter | Typ | Erforderlich | Standard | Zulässig / Bereich | Beschreibung |
|---|---|---|---|---|---|
start |
number | Optional | 0 |
0 – ∞ | Trim start time in seconds. |
end |
number | Optional | 0 |
0 – ∞ | Trim end time in seconds. 0 means the end of the video. |
mode |
enum | Optional | fast |
fast | exact | fast copies original streams; exact re-encodes for more precise cut points. |
Ausgabe
Nach erfolgreicher Verarbeitung zurückgegebenes Ergebnisformat.
| Typ | files |
|---|---|
| Dateianzahl | 1 – 1 |
| Ausgabe-MIME | video/mp4, video/webm, video/quicktime |
| Metadata | duration, selection, width, height, inputBytes, outputBytes, outputCount |
| ZIP-Archiv | Nicht unterstützt |
Grundlegende Verwendung
Unterstützten Integrationsmodus wählen und den erzeugten Starter-Code kopieren.
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.