AMF icon indicating copy to clipboard operation
AMF copied to clipboard

[Bug]: PAHighMotionQualityBoostMode=1 Now Breaks My Encoder [RX6950XT]

Open LingWinny opened this issue 1 year ago • 39 comments

Describe the bug As soon as I put PAHighMotionQualityBoostMode=1 in my lines (EnablePreAnalysis=true PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false MaxNumRefFrames=3 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1) it makes my whole PC lag. Cannot close obs64.exe I have to End Task.

I just want to note that earlier this year I was using PAHighMotionQualityBoostMode=1 with my other lines without issues and it was the best I could make H264 look.

To Reproduce Steps to reproduce the behavior:

  1. Set the following properties 'CBR, 8000 Bitrate, Keyframe Int. 2, Preset Quality, Profile High, Max B-Frames 1 AMF/FFmpeg options: EnablePreAnalysis=true PAHighMotionQualityBoostMode=1 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false MaxNumRefFrames=3 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1'
  2. Start recording and notice how the preview lags and the whole PC isn't responsive.
  3. Submit input frame and see error

Setup (please complete the following information):

  • OS: [Windows 11]
  • Driver Version: [24.7.1]
  • GPU [RX 6950 XT]
  • Which component has the issue [H264]

Debug Log (please upload or paste):

No Data

Expected behavior Expected a nice smooth stream as it was before.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

LingWinny avatar Aug 22 '24 09:08 LingWinny

Could you please provide the other settings used for your recording such as the resolution and framerate?

rhutsAMD avatar Aug 22 '24 17:08 rhutsAMD

2560x1440 downscaled to 1792x1008 (also tried standard resolutions) 60fps Bicubic

Also I tested with only EnablePreAnalysis=true PAHighMotionQualityBoostMode=1 and same result. It lags my whole PC, it becomes stuttery, just pressing the Windows button takes a second to come up and it lags coming up.. so yeah. Not good ! 23.12.1 was, if I recall by memory, the last driver it worked well on.

LingWinny avatar Aug 22 '24 17:08 LingWinny

PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12

Ryu0833 avatar Sep 08 '24 16:09 Ryu0833

Very interesting, thank you for your discovery!

On Sep 8, 2024 12:27 p.m., Ryu0833 @.***> wrote: PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12

LingWinny avatar Sep 08 '24 16:09 LingWinny

Update

PAEngineType=4 and PAHighMotionQualityBoostMode=1 works for desktop but as soon as you load into a game and record a test, it skips frames like crazy. Literally unusable.. Hopefully we can find a way to fix this because that would put AMD closer to NVIDIA in terms of encoding in H264.

AMF Settings:

EnablePreAnalysis=true PAEngineType=4 PAHighMotionQualityBoostMode=1 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1

OBS settings:

1664x936 60FPS 8000 Bitrate Keyframe Int 2 Quality High Max B-Frames 1 Bicubic NV12 Rec. 709 Full Color Range Above Normal Priority

LingWinny avatar Sep 08 '24 18:09 LingWinny

PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12

1=Host(uses cpu resources) 4=OpenCL

''Host(1) DX11(3) OpenCL(4) Vulkan(10) DX12(11)''

Johl7 avatar Sep 08 '24 18:09 Johl7

Interesting, I'll play around with these PAEngineTypes

On Sep 8, 2024 2:53 p.m., Johl @.***> wrote:

PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12

1=host(uses cpu resources) 4=OpenCL ''Host(1) DX11(3) OpenCL(4) Vulkan(10) DX12(11)''

LingWinny avatar Sep 08 '24 19:09 LingWinny

Interesting, I'll play around with these PAEngineTypesOn Sep 8, 2024 2:53 p.m., Johl @.> wrote: PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12 1=host(uses cpu resources) 4=OpenCL ''Host(1) DX11(3) OpenCL(4) Vulkan(10) DX12(11)'' —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

tldr is tho, PAHMQB doesnt seem to be suitable for real time encoding, on past drivers it would only work if paired with lookahead, but 'recently' there was a change that made it to work(probably?) even without, and thats why it causes overloading issues now.

It might run well on RDNA3, i dunno, mines a 6650 XT.

Johl7 avatar Sep 08 '24 20:09 Johl7

Hmmm interesting.. Hopefully they find a way to make it work as it's much better with it from past experiencesOn Sep 8, 2024 4:02 p.m., Johl @.***> wrote:

Interesting, I'll play around with these PAEngineTypesOn Sep 8, 2024 2:53 p.m., Johl @.> wrote: PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12 1=host(uses cpu resources) 4=OpenCL ''Host(1) DX11(3) OpenCL(4) Vulkan(10) DX12(11)'' —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

tldr is tho, PAHMQB doesnt seem to be suitable for real time encoding, on past drivers it would only work if paired with lookahead, but 'recently' there was a change that made it to work(probably?) even without, and thats why it causes overloading issues now.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

LingWinny avatar Sep 08 '24 20:09 LingWinny

Interesting, I'll play around with these PAEngineTypesOn Sep 8, 2024 2:53 p.m., Johl @.> wrote: PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12 1=host(uses cpu resources) 4=OpenCL ''Host(1) DX11(3) OpenCL(4) Vulkan(10) DX12(11)'' —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: _@**.**_>

tldr is tho, PAHMQB doesnt seem to be suitable for real time encoding, on past drivers it would only work if paired with lookahead, but 'recently' there was a change that made it to work(probably?) even without, and thats why it causes overloading issues now.

It might run well on RDNA3, i dunno, mines a 6650 XT.

what's more interesting is that I was running using PAHMQB without the Lookahead in 23.12.1 drivers and prior drivers without any problems and now yeah... impossible to do so. I have an RX6950XT

LingWinny avatar Sep 08 '24 21:09 LingWinny

@LingWinny it been always working with Lookahead when lookahead=0 PAHMQP dont work

Ryu0833 avatar Sep 08 '24 23:09 Ryu0833

Makes sense, thanks for the clarification.On Sep 8, 2024 7:08 p.m., Ryu0833 @.***> wrote: @LingWinny it been always working with Lookahead when lookahead=0 PAHMQP dont work

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

LingWinny avatar Sep 09 '24 00:09 LingWinny

PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12

Incorrect. Here are the correct types

  • Host/CPU (1)
  • DX11 (3)
  • OpenCL (4)
  • Vulkan (10)
  • DX12 (11)

@LingWinny You need to format your posts. They're unreadable. The fact that PAHMQP worked without lookahead in previous drivers means it would auto-disable if you used it without.

While newer drivers most likely set a minimum amount of lookahead instead of the auto-disable.

lextra2 avatar Sep 10 '24 08:09 lextra2

PAHighMotionQualityBoostMode=1 it work only if you change the "PAEngineType" to dx11 or dx12 but well use more cpu i dont know why. PAEngineType=1=>dx11 PAEngineType=4=>dx12

Incorrect. Here are the correct types

  • Host/CPU (1)
  • DX11 (3)
  • OpenCL (4)
  • Vulkan (10)
  • DX12 (11)

@LingWinny You need to format your posts. They're unreadable. The fact that PAHMQP worked without lookahead in previous drivers means it would auto-disable if you used it without.

While newer drivers most likely set a minimum amount of lookahead instead of the auto-disable.

Sorry, I will reply here instead of Email from now on.

@lextra2 It really worked before without lookahead, It's not placebo as I did throughout testing (talking weeks and even months) testing the H264 encoder from AMD. Lookahead always made things worst for the encoder in my case.

LingWinny avatar Sep 15 '24 06:09 LingWinny

@lextra2 It really worked before without lookahead, It's not placebo as I did throughout testing (talking weeks and even months) testing the H264 encoder from AMD. Lookahead always made things worst for the encoder in my case.

Mhh, maybe motion estimation was set differently with 2023 driver if high motion quality mode was enabled?

Try HalfPixel=false QuarterPixel=false EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PALookAheadBufferDepth=11 PAHighMotionQualityBoostMode=1

lextra2 avatar Sep 15 '24 13:09 lextra2

@lextra2 It really worked before without lookahead, It's not placebo as I did throughout testing (talking weeks and even months) testing the H264 encoder from AMD. Lookahead always made things worst for the encoder in my case.

Mhh, maybe motion estimation was set differently with 2023 driver if high motion quality mode was enabled?

Try HalfPixel=false QuarterPixel=false EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PALookAheadBufferDepth=11 PAHighMotionQualityBoostMode=1

This is wayyyy blockier with those settings.

Here's the best settings I could've come up with in terms of quality with the newer drivers and I even tested without PA.

EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1

Unfortunately, doesn't work with PAHighMotionQualityBoostMode=1 anymore. I was using the settings shown above + PAHMQB before and it was really smooth looking. I'd say close to on par with NVIDIA's Pascal.

But it's the best AMD's H264 can do for now... which is pretty bad.. reminds me of the first NVIDIA's encoders in terms of quality which is pretty bad in 2024..

LingWinny avatar Sep 16 '24 22:09 LingWinny

@LingWinny hello for your setting"EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1" there some point you wann to change for some commend to work

  1. PATemporalAQMode=1 it work with PALookAheadBufferDepth<0 (11=short 21=miduim 41=long), and when PATemporalAQMode=1 and using PAPerceptualAQMode=1 the PACAQStrength=2 well be ignored.when using them both or one of 'PAPerceptualAQMode=1 PATemporalAQMode=1',EnableVBAQ=false well be ignored. and PATemporalAQMode=1 it is suitable for non-gaming applications so it will hurt the performance, if you use it in gaming try PATemporalAQMode=2.

  2. EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.

  3. RateControlPreanalysisEnable=0 yes it have good impact on performance maybe low in video quality but is not noticeable

*my suggestion is :

  1. without using "PreAnalysis": RateControlPreanalysisEnable=0 EnableVBAQ=false BPicturesPattern=1(try 2) HighMotionQualityBoostEnable=true(optional)

  2. if you want using "PreAnalysis" remember it will hurt performance: A) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PAPerceptualAQMode=1 PACAQStrength=0(or1) AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

B) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

C) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 PAPerceptualAQMode=1 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

try and choose the setting give you the best video quality for PAHighMotionQualityBoostMode=1 it still bug the encoder. thare is HighMotionQualityBoostEnable it work fin and good with Bframes and not good "PreAnalysis"

i hope it helps you get the best video quality

Ryu0833 avatar Sep 16 '24 23:09 Ryu0833

@LingWinny hello for your setting"EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1" there some point you wann to change for some commend to work

  1. PATemporalAQMode=1 it work with PALookAheadBufferDepth<0 (11=short 21=miduim 41=long), and when PATemporalAQMode=1 and using PAPerceptualAQMode=1 the PACAQStrength=2 well be ignored.when using them both or one of 'PAPerceptualAQMode=1 PATemporalAQMode=1',EnableVBAQ=false well be ignored. and PATemporalAQMode=1 it is suitable for non-gaming applications so it will hurt the performance, if you use it in gaming try PATemporalAQMode=2.
  2. EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.
  3. RateControlPreanalysisEnable=0 yes it have good impact on performance maybe low in video quality but is not noticeable

*my suggestion is :

  1. without using "PreAnalysis": RateControlPreanalysisEnable=0 EnableVBAQ=false BPicturesPattern=1(try 2) HighMotionQualityBoostEnable=true(optional)
  2. if you want using "PreAnalysis" remember it will hurt performance: A) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PAPerceptualAQMode=1 PACAQStrength=0(or1) AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

B) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

C) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 PAPerceptualAQMode=1 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

try and choose the setting give you the best video quality for PAHighMotionQualityBoostMode=1 it still bug the encoder. thare is HighMotionQualityBoostEnable it work fin and good with Bframes and not good "PreAnalysis"

i hope it helps you get the best video quality

My streaming is very fast paced.. Without PA it just cannot keep up. I have tested these for months now. My settings were the best I could do. PATemporalAQMode=1-2 PAPerceptualAQMode=1 PACAQStrength=0-1 are the only ones that may seem placebo to me. AdaptiveMiniGOP=true hurts the quality.

Thank you for the infos though !

LingWinny avatar Sep 16 '24 23:09 LingWinny

@Ryu0833

EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.

AMF_PA_PAQ_MODE and AMF_PA_TAQ_MODE cannot work with VBAQ (AMF_VIDEO_ENCODER_ENABLE_VBAQ) features. When AMF_PA_PAQ_MODE or AMF_PA_TAQ_MODE is enabled, VBAQ settings are ignored.

Source

"HQ" presets use AMF_PA_TAQ_MODE_2 and therefore vbaq will do nothing in those presets

lextra2 avatar Sep 17 '24 00:09 lextra2

@LingWinny hello for your setting"EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1" there some point you wann to change for some commend to work

  1. PATemporalAQMode=1 it work with PALookAheadBufferDepth<0 (11=short 21=miduim 41=long), and when PATemporalAQMode=1 and using PAPerceptualAQMode=1 the PACAQStrength=2 well be ignored.when using them both or one of 'PAPerceptualAQMode=1 PATemporalAQMode=1',EnableVBAQ=false well be ignored. and PATemporalAQMode=1 it is suitable for non-gaming applications so it will hurt the performance, if you use it in gaming try PATemporalAQMode=2.
  2. EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.
  3. RateControlPreanalysisEnable=0 yes it have good impact on performance maybe low in video quality but is not noticeable

*my suggestion is :

  1. without using "PreAnalysis": RateControlPreanalysisEnable=0 EnableVBAQ=false BPicturesPattern=1(try 2) HighMotionQualityBoostEnable=true(optional)
  2. if you want using "PreAnalysis" remember it will hurt performance: A) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PAPerceptualAQMode=1 PACAQStrength=0(or1) AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

B) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

C) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 PAPerceptualAQMode=1 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

try and choose the setting give you the best video quality for PAHighMotionQualityBoostMode=1 it still bug the encoder. thare is HighMotionQualityBoostEnable it work fin and good with Bframes and not good "PreAnalysis"

i hope it helps you get the best video quality

After testing PAQ=0-1 TAQ=0-1-2 PACAQ=0-1-2 in every combination I could. My settings were still better looking for what I do. Thanks anyways !

LingWinny avatar Sep 17 '24 00:09 LingWinny

@LingWinny hello for your setting"EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1" there some point you wann to change for some commend to work

  1. PATemporalAQMode=1 it work with PALookAheadBufferDepth<0 (11=short 21=miduim 41=long), and when PATemporalAQMode=1 and using PAPerceptualAQMode=1 the PACAQStrength=2 well be ignored.when using them both or one of 'PAPerceptualAQMode=1 PATemporalAQMode=1',EnableVBAQ=false well be ignored. and PATemporalAQMode=1 it is suitable for non-gaming applications so it will hurt the performance, if you use it in gaming try PATemporalAQMode=2.
  2. EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.
  3. RateControlPreanalysisEnable=0 yes it have good impact on performance maybe low in video quality but is not noticeable

*my suggestion is :

  1. without using "PreAnalysis": RateControlPreanalysisEnable=0 EnableVBAQ=false BPicturesPattern=1(try 2) HighMotionQualityBoostEnable=true(optional)
  2. if you want using "PreAnalysis" remember it will hurt performance: A) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PAPerceptualAQMode=1 PACAQStrength=0(or1) AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

B) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false C) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 PAPerceptualAQMode=1 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false try and choose the setting give you the best video quality for PAHighMotionQualityBoostMode=1 it still bug the encoder. thare is HighMotionQualityBoostEnable it work fin and good with Bframes and not good "PreAnalysis" i hope it helps you get the best video quality

After testing PAQ=0-1 TAQ=0-1-2 PACAQ=0-1-2 in every combination I could. My settings were still better looking for what I do. Thanks anyways !

for my streaming the best settings after many test was without PreAnalysis: RateControlPreanalysisEnable=0 EnableVBAQ=false EnforceHRD=true FillerDataEnable=true PreAnalysis need more gpu power in the encoder and i did have alot of drop fps when enable but for you try every combination test now am test MinQP=value from (20-23) and have good stream for now

image

image In the following parameter settings, both the "vbaq" and "pa_taq_mode" parameters are set. However, because "pa_taq_mode" has a higher priority than "vbaq" when "pa_taq_mode" is set to 1 or 2, "vbaq" is ignored. The two command lines below have the same effect in the encoder.

and try use this to Help you understand the priorities if you want more info vist this wiki:https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/AMF%20Encoder%20Settings%20and%20Tuning%20in%20FFmpeg

Ryu0833 avatar Sep 17 '24 02:09 Ryu0833

@Ryu0833

EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.

AMF_PA_PAQ_MODE and AMF_PA_TAQ_MODE cannot work with VBAQ (AMF_VIDEO_ENCODER_ENABLE_VBAQ) features. When AMF_PA_PAQ_MODE or AMF_PA_TAQ_MODE is enabled, VBAQ settings are ignored.

Source

"HQ" presets use AMF_PA_TAQ_MODE_2 and therefore vbaq will do nothing in those presets

"HQ" presets use EnablePreAnalysis=true AMF_PA_TAQ_MODE_2 work only in rc=CBR,VBR

Ryu0833 avatar Sep 17 '24 02:09 Ryu0833

@Ryu0833

EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.

AMF_PA_PAQ_MODE and AMF_PA_TAQ_MODE cannot work with VBAQ (AMF_VIDEO_ENCODER_ENABLE_VBAQ) features. When AMF_PA_PAQ_MODE or AMF_PA_TAQ_MODE is enabled, VBAQ settings are ignored.

Source "HQ" presets use AMF_PA_TAQ_MODE_2 and therefore vbaq will do nothing in those presets

"HQ" presets use EnablePreAnalysis=true AMF_PA_TAQ_MODE_2 work only in rc=CBR,VBR

We're talking about streaming here, so CBR only.

LingWinny avatar Sep 17 '24 02:09 LingWinny

@LingWinny hello for your setting"EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1" there some point you wann to change for some commend to work

  1. PATemporalAQMode=1 it work with PALookAheadBufferDepth<0 (11=short 21=miduim 41=long), and when PATemporalAQMode=1 and using PAPerceptualAQMode=1 the PACAQStrength=2 well be ignored.when using them both or one of 'PAPerceptualAQMode=1 PATemporalAQMode=1',EnableVBAQ=false well be ignored. and PATemporalAQMode=1 it is suitable for non-gaming applications so it will hurt the performance, if you use it in gaming try PATemporalAQMode=2.
  2. EnableVBAQ=true work good when using rc=HQCBR,HQVBR,CQP when dont this rc EnableVBAQ=false it good for get the best quality.
  3. RateControlPreanalysisEnable=0 yes it have good impact on performance maybe low in video quality but is not noticeable

*my suggestion is :

  1. without using "PreAnalysis": RateControlPreanalysisEnable=0 EnableVBAQ=false BPicturesPattern=1(try 2) HighMotionQualityBoostEnable=true(optional)
  2. if you want using "PreAnalysis" remember it will hurt performance: A) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PAPerceptualAQMode=1 PACAQStrength=0(or1) AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false

B) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false C) RateControlPreanalysisEnable=0 EnablePreAnalysis=true PAEngineType=4 PALookAheadBufferDepth=20 PATemporalAQMode=2 PAPerceptualAQMode=1 AdaptiveMiniGOP=true MaxConsecutiveBPictures=2(try 3 if dont have problem use it) PASceneChangeDetectionSensitivity=false try and choose the setting give you the best video quality for PAHighMotionQualityBoostMode=1 it still bug the encoder. thare is HighMotionQualityBoostEnable it work fin and good with Bframes and not good "PreAnalysis" i hope it helps you get the best video quality

After testing PAQ=0-1 TAQ=0-1-2 PACAQ=0-1-2 in every combination I could. My settings were still better looking for what I do. Thanks anyways !

for my streaming the best settings after many test was without PreAnalysis: RateControlPreanalysisEnable=0 EnableVBAQ=false EnforceHRD=true FillerDataEnable=true PreAnalysis need more gpu power in the encoder and i did have alot of drop fps when enable but for you try every combination test now am test MinQP=value from (20-23) and have good stream for now

image

image In the following parameter settings, both the "vbaq" and "pa_taq_mode" parameters are set. However, because "pa_taq_mode" has a higher priority than "vbaq" when "pa_taq_mode" is set to 1 or 2, "vbaq" is ignored. The two command lines below have the same effect in the encoder.

and try use this to Help you understand the priorities if you want more info vist this wiki:https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/AMF%20Encoder%20Settings%20and%20Tuning%20in%20FFmpeg

Those settings were not as good.. not even close unfortunately. Also, EnforceHRD=true FillerDataEnable=true are already set to true by default when you use CBR (which you HAVE to if you're streaming).

LingWinny avatar Sep 17 '24 02:09 LingWinny

UPDATE These are still the best until AMD fixes PAHMQB:

EnablePreAnalysis=true PAEngineType=4 PASceneChangeDetectionEnable=false PAPerceptualAQMode=1 PATemporalAQMode=1 PACAQStrength=2 EnableVBAQ=false RateControlPreanalysisEnable=0 MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1

I don't have drops in frames compared to yours. My 6950XT handles PA just fine. Sorry if your system is struggling. Tested all my evening but still back to the start! We'll just have to wait for AMD to fix PAHMQB. As [rhutsAMD] said, it is broken.

Just edited this to add that I'm not using useless lines of code here. Made sure to not write something that was already off or on by default.

LingWinny avatar Sep 17 '24 02:09 LingWinny

@Ryu0833

AMF_PA_TAQ_MODE_2 work only in rc=CBR,VBR

Incorrect. HQcbr & HQvbr are "HQ" presets and therefore use AMF_PA_TAQ_MODE_2 by default.

lextra2 avatar Sep 17 '24 12:09 lextra2

@Ryu0833

AMF_PA_TAQ_MODE_2 work only in rc=CBR,VBR

Incorrect. HQcbr & HQvbr are "HQ" presets and therefore use AMF_PA_TAQ_MODE_2 by default.

@LingWinny

We're talking about streaming here, so CBR only.

Yeah. No shit. HQcbr is for streaming.

Don't reply my name, I wasn't talking to you. I know YOU knew what we were talking about but Ryu was way off here. Don't no shit me.

LingWinny avatar Sep 17 '24 12:09 LingWinny

Don't reply my name, I wasn't talking to you

My bad. GitHubs quoting is just terrible.

lextra2 avatar Sep 17 '24 14:09 lextra2

Don't reply my name, I wasn't talking to you

My bad. GitHubs quoting is just terrible.

no worries mate !

LingWinny avatar Sep 19 '24 12:09 LingWinny

@LingWinny Have you tried MaxConsecutiveBPictures=0 ? I have found this bug, maybe the same is true for PAHighMotionQualityBoostMode ?

lextra2 avatar Sep 25 '24 17:09 lextra2