Skip to content

test(engine): synthesize the untagged AV1 fixture with whichever AV1 encoder ffmpeg has - #5379

Merged
jrusso1020 merged 1 commit into
heygen-com:mainfrom
diegolopezrm:test/av1-fixture-any-encoder
Oct 24, 2026
Merged

jrusso1020 merged 1 commit into
heygen-com:mainfrom
diegolopezrm:test/av1-fixture-any-encoder

Conversation

@diegolopezrm

Copy link
Copy Markdown
Contributor

What

The untagged AV1 case in videoFrameExtractor.test.ts now writes its fixture with whichever AV1 encoder ffmpeg has, libaom-av1 or libsvtav1, and is skipped when there's neither.

Why

On a Mac this test fails before it gets going, because Homebrew builds ffmpeg with libsvtav1 but not libaom-av1 (Unknown encoder 'libaom-av1'). The test only needs an untagged AV1 file, and either encoder writes one.

Related work

None that I found. It's a small test fix, so no separate issue.

How

The encoder is picked once from ffmpeg -encoders, next to the existing HAS_ZSCALE check.

Test plan

With Homebrew's ffmpeg 8.1.1 on macOS the file goes from one failure to 189 passing (10 skipped). Format, lint, typecheck and the comment check are clean.

  • Unit tests added/updated
  • Manual testing performed
  • Documentation updated (if applicable)
  • Comments follow CONTRIBUTING.md "Comments": they say why, not what, and a bug fix says what the code must do and how to reproduce the bug

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at b1a80140. Approving. On main this case hardcodes libaom-av1. On an ffmpeg built without it (Homebrew ships only libsvtav1), fixture synthesis throws and the test fails before it checks anything. Picking the encoder from ffmpeg -encoders next to the existing HAS_ZSCALE probe, and dropping the case when neither encoder exists, is the right shape.

I ran the synthesis step by hand with libsvtav1 (SVT-AV1 4.0.1). It writes an AV1 stream whose color space, primaries and transfer are all unknown, which is what the test asserts, and the pixel decodes as expected under BT.601. One thing to know, nothing to change: libsvtav1 ignores -crf 0 and encodes at its default CRF of 35, so the fixture isn't lossless. The frame is a flat color, though, and the expected value is decoded from the fixture itself, so the tolerance still holds. The -cpu-used 8 speed flag stays libaom-only, which is correct.

Need: yes, the test fails on a common ffmpeg build · Size: ok · Reuse: follows the existing HAS_ZSCALE probe · Simpler: already minimal

— Rames

@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 24, 2026
Merged via the queue into heygen-com:main with commit e3881bc Oct 24, 2026
88 checks passed
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.

2 participants