# H264 or x264?



## InuyaLahdo (Dec 26, 2021)

Hey dear, Open Broadcasting Software forum!

Today I changed to H264/AVC Encoder (AMD Advanced Media Framework) which was before on "veryfast" x264..

I also did experiments on medium up to ultrafast (ultrafast is too extremely pixelated, and medium is not pixelated, and in realities like "The Medium" it will cause output lags on Twitch while I experience no frame drops at all)..

On ultrafast the pixelation was higher than on veryfast, today I want to try the GPU encoder..

I use the AMD RX 570 8GB Sapphire Nitro, and AMD R5 2600, would you change to AMDH264 to broadcast in 1080p60 downscale to 900p60 or keep it on x264?


My new preset for Twitch is:

Quality Preset: Balanced
Profile: Main
Profile Level: Automatic
Coding Type: Automatic
Maximum Reference Frames is 4
Rate Control Method is CBR
Pre-Pass Mode is disabled
5796 targeted bitrate +-
Minimum QP 18
Maximum QP 51
Filler Data is enabled
skipping every 9th frame
Skip-Frame Period 0
VBAQ is disabled
Enforce HRD is enabled
High Motion Quality Boost is enabled
VBV Buffer is automatic
VBV Buffer Strictness is fifty
VBV Buffer Initial Fulness is a one-hundred
Keyframe Interval is 2
IDR Period in frames is zero
I-Frame-Interval is zero
P-Frame Interval is zero
P-Frame Period is zero in frames
Deblocking Filter is enabled
Motion Estimation is quarter- & Half- Pixel
Video API is Direct3D 11
Video Adapter is Radeon RX570 Series (VEN_10002/DEV_67df/SUB_e3531da2/REV_00ef)
OpenCL Transfer is disabled
OpenCL Conversion is disabled
Multi-Threading is disabled (thinking about to enable it because of my R5 2600)

Still I can only use that one computer for broadcasting, I am looking forward to spent on an RX6.9K 16GB GPU + R9s + 256GB RAM for and use the other device only for OBS work connected with an VGA capture device and additional hardwares..

What do you think about that, and do you have any experienced optimization advices?


----------



## InuyaLahdo (Dec 26, 2021)

https://obsproject.com/logs/NxxfnOma3Uds5TKy


----------



## FerretBomb (Dec 26, 2021)

x264 is a software encoder stack for H.264 video compression.
The slower the preset, the better the quality/less bitrate is needed, but the more CPU it will use.
There is no replacement for raw bitrate, in the end.

Unfortunately, the AMD AMF hardware encoder is extremely poor quality, and uses game-rendering resources for encoding. It's also so badly supported by AMD, the long-suffering main dev supporting it in OBS finally dropped it and walked away after a technical issue reach-out, AMD tried to refer him... to himself, to answer any questions he might have. Not by name, just 'talk to the OBS dev supporting it'.

If possible, it'd be suggested to swap to an nVidia 20 or 30-series card. NVENC produces video on-par with x264 Slow, with no in-game performance impact as it is a separate part of the GPU die specifically for video encoding. Probably not an option with the current GPU drought.
If it was me, I'd stick with software x264 just to avoid the performance issues, much less the poor quality.


----------



## 52rpm (Dec 26, 2021)

Just next time never buy AMD GPU! 10 years same old tehnalogies stoneage encoder with shit quality and poor performance.AMD dont support game streaming and amd dont care about encoder next time pay 50$ more buy NVIDIA! and *never never never *buy AMD GPU FCK OFF AMD GPU ENCODER!


----------



## InuyaLahdo (Dec 28, 2021)

I appreciate your response to these.

Yes, I also had a good experience with my x264, somehow I needed some activities like in "The Medium" to set the preset from medium to veryfast.

Now I am going to try that again with the preset on "faster", the issue is mostly, that if it is set to slow, that I will not realize the encoding lags, while with the GPU I realize it if I have encoding problems, and so on.

Thank you either guy.


----------

