Capítulo 739 de 988

Chapter 739: Getting the frame rate of a video

Core Idea

Videos can have one of two types of frame rates:

Key Concepts

  • Getting the frame rate using Mediabunny
  • Matching a Remotion composition to the frame rate
  • Usage example
  • See also

Code Examples

const getFrameRate = async (videoTrack: InputVideoTrack) => {
  const metrics = await videoTrack.computeFrameRateMetrics();
         // ^?

  if (metrics.probedPacketCount < 2) {
    return null;
  }

  return metrics.bestGuessFrameRate;
};
  • What it demonstrates: Usage pattern for Getting the frame rate of a video from the official docs.

Key Takeaways

  1. Understand getting the frame rate using mediabunny when working with Getting the frame rate of a video.
  2. Understand matching a remotion composition to the frame rate when working with Getting the frame rate of a video.
  3. Understand usage example when working with Getting the frame rate of a video.
  4. Understand see also when working with Getting the frame rate of a video.

Connects To

  • can Decode: related page in the Mediabunny (@remotion/mediabunny) section.
  • Extract Frames: related page in the Mediabunny (@remotion/mediabunny) section.
  • Extract Thumbnail: related page in the Mediabunny (@remotion/mediabunny) section.