GyanD / codexffmpeg

Support for https://www.gyan.dev/ffmpeg
1.31k stars 102 forks source link

[Request] enable VAAPI decoders (like in BtbN Windows builds) #118

Closed oscarbg closed 3 months ago

oscarbg commented 3 months ago

Hi, VAAPI supports Windows for a year at least.. FFMPEG main branch supports VAAPI Windows also for a while.. plase can add that to full build in addition to existing D3D11VA decoders?

also testing with -hwaccel d3d13va (doesn't exist) reveals vaapi missing from list:

[vist#0:0/h264 @ 0000022b09d3ccc0] Unrecognized hwaccel: d3d13va. [vist#0:0/h264 @ 0000022b09d3ccc0] Supported hwaccels: cuda dxva2 qsv d3d11va opencl vulkan

seems BtbN include it:

[vist#0:0/h264 @ 000001a2282bedc0] Unrecognized hwaccel: d3d13va. [vist#0:0/h264 @ 000001a2282bedc0] Supported hwaccels: cuda vaapi dxva2 qsv d3d11va opencl vulkan

thanks..

GyanD commented 3 months ago

I took a look at the BtbN commit which added vaapi on windows and it says doesn't actually work - it crashes.

oscarbg commented 3 months ago

no, is really working for me! but you have to have a working libva-win32 installation: extract libva-win32 libva and vaon12_drv_video.dll dlls from: https://www.nuget.org/packages/Microsoft.Direct3D.VideoAccelerationCompatibilityPack/1.0.2 and check with vainfo tool output like this:

Trying display: win32 libva info: VA-API version 1.21.0 libva info: Trying to open ./\vaon12_drv_video.dll libva info: Found init function __vaDriverInit_1_21 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.21 (libva 2.21.0) vainfo: Driver version: Mesa Gallium driver 24.1.0-devel for D3D12 (NVIDIA GeForce RTX 3070) vainfo: Supported profile and entrypoints

Andarwinux commented 3 months ago

btbn build libva is already statically linked, vaon12_drv_video.dl is the only thing needed.

GyanD commented 3 months ago

The vaapi-linked build gets generated but with vainfo I get

edit:: Never mind. Forgot to set env vars.

GyanD commented 3 months ago

added to 2024-03-28 builds.

oscarbg commented 3 months ago

works nice! thanks..

On Thu, Mar 28, 2024 at 11:55 AM Gyan @.***> wrote:

added to 2024-03-28 builds.

— Reply to this email directly, view it on GitHub https://github.com/GyanD/codexffmpeg/issues/118#issuecomment-2024908952, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFDM6JSEVW7AZUP7G3RVQ3Y2PZKHAVCNFSM6AAAAABFJOXFYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRUHEYDQOJVGI . You are receiving this because you authored the thread.Message ID: @.***>