Skip to content
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

Hardware encoding using h264_vaapi #1276

Open
antonpetrovmain opened this issue Jul 26, 2024 · 3 comments
Open

Hardware encoding using h264_vaapi #1276

antonpetrovmain opened this issue Jul 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@antonpetrovmain
Copy link

Windows build number:

10.0.19045.0

Your Distribution version:

2024.2

Your WSL versions:

PS C:\Users\anton.petrov> wsl --version
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.19045.4529

Steps to reproduce:

  1. sudo sunshine
  2. Observe an error using hardware encoding:
[2024:07:26:07:01:20]: Error: [h264_vaapi @ 0x5653259a0400] No usable encoding entrypoint found for profile VAProfileH264High (7).

WSL logs:

No response

WSL dumps:

No response

Expected behavior:

Hardware encoding should work for sunshine server.

Actual behavior:

Sunshine falls back to software encoding:
[2024:07:26:07:01:21]: Info: Found H.264 encoder: libx264 [software]

@antonpetrovmain antonpetrovmain added the bug Something isn't working label Jul 26, 2024
@antonpetrovmain
Copy link
Author

 └─$ sudo LIBVA_DRIVER_NAME=d3d12 vainfo --display drm
    libva info: VA-API version 1.21.0
    libva info: User environment variable requested driver 'd3d12'
    libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/d3d12_drv_video.so
    libva info: Found init function __vaDriverInit_1_21
    libva info: va_openDriver() returns 0
    vainfo: VA-API version: 1.21 (libva 2.12.0)
    vainfo: Driver version: Mesa Gallium driver 24.0.7-1 for D3D12 (Intel(R) UHD Graphics 620)
    vainfo: Supported profile and entrypoints
    VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
    VAProfileH264Main               :	VAEntrypointVLD
    VAProfileH264High               :	VAEntrypointVLD
    VAProfileHEVCMain               :	VAEntrypointVLD
    VAProfileHEVCMain10             :	VAEntrypointVLD
    VAProfileVP9Profile0            :	VAEntrypointVLD
    VAProfileVP9Profile2            :	VAEntrypointVLD
    VAProfileNone                   :	VAEntrypointVideoProc

@antonpetrovmain
Copy link
Author

Does that mean the current d3d12 drivers do not support hardware encoding using H264?
I see only decoding capabilities: VAEntrypointVLD
and I do not see the ones for encoding: VAEntrypointEncSlice

@antonpetrovmain
Copy link
Author

Or does the hardware not support H264 encoding?
Maybe this is the case, if I read this article correctly:
https://www.intel.com/content/www/us/en/developer/articles/technical/linuxmedia-vaapi.html

Can somebody more knowledgeable please confirm? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant