inefficient CPU core usages on x264 encode... tweaks?

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

Is there a way I can boost the CPU usage of the x264 encoder with handbrake 0.93? On the 2nd pass, it typically only uses 65-70 % of my four cores. When I encode the same source under windows using MeGUI, I'm maxed out @ >99 %. Is there a setting I can tweak to improve it?

Thanks!

Image

Lenny-amd64/handbrake 0.93
Last edited by graysky on Sat Nov 29, 2008 6:04 pm, edited 1 time in total.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by JohnAStebbins »

How efficient your cpu usage is depends on many things. x264 isn't the only factor. Some of the filters don't multi-thread as well as others. So you might see what happens with all filters off. You can also get higher utilization by turning up some of the more compute intensive options of x264. It'll be slower, but your utilization will be higher.
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

I tried it without any of the decomb or detelecine plugins on and the result was the same.
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

Can someone else with a multicore machine report their CPU usage on an x264 encode (2nd pass)? I have none of the processing filters on and am encoding a 4:3 720x480 DVD source in the screenshot below using the 'movie' preset as an example but boosted the key frames from 3 to 5. As you can see, the usage seems to bounce around from 60-80 % or so. If I look at the processes table of my Gnome system monitor, the average usage of ghb is 66 %.

There has to be some settings I don't have adjusted properly.

Image
Last edited by graysky on Sat Nov 29, 2008 8:54 pm, edited 1 time in total.
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by jbrjake »

This is really, really worthless.

Why are you ignoring the forum rules? You're going around cross-linking this post from other threads, but you won't even tell people what settings you're using? How is anyone supposed to try to reproduce this, exactly?
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

Apologies - I didn't realize referencing another user with a similar post was against the rules... I'll have a closer look at them moving forward.

I saved a complete log of the encode I alluded to in my post - EDIT, that's not totally true because I had the decomb filter active on this run. BUT, the average FPS on pass1 and pass2 are nearly identical to the first run I did (same options/source) that didn't use the decomb filter.

Code: Select all

Handbrake Version: 0.9.3 (2008112300)
[14:23:36] hb_scan: path=/mnt/D/work_inbox/01/VTS_05_PGC_01_1.VOB, title_index=1
[14:23:36] scan: trying to open with libdvdread
[14:23:36] dvd: not a dvd - trying as a stream/file instead
[14:23:36] file is MPEG DVD Program Stream
[14:23:36] add_audio_to_title: added AC3 audio stream 0x84bd
[14:23:36] add_audio_to_title: added AC3 audio stream 0x80bd
[14:23:36] add_audio_to_title: added AC3 audio stream 0x81bd
[14:23:36] add_audio_to_title: added AC3 audio stream 0x82bd
[14:23:36] add_audio_to_title: added AC3 audio stream 0x83bd
[14:23:36] scan: decoding previews for title 1
[14:23:36] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 Unknown (AC3) (5.1 ch)
[14:23:36] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch)
[14:23:36] scan: audio 0x82bd: AC-3, rate=48000Hz, bitrate=192000 Unknown (AC3) (Dolby Surround)
[14:23:36] scan: audio 0x83bd: AC-3, rate=48000Hz, bitrate=192000 Unknown (AC3) (Dolby Surround)
[14:23:36] scan: audio 0x84bd: AC-3, rate=48000Hz, bitrate=192000 Unknown (AC3) (Dolby Surround)
[14:23:36] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/2/0, aspect 4:3, PAR 8:9
[14:23:36] scan: title (0) job->width:640, job->height:480
[14:23:36] libhb: scan thread found 1 valid title(s)
[14:23:36] lingui: Modified Custom Preset: Temp
[14:23:36] 2 job(s) to process
[14:23:36] starting job
[14:23:36] job configuration:
[14:23:36]  * source
[14:23:36]    + /mnt/D/work_inbox/01/VTS_05_PGC_01_1.VOB
[14:23:36]    + title 1, chapter(s) 1 to 1
[14:23:36]  * destination
[14:23:36]    + ./output.mkv
[14:23:36]    + container: Matroska (.mkv)
[14:23:36]  * video track
[14:23:36]    + decoder: mpeg2
[14:23:36]      + bitrate 9800 kbps
[14:23:36]    + frame rate: same as source (around 23.976 fps)
[14:23:36]    + loose anamorphic
[14:23:36]      + storage dimensions: 720 * 480 -> 720 * 480, crop 0/0/0/0
[14:23:36]      + pixel aspect ratio: 8 / 9
[14:23:36]      + display dimensions: 640 * 480
[14:23:36]    + filter
[14:23:36]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (default settings)
[14:23:36]    + encoder: x264
[14:23:36]      + options: ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[14:23:36]      + bitrate: 1785 kbps, pass: 1
[14:23:36]  * audio track 0
[14:23:36]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 81bd)
[14:23:36]      + bitrate: 192 kbps, samplerate: 48000 Hz
[14:23:36]    + mixdown: Stereo
[14:23:36]    + encoder: faac
[14:23:36]      + bitrate: 96 kbps, samplerate: 48000 Hz
[14:23:36] yadif thread started for segment 0
[14:23:36] yadif thread started for segment 1
[14:23:36] yadif thread started for segment 3
[14:23:36] dvd: not a dvd - trying as a stream/file instead
[14:23:36] yadif thread started for segment 2
[14:23:36] decomb thread started for segment 0
[14:23:36] decomb thread started for segment 1
[14:23:36] reader: first SCR 146
[14:23:36] decomb thread started for segment 3
[14:23:36] encx264: keyint-min: 24, keyint-max: 240
[14:23:36] encx264: encoding with stored aspect 8/9
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
[14:23:36] decomb thread started for segment 2
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[14:23:36] mpeg2: "" (1) at frame 0 time 3003
[14:23:36] sync: expecting 83108 video frames
[14:23:36] sync: first pts is 3003
[14:23:37] 9.109100s: Film -> Video
[14:23:37] 9.576233s: Video -> Film
[14:23:40] 28.428400s: Film -> Video
[14:23:40] 28.461767s: Video -> Film
[14:24:02] 177.577393s: Film -> Video
[14:24:02] 177.644135s: Video -> Film
[14:24:02] 181.598068s: Film -> Video
[14:24:02] 181.681503s: Video -> Film
[14:24:02] 182.916061s: Film -> Video
[14:24:02] 182.949432s: Video -> Film
[14:24:05] 201.668137s: Film -> Video
[14:24:05] 201.701508s: Video -> Film
[14:24:08] 220.787247s: Film -> Video
[14:24:08] 220.820602s: Video -> Film
[14:24:09] 226.893326s: Film -> Video
[14:24:09] 229.562668s: Video -> Film
[14:24:25] 320.153168s: Film -> Video
[14:24:25] 325.191528s: Video -> Film
[14:24:38] 414.647552s: Film -> Video
[14:24:38] 414.680939s: Video -> Film
[14:24:39] 422.738983s: Film -> Video
[14:24:39] 422.789032s: Video -> Film
[14:24:40] 428.878448s: Film -> Video
[14:24:40] 428.978546s: Video -> Film
[14:24:46] 470.937103s: Film -> Video
[14:24:46] 470.970490s: Video -> Film
[14:24:47] 477.109955s: Film -> Video
[14:24:47] 477.143341s: Video -> Film
[14:24:48] 486.352539s: Film -> Video
[14:24:48] 486.419281s: Video -> Film
[14:24:55] 534.734192s: Film -> Video
[14:24:55] 534.767578s: Video -> Film
[14:24:56] 539.505615s: Film -> Video
[14:24:56] 539.539001s: Video -> Film
[14:25:00] 571.370789s: Film -> Video
[14:25:00] 571.404175s: Video -> Film
[14:25:03] 589.722473s: Film -> Video
[14:25:03] 589.755798s: Video -> Film
[14:25:04] 598.130859s: Film -> Video
[14:25:04] 598.164246s: Video -> Film
[14:25:04] 600.099487s: Film -> Video
[14:25:04] 600.132874s: Video -> Film
[14:25:08] 631.163879s: Film -> Video
[14:25:08] 631.197266s: Video -> Film
[14:25:13] 663.362671s: Film -> Video
[14:25:13] 663.429443s: Video -> Film
[14:25:14] 671.303955s: Film -> Video
[14:25:14] 671.337341s: Video -> Film
[14:25:15] 673.973267s: Film -> Video
[14:25:15] 674.040039s: Video -> Film
[14:25:15] 677.276550s: Film -> Video
[14:25:15] 677.309937s: Video -> Film
[14:25:18] 702.168152s: Film -> Video
[14:25:18] 702.201538s: Video -> Film
[14:25:23] 734.266846s: Film -> Video
[14:25:23] 734.333618s: Video -> Film
[14:25:23] 736.469055s: Film -> Video
[14:25:23] 736.502441s: Video -> Film
[14:25:25] 751.283936s: Film -> Video
[14:25:25] 751.317261s: Video -> Film
[14:25:29] 782.915466s: Film -> Video
[14:25:29] 782.982239s: Video -> Film
[14:25:31] 796.962830s: Film -> Video
[14:25:31] 796.996155s: Video -> Film
[14:25:34] 816.432251s: Film -> Video
[14:25:34] 816.515747s: Video -> Film
[14:25:36] 830.296204s: Film -> Video
[14:25:36] 830.329529s: Video -> Film
[14:25:36] 832.131287s: Film -> Video
[14:25:36] 832.198059s: Video -> Film
[14:25:38] 850.883362s: Film -> Video
[14:25:38] 850.916687s: Video -> Film
[14:25:39] 857.256348s: Film -> Video
[14:25:39] 857.289795s: Video -> Film
[14:25:43] 887.202942s: Film -> Video
[14:25:43] 887.286377s: Video -> Film
[14:25:44] 893.259033s: Film -> Video
[14:25:44] 893.292419s: Video -> Film
[14:25:50] 938.404114s: Film -> Video
[14:25:50] 938.437500s: Video -> Film
[14:25:54] 965.831482s: Film -> Video
[14:25:54] 965.864868s: Video -> Film
[14:25:57] 987.519836s: Film -> Video
[14:25:57] 987.553223s: Video -> Film
[14:25:58] 993.859558s: Film -> Video
[14:25:58] 993.892883s: Video -> Film
[14:26:04] 1043.909546s: Film -> Video
[14:26:04] 1043.942993s: Video -> Film
[14:26:08] 1070.102295s: Film -> Video
[14:26:08] 1070.135742s: Video -> Film
[14:26:12] 1096.762329s: Film -> Video
[14:26:12] 1096.795776s: Video -> Film
[14:26:13] 1109.775269s: Film -> Video
[14:26:13] 1109.808716s: Video -> Film
[14:26:16] 1130.262451s: Film -> Video
[14:26:16] 1130.295776s: Video -> Film
[14:26:17] 1137.402954s: Film -> Video
[14:26:17] 1137.436279s: Video -> Film
[14:26:17] 1139.238037s: Film -> Video
[14:26:17] 1139.271484s: Video -> Film
[14:26:23] 1183.048584s: Film -> Video
[14:26:23] 1183.115234s: Video -> Film
[14:26:23] 1183.916138s: Film -> Video
[14:26:23] 1183.949463s: Video -> Film
[14:26:25] 1195.327515s: Film -> Video
[14:26:25] 1195.360840s: Video -> Film
[14:26:27] 1214.213013s: Film -> Video
[14:26:27] 1214.279785s: Video -> Film
[14:26:28] 1218.583984s: Film -> Video
[14:26:28] 1218.617432s: Video -> Film
[14:26:31] 1242.874878s: Film -> Video
[14:26:31] 1242.908325s: Video -> Film
[14:26:31] 1244.209595s: Film -> Video
[14:26:31] 1244.276367s: Video -> Film
[14:26:33] 1254.569946s: Film -> Video
[14:26:33] 1254.619995s: Video -> Film
[14:26:35] 1273.739136s: Film -> Video
[14:26:35] 1273.772583s: Video -> Film
[14:26:41] 1314.946899s: Film -> Video
[14:26:41] 1314.980347s: Video -> Film
[14:26:42] 1324.322998s: Film -> Video
[14:26:42] 1324.356323s: Video -> Film
[14:26:43] 1331.763794s: Film -> Video
[14:26:43] 1331.830444s: Video -> Film
[14:26:45] 1347.813110s: Film -> Video
[14:26:45] 1347.846436s: Video -> Film
[14:26:46] 1359.958618s: Film -> Video
[14:26:46] 1360.025391s: Video -> Film
[14:26:48] 1375.374023s: Film -> Video
[14:26:48] 1375.440674s: Video -> Film
[14:26:49] 1377.476074s: Film -> Video
[14:26:49] 1377.509521s: Video -> Film
[14:26:50] 1386.618530s: Film -> Video
[14:26:50] 1386.651855s: Video -> Film
[14:26:50] 1390.972900s: Film -> Video
[14:26:50] 1391.056396s: Video -> Film
[14:26:52] 1406.071289s: Film -> Video
[14:26:53] 1406.104736s: Video -> Film
[14:26:54] 1421.286621s: Film -> Video
[14:26:54] 1421.319946s: Video -> Film
[14:27:03] 1488.420288s: Film -> Video
[14:27:03] 1488.487061s: Video -> Film
[14:27:04] 1489.955078s: Film -> Video
[14:27:04] 1489.988525s: Video -> Film
[14:27:04] 1491.740234s: Film -> Video
[14:27:04] 1491.790283s: Video -> Film
[14:27:04] 1493.558716s: Film -> Video
[14:27:04] 1493.592163s: Video -> Film
[14:27:07] 1513.311768s: Film -> Video
[14:27:07] 1513.345215s: Video -> Film
[14:27:08] 1521.553467s: Film -> Video
[14:27:08] 1521.586670s: Video -> Film
[14:27:08] 1524.389526s: Film -> Video
[14:27:08] 1524.422974s: Video -> Film
[14:27:09] 1530.395508s: Film -> Video
[14:27:09] 1530.462280s: Video -> Film
[14:27:11] 1544.176025s: Film -> Video
[14:27:11] 1544.209473s: Video -> Film
[14:27:13] 1557.672729s: Film -> Video
[14:27:13] 1557.722900s: Video -> Film
[14:27:26] 1645.543823s: Film -> Video
[14:27:26] 1645.577271s: Video -> Film
[14:27:30] 1682.881226s: Film -> Video
[14:27:30] 1682.914429s: Video -> Film
[14:27:35] 1717.081909s: Film -> Video
[14:27:35] 1717.148804s: Video -> Film
[14:27:36] 1725.790771s: Film -> Video
[14:27:36] 1725.824219s: Video -> Film
[14:27:45] 1789.587769s: Film -> Video
[14:27:45] 1789.621216s: Video -> Film
[14:27:48] 1810.058350s: Film -> Video
[14:27:48] 1810.108276s: Video -> Film
[14:27:48] 1813.044678s: Film -> Video
[14:27:48] 1813.077881s: Video -> Film
[14:27:50] 1825.657227s: Film -> Video
[14:27:50] 1825.690430s: Video -> Film
[14:27:53] 1848.980469s: Film -> Video
[14:27:53] 1849.047119s: Video -> Film
[14:27:55] 1863.862061s: Film -> Video
[14:27:55] 1863.928711s: Video -> Film
[14:27:56] 1868.867065s: Film -> Video
[14:27:56] 1868.900391s: Video -> Film
[14:27:56] 1873.521606s: Film -> Video
[14:27:56] 1873.571777s: Video -> Film
[14:28:00] 1900.131592s: Film -> Video
[14:28:00] 1900.164917s: Video -> Film
[14:28:12] 1984.315674s: Film -> Video
[14:28:12] 1984.348999s: Video -> Film
[14:28:16] 2012.160156s: Film -> Video
[14:28:16] 2012.210083s: Video -> Film
[14:28:22] 2055.687012s: Film -> Video
[14:28:22] 2055.720459s: Video -> Film
[14:28:30] 2123.655029s: Film -> Video
[14:28:30] 2123.688232s: Video -> Film
[14:28:35] 2153.167725s: Film -> Video
[14:28:35] 2153.250977s: Video -> Film
[14:28:36] 2161.859619s: Film -> Video
[14:28:36] 2161.926514s: Video -> Film
[14:28:41] 2206.237305s: Film -> Video
[14:28:41] 2206.270752s: Video -> Film
[14:28:41] 2209.073486s: Film -> Video
[14:28:41] 2209.106934s: Video -> Film
[14:28:43] 2223.955078s: Film -> Video
[14:28:43] 2223.988525s: Video -> Film
[14:28:45] 2235.533447s: Film -> Video
[14:28:45] 2235.600098s: Video -> Film
[14:28:48] 2261.559326s: Film -> Video
[14:28:48] 2261.625977s: Video -> Film
[14:28:49] 2270.835205s: Film -> Video
[14:28:50] 2272.603760s: Video -> Film
[14:28:56] 2316.113770s: Film -> Video
[14:28:56] 2316.147217s: Video -> Film
[14:28:57] 2328.259277s: Film -> Video
[14:28:57] 2328.292725s: Video -> Film
[14:28:59] 2344.008301s: Film -> Video
[14:28:59] 2344.041748s: Video -> Film
[14:29:01] 2361.709229s: Film -> Video
[14:29:01] 2361.759521s: Video -> Film
[14:29:07] 2409.740723s: Film -> Video
[14:29:07] 2409.807373s: Video -> Film
[14:29:10] 2431.128662s: Film -> Video
[14:29:10] 2431.195312s: Video -> Film
[14:29:14] 2460.040771s: Film -> Video
[14:29:14] 2460.091064s: Video -> Film
[14:29:24] 2533.330811s: Film -> Video
[14:29:24] 2533.364014s: Video -> Film
[14:29:26] 2546.677490s: Film -> Video
[14:29:26] 2546.710693s: Video -> Film
[14:29:30] 2573.037109s: Film -> Video
[14:29:30] 2573.070557s: Video -> Film
[14:29:31] 2583.314209s: Film -> Video
[14:29:32] 2586.550537s: Video -> Film
[14:29:32] 2589.053223s: Film -> Video
[14:29:32] 2589.086670s: Video -> Film
[14:29:39] 2649.079834s: Film -> Video
[14:29:39] 2649.146484s: Video -> Film
[14:29:50] 2731.228516s: Film -> Video
[14:29:50] 2731.295410s: Video -> Film
[14:29:51] 2734.731934s: Film -> Video
[14:29:51] 2734.765381s: Video -> Film
[14:29:55] 2769.199707s: Film -> Video
[14:29:55] 2769.266602s: Video -> Film
[14:29:56] 2774.705322s: Film -> Video
[14:29:56] 2774.738770s: Video -> Film
[14:29:57] 2782.513184s: Film -> Video
[14:29:57] 2782.546387s: Video -> Film
[14:30:03] 2824.788574s: Film -> Video
[14:30:03] 2824.855225s: Video -> Film
[14:30:09] 2871.702148s: Film -> Video
[14:30:09] 2871.768799s: Video -> Film
[14:30:10] 2876.073242s: Film -> Video
[14:30:10] 2876.106445s: Video -> Film
[14:30:14] 2904.568359s: Film -> Video
[14:30:14] 2904.635010s: Video -> Film
[14:30:14] 2910.340820s: Film -> Video
[14:30:14] 2910.407471s: Video -> Film
[14:30:18] 2938.101807s: Film -> Video
[14:30:18] 2938.168457s: Video -> Film
[14:30:19] 2941.805420s: Film -> Video
[14:30:19] 2941.838867s: Video -> Film
[14:30:19] 2944.274658s: Film -> Video
[14:30:19] 2944.308105s: Video -> Film
[14:30:20] 2949.446533s: Film -> Video
[14:30:20] 2949.479736s: Video -> Film
[14:30:28] 3007.604736s: Film -> Video
[14:30:28] 3007.637939s: Video -> Film
[14:30:28] 3010.907715s: Film -> Video
[14:30:28] 3010.941162s: Video -> Film
[14:30:30] 3026.690430s: Film -> Video
[14:30:30] 3026.723633s: Video -> Film
[14:30:31] 3030.694336s: Film -> Video
[14:30:31] 3030.727783s: Video -> Film
[14:30:31] 3034.031006s: Film -> Video
[14:30:31] 3034.064453s: Video -> Film
[14:30:39] 3088.084961s: Film -> Video
[14:30:39] 3088.151855s: Video -> Film
[14:30:42] 3110.473877s: Film -> Video
[14:30:42] 3110.507324s: Video -> Film
[14:30:43] 3117.981445s: Film -> Video
[14:30:43] 3118.014893s: Video -> Film
[14:30:43] 3122.819580s: Film -> Video
[14:30:43] 3122.853027s: Video -> Film
[14:30:47] 3147.577637s: Film -> Video
[14:30:47] 3147.611084s: Video -> Film
[14:30:50] 3171.301270s: Film -> Video
[14:30:50] 3171.334717s: Video -> Film
[14:30:53] 3188.485352s: Film -> Video
[14:30:53] 3188.552246s: Video -> Film
[14:30:55] 3200.380371s: Film -> Video
[14:30:55] 3200.430664s: Video -> Film
[14:30:57] 3217.647705s: Film -> Video
[14:30:57] 3217.681152s: Video -> Film
[14:31:03] 3263.543457s: Film -> Video
[14:31:03] 3263.626953s: Video -> Film
[14:31:03] 3265.261963s: Film -> Video
[14:31:03] 3265.295410s: Video -> Film
[14:31:06] 3287.751221s: Film -> Video
[14:31:06] 3287.784424s: Video -> Film
[14:31:08] 3303.667236s: Film -> Video
[14:31:08] 3303.700195s: Video -> Film
[14:31:09] 3306.136230s: Film -> Video
[14:31:09] 3306.169678s: Video -> Film
[14:31:13] 3336.032715s: Film -> Video
[14:31:13] 3336.066162s: Video -> Film
[14:31:14] 3343.473389s: Film -> Video
[14:31:14] 3343.506836s: Video -> Film
[14:31:27] 3436.566406s: Film -> Video
[14:31:35] reader: done. 1 scr changes
[14:31:35] 3515.545166s: Video -> Film
[14:31:36] sync: got 85731 frames, 83108 expected
[14:31:36] work: average encoding speed for job is 178.811661 fps
[14:31:36] mpeg2 done: 85732 frames
[14:31:36] render: lost time: 0 (0 frames)
[14:31:36] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:866   Avg QP:16.70  size: 48747  PSNR Mean Y:46.03 U:48.85 V:49.10 Avg:46.59 Global:45.58
x264 [info]: slice P:28313 Avg QP:18.59  size: 16704  PSNR Mean Y:43.88 U:46.76 V:47.04 Avg:44.49 Global:43.04
x264 [info]: slice B:56551 Avg QP:19.83  size:  4802  PSNR Mean Y:43.69 U:47.25 V:47.50 Avg:44.34 Global:43.08
x264 [info]: consecutive B-frames:  9.4% 17.2%  8.8% 11.7% 22.6% 27.1%  3.2%
x264 [info]: mb I  I16..4: 27.1%  0.0% 72.9%
x264 [info]: mb P  I16..4: 23.8%  0.0%  0.0%  P16..4: 70.5%  0.0%  0.0%  0.0%  0.0%    skip: 5.6%
x264 [info]: mb B  I16..4:  3.9%  0.0%  0.0%  B16..8: 34.5%  0.0%  0.0%  direct:26.1%  skip:35.5%  L0:29.6% L1:52.4% BI:18.0%
x264 [info]: final ratefactor: 20.74
x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
x264 [info]: SSIM Mean Y:0.9789772
x264 [info]: PSNR Mean Y:43.777 U:47.101 V:47.363 Avg:44.410 Global:43.087 kb/s:1760.14
[14:31:36] decomb: yadif deinterlaced 272 | blend deinterlaced 1125 | unfiltered 84333 | total 85730
[14:31:36] starting job
[14:31:36] job configuration:
[14:31:36]  * source
[14:31:36]    + /mnt/D/work_inbox/01/VTS_05_PGC_01_1.VOB
[14:31:36]    + title 1, chapter(s) 1 to 1
[14:31:36]  * destination
[14:31:36]    + ./output.mkv
[14:31:36]    + container: Matroska (.mkv)
[14:31:36]  * video track
[14:31:36]    + decoder: mpeg2
[14:31:36]      + bitrate 9800 kbps
[14:31:36]    + frame rate: same as source (around 23.976 fps)
[14:31:36]    + loose anamorphic
[14:31:36]      + storage dimensions: 720 * 480 -> 720 * 480, crop 0/0/0/0
[14:31:36]      + pixel aspect ratio: 8 / 9
[14:31:36]      + display dimensions: 640 * 480
[14:31:36]    + filter
[14:31:36]      + Deinterlaces selectively with yadif/mcdeint and lowpass5 blending (default settings)
[14:31:36]    + encoder: x264
[14:31:36]      + options: ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1
[14:31:36]      + bitrate: 1785 kbps, pass: 2
[14:31:36]  * audio track 0
[14:31:36]    + decoder: Unknown (AC3) (2.0 ch) (track 1, id 81bd)
[14:31:36]      + bitrate: 192 kbps, samplerate: 48000 Hz
[14:31:36]    + mixdown: Stereo
[14:31:36]    + encoder: faac
[14:31:36]      + bitrate: 96 kbps, samplerate: 48000 Hz
[14:31:36] yadif thread started for segment 0
[14:31:36] yadif thread started for segment 1
[14:31:36] yadif thread started for segment 2
[14:31:36] yadif thread started for segment 3
[14:31:36] decomb thread started for segment 0
[14:31:36] decomb thread started for segment 1
[14:31:36] decomb thread started for segment 2
[14:31:36] decomb thread started for segment 3
[14:31:36] encx264: keyint-min: 24, keyint-max: 240
[14:31:36] encx264: encoding with stored aspect 8/9
x264 [info]: using SAR=8/9
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
[14:31:36] dvd: not a dvd - trying as a stream/file instead
[14:31:36] reader: first SCR 146
[14:31:36] mpeg2: "" (1) at frame 0 time 3003
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
[14:31:39] sync: expecting 83108 video frames
[14:31:39] sync: first pts is 3003
[14:31:46] 9.109100s: Film -> Video
[14:31:46] 9.576233s: Video -> Film
[14:32:01] 28.428400s: Film -> Video
[14:32:01] 28.461767s: Video -> Film
[14:34:17] 177.577393s: Film -> Video
[14:34:17] 177.644135s: Video -> Film
[14:34:21] 181.598068s: Film -> Video
[14:34:21] 181.681503s: Video -> Film
[14:34:22] 182.916061s: Film -> Video
[14:34:22] 182.949432s: Video -> Film
[14:34:38] 201.668137s: Film -> Video
[14:34:38] 201.701508s: Video -> Film
[14:34:56] 220.787247s: Film -> Video
[14:34:56] 220.820602s: Video -> Film
[14:35:03] 226.893326s: Film -> Video
[14:35:05] 229.562668s: Video -> Film
[14:36:51] 320.153168s: Film -> Video
[14:36:54] 325.191528s: Video -> Film
[14:38:02] 414.647552s: Film -> Video
[14:38:02] 414.680939s: Video -> Film
[14:38:08] 422.738983s: Film -> Video
[14:38:08] 422.789032s: Video -> Film
[14:38:14] 428.878448s: Film -> Video
[14:38:14] 428.978546s: Video -> Film
[14:38:48] 470.937103s: Film -> Video
[14:38:48] 470.970490s: Video -> Film
[14:38:53] 477.109955s: Film -> Video
[14:38:53] 477.143341s: Video -> Film
[14:38:59] 486.352539s: Film -> Video
[14:38:59] 486.419281s: Video -> Film
[14:39:36] 534.734192s: Film -> Video
[14:39:36] 534.767578s: Video -> Film
[14:39:40] 539.505615s: Film -> Video
[14:39:40] 539.539001s: Video -> Film
[14:40:15] 571.370789s: Film -> Video
[14:40:15] 571.404175s: Video -> Film
[14:40:31] 589.722473s: Film -> Video
[14:40:31] 589.755798s: Video -> Film
[14:40:41] 598.130859s: Film -> Video
[14:40:41] 598.164246s: Video -> Film
[14:40:42] 600.099487s: Film -> Video
[14:40:42] 600.132874s: Video -> Film
[14:41:08] 631.163879s: Film -> Video
[14:41:08] 631.197266s: Video -> Film
[14:41:36] 663.362671s: Film -> Video
[14:41:36] 663.429443s: Video -> Film
[14:41:42] 671.303955s: Film -> Video
[14:41:42] 671.337341s: Video -> Film
[14:41:43] 673.973267s: Film -> Video
[14:41:43] 674.040039s: Video -> Film
[14:41:46] 677.276550s: Film -> Video
[14:41:46] 677.309937s: Video -> Film
[14:42:04] 702.168152s: Film -> Video
[14:42:04] 702.201538s: Video -> Film
[14:42:26] 734.266846s: Film -> Video
[14:42:26] 734.333618s: Video -> Film
[14:42:28] 736.469055s: Film -> Video
[14:42:28] 736.502441s: Video -> Film
[14:42:37] 751.283936s: Film -> Video
[14:42:37] 751.317261s: Video -> Film
[14:43:02] 782.915466s: Film -> Video
[14:43:03] 782.982239s: Video -> Film
[14:43:12] 796.962830s: Film -> Video
[14:43:12] 796.996155s: Video -> Film
[14:43:26] 816.432251s: Film -> Video
[14:43:27] 816.515747s: Video -> Film
[14:43:37] 830.296204s: Film -> Video
[14:43:37] 830.329529s: Video -> Film
[14:43:38] 832.131287s: Film -> Video
[14:43:38] 832.198059s: Video -> Film
[14:43:52] 850.883362s: Film -> Video
[14:43:52] 850.916687s: Video -> Film
[14:43:56] 857.256348s: Film -> Video
[14:43:57] 857.289795s: Video -> Film
[14:44:18] 887.202942s: Film -> Video
[14:44:18] 887.286377s: Video -> Film
[14:44:23] 893.259033s: Film -> Video
[14:44:23] 893.292419s: Video -> Film
[14:44:59] 938.404114s: Film -> Video
[14:44:59] 938.437500s: Video -> Film
[14:45:21] 965.831482s: Film -> Video
[14:45:21] 965.864868s: Video -> Film
[14:45:38] 987.519836s: Film -> Video
[14:45:38] 987.553223s: Video -> Film
[14:45:42] 993.859558s: Film -> Video
[14:45:42] 993.892883s: Video -> Film
[14:46:22] 1043.909546s: Film -> Video
[14:46:22] 1043.942993s: Video -> Film
[14:46:43] 1070.102295s: Film -> Video
[14:46:43] 1070.135742s: Video -> Film
[14:47:04] 1096.762329s: Film -> Video
[14:47:04] 1096.795776s: Video -> Film
[14:47:14] 1109.775269s: Film -> Video
[14:47:14] 1109.808716s: Video -> Film
[14:47:29] 1130.262451s: Film -> Video
[14:47:29] 1130.295776s: Video -> Film
[14:47:34] 1137.402954s: Film -> Video
[14:47:34] 1137.436279s: Video -> Film
[14:47:35] 1139.238037s: Film -> Video
[14:47:35] 1139.271484s: Video -> Film
[14:48:11] 1183.048584s: Film -> Video
[14:48:11] 1183.115234s: Video -> Film
[14:48:12] 1183.916138s: Film -> Video
[14:48:12] 1183.949463s: Video -> Film
[14:48:23] 1195.327515s: Film -> Video
[14:48:23] 1195.360840s: Video -> Film
[14:48:38] 1214.213013s: Film -> Video
[14:48:38] 1214.279785s: Video -> Film
[14:48:41] 1218.583984s: Film -> Video
[14:48:41] 1218.617432s: Video -> Film
[14:48:59] 1242.874878s: Film -> Video
[14:48:59] 1242.908325s: Video -> Film
[14:49:00] 1244.209595s: Film -> Video
[14:49:00] 1244.276367s: Video -> Film
[14:49:08] 1254.569946s: Film -> Video
[14:49:08] 1254.619995s: Video -> Film
[14:49:20] 1273.739136s: Film -> Video
[14:49:20] 1273.772583s: Video -> Film
[14:49:51] 1314.946899s: Film -> Video
[14:49:51] 1314.980347s: Video -> Film
[14:49:59] 1324.322998s: Film -> Video
[14:49:59] 1324.356323s: Video -> Film
[14:50:03] 1331.763794s: Film -> Video
[14:50:03] 1331.830444s: Video -> Film
[14:50:15] 1347.813110s: Film -> Video
[14:50:15] 1347.846436s: Video -> Film
[14:50:22] 1359.958618s: Film -> Video
[14:50:22] 1360.025391s: Video -> Film
[14:50:33] 1375.374023s: Film -> Video
[14:50:33] 1375.440674s: Video -> Film
[14:50:35] 1377.476074s: Film -> Video
[14:50:35] 1377.509521s: Video -> Film
[14:50:41] 1386.618530s: Film -> Video
[14:50:41] 1386.651855s: Video -> Film
[14:50:43] 1390.972900s: Film -> Video
[14:50:43] 1391.056396s: Video -> Film
[14:50:55] 1406.071289s: Film -> Video
[14:50:55] 1406.104736s: Video -> Film
[14:51:06] 1421.286621s: Film -> Video
[14:51:06] 1421.319946s: Video -> Film
[14:51:56] 1488.420288s: Film -> Video
[14:51:56] 1488.487061s: Video -> Film
[14:51:57] 1489.955078s: Film -> Video
[14:51:57] 1489.988525s: Video -> Film
[14:51:59] 1491.740234s: Film -> Video
[14:51:59] 1491.790283s: Video -> Film
[14:52:00] 1493.558716s: Film -> Video
[14:52:00] 1493.592163s: Video -> Film
[14:52:14] 1513.311768s: Film -> Video
[14:52:14] 1513.345215s: Video -> Film
[14:52:20] 1521.553467s: Film -> Video
[14:52:20] 1521.586670s: Video -> Film
[14:52:23] 1524.389526s: Film -> Video
[14:52:23] 1524.422974s: Video -> Film
[14:52:27] 1530.395508s: Film -> Video
[14:52:27] 1530.462280s: Video -> Film
[14:52:38] 1544.176025s: Film -> Video
[14:52:38] 1544.209473s: Video -> Film
[14:52:47] 1557.672729s: Film -> Video
[14:52:47] 1557.722900s: Video -> Film
[14:53:56] 1645.543823s: Film -> Video
[14:53:56] 1645.577271s: Video -> Film
[14:54:20] 1682.881226s: Film -> Video
[14:54:20] 1682.914429s: Video -> Film
[14:54:44] 1717.081909s: Film -> Video
[14:54:44] 1717.148804s: Video -> Film
[14:54:49] 1725.790771s: Film -> Video
[14:54:49] 1725.824219s: Video -> Film
[14:55:36] 1789.587769s: Film -> Video
[14:55:36] 1789.621216s: Video -> Film
[14:55:50] 1810.058350s: Film -> Video
[14:55:50] 1810.108276s: Video -> Film
[14:55:52] 1813.044678s: Film -> Video
[14:55:52] 1813.077881s: Video -> Film
[14:56:01] 1825.657227s: Film -> Video
[14:56:01] 1825.690430s: Video -> Film
[14:56:18] 1848.980469s: Film -> Video
[14:56:18] 1849.047119s: Video -> Film
[14:56:28] 1863.862061s: Film -> Video
[14:56:28] 1863.928711s: Video -> Film
[14:56:32] 1868.867065s: Film -> Video
[14:56:32] 1868.900391s: Video -> Film
[14:56:37] 1873.521606s: Film -> Video
[14:56:37] 1873.571777s: Video -> Film
[14:56:55] 1900.131592s: Film -> Video
[14:56:55] 1900.164917s: Video -> Film
[14:58:05] 1984.315674s: Film -> Video
[14:58:05] 1984.348999s: Video -> Film
[14:58:29] 2012.160156s: Film -> Video
[14:58:29] 2012.210083s: Video -> Film
[14:59:07] 2055.687012s: Film -> Video
[14:59:07] 2055.720459s: Video -> Film
[14:59:54] 2123.655029s: Film -> Video
[14:59:54] 2123.688232s: Video -> Film
[15:00:21] 2153.167725s: Film -> Video
[15:00:21] 2153.250977s: Video -> Film
[15:00:27] 2161.859619s: Film -> Video
[15:00:27] 2161.926514s: Video -> Film
[15:00:53] 2206.237305s: Film -> Video
[15:00:53] 2206.270752s: Video -> Film
[15:00:54] 2209.073486s: Film -> Video
[15:00:55] 2209.106934s: Video -> Film
[15:01:04] 2223.955078s: Film -> Video
[15:01:04] 2223.988525s: Video -> Film
[15:01:12] 2235.533447s: Film -> Video
[15:01:12] 2235.600098s: Video -> Film
[15:01:30] 2261.559326s: Film -> Video
[15:01:30] 2261.625977s: Video -> Film
[15:01:37] 2270.835205s: Film -> Video
[15:01:38] 2272.603760s: Video -> Film
[15:02:11] 2316.113770s: Film -> Video
[15:02:11] 2316.147217s: Video -> Film
[15:02:20] 2328.259277s: Film -> Video
[15:02:20] 2328.292725s: Video -> Film
[15:02:30] 2344.008301s: Film -> Video
[15:02:30] 2344.041748s: Video -> Film
[15:02:42] 2361.709229s: Film -> Video
[15:02:42] 2361.759521s: Video -> Film
[15:03:14] 2409.740723s: Film -> Video
[15:03:14] 2409.807373s: Video -> Film
[15:03:32] 2431.128662s: Film -> Video
[15:03:32] 2431.195312s: Video -> Film
[15:03:54] 2460.040771s: Film -> Video
[15:03:54] 2460.091064s: Video -> Film
[15:04:56] 2533.330811s: Film -> Video
[15:04:56] 2533.364014s: Video -> Film
[15:05:06] 2546.677490s: Film -> Video
[15:05:06] 2546.710693s: Video -> Film
[15:05:28] 2573.037109s: Film -> Video
[15:05:28] 2573.070557s: Video -> Film
[15:05:37] 2583.314209s: Film -> Video
[15:05:40] 2586.550537s: Video -> Film
[15:05:42] 2589.053223s: Film -> Video
[15:05:42] 2589.086670s: Video -> Film
[15:06:25] 2649.079834s: Film -> Video
[15:06:25] 2649.146484s: Video -> Film
[15:07:26] 2731.228516s: Film -> Video
[15:07:26] 2731.295410s: Video -> Film
[15:07:28] 2734.731934s: Film -> Video
[15:07:28] 2734.765381s: Video -> Film
[15:07:52] 2769.199707s: Film -> Video
[15:07:52] 2769.266602s: Video -> Film
[15:07:56] 2774.705322s: Film -> Video
[15:07:56] 2774.738770s: Video -> Film
[15:08:02] 2782.513184s: Film -> Video
[15:08:02] 2782.546387s: Video -> Film
[15:08:36] 2824.788574s: Film -> Video
[15:08:37] 2824.855225s: Video -> Film
[15:09:11] 2871.702148s: Film -> Video
[15:09:11] 2871.768799s: Video -> Film
[15:09:16] 2876.073242s: Film -> Video
[15:09:16] 2876.106445s: Video -> Film
[15:09:39] 2904.568359s: Film -> Video
[15:09:39] 2904.635010s: Video -> Film
[15:09:43] 2910.340820s: Film -> Video
[15:09:44] 2910.407471s: Video -> Film
[15:10:07] 2938.101807s: Film -> Video
[15:10:07] 2938.168457s: Video -> Film
[15:10:10] 2941.805420s: Film -> Video
[15:10:10] 2941.838867s: Video -> Film
[15:10:12] 2944.274658s: Film -> Video
[15:10:12] 2944.308105s: Video -> Film
[15:10:16] 2949.446533s: Film -> Video
[15:10:16] 2949.479736s: Video -> Film
[15:11:07] 3007.604736s: Film -> Video
[15:11:07] 3007.637939s: Video -> Film
[15:11:09] 3010.907715s: Film -> Video
[15:11:09] 3010.941162s: Video -> Film
[15:11:21] 3026.690430s: Film -> Video
[15:11:21] 3026.723633s: Video -> Film
[15:11:25] 3030.694336s: Film -> Video
[15:11:25] 3030.727783s: Video -> Film
[15:11:27] 3034.031006s: Film -> Video
[15:11:27] 3034.064453s: Video -> Film
[15:12:15] 3088.084961s: Film -> Video
[15:12:15] 3088.151855s: Video -> Film
[15:12:36] 3110.473877s: Film -> Video
[15:12:36] 3110.507324s: Video -> Film
[15:12:41] 3117.981445s: Film -> Video
[15:12:41] 3118.014893s: Video -> Film
[15:12:44] 3122.819580s: Film -> Video
[15:12:45] 3122.853027s: Video -> Film
[15:13:03] 3147.577637s: Film -> Video
[15:13:03] 3147.611084s: Video -> Film
[15:13:27] 3171.301270s: Film -> Video
[15:13:27] 3171.334717s: Video -> Film
[15:13:45] 3188.485352s: Film -> Video
[15:13:45] 3188.552246s: Video -> Film
[15:13:58] 3200.380371s: Film -> Video
[15:13:58] 3200.430664s: Video -> Film
[15:14:11] 3217.647705s: Film -> Video
[15:14:11] 3217.681152s: Video -> Film
[15:14:46] 3263.543457s: Film -> Video
[15:14:46] 3263.626953s: Video -> Film
[15:14:47] 3265.261963s: Film -> Video
[15:14:47] 3265.295410s: Video -> Film
[15:15:05] 3287.751221s: Film -> Video
[15:15:05] 3287.784424s: Video -> Film
[15:15:17] 3303.667236s: Film -> Video
[15:15:17] 3303.700195s: Video -> Film
[15:15:19] 3306.136230s: Film -> Video
[15:15:19] 3306.169678s: Video -> Film
[15:15:41] 3336.032715s: Film -> Video
[15:15:41] 3336.066162s: Video -> Film
[15:15:48] 3343.473389s: Film -> Video
[15:15:48] 3343.506836s: Video -> Film
[15:17:01] 3436.566406s: Film -> Video
[15:17:16] reader: done. 1 scr changes
[15:17:17] 3515.545166s: Video -> Film
[15:17:21] sync: got 85731 frames, 83108 expected
[15:17:21] work: average encoding speed for job is 31.292074 fps
[15:17:21] mpeg2 done: 85732 frames
[15:17:21] render: lost time: 0 (0 frames)
[15:17:21] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:866   Avg QP:18.99  size: 35800  PSNR Mean Y:43.37 U:49.62 V:49.89 Avg:44.55 Global:43.85
x264 [info]: slice P:28318 Avg QP:20.69  size: 17700  PSNR Mean Y:43.67 U:47.60 V:47.93 Avg:44.50 Global:43.69
x264 [info]: slice B:56546 Avg QP:22.03  size:  4700  PSNR Mean Y:43.55 U:47.91 V:48.26 Avg:44.35 Global:43.52
x264 [info]: consecutive B-frames:  9.4% 17.2%  8.8% 11.7% 22.6% 27.0%  3.2%
x264 [info]: mb I  I16..4:  8.0% 76.5% 15.5%
x264 [info]: mb P  I16..4:  1.0%  7.3%  0.9%  P16..4: 51.9% 19.9% 14.2%  0.4%  0.5%    skip: 3.9%
x264 [info]: mb B  I16..4:  0.1%  0.3%  0.0%  B16..8: 40.8%  1.1%  1.9%  direct: 2.6%  skip:53.2%  L0:40.9% L1:35.5% BI:23.5%
x264 [info]: 8x8 transform  intra:78.2%  inter:79.5%
x264 [info]: direct mvs  spatial:95.7%  temporal:4.3%
x264 [info]: ref P L0  54.4% 22.9%  9.2%  7.1%  6.5%
x264 [info]: ref B L0  68.6% 20.6%  7.2%  3.7%
x264 [info]: ref B L1  94.9%  5.1%
x264 [info]: SSIM Mean Y:0.9789561
x264 [info]: PSNR Mean Y:43.589 U:47.828 V:48.165 Avg:44.401 Global:43.582 kb/s:1785.36
[15:17:21] decomb: yadif deinterlaced 272 | blend deinterlaced 1125 | unfiltered 84333 | total 85730
[15:17:21] libhb: work result = 0
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by jbrjake »

graysky wrote:Apologies - I didn't realize referencing another user with a similar post was against the rules... I'll have a closer look at them moving forward.
No, asking for support without providing an activity log is against the rules. Directing other people to a thread that has no activity logs just makes it worse, because another user can'tknow if they're having the same problem without an activity log to verify settings any more than we could provide support without that info.
I saved a complete log of the encode I alluded to in my post - EDIT, that's not totally true because I had the decomb filter active on this run. BUT, the average FPS on pass1 and pass2 are nearly identical to the first run I did (same options/source) that didn't use the decomb filter.
Well decomb, by definition, is going to spend different amounts of time on different frames. So that makes this log invalid.
[14:23:36] + options: ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
And you're using *precisely these options* in MeGUI *on the same source* and getting better CPU usage?

Also, what do you get on non-hybrid sources?
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

jbrjake wrote:And you're using *precisely these options* in MeGUI *on the same source* and getting better CPU usage?
Also, what do you get on non-hybrid sources?
@jbrjake - Thanks for your reply. In an attempt to answer your questions, I pulled a chapter off a DVD that's progressive and ran the Windows version of Handbrake against the LINUX x64 version under controlled conditions, that is using the same encoding settings (to the best of my knowledge) on the same machine. Below are the FPS values for pass1 and pass2 on each platform along with the approx. CPU usage and logs.

Based on these data, there does seem to be something negatively affecting the speed of the LINUX x64 version of Handbrake by about 12 % compared to the windows version. Any insight you can provide is appreciated and please let me know if you need additional info.

O/S details: Windows XP Pro x64 SP2 with all the hotfixes; Debian Lenny amd-64

Hardware details: X3360 @ 3.40 GHz (8.5x400), 2x2 GB @ 5-5-5-15 running at 1,000 MHz (4:5), SATA2 HDDs, DFI LT-P35-T2R motherboard.


handbrake-win64
Run1: 233.5 fps (pass 1) and 41.8 fps (pass 1)
Run2: 234.8 fps (pass 1) and 41.8 fps (pass 2)

Time to encode both passes: 03:29

Approx. CPU usage Pass 1: 85-95 %
Approx. CPU usage Pass 2: 95-100 %

This was for pass1 (left) and pass2 (right) under Windows:
Image

Code: Select all

### CLI Query:  -i "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.VOB" -t 1 -c 1 -o "e:\incoming\1.mkv" -f mkv --crop 6:10:0:0 -P  -e x264 -b 1800 -2  -T  -a 1 -E faac -B 160 -R 0 -6 stereo -D 1 --markers="e:\tmp\VTS_01_PGC_01_1.VOB-1-chapters.csv" -x ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:subq=9:analyse=all:8x8dct=1:trellis=1:no-fast-pskip=1:psy-rd=1,1 -v 

#########################################

[07:05:08] hb_init: checking cpu count
[07:05:08] hb_init: starting libhb thread
HandBrake 0.9.3 (2008112300) - http://handbrake.fr/
4 CPUs detected
Opening D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.VOB...
[07:05:08] hb_scan: path=D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.VOB, title_index=1
[07:05:08] scan: trying to open with libdvdread
[07:05:08] dvd: not a dvd - trying as a stream/file instead
[07:05:08] file is MPEG DVD Program Stream
[07:05:08] add_audio_to_title: added AC3 audio stream 0x80bd
[07:05:08] scan: decoding previews for title 1
[07:05:08] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[07:05:09] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/10/0/0, aspect 16:9, PAR 32:27
[07:05:09] scan: title (0) job->width:720, job->height:400
[07:05:09] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 0, ttn 0, cells 0->0 (0 blocks)
  + duration: 00:05:13
  + size: 720x480, aspect: 1.78, 23.976 fps
  + autocrop: 0/10/0/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:05:13
  + audio tracks:
    + 1, Unknown (AC3) (5.1 ch), 48000Hz, 448000bps
  + subtitle tracks:
Reading chapter markers from file e:\tmp\VTS_01_PGC_01_1.VOB-1-chapters.csv
Invalid sample rate 0, using input rate 48000
Modified x264 options for pass 1 to append turbo options: ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:subq=9:analyse=all:8x8dct=1:trellis=1:no-fast-pskip=1:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[07:05:09] 2 job(s) to process
[07:05:09] starting job
[07:05:09] job configuration:
[07:05:09]  * source
[07:05:09]    + D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.VOB
[07:05:09]    + title 1, chapter(s) 1 to 1
[07:05:09]  * destination
[07:05:09]    + e:\incoming\1.mkv
[07:05:09]    + container: Matroska (.mkv)
[07:05:09]      + chapter markers
[07:05:09]  * video track
[07:05:09]    + decoder: mpeg2
[07:05:09]      + bitrate 9801 kbps
[07:05:09]    + frame rate: same as source (around 23.976 fps)
[07:05:09]    + loose anamorphic
[07:05:09]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[07:05:09]      + pixel aspect ratio: 853 / 720
[07:05:09]      + display dimensions: 853 * 464
[07:05:09]    + encoder: x264
[07:05:09]      + options: ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:subq=9:analyse=all:8x8dct=1:trellis=1:no-fast-pskip=1:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[07:05:09]      + bitrate: 1800 kbps, pass: 1
[07:05:09]  * audio track 0
[07:05:09]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[07:05:09]      + bitrate: 448 kbps, samplerate: 48000 Hz
[07:05:09]    + mixdown: Stereo
[07:05:09]    + encoder: faac
[07:05:09]      + bitrate: 160 kbps, samplerate: 48000 Hz
[07:05:09] dvd: not a dvd - trying as a stream/file instead
[07:05:09] reader: first SCR 442553179
[07:05:09] mpeg2: "Chapter 1" (1) at frame 0 time 12012
[07:05:09] encx264: keyint-min: 24, keyint-max: 240
[07:05:09] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[07:05:09] sync: expecting 7533 video frames
[07:05:09] sync: first pts is 12012
[07:05:41] reader: done. 1 scr changes
[07:05:41] sync: got 7399 frames, 7533 expected
[07:05:41] work: average encoding speed for job is 233.503693 fps
[07:05:41] mpeg2 done: 7400 frames
[07:05:41] render: lost time: 0 (0 frames)
[07:05:41] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:16.22  size: 34138  PSNR Mean Y:46.77 U:49.88 V:49.93 Avg:47.57 Global:47.26
x264 [info]: slice P:2890  Avg QP:17.74  size: 15079  PSNR Mean Y:44.73 U:48.41 V:48.15 Avg:45.61 Global:45.19
x264 [info]: slice B:4409  Avg QP:19.93  size:  5140  PSNR Mean Y:43.37 U:47.70 V:47.41 Avg:44.36 Global:44.08
x264 [info]: consecutive B-frames: 12.6% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4: 32.5%  0.0% 67.5%
x264 [info]: mb P  I16..4: 32.1%  0.0%  0.0%  P16..4: 62.8%  0.0%  0.0%  0.0%  0.0%    skip: 5.1%
x264 [info]: mb B  I16..4:  7.2%  0.0%  0.0%  B16..8: 32.2%  0.0%  0.0%  direct:29.2%  skip:31.4%  L0:30.5% L1:50.9% BI:18.6%
x264 [info]: final ratefactor: 21.42
x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
x264 [info]: SSIM Mean Y:0.9788087
x264 [info]: PSNR Mean Y:43.946 U:48.009 V:47.730 Avg:44.889 Global:44.517 kb/s:1806.26
[07:05:41] starting job
[07:05:41] job configuration:
[07:05:41]  * source
[07:05:41]    + D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.VOB
[07:05:41]    + title 1, chapter(s) 1 to 1
[07:05:41]  * destination
[07:05:41]    + e:\incoming\1.mkv
[07:05:41]    + container: Matroska (.mkv)
[07:05:41]      + chapter markers
[07:05:41]  * video track
[07:05:41]    + decoder: mpeg2
[07:05:41]      + bitrate 9801 kbps
[07:05:41]    + frame rate: same as source (around 23.976 fps)
[07:05:41]    + loose anamorphic
[07:05:41]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[07:05:41]      + pixel aspect ratio: 853 / 720
[07:05:41]      + display dimensions: 853 * 464
[07:05:41]    + encoder: x264
[07:05:41]      + options: ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:subq=9:analyse=all:8x8dct=1:trellis=1:no-fast-pskip=1:psy-rd=1,1
[07:05:41]      + bitrate: 1800 kbps, pass: 2
[07:05:41]  * audio track 0
[07:05:41]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[07:05:41]      + bitrate: 448 kbps, samplerate: 48000 Hz
[07:05:41]    + mixdown: Stereo
[07:05:41]    + encoder: faac
[07:05:41]      + bitrate: 160 kbps, samplerate: 48000 Hz
[07:05:41] dvd: not a dvd - trying as a stream/file instead
[07:05:41] encx264: keyint-min: 24, keyint-max: 240
[07:05:41] reader: first SCR 442553179
[07:05:41] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
[07:05:41] mpeg2: "Chapter 1" (1) at frame 0 time 12012
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
[07:05:41] sync: expecting 7533 video frames
[07:05:41] sync: first pts is 12012
[07:08:38] reader: done. 1 scr changes
[07:08:39] sync: got 7399 frames, 7533 expected
[07:08:39] work: average encoding speed for job is 41.846779 fps
[07:08:40] mpeg2 done: 7400 frames
[07:08:40] render: lost time: 0 (0 frames)
[07:08:40] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:18.37  size: 27052  PSNR Mean Y:44.32 U:50.61 V:50.77 Avg:45.59 Global:45.31
x264 [info]: slice P:2895  Avg QP:20.28  size: 15729  PSNR Mean Y:44.08 U:48.91 V:48.87 Avg:45.16 Global:44.96
x264 [info]: slice B:4404  Avg QP:22.22  size:  4832  PSNR Mean Y:43.13 U:48.11 V:48.05 Avg:44.24 Global:44.10
x264 [info]: consecutive B-frames: 12.7% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4:  7.3% 75.6% 17.0%
x264 [info]: mb P  I16..4:  0.7%  5.9%  1.4%  P16..4: 55.3% 19.8% 13.3%  0.3%  0.3%    skip: 3.0%
x264 [info]: mb B  I16..4:  0.0%  0.4%  0.1%  B16..8: 40.9%  1.5%  2.3%  direct: 2.4%  skip:52.3%  L0:38.2% L1:41.7% BI:20.1%
x264 [info]: 8x8 transform  intra:74.1%  inter:77.4%
x264 [info]: direct mvs  spatial:94.8%  temporal:5.2%
x264 [info]: ref P L0  54.4% 26.8% 18.8%
x264 [info]: ref B L0  76.5% 23.5%
x264 [info]: ref B L1  94.0%  6.0%
x264 [info]: SSIM Mean Y:0.9760169
x264 [info]: PSNR Mean Y:43.516 U:48.459 V:48.406 Avg:44.618 Global:44.434 kb/s:1802.62
[07:08:40] libhb: work result = 0

Rip done!
HandBrake has exited.
handbrake-linux64
Run1: 192.0 fps (pass 1) and 37.8 fps (pass 2)
Run2: 193.8 fps (pass 1) and 37.7 fps (pass 2)

Time to encode both passes: 03:54

Approx. CPU usage Pass 1: 65-75 %
Approx. CPU usage Pass 2: 75-85 %

I drew a black line about where pass 2 started:
Image

Code: Select all

Handbrake Version: 0.9.3 (2008112300)
[07:43:02] hb_scan: path=/mnt/D/DVD/VIDEO_TS/VTS_01_PGC_01_1.VOB, title_index=1
[07:43:02] scan: trying to open with libdvdread
[07:43:02] dvd: not a dvd - trying as a stream/file instead
[07:43:02] file is MPEG DVD Program Stream
[07:43:02] add_audio_to_title: added AC3 audio stream 0x80bd
[07:43:02] scan: decoding previews for title 1
[07:43:02] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[07:43:02] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/10/0/0, aspect 16:9, PAR 32:27
[07:43:02] scan: title (0) job->width:720, job->height:400
[07:43:02] libhb: scan thread found 1 valid title(s)
[07:43:02] lingui: Custom Preset: test
[07:43:02] 2 job(s) to process
[07:43:02] starting job
[07:43:02] job configuration:
[07:43:02]  * source
[07:43:02]    + /mnt/D/DVD/VIDEO_TS/VTS_01_PGC_01_1.VOB
[07:43:02]    + title 1, chapter(s) 1 to 1
[07:43:02]  * destination
[07:43:02]    + ./VTS_01_PGC_01_1.VOB-1.mkv
[07:43:02]    + container: Matroska (.mkv)
[07:43:02]      + chapter markers
[07:43:02]  * video track
[07:43:02]    + decoder: mpeg2
[07:43:02]      + bitrate 9801 kbps
[07:43:02]    + frame rate: same as source (around 23.976 fps)
[07:43:02]    + loose anamorphic
[07:43:02]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[07:43:02]      + pixel aspect ratio: 853 / 720
[07:43:02]      + display dimensions: 853 * 464
[07:43:02]    + encoder: x264
[07:43:02]      + options: ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[07:43:02]      + bitrate: 1800 kbps, pass: 1
[07:43:02]  * audio track 0
[07:43:02]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[07:43:02]      + bitrate: 448 kbps, samplerate: 48000 Hz
[07:43:02]    + mixdown: Stereo
[07:43:02]    + encoder: faac
[07:43:02]      + bitrate: 160 kbps, samplerate: 48000 Hz
[07:43:02] encx264: keyint-min: 24, keyint-max: 240
[07:43:02] dvd: not a dvd - trying as a stream/file instead
[07:43:02] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
[07:43:02] reader: first SCR 442553179
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[07:43:02] sync: expecting 7533 video frames
[07:43:02] mpeg2: "Chapter  1" (1) at frame 0 time 12012
[07:43:02] sync: first pts is 12012
[07:43:41] reader: done. 1 scr changes
[07:43:41] sync: got 7399 frames, 7533 expected
[07:43:41] work: average encoding speed for job is 191.995621 fps
[07:43:41] mpeg2 done: 7400 frames
[07:43:41] render: lost time: 0 (0 frames)
[07:43:41] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:16.22  size: 34141  PSNR Mean Y:46.77 U:49.88 V:49.93 Avg:47.57 Global:47.26
x264 [info]: slice P:2890  Avg QP:17.74  size: 15078  PSNR Mean Y:44.73 U:48.41 V:48.15 Avg:45.61 Global:45.19
x264 [info]: slice B:4409  Avg QP:19.94  size:  5140  PSNR Mean Y:43.37 U:47.70 V:47.41 Avg:44.36 Global:44.08
x264 [info]: consecutive B-frames: 12.6% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4: 32.5%  0.0% 67.5%
x264 [info]: mb P  I16..4: 32.1%  0.0%  0.0%  P16..4: 62.8%  0.0%  0.0%  0.0%  0.0%    skip: 5.1%
x264 [info]: mb B  I16..4:  7.2%  0.0%  0.0%  B16..8: 32.2%  0.0%  0.0%  direct:29.2%  skip:31.4%  L0:30.4% L1:50.9% BI:18.7%
x264 [info]: final ratefactor: 21.42
x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
x264 [info]: SSIM Mean Y:0.9788079
x264 [info]: PSNR Mean Y:43.946 U:48.010 V:47.732 Avg:44.889 Global:44.517 kb/s:1806.25
[07:43:41] starting job
[07:43:41] job configuration:
[07:43:41]  * source
[07:43:41]    + /mnt/D/DVD/VIDEO_TS/VTS_01_PGC_01_1.VOB
[07:43:41]    + title 1, chapter(s) 1 to 1
[07:43:41]  * destination
[07:43:41]    + ./VTS_01_PGC_01_1.VOB-1.mkv
[07:43:41]    + container: Matroska (.mkv)
[07:43:41]      + chapter markers
[07:43:41]  * video track
[07:43:41]    + decoder: mpeg2
[07:43:41]      + bitrate 9801 kbps
[07:43:41]    + frame rate: same as source (around 23.976 fps)
[07:43:41]    + loose anamorphic
[07:43:41]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[07:43:41]      + pixel aspect ratio: 853 / 720
[07:43:41]      + display dimensions: 853 * 464
[07:43:41]    + encoder: x264
[07:43:41]      + options: ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1
[07:43:41]      + bitrate: 1800 kbps, pass: 2
[07:43:41]  * audio track 0
[07:43:41]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[07:43:41]      + bitrate: 448 kbps, samplerate: 48000 Hz
[07:43:41]    + mixdown: Stereo
[07:43:41]    + encoder: faac
[07:43:41]      + bitrate: 160 kbps, samplerate: 48000 Hz
[07:43:41] encx264: keyint-min: 24, keyint-max: 240
[07:43:41] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
[07:43:41] dvd: not a dvd - trying as a stream/file instead
[07:43:41] reader: first SCR 442553179
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
[07:43:41] mpeg2: "Chapter  1" (1) at frame 0 time 12012
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
[07:43:42] sync: expecting 7533 video frames
[07:43:42] sync: first pts is 12012
[07:46:57] reader: done. 1 scr changes
[07:46:58] sync: got 7399 frames, 7533 expected
[07:46:58] work: average encoding speed for job is 37.820969 fps
[07:46:59] mpeg2 done: 7400 frames
[07:46:59] render: lost time: 0 (0 frames)
[07:46:59] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:18.37  size: 27086  PSNR Mean Y:44.32 U:50.61 V:50.76 Avg:45.60 Global:45.31
x264 [info]: slice P:2895  Avg QP:20.28  size: 15733  PSNR Mean Y:44.08 U:48.91 V:48.86 Avg:45.17 Global:44.96
x264 [info]: slice B:4404  Avg QP:22.22  size:  4829  PSNR Mean Y:43.13 U:48.11 V:48.05 Avg:44.24 Global:44.10
x264 [info]: consecutive B-frames: 12.7% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4:  7.5% 75.5% 17.0%
x264 [info]: mb P  I16..4:  0.7%  5.9%  1.4%  P16..4: 55.4% 19.8% 13.3%  0.3%  0.3%    skip: 3.0%
x264 [info]: mb B  I16..4:  0.0%  0.4%  0.1%  B16..8: 40.9%  1.5%  2.3%  direct: 2.4%  skip:52.4%  L0:38.2% L1:41.7% BI:20.0%
x264 [info]: 8x8 transform  intra:74.0%  inter:77.5%
x264 [info]: direct mvs  spatial:95.1%  temporal:4.9%
x264 [info]: ref P L0  54.4% 26.8% 18.8%
x264 [info]: ref B L0  76.6% 23.4%
x264 [info]: ref B L1  94.0%  6.0%
x264 [info]: SSIM Mean Y:0.9760228
x264 [info]: PSNR Mean Y:43.517 U:48.458 V:48.405 Avg:44.618 Global:44.435 kb/s:1802.70
[07:46:59] libhb: work result = 0
Just for kicks, I ran it w/ MeGUI keeping the settings as similar as I could. As you know, MeGUI has more x264 options and as well, handles the audio encoding/muxing in their own discrete passes so the video numbers are purely video. Also as you know, it also takes it's input from AviSynth, not the directly from the VOB.

MeGUI
Run1: 207.9 fps (pass 1) and 40.15 fps (pass 2)
Run2: 208.5 fps (pass 1) and 40.13 fps (pass 2)

Time to encode both passes: 03:40

Approx. CPU usage Pass 1: 80-85 %
Approx. CPU usage Pass 2: 95-100 %

This was for pass1 (left) and pass2 (right):
Image

Here was the avisynth script:

Code: Select all

global MeGUI_darx = 37
global MeGUI_dary = 20
DGDecode_mpeg2source("D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.d2v")
crop( 0, 6, 0, -10)
Here was the log:

Code: Select all

[Information] Log
-[Information] Versions
--[NoImage] MeGUI Version : 0.3.0.3011
--[NoImage] OS : Microsoft(R) Windows(R) XP Professional x64 Edition SP2 (5.2.131072.3790)
--[NoImage] Framework used : 2.0 SP1 (2.0.50727.1433)
-[Information] Hardware
--[NoImage] CPU : Intel(R) Pentium(R) III Xeon processor
-[Information] AutoEncode job generation log
--[NoImage] Projected Bitrate : 1800kbps
--[NoImage] Split Size : null
--[Information] Eliminating duplicate filenames
---[NoImage] Video output file: D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.mp4
---[NoImage] Muxed output file: D:\DVD\VIDEO_TS\VTS_01_PGC_01_1-muxed.mp4
-[Information] AutoEncode job generation log
--[NoImage] Projected Bitrate : 1800kbps
--[NoImage] Split Size : null
--[Information] Eliminating duplicate filenames
---[NoImage] Video output file: D:\DVD\VIDEO_TS\VTS_01_PGC_01_1-2.mp4
---[NoImage] Muxed output file: D:\DVD\VIDEO_TS\VTS_01_PGC_01_1-2-muxed.mp4
-[Information] Log for job13 (video, VTS_01_PGC_01_1.avs -> )
--[Information] [11/30/2008 7:28:59 AM] Started handling job
--[Information] [11/30/2008 7:28:59 AM] Preprocessing
---[Information] Bitrate calculation for video
----[NoImage] Desired size after subtracting audio: 67509KBs
----[NoImage] Calculated desired bitrate: 1790kbit/s
--[NoImage] Job commandline: "D:\Video\megui\tools\x264\x264.exe" --pass 1 --bitrate 1790 --stats "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.stats" --bframes 6 --b-pyramid --weightb --direct auto --nf --subme 2 --partitions none --vbv-maxrate 25000 --me dia --threads auto --thread-input --sar 1073:900 --progress --output NUL "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.avs" 
--[Information] [11/30/2008 7:28:59 AM] Encoding started
--[NoImage] Standard output stream
--[NoImage] Standard error stream
---[NoImage] avis [info]: 720x464 @ 23.98 fps (7404 frames)
---[NoImage] x264 [info]: using SAR=1073/900
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
---[NoImage] x264 [info]: profile Main, level 3.0
---[NoImage]                                                                                
---[NoImage] x264 [info]: slice I:109   Avg QP:16.33  size: 33512  PSNR Mean Y:46.78 U:49.65 V:49.64 Avg:47.53 Global:47.20
---[NoImage] x264 [info]: slice P:3467  Avg QP:18.16  size: 14014  PSNR Mean Y:44.36 U:48.15 V:47.82 Avg:45.25 Global:44.83
---[NoImage] x264 [info]: slice B:3828  Avg QP:19.97  size:  4461  PSNR Mean Y:43.36 U:47.73 V:47.44 Avg:44.35 Global:44.10
---[NoImage] x264 [info]: consecutive B-frames: 14.5% 42.1% 19.8% 14.0%  9.6%  0.1%  0.0%
---[NoImage] x264 [info]: mb I  I16..4: 30.2%  0.0% 69.8%
---[NoImage] x264 [info]: mb P  I16..4: 36.7%  0.0%  0.0%  P16..4: 58.2%  0.0%  0.0%  0.0%  0.0%    skip: 5.1%
---[NoImage] x264 [info]: mb B  I16..4: 10.1%  0.0%  0.0%  B16..8: 28.7%  0.0%  0.0%  direct:23.6%  skip:37.6%  L0:28.9% L1:39.9% BI:31.2%
---[NoImage] x264 [info]: final ratefactor: 19.74
---[NoImage] x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
---[NoImage] x264 [info]: SSIM Mean Y:0.9784709
---[NoImage] x264 [info]: PSNR Mean Y:43.878 U:47.958 V:47.648 Avg:44.822 Global:44.462 kb/s:1795.69
---[NoImage] encoded 7404 frames, 207.92 fps, 1795.81 kb/s
--[Information] [11/30/2008 7:29:35 AM] Postprocessing
---[Information] Deleting intermediate files
--[Information] [11/30/2008 7:29:35 AM] Job completed
-[Information] Log for job14 (video, VTS_01_PGC_01_1.avs -> VTS_01_PGC_01_1.mp4)
--[Information] [11/30/2008 7:29:35 AM] Started handling job
--[Information] [11/30/2008 7:29:35 AM] Preprocessing
--[NoImage] Job commandline: "D:\Video\megui\tools\x264\x264.exe" --pass 2 --bitrate 1790 --stats "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.stats" --ref 3 --mixed-refs --no-fast-pskip --bframes 6 --b-pyramid --weightb --direct auto --nf --subme 9 --trellis 1 --partitions all  --8x8dct --vbv-maxrate 25000 --me umh --threads auto --thread-input --sar 1073:900 --progress --output "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.mp4" "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.avs" 
--[Information] [11/30/2008 7:29:35 AM] Encoding started
--[NoImage] Standard output stream:                                                         
--[NoImage] Standard error stream
---[NoImage] avis [info]: 720x464 @ 23.98 fps (7404 frames)
---[NoImage] x264 [info]: using SAR=1073/900
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
---[NoImage] x264 [info]: profile High, level 3.0
---[NoImage] mp4 [info]: initial delay 2002 (scale 24000)
---[NoImage]                                                                                
---[NoImage] x264 [info]: slice I:109   Avg QP:16.25  size: 36637  PSNR Mean Y:47.23 U:50.55 V:50.68 Avg:48.09 Global:47.91
---[NoImage] x264 [info]: slice P:3467  Avg QP:18.22  size: 13683  PSNR Mean Y:44.82 U:48.74 V:48.69 Avg:45.77 Global:45.56
---[NoImage] x264 [info]: slice B:3828  Avg QP:20.05  size:  4623  PSNR Mean Y:43.85 U:48.20 V:48.19 Avg:44.87 Global:44.72
---[NoImage] x264 [info]: consecutive B-frames: 14.5% 42.1% 19.8% 14.0%  9.6%  0.1%  0.0%
---[NoImage] x264 [info]: mb I  I16..4:  5.2% 84.3% 10.5%
---[NoImage] x264 [info]: mb P  I16..4:  0.4%  6.8%  1.0%  P16..4: 43.8% 27.4% 17.0%  0.5%  0.6%    skip: 2.4%
---[NoImage] x264 [info]: mb B  I16..4:  0.0%  0.4%  0.1%  B16..8: 52.3%  1.9%  3.3%  direct: 4.1%  skip:37.9%  L0:39.4% L1:48.6% BI:12.0%
---[NoImage] x264 [info]: 8x8 transform  intra:83.1%  inter:65.5%
---[NoImage] x264 [info]: direct mvs  spatial:95.0%  temporal:5.0%
---[NoImage] x264 [info]: ref P L0  62.8% 22.4% 14.8%
---[NoImage] x264 [info]: ref B L0  78.1% 21.9%
---[NoImage] x264 [info]: ref B L1  92.9%  7.1%
---[NoImage] x264 [info]: SSIM Mean Y:0.9789195
---[NoImage] x264 [info]: PSNR Mean Y:44.358 U:48.485 V:48.463 Avg:45.339 Global:45.130 kb/s:1790.89
---[NoImage] encoded 7404 frames, 40.15 fps, 1791.01 kb/s
--[Information] Final statistics
---[NoImage] Video Bitrate Desired: 1790 kbit/s
---[NoImage] Video Bitrate Obtained (approximate): 1793 kbit/s
--[Information] [11/30/2008 7:32:40 AM] Postprocessing
---[Information] Deleting intermediate files
----[Information] [11/30/2008 7:32:40 AM] Successfully deleted D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.stats
--[Information] [11/30/2008 7:32:40 AM] Job completed
-[Information] Log for job15 (video, VTS_01_PGC_01_1.avs -> )
--[Information] [11/30/2008 7:32:40 AM] Started handling job
--[Information] [11/30/2008 7:32:40 AM] Preprocessing
---[Information] Bitrate calculation for video
----[NoImage] Desired size after subtracting audio: 67509KBs
----[NoImage] Calculated desired bitrate: 1790kbit/s
--[NoImage] Job commandline: "D:\Video\megui\tools\x264\x264.exe" --pass 1 --bitrate 1790 --stats "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.stats" --bframes 6 --b-pyramid --weightb --direct auto --nf --subme 2 --partitions none --vbv-maxrate 25000 --me dia --threads auto --thread-input --sar 1073:900 --progress --output NUL "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.avs" 
--[Information] [11/30/2008 7:32:40 AM] Encoding started
--[NoImage] Standard output stream
--[NoImage] Standard error stream
---[NoImage] avis [info]: 720x464 @ 23.98 fps (7404 frames)
---[NoImage] x264 [info]: using SAR=1073/900
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
---[NoImage] x264 [info]: profile Main, level 3.0
---[NoImage]                                                                                
---[NoImage] x264 [info]: slice I:109   Avg QP:16.33  size: 33512  PSNR Mean Y:46.78 U:49.65 V:49.64 Avg:47.53 Global:47.20
---[NoImage] x264 [info]: slice P:3467  Avg QP:18.16  size: 14014  PSNR Mean Y:44.36 U:48.15 V:47.82 Avg:45.25 Global:44.83
---[NoImage] x264 [info]: slice B:3828  Avg QP:19.97  size:  4461  PSNR Mean Y:43.36 U:47.73 V:47.44 Avg:44.35 Global:44.10
---[NoImage] x264 [info]: consecutive B-frames: 14.5% 42.1% 19.8% 14.0%  9.6%  0.1%  0.0%
---[NoImage] x264 [info]: mb I  I16..4: 30.2%  0.0% 69.8%
---[NoImage] x264 [info]: mb P  I16..4: 36.7%  0.0%  0.0%  P16..4: 58.2%  0.0%  0.0%  0.0%  0.0%    skip: 5.1%
---[NoImage] x264 [info]: mb B  I16..4: 10.1%  0.0%  0.0%  B16..8: 28.7%  0.0%  0.0%  direct:23.6%  skip:37.6%  L0:28.9% L1:39.9% BI:31.2%
---[NoImage] x264 [info]: final ratefactor: 19.74
---[NoImage] x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
---[NoImage] x264 [info]: SSIM Mean Y:0.9784709
---[NoImage] x264 [info]: PSNR Mean Y:43.878 U:47.958 V:47.648 Avg:44.822 Global:44.462 kb/s:1795.69
---[NoImage] encoded 7404 frames, 208.48 fps, 1795.81 kb/s
--[Information] [11/30/2008 7:33:16 AM] Postprocessing
---[Information] Deleting intermediate files
--[Information] [11/30/2008 7:33:16 AM] Job completed
-[Information] Log for job16 (video, VTS_01_PGC_01_1.avs -> VTS_01_PGC_01_1-2.mp4)
--[Information] [11/30/2008 7:33:16 AM] Started handling job
--[Information] [11/30/2008 7:33:16 AM] Preprocessing

--[NoImage] Job commandline: "D:\Video\megui\tools\x264\x264.exe" --pass 2 --bitrate 1790 --stats "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.stats" --ref 3 --mixed-refs --no-fast-pskip --bframes 6 --b-pyramid --weightb --direct auto --nf --subme 9 --trellis 1 --partitions all  --8x8dct --vbv-maxrate 25000 --me umh --threads auto --thread-input --sar 1073:900 --progress --output "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1-2.mp4" "D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.avs" 
--[Information] [11/30/2008 7:33:16 AM] Encoding started
--[NoImage] Standard output stream:                                                         
--[NoImage] Standard error stream
---[NoImage] avis [info]: 720x464 @ 23.98 fps (7404 frames)
---[NoImage] x264 [info]: using SAR=1073/900
---[NoImage] x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
---[NoImage] x264 [info]: profile High, level 3.0
---[NoImage] mp4 [info]: initial delay 2002 (scale 24000)
---[NoImage]                                                                                
---[NoImage] x264 [info]: slice I:109   Avg QP:16.25  size: 36655  PSNR Mean Y:47.23 U:50.55 V:50.68 Avg:48.09 Global:47.91
---[NoImage] x264 [info]: slice P:3467  Avg QP:18.22  size: 13684  PSNR Mean Y:44.82 U:48.74 V:48.69 Avg:45.77 Global:45.56
---[NoImage] x264 [info]: slice B:3828  Avg QP:20.05  size:  4622  PSNR Mean Y:43.85 U:48.20 V:48.19 Avg:44.87 Global:44.72
---[NoImage] x264 [info]: consecutive B-frames: 14.5% 42.1% 19.8% 14.0%  9.6%  0.1%  0.0%
---[NoImage] x264 [info]: mb I  I16..4:  5.2% 84.1% 10.6%
---[NoImage] x264 [info]: mb P  I16..4:  0.4%  6.8%  1.0%  P16..4: 43.8% 27.4% 17.1%  0.5%  0.6%    skip: 2.4%
---[NoImage] x264 [info]: mb B  I16..4:  0.0%  0.4%  0.1%  B16..8: 52.2%  1.9%  3.3%  direct: 4.2%  skip:37.9%  L0:39.4% L1:48.6% BI:12.1%
---[NoImage] x264 [info]: 8x8 transform  intra:83.1%  inter:65.6%
---[NoImage] x264 [info]: direct mvs  spatial:95.0%  temporal:5.0%
---[NoImage] x264 [info]: ref P L0  62.8% 22.4% 14.8%
---[NoImage] x264 [info]: ref B L0  78.1% 21.9%
---[NoImage] x264 [info]: ref B L1  92.9%  7.1%
---[NoImage] x264 [info]: SSIM Mean Y:0.9789163
---[NoImage] x264 [info]: PSNR Mean Y:44.358 U:48.485 V:48.463 Avg:45.338 Global:45.130 kb/s:1790.88
---[NoImage] encoded 7404 frames, 40.13 fps, 1791.01 kb/s
--[Information] Final statistics
---[NoImage] Video Bitrate Desired: 1790 kbit/s
---[NoImage] Video Bitrate Obtained (approximate): 1793 kbit/s
--[Information] [11/30/2008 7:36:21 AM] Postprocessing
---[Information] Deleting intermediate files
----[Information] [11/30/2008 7:36:21 AM] Successfully deleted D:\DVD\VIDEO_TS\VTS_01_PGC_01_1.stats
--[Information] [11/30/2008 7:36:21 AM] Job completed
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by jbrjake »

jbrjake wrote:And you're using *precisely these options* in MeGUI *on the same source* and getting better CPU usage?
And yet:

Code: Select all

-x ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:subq=9:analyse=all:8x8dct=1:trellis=1:no-fast-pskip=1:psy-rd=1,1
vs

Code: Select all

--ref 3 --mixed-refs --no-fast-pskip --bframes 6 --b-pyramid --weightb --direct auto --nf --subme 9 --trellis 1 --partitions all  --8x8dct --vbv-maxrate 25000 --me umh
You can't compare one group of settings that uses psy-trellis to another group of settings that doesn't use it and also turns off the in-loop deblocker and applies VBV controls.
graysky wrote:As you know, MeGUI has more x264 options
No. It doesn't. HandBrake can specify any x264 option MeGUI can.

All I want are direct comparisons between exactly the same settings so it's possible to see if there's a problem and where it is.

Also, what version of x264 are you using with MeGUI?
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

jbrjake wrote:
jbrjake wrote:And you're using *precisely these options* in MeGUI *on the same source* and getting better CPU usage?
And yet:

Code: Select all

-x ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:b-pyramid=1:me=umh:subq=9:analyse=all:8x8dct=1:trellis=1:no-fast-pskip=1:psy-rd=1,1
vs

Code: Select all

--ref 3 --mixed-refs --no-fast-pskip --bframes 6 --b-pyramid --weightb --direct auto --nf --subme 9 --trellis 1 --partitions all  --8x8dct --vbv-maxrate 25000 --me umh
You can't compare one group of settings that uses psy-trellis to another group of settings that doesn't use it and also turns off the in-loop deblocker and applies VBV controls.
graysky wrote:As you know, MeGUI has more x264 options
No. It doesn't. HandBrake can specify any x264 option MeGUI can.

All I want are direct comparisons between exactly the same settings so it's possible to see if there's a problem and where it is.

Also, what version of x264 are you using with MeGUI?
In retrospect, I shouldn't have tried comparing Handbrake to MeGUI since the options aren't the same and also since I'm not an expert at setting them up. To answer your question about x264 version: it's downloaded from the MeGUI repo at this URL. The filename is x264 1016-1.

I'm more interested in the Handbrake windows vs. Handbrake LINUX experiment which I believe was exactly what you asked for in terms of constant settings, sources, etc. Can you please comment on them based on the log files? I would be glad to supply additional info on request.

Thank you :)
jbrjake
Veteran User
Posts: 4805
Joined: Wed Dec 13, 2006 1:38 am

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by jbrjake »

graysky wrote:The filename is x264 1016-1.
That is out of date. HandBrake 0.9.3 uses 1028. There have been a lot of changes in just 12 revisions.
I'm more interested in the Handbrake windows vs. Handbrake LINUX experiment which I believe was exactly what you asked for in terms of constant settings, sources, etc.
I didn't put together the 64-bit Linux build, nor do I have a way to test it, so I can't really comment on that besides asking the obvious question of "Well how does it compare to the 32-bit Linux build?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by JohnAStebbins »

My quad core ubuntu runs 32 bit. I tested both the 0.9.3 release and current svn using your settings. Where your cpu usage ranges from 58% to 80% for the 4 cpus, mine ranges from 80% to 95%. If you stare at it a while, you'll occasionally see one dip down to 75%. The only 64 bit systems I have are either dual or oct core, so those won't give a meaningful comparison. It would help if you could test the 32 bit version on the same hardware as your 64 bit version. Maybe this could be done with a live CD and some hackery. Or better yet, install the 32 bit version and figure out what additional 32 libraries you need to run it. That should work.

I've got no idea why there would be any difference in the threading between 32 and 64 bit versions. They are both built with the same options.
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

@john and jbrjake - Thanks for the replies. I can attempt to get the 32-bit version working, but I have failed at this before. Failing that, I have an old 80 gig HD that I can install Lenny-i386 on to help trouble shoot this problem. I'll post again with the results.
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

OK, I got lenny-i386 installed and ran the encode with the x86 version of Handbrake.

handbrake-linux86
Run1: 171.3 fps (pass 1) and 33.1 fps (pass 2)
Run2: 173.2 fps (pass 1) and 33.6 fps (pass 2)

Time to encode both passes: 04:23

Approx. CPU usage Pass 1: 50-66 %
Approx. CPU usage Pass 2: 66-83 %

Screenshot of system monitor (2nd pass only):
Image

Code: Select all

Handbrake Version: 0.9.3 (2008112300)
[17:01:30] hb_scan: path=/home/flash/VTS_01_PGC_01_1.VOB, title_index=1
[17:01:30] scan: trying to open with libdvdread
[17:01:30] dvd: not a dvd - trying as a stream/file instead
[17:01:30] file is MPEG DVD Program Stream
[17:01:30] add_audio_to_title: added AC3 audio stream 0x80bd
[17:01:30] scan: decoding previews for title 1
[17:01:30] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[17:01:30] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/10/0/0, aspect 1.78:1, PAR 32:27
[17:01:30] scan: title (0) job->width:720, job->height:400
[17:01:30] libhb: scan thread found 1 valid title(s)
[17:01:30] lingui: Custom Preset: test
[17:01:30] 2 job(s) to process
[17:01:30] starting job
[17:01:30] job configuration:
[17:01:30]  * source
[17:01:30]    + /home/flash/VTS_01_PGC_01_1.VOB
[17:01:30]    + title 1, chapter(s) 1 to 1
[17:01:30]  * destination
[17:01:30]    + ./VTS_01_PGC_01_1.VOB.mkv
[17:01:30]    + container: Matroska (.mkv)
[17:01:30]      + chapter markers
[17:01:30]  * video track
[17:01:30]    + decoder: mpeg2
[17:01:30]      + bitrate 9801 kbps
[17:01:30]    + frame rate: same as source (around 23.976 fps)
[17:01:30]    + loose anamorphic
[17:01:30]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[17:01:30]      + pixel aspect ratio: 853 / 720
[17:01:30]      + display dimensions: 853 * 464
[17:01:30]    + encoder: x264
[17:01:30]      + options: ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[17:01:30]      + bitrate: 1800 kbps, pass: 1
[17:01:30]  * audio track 0
[17:01:30]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[17:01:30]      + bitrate: 448 kbps, samplerate: 48000 Hz
[17:01:30]    + mixdown: Stereo
[17:01:30]    + encoder: faac
[17:01:30]      + bitrate: 160 kbps, samplerate: 48000 Hz
[17:01:30] dvd: not a dvd - trying as a stream/file instead
[17:01:30] reader: first SCR 442553179
[17:01:30] encx264: keyint-min: 24, keyint-max: 240
[17:01:30] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[17:01:30] mpeg2: "Chapter  1" (1) at frame 0 time 12012
[17:01:30] sync: expecting 7533 video frames
[17:01:30] sync: first pts is 12012
[17:02:13] reader: done. 1 scr changes
[17:02:13] sync: got 7399 frames, 7533 expected
[17:02:13] work: average encoding speed for job is 173.237076 fps
[17:02:13] mpeg2 done: 7400 frames
[17:02:13] render: lost time: 0 (0 frames)
[17:02:13] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:16.22  size: 34138  PSNR Mean Y:46.77 U:49.88 V:49.93 Avg:47.57 Global:47.26
x264 [info]: slice P:2890  Avg QP:17.74  size: 15079  PSNR Mean Y:44.73 U:48.41 V:48.15 Avg:45.61 Global:45.19
x264 [info]: slice B:4409  Avg QP:19.93  size:  5140  PSNR Mean Y:43.37 U:47.70 V:47.41 Avg:44.36 Global:44.08
x264 [info]: consecutive B-frames: 12.6% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4: 32.5%  0.0% 67.5%
x264 [info]: mb P  I16..4: 32.1%  0.0%  0.0%  P16..4: 62.8%  0.0%  0.0%  0.0%  0.0%    skip: 5.1%
x264 [info]: mb B  I16..4:  7.2%  0.0%  0.0%  B16..8: 32.2%  0.0%  0.0%  direct:29.2%  skip:31.4%  L0:30.5% L1:50.9% BI:18.6%
x264 [info]: final ratefactor: 21.42
x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
x264 [info]: SSIM Mean Y:0.9788087
x264 [info]: PSNR Mean Y:43.946 U:48.009 V:47.730 Avg:44.889 Global:44.517 kb/s:1806.26
[17:02:13] starting job
[17:02:13] job configuration:
[17:02:13]  * source
[17:02:13]    + /home/flash/VTS_01_PGC_01_1.VOB
[17:02:13]    + title 1, chapter(s) 1 to 1
[17:02:13]  * destination
[17:02:13]    + ./VTS_01_PGC_01_1.VOB.mkv
[17:02:13]    + container: Matroska (.mkv)
[17:02:13]      + chapter markers
[17:02:13]  * video track
[17:02:13]    + decoder: mpeg2
[17:02:13]      + bitrate 9801 kbps
[17:02:13]    + frame rate: same as source (around 23.976 fps)
[17:02:13]    + loose anamorphic
[17:02:13]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[17:02:13]      + pixel aspect ratio: 853 / 720
[17:02:13]      + display dimensions: 853 * 464
[17:02:13]    + encoder: x264
[17:02:13]      + options: ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1
[17:02:13]      + bitrate: 1800 kbps, pass: 2
[17:02:13]  * audio track 0
[17:02:13]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[17:02:13]      + bitrate: 448 kbps, samplerate: 48000 Hz
[17:02:13]    + mixdown: Stereo
[17:02:13]    + encoder: faac
[17:02:13]      + bitrate: 160 kbps, samplerate: 48000 Hz
[17:02:13] encx264: keyint-min: 24, keyint-max: 240
[17:02:13] dvd: not a dvd - trying as a stream/file instead
[17:02:13] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
[17:02:13] reader: first SCR 442553179
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
[17:02:13] mpeg2: "Chapter  1" (1) at frame 0 time 12012
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
[17:02:14] sync: expecting 7533 video frames
[17:02:14] sync: first pts is 12012
[17:05:53] reader: done. 1 scr changes
[17:05:55] sync: got 7399 frames, 7533 expected
[17:05:55] work: average encoding speed for job is 33.628819 fps
[17:05:56] mpeg2 done: 7400 frames
[17:05:56] render: lost time: 0 (0 frames)
[17:05:56] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:18.38  size: 27161  PSNR Mean Y:44.33 U:50.60 V:50.76 Avg:45.60 Global:45.32
x264 [info]: slice P:2895  Avg QP:20.28  size: 15726  PSNR Mean Y:44.08 U:48.91 V:48.86 Avg:45.16 Global:44.96
x264 [info]: slice B:4404  Avg QP:22.22  size:  4831  PSNR Mean Y:43.13 U:48.11 V:48.05 Avg:44.24 Global:44.10
x264 [info]: consecutive B-frames: 12.7% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4:  7.5% 75.7% 16.8%
x264 [info]: mb P  I16..4:  0.7%  5.9%  1.4%  P16..4: 55.4% 19.8% 13.3%  0.3%  0.3%    skip: 3.0%
x264 [info]: mb B  I16..4:  0.0%  0.4%  0.1%  B16..8: 40.9%  1.5%  2.3%  direct: 2.5%  skip:52.3%  L0:38.2% L1:41.7% BI:20.1%
x264 [info]: 8x8 transform  intra:74.1%  inter:77.4%
x264 [info]: direct mvs  spatial:94.8%  temporal:5.2%
x264 [info]: ref P L0  54.4% 26.8% 18.8%
x264 [info]: ref B L0  76.6% 23.4%
x264 [info]: ref B L1  94.0%  6.0%
x264 [info]: SSIM Mean Y:0.9760183
x264 [info]: PSNR Mean Y:43.517 U:48.458 V:48.404 Avg:44.618 Global:44.434 kb/s:1802.64
[17:05:56] libhb: work result = 0
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by rhester »

It seems to me at this point that this is less about trying to troubleshoot HandBrake/x264 and more about trying to troubleshoot Linux. There is nothing inside HandBrake or x264 that specifies a threading model beyond pthreads...the rest is up to the kernel scheduler which is (far) beyond our control.

Rodney
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

rhester wrote:It seems to me at this point that this is less about trying to troubleshoot HandBrake/x264 and more about trying to troubleshoot Linux. There is nothing inside HandBrake or x264 that specifies a threading model beyond pthreads...the rest is up to the kernel scheduler which is (far) beyond our control.
Thank you for the reply. I'd be interested in experimenting with the number of threads that HB is passing on to x264 via the GUI. Is this possible?
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by rhester »

You can add threads=<X> (the default is auto) to the advanced x264 parameters string. The default is 1.5 threads per CPU (on all platforms).

Rodney
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

rhester wrote:You can add threads=<X> (the default is auto) to the advanced x264 parameters string. The default is 1.5 threads per CPU (on all platforms).
Thanks for the info. I experimented with some higher and lower numbers, but didn't arrive at fps numbers near the ones I got when using HB under Win64. You mentioned the problem may lie w/ my kernel scheduler... I'm using an out-of-the-box Debian/Lenny system and am a LINUX newb. Can you point me to any specific area that should look into regarding the kernel scheduler as it applies to multithreaded apps or is this well over my head?
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

I got curious and installed Ubuntu 8.10 amd64 on my spare drive and repeated the test encode to find that it was about 7 % quicker under this distro.

Ubuntu 8.10 amd-64
Run1: 190.1 fps (pass 1) and 40.1 fps (pass 2)

Time to encode both passes: 03:44

Approx. CPU usage Pass 1: 55-66 %
Approx. CPU usage Pass 2: 77-94 %

To remind you the Lenny amd64 results:

Lenny amd-64
Run1: 192.0 fps (pass 1) and 37.8 fps (pass 2)
Run2: 193.8 fps (pass 1) and 37.7 fps (pass 2)

Time to encode both passes: 03:54

Approx. CPU usage Pass 1: 65-75 %
Approx. CPU usage Pass 2: 75-85 %

Wish I had a good handle on the variables that affect the CPU usage or efficiency or whatever you want to call it.

Log file under Ubuntu:

Code: Select all

Handbrake Version: 0.9.3 (2008112300)
[17:45:54] hb_scan: path=/home/flash/VTS_01_PGC_01_1.VOB, title_index=1
[17:45:54] scan: trying to open with libdvdread
[17:45:54] dvd: not a dvd - trying as a stream/file instead
[17:45:54] file is MPEG DVD Program Stream
[17:45:54] add_audio_to_title: added AC3 audio stream 0x80bd
[17:45:54] scan: decoding previews for title 1
[17:45:54] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[17:45:54] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/10/0/0, aspect 16:9, PAR 32:27
[17:45:54] scan: title (0) job->width:720, job->height:400
[17:45:54] libhb: scan thread found 1 valid title(s)
[17:45:54] lingui: Modified Custom Preset: use
[17:45:54] 2 job(s) to process
[17:45:54] starting job
[17:45:54] job configuration:
[17:45:54]  * source
[17:45:54]    + /home/flash/VTS_01_PGC_01_1.VOB
[17:45:54]    + title 1, chapter(s) 1 to 1
[17:45:54]  * destination
[17:45:54]    + /home/flash/Videos/VTS_01_PGC_01_1.VOB.mkv
[17:45:54]    + container: Matroska (.mkv)
[17:45:54]      + chapter markers
[17:45:54]  * video track
[17:45:54]    + decoder: mpeg2
[17:45:54]      + bitrate 9801 kbps
[17:45:54]    + frame rate: same as source (around 23.976 fps)
[17:45:54]    + loose anamorphic
[17:45:54]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[17:45:54]      + pixel aspect ratio: 853 / 720
[17:45:54]      + display dimensions: 853 * 464
[17:45:54]    + encoder: x264
[17:45:54]      + options: ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1:ref=1:subme=1:me=dia:analyse=none:trellis=0:no-fast-pskip=0:8x8dct=0:weightb=0
[17:45:54]      + bitrate: 1800 kbps, pass: 1
[17:45:54]  * audio track 0
[17:45:54]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[17:45:54]      + bitrate: 448 kbps, samplerate: 48000 Hz
[17:45:54]    + mixdown: Stereo
[17:45:54]    + encoder: faac
[17:45:54]      + bitrate: 160 kbps, samplerate: 48000 Hz
[17:45:54] dvd: not a dvd - trying as a stream/file instead
[17:45:54] reader: first SCR 442553179
[17:45:54] encx264: keyint-min: 24, keyint-max: 240
[17:45:54] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[17:45:54] mpeg2: "Chapter  1" (1) at frame 0 time 12012
[17:45:54] sync: expecting 7533 video frames
[17:45:54] sync: first pts is 12012
[17:46:33] reader: done. 1 scr changes
[17:46:33] sync: got 7399 frames, 7533 expected
[17:46:33] work: average encoding speed for job is 190.365479 fps
[17:46:33] mpeg2 done: 7400 frames
[17:46:33] render: lost time: 0 (0 frames)
[17:46:33] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:16.22  size: 34138  PSNR Mean Y:46.77 U:49.88 V:49.93 Avg:47.57 Global:47.26
x264 [info]: slice P:2890  Avg QP:17.74  size: 15078  PSNR Mean Y:44.73 U:48.41 V:48.15 Avg:45.61 Global:45.19
x264 [info]: slice B:4409  Avg QP:19.93  size:  5140  PSNR Mean Y:43.37 U:47.70 V:47.41 Avg:44.36 Global:44.09
x264 [info]: consecutive B-frames: 12.6% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4: 32.5%  0.0% 67.5%
x264 [info]: mb P  I16..4: 32.1%  0.0%  0.0%  P16..4: 62.8%  0.0%  0.0%  0.0%  0.0%    skip: 5.1%
x264 [info]: mb B  I16..4:  7.2%  0.0%  0.0%  B16..8: 32.2%  0.0%  0.0%  direct:29.2%  skip:31.4%  L0:30.4% L1:50.9% BI:18.6%
x264 [info]: final ratefactor: 21.42
x264 [info]: direct mvs  spatial:99.9%  temporal:0.1%
x264 [info]: SSIM Mean Y:0.9788088
x264 [info]: PSNR Mean Y:43.946 U:48.009 V:47.732 Avg:44.890 Global:44.517 kb/s:1806.29
[17:46:33] starting job
[17:46:33] job configuration:
[17:46:33]  * source
[17:46:33]    + /home/flash/VTS_01_PGC_01_1.VOB
[17:46:33]    + title 1, chapter(s) 1 to 1
[17:46:33]  * destination
[17:46:33]    + /home/flash/Videos/VTS_01_PGC_01_1.VOB.mkv
[17:46:33]    + container: Matroska (.mkv)
[17:46:33]      + chapter markers
[17:46:33]  * video track
[17:46:33]    + decoder: mpeg2
[17:46:33]      + bitrate 9801 kbps
[17:46:33]    + frame rate: same as source (around 23.976 fps)
[17:46:33]    + loose anamorphic
[17:46:33]      + storage dimensions: 720 * 480 -> 720 * 464, crop 6/10/0/0
[17:46:33]      + pixel aspect ratio: 853 / 720
[17:46:33]      + display dimensions: 853 * 464
[17:46:33]    + encoder: x264
[17:46:33]      + options: ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1
[17:46:33]      + bitrate: 1800 kbps, pass: 2
[17:46:33]  * audio track 0
[17:46:33]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 80bd)
[17:46:33]      + bitrate: 448 kbps, samplerate: 48000 Hz
[17:46:33]    + mixdown: Stereo
[17:46:33]    + encoder: faac
[17:46:33]      + bitrate: 160 kbps, samplerate: 48000 Hz
[17:46:33] encx264: keyint-min: 24, keyint-max: 240
[17:46:33] dvd: not a dvd - trying as a stream/file instead
[17:46:33] encx264: encoding with stored aspect 853/720
x264 [info]: using SAR=853/720
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 PHADD SSE4.1 Cache64
[17:46:33] reader: first SCR 442553179
[17:46:33] mpeg2: "Chapter  1" (1) at frame 0 time 12012
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
[17:46:34] sync: expecting 7533 video frames
[17:46:34] sync: first pts is 12012
[17:49:38] reader: done. 1 scr changes
[17:49:39] sync: got 7399 frames, 7533 expected
[17:49:39] work: average encoding speed for job is 40.116432 fps
[17:49:40] mpeg2 done: 7400 frames
[17:49:40] render: lost time: 0 (0 frames)
[17:49:40] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:101   Avg QP:18.37  size: 27175  PSNR Mean Y:44.33 U:50.60 V:50.76 Avg:45.60 Global:45.32
x264 [info]: slice P:2895  Avg QP:20.28  size: 15730  PSNR Mean Y:44.08 U:48.91 V:48.86 Avg:45.17 Global:44.96
x264 [info]: slice B:4404  Avg QP:22.22  size:  4828  PSNR Mean Y:43.13 U:48.11 V:48.05 Avg:44.24 Global:44.10
x264 [info]: consecutive B-frames: 12.7% 28.0%  9.9% 10.8% 16.2% 22.4%  0.1%
x264 [info]: mb I  I16..4:  7.6% 75.5% 17.0%
x264 [info]: mb P  I16..4:  0.7%  5.9%  1.4%  P16..4: 55.4% 19.8% 13.2%  0.3%  0.3%    skip: 3.0%
x264 [info]: mb B  I16..4:  0.0%  0.4%  0.1%  B16..8: 40.8%  1.5%  2.3%  direct: 2.4%  skip:52.4%  L0:38.3% L1:41.7% BI:20.0%
x264 [info]: 8x8 transform  intra:74.1%  inter:77.5%
x264 [info]: direct mvs  spatial:95.2%  temporal:4.8%
x264 [info]: ref P L0  54.4% 26.9% 18.8%
x264 [info]: ref B L0  76.6% 23.4%
x264 [info]: ref B L1  94.0%  6.0%
x264 [info]: SSIM Mean Y:0.9760243
x264 [info]: PSNR Mean Y:43.517 U:48.458 V:48.405 Avg:44.618 Global:44.434 kb/s:1802.63
[17:49:40] libhb: work result = 0
rhester
Veteran User
Posts: 2888
Joined: Tue Apr 18, 2006 10:24 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by rhester »

Again, this is a kernel issue, not a HandBrake issue - there's nothing we can really do to offer support here because we are not experts in the myriad of Linux distributions out there. I'd suggest you post your question on an Ubuntu forum for assistance.

Rodney
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

Thanks for looking at the logs and for the opinions; I'll post back here if I find anything useful.
graysky
Experienced
Posts: 79
Joined: Wed Nov 26, 2008 9:55 pm

Re: inefficient CPU core usages on x264 encode... tweaks?

Post by graysky »

Turns out to be in part a function of the kernel as several in here have suggested. I have been messing around with compiling my own kernel under Debian/Lenny and Ubuntu/Intrepid and found that the various CPU options do affect the speed.

Example running the test encode:

'Stock Debian Kernel'
192.9/37.75 = 3:54
(first pass ave. FPS/2nd pass ave. FPS and total encode time)

'Modified Debian Kernel'
200.26/39.1 = 3:46
(first pass ave. FPS/2nd pass ave. FPS and total encode time)

It's a small difference, but equal to the result I got under Ubuntu (190.1/40.10 = 3:44)

Anyway, I wanted to update the thread and also ask if anyone in here has some kernel experience to the point of suggesting which options I might try changing to further affect the CPU utilization. Here is a url for those interested in compiling kernels under Debian/Ubuntu. It's very well written.
Post Reply