Configure GPU encoder for low-latency (no B-frames)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,8 +96,12 @@ class GPUEncoder:
|
|||||||
# Create dummy video to get frame buffer template
|
# Create dummy video to get frame buffer template
|
||||||
self._init_frame_buffer()
|
self._init_frame_buffer()
|
||||||
|
|
||||||
# Create encoder
|
# Create encoder with low-latency settings (no B-frames for immediate output)
|
||||||
self.encoder = nvc.CreateEncoder(width, height, "NV12", usecpuinputbuffer=False)
|
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
|
# CUDA kernel grid/block config
|
||||||
self._block = (16, 16)
|
self._block = (16, 16)
|
||||||
|
|||||||
Reference in New Issue
Block a user