obs-ffmpeg: New default settings for AMD encoders
Description
Introducing new default AMD encoder settings for improved perceptual quality for AVC/HEVC/AV1. These new default settings have been tuned to target stable recording on RX 5700 XT and up on the recent driver.
Contains the changes from #9352 but with commits restructured.
| AVC | AVC | HEVC | HEVC | AV1 | AV1 | |
|---|---|---|---|---|---|---|
| Up to 1080p60fps | > 1080p60fps | Up to 1080p60fps | > 1080p60fps | Up to 1080p60fps | > 1080p60fps | |
| RATE_CONTROL_METHOD | CBR | CBR | CBR | CBR | CBR | CBR |
| PEAK_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE |
| VBV_BUFFER_SIZE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE | Same as TARGET_BITRATE |
| FILLER_DATA_ENABLE | TRUE | TRUE | TRUE | TRUE | TRUE | TRUE |
| ENFORCE_HRD | TRUE | TRUE | TRUE | TRUE | TRUE | TRUE |
| MAX_B_FRAMES | 2 | 0 | - | - | 2 | 0 |
| B_PIC_PATTERN | 2 | 0 | - | - | 2 | 0 |
| SCREEN_CONTENT_TOOLS | - | - | - | - | TRUE | TRUE |
| PALETTE_MODE | - | - | - | - | TRUE | TRUE |
| PRESET | Quality | Quality | Quality | Quality | high quality | Balanced |
| PROFILE | high | high | main/main10 | main/main10 | main | main |
| ENABLE_VBAQ/AQ_MODE | TRUE for RCMethod != (CQP | HQVBR | HQCBR) | TRUE for RCMethod != (CQP | HQVBR | HQCBR) | TRUE for RCMethod != (CQP | HQVBR | HQCBR) | TRUE for RCMethod != (CQP | HQVBR | HQCBR) | TRUE for RCMethod != (CQP | HQVBR | HQCBR) | TRUE for RCMethod != (CQP | HQVBR | HQCBR) |
| ADAPTIVE_MINIGOP | TRUE for B-frames > 0 and PA enabled | TRUE for B-frames > 0 and PA enabled | Not set | Not set | TRUE for B-frames > 0 and PA enabled | TRUE for B-frames > 0 and PA enabled |
Motivation and Context
This PR provides new recommended defaults for the AMD encoders that have been optimized for perceptual quality. The settings are automatically applied depending on the resolution and framerate. The default settings can be overridden as expected and only provide an improved base foundation for encoder settings targeted at improving perceptual quality.
How Has This Been Tested?
Tested on RX 5000, 6000, and 7000 series cards using public driver version 24.2.1.
Types of changes
- Tweak (non-breaking change to improve existing functionality)
Checklist:
- [x] My code has been run through clang-format.
- [x] I have read the contributing document.
- [x] My code is not on the master branch.
- [x] The code has been tested.
- [x] All commit messages are properly formatted and commits squashed where appropriate.
- [x] I have included updates to all appropriate documentation.
Hi @rhutsAMD,
I hope you're doing well!
I have a small request regarding the new default settings, would it be possible to include the "High Quality" preset as an available option for both AVC and HEVC encoding? It would be great if users could still manually choose their preferred preset as well.
Thanks so much for all the great work you're doing, it's truly appreciated!
@rhutsAMD
AMF_PA_SCENE_CHANGE_DETECTION_ENABLE should be disabled by default, to stay consistent with the way x264 and NVenc handle adaptive I-frames in OBS