AMD has released a new update to the AMF Encoder SDK. version 1.4.26, It has some new features, including a new “Quality Boost” mode called PreAnalysis. Chris Griffiths of Code Calamity We were able to get some hands-on time with the latest update to determine if this new boost mode is a good fit for you. Ultimately, this feature improves AMF encoding quality by 1-2%, but at a significant performance cost.
For starters, AMF is AMD’s latest GPU hardware H.264 encoder built into modern GPUs like the RX 6000 series for video encoding and live gameplay recording/streaming. This is effectively AMD’s counter to Nvidia’s NVENC encoder.
PreAnalysis is a new content-adaptive quantization technique implemented in AMD encoders. Essentially, this gives AMF more control over the amount of I-frames implemented in each video. He also gives AMF the ability to skip frames if desired.
Griffith tested several AMF encoder options to measure quality improvements with the new PreAnalysis feature. He tested with B-frames and pre-analysis enabled, B-frames only (as provided in the 2022 and earlier updates), and with both features disabled. The test benchmarked him with a score of 0 (not watchable) to 100 (perfect) for him on Netflix’s VMAF application.
At 5000 KBps, AMD’s AMF encoder without B-frames or pre-analysis enabled achieved a respectable 94.1215 score at a speed of 139.21 FPS. Enabling B-frames improved the score by 1 point to 95.3877, but the frame rate dropped significantly to 83.75 FPS. Still, this performance is good enough for typical use cases like live streaming gameplay at 60 FPS.
With B-Frames and Pre-Analysis enabled, the encoder jumps another point with a score of 96.0697. But the frame rate is just 26.03 FPS, which is incredibly fast.
By examining the number of I-frames implemented in each run, we can see why the AMF encoder is so aggressive when performing pre-analysis. With this feature disabled, the amount of I-frames is only 13, but with this feature enabled (along with B-frames) the number of i-frames nearly doubles to 22.
This gives the decoder more data points to process, better pixel prediction, and better video quality. However, this results in a much higher load on the encoder and extremely slow frame rates. In fact, it makes live streaming at 30 FPS or 60 FPS impossibly slow. However, this statement turned out to be only partially true, so more on that later.
|Constitution:||VMAF score||frame rate||Percentage difference from VMAF||Percentage difference from FPS||I-frame|
|B-frame or pre-parse disabled||94.1215||139.21FPS||Base line||Base line||13|
|B-frame only||95.3877||83.75FPS||1.345% improvement||39.8% reduction||13|
|B-frames and preparsing enabled||96.0697||26.03 FPS||2.069% improvement||81.3% reduction||twenty two|
But for video encoding, AMD’s AMF encoder with PreAnalysis is a good choice. This effectively matches Nvidia’s proven NVENC encoder, which features his VMAF score of 96.37 (vs. 96.0697) for the same video and bitrate. It will probably still be slower in the initial rendering process, but the quality will be at least comparable.
Technically pre-analysis can be used in live gameplay, but the effect is mediocre
o Despite Code Calamity results, Pre-Analysis is too expensive for real-time streaming. This seems to be only partially true.Streaming expert and YouTuber girlfriend EposVox has released a new video Today’s AMF Encoder Optimization Guide, Demonstration of pre-analysis in live gameplay with the new OBS beta 28 update.
I’m not sure what’s going on here, but it’s worth mentioning that H.264 has an almost endless number of hidden presets and configurations that you can tweak behind the scenes. Griffin’s H.264 option was likely too focused on his AMF with Pre-Analysis enabled, as EposVox was able to use this feature in real-time at 60FPS for him, and he was less than happy with the performance. Didn’t complain about the issue.
Nonetheless, EposVox says the feature can slightly improve details in moving images while also reducing pixelation. Unfortunately, this makes sharpness almost unnoticeable. So if you have enough encoding headroom it’s worth turning it on, but if you run into encoder latency issues you should probably turn it off first.
Unfortunately, EposVox hasn’t done any performance testing with this feature on his new video alone, but it looks like the feature works just fine in live gameplay. At least in his new OBS 28 Beta Update.
PreAnalysis does not save AMF from Intel’s AV1 encoder
PreAnalysis can’t save AMD’s AMF encoder from Intel’s brand new AV1 encoder. Intel’s new AV1 encoder dominates all H.264 offerings, as shown in our previous article.
Code Calamity’s results cannot be compared with those shown by EposVox in their previous article on AV1. Still, it’s easy to see that PreAnalysis is easily subverted by Intel’s AV1 encoder.
In a quick recap, the AV1 encoder built into Intel’s new Arc discrete GPU outperformed both Nvidia’s NVENC encoder and AMD AMF by a whopping 16% in real-time gaming tests.
It may not sound like much, but compared to the 1-2% performance improvement from adding B-frames and pre-analysis to AMF, it’s a day-to-night difference. As a result, it doesn’t come close to the performance results of Intel’s AV1 encoder, but it certainly behaves the same.
But this is not at all surprising. At this point both AMD and Nvidia (presumably Intel also uses QuickSync) seem to have reached the absolute limits of H.264 capabilities. Hardware encoding performance improvements have largely leveled off since 2018 with the launch of the RTX 20 series. So, with all the attention on AV1 right now, we should see AMD build an all-new AV1 encoder for the Radeon 7000 and see the vastly improved video quality change.