Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
#1 | Link |
Registered User
Join Date: Jul 2015
Posts: 838
|
What is the maximum number of threads in x264?
I know that the x264 codec isn't improved. The codec is in use though.
I'm interested in the topic of correctly adding the default number of threads in x264 for the i5 13600K processor. For me x264 adds threads=30. Doesn't it overstate? https://code.videolan.org/videolan/x...30973295c87aca |
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Jul 2015
Posts: 838
|
My question is for auto 30 threads. Is this value from outer space and heats the processor until I finally burn it? For vvenv, xeve there are protections up to 12 threads.
resolution < 720p: 4, < 5K 2880p: 8, >= 5K 2880p: 12 threads https://www.intel.com/content/www/us...fications.html For 13600K total threads 20 For x265 is: x265 [info]: Thread pool created using 20 threads Last edited by Jamaika; 8th December 2024 at 07:28. |
![]() |
![]() |
![]() |
#4 | Link | |
Registered User
Join Date: Aug 2024
Posts: 361
|
Quote:
Also I don't think that 12 threads thing is protection. |
|
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Jul 2015
Posts: 838
|
Xeve gives max 8 threads. Where does this preventiveness come from?
I read and read. I wasn't interested when I had old processor 4 threads that x264 gives 6. Today I find out that vvenc is tested only for 8/12 threads because otherwise other functions may work incorrectly and be e.g. fps incompatible. How is compatibility for x264/x265 with max thread 30? 10 years ago it was not possible to add 30 threads. Last edited by Jamaika; 9th December 2024 at 16:38. |
![]() |
![]() |
![]() |
#6 | Link | |
Registered User
Join Date: Aug 2024
Posts: 361
|
Quote:
High core count CPUs did exist 10 years ago, but less common. I know some people prefer to limit the threads in x264 to 16 and use multiple concurrent encoding sessions to utilize the rest of total threads, but that just their personal preference, there's no major downside to use more threads. |
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,385
|
If i remember properly, the max = height/40.
Another thing i vaguely remember, it wasn't also recommended to have more than 20, as above there is a several quality drop.
__________________
My github. |
![]() |
![]() |
![]() |
#10 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,173
|
You may wanna take a look at my post from earlier on this year: https://forum.doom9.org/showthread.php?p=1999533
Jean Philippe was spot on then and is spot on now: In my example, I was encoding a UHD source, so 3840x2160 which means 2160:40 = 54 maximum threads and sure enough if you count all the "boxes" you get 54: ![]() We can make a little list here: 720x480 = 480/40 = 12 maximum threads (SD NTSC) 720x576 = 576/40 = 14 maximum threads (SD PAL) 1280x720 = 720/40 = 18 maximum threads (HD) 1920x1080 = 1080/40 = 27 maximum threads (FULL HD) 3840x2160 = 2160/40 = 54 maximum threads (UHD) To me, however, more than the lack of ability to scale on multiple cores/threads, the biggest downside is the lack of AVX512 which are there for x264 8bit but are missing for x264 10bit. |
![]() |
![]() |
![]() |
#11 | Link | |
Registered User
Join Date: Jul 2015
Posts: 838
|
Quote:
X264 is an old codec that only has AVX512F. I think AVX10 is already there. Free OpenCL has also been abandoned. |
|
![]() |
![]() |
![]() |
#12 | Link | |
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,530
|
Quote:
In the best case, speed AVX512 improvement must be at ~10% for x264 and certainely less in real life encoding scenario. If you want I have really interessing test for your 52C/112T Xeon to prove that ... ;-)
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 Last edited by Sagittaire; 15th December 2024 at 21:00. |
|
![]() |
![]() |
![]() |
#13 | Link |
Lunarian
Join Date: Dec 2024
Posts: 15
|
Did they ever solve the problem with AVX512 causing chips to heat up quickly and throttle? I've held off on buying any Intel stuff for several years now because of that. AVX512 does sound interesting but I've never heard anything good about it. But I don't have many friends running the latest Xeon either.
|
![]() |
![]() |
![]() |
#14 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,173
|
Quote:
Yeah, I saw the benchmark post and I've been eager to try it, but I have to find a bit of time to do that. Generally those have very little downtime aside from every second Wednesday of the month when I install the Windows Security Updates (yes, I know that Patch Tuesday is the second Tuesday of the month, but it's in U.S time, which translates to Wednesday in UK time). |
|
![]() |
![]() |
![]() |
#15 | Link | |
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,530
|
Quote:
Certainly with 8 simultaneous mulipart encoding scession to saturate your 56/112 thread CPU. I can make really particular benchmark to show the multipart encoding interest.
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 |
|
![]() |
![]() |
![]() |
#16 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,173
|
Opencl is still supported as per x264 8bit and you can still compile x264 with support for it. I use it with --opencl all the time. The problem is that once again that's only for the 8bit version as it never made its way into the 10bit version (and probably never will).
![]() |
![]() |
![]() |
![]() |
#18 | Link |
ffx264/ffhevc author
Join Date: May 2007
Location: /dev/video0
Posts: 1,913
|
Do note that x264 is not very effective at utilizing so many threads. I have a 12c/24t CPU and even though x264 runs with 25 threads on it, the cores/threads are not fully pegged at 100%. I get more like 80-85% utilization per core/thread. Also, the more threads you throw at it, there will be a small decrease in quality.
|
![]() |
![]() |
![]() |
#19 | Link | |
Registered User
Join Date: Aug 2024
Posts: 361
|
Quote:
The situations which make difference are: 1) pools < 4 / pools >= 4 2) frames-threads = 1 / frame-threads > 1 3) no-wpp / wpp For pools and frame-threads, the number beyond the upper bound (4 and 1 respectively, as above) don't seem to impact any quality. I might find some time to test x264 as well. Last edited by Z2697; 10th December 2024 at 05:40. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|