GPUOpen-LibrariesAndSDKs / AMF

The Advanced Media Framework (AMF) SDK provides developers with optimal access to AMD devices for multimedia processing
Other
603 stars 151 forks source link

[Question]: Is amf (amd GPU) supports hardware encoding in gpu paravirtualization (GPU-PV)? #509

Open Zhenia-l opened 1 week ago

Zhenia-l commented 1 week ago

GPU: RX 6700XT host/VM: windows 11 24h2 driver: 24.9.1 I created a VM using Hyper-V GPU Paravirtualization. The GPU is visible in the VM, I can run games and they work without problems, as on the host computer. But I ran into a problem trying to use hardware encoding in sunshine while trying to start stream. I get the following errors:

[2024-10-05 22:39:42.122]: Info: Creating encoder [h264_amf]
[2024-10-05 22:39:42.122]: Info: Color coding: SDR (Rec. 601)
[2024-10-05 22:39:42.122]: Info: Color depth: 8-bit
[2024-10-05 22:39:42.122]: Info: Color range: JPEG
[2024-10-05 22:39:42.281]: Verbose: [h264_amf @ 000001aa59f2ffc0] EncodeCoreHelper: 2024-10-05 22:39:42.281     19C8 [EncodeCoreHelper]    Info: ***Found regpath, but key not found using default=1
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] EncodeQueueWinImpl: 2024-10-05 22:39:42.282     19C8 [EncodeQueueWinImpl]   Error: c:\constructicon\builds\gfx\six\24.20\drivers\amf\stable\runtime\src\components\EncoderCore\EncodeQueueWinImpl.cpp(319):AMF_ERROR 1 : AMF_FAIL: EncodeQueueServiceWin::Initialize() Failed to Load EncodeCore binary.
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] EncodeQueueService: 2024-10-05 22:39:42.282     19C8 [EncodeQueueService] Warning: Failed to create encode queue serivce.
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] AMFEncoderCoreBaseImpl: 2024-10-05 22:39:42.283     19C8 [AMFEncoderCoreBaseImpl] Warning: Failed to initialize EncodeQueueFactory.
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] AMFEncoderCoreBaseImpl: 2024-10-05 22:39:42.283     19C8 [AMFEncoderCoreBaseImpl] Warning: Failed to create encode queue serivce.
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] AMFEncoderCoreH264: 2024-10-05 22:39:42.283     19C8 [AMFEncoderCoreH264] Warning: Encode Core dll not found, fall back to UVE path
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] AMFEncoderCoreH264: 2024-10-05 22:39:42.283     19C8 [AMFEncoderCoreH264] Warning: CreateServices failed.
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] AMFEncoderCoreH264: 2024-10-05 22:39:42.283     19C8 [AMFEncoderCoreH264] Warning: *****Failed to create H264 encoder component.
[2024-10-05 22:39:42.283]: Verbose: [h264_amf @ 000001aa59f2ffc0] AMFEncoderCoreH264: 2024-10-05 22:39:42.283     19C8 [AMFEncoderCoreH264]   Debug: AMFEncoderCoreH264Impl::Terminate()
[2024-10-05 22:39:42.283]: Error: [h264_amf @ 000001aa368a8cc0] CreateComponent(AMFVideoEncoderVCE_AVC) failed with error 11
[2024-10-05 22:39:42.284]: Info: Retrying with fallback configuration options for [h264_amf] after error: Encoder not found

When trying to use h265, the client reports that the computer (VM) does not support h265. Hardware encoding (both h264 and h265) on the host works without issues. Software encoding on the VM also works. Should hardware encoding work in the use case described above?

Zhenia-l commented 5 days ago

Sounds like a bug with newer AMD drivers https://github.com/jamesstringerparsec/Easy-GPU-PV/issues/392

MikhailAMD commented 4 days ago

Based on conversation with virtualization team it looks like known and recently fixed issue. We will notify when the fix appears in the public driver.