Skip to content

<Clip> ​

A stretch of a video or image asset, trimmed by seconds, transcript words or camera shots, with speed, fit and transform.

tsx
import { Clip, Composition, Track } from "@cutcraft/kit";

export default function Video() {
  return (
    <Composition fps={30} width={960} height={540}>
      <Track id="main">
        {/* Seconds 1 to 3 of the file, then 4 seconds of another played at double speed. */}
        <Clip id="first" src="asset:spiral" in={1} out={3} fit="cover" />
        <Clip id="fast" src="asset:cells" in={0} out={4} speed={2} fit="cover" />
      </Track>
    </Composition>
  );
}

Used in: Product launch · Kinetic type · Data story · An edit · Captions and key points · the walkthrough · Brand spot in any theme · Multicam highlights · Product demo with zoom-ins · Slideshow with motion · Stats with handles · Talking-head cut · Variants from one file · Vertical clip from a podcast

Props ​

proptypedefaultrequireddescription
idstringyesThe element's name: unique in the file, and what anchors, ducking and the editor refer to it by.
startnumber (0..∞)Seconds from the start of the video. Free-layout tracks only; on a sequence track the element follows the one before it.
anchor"start" | stringOverlays: start relative to another element's start, or to its end with id.end.
atstringWith anchor: a word, shot or silence of the anchor's source (word:14655); the start is where the anchor plays it, plus offset.
offsetnumberSeconds added to the start that anchor and at give; negative starts earlier.
durationnumber (> 0) | "fill" | "source" | { match } |How long it plays: seconds; "source" for the whole trimmed source; "fill" to run to the end of the composition; { match: id } for as long as another element; { until: id } to end when another element ends.
srcstringyesThe media, as asset:<id> from the manifest.
innumber (0..∞) | stringWhere in the source it starts: seconds, or a word, shot or silence of its transcript (word:12).
outnumber (0..∞) | stringWhere in the source it ends, as in; word:40.end ends after the word is said.
speednumber (0.1..20)1Playback rate: 2 plays twice as fast and half as long.
reversebooleanfalsePlays the trimmed source backwards.
transformWhere it sits and how it is turned: position, scale, rotation, anchor, opacity, rounded corners and crop.
fit"contain" | "cover" | "stretch" | "none"How it fills the frame: contain shows all of it, cover fills the frame and crops, stretch distorts to fill, none keeps its own size.
blend"normal" | "multiply" | "screen" | "overlay" | "darken" | … 13 moreHow it mixes with what is under it, as CSS mix-blend-mode does.
blendOpacitynumber (0..1)How strongly it blends: multiplied into its opacity.
volumenumber (0..4)A gain: 1 plays the source as it is, 0 mutes it, 2 is twice as loud.
fadeSeconds the sound fades in at the start and out at the end.
automationVolume and pan over time, as [seconds into the element, value] points; pan runs from -1 (left) to 1 (right).
duckTurns this sound down while another plays: under is a track id or a track role (dialogue), to the volume it falls to, attack and release the seconds it takes to fall and recover.
frameReframe to the composition's aspect: the resolver writes transform.crop from the source size and this focus, unless a crop is written.

Timed, visual, audible, trims its source, transformable. Children: effect, keyframe, mask, speedKey, freeze. All elements

MIT licensed.