Capítulo 712 de 988

Chapter 712: convertMedia()

Core Idea

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

Key Concepts

  • Return value
  • save()
  • remove()
  • finalState
  • API
  • src
  • container
  • expectedDurationInSeconds?

Code Examples

const result = await convertMedia({
  src: 'https://remotion.media/BigBuckBunny.mp4',
  container: 'webm',
});

// Save the converted video as a Blob
const blob = await result.save();
  • What it demonstrates: Usage pattern for convertMedia() from the official docs.

Key Takeaways

  1. Understand return value when working with convertMedia().
  2. Understand save() when working with convertMedia().
  3. Understand remove() when working with convertMedia().
  4. Understand finalstate when working with convertMedia().
  5. Understand api when working with convertMedia().

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.