Capítulo 707 de 988

Chapter 707: canCopyVideoTrack()

Core Idea

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

Key Concepts

  • Examples
  • API
  • inputTrack
  • rotationToApply
  • inputContainer
  • outputContainer
  • resizeOperation
  • outputVideoCodec

Code Examples

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

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

for (const track of videoTracks) {
  canCopyVideoTrack({
    outputContainer: 'webm',
    inputTrack: track,
    inputContainer: container,
    rotationToApply: 0,
    resizeOperation: null,
    outputVideoCodec: null,
  }); // boolean
}
  • What it demonstrates: Usage pattern for canCopyVideoTrack() from the official docs.

Key Takeaways

  1. Understand examples when working with canCopyVideoTrack().
  2. Understand api when working with canCopyVideoTrack().
  3. Understand inputtrack when working with canCopyVideoTrack().
  4. Understand rotationtoapply when working with canCopyVideoTrack().
  5. Understand inputcontainer when working with canCopyVideoTrack().

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 Reencode Audio Track: related page in the WebCodecs (@remotion/webcodecs) section.