ClipBase
import type { ClipBase } from "https://raw.githubusercontent.com/andykais/ffmpeg-templates/main/lib/template_input.ts";
Shared attributes on all clip types
interface ClipBase {
crop?: {
left?: Percentage | Pixels;
right?: Percentage | Pixels;
top?: Percentage | Pixels;
bottom?: Percentage | Pixels;
};duration?: Timestamp;
framerate?: {
fps: number;
smooth?: boolean;
};id?: ClipID;
layout?: {
x?: Percentage | Pixels | {
offset?: Pixels;
align?: "left" | "right" | "center";
}; y?: Percentage | Pixels | {
offset?: Pixels;
align?: "top" | "bottom" | "center";
}; width?: Percentage | Pixels;
height?: Percentage | Pixels;
};rotate?: Degrees;
speed: Percentage;
trim?: {
start?: "fit" | Timestamp;
end?: "fit" | Timestamp;
stop?: Timestamp;
stop_at_output?: Timestamp;
};zoompan?: {};
}[timestamp: string]: {
zoom?: Percentage;
x?: Percentage | Pixels;
y?: Percentage | Pixels;
}; §Properties
§
crop?: {
[src]left?: Percentage | Pixels;
right?: Percentage | Pixels;
top?: Percentage | Pixels;
bottom?: Percentage | Pixels;
}Crop will trim edges of a clip accordingly. layout alignment will respect the crop
§
layout?: {
[src]x?: Percentage | Pixels | {
offset?: Pixels;
align?: "left" | "right" | "center";
}; y?: Percentage | Pixels | {
offset?: Pixels;
align?: "top" | "bottom" | "center";
}; width?: Percentage | Pixels;
height?: Percentage | Pixels;
}Layout defines the geometry of a clip in the final render. E.g. its size and location X and Y offsets are relative to their alignment, they can be positive or negative. The default alignments for X and Y are 'left' and 'top' respectively
§
speed: Percentage
[src]Increase or decrease the playback speed
§
trim?: {
[src]start?: "fit" | Timestamp;
end?: "fit" | Timestamp;
stop?: Timestamp;
stop_at_output?: Timestamp;
}Trim how long a clip lasts, trimming from either the beginning of a clip, or the end. The special value 'fit' will automatically trim a clip the length of the final render Note that 'end', 'stop', and 'stop_at_output' are mutually exclusive
§
zoompan?: {}
[src][timestamp: string]: {
zoom?: Percentage;
x?: Percentage | Pixels;
y?: Percentage | Pixels;
}; Zoom and pan a clip