mcpField
R
rendiv-video

rendiv-video

github.com/thecodacusCreative & media158128 installsUpdated 6w ago
Repository

About rendiv-video

Rendiv Video Skills is a guide for developing video projects with Rendiv, covering React compositions, frame-driven animation, media, and rendering. It is for developers working with Rendiv code and centers animation on properties derived from the current frame.

Key features

  1. 01Drive frame-by-frame animation with useFrame
  2. 02Control changes with interpolate and spring
  3. 03Packages for compositions and media
  4. 04字幕, animated text, and visual effects
  5. 05CLI rendering and Studio tools

Use cases

  1. 01Write compositions animated by frame number
  2. 02Add captions and animated text to video
  3. 03Build visuals with shapes, paths, or effects
  4. 04Render output with the CLI or Renderer

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thecodacus/rendiv --skill rendiv-video

After installing, type/rendiv-videoin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

assets/
animated-bar-chart.tsx
text-reveal.tsx
rules/
animation.md
captions.md
cli-and-studio.md
composition-setup.md
gif.md
lottie.md
media-components.md
procedural-effects.md
render-lifecycle.md
sequencing-and-timing.md
shapes-and-paths.md
text-animation.md
three.md
timeline-overrides.md
transitions.md
typography.md
visual-effects.md

Details

From the project README

Rendiv Video Skills

Use these skills whenever you are working with rendiv code — writing compositions, animating elements, embedding media, or rendering output.

Core Mental Model

Rendiv treats video as a pure function of a frame number. Every visual property (position, opacity, color, scale) is derived from the current frame via useFrame(). There is no timeline state machine, no imperative keyframe API. You write a React component that accepts a frame and returns JSX — rendiv handles the rest.

import { useFrame, interpolate } from '@rendiv/core';

export const FadeIn: React.FC = () => {
  const frame = useFrame();
  const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp' });
  return <div style={{ opacity }}>Hello rendiv</div>;
};
Key principles
  • Every animation MUST be driven by useFrame(). CSS animations and transitions are forbidden — they run on wall-clock time and will desync during frame-by-frame rendering.
  • Use interpolate() for linear mappings and spring() for physics-based motion.
  • Use <Img>, <Video>, <Audio>, and <AnimatedImage> from @rendiv/core instead of native HTML elements — they integrate with the render lifecycle via holdRender.
  • Compositions are registered declaratively via <Composition> and <Still> — they render null and only provide metadata to the framework.

Quick Start

A minimal rendiv project entry point:

// FadeIn.tsx — composition component
import { useFrame, interpolate, CanvasElement } from '@rendiv/core';

export const FadeIn: React.FC = () => {
  const frame = useFrame();
  const opacity = interpolate(frame, [0, 30], [0, 1], { extrapolateRight: 'clamp' });
  return (
    <CanvasElement id="FadeIn">
      <div style={{ opacity }}>Hello rendiv</div>
    </CanvasElement>
  );
};
// index.tsx — entry point
import { setRootComponent, Composition } from '@rendiv/core';
import { FadeIn } from './FadeIn';

const Root: React.FC = () => (
  <>
    <Composition
      id="FadeIn"
      component={FadeIn}
      durationInFrames={90}
      fps={30}
      width={1920}
      height={1080}
    />
  </>
);

setRootComponent(Root);

Render to MP4: rendiv render src/index.tsx FadeIn out/fade-in.mp4

Topic Guide

Load the relevant rule file based on the task at hand:

TaskRule file
Animate with interpolate, spring, Easing, blendColorsanimation.md
Set up compositions, stills, folders, entry pointcomposition-setup.md
Time-shift with Sequence, Series, Loop, Freezesequencing-and-timing.md
Control z-ordering and timeline overridestimeline-overrides.md
Embed images, video, audio, GIFs, iframesmedia-components.md
Render animated GIFs with playback controlgif.md
Add subtitles, SRT parsing, word highlightingcaptions.md
Understand holdRender, environment modes, rendering pipelinerender-lifecycle.md
Animate between scenes with TransitionSeriestransitions.md
Generate SVG shapes or manipulate pathsshapes-and-paths.md
Add noise-driven motion or motion blurprocedural-effects.md
Animate text per character, word, or linetext-animation.md
Apply visual effects and CSS filtersvisual-effects.md
Load Google Fonts or local font filestypography.md
Embed Lottie animationslottie.md
Add 3D scenes with Three.js / R3Fthree.md
Use the CLI, Studio, or Playercli-and-studio.md

Critical Constraints

  1. No CSS animations or transitions. Everything MUST be frame-driven via useFrame().
  2. Use rendiv media components (<Img>, <Video>, <Audio>, <AnimatedImage>) instead of native HTML elements. They manage holdRender automatically.
  3. Always wrap composition content with <CanvasElement id="...">. This makes the composition self-contained so its timeline overrides work correctly when nested inside other compositions. The id must match the <Composition> id.
  4. <Composition> renders null. It only registers metadata. The actual component is rendered by the Player, Studio, or Renderer — not by <Composition> itself.
  5. setRootComponent can only be called once. It registers the root that defines all compositions.
  6. inputRange must be monotonically non-decreasing in interpolate() and blendColors(). Both ranges must have equal length with at least 2 elements.
  7. <Series.Sequence> must be a direct child of <Series>. It throws if rendered outside a <Series> parent.
  8. morphPath requires matching segments. Both paths must have the same number of segments with matching command types.

Packages

PackagePurpose
@rendiv/coreHooks, components, animation, contexts
@rendiv/playerBrowser <Player> component
@rendiv/rendererPlaywright + FFmpeg rendering
@rendiv/bundlerVite-based project bundler
@rendiv/cliCLI: render, still, compositions, studio
@rendiv/studioStudio dev server with render queue
@rendiv/transitionsTransitionSeries with fade, slide, wipe, flip, clockWipe
@rendiv/shapesSVG shape generators (circle, rect, star, polygon, etc.)
@rendiv/pathsSVG path parsing, measurement, morphing, stroke reveal
@rendiv/noiseSimplex noise (2D, 3D, 4D)
@rendiv/fontsLocal font loading with holdRender
@rendiv/google-fontsGoogle Fonts loading with holdRender
@rendiv/motion-blurMotionTrail and ShutterBlur components
@rendiv/gifAnimated GIF playback with speed control and fit modes
@rendiv/captionsSRT/Whisper parsing, word-by-word highlighting, caption overlay
@rendiv/textAnimated text: per-character/word/line split, stagger, presets
@rendiv/effectsVisual effects: composable CSS filters, glow, glitch, vignette
@rendiv/lottieFrame-accurate Lottie animations via lottie-web
@rendiv/three3D scenes via React Three Fiber with context bridging

Example Assets

Comments

Markdown supported