Skip to content

@remotion/renderer: add AV1 codec support#6771

Merged
JonnyBurger merged 16 commits intomainfrom
cursor/cli-preview-module-resolution-ab48
Mar 25, 2026
Merged

@remotion/renderer: add AV1 codec support#6771
JonnyBurger merged 16 commits intomainfrom
cursor/cli-preview-module-resolution-ab48

Conversation

@samohovets
Copy link
Copy Markdown
Member

This PR implements support for AV1 video export, addressing #3917.

Why these changes?
To enable users to render videos using the AV1 codec, leveraging the libaom-av1 FFmpeg encoder. This provides access to a modern, efficient video compression standard.

Key changes:

  • Integrated av1 into core codec definitions, FFmpeg encoder mappings, and quality controls (CRF).
  • Updated codec capability maps, file extension handling, audio compatibility, and dimension validation to support AV1.
  • Extended CLI, Studio, and documentation to reflect the new AV1 codec option.
  • Added comprehensive unit and integration tests for AV1 codec paths.

Potential Tradeoffs:

  • AV1 encoding requires an FFmpeg build that includes the libaom-av1 encoder. Users may need to provide a custom FFmpeg binary if the bundled Remotion FFmpeg does not include it.

Open in Web Open in Cursor 

Co-authored-by: Igor Samokhovets <samohovets@users.noreply.github.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 3, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment Mar 25, 2026 1:52pm
remotion Ready Ready Preview, Comment Mar 25, 2026 1:52pm

Request Review

@samohovets samohovets changed the title Cli preview module resolution @remotion/renderer: add AV1 codec support Mar 3, 2026
@samohovets
Copy link
Copy Markdown
Member Author

@pullfrog

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid, well-structured PR that systematically adds AV1 across all codec maps, CLI, docs, Studio, and tests. All {[key in Codec]: ...} maps have been updated. Two notable limitations to consider around container/audio codec support — see inline comments.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow runpullfrog.com𝕏

Co-authored-by: Igor Samokhovets <samohovets@users.noreply.github.com>
…cursor/cli-preview-module-resolution-ab48
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

The PR adds AV1 codec support comprehensively across the codebase. The implementation follows existing codec patterns correctly.

What's done well:

  • AV1 added to all relevant codec maps: validCodecs, encoder mappings, CRF settings, media support, file extensions, and audio codec combinations
  • CRF range 0-63 and default of 30 is appropriate for AV1
  • Support for AV1+Opus in WebM container enables AV1+WebM output
  • Even dimension validation properly included for AV1
  • Test coverage includes CRF validation, dimension rounding, and file extension derivation

A few observations (non-blocking):

  1. ffmpeg-args.ts - Confirm that the libaom-av1 encoder flags are correct. The aomenc encoder has specific tuning options (e.g., --cpu-used, --end-usage) that affect speed/quality tradeoff. The current implementation uses only basic CRF flag which is fine for default behavior.

  2. Documentation - The docs correctly note that AV1 is unavailable on Linux ARM64 GNU, but there's no code-level enforcement of this. Users who explicitly set --codec av1 on Linux ARM64 GNU will get an FFmpeg error at render time. Consider if runtime validation would improve UX, though graceful failure is also acceptable.

  3. Encoding speed - AV1 encoding with libaom-av1 is notably slow. The docs mention this, which is good. No changes needed.

Overall this is a solid implementation that correctly integrates AV1 into Remotion's codec system.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow runpullfrog.com𝕏

@samohovets samohovets requested a review from JonnyBurger March 24, 2026 18:58
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@JonnyBurger JonnyBurger merged commit 59cf930 into main Mar 25, 2026
17 of 18 checks passed
@JonnyBurger JonnyBurger deleted the cursor/cli-preview-module-resolution-ab48 branch March 25, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants