Question / Help Encoder differences (x264 vs x264 low CPU usage preset, increases file size)

Boom123

Member
Hello,
can someone please explain the difference between the 2 x264 encoding options:

OBS encoder.png


x264, and the option below it which says x264 (low CPU usage preset, increases file size)? I'm only interested in local recording, not streaming in case it makes a difference.

Will the outputted video with the low CPU usage preset have any difference in image quality and speed? Or will it be the exact same result but just at a larger file size?

Also, what is the low CPU usage preset set as? (veryfast, superfast etc)

Thank you for any help :)
 

EBrito

Active Member
As preset says, low CPU uses less compression (CPU aggresive) So, if you have a weak CPU and can´t use hardware encoder, it will be your best choice to avoid lag.
 

Boom123

Member
Thank you for your reply, but will the video outputted be the same quality?

I have an i7-4790, my CPU usage is going up to around 55 - 60% while gaming and recording at the same time.
 

EBrito

Active Member
If you only want to record , better use hardware encoding, if available.
I´m not sure about final quality.
Indistinguishable sets same CRF value for both x264 and x264 low CPU usage. Last one uses ultrafast compression.
I think you should get same quality (CRF sets it) at the cost of a larger file.
 

Boom123

Member
Hi, thank you once again for jumping in with support :)

With hardware encoding, I am getting laggier gameplay and also the video footage is outputting more blocky/pixelated.
x264 is by far a smoother experience for me as far as the choice choice of encoding goes.

I just wasn't sure about the preset. If the video footage quality is the same, just at a larger file size, that isn't really a problem for me if it means my CPU is getting pegged less and outputting the same quality.
 

Boom123

Member
I am using Simple settings.
I am getting between 28,000 - 33,000 bitrate for a recording that is around 1 hour in length.
 

dodgepong

Administrator
Community Helper
x264 has several CPU presets, in increasing order from low CPU usage to high CPU usage: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo

By "preset", it means exactly what it sounds like: a set of pre-determined settings for x264 so that you don't have to set them all manually yourself to tweak things. These sets of settings have been tested by lots of people and are great for general use, depending on what you want to get out of your encoder. The actual details of what the settings are can be found here: http://dev.beandog.org/x264_preset_reference.html (I'm told this is slightly out of date, but you get the idea.)

The basic idea is that, all things being equal (same bit rate, etc), less CPU usage would result in worse quality, and more CPU usage would result in better quality, because the presets change how much time the encoder spends compressing each frame to look good within its setting constraints. Sometimes you need to reduce your CPU usage in order to get good performance, and the higher CPU usage presets can be difficult to use effectively with normal consumer hardware.

However, the amount of energy the CPU spends compressing each frame isn't the only factor in video quality. Bit rate is also important for determining how much information you can put into each frame of video. If you are allowed to cram more data into each frame, you don't need lots of CPU spent on compression, so you can make each frame look better just by cranking up the bit rate.

Thus, you can get a good-looking video with relatively low CPU usage by using a low-CPU preset (like ultrafast) with a higher bit rate.

This is what is happening with the OBS setting in question. "Software (x264)" will choose the veryfast preset with a setting that will require a certain amount of bit rate to look "Indistinguishable" (according to your Recording Quality setting), and the "Software (x264 low CPU usage preset)" setting will use ultrafast, but ask x264 to effectively use more bit rate to make up for the quality loss imposed by the lower-usage CPU preset. (Technically, rather than asking for "more bit rate", it sets a lower CRF value, which naturally requires more bit rate, but I'm trying to keep the explanation simple.)

The end result will probably look a bit different, but the goal is to get roughly the same quality, but just trading off CPU usage for file size. I recommend trying both and see which one works for you in terms of quality, CPU usage, and resulting file size.
 
Last edited:

Boom123

Member
Hello dodgepong, thank you so much for your detailed reply. If the quality is the same, but just at the cost of a larger file size, that wouldn't be a problem for me, I have plenty of storage space and would prefer my CPU being less strained. I am recording in 1920 x 1080 60 fps, and am getting an average bit rate of around 28,000. File sizes are around 12 GB for an hour. Do you think that bit rate is high enough to compensate for the lower CPU usage?

I did try out both x264 options, and I cannot really see a difference between them, that is why I am asking if they produce the same result, because if they produce the same output, but I have a choice whether to trade off CPU usage for file size, I would rather go with that, as long as the outputted video is the same.
 

dodgepong

Administrator
Community Helper
They don't produce the mathematically same result, but they are intended to produce a similar result to each other such that it's not easy to say which one is better than the other.
 
  • Like
Reactions: AGP

Boom123

Member
Thank you dodgepong. Since I am not seeing a difference between them I will stick to the low CPU usage preset. I notice I get slightly better frame rates in my games with the low CPU usage preset too, so that's always an added bonus :)

Thank you once again for your assistance.
 

Boom123

Member
Just posting an update in case it helps other users. After further testing on this on a different game, the difference was much more noticeable, x264 (low CPU usage preset) was outputting more stuttery footage than x264. I'm sticking to x264 now.
 

Boom123

Member
Depends on the game, for most its near identical between the 2 settings, for some others I saw noticeable improvements using x264. Just posted my experience in case it helps other users that encounter the same problem. Image quality is also nicer using x264 rather than the low CPU usage preset, due to x264 using veryfast, and the low CPU usage preset using ultrafast. I'm on x264 veryfast now and not experiencing any issues.
 

Boildown

Active Member
Once you're an advanced enough user to notice the difference between the two, you can probably safely dabble in the Advanced settings. For example, using SuperFast preset (the x264 preset that sits between Very Fast and Ultra Fast) might be the best compromise for you.
 

Boom123

Member
Hello Boildown, thank you for your insight. Yes I am currently using Advanced settings with x264 set at veryfast, and CRF 14. I experimented with superfast too and found much more desirable results on veryfast. On another topic (https://obsproject.com/forum/threads/help-me-with-cpu-preset.6313/) user dodgepong said that 'The veryfast preset is right in the sweet spot of performance and quality. Superfast and ultrafast will give you better performance, but the quality is very noticeably worse.' I completely agree with this.
 

Boildown

Active Member
That's good logic for streaming but less-so for local recording. For local recording, you really want a light-weight preset so that you don't lag/duplicate/miss/whatever any frames, and you can keep the quality decent by increasing the bitrate. This is because CPU time is precious, but hard drive space is cheap, and trying to save a tiny bit on disk space can result in a far worse problem of a jerky video from when the encoder lagged out and duplicated frames.

So for local recording I'd recommend SuperFast preset. I would recommend UltraFast, but UltraFast turns off a few x264 features that can't be made up for with more bitrate. So SuperFast is the next best option.

For streaming, VeryFast seems like the best option for a lot of people though.
 
Top