Chunk-lambda renders drop a periodic near-black frame — one bad frame every chunk_frames / worker_count frames. On a single-video 4-worker chunk that's every 60 frames, and signalstats catches it cleanly: YAVG ~22 against YMAX ~240. Local single-process renders never show it, since they don't run under BeginFrame.
It comes from the isNewImage branch in injectVideoFramesBatch. The first time a session paints a given videoId there's no __render_frame__ sibling yet, so it creates the <img> on the spot — createElement + insertBefore. captureFrameCore fires beginFrameCapture right after, and the paint flush in frameCapture.ts is skipped whenever we're in beginframe mode. So under HeadlessExperimental.BeginFrame the compositor hasn't pulled the freshly-inserted layer into its tree by the time we capture — it lands a tick later, and that frame comes out as body background plus whatever was already composited (the YAVG ~22 signature). Each lambda worker is its own session, so it recurs at every worker boundary.
Chunk-lambda renders drop a periodic near-black frame — one bad frame every
chunk_frames / worker_countframes. On a single-video 4-worker chunk that's every 60 frames, andsignalstatscatches it cleanly: YAVG ~22 against YMAX ~240. Local single-process renders never show it, since they don't run under BeginFrame.It comes from the
isNewImagebranch ininjectVideoFramesBatch. The first time a session paints a givenvideoIdthere's no__render_frame__sibling yet, so it creates the<img>on the spot —createElement+insertBefore.captureFrameCorefiresbeginFrameCaptureright after, and the paint flush inframeCapture.tsis skipped whenever we're in beginframe mode. So underHeadlessExperimental.BeginFramethe compositor hasn't pulled the freshly-inserted layer into its tree by the time we capture — it lands a tick later, and that frame comes out as body background plus whatever was already composited (the YAVG ~22 signature). Each lambda worker is its own session, so it recurs at every worker boundary.