Rendering through the distributed chunk-lambda path produces a 1-frame black flash at every <video> boundary. For a 3-vid back-to-back composition (v1: 0-4s, v2: 4-8s, v3: 8-12s @ 30fps), frames 0, 121, and 242 all come out as body bg + whatever persistent overlays you have on top — Y≈22 with sparse highlights from text/logo. Local single-process renders are fine, so the bug only shows up after things hit lambda.
rebuildExtractedFramesFromPlanDir in renderChunk.ts builds framePaths with 1-based keys (set(i + 1, ...)), but getFrameAtTime does Math.floor(localTime * fps + 1e-9) which is 0-based. For each video's first-paint frame (localTime === 0 → frameIndex === 0), framePaths.get(0) returns undefined, the vid drops out of activePayloads, inject never fires, and the BeginFrame screenshot shows whatever's left of the DOM. Every other framePaths construction/consumption site in the repo is 0-based — renderChunk is the odd one out, which is why local tests pass.
Repro: render any multi-<video> composition through chunk-lambda, run ffmpeg -i out.mp4 -vf 'blackdetect=d=0.01:pix_th=0.05' -an -f null -. Black regions land exactly at each data-start boundary.
Fix in #1730 — one line. Opening this as a separate issue mostly so it doesn't get buried under the open PR pile.
Rendering through the distributed chunk-lambda path produces a 1-frame black flash at every
<video>boundary. For a 3-vid back-to-back composition (v1: 0-4s,v2: 4-8s,v3: 8-12s@ 30fps), frames 0, 121, and 242 all come out as body bg + whatever persistent overlays you have on top — Y≈22 with sparse highlights from text/logo. Local single-process renders are fine, so the bug only shows up after things hit lambda.rebuildExtractedFramesFromPlanDirinrenderChunk.tsbuildsframePathswith 1-based keys (set(i + 1, ...)), butgetFrameAtTimedoesMath.floor(localTime * fps + 1e-9)which is 0-based. For each video's first-paint frame (localTime === 0→frameIndex === 0),framePaths.get(0)returnsundefined, the vid drops out ofactivePayloads, inject never fires, and the BeginFrame screenshot shows whatever's left of the DOM. Every other framePaths construction/consumption site in the repo is 0-based —renderChunkis the odd one out, which is why local tests pass.Repro: render any multi-
<video>composition through chunk-lambda, runffmpeg -i out.mp4 -vf 'blackdetect=d=0.01:pix_th=0.05' -an -f null -. Black regions land exactly at eachdata-startboundary.Fix in #1730 — one line. Opening this as a separate issue mostly so it doesn't get buried under the open PR pile.