AMF
AMF copied to clipboard
[Bug]: <Filler Data is not working correcly in dark scenes on h264 streaming>
Describe the bug filler data enabled does NOT work when encoding mostly dark video instead of pushing to 6000kbps it goes down under 1000kbps - what results in huge peaks
To Reproduce Steps to reproduce the behavior:
- filler data enabled
- stream a very dark scene (like loading screen)
Setup (please complete the following information):
- OS: Win11 latest
- Driver Version 23.12.1
- GPU RX 7700XT Pulse (but same problem even on RX5000 and up
- Which component has the issue: Encoder
Debug Log (please upload or paste):
not needed
Expected behavior bitrate stays at 6000kbps
Screenshots
Additional context download http://benmanshafen.de/streamdl/1080p60_amf-1703189298.flv - after i die by a cheater (several times) the bitrate goes down and peaks like crazy (shown in the screenshot)
OBS AMF FFmpeg CBR // 6000kbps // 2s // Quality // high // b-frames 3 AMF/FFmpeg: Quality=quality Profile=high ProfileLevel=42 MaxNumRefFrames=3 RateControlPreanalysisEnable=1 EnforceHRD=0 FillerDataEnable=true VBVBufferSize=2304000 InitialVBVBufferFullness=64 PeakBitrate=6500000 MinQP=21 MaxQP=48 MaxConsecutiveBPictures=3 BPicturesPattern=2 AdaptiveMiniGOP=true BReferenceEnable=true DeBlockingFilter=true EnableVBAQ=true HighMotionQualityBoostEnable=true HalfPixel=true QuarterPixel=true EnablePreAnalysis=true PASceneChangeDetectionEnable=false PAFrameSadEnable=true PALookAheadBufferDepth=0 PAPerceptualAQMode=1 PATemporalAQMode=2 PAHighMotionQualityBoostMode=1 PACAQStrength=2
I will show this to rate control folks after holidays. Meanwhile, for experiment could you please try three different runs:
- EnforceHRD=1
- RateControlPreanalysisEnable=0 AdaptiveMiniGOP=false and all PA features to false
- EnablePreAnalysis=false // this parameter works with AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR only
Thanks
thank you - this "fixes" the bug - but some of those settings would benefit the quality
merry christmas btw :)
I still want to investigate. Which change does fix the issue?
i only have to enable HRD - than it works fine ;)
ProfileLevel=42 MaxNumRefFrames=3 RateControlPreanalysisEnable=1 EnforceHRD=1 FillerDataEnable=true VBVBufferSize=2304000 InitialVBVBufferFullness=64 PeakBitrate=6000000 MinQP=21 MaxQP=48 MaxConsecutiveBPictures=3 BPicturesPattern=2 AdaptiveMiniGOP=true BReferenceEnable=true DeBlockingFilter=true EnableVBAQ=true HighMotionQualityBoostEnable=true HalfPixel=true QuarterPixel=true EnablePreAnalysis=true PASceneChangeDetectionEnable=false PAFrameSadEnable=true PALookAheadBufferDepth=0 PAPerceptualAQMode=1 PATemporalAQMode=2 PAHighMotionQualityBoostMode=1 PACAQStrength=2
resulting in: http://benmanshafen.de/streamdl/1080p60_amf-1703336085.flv
but i forget to use RateControlSkipFrameEnable=false will test with it again now :)
works fine with HRD enabled - and quality is pretty fine for 1080p60@6000kbps via AMF now we have this: http://benmanshafen.de/streamdl/1080p60_amf-1703337020.flv
with: ProfileLevel=42 MaxNumRefFrames=3 RateControlPreanalysisEnable=1 RateControlSkipFrameEnable=false EnforceHRD=1 FillerDataEnable=true VBVBufferSize=2304000 InitialVBVBufferFullness=64 PeakBitrate=6000000 MinQP=21 MaxQP=48 MaxConsecutiveBPictures=3 BPicturesPattern=2 AdaptiveMiniGOP=true BReferenceEnable=true DeBlockingFilter=true EnableVBAQ=true HighMotionQualityBoostEnable=true HalfPixel=true QuarterPixel=true EnablePreAnalysis=true PASceneChangeDetectionEnable=false PAFrameSadEnable=true PALookAheadBufferDepth=0 PAPerceptualAQMode=1 PATemporalAQMode=2 PAHighMotionQualityBoostMode=1 PACAQStrength=2
OK, thanks, it seems explicit set EnforceHRD=0 also disables filler data. The fix will be provided in the future drivers.