x265 slower preset use less CPU?

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Scalextrix
Posts: 8
Joined: Sat May 18, 2019 7:56 am

x265 slower preset use less CPU?

Post by Scalextrix »

Description of problem or question:
I have a new AMD 3900x which is much better than my old i7-6700k (obvs).

When converting 1080p content the 6700k would be CPU limited on the Fast setting, practically 100% CPU load and about 24 frames per second.

On the 3900x it uses all 24 cores, but on Medium its often around 55% CPU load with some cores doing more work than others, at about 40 FPS. Thats a great uplift in performance, Im not unhappy.

I expected setting the slider to Slow, Slower or Very Slow would make the CPU usage increase, but it doesn't, it just makes it go, well, slower... and if anything CPU usage is lower, for the same sample on VerySlow the CPU was about 35% usage versus 55% on Medium.

Can I get more speed/CPU utilization from slower settings on the 3900x, if so how?
rollin_eng
Veteran User
Posts: 4853
Joined: Wed May 04, 2011 11:06 pm

Re: x265 slower preset use less CPU?

Post by rollin_eng »

Could you please post your HB logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
mduell
Veteran User
Posts: 8196
Joined: Sat Apr 21, 2007 8:54 pm

Re: x265 slower preset use less CPU?

Post by mduell »

More efficient encoding in some cases comes from more dependencies between macroblocks or frames, resulting in less parallelism.

Are you chasing after a CPU utilization meter or encoding speed or encoding efficiency? Different solutions for each of the 3.
Deleted User 13735

Re: x265 slower preset use less CPU?

Post by Deleted User 13735 »

I expected setting the slider to Slow, Slower or Very Slow would make the CPU usage increase,
I don't see that as a valid association. Too many variables to predict, as with most things CRF. Remember that a lot of things going on under the hood are single-threaded.
Scalextrix
Posts: 8
Joined: Sat May 18, 2019 7:56 am

Re: x265 slower preset use less CPU?

Post by Scalextrix »

rollin_eng wrote: Tue Jul 21, 2020 6:01 pm Could you please post your HB logs, instructions can be found here:

https://handbrake.fr/docs/en/latest/hel ... y-log.html
HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.18363.0
CPU: AMD Ryzen 9 3900X 12-Core Processor
Ram: 32675 MB,
GPU Information:
NVIDIA GeForce RTX 2070 - 26.21.14.3086
Screen: 2560x1440
Temp Dir: C:\Users\anon\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\anon\AppData\Roaming\HandBrake

-------------------------------------------


# Starting Encode ...

[05:49:19] base preset: Blu_RAY
[17:49:19] hb_init: starting libhb thread
[17:49:19] Starting work at: Tue Jul 21 17:49:19 2020
[17:49:19] 1 job(s) to process
[17:49:19] json job:
{
"Audio": {
"AudioList": [
{
"Bitrate": 160,
"DRC": 0.0,
"Encoder": "av_aac",
"Gain": 0.0,
"Mixdown": 4,
"NormalizeMixLevel": false,
"Samplerate": 0,
"Name": "Surround 7.1",
"Track": 0,
"DitherMethod": 0
}
],
"CopyMask": [
"copy:aac",
"copy:ac3",
"copy:dtshd",
"copy:dts",
"copy:eac3",
"copy:flac",
"copy:mp3",
"copy:truehd"
],
"FallbackEncoder": "ac3"
},
"Destination": {
"ChapterList": [
{
"Name": "Chapter 1"
},
{
"Name": "Chapter 2"
},
{
"Name": "Chapter 3"
},
{
"Name": "Chapter 4"
},
{
"Name": "Chapter 5"
},
{
"Name": "Chapter 6"
},
{
"Name": "Chapter 7"
},
{
"Name": "Chapter 8"
},
{
"Name": "Chapter 9"
},
{
"Name": "Chapter 10"
},
{
"Name": "Chapter 11"
},
{
"Name": "Chapter 12"
},
{
"Name": "Chapter 13"
},
{
"Name": "Chapter 14"
},
{
"Name": "Chapter 15"
},
{
"Name": "Chapter 16"
},
{
"Name": "Chapter 17"
},
{
"Name": "Chapter 18"
},
{
"Name": "Chapter 19"
},
{
"Name": "Chapter 20"
}
],
"ChapterMarkers": true,
"AlignAVStart": true,
"File": "C:\\Users\\anon\\Desktop\\Jason Bourne (2016).m4v",
"Mp4Options": {
"IpodAtom": false,
"Mp4Optimize": false
},
"Mux": "av_mp4"
},
"Filters": {
"FilterList": [
{
"ID": 4,
"Settings": {
"mode": "7"
}
},
{
"ID": 3,
"Settings": {
"block-height": "16",
"block-thresh": "40",
"block-width": "16",
"filter-mode": "2",
"mode": "3",
"motion-thresh": "1",
"spatial-metric": "2",
"spatial-thresh": "1"
}
},
{
"ID": 12,
"Settings": {
"crop-bottom": "0",
"crop-left": "0",
"crop-right": "0",
"crop-top": "0",
"height": "1080",
"width": "1920"
}
},
{
"ID": 6,
"Settings": {
"mode": "1"
}
}
]
},
"PAR": {
"Num": 1,
"Den": 1
},
"Metadata": {},
"SequenceID": 0,
"Source": {
"Angle": 1,
"Range": {
"Type": "chapter",
"Start": 1,
"End": 20
},
"Title": 1,
"Path": "C:\\Users\\anon\\Desktop\\Ripped\\Jason Bourne (2016).mkv"
},
"Subtitle": {
"Search": {
"Burn": true,
"Default": false,
"Enable": true,
"Forced": true
},
"SubtitleList": []
},
"Video": {
"Encoder": "x265",
"Level": "auto",
"TwoPass": false,
"Turbo": false,
"ColorMatrixCode": 0,
"Options": "",
"Preset": "medium",
"Profile": "auto",
"Quality": 19.0,
"QSV": {
"Decode": false,
"AsyncDepth": 0
}
}
}
[17:49:19] CPU: AMD Ryzen 9 3900X 12-Core Processor
[17:49:19] - logical processor count: 24
[17:49:19] Intel Quick Sync Video support: no
[17:49:19] hb_scan: path=C:\Users\anon\Desktop\Ripped\Jason Bourne (2016).mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image C:\Users\anon\Desktop\Ripped\Jason Bourne (2016).mkv
src/libbluray/disc/disc.c:424: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:424: error opening file BDMV\BACKUP\index.bdmv
src/libbluray/bluray.c:2585: nav_get_title_list(C:\Users\anon\Desktop\Ripped\Jason Bourne (2016).mkv\) failed
[17:49:19] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[17:49:19] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'C:\Users\anon\Desktop\Ripped\Jason Bourne (2016).mkv':
Metadata:
title : Jason Bourne (2016)
encoder : libmakemkv v1.15.1 (1.3.5/1.4.7) win(x64-release)
creation_time : 2020-07-21T09:59:37.000000Z
Duration: 02:03:11.59, start: 0.000000, bitrate: 36263 kb/s
Chapter #0:0: start 0.000000, end 244.661083
Metadata:
title : Chapter 01
Chapter #0:1: start 244.661083, end 501.542708
Metadata:
title : Chapter 02
Chapter #0:2: start 501.542708, end 812.686875
Metadata:
title : Chapter 03
Chapter #0:3: start 812.686875, end 1108.315542
Metadata:
title : Chapter 04
Chapter #0:4: start 1108.315542, end 1447.237458
Metadata:
title : Chapter 05
Chapter #0:5: start 1447.237458, end 1761.259500
Metadata:
title : Chapter 06
Chapter #0:6: start 1761.259500, end 2175.548375
Metadata:
title : Chapter 07
Chapter #0:7: start 2175.548375, end 2540.663125
Metadata:
title : Chapter 08
Chapter #0:8: start 2540.663125, end 2902.441208
Metadata:
title : Chapter 09
Chapter #0:9: start 2902.441208, end 3312.183875
Metadata:
title : Chapter 10
Chapter #0:10: start 3312.183875, end 3669.666000
Metadata:
title : Chapter 11
Chapter #0:11: start 3669.666000, end 4112.483375
Metadata:
title : Chapter 12
Chapter #0:12: start 4112.483375, end 4583.328750
Metadata:
title : Chapter 13
Chapter #0:13: start 4583.328750, end 5085.330250
Metadata:
title : Chapter 14
Chapter #0:14: start 5085.330250, end 5346.549542
Metadata:
title : Chapter 15
Chapter #0:15: start 5346.549542, end 5872.908708
Metadata:
title : Chapter 16
Chapter #0:16: start 5872.908708, end 6266.343417
Metadata:
title : Chapter 17
Chapter #0:17: start 6266.343417, end 6483.727250
Metadata:
title : Chapter 18
Chapter #0:18: start 6483.727250, end 6841.209375
Metadata:
title : Chapter 19
Chapter #0:19: start 6841.209375, end 7391.592542
Metadata:
title : Chapter 20
Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Metadata:
BPS-eng : 26886295
DURATION-eng : 02:03:11.592541666
NUMBER_OF_FRAMES-eng: 177221
NUMBER_OF_BYTES-eng: 24841565546
SOURCE_ID-eng : 001011
_STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2020-07-21 09:59:37
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s32p (24 bit) (default)
Metadata:
title : Surround 7.1
BPS-eng : 7387972
DURATION-eng : 02:03:11.594666666
NUMBER_OF_FRAMES-eng: 692962
NUMBER_OF_BYTES-eng: 6826111912
SOURCE_ID-eng : 001100
_STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2020-07-21 09:59:37
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
Metadata:
title : Surround 5.1
BPS-eng : 1509000
DURATION-eng : 02:03:11.594666666
NUMBER_OF_FRAMES-eng: 692962
NUMBER_OF_BYTES-eng: 1394239544
SOURCE_ID-eng : 001100
_STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2020-07-21 09:59:37
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:3(eng): Audio: dts (DTS), 48000 Hz, stereo, fltp, 256 kb/s
Metadata:
title : Stereo
BPS-eng : 255000
DURATION-eng : 02:03:11.594666666
NUMBER_OF_FRAMES-eng: 692962
NUMBER_OF_BYTES-eng: 235607080
SOURCE_ID-eng : 001101
_STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2020-07-21 09:59:37
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:4(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
title : Stereo
BPS-eng : 192000
DURATION-eng : 02:03:11.616000000
NUMBER_OF_FRAMES-eng: 230988
NUMBER_OF_BYTES-eng: 177398784
SOURCE_ID-eng : 001102
_STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2020-07-21 09:59:37
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:5(eng): Subtitle: hdmv_pgs_subtitle
Metadata:
BPS-eng : 29785
DURATION-eng : 01:53:00.044104166
NUMBER_OF_FRAMES-eng: 2490
NUMBER_OF_BYTES-eng: 25243725
SOURCE_ID-eng : 001200
_STATISTICS_WRITING_APP-eng: MakeMKV v1.15.1 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2020-07-21 09:59:37
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[17:49:19] scan: decoding previews for title 1
[17:49:19] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (7.1 ch)
[17:49:19] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[17:49:19] scan: audio 0x3: dca, rate=48000Hz, bitrate=256000 English (DTS) (2.0 ch) (256 kbps)
[17:49:19] scan: audio 0x4: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround) (192 kbps)
[17:49:20] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1
[17:49:20] scan: supported video decoders: avcodec qsv
[17:49:20] libhb: scan thread found 1 valid title(s)
[17:49:20] Starting Task: Subtitle Scan
[17:49:20] Skipping crop/scale filter
[17:49:20] job configuration:
[17:49:20] * source
[17:49:20] + C:\Users\anon\Desktop\Ripped\Jason Bourne (2016).mkv
[17:49:20] + title 1, chapter(s) 1 to 20
[17:49:20] + container: matroska,webm
[17:49:20] + data rate: 36263 kbps
[17:49:20] * destination
[17:49:20] + C:\Users\anon\Desktop\Jason Bourne (2016).m4v
[17:49:20] + container: MPEG-4 (libavformat)
[17:49:20] + align initial A/V stream timestamps
[17:49:20] + chapter markers
[17:49:20] * video track
[17:49:20] + decoder: h264
[17:49:20] + filters
[17:49:20] + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[17:49:20] + Decomb (mode=39)
[17:49:20] + Framerate Shaper (mode=1)
[17:49:20] + frame rate: 23.976 fps -> constant 23.976 fps
[17:49:20] + Output geometry
[17:49:20] + storage dimensions: 1920 x 1080
[17:49:20] + pixel aspect ratio: 1 : 1
[17:49:20] + display dimensions: 1920 x 1080
[17:49:20] * Foreign Audio Search: Render/Burn-in, Forced Only
[17:49:20] + subtitle, English [PGS] (track 0, id 0x5, Picture)
[17:49:20] sync: expecting 177220 video frames
[17:50:32] reader: done. 1 scr changes
[17:50:32] work: average encoding speed for job is 0.000000 fps
[17:50:32] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[17:50:32] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[17:50:32] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[17:50:32] vfr: lost time: 0 (0 frames)
[17:50:32] vfr: gained time: 0 (0 frames) (0 not accounted for)
[17:50:32] h264-decoder done: 0 frames, 0 decoder errors
[17:50:32] sync: got 0 frames, 177220 expected
[17:50:32] Subtitle track 0 (id 0x5) 'English [PGS]': 1246 hits (0 forced)
[17:50:32] No candidate detected during subtitle scan
[17:50:32] Starting Task: Encoding Pass
[17:50:32] Skipping crop/scale filter
[17:50:32] job configuration:
[17:50:32] * source
[17:50:32] + C:\Users\anon\Desktop\Ripped\Jason Bourne (2016).mkv
[17:50:32] + title 1, chapter(s) 1 to 20
[17:50:32] + container: matroska,webm
[17:50:32] + data rate: 36263 kbps
[17:50:32] * destination
[17:50:32] + C:\Users\anon\Desktop\Jason Bourne (2016).m4v
[17:50:32] + container: MPEG-4 (libavformat)
[17:50:32] + align initial A/V stream timestamps
[17:50:32] + chapter markers
[17:50:32] * video track
[17:50:32] + decoder: h264
[17:50:32] + filters
[17:50:32] + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[17:50:32] + Decomb (mode=39)
[17:50:32] + Framerate Shaper (mode=1)
[17:50:32] + frame rate: 23.976 fps -> constant 23.976 fps
[17:50:32] + Output geometry
[17:50:32] + storage dimensions: 1920 x 1080
[17:50:32] + pixel aspect ratio: 1 : 1
[17:50:32] + display dimensions: 1920 x 1080
[17:50:32] + encoder: H.265 (libx265)
[17:50:32] + preset: medium
[17:50:32] + profile: auto
[17:50:32] + level: auto
[17:50:32] + quality: 19.00 (RF)
[17:50:32] + color profile: 1-1-1
[17:50:32] * audio track 1
[17:50:32] + name: Surround 7.1
[17:50:32] + decoder: English (DTS-HD MA) (7.1 ch) (track 1, id 0x1)
[17:50:32] + samplerate: 48000 Hz
[17:50:32] + mixdown: Stereo
[17:50:32] + dither: none
[17:50:32] + encoder: AAC (libavcodec)
[17:50:32] + bitrate: 160 kbps, samplerate: 48000 Hz
[17:50:32] sync: expecting 177220 video frames
x265 [info]: HEVC encoder version 3.2.1+1-b5c86a64bbbe
x265 [info]: build info [Windows][GCC 9.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 24 threads
x265 [info]: Slices : 1
x265 [info]: frame threads / pool features : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias: 24 / 240 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : CRF-19.0 / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip signhide tmvp b-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock sao
[17:50:32] sync: first pts video is 0
[17:50:32] sync: "Chapter 1" (1) at frame 1 time 0
[17:50:32] sync: first pts audio 0x1 is 0
[17:52:59] sync: "Chapter 2" (2) at frame 5868 time 22023251
[17:55:35] sync: "Chapter 3" (3) at frame 12026 time 45138843
[17:58:19] sync: "Chapter 4" (4) at frame 19486 time 73141818
[18:01:54] sync: "Chapter 5" (5) at frame 26574 time 99748398
[18:06:07] sync: "Chapter 6" (6) at frame 34701 time 130255125
[18:10:35] sync: "Chapter 7" (7) at frame 42229 time 158513355
[18:14:51] sync: "Chapter 8" (8) at frame 52163 time 195803107
[18:18:37] sync: "Chapter 9" (9) at frame 60919 time 228670942
[18:22:51] sync: "Chapter 10" (10) at frame 69593 time 261230970
[18:28:12] sync: "Chapter 11" (11) at frame 79414 time 298096548
[18:31:39] sync: "Chapter 12" (12) at frame 87985 time 330269940
[18:37:14] sync: "Chapter 13" (13) at frame 98605 time 370134765
[18:43:30] sync: "Chapter 14" (14) at frame 109891 time 412499587
[18:48:48] sync: "Chapter 15" (15) at frame 121929 time 457687230
[18:51:06] sync: "Chapter 16" (16) at frame 128190 time 481189458
[18:55:46] sync: "Chapter 17" (17) at frame 140810 time 528561783
[19:02:02] sync: "Chapter 18" (18) at frame 150245 time 563978415
[19:04:46] sync: "Chapter 19" (19) at frame 155458 time 583546713
[19:08:55] sync: "Chapter 20" (20) at frame 164029 time 615720105
[19:13:11] reader: done. 1 scr changes
[19:13:13] work: average encoding speed for job is 35.723087 fps
[19:13:13] comb detect: heavy 1831 | light 8273 | uncombed 167117 | total 177221
[19:13:13] decomb: deinterlaced 1831 | blended 8273 | unfiltered 167117 | total 177221
[19:13:13] vfr: 177221 frames output, 0 dropped and 0 duped for CFR/PFR
[19:13:13] vfr: lost time: 0 (0 frames)
[19:13:13] vfr: gained time: 0 (0 frames) (0 not accounted for)
[19:13:13] dca-decoder done: 692962 frames, 0 decoder errors
[19:13:13] h264-decoder done: 177221 frames, 0 decoder errors
[19:13:13] sync: got 177221 frames, 177220 expected
[19:13:13] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x265 [info]: frame I: 2537, Avg QP:19.32 kb/s: 20540.47
x265 [info]: frame P: 48545, Avg QP:21.18 kb/s: 8381.70
x265 [info]: frame B: 126139, Avg QP:24.36 kb/s: 2946.34
x265 [info]: Weighted P-Frames: Y:2.2% UV:1.6%
x265 [info]: consecutive B-frames: 16.7% 10.1% 16.7% 22.6% 33.9%
encoded 177221 frames in 4961.18s (35.72 fps), 4687.08 kb/s, Avg QP:23.42
[19:13:13] mux: track 0, 177221 frames, 4331332392 bytes, 4687.82 kbps, fifo 2048
[19:13:13] mux: track 1, 346482 frames, 148002183 bytes, 160.18 kbps, fifo 4096
[19:13:13] Finished work at: Tue Jul 21 19:13:13 2020
[19:13:13] libhb: work result = 0

# Encode Completed ...
Scalextrix
Posts: 8
Joined: Sat May 18, 2019 7:56 am

Re: x265 slower preset use less CPU?

Post by Scalextrix »

mduell wrote: Tue Jul 21, 2020 10:30 pm More efficient encoding in some cases comes from more dependencies between macroblocks or frames, resulting in less parallelism.

Are you chasing after a CPU utilization meter or encoding speed or encoding efficiency? Different solutions for each of the 3.
Ideally I want to use ~100% of available resources to allow Slow-er preset, with an equivalent FPS as 50% resources on Medium preset. I was surprised when setting slower didnt use more resource... clearly I don't know all the inner workings, which is why I'm hear asking. If the answer is "impossible", then "c'est la vie".
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: x265 slower preset use less CPU?

Post by Woodstock »

The encoders use as many cores as they need for efficiency. A 1080p encode usually maxes out at 10-12 cores on x265, fewer on x264. After that point, adding more cores means nothing, since they'll be ignored... Unless you run another encode at the same time.

Filters affect things, too. You have comb detect and decomb turned on for a progressive (not interlaced) source; turning those off will give you maybe 5% or so more speed. Setting the frame rate to "variable" and "same as source" might give a slight speed increase, although probably not noticeable.

(this is why having the activity log helps)
Deleted User 13735

Re: x265 slower preset use less CPU?

Post by Deleted User 13735 »

Ideally I want to use ~100% of available resources to allow Slow-er preset, with an equivalent FPS as 50% resources on Medium preset.
That is an idealized expectation, having no physical basis that I am aware of. Even if you were able to contrive such a thing once, it would all be different on the very next encode.

This is not linear math. Y ≠ mx+b The encoder model was not built around a resource metric. It is a quality metric (means "moving target"). It puts the bits where they are needed, when they are needed, and nothing else matters. Here is a good place to start reading.
https://handbrake.fr/docs/en/1.3.0/tech ... s-abr.html

Oh, and thanks for thinking. It's actually a breath of fresh air, and it's where learning begins. But in reference to your question, "it is what it is." I speak English.
rollin_eng
Veteran User
Posts: 4853
Joined: Wed May 04, 2011 11:06 pm

Re: x265 slower preset use less CPU?

Post by rollin_eng »

Just trust the encoder to use what it needs, as Woodstock said you can disable filters to speed up some.

You might see more CPU usage when encoding a 4K source, but maybe not.

I would imagine newer encoders e.g. AC1 and x266 will try to use more and more cores as that seems to be the way things are going.
Scalextrix
Posts: 8
Joined: Sat May 18, 2019 7:56 am

Re: x265 slower preset use less CPU?

Post by Scalextrix »

Woodstock wrote: Wed Jul 22, 2020 1:28 pm The encoders use as many cores as they need for efficiency. A 1080p encode usually maxes out at 10-12 cores on x265, fewer on x264. After that point, adding more cores means nothing, since they'll be ignored... Unless you run another encode at the same time.

Filters affect things, too. You have comb detect and decomb turned on for a progressive (not interlaced) source; turning those off will give you maybe 5% or so more speed. Setting the frame rate to "variable" and "same as source" might give a slight speed increase, although probably not noticeable.

(this is why having the activity log helps)
Thanks, I have never played with the filters, set everything to off as you suggest.
Scalextrix
Posts: 8
Joined: Sat May 18, 2019 7:56 am

Re: x265 slower preset use less CPU?

Post by Scalextrix »

musicvid wrote: Wed Jul 22, 2020 2:33 pm
Ideally I want to use ~100% of available resources to allow Slow-er preset, with an equivalent FPS as 50% resources on Medium preset.
That is an idealized expectation, having no physical basis that I am aware of. Even if you were able to contrive such a thing once, it would all be different on the very next encode.

This is not linear math. Y ≠ mx+b The encoder model was not built around a resource metric. It is a quality metric (means "moving target"). It puts the bits where they are needed, when they are needed, and nothing else matters. Here is a good place to start reading.
https://handbrake.fr/docs/en/1.3.0/tech ... s-abr.html

Oh, and thanks for thinking. It's actually a breath of fresh air, and it's where learning begins. But in reference to your question, "it is what it is." I speak English.
As I said I am happy with what I am getting already, but being aware of my lack of knowledge on what is a deep subject, its fair to see what I could do to optimize the situation. Thanks for your help.
Deleted User 13735

Re: x265 slower preset use less CPU?

Post by Deleted User 13735 »

its fair to see what I could do to optimize the situation.
That's not optimization. The CPU load does not determine the encoder efficiency. It's the other way around.

In practical production terms, we concentrate on size, quality, speed, which have interdependencies, but system load is not one of them. That says that forcing load priority will reduce performance in other areas, probably drastically.
mduell
Veteran User
Posts: 8196
Joined: Sat Apr 21, 2007 8:54 pm

Re: x265 slower preset use less CPU?

Post by mduell »

Scalextrix wrote: Wed Jul 22, 2020 10:44 am
mduell wrote: Tue Jul 21, 2020 10:30 pm More efficient encoding in some cases comes from more dependencies between macroblocks or frames, resulting in less parallelism.

Are you chasing after a CPU utilization meter or encoding speed or encoding efficiency? Different solutions for each of the 3.
Ideally I want to use ~100% of available resources to allow Slow-er preset, with an equivalent FPS as 50% resources on Medium preset. I was surprised when setting slower didnt use more resource... clearly I don't know all the inner workings, which is why I'm hear asking. If the answer is "impossible", then "c'est la vie".
Then you probably want an encoder that's not trying to scrape every possibility for video encoding efficiency (quality for size), like x264. With HD content and a high quality target, there's not much to x265 anyway; 4K+ or low bitrates are where x265 shows advantage over x264 to make the performance hit make sense.
Post Reply