Video & Audio
Social-Video-Resizer
resize-video
Use Social Video Resizer through the Zavilo SDK. Check input limits, parameters, output and supported modes below.
H · HeadlessI · Interactive
Schnellzugriff
Eingabedateien 1Ausgabedateien 1–4
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 |
|---|---|---|---|---|---|
targets |
enum[] | Optional | — | — | Social output presets to generate. vertical=1080×1920 (9:16 TikTok/Reels/Shorts), portrait=1080×1350 (4:5 feeds), square=1080×1080 (1:1), landscape=1920×1080 (16:9). Multiple values generate multiple MP4 files. |
layout |
enum | Optional | auto |
auto | fill | fit | blur | How the source fits each target. auto fills when aspect ratios are close and switches to a blurred background for large ratio changes; fill may crop; fit preserves the entire source with padding; blur preserves the entire source over a blurred background. |
cropFocus |
enum | Optional | center |
center | top | bottom | left | right | Crop anchor used by fill/auto when cropping is required. This is a fixed framing anchor, not AI subject tracking. |
quality |
enum | Optional | balanced |
high | balanced | small | Encoding quality preset. high favors visual quality, balanced is the default tradeoff, small favors smaller files. |
keepAudio |
boolean | Optional | true |
— | Keep the original audio track when one is present. false exports silent video. |
width |
integer | Optional | — | 2 – 7680 | Legacy custom-size output width in pixels. Used only when targets is omitted and either width or height is supplied. |
height |
integer | Optional | — | 2 – 4320 | Legacy custom-size output height in pixels. Used only when targets is omitted and either width or height is supplied. |
keepAspectRatio |
boolean | Optional | true |
— | Legacy custom-size behavior. Preserve source aspect ratio inside width/height. Ignored when targets is supplied. |
Ausgabe
Nach erfolgreicher Verarbeitung zurückgegebenes Ergebnisformat.
| Typ | files+data |
|---|---|
| Dateianzahl | 1 – 4 |
| Ausgabe-MIME | video/mp4 |
| Metadata | duration, sourceWidth, sourceHeight, outputCount, inputBytes, outputBytes, targets, layout, quality, keepAudio |
| ZIP-Archiv | Unterstützt · threshold 2 |
Grundlegende Verwendung
Unterstützten Integrationsmodus wählen und den erzeugten Starter-Code kopieren.
Headless
const result = await client.run("resize-video", {
file,
options: { layout: "auto", cropFocus: "center", quality: "balanced" }
});
console.log(result.files, result.data, result.metadata);
Interactive
await client.open({
tool: "resize-video",
input: { file },
options: { layout: "auto", cropFocus: "center", quality: "balanced" },
onComplete(result) { console.log(result.files, result.data, result.metadata); }
});
Embedded
await client.mount({ tool: "resize-video", target: "#zavilo-tool", mode: "embedded" });
This page is generated from the SDK Tool Definition used by the runtime.