View Full Version : Utilizing dual core CPU for faster x264 encodes
experttech
19th December 2006, 19:10
Hello All,
I am using the x264 ACM codec with Virtualdub. In the Settings I set the number of threads to 2. However during the first and second pass, my CPU utilization hovers around 50-60%.
The time taken to encode a 30 min DV AVI at 800kbps is about 90 mins for 1st pass and 60 minutes for subsequent passes. The only filter active is 'deinterlace'.
Is there any way I can utilize the CPU better with the settings. I have a AMD Athlon XP 4600+ X2 on an ASUS M2N SLI Deluxe.
Thanks!
deets
19th December 2006, 19:15
use megui, the x264 code has recently been updated and works much better with dual cores these days.
experttech
19th December 2006, 19:21
For some reason a bunch of my DV AVI videos do not encode when used with MeGUI. Sometimes it crashes and sometimes it just 'hangs'. I need to research with the settings.
With using VirtualDUB and the deinterlace filter (thats the only filter I use) I never have any issues. I will try to get MeGUI working.
deets
19th December 2006, 19:30
For some reason a bunch of my DV AVI videos do not encode when used with MeGUI. Sometimes it crashes and sometimes it just 'hangs'. I need to research with the settings.
With using VirtualDUB and the deinterlace filter (thats the only filter I use) I never have any issues. I will try to get MeGUI working.
yeah worth giving it a go if you can, sure folk on here will help :)
make sure you have the latest megui from x264.nl
experttech
19th December 2006, 20:50
I set up MeGUI now and it seems to be good so far (updated all files) and CPU utilization is around 89% which is nice :)
I am trying the 'Minimal Noise' filter for the first time. The input is a DV AVI recorded with the Sony TRV 33.
deets
19th December 2006, 21:33
should be nearer 100%. in tools settings make sure set threads automatically is unticked and the in the x264 config set threads to 0 and it will automatically set the threads, this is the preferred way and should get a nice speed boost!
experttech
20th December 2006, 03:00
Wow with MeGUi I get 3.8 fps rendering speed - looks too slow man :(
it now takes 5 hrs per pass (my 1st pass started at 11 am and ended at 4 pm) - is this normal?
The number of threads is set to 1 and disabled (as encoding is in progress I guess) - I'll set it to zero next time.
Does it normally take this long with MeGUI to encode a video of around 40 minutes? With VirtualDub and 2 passes it was around 3.5 hrs for the whole encode. Now its 5 hrs per pass? Big difference. Oh yes CPU utilization is around 50% in pass2 which I am seeing right now.
deets
20th December 2006, 04:27
all depends on what settings you use.
try playing with the various profiles.
im using a modified sharktooth slowest profile (subme7 me esa) and im getting 36fps for a turbo first pass, 720,432 encode. but im just testing a 6 minute clip to find a bitrate im happy with.
i then get about 4fps on the second, but this is the slowest settings your can use. and im on 100% for second pass with threads set to 0.
megui only takes the settings you put in for x264. you should be able to chose one of the quicker profiles and still get very good quality.
best to mess about with the various profiles :)
for example, when i encode to psp spec (338,208) i get about 35fps for the second pass.
if speed is so important, you can tweak a lot of the options. but i believe the cli is the preferred way to encode with x264
experttech
20th December 2006, 06:17
Thanks for the reply!
I am trying the CQ-Losless and seeing how it goes.
experttech
20th December 2006, 07:12
OK I downloaded the CLI build, still no luck. See the image below - see what I'm talking about? :( Virtualdub gives me ~34-40 fps for both passes.
What am I missing :confused:
And CPU usage is still ~50% - I cannot change the # of threads settings to 0 - it keeps rolling back to 1.
Edit: Its probably a problem with the build. With Virtualdub I am using another build (VFW version) and it gives me good fps.
check
20th December 2006, 10:58
are you sure the settings are the same? The vfw doesn't include all the options, so the best way to be sure is to post screenshots of the x264 vfw config and the megui profile used.
There is no speed difference to that degree between vfw and cli x264. The newer cli versions should be faster in fact as they have been more recently updated.
deets
20th December 2006, 19:42
go to tools-settings and make sure automatically set threads is not ticked.
then in x264 set threads to 0.
cq losless, you sure thats what you want to use?
experttech
20th December 2006, 19:53
If i choose 'set threads automatically': CPU usage is around 50% and fps is around 3-4 fps (tried some profiles).
If I uncheck 'set threads automatically': I still cannot set the threads to zero (it s disabled). On one occasion I was able to set it (it was enabled) but it keeps rolling it back to 1.
When I use MeGUI, even with XVid I get very low fps - around 3-4.
Both XVid MPEG4 and x264 ACM with same settings give me about 30-40 fps with Virtualdub (I'll try and get some screenshots).
Could it be a problem with MeGUI?
Sharktooth
20th December 2006, 21:59
Ensure you update MeGUI to the LATEST VERSION (let it AUTO-UPDATE).
It's NOT A MeGUI PROBLEM.
Al79
21st December 2006, 01:49
If i choose 'set threads automatically': CPU usage is around 50% and fps is around 3-4 fps (tried some profiles).
If I uncheck 'set threads automatically': I still cannot set the threads to zero (it s disabled). On one occasion I was able to set it (it was enabled) but it keeps rolling it back to 1.
When I use MeGUI, even with XVid I get very low fps - around 3-4.
Both XVid MPEG4 and x264 ACM with same settings give me about 30-40 fps with Virtualdub (I'll try and get some screenshots).
Could it be a problem with MeGUI?
mmmmmm, strange im doing so good with megui look
Starting preprocessing of job...
Preprocessing finished!
Starting job job1-1 at 16:42:35
encoder commandline:
--pass 1 --bitrate 860 --stats "E:\tokimeki\Tokimeki_Memorial_04_Final.stats" --bframes 3 --b-pyramid --direct auto --filter 1,1 --subme 1 --analyse none --me dia --threads 2 --thread-input --progress --no-psnr --no-ssim --output NUL "E:\tokimeki\Tokimeki_Memorial_04_Final.avs"
successfully started encoding
Processing ended at 17:23:35
----------------------------------------------------------------------------------------------------------
Log for job job1-1
avis [info]: 704x384 @ 23.98 fps (35125 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2
x264 [info]: slice I:293 Avg QP:18.10 size: 35624
x264 [info]: slice P:15756 Avg QP:20.55 size: 7292
x264 [info]: slice B:19076 Avg QP:21.52 size: 1738
x264 [info]: mb I I16..4: 29.2% 0.0% 70.8%
x264 [info]: mb P I16..4: 9.7% 0.0% 0.0% P16..4: 51.0% 0.0% 0.0% 0.0% 0.0% skip:39.4%
x264 [info]: mb B I16..4: 0.3% 0.0% 0.0% B16..8: 11.2% 0.0% 0.0% direct:14.7% skip:73.8%
x264 [info]: final ratefactor: 23.51
x264 [info]: direct mvs spatial:99.6% temporal:0.4%
x264 [info]: kb/s:865.5
encoded 35125 frames, 14.31 fps, 865.57 kb/s
----------------------------------------------------------------------------------------------------------
Job completed successfully and deletion of intermediate files is activated
Starting postprocessing of job...
Postprocessing finished!
job job1-1 has been processed. This job is linked to the next job: job1-2
Starting preprocessing of job...
Preprocessing finished!
Starting job job1-2 at 17:23:36
encoder commandline:
--pass 2 --bitrate 860 --stats "E:\tokimeki\Tokimeki_Memorial_04_Final.stats" --ref 8 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --b-rdo --bime --weightb --direct auto --filter 1,1 --subme 7 --trellis 2 --analyse all --8x8dct --me esa --threads 2 --thread-input --progress --no-psnr --no-ssim --output "E:\tokimeki\Tokimeki_Memorial_04_Final.mp4" "E:\tokimeki\Tokimeki_Memorial_04_Final.avs"
successfully started encoding
like u see, the first pass is fast, the second its not over yet, but is running 3.65fps, with a few filters, lanczos, fluxsmooht, unfilter, textsub, tweak, cnr, warpsharp (cpu usage 85-90%)
and all the options in full mode *o* so i love megui xDDD
P.D. I have a p4 ht 3.0 512 ram
experttech
21st December 2006, 02:04
Wow, my 1 pass is like this: (Only active filter is deinterlace!)
Log for job job1-1
avis [info]: 720x480 @ 29.97 fps (25335 frames)
x264 [info]: using cpu capabilities MMX MMXEXT SSE SSE2 3DNow!
x264 [warning]: VBV maxrate specified, but no bufsize.
x264 [info]: slice I:152 Avg QP:27.03 size: 26434
x264 [info]: slice P:14704 Avg QP:29.86 size: 5373
x264 [info]: slice B:10479 Avg QP:27.22 size: 1511
x264 [info]: mb I I16..4: 56.4% 0.0% 43.6%
x264 [info]: mb P I16..4: 19.8% 0.0% 0.0% P16..4: 39.6% 0.0% 0.0% 0.0% 0.0% skip:40.6%
x264 [info]: mb B I16..4: 0.6% 0.0% 0.0% B16..8: 10.6% 0.0% 0.0% direct:14.6% skip:74.2%
x264 [info]: final ratefactor: 29.00
x264 [info]: kb/s:935.5
encoded 25335 frames, 5.38 fps, 935.63 kb/s
uciekamy
1st February 2007, 15:08
Strange thing.. I got the similar problem: i tried to encode DVD movie to x264 with MeGUI and it was very, very slow (1-2fps, i use HQ-Insane profile).. I know that profile i used will never be fast, but i tried to encode the same movie with newest StaxRIP and the same x264 HQ-Insane profile and 1st pass is running with 20-30fps!!!.. Why do i get that kind of speed difference with the same profile in two different GUIs?
I forgot, my pc is: P4 640 3.2GH HT, 1GB Dual RAM..
Sharktooth
1st February 2007, 15:16
Coz staxrip has a different HQ-Insane profile.
I recently disabled the fast first pass (AKA megui Turbo option) in the megui HQ-Insane profile, while staxrip has the fast first pass enabled.
If you want back the fast first pass, just edit the HQ-Insane profile and check the Turbo checkbox.
uciekamy
1st February 2007, 15:22
All right then.. I'll check what speed will i get in the 2nd pass in few minutes.. That turbo option makes any difference? (decreases quality?)
Sharktooth
1st February 2007, 16:03
Theoretically yes, but i never seen a case where that difference was signigicative or even visible.
It's about a 0.01db of PSNR or even less.
I switched the Turbo off coz it's an Insane profile, and if you choose it, that means encoding speed is not relevant for you.
uciekamy
1st February 2007, 16:23
That's the point.. Thank you for all the info.. :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.