Question / Help OBS Improve CPU utilization

fmwyso

New Member
I'm just setting up a stream and I'm running into lots of x264 encoding issues. Simply put, it can't seem to encode frames fast enough (lots of lagged frames). Because of this, I've had to reduce the resolution to 720p and 30fps. Going from 1080p 60fps to 720p 30fps reduced lagged frames from 20% to now 0.1% (see attached log).

However, I still get some stuttering despite being at only 0.1% lagged frames. These stutters are no longer intermittent; they occur only during lots of motion/frame change and completely stall the stream for 2-3 seconds. My actual system experiences no lag and CPU usage remains stable.

My CPU is an i7-5820k and I've overclocked it to 3.8Ghz. Despite having lagged frames (which implies my CPU is capping my encode rate), my CPU cores are never above 50% utilization (none of the 12 virtual cores). This is not a temp issue as every core is steadily under 60C during streaming. Is 50% utilization expected for x264 encoding? Is it expected for an i7-5820k to have trouble encoding 720p 30fps?
 

Attachments

  • 2016-05-02 23-22-49.txt
    16.1 KB · Views: 53

sam686

Member
ZeroLatency tune switches multi-threading to sliced-threads, turns off bframes, set rc-lookahead to zero, and turns off anything that add latency.

Too many threads in sliced-threads mode destroys quality at low bitrate high motion. In custom x264 setting, try adding threads=4 or less if using ZeroLatency, or stop using ZeroLatency.

Without sliced-threads, quality is improved but each threads add 1 more frame of latency. rc-lookahead and bframes also add some latency for some quality improvements.
 

fmwyso

New Member
sam686 was right on the money! I set ZeroLatency off and it fixed the major stutters during high motion. I'm not sure why/when I set it but I certainly didn't expect it to cause so many issues.
 
Top