x.265 on Threadripper not using many cores

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Locked
baldyman
Posts: 6
Joined: Sat Jan 19, 2019 6:02 pm

x.265 on Threadripper not using many cores

Post by baldyman »

I've just installed 1.2.0 on Linux Mint 19 on my new threadripper 2950.

I've been running 3d rendering and its tears through frames like a lunatic with all cores bouncing off the ceiling.

I'm now running handbrake x265 encoding and its very slow and there is hardly any cpu activity at all. About half a dozen cores at a time peak up to 60% or so.

Is there some tweaking required to get handbrake or x265 to actually use the available cores?
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: x.265 on Threadripper not using many cores

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
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: x.265 on Threadripper not using many cores

Post by Woodstock »

Your selection of filters rules the speedway when encoding... This is where the logs will tell us which options you are using which can interfere with warming up your CPU.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: x.265 on Threadripper not using many cores

Post by mduell »

Certainly not a general question as it relates to a specific encode.
baldyman
Posts: 6
Joined: Sat Jan 19, 2019 6:02 pm

Re: x.265 on Threadripper not using many cores

Post by baldyman »

Log of two tests, one with x264 and one with x265 with all config options the same as far as I could tell, same source test VOB file.

Summary , x.265 - avg ~9fps Took 4 minutes, x.264 - avg 78fps took 25 seconds

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

Code: Select all

[14:08:20] gtkgui: HandBrake 1.2.0 (2018122200) - Linux x86_64 - https://handbrake.fr
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
Cannot load libnvidia-encode.so.1
[14:08:20] hb_init: starting libhb thread
[14:08:20] hb_init: starting libhb thread
[14:08:20] hb_init: starting libhb thread
[14:08:28] CPU: 
[14:08:28]  - logical processor count: 32
[14:08:28] hb_scan: path=/home/pete/Downloads/dolby_orchestra-DWEU.vob, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/pete/Downloads/dolby_orchestra-DWEU.vob
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[14:08:28] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[14:08:28] dvd: not a dvd - trying as a stream/file instead
[14:08:28] file is MPEG Program Stream
[14:08:28] Probing 3 unknown streams
[14:08:28]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:08:28] Found the following streams
[14:08:28]     Video Streams : 
[14:08:28]       0xe0-0x0 type MPEG2 (0x2)
[14:08:28]     Audio Streams : 
[14:08:28]       0xbd-0x80 type AC3 (0x81)
[14:08:28]     Subtitle Streams : 
[14:08:28]     Other Streams : 
[14:08:28] stream id 0xbd (type 0x81 substream 0x80) audio 0x8000bd
[14:08:28] scan: decoding previews for title 1
[14:08:28] file is MPEG Program Stream
[14:08:28] Probing 3 unknown streams
[14:08:28]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[ac3 @ 0x7f45280d6b80] frame sync error
[ac3 @ 0x7f45280d6b80] frame sync error
[14:08:28] scan: audio 0x8000bd: ac3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[14:08:28] stream: 72 good frames, 0 errors (0%)
[14:08:28] scan: 10 previews, 720x576, 25.000 fps, autocrop = 50/8/78/62, aspect 16:9, PAR 64:45
[14:08:28] libhb: scan thread found 1 valid title(s)
[swscaler @ 0x55fdae84f240] Warning: data is not aligned! This can lead to a speed loss
[14:09:27] gtkgui: Custom Preset: /Matroska/XBMC H.265 MKV 576p25
[14:09:27] 1 job(s) to process
[14:09:27] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 0,
                "DRC": 0.0,
                "Encoder": "copy:ac3",
                "Mixdown": "none",
                "PresetEncoder": "copy",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:ac3",
            "copy:dts",
            "copy:dtshd",
            "copy:eac3"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Name": "Chapter 1"
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/pete/Videos/dolby_orchestra-DWEU (2).mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "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": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/1080000"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 8,
                    "crop-left": 78,
                    "crop-right": 62,
                    "crop-top": 50,
                    "height": 518,
                    "width": 580
                }
            }
        ]
    },
    "Metadata": {
        "Name": "dolby_orchestra-DWEU"
    },
    "PAR": {
        "Den": 45,
        "Num": 64
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/pete/Downloads/dolby_orchestra-DWEU.vob",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorMatrix": 6,
        "ColorPrimaries": 5,
        "ColorTransfer": 1,
        "Encoder": "x265",
        "Level": "auto",
        "Options": "strong-intra-smoothing=0:rect=0",
        "Preset": "veryslow",
        "Profile": "main",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 16.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[14:09:27] CPU: 
[14:09:27]  - logical processor count: 32
[14:09:27] hb_scan: path=/home/pete/Downloads/dolby_orchestra-DWEU.vob, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/pete/Downloads/dolby_orchestra-DWEU.vob
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[14:09:27] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[14:09:27] dvd: not a dvd - trying as a stream/file instead
[14:09:27] file is MPEG Program Stream
[14:09:27] Probing 3 unknown streams
[14:09:27]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:09:27] Found the following streams
[14:09:27]     Video Streams : 
[14:09:27]       0xe0-0x0 type MPEG2 (0x2)
[14:09:27]     Audio Streams : 
[14:09:27]       0xbd-0x80 type AC3 (0x81)
[14:09:27]     Subtitle Streams : 
[14:09:27]     Other Streams : 
[14:09:27] stream id 0xbd (type 0x81 substream 0x80) audio 0x8000bd
[14:09:27] scan: decoding previews for title 1
[14:09:27] file is MPEG Program Stream
[14:09:27] Probing 3 unknown streams
[14:09:27]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[ac3 @ 0x7f4528150080] frame sync error
[ac3 @ 0x7f452839f700] frame sync error
[14:09:27] scan: audio 0x8000bd: ac3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[14:09:28] stream: 72 good frames, 0 errors (0%)
[14:09:28] scan: 10 previews, 720x576, 25.000 fps, autocrop = 50/8/78/62, aspect 16:9, PAR 64:45
[14:09:28] libhb: scan thread found 1 valid title(s)
[14:09:28] starting job
[14:09:28] decomb filter thread started for segment 0
[14:09:28] decomb filter thread started for segment 2
[14:09:28] decomb filter thread started for segment 1
[14:09:28] decomb filter thread started for segment 3
[14:09:28] decomb filter thread started for segment 4
[14:09:28] decomb filter thread started for segment 5
[14:09:28] decomb filter thread started for segment 6
[14:09:28] decomb filter thread started for segment 8
[14:09:28] decomb filter thread started for segment 7
[14:09:28] decomb filter thread started for segment 9
[14:09:28] decomb filter thread started for segment 10
[14:09:28] decomb filter thread started for segment 11
[14:09:28] decomb filter thread started for segment 12
[14:09:28] decomb filter thread started for segment 14
[14:09:28] decomb filter thread started for segment 13
[14:09:28] decomb filter thread started for segment 15
[14:09:28] decomb filter thread started for segment 18
[14:09:28] decomb filter thread started for segment 16
[14:09:28] decomb filter thread started for segment 17
[14:09:28] decomb filter thread started for segment 19
[14:09:28] decomb filter thread started for segment 20
[14:09:28] decomb filter thread started for segment 22
[14:09:28] decomb filter thread started for segment 23
[14:09:28] decomb filter thread started for segment 24
[14:09:28] decomb filter thread started for segment 25
[14:09:28] decomb filter thread started for segment 21
[14:09:28] decomb filter thread started for segment 27
[14:09:28] decomb filter thread started for segment 26
[14:09:28] decomb filter thread started for segment 28
[14:09:28] decomb filter thread started for segment 30
[14:09:28] decomb filter thread started for segment 29
[14:09:28] decomb filter thread started for segment 31
[14:09:28] decomb check thread started for segment 0
[14:09:28] decomb check thread started for segment 4
[14:09:28] decomb check thread started for segment 2
[14:09:28] decomb check thread started for segment 3
[14:09:28] decomb check thread started for segment 1
[14:09:28] decomb check thread started for segment 6
[14:09:28] decomb check thread started for segment 7
[14:09:28] decomb check thread started for segment 10
[14:09:28] decomb check thread started for segment 9
[14:09:28] decomb check thread started for segment 12
[14:09:28] decomb check thread started for segment 8
[14:09:28] decomb check thread started for segment 5
[14:09:28] decomb check thread started for segment 13
[14:09:28] decomb check thread started for segment 11
[14:09:28] decomb check thread started for segment 14
[14:09:28] decomb check thread started for segment 15
[14:09:28] decomb check thread started for segment 20
[14:09:28] decomb check thread started for segment 21
[14:09:28] decomb check thread started for segment 18
[14:09:28] decomb check thread started for segment 19
[14:09:28] decomb check thread started for segment 17
[14:09:28] decomb check thread started for segment 16
[14:09:28] decomb check thread started for segment 22
[14:09:28] decomb check thread started for segment 23
[14:09:28] decomb check thread started for segment 25
[14:09:28] decomb check thread started for segment 24
[14:09:28] decomb check thread started for segment 29
[14:09:28] decomb check thread started for segment 30
[14:09:28] decomb check thread started for segment 31
[14:09:28] mask filter thread started for segment 1
[14:09:28] decomb check thread started for segment 26
[14:09:28] decomb check thread started for segment 27
[14:09:28] mask filter thread started for segment 0
[14:09:28] mask filter thread started for segment 2
[14:09:28] mask filter thread started for segment 3
[14:09:28] mask filter thread started for segment 4
[14:09:28] mask filter thread started for segment 5
[14:09:28] mask filter thread started for segment 6
[14:09:28] mask filter thread started for segment 7
[14:09:28] mask filter thread started for segment 9
[14:09:28] mask filter thread started for segment 8
[14:09:28] mask filter thread started for segment 10
[14:09:28] mask filter thread started for segment 11
[14:09:28] mask filter thread started for segment 12
[14:09:28] mask filter thread started for segment 13
[14:09:28] mask filter thread started for segment 14
[14:09:28] mask filter thread started for segment 16
[14:09:28] mask filter thread started for segment 15
[14:09:28] mask filter thread started for segment 17
[14:09:28] mask filter thread started for segment 18
[14:09:28] mask filter thread started for segment 19
[14:09:28] mask filter thread started for segment 20
[14:09:28] mask filter thread started for segment 21
[14:09:28] mask filter thread started for segment 22
[14:09:28] mask filter thread started for segment 23
[14:09:28] mask filter thread started for segment 24
[14:09:28] mask filter thread started for segment 25
[14:09:28] mask filter thread started for segment 26
[14:09:28] mask filter thread started for segment 27
[14:09:28] mask filter thread started for segment 28
[14:09:28] mask filter thread started for segment 29
[14:09:28] mask filter thread started for segment 30
[14:09:28] mask filter thread started for segment 31
[14:09:28] mask erode thread started for segment 0
[14:09:28] mask erode thread started for segment 1
[14:09:28] mask erode thread started for segment 2
[14:09:28] mask erode thread started for segment 3
[14:09:28] mask erode thread started for segment 5
[14:09:28] mask erode thread started for segment 7
[14:09:28] mask erode thread started for segment 8
[14:09:28] mask erode thread started for segment 9
[14:09:28] mask erode thread started for segment 10
[14:09:28] mask erode thread started for segment 11
[14:09:28] mask erode thread started for segment 12
[14:09:28] mask erode thread started for segment 13
[14:09:28] mask erode thread started for segment 14
[14:09:28] mask erode thread started for segment 15
[14:09:28] mask erode thread started for segment 16
[14:09:28] mask erode thread started for segment 17
[14:09:28] mask erode thread started for segment 18
[14:09:28] mask erode thread started for segment 19
[14:09:28] mask erode thread started for segment 20
[14:09:28] mask erode thread started for segment 21
[14:09:28] mask erode thread started for segment 22
[14:09:28] mask erode thread started for segment 23
[14:09:28] mask erode thread started for segment 24
[14:09:28] mask erode thread started for segment 26
[14:09:28] mask erode thread started for segment 25
[14:09:28] mask erode thread started for segment 27
[14:09:28] decomb check thread started for segment 28
[14:09:28] mask erode thread started for segment 29
[14:09:28] mask erode thread started for segment 30
[14:09:28] mask erode thread started for segment 28
[14:09:28] mask erode thread started for segment 4
[14:09:28] mask erode thread started for segment 31
[14:09:28] mask dilate thread started for segment 0
[14:09:28] mask dilate thread started for segment 1
[14:09:28] mask dilate thread started for segment 4
[14:09:28] mask dilate thread started for segment 3
[14:09:28] mask dilate thread started for segment 6
[14:09:28] mask dilate thread started for segment 5
[14:09:28] mask dilate thread started for segment 2
[14:09:28] mask dilate thread started for segment 7
[14:09:28] mask dilate thread started for segment 8
[14:09:28] mask dilate thread started for segment 10
[14:09:28] mask dilate thread started for segment 9
[14:09:28] mask dilate thread started for segment 11
[14:09:28] mask dilate thread started for segment 12
[14:09:28] mask dilate thread started for segment 13
[14:09:28] mask dilate thread started for segment 14
[14:09:28] mask dilate thread started for segment 15
[14:09:28] mask dilate thread started for segment 16
[14:09:28] mask dilate thread started for segment 17
[14:09:28] mask dilate thread started for segment 18
[14:09:28] mask dilate thread started for segment 19
[14:09:28] mask dilate thread started for segment 21
[14:09:28] mask dilate thread started for segment 20
[14:09:28] mask dilate thread started for segment 23
[14:09:28] mask dilate thread started for segment 22
[14:09:28] mask dilate thread started for segment 24
[14:09:28] mask dilate thread started for segment 25
[14:09:28] mask dilate thread started for segment 26
[14:09:28] mask dilate thread started for segment 28
[14:09:28] mask dilate thread started for segment 27
[14:09:28] mask dilate thread started for segment 29
[14:09:28] mask dilate thread started for segment 30
[14:09:28] mask dilate thread started for segment 31
[14:09:28] yadif thread started for segment 0
[14:09:28] yadif thread started for segment 1
[14:09:28] yadif thread started for segment 2
[14:09:28] yadif thread started for segment 3
[14:09:28] yadif thread started for segment 4
[14:09:28] yadif thread started for segment 5
[14:09:28] yadif thread started for segment 6
[14:09:28] yadif thread started for segment 7
[14:09:28] yadif thread started for segment 8
[14:09:28] yadif thread started for segment 9
[14:09:28] yadif thread started for segment 10
[14:09:28] yadif thread started for segment 11
[14:09:28] yadif thread started for segment 12
[14:09:28] yadif thread started for segment 13
[14:09:28] yadif thread started for segment 15
[14:09:28] yadif thread started for segment 14
[14:09:28] yadif thread started for segment 16
[14:09:28] yadif thread started for segment 18
[14:09:28] yadif thread started for segment 19
[14:09:28] yadif thread started for segment 17
[14:09:28] yadif thread started for segment 20
[14:09:28] yadif thread started for segment 21
[14:09:28] yadif thread started for segment 22
[14:09:28] yadif thread started for segment 23
[14:09:28] yadif thread started for segment 26
[14:09:28] yadif thread started for segment 27
[14:09:28] yadif thread started for segment 29
[14:09:28] yadif thread started for segment 30
[14:09:28] yadif thread started for segment 31
[14:09:28] job configuration:
[14:09:28]  * source
[14:09:28]    + /home/pete/Downloads/dolby_orchestra-DWEU.vob
[14:09:28]    + title 1, chapter(s) 1 to 1
[14:09:28]  * destination
[14:09:28]    + /home/pete/Videos/dolby_orchestra-DWEU (2).mkv
[14:09:28]    + container: Matroska (libavformat)
[14:09:28]  * video track
[14:09:28]    + decoder: mpeg2video
[14:09:28]      + bitrate 200 kbps
[14:09:28]    + filters
[14:09:28]      + 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)
[14:09:28]      + Decomb (mode=39)
[14:09:28]      + Framerate Shaper (mode=2:rate=27000000/1080000)
[14:09:28]        + frame rate: 25.000 fps -> peak rate limited to 25.000 fps
[14:09:28]      + Crop and Scale (width=580:height=518:crop-top=50:crop-bottom=8:crop-left=78:crop-right=62)
[14:09:28]        + source: 720 * 576, crop (50/8/78/62): 580 * 518, scale: 580 * 518
[14:09:28]    + Output geometry
[14:09:28]      + storage dimensions: 580 x 518
[14:09:28]      + pixel aspect ratio: 64 : 45
[14:09:28]      + display dimensions: 824 x 518
[14:09:28]    + encoder: H.265 (libx265)
[14:09:28]      + preset:  veryslow
[14:09:28]      + options: strong-intra-smoothing=0:rect=0
[14:09:28]      + profile: main
[14:09:28]      + quality: 16.00 (RF)
[14:09:28]      + color profile: 5-1-6
[14:09:28]  * audio track 1
[14:09:28]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x8000bd)
[14:09:28]      + bitrate: 448 kbps, samplerate: 48000 Hz
[14:09:28]    + AC3 Passthru
[14:09:28] file is MPEG Program Stream
[14:09:28] mask erode thread started for segment 6
[14:09:28] yadif thread started for segment 24
[14:09:28] yadif thread started for segment 25
[14:09:28] yadif thread started for segment 28
[14:09:28] Probing 3 unknown streams
[14:09:28]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:09:28] sync: expecting 1729 video frames
x265 [info]: HEVC encoder version 2.9
x265 [info]: build info [Linux][GCC 7.3.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-3 (Main tier)
x265 [info]: Thread pool created using 32 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 5 / wpp(9 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 3 inter / 3 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 4 / 4
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 40 / 8 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 1
x265 [info]: References / ref-limit  cu / depth  : 5 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-16.0 / 0.60
x265 [info]: tools: limit-modes rd=6 psy-rd=2.00 rdoq=2 psy-rdoq=1.00 rskip
x265 [info]: tools: limit-tu=4 signhide tmvp b-intra deblock sao
[mpeg2video @ 0x7f4520382dc0] Application has requested 17 threads. Using a thread count greater than 16 is not recommended.
[ac3 @ 0x7f45203460c0] frame sync error
[14:09:28] sync: first pts audio 0x8000bd is 0
[14:09:28] sync: first pts video is 20160
[14:13:15] reader: done. 1 scr changes
[14:13:23] work: average encoding speed for job is 8.480773 fps
[14:13:23] comb detect: heavy 75 | light 292 | uncombed 1625 | total 1992
[14:13:23] decomb: deinterlaced 75 | blended 292 | unfiltered 1625 | total 1992
[14:13:23] vfr: 1992 frames output, 0 dropped and 0 duped for CFR/PFR
[14:13:23] vfr: lost time: 0 (0 frames)
[14:13:23] vfr: gained time: 0 (0 frames) (0 not accounted for)
[14:13:23] stream: 32571 good frames, 0 errors (0%)
[14:13:23] ac3-decoder done: 2481 frames, 0 decoder errors
[14:13:23] mpeg2video-decoder done: 1992 frames, 0 decoder errors
[14:13:23] sync: got 1992 frames, 1729 expected
[14:13:23] sync: framerate min 25.000 fps, max 25.000 fps, avg 25.000 fps
x265 [info]: frame I:     37, Avg QP:14.30  kb/s: 6344.99 
x265 [info]: frame P:    460, Avg QP:15.70  kb/s: 3748.50 
x265 [info]: frame B:   1495, Avg QP:20.01  kb/s: 1369.74 
x265 [info]: Weighted P-Frames: Y:19.1% UV:8.9%
x265 [info]: Weighted B-Frames: Y:19.9% UV:10.6%
x265 [info]: consecutive B-frames: 11.5% 6.2% 7.2% 50.5% 6.2% 12.3% 1.4% 3.2% 1.4% 

encoded 1992 frames in 235.40s (8.46 fps), 2011.46 kb/s, Avg QP:18.91
[14:13:23] mux: track 0, 1992 frames, 20042128 bytes, 2006.22 kbps, fifo 1024
[14:13:23] mux: track 1, 2481 frames, 4445952 bytes, 445.04 kbps, fifo 2048
[14:13:23] libhb: work result = 0

Code: Select all

[14:14:56] gtkgui: Modified Preset: /Matroska/H.264 MKV 576p25
[14:14:56] 1 job(s) to process
[14:14:56] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "av_aac",
                "Gain": 0.0,
                "Mixdown": "stereo",
                "NormalizeMixLevel": false,
                "PresetEncoder": "av_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:ac3",
            "copy:dts",
            "copy:dtshd",
            "copy:eac3"
        ],
        "FallbackEncoder": "av_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Name": "Chapter 1"
            }
        ],
        "ChapterMarkers": false,
        "File": "/home/pete/Videos/dolby_orchestra-DWEU (3).mkv",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "mkv"
    },
    "Filters": {
        "FilterList": [
            {
                "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": 4,
                "Settings": {
                    "mode": "7"
                }
            },
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/1080000"
                }
            },
            {
                "ID": 11,
                "Settings": {
                    "crop-bottom": 8,
                    "crop-left": 78,
                    "crop-right": 62,
                    "crop-top": 50,
                    "height": 518,
                    "width": 580
                }
            }
        ]
    },
    "Metadata": {
        "Name": "dolby_orchestra-DWEU"
    },
    "PAR": {
        "Den": 45,
        "Num": 64
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/home/pete/Downloads/dolby_orchestra-DWEU.vob",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorMatrix": 6,
        "ColorPrimaries": 5,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "3.1",
        "Options": "",
        "Preset": "veryslow",
        "Profile": "main",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 16.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[14:14:56] CPU: 
[14:14:56]  - logical processor count: 32
[14:14:56] hb_scan: path=/home/pete/Downloads/dolby_orchestra-DWEU.vob, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /home/pete/Downloads/dolby_orchestra-DWEU.vob
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
[14:14:56] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.0
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
[14:14:56] dvd: not a dvd - trying as a stream/file instead
[14:14:56] file is MPEG Program Stream
[14:14:56] Probing 3 unknown streams
[14:14:56]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:14:56] Found the following streams
[14:14:56]     Video Streams : 
[14:14:56]       0xe0-0x0 type MPEG2 (0x2)
[14:14:56]     Audio Streams : 
[14:14:56]       0xbd-0x80 type AC3 (0x81)
[14:14:56]     Subtitle Streams : 
[14:14:56]     Other Streams : 
[14:14:56] stream id 0xbd (type 0x81 substream 0x80) audio 0x8000bd
[14:14:56] scan: decoding previews for title 1
[14:14:56] file is MPEG Program Stream
[14:14:56] Probing 3 unknown streams
[14:14:56]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[ac3 @ 0x7f4120138780] frame sync error
[ac3 @ 0x7f4120138780] frame sync error
[14:14:56] scan: audio 0x8000bd: ac3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[14:14:56] stream: 72 good frames, 0 errors (0%)
[14:14:56] scan: 10 previews, 720x576, 25.000 fps, autocrop = 50/8/78/62, aspect 16:9, PAR 64:45
[14:14:56] libhb: scan thread found 1 valid title(s)
[14:14:56] starting job
[14:14:56] decomb filter thread started for segment 0
[14:14:56] decomb filter thread started for segment 1
[14:14:56] decomb filter thread started for segment 2
[14:14:56] decomb filter thread started for segment 3
[14:14:56] decomb filter thread started for segment 4
[14:14:56] decomb filter thread started for segment 5
[14:14:56] decomb filter thread started for segment 6
[14:14:56] decomb filter thread started for segment 7
[14:14:56] decomb filter thread started for segment 8
[14:14:56] decomb filter thread started for segment 9
[14:14:56] decomb filter thread started for segment 10
[14:14:56] decomb filter thread started for segment 11
[14:14:56] decomb filter thread started for segment 12
[14:14:56] decomb filter thread started for segment 13
[14:14:56] decomb filter thread started for segment 14
[14:14:56] decomb filter thread started for segment 15
[14:14:56] decomb filter thread started for segment 17
[14:14:56] decomb filter thread started for segment 18
[14:14:56] decomb filter thread started for segment 16
[14:14:56] decomb filter thread started for segment 20
[14:14:56] decomb filter thread started for segment 21
[14:14:56] decomb filter thread started for segment 22
[14:14:56] decomb filter thread started for segment 23
[14:14:56] decomb filter thread started for segment 24
[14:14:56] decomb filter thread started for segment 25
[14:14:56] decomb filter thread started for segment 26
[14:14:56] decomb filter thread started for segment 27
[14:14:56] decomb filter thread started for segment 28
[14:14:56] decomb filter thread started for segment 29
[14:14:56] decomb filter thread started for segment 30
[14:14:56] decomb filter thread started for segment 31
[14:14:56] decomb check thread started for segment 0
[14:14:56] decomb check thread started for segment 1
[14:14:56] decomb check thread started for segment 2
[14:14:56] decomb check thread started for segment 3
[14:14:56] decomb check thread started for segment 4
[14:14:56] decomb check thread started for segment 5
[14:14:56] decomb check thread started for segment 6
[14:14:56] decomb check thread started for segment 7
[14:14:56] decomb check thread started for segment 8
[14:14:56] decomb check thread started for segment 9
[14:14:56] decomb check thread started for segment 10
[14:14:56] decomb check thread started for segment 11
[14:14:56] decomb check thread started for segment 12
[14:14:56] decomb check thread started for segment 13
[14:14:56] decomb check thread started for segment 14
[14:14:56] decomb check thread started for segment 15
[14:14:56] decomb check thread started for segment 16
[14:14:56] decomb check thread started for segment 17
[14:14:56] decomb check thread started for segment 18
[14:14:56] decomb check thread started for segment 19
[14:14:56] decomb check thread started for segment 20
[14:14:56] decomb check thread started for segment 21
[14:14:56] decomb check thread started for segment 22
[14:14:56] decomb check thread started for segment 23
[14:14:56] decomb check thread started for segment 24
[14:14:56] decomb check thread started for segment 25
[14:14:56] decomb check thread started for segment 26
[14:14:56] decomb check thread started for segment 27
[14:14:56] decomb check thread started for segment 28
[14:14:56] decomb filter thread started for segment 19
[14:14:56] decomb check thread started for segment 29
[14:14:56] decomb check thread started for segment 31
[14:14:56] decomb check thread started for segment 30
[14:14:56] mask filter thread started for segment 1
[14:14:56] mask filter thread started for segment 3
[14:14:56] mask filter thread started for segment 5
[14:14:56] mask filter thread started for segment 7
[14:14:56] mask filter thread started for segment 8
[14:14:56] mask filter thread started for segment 9
[14:14:56] mask filter thread started for segment 4
[14:14:56] mask filter thread started for segment 10
[14:14:56] mask filter thread started for segment 12
[14:14:56] mask filter thread started for segment 6
[14:14:56] mask filter thread started for segment 2
[14:14:56] mask filter thread started for segment 0
[14:14:56] mask filter thread started for segment 14
[14:14:56] mask filter thread started for segment 13
[14:14:56] mask filter thread started for segment 16
[14:14:56] mask filter thread started for segment 15
[14:14:56] mask filter thread started for segment 17
[14:14:56] mask filter thread started for segment 11
[14:14:56] mask filter thread started for segment 19
[14:14:56] mask filter thread started for segment 18
[14:14:56] mask filter thread started for segment 21
[14:14:56] mask filter thread started for segment 20
[14:14:56] mask filter thread started for segment 22
[14:14:56] mask filter thread started for segment 23
[14:14:56] mask filter thread started for segment 24
[14:14:56] mask filter thread started for segment 25
[14:14:56] mask filter thread started for segment 26
[14:14:56] mask filter thread started for segment 27
[14:14:56] mask filter thread started for segment 28
[14:14:56] mask filter thread started for segment 29
[14:14:56] mask filter thread started for segment 30
[14:14:56] mask filter thread started for segment 31
[14:14:56] mask erode thread started for segment 0
[14:14:56] mask erode thread started for segment 1
[14:14:56] mask erode thread started for segment 2
[14:14:56] mask erode thread started for segment 3
[14:14:56] mask erode thread started for segment 4
[14:14:56] mask erode thread started for segment 5
[14:14:56] mask erode thread started for segment 6
[14:14:56] mask erode thread started for segment 7
[14:14:56] mask erode thread started for segment 8
[14:14:56] mask erode thread started for segment 9
[14:14:56] mask erode thread started for segment 10
[14:14:56] mask erode thread started for segment 12
[14:14:56] mask erode thread started for segment 11
[14:14:56] mask erode thread started for segment 13
[14:14:56] mask erode thread started for segment 14
[14:14:56] mask erode thread started for segment 15
[14:14:56] mask erode thread started for segment 16
[14:14:56] mask erode thread started for segment 17
[14:14:56] mask erode thread started for segment 18
[14:14:56] mask erode thread started for segment 20
[14:14:56] mask erode thread started for segment 21
[14:14:56] mask erode thread started for segment 23
[14:14:56] mask erode thread started for segment 24
[14:14:56] mask erode thread started for segment 26
[14:14:56] mask erode thread started for segment 27
[14:14:56] mask erode thread started for segment 29
[14:14:56] mask erode thread started for segment 19
[14:14:56] mask erode thread started for segment 31
[14:14:56] mask dilate thread started for segment 0
[14:14:56] mask erode thread started for segment 22
[14:14:56] mask dilate thread started for segment 2
[14:14:56] mask dilate thread started for segment 3
[14:14:56] mask dilate thread started for segment 1
[14:14:56] mask erode thread started for segment 25
[14:14:56] mask dilate thread started for segment 4
[14:14:56] mask dilate thread started for segment 5
[14:14:56] mask dilate thread started for segment 6
[14:14:56] mask erode thread started for segment 28
[14:14:56] mask dilate thread started for segment 7
[14:14:56] mask erode thread started for segment 30
[14:14:56] mask dilate thread started for segment 8
[14:14:56] mask dilate thread started for segment 9
[14:14:56] mask dilate thread started for segment 10
[14:14:56] mask dilate thread started for segment 11
[14:14:56] mask dilate thread started for segment 12
[14:14:56] mask dilate thread started for segment 13
[14:14:56] mask dilate thread started for segment 14
[14:14:56] mask dilate thread started for segment 15
[14:14:56] mask dilate thread started for segment 16
[14:14:56] mask dilate thread started for segment 17
[14:14:56] mask dilate thread started for segment 18
[14:14:56] mask dilate thread started for segment 19
[14:14:56] mask dilate thread started for segment 20
[14:14:56] mask dilate thread started for segment 21
[14:14:56] mask dilate thread started for segment 22
[14:14:56] mask dilate thread started for segment 23
[14:14:56] mask dilate thread started for segment 24
[14:14:56] mask dilate thread started for segment 25
[14:14:56] mask dilate thread started for segment 26
[14:14:56] mask dilate thread started for segment 27
[14:14:56] mask dilate thread started for segment 28
[14:14:56] mask dilate thread started for segment 29
[14:14:56] mask dilate thread started for segment 30
[14:14:56] mask dilate thread started for segment 31
[14:14:56] yadif thread started for segment 0
[14:14:56] yadif thread started for segment 1
[14:14:56] yadif thread started for segment 2
[14:14:56] yadif thread started for segment 3
[14:14:56] yadif thread started for segment 4
[14:14:56] yadif thread started for segment 5
[14:14:56] yadif thread started for segment 6
[14:14:56] yadif thread started for segment 7
[14:14:56] yadif thread started for segment 8
[14:14:56] yadif thread started for segment 9
[14:14:56] yadif thread started for segment 10
[14:14:56] yadif thread started for segment 11
[14:14:56] yadif thread started for segment 12
[14:14:56] yadif thread started for segment 13
[14:14:56] yadif thread started for segment 14
[14:14:56] yadif thread started for segment 15
[14:14:56] yadif thread started for segment 16
[14:14:56] yadif thread started for segment 17
[14:14:56] yadif thread started for segment 18
[14:14:56] yadif thread started for segment 19
[14:14:56] yadif thread started for segment 20
[14:14:56] yadif thread started for segment 21
[14:14:56] yadif thread started for segment 22
[14:14:56] yadif thread started for segment 23
[14:14:56] yadif thread started for segment 24
[14:14:56] yadif thread started for segment 25
[14:14:56] yadif thread started for segment 26
[14:14:56] yadif thread started for segment 27
[14:14:56] yadif thread started for segment 28
[14:14:56] yadif thread started for segment 29
[14:14:56] yadif thread started for segment 30
[14:14:56] yadif thread started for segment 31
[14:14:56] job configuration:
[14:14:56]  * source
[14:14:56]    + /home/pete/Downloads/dolby_orchestra-DWEU.vob
[14:14:56]    + title 1, chapter(s) 1 to 1
[14:14:56]  * destination
[14:14:56]    + /home/pete/Videos/dolby_orchestra-DWEU (3).mkv
[14:14:56]    + container: Matroska (libavformat)
[14:14:56]  * video track
[14:14:56]    + decoder: mpeg2video
[14:14:56]      + bitrate 200 kbps
[14:14:56]    + filters
[14:14:56]      + 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)
[14:14:56]      + Decomb (mode=39)
[14:14:56]      + Framerate Shaper (mode=2:rate=27000000/1080000)
[14:14:56]        + frame rate: 25.000 fps -> peak rate limited to 25.000 fps
[14:14:56]      + Crop and Scale (width=580:height=518:crop-top=50:crop-bottom=8:crop-left=78:crop-right=62)
[14:14:56]        + source: 720 * 576, crop (50/8/78/62): 580 * 518, scale: 580 * 518
[14:14:56]    + Output geometry
[14:14:56]      + storage dimensions: 580 x 518
[14:14:56]      + pixel aspect ratio: 64 : 45
[14:14:56]      + display dimensions: 824 x 518
[14:14:56]    + encoder: H.264 (libx264)
[14:14:56]      + preset:  veryslow
[14:14:56]      + profile: main
[14:14:56]      + level:   3.1
[14:14:56]      + quality: 16.00 (RF)
[14:14:56]      + color profile: 5-1-6
[14:14:56]  * audio track 1
[14:14:56]    + decoder: Unknown (AC3) (5.1 ch) (track 1, id 0x8000bd)
[14:14:56]      + bitrate: 448 kbps, samplerate: 48000 Hz
[14:14:56]    + mixdown: Stereo
[14:14:56]    + dither: triangular
[14:14:56]    + encoder: AAC (libavcodec)
[14:14:56]      + bitrate: 160 kbps, samplerate: 48000 Hz
[14:14:56] file is MPEG Program Stream
[14:14:56] Probing 3 unknown streams
[14:14:56]     Probe: Found stream mpegvideo. stream id 0xe0-0x0
[14:14:56] sync: expecting 1729 video frames
[14:14:56] encx264: encoding at constant RF 16.000000
[14:14:56] encx264: unparsed options: level=3.1:ref=14:bframes=8:b-adapt=2:direct=auto:analyse=all:8x8dct=0:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=14000:vbv-maxrate=14000:rc-lookahead=60
x264 [info]: using SAR=64/45
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Main, level 3.1
[mpeg2video @ 0x7f45204efa00] Application has requested 17 threads. Using a thread count greater than 16 is not recommended.
[ac3 @ 0x7f45203a0240] frame sync error
[14:14:56] sync: first pts audio 0x8000bd is 0
[14:14:56] sync: first pts video is 20160
[14:15:21] reader: done. 1 scr changes
[14:15:22] work: average encoding speed for job is 78.265930 fps
[14:15:22] comb detect: heavy 75 | light 292 | uncombed 1625 | total 1992
[14:15:22] decomb: deinterlaced 75 | blended 292 | unfiltered 1625 | total 1992
[14:15:22] vfr: 1992 frames output, 0 dropped and 0 duped for CFR/PFR
[14:15:22] vfr: lost time: 0 (0 frames)
[14:15:22] vfr: gained time: 0 (0 frames) (0 not accounted for)
[14:15:22] stream: 32571 good frames, 0 errors (0%)
[14:15:22] ac3-decoder done: 2481 frames, 0 decoder errors
[14:15:22] mpeg2video-decoder done: 1992 frames, 0 decoder errors
[14:15:22] sync: got 1992 frames, 1729 expected
[14:15:22] sync: framerate min 25.000 fps, max 25.000 fps, avg 25.000 fps
[aac @ 0x7f45204f0e00] Qavg: 3492.478
x264 [info]: frame I:41    Avg QP:12.44  size: 51816
x264 [info]: frame P:473   Avg QP:16.04  size: 17613
x264 [info]: frame B:1478  Avg QP:17.74  size:  8599
x264 [info]: consecutive B-frames:  4.0%  4.8%  6.0% 41.2% 10.5% 19.6%  5.3%  3.2%  5.4%
x264 [info]: mb I  I16..4: 39.3%  0.0% 60.7%
x264 [info]: mb P  I16..4: 12.5%  0.0% 12.2%  P16..4: 29.4% 14.8%  9.0%  1.1%  0.3%    skip:20.5%
x264 [info]: mb B  I16..4:  8.7%  0.0%  1.9%  B16..8: 28.2%  8.7%  2.4%  direct: 9.3%  skip:40.8%  L0:47.1% L1:37.8% BI:15.1%
x264 [info]: direct mvs  spatial:99.3% temporal:0.7%
x264 [info]: coded y,uvDC,uvAC intra: 84.3% 79.8% 68.6% inter: 23.8% 22.5% 6.2%
x264 [info]: i16 v,h,dc,p: 29% 18% 30% 23%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 11%  9%  8% 11% 12% 10% 12% 11%
x264 [info]: i8c dc,h,v,p: 45% 24% 20% 12%
x264 [info]: Weighted P-Frames: Y:17.5% UV:12.9%
x264 [info]: ref P L0: 47.2%  8.8% 16.2%  7.8%  5.3%  4.0%  3.3%  2.0%  1.5%  1.1%  0.8%  0.7%  0.6%  0.6%  0.1%
x264 [info]: ref B L0: 69.5% 11.4%  6.4%  3.5%  2.5%  1.9%  1.7%  1.0%  0.7%  0.5%  0.5%  0.3%  0.1%
x264 [info]: ref B L1: 94.0%  6.0%
x264 [info]: kb/s:2325.72
[14:15:22] mux: track 0, 1992 frames, 23162711 bytes, 2318.59 kbps, fifo 1024
[14:15:22] mux: track 1, 3722 frames, 1604732 bytes, 160.63 kbps, fifo 2048
[14:15:22] libhb: work result = 0

(ghb:4822): GLib-GIO-WARNING **: 14:15:47.697: unable to send notifications through org.freedesktop.Notifications: Timeout was reached
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: x.265 on Threadripper not using many cores

Post by mduell »

Limited vertical resolution for your encode puts practical limits on the utility of additional cores.
baldyman
Posts: 6
Joined: Sat Jan 19, 2019 6:02 pm

Re: x.265 on Threadripper not using many cores

Post by baldyman »

Apparently this is a know issue -

https://github.com/HandBrake/HandBrake/issues/1142

Something to do with disabling NUMA in x265 but not x264.

Just have to wait for a fix to come along I guess....
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: x.265 on Threadripper not using many cores

Post by s55 »

NUMA isn't a magic fix for this. When your dealing with low resolution content, CPU scaling is much worse with lower resolutions. So even when we enable NUMA, you'll find you still have big scaling issues. There isnt' anything that can really be done about that.

You could try removing decomb / interlace detection if your source isn't interlaced. That will help performance a small amount.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: x.265 on Threadripper not using many cores

Post by Woodstock »

I thought about the decomb filter, too, but didn't say anything because the source appears to be interlaced.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: x.265 on Threadripper not using many cores

Post by JohnAStebbins »

Although NUMA should help with certain encoding tasks using x265, I'm pretty sure this is not a factor in your particular case. I get about the same result as you on a non-NUMA processor. CPU utilization averages 60% for any particular core and encode fps averages about 9 for low resolution content when using x265. Simply changing to a higher resolution 1080p source increases CPU utilization to 95% average.
baldyman
Posts: 6
Joined: Sat Jan 19, 2019 6:02 pm

Re: x.265 on Threadripper not using many cores

Post by baldyman »

x265 is supposed to have higher computational requirements than x264. All the posts I've read show that it taxes the CPU more for the same source material.

In my test x264 is not only 10x faster but loads my processor 10x as much.

So if the problem is my source material, I'd love to know why the discrepancy.

At the moment its not making any sense.
Deleted User 11865

Re: x.265 on Threadripper not using many cores

Post by Deleted User 11865 »

You maybe be thinking of H.264 vs. H.265, rather than specific encoder implementations?

Also, where do you see people benchmarking x265 on DVD-sized sources? It's 2019…
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: x.265 on Threadripper not using many cores

Post by JohnAStebbins »

All the posts I've read show that it taxes the CPU more for the same source material
Most of the benchmarks that are done try to either show how "good" the encoder is or try to be "fair" (i.e. do an apples to apples comparison). In either case, they would not pick a source and settings that would show the encoder performing poorly. x265 gets a lot of praise for being able to scale to higher thread count than x264. x264 starts hitting diminishing returns at about 6 threads, even with high resolution content. x265 uses more threads more efficiently, but only with higher resolution content.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: x.265 on Threadripper not using many cores

Post by JohnAStebbins »

baldyman wrote: So if the problem is my source material, I'd love to know why the discrepancy.
The very first response after you provided the necessary information answered this.
mduell wrote: Limited vertical resolution for your encode puts practical limits on the utility of additional cores.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5712
Joined: Sat Feb 09, 2008 7:21 pm

Re: x.265 on Threadripper not using many cores

Post by JohnAStebbins »

Maybe a little more explanation will help. It's a common misconception that video encoding is easily massively parallelized. The same misconception leads people to think that GPUs should be much faster at encoding than they are (all good "GPU" encoders are actually dedicated hardware that happens to sit on the same silicon as the actual GPU but has a single purpose that has nothing to do with driving displays or playing video games).

Video encoding involves a lot of conditional branching and inter-frame dependencies that force a lot of serial computation. The main place where you can get parallelism is intra-frame (i.e. the processing that happens within a single frame, pixel manipulation). In order to maximize this intra-frame parallelism, you need lots of pixels. The more pixels there are, the more you can divide up the frame into blocks (or bands in the case of x265's threading model) that can be processed in parallel. The blocks must be of a certain minimum size because you have to process the boundaries between blocks in a special way so that quality isn't affected. The processing of the boundaries slows things down, so there is a point where you are just wasting CPU cycles for no performance gain below a certain block size.
baldyman
Posts: 6
Joined: Sat Jan 19, 2019 6:02 pm

Re: x.265 on Threadripper not using many cores

Post by baldyman »

"The very first response after you provided the necessary information answered this. "

It answered the original question, "why is the algorithm not loading my processor?"

This is a different question. Why, with the SAME source material, is x264 10 times faster than x265?

If the limitation is to do with the source material, they should be running at similar speeds.
Deleted User 11865

Re: x.265 on Threadripper not using many cores

Post by Deleted User 11865 »

x265 has a different threading model than x264.
baldyman
Posts: 6
Joined: Sat Jan 19, 2019 6:02 pm

Re: x.265 on Threadripper not using many cores

Post by baldyman »

So you're saying its deliberately designed to use less power on less cores and run at 10% of the speed of an older codec under conditions where cpu capacity is effectively unlimited?

Not convinced.
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: x.265 on Threadripper not using many cores

Post by Woodstock »

You really need to ask these question over on the x264/x265 developer site, since they're the ones that make the decisions about how their encoders work.

x264 also has several years of development lead time on x265, so a lot more optimizations have been found. x265 used to be unreasonably slow; it's much better now, but its added complexity means it is unlikely to be as fast as x264 until x264 is no longer being developed.
User avatar
s55
HandBrake Team
Posts: 10350
Joined: Sun Dec 24, 2006 1:05 pm

Re: x.265 on Threadripper not using many cores

Post by s55 »

No one said that.

Take this crude metaphor: You can't realistically split a cupcake between 32 people. However a wedding cake you can.


x264 does a lot less work per frame, so is generally a lot faster.
x265 *may* scale better but would need to be able to use significantly more cores to match x264's speed. However, if this is now possible it overall ends up even slower.

However, at the end of the day, the problem can only be broken down so far and beyond that, you don't get any gains by having more CPU Cores. At that point, you'd have to do multiple encodes at once to achieve full utilisation.
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: x.265 on Threadripper not using many cores

Post by mduell »

H.265 generally lacks an advantage over H.264 at low resolutions, so it's unsurprising x265 developers have not optimized the threading model for low resolution cases.

x265 is generally slower than x264.
mbc0
Posts: 5
Joined: Thu Sep 27, 2018 10:12 pm

Re: x.265 on Threadripper not using many cores

Post by mbc0 »

I have just discovered this as well, I am using DJOSS Handbrake Docker on my unRAID Server, below is an example of using Handbrake at the highest priority, is this likely to be a "quick fix" ?

https://1drv.ms/u/s!AjnJhtmhYMJlhvAba0o-nsa6-IOq3w
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: x.265 on Threadripper not using many cores

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
mbc0
Posts: 5
Joined: Thu Sep 27, 2018 10:12 pm

Re: x.265 on Threadripper not using many cores

Post by mbc0 »

Locked