Skip to content

feat: VA-API support for linux. #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

Conversation

cloudwebrtc
Copy link
Contributor

@cloudwebrtc cloudwebrtc commented May 13, 2025

vaapi works now, but there are some things need to confirm.

  • can call drm driver for h264 encoding for AMD/APU
  • check rate control is effective
  • confirm encoder adapts to resolution changes
  • check support for Intel CPU
  • check and confirm for H.264 encoding in baseline, main & high profiles
  • simulcast support (maybe in next commit)
  • add capability detection support for vaapi encoder factory

@cloudwebrtc cloudwebrtc marked this pull request as ready for review May 29, 2025 13:31
@cloudwebrtc cloudwebrtc force-pushed the duan/vaapi-hw-codec branch from ee2dc49 to 879f9de Compare June 4, 2025 02:03
@cloudwebrtc cloudwebrtc requested a review from theomonnom June 17, 2025 13:29
@cloudwebrtc cloudwebrtc requested a review from typester June 17, 2025 13:29
@cloudwebrtc
Copy link
Contributor Author

cloudwebrtc commented Jun 17, 2025

Tried to install libva win32 today run it on windows (via vaon12 driver based on d3d12), but unfortunately it didn't work, the encoder can be opened but the bitstream cannot be encoded. so at this moment we can only support linux

@cloudwebrtc
Copy link
Contributor Author

cloudwebrtc commented Jun 18, 2025

required dependencies for AMD GPU.

sudo apt install -y libva-dev libdrm-dev mesa-va-drivers

Confirm that vainfo contains VAProfileH264 and VAEntrypointEncSlice

$ vainfo
Trying display: wayland
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_22
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 25.0.3-1ubuntu2 for AMD Radeon Graphics (radeonsi, gfx1150, LLVM 19.1.7, DRM 3.63, 6.15.1-061501-generic)
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant