AMD Encoder Optimization Guide - OBS Studio 28

New Features and Optimizations in OBS Studio 28: A Guide for AMD Users

As of version 28, OBS Studio now features an updated integration with AMD's AMF encoder on your graphics card, allowing users to utilize b-frames. This may seem like a promising feature, but some Reddit users were sending incorrect settings to use b-frames and squeeze the most quality out of it. Unfortunately, most of these settings were either already set as defaults or not applicable in this implementation. In this article, we will delve into the correct settings for optimizing your AMD video encoder in OBS 28.

AMD's Video Encoder Updates

A couple of weeks ago, I released a video detailing AMD's video encoder updates, which have finally allowed for the use of b-frames and some extra motion quality features. B-frames are reference frames that help improve the quality of encoding. However, the results were not as expected, with only one b-frame showing significant improvement. It was later discovered that b-frames only work on RX6000 or higher GPUs. This information was not documented in the GitHub update and was only revealed after some testing.

Using B-frames in OBS 28

Since you have an RX6000 GPU, you can now use b-frames with the new OBS update. However, as of this beta version, you must manually add it. To do this, we will explore three main arguments that can be used to customize your AMD encoder settings.

Arguments for Customizing Your AMD Encoder

The three main arguments are:

1. **MaxNumRefFrames**: This argument allows for up to 4 reference frames in general, not just b-frames. It was found to have a desirable improvement during my last video on the AMD encoder.

2. **BReferenceEnable**: This argument tells the encoder to use b-frames at all. Always set this to 1 since it's a boolean for true/false.

3. **BPicturesPattern** and **MaxConsecutiveBPictures**: These arguments specify how many b-frames are used in a row. Best results were seen with 1 b-frame, but you're welcome to play around with more.

PreAnalysis

AMD's PreAnalysis feature is somewhat like 2-pass encoding, but its features are not documented well. My limited testing showed that having PreAnalysis helps preserve detail while reducing blocking. However, it comes at the cost of some colors smearing together. This may be beneficial for you personally, but I wouldn't recommend it.

High Motion Quality Boost

The High Motion Quality Boost feature was added to the encoder a couple of years ago but isn't as significant as it sounds. It can help preserve details in motion and is worth using on its own. However, when combined with PreAnalysis, it turns into a blurry mess. For RX6000 users, my recommended settings are **MaxNumRefFrames=4 BReferenceEnable=1 MaxConsecutiveBPictures=1 BPicturesPattern=1 HighQualityMotionBoostEnable=1**. For older AMD users, the recommended settings are **MaxNumRefFrames=4 HighQualityMotionBoostEnable=1**.

Conclusion

Covering this OBS update and the AMD encoder update has brought out a lot of support, which I'm grateful for. As you can imagine, there's been an overwhelming number of requests to cover more ways to use the AV1 encoder, HDR in OBS, different OBS update bits, and everything else. However, due to your support over on Nebula, I've been able to focus significantly on these new developments.

Nebula

If you're interested in exploring more content like this, I recommend checking out my own creator-owned video streaming site called Nebula. My videos are ad-free, higher quality (as often noted with Microphone reviews), and include lots of extra exclusive stuff such as extended cuts of quality comparisons, full sample downloads from past quality analysis videos, and so on.

The best way to sign up for Nebula is through the bundle we've made with Curiosity Stream – another awesome video site full of documentaries and wonderful nonfiction work. I've been obsessed with all the new photos coming out of the James Webb telescope, and Curiosity Stream has a new show all about them called [insert title here].

Supporting OBS Studio

The best way to support OBS Studio is by signing up for Nebula and sharing this content with others who may be interested in optimizing their AMD video encoder. I'm grateful for your support over on Nebula, which allows me to focus on covering the latest updates and developments in OBS Studio.

"WEBVTTKind: captionsLanguage: en# ScriptAMD users can finally encode higher qualityvideo using OBS Studio, as version 28 comeswith an updated integration for AMD’s AMFencoder on your graphics card which lets youuse bframes!And a lot of you were sending me this poston Reddit with a bunch of commands to usebframes and squeeze the most quality out ofit… only that post was wrong.Most of those settings were either alreadydefaults, things you can’t change, thingsnot in this implementation, or just shouldn’tbe changed.So here’s a guide for actually optimizingyour AMD video encoder in OBS 28, albeit withthere being not a ton to do.This video is sponsored by Curiosity Stream.Help keep this documentation coming and getaccess to my own streaming site, Nebula bundledwith Curiosity Stream at the link below.Alright, in case you missed it, a couple weeksago I made a video detailing AMD’s videoencoder updates they released, finally allowingfor the use of b-frames and some extra motionquality stuff.I also explain what that is, but effectivelyb-frames are reference frames that help improvethe quality of encoding, but with the resultswe saw showed only 1 b-frame was worth using,anything else resulted in worse quality.What I failed to mention was that b-framesapparently only work on RX6000 or higher GPUs.Because AMD didn’t document this nor mentionthis in the Github update.Yay.So if you HAVE an RX6000 GPU, you can useb-frames with the new OBS update.In this current beta we have to manually addit, so I’m going to walk you through somecommands to optimize your settings.Jim, OBS’s creator, has already said hewill add a UI element to control b-frames,I would honestly expect it by the full releaseof 28, so just use that if it’s availablewhen you watch this.There’s 3 main “arguments” that we’relooking at for customizing your AMD encoderhere, and you enter them in the “customoptions” box at the bottom of your AMD encodersettings.This will work for AMD HW H264 and H265, thoughwe’re primarily focusing on H264 here asthese really only matter for low-bitrate streaming,which is mostly going to be for Twitch.AMD’s H265/HEVC encoder already looks significantlybetter at low bitrates than H264 anyway.Remember you need an RX6000 series GPU forb-frames, but the rest of the arguments shouldwork with most other generations, albeit withvarying results.First, add “MaxNumRefFrames=4” withoutspaces as shown on-screen.This allows for up to 4 reference frames - ingeneral, not just b-frames - to be used, andin my last video on the AMD encoder, I foundthis to have a desirable improvement.Now we get to some customization.B-Frames are next.You actually need 3 arguments for b-frames.First is “BReferenceEnable=1” which justtells the encoder to use them at all.Always have that on 1, since it’s a booleanfor true/false, if you want b-frames.Next we specify how many b-frames you wantto use.Both in my full testing in the last videoand my samples for this one, best resultsseemed to be with 1 b-frame, but you’rewelcome to play around with more.In my testing, 1 looked better than 2, and3 (which is the max) caused too much encodinglag on a RX6600 to actually be usable, asit dropped 25 to 50% of frames.Use “MaxConsecutiveBPictures=1” and “BPicturesPattern=1”for 1, or replace it with 2 for 2 b-frames.Technically that first argument specifieshow many b-frames are used in a row, so youcould specify 2 in BPicturesPattern but 1in MaxConsecutive and play around with it,but I would not expect worthwhile results.Next up is PreAnalysis.This is KIND OF like 2-pass encoding, AMD’sfeatures are not documented well.In my limited testing here, having PreAnalysison seems to help preserve detail white reducingblocking a teeny tiny bit, but at the costof some colors smearing together.So you gain line detail while losing somecolor detail.I think I’d leave it off, personally, butI know some prefer it on.To do this, use “EnablePreAnalysis=1”.Lastly we have “High Motion Quality Boost.”This was added to the encoder a couple yearsago, but isn’t as significant as it sounds,and is off by default.You can add this with “HighQualityMotionBoostEnable=1”but I would…use one or the other.HQMB on its own looks alright, preservingsome details in motion for sure.But PreAnalysis AND HQMB at the same timejust turns into a blurry mess.So for RX6000 users, my recommendation wouldbe “MaxNumRefFrames=4 BReferenceEnable=1MaxConsecutiveBPictures=1 BPicturesPattern=1HighQualityMotionBoostEnable=1” and forolder AMD users, “MaxNumRefFrames=4 HighQualityMotionBoostEnable=1”and that’s it.No commas, spaces between each argument, butnot between the argument and numbers.Again, in the full release you can probablyjust use the UI to set a number for b-frames,and then just enter the HQMB and Max ref framesnumbers in the arguments.This won’t magically make AMD’s encodergreat or compete with anyone else’s, butit’s a nice little quality bump you canget for free.Covering this OBS update, the AMD encoderupdate and Intel's AV1 encoder has broughtout a LOT more support than I could have imaginedthe past couple weeks, and I just want tosay thank you.I have received a ton of requests to covermore ways to use the AV1 encoder, HDR in OBS,all the different OBS update bits and everythingyou can imagine - and I'm getting there asquick as I can.But really, I'm only able to drop EVERYTHINGelse and focus so significantly on these newdevelopments thanks to your support over onNebula.Nebula is my own creator-owned video streamingsite where my videos are ad-free, higher quality(as often noted with Microphone reviews) andI include lots of extra exclusive stuff thatI can't have on YouTube - such as extendedcuts of quality comparisons, full sample downloadsfrom this video and past quality analysisvideos, and so on.The best way to sign up for Nebula is throughthe bundle we've made with Curiosity Stream- another awesome video site full of documentariesand wonderful nonfiction work.I've been OBSESSED with all the new photoscoming out of the James Webb telescope, andCuriosity Stream has a new show all aboutthem called \"First Images\" that you shouldcheck out.Our bundle is priced more cheaply than anythingI've honestly ever seen in this market, asyou get access to Curiosity Stream's massivelibrary WITH Nebula thrown in for free forunder $15 per year.That's a lot of content for your money, ahigher value than just about any other sitecan offer.Sign up for the best deal in streaming andhelp me continue to provide tons of thoroughtesting and documentation on this kind oftech at CuriosityStream.com/eposLinks to full documentation of this encoderupdate in OBS are linked below, along witha playlist full of my other OBS v28 coverageso far.I’m your Stream Professor reminding youto Be Kind, Rewind.\n"