GPUVideoEncoder#
- class gs_nyx.nyx_py_video_encoder.GPUVideoEncoder#
Bases:
objectGPU video encoder. Consumes frames written in its exported input buffer and produces compressed bitstreams on the CPU.
Constructors
Construct an uninitialized encoder; call ‘startup’ before use.
Methods
Identity of the GPU the encoder runs on (DeviceIdentity), to pick the compute device sitting on the same GPU.
Encode the sRGB frame currently in the input buffer (wait for the compute write first) and write the bitstream to 'output_cpu_ptr' (host pointer).
Export the input buffer as an ExportedGraphicsBuffer, or None when the encoder is not started.
Kind of OS handle 'export_input_buffer' returns on this graphics API and platform (EExternalMemoryHandleType).
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 and SDK global resources.
Initialize the encoder with the given VideoEncoderStartupParams and load shipped resources.