Question / Help Strange encoding behavior with x264

Lootling

New Member
Hey there...maybe someone can explain a little bit.

Setup: Threadripper 1950x @3850MHz - 16GB DDR4-3000 - Elgato HD60Pro Capture Card
Latest OBS 21.1.2 with preset slow 1080p@60 - 6k bitrate - Custom Buffer 8k (please, don't comment on this - i know that every answer is "don't use custom buffer", but that's actually not the point)

In several games there is a really strange behavior while encoding. For example the notice boards in Witcher 3 - encoder overload with nearly no cpu usage (around 10%). Closing notice board fixes the overload instant. Another point: using "new network code" in OBS shows 6k bitrate while overloading - without "new network code" bitrate breaks down to 3/4k while overloading (NO network issue on my side) and goes back to normal when leaving the board.

Tried with the OBS version 20.1 (because of newer libx264) - no overload (without custom command - no problems)

Can someone explain why this happen with the old libx264?
Bottleneck on pc-side? (but why not with newer lib)

And...last but not least - when will OBS update the libx264?

thanks for reading and sry for bad language - tried to explain as good as i can

--done--
 
Last edited:
Impossible to say without good log files.

The first rule of asking for help when troubleshooting is (or at least should be) to use the recommended settings and see if the problems go away. So while you may want to use a custom buffer size, or custom x264 commands, or non-default presets, if you're going to ask for help you should set those back to the defaults first and demonstrate that the problem still exists. Or at least do the work ahead of time to show that with defaults it works, with a specific custom setting it breaks.

So, as a troubleshooting step, get rid of your custom buffer size, get rid of the custom x264 commands, and set the preset to something more reasonable, like Fast, and see if the problem still occurs. If it does, then you've automatically eliminated the time-waster of everyone who's going to come in here and blame your customizations as the problem. If it doesn't, then you know one of your custom changes is at fault. Basic troubleshooting.

As for your libx264 questions, I don't know, trying searching here for the answer: https://obsproject.com/forum/list/general-development.21
 
Maybe i wasn't clear enough. Actually there is no problem (50 dropped frames from encoding lag in hours of streaming) - we have a stable encode with good (not perfect) quality. It was more a question for explanation. ^^

Couldn't find anything in x264 changelogs that points to a bug, but with the newer x264lib the problem is gone in every case. (maybe optimization? don't know)

I searched OBS roadmap/forum if there's an entry for the newer x264lib, but nope...found nothing. So the question about "update of libx264 in obs" was addressed to the obs devs.(if they read it)

Anyways...thanks for reply

--done--
 
Last edited:
I don't get it. You said you saw encoder overload and then you said you only dropped 50 frames in an hour of streaming. These statements are conflicting.

Encoder overload with the CPU at 10% indicates something else is the bottleneck, probably the GPU. But without log files, its purely a guess. So if you actually want help, post your log files that illustrate whatever the problem is.

Why are you fiddling with x264 custom commands at all when the CPU isn't the bottleneck ("encoder overload with nearly no cpu usage (around 10%))"? x264 commands change CPU usage, but if CPU isn't the bottleneck, it won't change how many dropped frames you get. And as far as quality of the encode goes, the built-in presets are going to be better compromises of CPU usage vs quality per bit than anything we make ourselves. The only exception might be "between" presets, but what you're changing is outside of that.

If there's no x264lib discussion where they talk about what version OBS uses, try making a post on it in that forum.
 
Back
Top