Capítulo 709 de 988

Chapter 709: canReencodeVideoTrack()

Core Idea

:::warning We are phasing out Remotion WebCodecs and are moving to Mediabunny!

Key Concepts

  • Examples
  • API
  • track
  • videoCodec
  • resizeOperation
  • rotate
  • Return value
  • See also

Code Examples

const {tracks} = await parseMedia({
  src: 'https://remotion.media/BigBuckBunny.mp4',
  fields: {
    tracks: true,
  },
});

const videoTracks = tracks.filter((t) => t.type === 'video');

for (const track of videoTracks) {
  await canReencodeVideoTrack({
    track,
    videoCodec: 'vp8',
    resizeOperation: null,
    rotate: null,
  });
}
  • What it demonstrates: Usage pattern for canReencodeVideoTrack() from the official docs.

Key Takeaways

  1. Understand examples when working with canReencodeVideoTrack().
  2. Understand api when working with canReencodeVideoTrack().
  3. Understand track when working with canReencodeVideoTrack().
  4. Understand videocodec when working with canReencodeVideoTrack().
  5. Understand resizeoperation when working with canReencodeVideoTrack().

Connects To

  • Buffer Writer: related page in the WebCodecs (@remotion/webcodecs) section.
  • can Copy Audio Track: related page in the WebCodecs (@remotion/webcodecs) section.
  • can Copy Video Track: related page in the WebCodecs (@remotion/webcodecs) section.