Capítulo 147 de 988

Chapter 147: renderMedia()

Core Idea

_Part of the @remotion/renderer package.

Key Concepts

  • Arguments
  • serveUrl
  • composition
  • codec
  • outputLocation?
  • inputProps?
  • port?
  • frameRange?

Code Examples

const serveUrl = '/path/to/bundle';
const outputLocation = '/path/to/video.mp4';

const inputProps = {
  titleText: 'Hello World',
};

const composition = await selectComposition({
  serveUrl,
  id: 'my-video',
  inputProps,
});

await renderMedia({
  composition,
  serveUrl,
  codec: 'h264',
  outputLocation,
  inputProps,
});
  • What it demonstrates: Usage pattern for renderMedia() from the official docs.

Key Takeaways

  1. Understand arguments when working with renderMedia().
  2. Understand serveurl when working with renderMedia().
  3. Understand composition when working with renderMedia().
  4. Understand codec when working with renderMedia().
  5. Understand outputlocation? when working with renderMedia().

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.