Question / Help x.264 24 threads ?

technoob

New Member
Hi guys, im really sorry for asking similar question to what ive asked already but ive seen several different answers to this question so i still dont know the answer.

on someone elses thread i saw a mod say x.264 can only use (or recommends a max) of 24 threads

ive also seen a mod/admin (cant remember which one) say there is no limit to the number of threads x.264 can use

so i dont know who is right or wrong, all i want to know is if there is a limit to the number of cores or threads that obs/x.264 can take advantage of ? thanks
 
It depends on your resolution and other settings. I wouldn't worry about the details, x264 handles everything automatically just fine.
 
It depends on your resolution and other settings. I wouldn't worry about the details, x264 handles everything automatically just fine.

so how many could it use for 720@60 ? just really want to know before i build my streaming pc and buy more cores cpu than it can use. thnks
 
I've read that you should limit it to 1 thread per 40 lines of resolution. I think most 22 or 24 threads recommendations are rules of thumb for 1080p, which doesn't precisely match that math, so it might be on actual testing. But I do think it depends on your resolution. If you're encoding 4k for example, I bet it can use a lot more threads than if you're "just" doing 1080p.

Either way, diminishing returns to me means you should probably just get an octo-core at most. That way you still have some clockspeed to go with your cores. The higher-than-eight core count Intel CPUs really sacrifice on clockspeed which I don't think is a good bargain given the number of unknowns you still have.
 
I've read that you should limit it to 1 thread per 40 lines of resolution. I think most 22 or 24 threads recommendations are rules of thumb for 1080p, which doesn't precisely match that math, so it might be on actual testing. But I do think it depends on your resolution. If you're encoding 4k for example, I bet it can use a lot more threads than if you're "just" doing 1080p.

Either way, diminishing returns to me means you should probably just get an octo-core at most. That way you still have some clockspeed to go with your cores. The higher-than-eight core count Intel CPUs really sacrifice on clockspeed which I don't think is a good bargain given the number of unknowns you still have.

i think i understand what your saying boildown, so if that calculation is correct then it can us 27 threads for 1080p
 
Yes, yet the recommendation is 22 max threads. Why is this?

I'm guessing someone did actual testing and determined that 22 was the sweet spot. Actual testing always beats rules of thumb and theoretical considerations. Lets just assume that 22 wasn't chosen frivolously.

You earlier said you wanted to do 720p. If so then you should probably chop that 22 figure by 2/3rds, leaving you with 14 or 15 threads. An octo-core CPU with hyperthreading will already opening up 24 threads in x264 by default. I think it would be an ideal CPU for you.
 
Yes, yet the recommendation is 22 max threads. Why is this?

I'm guessing someone did actual testing and determined that 22 was the sweet spot. Actual testing always beats rules of thumb and theoretical considerations. Lets just assume that 22 wasn't chosen frivolously.

You earlier said you wanted to do 720p. If so then you should probably chop that 22 figure by 2/3rds, leaving you with 14 or 15 threads. An octo-core CPU with hyperthreading will already opening up 24 threads in x264 by default. I think it would be an ideal CPU for you.

may i ask boildown where you saw the 22 max threads rule (if you can remember) ? ive seen it on forums such as this but just wondered if your source was any more/less official, as for 720p, ideally i want to move it up to 1080p@60 when twitch allows for it a bit better, so building it geared for 1080@60. so with growing confirmation of this 22-24 thread limit for 1080@60 i know this is the absoloute max cores/threads i will ever need (untill twitch allow 4k)
 
may i ask boildown where you saw the 22 max threads rule (if you can remember)

I don't have a link to it. Not sure it really exists. I could google for it, but then again, so could you. :P Its just one of those things that I've read on forums and since I've never approached anywhere near 22 threads, I haven't had to worry about its truthiness.

If you want a better answer, you're just going to have to google for someone who has done some applied experimentation instead of theory-crafting. This is information which I don't believe exists on these forums.

Or find it out yourself. You're on the bleeding edge of the technology here, so there's going to be pain if you proceed.

If you take my advice, you'll stop trying to hit some theoretical min-max point and just get an Intel octo-core and call it good enough. You're sure to get nearly the best results this way without wasting a ton of money.

Btw, what are you doing for your video capture card?
 
I just googled and found this in a few minutes: http://forum.doom9.org/showthread.php?t=172180 .

just found this: http://forum.doom9.org/showthread.php?t=165134 10th post down is by dark shikari, an x264 developer whose post says "The "divide by 40/48/etc" is just a very rough formula, not exact. Additionally, using B-frames lets you exceed this limit a good bit.

You can utilize a few more cores with lookahead threads, at the very least" so now we know :) if you dont want to make your own custom settings for x264 and just use the default obs one then that formula is roughly how many cores you can use to optimize performance
 
That's a good find. I'd still avoid two physical CPU setups though, it sounds like it doesn't work properly with x264.
 
Back
Top