Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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;
transition?: {
fade_in?: Timestamp;
fade_out?: Timestamp;
}
;
trim?: {
start?: "fit" | Timestamp;
end?: "fit" | Timestamp;
stop?: Timestamp;
stop_at_output?: Timestamp;
}
;
zoompan?: {
[timestamp: string]: {
zoom?: Percentage;
}
;
}
;
}

§Properties

§
crop?: {
left?: Percentage | Pixels;
right?: Percentage | Pixels;
top?: Percentage | Pixels;
bottom?: Percentage | Pixels;
}
[src]

Crop will trim edges of a clip accordingly. layout alignment will respect the crop

§
duration?: Timestamp
[src]

Specify the length of a clip exactly

§
framerate?: {
fps: number;
smooth?: boolean;
}
[src]

Set the framerate for the clip

§

Defaults to CLIP_

§
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;
}
[src]

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

§
rotate?: Degrees
[src]
§

Increase or decrease the playback speed

§
transition?: {
fade_in?: Timestamp;
fade_out?: Timestamp;
}
[src]

Effect to transition a clip in or out of the page

§
trim?: {
start?: "fit" | Timestamp;
end?: "fit" | Timestamp;
stop?: Timestamp;
stop_at_output?: Timestamp;
}
[src]

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?: {
[timestamp: string]: {
zoom?: Percentage;
}
;
}
[src]

Zoom and pan a clip