diff --git a/packages/engine/src/services/chunkEncoder.ts b/packages/engine/src/services/chunkEncoder.ts index 594cda66d..a5c7ffe3e 100644 --- a/packages/engine/src/services/chunkEncoder.ts +++ b/packages/engine/src/services/chunkEncoder.ts @@ -145,6 +145,18 @@ export function buildEncoderArgs( if (bitrate) args.push("-b:v", bitrate); else args.push("-crf", String(quality)); + // Disable B-frames. Standard h264 with B-frames produces negative DTS + // at the start of the stream (the first B-frame's decode order is + // "before" the first I-frame's presentation time). VS Code's video + // preview, several browser