fix(web-test): correct video brightness via color_range flag

JPEG frames from CDP screencast use full range (0-255) but H.264
defaults to limited range (16-235). Add -color_range pc to preserve
full range in output MP4, fixing washed-out/bright appearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-01 12:32:39 +03:00
parent 9318d05535
commit 2a6f4b1d5f
@@ -2430,6 +2430,7 @@ export async function startRecording(outputPath, opts = {}) {
'-c:v', 'libx264', // H.264 codec
'-preset', 'ultrafast', // fast encoding
'-pix_fmt', 'yuv420p', // broad compatibility
'-color_range', 'pc', // full range (0-255) — match JPEG input
'-movflags', '+faststart', // web-friendly MP4
resolvedPath
], { stdio: ['pipe', 'ignore', 'pipe'] });