# Script
AMD users can finally encode higher quality video using OBS Studio, as version 28 comes
with an updated integration for AMD’s AMF encoder on your graphics card which lets you
use bframes!
And a lot of you were sending me this post on Reddit with a bunch of commands to use
bframes and squeeze the most quality out of it… only that post was wrong.
Most of those settings were either already defaults, things you can’t change, things
not in this implementation, or just shouldn’t be changed.
So here’s a guide for actually optimizing your AMD video encoder in OBS 28, albeit with
there being not a ton to do.
This video is sponsored by Curiosity Stream.
Help keep this documentation coming and get access to my own streaming site, Nebula bundled
with Curiosity Stream at the link below.
Alright, in case you missed it, a couple weeks ago I made a video detailing AMD’s video
encoder updates they released, finally allowing for the use of b-frames and some extra motion
quality stuff.
I also explain what that is, but effectively b-frames are reference frames that help improve
the quality of encoding, but with the results we saw showed only 1 b-frame was worth using,
anything else resulted in worse quality.
What I failed to mention was that b-frames apparently only work on RX6000 or higher GPUs.
Because AMD didn’t document this nor mention this in the Github update.
Yay.
So if you HAVE an RX6000 GPU, you can use b-frames with the new OBS update.
In this current beta we have to manually add it, so I’m going to walk you through some
commands to optimize your settings.
Jim, OBS’s creator, has already said he will add a UI element to control b-frames,
I would honestly expect it by the full release of 28, so just use that if it’s available
when you watch this.
There’s 3 main “arguments” that we’re looking at for customizing your AMD encoder
here, and you enter them in the “custom options” box at the bottom of your AMD encoder
settings.
This will work for AMD HW H264 and H265, though we’re primarily focusing on H264 here as
these really only matter for low-bitrate streaming, which is mostly going to be for Twitch.
AMD’s H265/HEVC encoder already looks significantly better at low bitrates than H264 anyway.
Remember you need an RX6000 series GPU for b-frames, but the rest of the arguments should
work with most other generations, albeit with varying results.
First, add “MaxNumRefFrames=4” without spaces as shown on-screen.
This allows for up to 4 reference frames - in general, not just b-frames - to be used, and
in my last video on the AMD encoder, I found this 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 just tells the encoder to use them at all.
Always have that on 1, since it’s a boolean for true/false, if you want b-frames.
Next we specify how many b-frames you want to use.
Both in my full testing in the last video and my samples for this one, best results
seemed to be with 1 b-frame, but you’re welcome to play around with more.
In my testing, 1 looked better than 2, and 3 (which is the max) caused too much encoding
lag on a RX6600 to actually be usable, as it 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 specifies how many b-frames are used in a row, so you
could specify 2 in BPicturesPattern but 1 in 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’s features are not documented well.
In my limited testing here, having PreAnalysis on seems to help preserve detail white reducing
blocking a teeny tiny bit, but at the cost of some colors smearing together.
So you gain line detail while losing some color detail.
I think I’d leave it off, personally, but I 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 years ago, 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, preserving some details in motion for sure.
But PreAnalysis AND HQMB at the same time just turns into a blurry mess.
So for RX6000 users, my recommendation would be “MaxNumRefFrames=4 BReferenceEnable=1
MaxConsecutiveBPictures=1 BPicturesPattern=1 HighQualityMotionBoostEnable=1” and for
older AMD users, “MaxNumRefFrames=4 HighQualityMotionBoostEnable=1” and that’s it.
No commas, spaces between each argument, but not between the argument and numbers.
Again, in the full release you can probably just use the UI to set a number for b-frames,
and then just enter the HQMB and Max ref frames numbers in the arguments.
This won’t magically make AMD’s encoder great or compete with anyone else’s, but
it’s a nice little quality bump you can get for free.
Covering this OBS update, the AMD encoder update and Intel's AV1 encoder has brought
out a LOT more support than I could have imagined the past couple weeks, and I just want to
say thank you.
I have received a ton of requests to cover more ways to use the AV1 encoder, HDR in OBS,
all the different OBS update bits and everything you can imagine - and I'm getting there as
quick as I can.
But really, I'm only able to drop EVERYTHING else and focus so significantly on these new
developments thanks to your support over on Nebula.
Nebula is my own creator-owned video streaming site where my videos are ad-free, higher quality
(as often noted with Microphone reviews) and I include lots of extra exclusive stuff that
I can't have on YouTube - such as extended cuts of quality comparisons, full sample downloads
from this video and 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 "First Images" that you should
check out.
Our bundle is priced more cheaply than anything I've honestly ever seen in this market, as
you get access to Curiosity Stream's massive library WITH Nebula thrown in for free for
under $15 per year.
That's a lot of content for your money, a higher value than just about any other site
can offer.
Sign up for the best deal in streaming and help me continue to provide tons of thorough
testing and documentation on this kind of tech at CuriosityStream.com/epos
Links to full documentation of this encoder update in OBS are linked below, along with
a playlist full of my other OBS v28 coverage so far.
I’m your Stream Professor reminding you to Be Kind, Rewind.