GPUOpen-LibrariesAndSDKs / AMF

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

[Bug]: Encoding speed is capped when using Oculus AirLink with GPU driver >22.2.3 #364

Open Anoobizzz opened 1 year ago

Anoobizzz commented 1 year ago

Describe the bug Submitting bug reports to AMD\Meta doesn't do anything, so I'm attempting bug report here instead. Since driver version >22.2.3 an issue with encoding bitrate appeared, no matter the settings it doesn't go above 70mb for me. There are multiple other topics discussing the same problem: https://forums.guru3d.com/threads/amd-amf-and-gpu-encoding-issues-and-discussion-notably-for-vr.443275/page-2 https://community.amd.com/t5/drivers-software/amd-drivers-and-vr/m-p/526584#M156416 https://github.com/GPUOpen-LibrariesAndSDKs/Radeon-ReLive-VR/issues/132#issuecomment-1272873797

To Reproduce Steps to reproduce the behavior:

  1. Install driver version higher than 22.2.3 (in example 22.11.1 is used)
  2. Connect to Quest 2 to PC over AirLink.
  3. Observer lower encoding bitrate compared to previous driver version

Setup (please complete the following information):

Debug Log (please upload or paste): OVRServer logs attached.

Expected behavior

Screenshots image image

Service_2022-11-30_17.28.29.txt

MikhailAMD commented 1 year ago

Checking....

Anoobizzz commented 1 year ago

I've rolled back to 22.2.3 to give comparison: image Notice how network usage is higher.

Logs:

Service_2022-12-02_18.09.37.txt

Only difference i see in properties set is: In 22.2.3 HevcMaxBitrate = 2147483647 In 22.11.1 HevcMaxBitrate = 100000000

Espionage724 commented 1 year ago

There's a claim on the VD Discord that 22.11.2 works fine with HEVC above 100Mbps.

I was on 22.4.2 yesterday and saw 200-500 Mbps reported to be working fine from Oculus over wired Link (AVC); the overlay updated with the set bitrate.

deiteris commented 1 year ago

There's a claim on the VD Discord that 22.11.2 works fine with HEVC above 100Mbps.

I'd say it's simply not possible. When AMF_VIDEO_ENCODER_TARGET_BITRATE and AMF_VIDEO_ENCODER_HEVC_TARGET_BITRATE are set above 100mbps, AMF or driver seems to invalidate the value (probably according to HW capabilities) and reset it to the corresponding usage default, and I don't think you can bypass it in any way. Though, It MAY report over 100mbps when CBR with filler data is enabled, but the actual bitrate of the frame will be still limited by the usage default.

MikhailAMD commented 1 year ago

The fix is under development, stay tuned.

Espionage724 commented 1 year ago

With Air Link, I get limited to around 50-55 Mbps with both HEVC and AVC when I use driver 22.11.2 (latest). Can't go higher nor lower with fixed bitrate.

With 21.10.2 driver also with Air Link, I'm limited to around 20 Mbps with HEVC (can't go higher nor lower), but AVC seems to work fine 10 Mbps to 200 Mbps.

For some reason, it seems Oculus is doing something different with bitrate depending on the driver.

However with ALVR and 22.11.2 driver, I can throw seemingly any bitrate with HEVC from 200 Mbps up to 600 Mbps with expected network load. So it seems ALVR is not limited with bitrate in the same way Oculus is.

On an unrelated note, there's something seriously wrong with Oculus's runtime because ALVR works notably better for Quest 2 PCVR than I've ever seen since Q2's launch.

Rinshun commented 1 year ago

With Air Link, I get limited to around 50-55 Mbps with both HEVC and AVC when I use driver 22.11.2 (latest). Can't go higher nor lower with fixed bitrate.

The behavior is weird. it gets limited to 50~55Mbps when running 72hz, but if you put it 120hz, then it can go up to 90Mbps (If I remember correctly)

That means it's not a driver issue only. Airlink is also doing something wrong (probably)

Shmnel commented 1 year ago

This issue has gotten worse for me after the latest update to Oculus on driver version 22.11.2

There's a new issue for me where I'll be already running at an already lowered bitrate of 50-75Mbps but then suddenly drop to 5-6Mbps for an extended period of time making airlink unusable before returning to the 50-75Mbps.

Before all of these issues I was running at 145Mbps at 90hz but with every update it's been getting progressively worse.

nyte commented 1 year ago

The fix is under development, stay tuned.

3 Support tickets, countless wasted hours fiddling and talking to support that has no idea what they are doing or talking about. 10 months later? Stay tuned? For another 12 months? All this happening during the dumbest rebrand and re-name in history.

david0f commented 1 year ago

AirLink's picture quality has been unusable for quite some time now as I'm also reaching a 60Mbps cap for some reason.

In the current state the only solution I had is Virtual Desktop which would run HEVC at 150Mbps with a noticeable bump in quality (although not sure if that's with filler data, considering the 100Mbps cap mentioned by other more knowledgeable people on GitHub).

nyte commented 1 year ago

Airlink was broken/crippled for AMD cards in March 2022 starting with AMD's drivers 22.3.1 I think that's when RSR was introduced with their software and drivers.

Rinshun commented 1 year ago

AirLink's picture quality has been unusable for quite some time now as I'm also reaching a 60Mbps cap for some reason.

In the current state the only solution I had is Virtual Desktop which would run HEVC at 150Mbps with a noticeable bump in quality (although not sure if that's with filler data, considering the 100Mbps cap mentioned by other more knowledgeable people on GitHub).

ALVR is a free alternative to Virtual Desktop.

Espionage724 commented 1 year ago

Has anyone tried toggling the Encode Dynamic Bitrate option in Oculus Debug Tool?

With wired Link on 22.2.3, the bitrate defaulted to 200 Mbps, but changing Encode Bitrate did nothing (higher and lower all stuck at 200 Mbps with no visible quality change). Encode Dynamic Bitrate was at the Default option.

Changing the Encode Dynamic Bitrate option to Disabled and restarting the service let me use any value in the Encode Bitrate option and seemingly had an effect (Link Detailed overlay showed encode latency increase when going from 10 Mbps, 200 Mbps, 500 Mbps, and even 900 Mbps).

I didn't disable the dynamic option when testing other drivers prior to this. It's possible the Dynamic Bitrate Max and Dynamic Bitrate Offset options can be used instead of disabling the dynamic part but I never tried them and don't quite understand what to set them at.

I'm not sure if any of that would workaround AMF's bitrate limit in newer drivers.

wolfallein commented 1 year ago

I'm having a similar issue on a 7900 XTX when using the ALVR server.

hazre commented 1 year ago

Hi, I have this issue on my 7900 XTX as well. Could we get a update on status of this issue?

nyte commented 1 year ago

There isn't a status update. It hasn't even been mentioned by either company. AMD seems to be scrambling to fix their "rushed to market" 7900 series. Metaculus is more worried about pushing a $1500 HMD that no one will buy because it isn't much better than the $300 one that they stopped supporting. I have a 7900xt. It's underwhelming and crashes quite often. My 6900 was the opposite.

Espionage724 commented 1 year ago

The fix is under development, stay tuned.

Ok, so what was changed after 22.2.3 to cause this?

It sounds like bitrates were fine up until 22.2.3, then someone decided to change it. Why? And why is it not as-simple as just undoing whatever was changed? Or maybe 22.2.3 and lower aren't as-ideal as they appear?

Video encoding really doesn't seem like something that should be this complex to suddenly have varying behavior and breakage all of a sudden on architectures that are supposed to be stable. Why not just do what you've been doing for years with game-specific profiles, make something that works specifically for Oculus (as to not break anything else even more :p), ship it now, and then do whatever you want to properly fix this later? This is affecting the most popular VR headset, has been for months, and just looks bad. Whatever the fix was for the wobbly dashboard since August(?) drivers still isn't implemented in the latest development drivers for W11 Insider (December), but sure enough the bitrate issues are present.

Although I'd prefer to be using newer drivers just cause, luckily the rest of my games and everything else seem fine on 22.2.3 with my 6600 XT. It's so outdated that Windows Update wants to "update" it, and there's only two methods that reliably work to prevent this (wushowhide or blocking device ID driver changes with group policy) that no average-user is going to know about.

wolfallein commented 1 year ago

@Espionage724 you should feel lucky to have an older driver that works. 7000 series owners don't have this luxury.

tonineri commented 1 year ago

@MikhailAMD, I know it's not specifically your fault, but I own an RX 6800XT (Reference Edition) which used to be considered a high-end GPU up until Dec 13th, 2022 when 7900 was released. It's my first time on an AMD GPU and I must say the hardware itself is fine, though the driver situation is - to put it mildly - a bit bitter... That said, it's been 2 months since the last driver update, and:

Hopefully, the next driver update will be released soon. Hopefully, it'll include the 100Mbit PC VR limitation under the "Fixed issues" section.

MikhailAMD commented 1 year ago

I understand, thanks for your patience, but can only say things related to AMF: the fix for 100MBit limitation is in testing.

Rinshun commented 1 year ago
* **still** having a worse PC VR (Quest 2 / Airlink) experience compared to an RTX 3070 due to the 100Mbit limitation 

@tonineri It's not due to the 100Mbit limitation only. Airlink is also doing something wrong. ALVR and VD have a much better visual quality than Airlink if you are using the latest drivers. You can see that airlink will only use 50~60Mbps in the task manager, as mentioned in the first post. So I suggest trying those alternatives while the fix isn't out.

bernek9000 commented 1 year ago

@MikhailAMD please send this information forward to the driver development team. Its unacceptable for a 6800XT or 6900XT or even 6950XT to have these kinds of peformance issues and limitations in VR. VR is the future of gaming if we accept it or not. Having a high end product performing worse than 1080TI or 2080TI in VR is a very very bad picture for AMD. This needs to be fixed real soon because people are flooding the forums on internet with returning cards and switching to Nvidia. I like my 6800XT but this is not the way to treat your customers. We've bought these cards with hard earned money during difficult times and we get what in return ? Ignorance for months ?

david0f commented 1 year ago

They seem to have bigger problems on their plate now with the 7000 series as the last 3 drivers are specifically targeted for that. One of the engineers promised on AMD reddit that a merge with the mainline branch is happening 'early January' but that obviously did not happen. At this point, the next driver not being next gen exclusive coincidentally with the bitrate fix is very unlikely but who knows, fingers crossed.

nyte commented 1 year ago

What is weird is that the 100mbit limit on the slider bar within the VR menu for airlink was increased to 200mbit somewhat recently for AMD cards. Unfortunately, it's only for looks because it still doesn't exceed 60-65Megabit in actual throughput.

Espionage724 commented 1 year ago

I haven't tried 23.2.1 to know for sure, but the notes acknowledge it as a known issue: https://www.amd.com/en/support/kb/release-notes/rn-rad-win-23-2-1

Maximum encode bitrate is limited to 100Mbps for certain applications.

MikhailAMD commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

Anoobizzz commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

Could you please clarify - does this in fact mean that AMF is now only capable of up to 100mb? Or Meta needs to make some kind of adjustment so that AMF operates at above 100mb rate? Thanks.

bernek9000 commented 1 year ago

Would be nice to know ... wasted a lot of time frustration with drivers. The problem is not new at all

MikhailAMD commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

Could you please clarify - does this in fact mean that AMF is now only capable of up to 100mb? Or Meta needs to make some kind of adjustment so that AMF operates at above 100mb rate? Thanks.

Meta should make an adjustment to enable > 100MBit.

Anoobizzz commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

Could you please clarify - does this in fact mean that AMF is now only capable of up to 100mb? Or Meta needs to make some kind of adjustment so that AMF operates at above 100mb rate? Thanks.

Meta should make an adjustment to enable > 100MBit.

Thanks for clarification, let's see how it goes :) Do you know if Meta will get back to you once the change is made or should we just keep an eye on their release notes\patches?

hazre commented 1 year ago

Besides Oculus Link/AirLink, ALVR streaming software seems to be affected as well. This doesn't seem to be only exclusive to Meta.

https://github.com/alvr-org/ALVR/issues/1308

MikhailAMD commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

Could you please clarify - does this in fact mean that AMF is now only capable of up to 100mb? Or Meta needs to make some kind of adjustment so that AMF operates at above 100mb rate? Thanks.

Meta should make an adjustment to enable > 100MBit.

Thanks for clarification, let's see how it goes :) Do you know if Meta will get back to you once the change is made or should we just keep an eye on their release notes\patches? I will post all information I can :)

MikhailAMD commented 1 year ago

Besides Oculus Link/AirLink, ALVR streaming software seems to be affected as well. This doesn't seem to be only exclusive to Meta.

alvr-org/ALVR#1308

It seems ALVR has necessary code: amfEncoder->SetProperty(AMF_VIDEO_ENCODER_FILLER_DATA_ENABLE, true); Could be something else.

bernek9000 commented 1 year ago

Isnt filler data just filler data ? How can it be good ? Still the quality I get with older drivers using 500mbps encoding is amazing compared to latest.

MikhailAMD commented 1 year ago

Isnt filler data just filler data ? How can it be good ? Still the quality I get with older drivers using 500mbps encoding is amazing compared to latest.

It is not as simple as just empty data, it changes rate control logic. Setting bitrate to 500Mbit will significantly increase latency.

david0f commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

Could you please clarify - does this in fact mean that AMF is now only capable of up to 100mb? Or Meta needs to make some kind of adjustment so that AMF operates at above 100mb rate? Thanks.

Meta should make an adjustment to enable > 100MBit.

Besides the 100MBit limit already stated by Meta the original issue consisted of the bitrate being "artificially capped" around 60-65MBit for most of us on newer drivers. Is Meta still responsible on their end for surpassing that cap up to the stated 100MBit as well?

deiteris commented 1 year ago

Small update: after investigation we've asked Meta to make a change. While the problem appeared with AMD driver update, the change in the driver was not a regression but a fix for another issue, which exposed this one.

What kind of change needs to be made (if it's not just for Meta of course)?

Isnt filler data just filler data ? How can it be good ? Still the quality I get with older drivers using 500mbps encoding is amazing compared to latest.

It is not as simple as just empty data, it changes rate control logic. Setting bitrate to 500Mbit will significantly increase latency.

If you inspect the bitstream generated with any driver past 22.3.1 and CBR with filler data enabled, it's exactly about the empty data. We're not talking about rate control logic and it's not about the latency either. 470mbps will be RBSP and only 30mbps is actually useful data. I already mentioned this in my other reply to this thread here https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/364#issuecomment-1356135611. Same thing is still observed with 23.2.1.

david0f commented 1 year ago

23.2.2 just dropped with the 100Mbps limit bug being listed under fixed issues. This is very confusing as I just got the signal from this thread that they just discovered this is in fact a Meta implementation issue. Was this issue addressed on AMD's part as well or just investigated and passed along to Meta?

deiteris commented 1 year ago

This seems to be actually fixed with 23.2.2. At least not an issue for ALVR anymore.

Anoobizzz commented 1 year ago

23.2.2 just dropped with the 100Mbps limit bug being listed under fixed issues. This is very confusing as I just got the signal from this thread that they just discovered this is in fact a Meta implementation issue. Was this issue addressed on AMD's part as well or just investigated and passed along to Meta?

It seems like there were multiple issues. One of the issues could be fixed from AMD side (as in ALVR is now supposedly fine?), but AirLink still is 60 ish~ mb on 23.2.2 and can only be fixed by Meta. At least this is my understanding.

Shmnel commented 1 year ago

I just tried airlink last night on my RX 590 and I was capped at 100. A lot more usable than what it was before but not uncapped by Meta higher than 100 still.

On Wed, Feb 22, 2023, 12:50 PM Anoobizzz @.***> wrote:

23.2.2 https://www.amd.com/en/support/kb/release-notes/rn-rad-win-23-2-2 just dropped with the 100Mbps limit bug being listed under fixed issues. This is very confusing as I just got the signal from this thread that they just discovered this is in fact a Meta implementation issue. Was this issue addressed on AMD's part as well or just investigated and passed along to Meta?

It seems like there were multiple issues. One of the issues could be fixed from AMD side (as in ALVR is now supposedly fine?), but AirLink still is 60 ish~ mb on 23.2.2 and can only be fixed by Meta. At least this is my understanding.

— Reply to this email directly, view it on GitHub https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/364#issuecomment-1440617311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5ZDCLPZQGEDKKLLPS7XKTWYZNZDANCNFSM6AAAAAASP6SERI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

david0f commented 1 year ago

We've been waiting for almost a year now, what's a couple of months extra? Frustrating but at least we have a sense of progression. Kudos for all of you posting here and for MikhailAMD involvement!

MikhailAMD commented 1 year ago

Talked to Meta. There is more then set filler data property. Something related to driver version detection. They are investigating.

bernek9000 commented 1 year ago

Talked to Meta. There is more then set filler data property. Something related to driver version detection. They are investigating.

Please help us VR guys. We want to be able to be on par with the green team on this one !

Jiiiiice commented 1 year ago

No news??

nyte commented 1 year ago

Nothing has been fixed. Zero. Metazuckerbook more worried about stupid rebranding and sabotaging TikTok rather than fixing their own products. This has been broken for a year.

kzhuang1 commented 1 year ago

Please calm down, github is a place for technical discussion on open source code and their issues/bugs, not youtube comments where you rage against whatever company or entity that you think slighted you.

Also for your information if you've actually read this thread, you would know that the issue was only patched on AMD's side last month on the 23.2.2 driver release, so Meta has only had less than a full month to fix the encoder bitrate negotiation on their end, not a year.

Espionage724 commented 1 year ago

Oculus has V51 in PTC, has anyone tried it?

Also, have any encoder issues affected wired Link? I'm pretty sure bitrate looked good at 200 Mbps with drivers newer than 22.2.3 with wired Link, but I'm not aware of how to check bandwidth over USB.

Masano91 commented 1 year ago

Sadly, it won't work with V51 PTC. Same bitrate as V50 ~ 60Mbps.

MikhailAMD commented 1 year ago

I got a word from Meta developer:" the fix should be released in v53 version that should be released until the end of April to the Public Test Channel"