@remotion/renderer: add AV1 codec support#6771
Conversation
Co-authored-by: Igor Samokhovets <samohovets@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
@remotion/renderer: add AV1 codec support
There was a problem hiding this comment.
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.
Co-authored-by: Igor Samokhovets <samohovets@users.noreply.github.com>
…cursor/cli-preview-module-resolution-ab48
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cursor/cli-preview-module-resolution-ab48
There was a problem hiding this comment.
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):
-
ffmpeg-args.ts - Confirm that the
libaom-av1encoder 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. -
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 av1on Linux ARM64 GNU will get an FFmpeg error at render time. Consider if runtime validation would improve UX, though graceful failure is also acceptable. -
Encoding speed - AV1 encoding with
libaom-av1is 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.
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>

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-av1FFmpeg encoder. This provides access to a modern, efficient video compression standard.Key changes:
av1into core codec definitions, FFmpeg encoder mappings, and quality controls (CRF).Potential Tradeoffs:
libaom-av1encoder. Users may need to provide a custom FFmpeg binary if the bundled Remotion FFmpeg does not include it.