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

Using iGPU and dGPU. #18

Open
Preednd opened this issue Mar 31, 2022 · 4 comments
Open

Using iGPU and dGPU. #18

Preednd opened this issue Mar 31, 2022 · 4 comments

Comments

@Preednd
Copy link

Preednd commented Mar 31, 2022

Hi there.

Nice work on this encoder so far. I am getting better results than the 2019 encoder. Thank you.

My CPU is a Ryzen 7 5700G and GPU is a RX 6600 XT.

When I select AMF CPU. It uses my RX 6600 XT instead of the iGPU (Radeon Graphics (I believe it is a Vega)).
And when I select AMF GPU. It still uses my RX 6600 XT.

I am running AMD Drivers 22.3.1 and OBS 27.0.0.

In the details, it does not list which version of OBS you are using, just says requires 27.0.0. So I am using that.

My guess is that in its current state, it might not see my iGPU, as you might be running something different. But it could be I am running the wrong OBS version.

My goal, when buying the CPU, was to off load all the streaming and recording encoding onto the iGPU from my dGPU.

Thoughts?

@e00E
Copy link
Owner

e00E commented Mar 31, 2022

This shouldn't be related to the OBS version. Generally whatever the current stable release of OBS is should work. I say "should" because I don't manually test this but their plugin api is supposed to be stable.

Currently the plugin uses the gpu that it gets from an obs here

void Encoder::initialize_dx11() {
. I am not sure where in the UI this is configured. It might not show up for me because I do not have a multi gpu device. Could you check if you see a setting for choosing the gpu anywhere in obs?

That said, it probably still makes sense to allow users to choose the gpu for this plugin independently of the obs setting.

My goal, when buying the CPU, was to off load all the streaming and recording encoding onto the iGPU from my dGPU.

This is not really relevant to the issue but here are my thoughts anyway. You do not say what benefit you expect but from this. You probably expect that encoding on the same gpu makes the game run worse. It is not obvious to me whether this is true. For example gpus might have mostly independent hardware for encoding and 3d gaming. I would benchmark whether you see any change in game performance when you are encoding vs not encoding. Furthermore it is likely that the older integrated gpu is worse at encoding than the newer one so your recordings might look better on the newer one or the newer one might support higher resolution and frame rate.

@Preednd
Copy link
Author

Preednd commented Mar 31, 2022

Thank you for the very quick reply.

There is a long story behind why I was asking about this. The short version is, that I have been trying to get AMD tech support to try and do something with the OBS AMF encoder. I have been 'talking' with them for about the last month. I have been doing a ton of testing and I have been able to work out some of the current issues with the 2019 AMF encoder.

But, some will not be able to be fixed. With out AMD getting involved.

See, OBS, from what I understand, asks the AMF what hardware encoders are in the system. If we take a look at my OBS log right now...

16:13:08.137: [AMF] <Id: 1> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
16:13:08.175: [AMF] <Id: 2> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
16:13:08.184: [AMF] [Capability Manager] Testing Direct3D 11 Adapter 'AMD Radeon RX 6600 XT (VEN_1002/DEV_73ff/SUB_50201462/REV_00c1)':
16:13:08.184: H264/AVC: Supported
16:13:08.184: H265/HEVC: Supported
16:13:08.184:
16:13:08.210: [AMF] <Id: 3> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
16:13:08.239: [AMF] <Id: 4> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
16:13:08.244: [AMF] [Capability Manager] Testing Direct3D 11 Adapter 'AMD Radeon(TM) Graphics (VEN_1002/DEV_1638/SUB_16361002/REV_00c8)':
16:13:08.244: H264/AVC: Not Supported
16:13:08.244: H265/HEVC: Not Supported

First, I am very worried that with both devices I am getting two 'Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)' errors. But with the iGPU. It is currently not detecting any h264/h265 support. This was not always the case. If I run any AMD driver set before 21.12.1. OBS can see then iGPU.

An interesting sidenote: I have it confirmed from AMD. And this is what I have also observed. Is that if you have an AMD iGPU & dGPU in the same system. It turns off Relive 'Record & Stream' panel in the control panel. So I am wondering if there is a bug in the AMF in regards to running two encoders.

In the 2019 AMF Encoder for OBS. If I go settings then output. Say go into either streaming or recording. Select an AMF encoder. Change the view mode to Advanced. Near the bottom of the list is 'Video Adapter'. on AMD drivers before 21.12.1, I have a choice of two devices in there. From, 21.12.1 onwards. There is only one.

I have tested Xsplit, and that does see both encoders and I can use the iGPU in that. And it encodes fine. But I find OBS caters for my needs so much better.

I know what your thinking. Use the 21.12.1 driver set right? OBS can see the iGPU. But it cant initialise it. So encoding fails.

The reason I would like to off load onto the iGPU is simple. If I have obs running, and record and stream my desktop using AMF. H264 720p 60 stream and H265 1080p 60 recording in quaility mode. The Encoder in task manager goes to about 70%. But, the 3D process task of task manager sits at about 15%. So if I play games, and I exceed 85% of GPU load. I will encounter problems with game, stream or recording.

I tried your 0.10 version and kept an eye out to see if it would contiune to be worked on before giving feedback. And for me your 0.20 quailty wise, does better on my RX 6600 XT than the 2019 AMF OBS encoder.

With the advent of AMD driver version 22.3.1. I now have 4 issues with obs and/or the 2019 AMF Encoder.

  1. I can not change keyframe interval.
  2. I can not change GoP structure in H265.
  3. I can not select the iGPU (thats since driver version 21.12.1)
  4. Since driver version 22.3.1. I can not use Quality mode in h264 or h265. Or OBS will lose communication with the AMF encoder. Its not an encoder overload. The AMF encoder times out.

The problem I see, with the old encoder. Is a 3 way problem.
First, the 2019 AMF encoder was stopped. So, it has not been coded to take advantage of AMF updates or updated to support new hardware.
Second, is OBS now, With advent of OBS version 28.2.x (I think thats the right one). OBS has had its FFMPEG codecs updated. Which is something OBS hasn't done in quite some time. I think it went from FFMPEG 4.2 to 4.4.1. But don't quote me lol. So now, you have an old AMF encoder talking in an old language to OBS.
Third and final, is the AMD driver set. I assume, with each driver release it installs a version of the AMF into windows. So the AMF will be much newer than what any of these bits of software use. AMF was last updated in December last year. And FFMPEG is now on version 5. But, the other problem with the driver set is that last year AMD split the driver set into to 2. The Legacy Driver pack (any AMD card upto and including the 300 series GPU's) and the current driver set (which is the 400 series onwards). So I am led to wonder if either or both the 2019 encoder or OBS are looking for legacy code within the driver set that is no longer there.

Which is why I have been banging my head againest a wall trying to get AMD tech support to do something. As going back to the bullet points. Items 3 and 4 are direct responses to AMD Driver updates.

Sorry for long wall of text. But, to coin star wars... ' You're my only hope'. lol

I am not a PC novice. Im 43 years old. I have been involved with PC software and hardware tech support for about 25 years (started at MS-DOS 6.20 with Windows 3.0). I did used to enjoy coding. Highest level I got in that was C/C++. But that was about 22 years ago a MS-DOS level. If there is any way you think I can help, if you need more info, someone to bounce ideas of off or you want someone to test stuff. I am up for it.

@e00E
Copy link
Owner

e00E commented Mar 31, 2022

I can't help with problems that are specific to obs, the other amf pluging, amd, etc. I do think it makes sense to support manually setting the gpu in this plugin. When I get around to that I will post here for people to try it out.

@Preednd
Copy link
Author

Preednd commented Mar 31, 2022

I wasn't expecting you to help with specific problems with obs and the old plugin. Its just been really frustrating dealing with AMD tech support. And I think I just needed to get some of that out of my brain. If anything, I hope that my putting this in here will give you food for thought. Maybe something in this big wall of text will make you think of things to persue, and what to avoid.

I am very imrpessed that you are working on this project and I am interested to see how it devlops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants