From e5fd364441334c70fad084aaa4cf8820d2bc3ee4 Mon Sep 17 00:00:00 2001 From: Miguel Angel Simon Sierra Date: Mon, 13 Jul 2026 22:16:45 -0400 Subject: [PATCH] test(engine): write HDR fixture color tags into the H.264 VUI The SDR-to-HDR extraction tests synthesize their HDR fixture with -color_trc/-color_primaries flags and rely on the encoder propagating them into the bitstream. The pinned Windows CI ffmpeg build drops the transfer on that path, so after #2377 narrowed HDR detection to the transfer function, the fixture probes as SDR on Windows and both tests fail (hdrPreflightCount 0). Write the VUI directly with the h264_metadata bitstream filter so the tag survives on every build. --- packages/engine/src/services/videoFrameExtractor.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/engine/src/services/videoFrameExtractor.test.ts b/packages/engine/src/services/videoFrameExtractor.test.ts index 103021e43d..82394a1f12 100644 --- a/packages/engine/src/services/videoFrameExtractor.test.ts +++ b/packages/engine/src/services/videoFrameExtractor.test.ts @@ -959,6 +959,12 @@ describe.skipIf(!HAS_FFMPEG)("extractAllVideoFrames on a VFR source", () => { "smpte2084", "-colorspace", "bt2020nc", + // The -color_* flags above only tag the container/encoder context; + // whether they reach the H.264 VUI depends on the ffmpeg build (the + // pinned Windows CI build drops the transfer). Write the VUI directly + // so probing reports smpte2084 on every build (9/16/9 = bt2020/PQ/bt2020nc). + "-bsf:v", + "h264_metadata=colour_primaries=9:transfer_characteristics=16:matrix_coefficients=9", src, ]); if (!synth.success) {