Snap Design · Watch video examples · Opus video guides

How to fix Remotion keyframe timing with Claude

A Remotion title card may fade in correctly on its own and start too early once you place it in a larger composition. Track the composition frame and the component's local frame together. If a card begins at frame 60 and fades in over 15 frames, inspect the full video's frames 60, 67, and 75.

Calculate opacity using the local frame

Inside a Remotion Sequence, useCurrentFrame() returns the frame relative to that sequence. In this example, composition frame 60 is local frame 0. Use interpolate() to move opacity from 0 at local frame 0 to 1 at local frame 15. Clamping keeps opacity within that range as you scrub the timeline. Remotion useCurrentFrame · Remotion interpolate

import { interpolate, useCurrentFrame } from 'remotion';

export function TitleCard({ title }: { title: string }) {
  const frame = useCurrentFrame();
  const opacity = interpolate(frame, [0, 15], [0, 1], {
    extrapolateLeft: 'clamp',
    extrapolateRight: 'clamp',
  });

  return <h1 style={{ opacity }}>{title}</h1>;
}

Give Claude three reference frames

Write a title card for a 30 fps Remotion composition. Place it in a Sequence beginning at frame 60. Use local frames 0–15 for the opacity transition. Give me the expected opacity at composition frames 60, 67, and 75, and show how to move the entire entrance 12 frames earlier. Keep the title text configurable.

With linear interpolation, those three frames should have opacities of 0, about 0.47, and 1. If frame 67 is still blank, display the local frame number in the preview to see where the fade actually starts.

To move the entrance earlier, change the Sequence start from 60 to 48. Its local keyframes stay at 0 and 15. When the desired duration is half a second, use 15 frames at 30 fps or 12 frames at 24 fps. After changing the timing, check frame 48 and the frame where the fade reaches full opacity.

For visual references for a title card, browse the code-rendered examples. Snap Design Opus 5.5 gallery