Capítulo 125 de 988

Chapter 125: Supporting multiple frame rates

Core Idea

You may want to support multiple frame rates for a composition. For example, to build an option allow the user to export the video at either 30 FPS or 60 FPS.

Key Concepts

  • Write animations frame-rate-independently
  • Change frame rate dynamically
  • FPS Convert is discouraged
  • See also

Code Examples

const frame = useCurrentFrame();
// Animate from second 1 to second 2
const animationProgress = interpolate(frame, [30, 60], [0, 1], {
  extrapolateLeft: 'clamp',
  extrapolateRight: 'clamp',
});
  • What it demonstrates: Usage pattern for Supporting multiple frame rates from the official docs.

Key Takeaways

  1. Understand write animations frame-rate-independently when working with Supporting multiple frame rates.
  2. Understand change frame rate dynamically when working with Supporting multiple frame rates.
  3. Understand fps convert is discouraged when working with Supporting multiple frame rates.
  4. Understand see also when working with Supporting multiple frame rates.

Connects To

  • Chromium Flags: related page in the Rendering & SSR section.
  • Compare ssr: related page in the Rendering & SSR section.
  • Dataset Render: related page in the Rendering & SSR section.