Skip to content

Disabling H264 Hardware acceleration #547

@alhejabee-ux

Description

@alhejabee-ux

Hello,

I want to disable GPU hardware acceleration for H.264 encoding and force WebRTC to use CPU-based encoding instead.

Right now, WebRTC fails to encode the H.264 video frames and logs the following error:

ai-avatar INFO:__main__:Avatar stdout: 
2025-12-14 14:02:36,064 - DEBUG livekit - libwebrtc:50:libwebrtc::imp::peer_connection_factory - (video_stream_encoder.cc:2108): Failed to encode frame. Error code: -7

It appears this WebRTC error prevents the encoder from initializing properly when H.264 hardware acceleration is enabled.

when I prevent the code from seeing the gpu it works fine, but I want the gpu for other part of the code not livekit encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions