Index of every page on this site: llms.txt
All skills
digitalsamba avatar

/remotion-official

@b3437fc
Run it yourself

Router for all Remotion skills

  • 131 files
  • 440.7 KB
  • Updated last week
  • GitHub
Use this Skill: https://skilld.dev/gh/digitalsamba/claude-code-video-toolkit/remotion-official

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

remotion-markupcalculate-metadata.md

≈875 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Using calculateMetadata

Use calculateMetadata on a <Composition> to dynamically set duration, dimensions, and transform props before rendering. Use it when metadata depends on input props, fetched data, or asset metadata. For static dimensions, duration, FPS, and initial props, inline the values on <Composition> instead.

<Composition
  id="MyComp"
  component={MyComponent}
  durationInFrames={300}
  fps={30}
  width={1920}
  height={1080}
  defaultProps={{ videoSrc: "https://remotion.media/video.mp4" }}
  calculateMetadata={calculateMetadata}
/>

Setting duration based on a video

Use the getVideoDuration and getVideoDimensions skills to get the video duration and dimensions:

import { CalculateMetadataFunction } from "remotion";
import { getVideoDuration } from "./get-video-duration";

const calculateMetadata: CalculateMetadataFunction<Props> = async ({
  props,
}) => {
  const durationInSeconds = await getVideoDuration(props.videoSrc);

  return {
    durationInFrames: Math.ceil(durationInSeconds * 30),
  };
};

Matching dimensions of a video

Use the getVideoDimensions skill to get the video dimensions:

import { CalculateMetadataFunction } from "remotion";
import { getVideoDuration } from "./get-video-duration";
import { getVideoDimensions } from "./get-video-dimensions";

const calculateMetadata: CalculateMetadataFunction<Props> = async ({
  props,
}) => {
  const dimensions = await getVideoDimensions(props.videoSrc);

  return {
    width: dimensions.width,
    height: dimensions.height,
  };
};

Setting duration based on multiple videos

const calculateMetadata: CalculateMetadataFunction<Props> = async ({
  props,
}) => {
  const metadataPromises = props.videos.map((video) =>
    getVideoDuration(video.src),
  );
  const allMetadata = await Promise.all(metadataPromises);

  const totalDuration = allMetadata.reduce(
    (sum, durationInSeconds) => sum + durationInSeconds,
    0,
  );

  return {
    durationInFrames: Math.ceil(totalDuration * 30),
  };
};

Setting a default outName

Set the default output filename based on props:

const calculateMetadata: CalculateMetadataFunction<Props> = async ({
  props,
}) => {
  return {
    defaultOutName: `video-${props.id}`, // .mp4 is added automatically
  };
};

Transforming props

Fetch data or transform props before rendering:

const calculateMetadata: CalculateMetadataFunction<Props> = async ({
  props,
  abortSignal,
}) => {
  const response = await fetch(props.dataUrl, { signal: abortSignal });
  const data = await response.json();

  return {
    props: {
      ...props,
      fetchedData: data,
    },
  };
};

The abortSignal cancels stale requests when props change in the Studio.

Return value

All fields are optional. Returned values override the <Composition> props:

  • durationInFrames: Number of frames
  • width: Composition width in pixels
  • height: Composition height in pixels
  • fps: Frames per second
  • props: Transformed props passed to the component
  • defaultOutName: Default output filename
  • defaultCodec: Default codec for rendering

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at b3437fc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 32 minutes ago.

Activeupdated last week
version
4.0.544

README badge

README badge for digitalsamba/claude-code-video-toolkit/remotion-official