AMF
AMF copied to clipboard
[Bug]: h264_amf decoder not working with ffmpeg 7.1.1
Describe the bug I tried to test amf hw decoder with ffmpeg. The decoding fails at decoder initialization.
To Reproduce Steps to reproduce the behavior: ffmpeg -c:v h264_amf -i legend.h264 -pixel_format nv12 out.yuv -loglevel debug
Setup (please complete the following information): Driver version: 22.6.1 Graphics Chipset: Radeon (TM) 530 OS: windows 11 Version 23H2 (OS Build 22631.5189)
Debug Log (please upload or paste):
[AMF @ 000001d4a3cb86c0] AMFDeviceDX11Impl: 2025-05-07 09:02:46.092 1EC8 [AMFDeviceDX11Impl] Debug: InitDX11() created HW DX11.1 device
[AMF @ 000001d4a3cb86c0] AMFDeviceDX11Impl: 2025-05-07 09:02:46.092 1EC8 [AMFDeviceDX11Impl] Debug: InitDX11() created HW DX11 device
[AMF @ 000001d4a3cb86c0] AMF initialisation succeeded via D3D11.
[AMF @ 000001d4a3cb86c0] AMFDecodeEngineImplDX: 2025-05-07 09:02:46.233 1EC8 [AMFDecodeEngineImplDX] Info: Init() OK! Video DX HW DECODER (1920x816) for input stream
[AMF @ 000001d4a3cb86c0] AMFDecodeEngineImplDX11: 2025-05-07 09:02:46.233 1EC8 [AMFDecodeEngineImplDX11] Error: ..\..\..\..\..\runtime\src\components\DecoderUVD\DecodeEngines\DirectX\DirectX11\DecodeEngineDX11.cpp(378):Assertion failed:InitDecoder() cannot query for ID3D11VideoDevice
Expected behavior Decoder initialization succeeds . Ffmpeg able to decode with h264_amf decoder.
Few points:
- You on very old driver from 2022. better to update.
- Failure to create video decoder tells that you maybe running inside some VM where HW decoding is not enabled. Tell me if this is the case.
- The chipset 530 is pretty old (from somewhat 2017) and is not supported by latest drivers.
- After the failed test(with Windows installed driver), i installed the latest driver from amd website. The driver is up to date according to AMD Radeon Software .
- Everything runs on native hw. No virtualization used.
- Same test succeeds with same ffmpeg build on other older machine. Radeon R5 430 OEM, win 10, with driver version 27.20.1034.6"