GPUVideoEncoder#
- class gs_nyx.nyx_py_video_encoder.GPUVideoEncoder#
Bases:
objectGPU video encoder. Consumes CUDA frame buffers and produces compressed bitstreams on the CPU.
Constructors
Construct an uninitialized encoder; call ‘startup’ before use.
Methods
Encode one sRGB frame located at 'input_cuda_ptr' (CUDA device pointer) and write the bitstream to 'output_cpu_ptr' (host pointer).
Force the next encoded frame to be an IDR (instantaneous decoder refresh) keyframe.
Return the size in bytes of the largest CPU output buffer the encoder may produce for a single frame.
Return True if the next encoded frame will be an IDR frame (either scheduled by GOP or forced).
Update the target bitrate (bits per second) and frame rate of the encoder at runtime.
Release all encoder, CUDA-interop and SDK global resources.
Initialize the encoder with the given VideoEncoderStartupParams, retain the requested CUDA device, and load shipped resources.