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

Could not open codec [h264_amf]: Internal bug, should not have happened #1860

Closed
3 tasks done
luqasz opened this issue Nov 22, 2023 · 3 comments
Closed
3 tasks done
Labels
invalid:duplicate This appears to be a duplicate of a pre-existing issue.

Comments

@luqasz
Copy link

luqasz commented Nov 22, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Is your issue described in the documentation?

  • I have read the documentation

Is your issue present in the nightly release?

  • This issue is present in the nightly release

Describe the Bug

[2023:11:22:00:34:14]: Error: [h264_amf @ 000002ce537a6c40] encoder->Init() failed with error 3
[2023:11:22:00:34:14]: Error: Could not open codec [h264_amf]: Internal bug, should not have happened

Expected Behavior

No response

Additional Context

No response

Host Operating System

Windows

Operating System Version

Windows 10

Architecture

64 bit

Sunshine commit or version

0.21.0

Package

macOS - dmg

GPU Type

AMD

GPU Model

RX580

GPU Driver/Mesa Version

23.11.1

Capture Method (Linux Only)

No response

Config

channels = 4
address_family = both
origin_web_ui_allowed = pc
min_log_level = 2
resolutions = [
    352x240,
    480x360,
    858x480,
    1280x720,
    1920x1080,
    2560x1080,
    1920x1200
]
fec_percentage = 40
qp = 1
min_threads = 4

Apps

No response

Relevant log output

[2023:11:22:00:37:35]: Info: nvprefs: NvAPI_Initialize() failed, ignore if you don't have NVIDIA video card
[2023:11:22:00:37:35]: Info: Sunshine version: 0.21.0
[2023:11:22:00:37:35]: Info: Compiling shaders...
[2023:11:22:00:37:35]: Info: Compiled shaders
[2023:11:22:00:37:35]: Info: // Testing for available encoders, this may generate errors. You can safely ignore those errors. //
[2023:11:22:00:37:35]: Info: Trying encoder [nvenc]
[2023:11:22:00:37:35]: Info: ddprobe.exe [1] [] returned: 0x80070005
[2023:11:22:00:37:35]: Info: Set GPU preference: 1
[2023:11:22:00:37:35]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:35]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:35]: Info: Using realtime GPU priority
[2023:11:22:00:37:35]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:35]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:35]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:35]: Info: Encoder [nvenc] is not supported on this GPU
[2023:11:22:00:37:35]: Info: Trying encoder [quicksync]
[2023:11:22:00:37:35]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:35]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:35]: Info: Using realtime GPU priority
[2023:11:22:00:37:35]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:35]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:35]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:35]: Info: Encoder [quicksync] is not supported on this GPU
[2023:11:22:00:37:35]: Info: Trying encoder [amdvce]
[2023:11:22:00:37:35]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:35]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:35]: Info: Using realtime GPU priority
[2023:11:22:00:37:35]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:35]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:35]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:35]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:35]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:35]: Info: Using realtime GPU priority
[2023:11:22:00:37:35]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:35]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:35]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:35]: Info: SDR color coding [Rec. 601]
[2023:11:22:00:37:35]: Info: Color depth: 8-bit
[2023:11:22:00:37:35]: Info: Color range: [JPEG]
[2023:11:22:00:37:35]: Error: [h264_amf @ 00000242c130bc00] encoder->Init() failed with error 3
[2023:11:22:00:37:35]: Error: Could not open codec [h264_amf]: Internal bug, should not have happened
[2023:11:22:00:37:35]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:35]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:35]: Info: Using realtime GPU priority
[2023:11:22:00:37:35]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:35]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:35]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:35]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:35]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:36]: Info: SDR color coding [Rec. 601]
[2023:11:22:00:37:36]: Info: Color depth: 8-bit
[2023:11:22:00:37:36]: Info: Color range: [JPEG]
[2023:11:22:00:37:36]: Error: [h264_amf @ 00000242c125b600] encoder->Init() failed with error 3
[2023:11:22:00:37:36]: Error: Could not open codec [h264_amf]: Internal bug, should not have happened
[2023:11:22:00:37:36]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:36]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:36]: Info: Using realtime GPU priority
[2023:11:22:00:37:36]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:36]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:36]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:36]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:36]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:36]: Info: SDR color coding [Rec. 601]
[2023:11:22:00:37:36]: Info: Color depth: 8-bit
[2023:11:22:00:37:36]: Info: Color range: [JPEG]
[2023:11:22:00:37:36]: Error: [h264_amf @ 00000242c125b600] encoder->Init() failed with error 3
[2023:11:22:00:37:36]: Error: Could not open codec [h264_amf]: Internal bug, should not have happened
[2023:11:22:00:37:36]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:36]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:36]: Info: Using realtime GPU priority
[2023:11:22:00:37:36]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:36]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:36]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:36]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:36]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:36]: Info: SDR color coding [Rec. 601]
[2023:11:22:00:37:36]: Info: Color depth: 8-bit
[2023:11:22:00:37:36]: Info: Color range: [JPEG]
[2023:11:22:00:37:36]: Error: [h264_amf @ 00000242c125b600] encoder->Init() failed with error 3
[2023:11:22:00:37:36]: Error: Could not open codec [h264_amf]: Internal bug, should not have happened
[2023:11:22:00:37:36]: Info: Encoder [amdvce] failed
[2023:11:22:00:37:36]: Info: Trying encoder [software]
[2023:11:22:00:37:36]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:36]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:36]: Info: Using realtime GPU priority
[2023:11:22:00:37:36]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:36]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:36]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:36]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:36]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:36]: Info: 
Device Description : Radeon RX 580 Series
Device Vendor ID   : 0x00001002
Device Device ID   : 0x000067DF
Device Video Mem   : 8170 MiB
Device Sys Mem     : 0 MiB
Share Sys Mem      : 8189 MiB
Feature Level      : 0x0000B100
Capture size       : 1920x1080
Offset             : 0x0
Virtual Desktop    : 1920x1080
[2023:11:22:00:37:36]: Info: Active GPU has HAGS disabled
[2023:11:22:00:37:36]: Info: Using realtime GPU priority
[2023:11:22:00:37:36]: Info: Desktop resolution [1920x1080]
[2023:11:22:00:37:36]: Info: Desktop format [DXGI_FORMAT_B8G8R8A8_UNORM]
[2023:11:22:00:37:36]: Info: Display refresh rate [59.9401Hz]
[2023:11:22:00:37:36]: Info: Requested frame rate [60fps]
[2023:11:22:00:37:36]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709
Bits Per Color     : 8
Red Primary        : [0.679688,0.30957]
Green Primary      : [0.206055,0.693359]
Blue Primary       : [0.151367,0.0546875]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.5 nits
Max Luminance      : 270 nits
Max Full Luminance : 270 nits
[2023:11:22:00:37:36]: Info: SDR color coding [Rec. 601]
[2023:11:22:00:37:36]: Info: Color depth: 8-bit
[2023:11:22:00:37:36]: Info: Color range: [JPEG]
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] profile High, level 4.2, 4:2:0, 8-bit
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] frame I:1     Avg QP:31.00  size:  1278
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] mb I  I16..4: 99.9%  0.1%  0.0%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] 8x8 transform intra:0.1%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] i16 v,h,dc,p: 94%  0%  6%  0%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 75% 12%  0%  0%  0%  0% 12%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] i8c dc,h,v,p: 100%  0%  0%  0%
[2023:11:22:00:37:36]: Info: [libx264 @ 00000242c1312ec0] kb/s:613.44
[2023:11:22:00:37:36]: Info: 
[2023:11:22:00:37:36]: Info: // Ignore any errors mentioned above, they are not relevant. //
[2023:11:22:00:37:36]: Info: 
[2023:11:22:00:37:36]: Info: Found H.264 encoder: libx264 [software]
[2023:11:22:00:37:36]: Info: Configuration UI available at [https://localhost:47990]
[2023:11:22:00:37:37]: Info: Registered Sunshine mDNS service
@ODtian
Copy link

ODtian commented Nov 23, 2023

Same question, don't know why but my solution is switching the option Configuration -> AMD AMF Encoder -> AMF Usage to any except ultralowlatency, which cause the error.

@cgutman
Copy link
Collaborator

cgutman commented Nov 30, 2023

It's a regression in AMD's driver.

This is a duplicate of #1559

@cgutman cgutman closed this as not planned Won't fix, can't repro, duplicate, stale Nov 30, 2023
@cgutman cgutman added the invalid:duplicate This appears to be a duplicate of a pre-existing issue. label Nov 30, 2023
@LizardByte-bot
Copy link
Member

👋 @luqasz, this appears to be a duplicate of a pre-existing issue.

@LizardByte LizardByte locked and limited conversation to collaborators Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid:duplicate This appears to be a duplicate of a pre-existing issue.
Projects
None yet
Development

No branches or pull requests

5 participants