-
Notifications
You must be signed in to change notification settings - Fork 150
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
[Bug]: VBAQ quality problem H264 #330
Comments
In order to help reproduce the same issue, could you please provide the recorded streams as well as all of the encoder settings, including the bitrate that you are using? |
Recorded with built-in OBS plugin, not sure how to provide AMF log, used debug mode in plugin |
22.7.1 and new 1.4.26 issue still present |
Some way to tweek VBAQs 'strenght' would be good, its tuned quite high... or so it seems. |
At this time, we do not have plans to provide a VBAQ strength parameter. Also, it is suggested to increase the target bitrate to 6000000 bit/s for 1080p 60fps video recording. The main cause of the quality issue you are seeing is due to the low bitrate being set. |
Aint the OP of this post using 20000000 bit/s? tis a much higher value than 6000000 |
The stream that was attached is about 118.36kbps which is too low for 1080p 60fps. This issue was originally opened back in July. At that time, the AMF plugin for OBS still displayed the bitrate setting in bps. This was changed to kbps in August. |
Ohhh, thats right... i have also downloaded the clip to check, thanks for the clarification! |
Hello! I'm the guy who originally opened the Issue. Unfortunately after almost a year I lost access to my old GitHub account, I see some misunderstanding here, the problem appears only when Adaptive Quantization is enabled, perhaps the problem is relevant on video cards of a certain generation such as Vega. Because i didn't find similar problems in the web. The bitrate set with VBAQ enabled does NOT affect the final quality in any way, with a given 10000000 bits or with 100000000. The final output quality will be terrible with a low bitrate. And this is a problem, because Discord seems to enabled VBAQ for amd-default. For example, streaming Tarkov has the same problems in dark areas. Quality is just really BAD, like 160p. The problem appeared around AMF 1.4.18. There is also a problem with the h264 VBR_LAT mode. Each ( i ) frame flickers and have a low bitrate as if the VBV is set very low or absent, while in the settings VBVBufferSize=100000000. If you need any more information, I can provide it, just tell me how. And yeah obs latest version 29.1.1 with 23.4.3 still has is, however with a driver like 20.5.1 everything seems okay except VBAQ not working at all, but at least streaming in Discord is fine. |
Could you please provide the following updated additional information at the time of reproducing this issue on the latest OBS and driver:
|
Hello again! First of all I must say that there was a little mistake, driver 20.5.1 IS the driver that starts to have the problem with VBAQ. 20.4.2 is the last version that works without a problem. Issue with the VBR_LAT persists on both 23.4.3 and 20.4.2. Apparently this is a completely separate. Videos will be uploaded in google drive because github limit is 25mb, they are about 30-40mb.
(VBAQ Part) 2.1 - 23.4.3. bitrate is 20000kbs. (VBAQ on by OBS default. VBV OBS default) As you can see, when there is a lot dark/grey colors, QP ramps up to 49 (guess that's limit because if set MaxQP=40, its stops at this value) 2.2 - 23.4.3. bitrate is 20000kbps. vbaq=false No weird behavior like with VBAQ enabled, but when there is fast movement, picture starts to hardly macroblocking. 2.3 - 23.4.3. bitrate is 20000kbps. vbaq=false. VBV=40000kbps Less macroblocking, but still is. Doesn't look like 20k bitrate 2.4 - 20.4.2. bitrate is 20000kbps. (VBAQ on by OBS default. VBV OBS default) Works as it has to be? Except VBAQ doesn't seem to do anything. (VBR_LAT Part) 2.5 - 23.4.3. bitrate 20000kbps. All obs default. VBR_LAT As i wrote before, every (i) frame QP jumps up like VBV is to small. 2.6 - 20.4.2. bitrate 20000kbps. All obs default. VBR_LAT Same behavior
(edited: OBS downloaded from github in zip format. Running --portable mode with all default settings, apart than those indicated. All drivers with clean installation. Windows 10 22H2. All updates at the time) |
Is this has been addressed? Is the issue has been able to reproduced? Anything? |
Thanks for the detailed report. I confirm reproduction. We are working to fix this issue in one of upcoming drivers. We will notify when the driver is released. |
Just to add unto this, tested VBR_LAT on my Rx 470 with OBS, exactly the same behavior seems to happen. Update: i had someone with an Rx 6950xt test this aswell, it also bumped the QP value on each keyframe(or so i would assume, since there was a burst o artifacting happening), using OBS and VBR_LAT ratecontrol. |
Regarding the quality loss with VBR_LAT and the QP jump on every I-frame, this is by design. VBR_LAT as a rate control method is specifically designed for low latency use cases and thus every frame is forcefully made to be of similar size. Thus an I-frame, which is supposed to be 6-8 times large than P-frames, is compressed in size to approximately match that of other frames in order to fit this particular rate control method's paradigm. So there will be such flickering. VBR_LAT is ideal for streaming in low bandwidth scenarios and not for recording. For recording, it is better to use other RC methods. |
A fix has been made internally regarding the VBAQ issue and will be available in a future public driver release. |
Any updates on this? Is the fix available? |
i guess not, the fix is supposedly to already be set... by driver side, tho this issue post here in github still aint closed, so who knows |
The corruption issue has been fixed in the public driver version 23.11.1. |
And a couple more screenshots just to show how broken it is right now. And the settings for the ffmpeg are. bitrate 20mbps, vbv x2 |
Is there any additional issue that i didn't understand? Your complaint is on "low-res" effect in dark scenes caused by compression artifacts, and vbaq makes it worse or does VBAQ causes these artifacts to appear in the first place?. I cannot open some pictures from few comments above, sadly, github doesn't allow it for some reason. One thing i can see is that in comparison, you use -spatial-aq and -temporal-aq for Ada, but only -vbaq for Vega... Nvidia had analog for -vbaq which was called Psycho Visual Tuning and referred in OBS code as psycho_aq. Now that option is... deprecated it seems? [i wonder what happened to it]. That means that commands used in latest example are not equivalent to each other, as different types of processing applied to both. On other note, correct me if i am wrong, but isn't lookahead also available for AMF [yes, i checked ffmpeg AMF documentation, there is -pa_lookahead_buffer_depth]? Hmmm... Is there an possibility for you to make some "raw" recording with high bitrate and high quality as sample for bug and then use transcoding with different variables on same exact sample to get more consistent results for bug reproduction? Then link source, transcoding commands and outputs with hint at what to look for and where/when. Also expected behaviour. |
To help investigate further, could you please provide the latest source clips and FFmpeg verbose log? As well any encoder settings if they have been changed. |
Describe the bug
VBAQ Quality loss in static dark areas with using OBS
Recording scenes with a lot of dark colors will result a low quality. (Screenshot 1)
In high motion, option give a lot cleaner image. (Screenshot 2)
VBAQ seems to work only in obs, ffmpeg visually gives the same result with off and on, quality in dark static stays good as intended.
Setting Filler_data to On helps a bit with quality in CBR.
Quality drops only after I-frame.
To Reproduce
Steps to reproduce the behavior:
https://github.com/e00E/obs-amf
https://github.com/obsproject/obs-amd-encoder
obs-ffmpeg: Add texture-based hardware AMD encoder obsproject/obs-studio#6508
Setup (please complete the following information):
Screenshots
Additional context
In H265 VBAQ visually gives nothing.
Drivers tested 21.12.1-22.5.2, 31.0.12000.20010.
All windows updates with clean installation.
Screenshot 3 is a sample.
The text was updated successfully, but these errors were encountered: