Chapter 124: Hardware accelerated encoding
Core Idea
Encoding is the process of converting a sequence of images into a video file. Besides rendering frames, encoding is one of the two steps required to create a video.
Key Concepts
- Enable hardware accelerated encoding
- In SSR APIs
- In the CLI
- In the Studio
- With the config file
- In Remotion Lambda and Cloud Run
- Prerequisites for NVENC (Linux/Windows)
- Controlling quality using --video-bitrate
Code Examples
const serveUrl = '/path/to/bundle';
const outputLocation = '/path/to/frames';
const inputProps = {
titleText: 'Hello World',
};
const composition = await selectComposition({
serveUrl,
id: 'my-video',
inputProps,
});
await renderMedia({
composition,
serveUrl,
codec: 'prores',
outputLocation,
inputProps,
hardwareAcceleration: 'if-possible',
});
- What it demonstrates: Usage pattern for Hardware accelerated encoding from the official docs.
Key Takeaways
- Understand enable hardware accelerated encoding when working with Hardware accelerated encoding.
- Understand in ssr apis when working with Hardware accelerated encoding.
- Understand in the cli when working with Hardware accelerated encoding.
- Understand in the studio when working with Hardware accelerated encoding.
- Understand with the config file when working with Hardware accelerated encoding.
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.