Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMar 29, 2026·2 min de lecture

Remotion Rule: Trimming

Remotion skill rule: Trimming patterns for Remotion - cut the beginning or end of animations. Part of the official Remotion Agent Skill for programmatic video in React.

Introduction

Trimming patterns for Remotion - cut the beginning or end of animations. Part of the Remotion AI Skill — the official Agent Skill for programmatic video creation in React.

Best for: Developers using Remotion for trimming Works with: Claude Code, OpenAI Codex, Cursor


Rule Content

Use <Sequence> with a negative from value to trim the start of an animation.

Trim the Beginning

A negative from value shifts time backwards, making the animation start partway through:

import { Sequence, useVideoConfig } from "remotion";

const fps = useVideoConfig();

<Sequence from={-0.5 * fps}>
  <MyAnimation />
</Sequence>;

The animation appears 15 frames into its progress - the first 15 frames are trimmed off. Inside <MyAnimation>, useCurrentFrame() starts at 15 instead of 0.

Trim the End

Use durationInFrames to unmount content after a specified duration:

<Sequence durationInFrames={1.5 * fps}>
  <MyAnimation />
</Sequence>

The animation plays for 45 frames, then the component unmounts.

Trim and Delay

Nest sequences to both trim the beginning and delay when it appears:

<Sequence from={30}>
  <Sequence from={-15}>
    <MyAnimation />
  </Sequence>
</Sequence>

The inner sequence trims 15 frames from the start, and the outer sequence delays the result by 30 frames.


🙏

Source et remerciements

Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule: trimming

Part of the Remotion AI Skill collection on TokRepo.

Discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.