AMF icon indicating copy to clipboard operation
AMF copied to clipboard

[Bug]: h264_amf decoder not working with ffmpeg 7.1.1

Open i-barati opened this issue 8 months ago • 2 comments

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.

i-barati avatar May 07 '25 08:05 i-barati

Few points:

  1. You on very old driver from 2022. better to update.
  2. 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.
  3. The chipset 530 is pretty old (from somewhat 2017) and is not supported by latest drivers.

MikhailAMD avatar May 07 '25 13:05 MikhailAMD

  1. 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 .
  2. Everything runs on native hw. No virtualization used.
  3. Same test succeeds with same ffmpeg build on other older machine. Radeon R5 430 OEM, win 10, with driver version 27.20.1034.6"

i-barati avatar May 13 '25 17:05 i-barati