mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
Extends webmAlphaCheck.ts (from #2044) with a pixel-level decode probe. After the tag check passes, decodes 3 sampled frames via `ffmpeg -c:v libvpx-vp9 -pix_fmt rgba -f rawvideo` at 8x8 and emits a distinct advisory if every alpha byte reads 255. #2044 detects the "tag absent" failure mode (ffprobe shows no `alpha_mode` in stream tags). It doesn't catch a stricter case reported on CLI 0.7.56 / Windows 11: ALPHA_MODE=1 present but BlockAdditional alpha side data empty. Under current logic webmAlphaAdvisory sees `alphaMode: true` and stays silent, so the render ships as opaque without any signal. The -metadata:s:v:0 alpha_mode=1 push is a muxer directive that some ffmpeg builds write unconditionally, independent of whether libvpx-vp9 emitted the alpha plane. Tag presence is necessary but not sufficient evidence of preserved alpha. Advisory text names both possibilities (opaque composition OR silent alpha drop) plus the concrete workaround (png-sequence + prores repack). Fast path (no tag or missing tag) is unchanged. Probe adds ~1s per WebM render only when the tag says alpha.