跳到正文
cccskills
免费在 GitHub 公开

remotion-markup

Create video scenes in Remotion using React, with guidance on frame-based animation, media placement, and timing. It also points to references for effects, transitions, fonts, and other features, plus ways to preview the results in Studio.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Content, animation and effects best practices

查看安装方法

适用场景

  • Animating titles and subtitles
  • Combining video, audio, and images
  • Adjusting layer timing and trimming
  • Previewing scenes in Remotion Studio

包含的文件(58)

  • SKILL.md11.3 KB
  • 3d.md2.2 KB
  • agents/openai.yaml310 B
  • assets/remotion-icon.png1.3 KB
  • audio-visualization.md4.8 KB
  • audio.md3.7 KB
  • calculate-metadata.md3.4 KB
  • compositions.md3.1 KB
  • cropping.md1.1 KB
  • effects.md8.7 KB
  • embedding-videos.md3.4 KB
  • ffmpeg.md1.1 KB
  • gifs.md3.7 KB
  • google-fonts.md1.7 KB
  • html-in-canvas.md2.9 KB
  • images.md1.4 KB
  • light-leaks.md3.1 KB
  • local-fonts.md1.5 KB
  • lottie.md1.8 KB
  • measuring-dom-nodes.md995 B
  • measuring-text.md2.7 KB
  • multi-scene-video.md2.0 KB
  • parameters.md2.3 KB
  • remotion-maps/agents/openai.yaml293 B
  • remotion-maps/assets/remotion-icon.png1.3 KB
  • remotion-maps/REFERENCE.md1.0 KB
  • remotion-maps/techniques/cesium/assets/cesium-path.json12.0 KB
  • remotion-maps/techniques/cesium/assets/city-path.json223 B
  • remotion-maps/techniques/cesium/assets/flight-path.ts1.2 KB
  • remotion-maps/techniques/cesium/assets/sample-river.geojson6.3 KB
  • remotion-maps/techniques/cesium/references/3d-data-sources.md1.4 KB
  • remotion-maps/techniques/cesium/references/3d-flyover-architecture.md7.7 KB
  • remotion-maps/techniques/cesium/references/3d-troubleshooting.md6.6 KB
  • remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs5.4 KB
  • remotion-maps/techniques/cesium/TECHNIQUE.md3.8 KB
  • remotion-maps/techniques/mapbox/references/render-stability.md3.6 KB
  • remotion-maps/techniques/mapbox/TECHNIQUE.md12.9 KB
  • remotion-maps/techniques/maplibre/references/render-stability.md3.6 KB
  • remotion-maps/techniques/maplibre/TECHNIQUE.md13.6 KB
  • remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts2.1 KB
  • remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json325.3 KB
  • remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json12.8 KB
  • remotion-maps/techniques/maptiler/assets/tokens.ts1.2 KB
  • remotion-maps/techniques/maptiler/references/map-data-sources.md4.7 KB
  • remotion-maps/techniques/maptiler/references/map-explainer-architecture.md6.7 KB
  • remotion-maps/techniques/maptiler/references/map-geo-prep.md4.0 KB
  • remotion-maps/techniques/maptiler/references/render-stability.md3.6 KB
  • remotion-maps/techniques/maptiler/scripts/prep-geo.mjs7.4 KB
  • remotion-maps/techniques/maptiler/TECHNIQUE.md4.4 KB
  • remotion-maps/techniques/static-map/TECHNIQUE.md1.1 KB
  • sequencing.md3.9 KB
  • sfx.md1.8 KB
  • silence-detection.md2.5 KB
  • text-highlights.md1.8 KB
  • timing.md3.2 KB
  • transitions.md6.7 KB
  • video-editing.md3.3 KB
  • voiceover.md3.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

This is guidance for writing Remotion React Markup. If this is not relevant, load Remotion Best Practices instead.

Preserve user changes

Users may make edits in the code outside of the conversation.

If you detect a surprising change made in the meanwhile, don't overwrite it, assume it was intentional or ask for confirmation.

General rules

Drive animations using useCurrentFrame() and interpolate().
CSS transition or animation will not render correctly, they need to refactored.
Tailwind animation class will not render correctly, they need to be refactored.

Use Easing.bezier() and Easing.spring() to customize timing.

Structure your markup according to Remotion Interactivity Best Practices

import { useCurrentFrame, Easing, interpolate, Interactive } from "remotion";

export const FadeIn = () => {
  const frame = useCurrentFrame();

  return (
    <Interactive.Div
      name="Title"
      style={{
        opacity: interpolate(frame, [0, 2 * fps], [0, 1], {
          extrapolateRight: "clamp",
          extrapolateLeft: "clamp",
          easing: Easing.bezier(0.16, 1, 0.3, 1),
        }),
      }}
    >
      Hello World!
    </Interactive.Div>
  );
};

Keep the interpolate() call inline in the style prop. Use scale, translate, rotate CSS properties over transform.

// 👍 Inline editable keyframes and transform shorthands
style={{
  scale: interpolate(frame, [0, 100], [0, 1], {
    extrapolateLeft: 'clamp',
    extrapolateRight: 'clamp',
    easing: Easing.spring({damping: 200}),
    output: 'perceptual-scale' // For `scale` animations, use "output: 'perceptual-scale'"
  }),
  translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"], {
    extrapolateLeft: 'clamp',
    extrapolateRight: 'clamp',
    easing: Easing.spring({damping: 200}),
  }),
  rotate: interpolate(frame, [0, 100], ["20deg", "90deg"], {
    extrapolateLeft: 'clamp',
    extrapolateRight: 'clamp',
    easing: Easing.spring({damping: 200}),
  }),
}}

// 👎 Non-inline values and transform strings become harder to edit in Studio
const scale = interpolate(frame, [0, 100], [0, 1]);

style={{
  transform: `scale(${scale})`,
}}

Assets

Place assets in the public/ folder at your project root. Use staticFile() to reference files from the public/ folder.

Media components

Add video and audio using <Video> and <Audio> from @remotion/media.
Add images using the <CanvasImage> component. Add animated GIFs, APNG, WebP or AVIF images using <AnimatedImage>, use @remotion/gif if not using Chrome. Use staticFile() for files in public/ or pass a remote URL directly:

import { Audio, Video } from "@remotion/media";
import { staticFile, CanvasImage, AnimatedImage } from "remotion";

export const MyComposition = () => {
  return (
    <>
      <Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />
      <Audio src={staticFile("audio.mp3")} />
      <CanvasImage
        src={staticFile("logo.png")}
        style={{ width: 100, height: 100 }}
      />
      <Video src="https://remotion.media/video.mp4" />
      <AnimatedImage src={staticFile('nyancat.gif')} />
    </>
  );
};

Example scene

import {
  AbsoluteFill,
  Easing,
  Interactive,
  interpolate,
  useCurrentFrame,
  useVideoConfig
} from "remotion";

export const Empty = () => {
  const {fps} = useVideoConfig();
  const frame = useCurrentFrame();

  return (
    <AbsoluteFill
      name="Scene"
      style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: 'white'
      }}
    >
      <Interactive.Div
        name="Title"
        style={{
          opacity: interpolate(frame, [1 * fps, 2 * fps], [0, 1], {
            extrapolateRight: "clamp",
            extrapolateLeft: "clamp",
            easing: Easing.bezier(0.16, 1, 0.3, 1),
          }),
          fontSize: 88
        }}
      >
        Title
      </Interactive.Div>
      <Interactive.Div
        name="Subtitle"
        style={{
          opacity: interpolate(frame, [2 * fps, 3 * fps, 8 * fps, 10 * fps], [0, 1, 1, 0], {
            extrapolateRight: "clamp",
            extrapolateLeft: "clamp",
            easing: [Easing.bezier(0.16, 1, 0.3, 1), Easing.linear, Easing.bezier(0.16, 1, 0.3, 1)],
          }),
          fontSize: 32
        }}
      >
        Subtitle
      </Interactive.Div>
    </AbsoluteFill>
  );
}

Delaying, trimming

Most components (<AbsoluteFill>, <Interactive.*> <Img>, <AnimatedImage>, <CanvasImage>, <HtmlInCanvas>, <Solid>, <Sequence> from remotion, <Video> and <Audio> from @remotion/media, <Gif>, and more) support the following props:

from

<Img from={1 * fps} {/* ... */}/>
<Video from={1 * fps} {/* ... */}/>
<Interactive.Div from={1 * fps} {/* ... */}/>

When the element starts appearing in the timelien.

durationInFrames

<Img durationInFrames={20 * fps} {/* ... */}/>
<Interactive.Div durationInFrames={20 * fps} {/* ... */}/>

For how long the layer plays in the timeline.
For media, pass the natural duration of the media: <Video durationInFrames={29.322 * fps}/>

trimBefore

Useful for components whose internal clock should start later:

// Trim away first 2 seconds of footage
<Video trimBefore={2 * fps} {/* ... */} />

// `useCurrenFrame()` for children starts at `10 * fps`
<Sequence trimBefore={10 * fps} {/* ... */} />

Fallback

If a component does not support these props, wrap it in<Sequence> from remotion, which has them.

  • layout="absolute-fill" makes the Sequence behave like AbsoluteFill
  • layout="none" is "headless" mode, no wrapper element is used.

Maps

See Remotion Maps if wanting to include maps in the video.

Text highlights and annotations

See text-highlights.md for text highlights (highlight markers), circles, underlines, strike-throughs, crossed-off text, boxes.

Multi-scene videos

See multi-scene-video.md if planning to make a video with multiple subsequent scenes.

Voiceover

See voiceover.md for adding an AI-generated voiceover to Remotion compositions using ElevenLabs TTS.

Embedding Videos

See embedding-videos.md for advanced knowledge about embedding videos - trimming, volume, speed, looping, pitch.

Embedding Audio

See audio.md for advanced audio features like trimming, volume, speed, pitch.

Video editing

See video-editing.md for structuring editable video timelines in Remotion Studio.

Cropping

See cropping.md if needing to crop the visible rectangle of a component.

Transitions

See transitions.md for scene transition patterns.

Visual and pixel effects

When creating a visual effect, consider whether it is feasible using CSS and HTML, or whether a shader is needed.
Order or preference:

  1. Regular HTML + CSS or other web techniques
  2. An effect applied to the element directly (<Video>, <Img>), or by wrapping the content in <HtmlInCanvas>, which also accepts effects:
  • A listed effect via effects.md
  • A custom createEffect() via effects.md when no preset is available.

3D content

See ./3d.md for 3D content in Remotion using Three.js and React Three Fiber.

Sound effects

When needing to use sound effects, load the ./sfx.md file for more information.

Audio visualization

When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the ./audio-visualization.md file for more information.

Maps

For static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, or 3D geographic flyovers, load Remotion Maps.

Captions

When dealing with captions or subtitles, load the Remotion Captions skill for more information.

Google Fonts

Is the recommended way to load fonts in Remotion. See google-fonts.md for how to load Google Fonts.

Local fonts

See local-fonts.md for how to load local fonts.

GIFs

See gifs.md for how to display GIFs synchronized with Remotion's timeline.

Advanced Images

See images.md for sizing and positioning images, dynamic image paths, and getting image dimensions.

Lottie animations

See lottie.md for embedding Lottie animations in Remotion.

Timing

See timing.md for more timing techniques for interpolate().

Parameterized videos

See parameters.md for making a composition parametrizable by adding a Zod schema.

Measuring DOM nodes

See measuring-dom-nodes.md for measuring DOM element dimensions in Remotion.

Measuring text

See measuring-text.md for measuring text dimensions, fitting text to containers, and checking overflow.

Using FFmpeg

For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the ./ffmpeg.md file for more information.

Silence detection

When needing to detect and trim silent segments from video or audio files, load the ./silence-detection.md file.

Dynamic duration, dimensions and data

See calculate-metadata.md for dynamically set composition duration, dimensions, and props.

Advanced compositions

See compositions.md for how to define stills, folders, default props and for how to nest compositions.

Advanced sequencing

See sequencing.md for more sequencing patterns - delay, trim, limit duration of items.

Install modules

Use npx remotion add to add new packages with the right version:

npx remotion add @remotion/media

This goes for @remotion/* packages, mediabunny, @mediabunny/*, zod, and @huggingface/transformers.

Previewing markup

In Cursor, run Studio without --no-open so it opens the browser automatically:

npx remotion studio

In other agent clients, you can use the same command, or use --no-open if you will open the URL in an in-app browser:

npx remotion studio --no-open

This will start a long-running process and print the server URL for the preview.
If server is already started, it will print the URL. If you use --no-open, open the exact printed URL in the in-app browser and verify that Studio loads. Once a composition exists, verify that its video preview loads. If you cannot open it there, run Studio without --no-open. You can visit a specific composition by navigating to /[composition-id], for example http://localhost:3000/MapAnimation.

Optional: one-frame render check

You can render a single frame with the CLI to sanity-check layout, colors, or timing.
Skip it for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.

npx remotion still [composition-id] --scale=0.25 --frame=30

At 30 fps, --frame=30 is the one-second mark (--frame is zero-based).

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

add-bug

免费

Add a reported Remotion bug to the bugs API with its affected versions, a short title, and upgrade guidance. Follow the existing entry format and place the new record first so recent bugs appear at the top.

中文简介正在准备中。当前显示英语简介。

  • Adding a reported bug to the Remotion bugs API
  • Recording which versions a bug affects
  • Including upgrade guidance in a bug description
remotion-dev/remotion6.5万2026年10月19日 更新

Add a Remotion command-line or configuration option, or convert a hardcoded flag into a shared option definition. Connect parsing, configuration setters, help entries, and generated documentation so the option is consistently available and documented.

中文简介正在准备中。当前显示英语简介。

  • Add a new Remotion command-line flag
  • Convert a hardcoded flag into a shared option
  • Connect an option to Config setters
remotion-dev/remotion6.5万2026年10月19日 更新

Add a new effect to @remotion/effects, including its implementation, package entry points, documentation, interactive demo, and preview images. Follow the package conventions and verify the changes with tests, formatting checks, and builds.

中文简介正在准备中。当前显示英语简介。

  • Implementing a new effect for @remotion/effects
  • Registering effect imports and parameter types
  • Creating documentation and an interactive effect demo
remotion-dev/remotion6.5万2026年10月19日 更新

Add a person to the Remotion experts page by placing their portrait, entering their profile and contact links, and generating an expert card image. The instructions specify file locations, profile fields, and how to verify card generation.

中文简介正在准备中。当前显示英语简介。

  • Add a new person to the Remotion experts page
  • Register a portrait, specialties, and contact links
  • Generate an expert card image
remotion-dev/remotion6.5万2026年10月19日 更新

Create a new @remotion package within the Remotion monorepo, a repository containing multiple packages. Set up its files, register it across the project, and prepare documentation, usage examples, and build configuration.

中文简介正在准备中。当前显示英语简介。

  • Creating a new @remotion package
  • Registering a package across the monorepo
  • Adding documentation and usage examples
remotion-dev/remotion6.5万2026年10月19日 更新

add-sfx

免费

Add a new sound effect to @remotion/sfx, from registering the audio file to exporting its URL and documenting its use. The workflow covers playback examples, attribution, navigation entries, waveform generation, and the package build.

中文简介正在准备中。当前显示英语简介。

  • Add a sound effect to @remotion/sfx
  • Create documentation with playback and usage examples
  • Update sound effect navigation and waveform data
remotion-dev/remotion6.5万2026年10月19日 更新

查看 remotion-dev 的全部技能

报告此技能的问题