Hey Michael,
Python/Rust SDKs currently only accept raw frames. libwebrtc integrates the encoder tightly for congestion control (lowering bitrate when needed) and keyframe generation (when a new client needs to render its video).
If you need to leverage the hw encoder, take a look at
livekitwebrtcsink. The Gstreamer folks built it in order to better interop with LiveKit.