mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-02 19:57:13 +00:00
Each worker owns a session (recycled and retried per 2c) and pulls whole segments in index order. Segments finish out of order, so the concat list is built from the plan rather than from completion order — ordering never reaches the encoders. Three guards, each mutation-checked: every worker settles before any session is closed (closing one out from under a live worker orphans its ffmpeg and races the CDP connection); a multi-worker render never takes the single-encoder fallback, because other workers are already encoding work it would discard; and the queue is shared, so no frame is captured twice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>