diff --git a/streaming/gpu_output.py b/streaming/gpu_output.py index 06419fc..e765908 100644 --- a/streaming/gpu_output.py +++ b/streaming/gpu_output.py @@ -96,8 +96,12 @@ class GPUEncoder: # Create dummy video to get frame buffer template self._init_frame_buffer() - # Create encoder - self.encoder = nvc.CreateEncoder(width, height, "NV12", usecpuinputbuffer=False) + # Create encoder with low-latency settings (no B-frames for immediate output) + self.encoder = nvc.CreateEncoder( + width, height, "NV12", usecpuinputbuffer=False, + bf=0, # No B-frames - immediate output + lowLatency=1, # Low latency mode + ) # CUDA kernel grid/block config self._block = (16, 16)