Repository navigation
test(engine): synthesize the untagged AV1 fixture with whichever AV1 encoder ffmpeg has - #5379
Conversation
…encoder ffmpeg has
jrusso1020
left a comment
There was a problem hiding this comment.
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
What
The untagged AV1 case in
videoFrameExtractor.test.tsnow writes its fixture with whichever AV1 encoder ffmpeg has,libaom-av1orlibsvtav1, and is skipped when there's neither.Why
On a Mac this test fails before it gets going, because Homebrew builds ffmpeg with
libsvtav1but notlibaom-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 existingHAS_ZSCALEcheck.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.