Faster Encodes with threads=32

HandBrake for Windows support
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
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Faster Encodes with threads=32

Post by wyliec2 »

Description of problem or question:

I'd heard that there is a limit to the number of threads that Handbrake can use. My platform is Ryzen 3950X with 16 cores/32 threads. When doing large numbers of encodes, I run two instances of Handbrake simultaneously with typically 80+ % CPU utilization. Now that my large set of encodes is completed, I'm more interested in single instance performance and possibly swapping CPU to a Zen 3 5900X (12 cores/24 threads).

I've been using HB without any "threads=" parameter and had assumed it would use all that it could. In testing with different values I was surprised to find reduced encode times with values of “threads=24” and “threads=32”.

Example – BluRay movie 1:29:27 in length. RF=20.5 DTSHD MA 5.1 Pass-thru Audio; Preset: Very-Slow; Profile: High

Default (no “threads” parameter: 41:18 (minutes:seconds)
“threads=32”: 34:03

“threads=0” gives the same results as with no “threads” parameter.

In several different files, threads=32 has given 12%-23% reduced encode times compared to the default.

Steps to reproduce the problem (If Applicable):

Encode the same file with identical settings aside from “threads” parameter.


HandBrake version (e.g., 1.0.0):

1.3.3


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 Professional – Version 2004

HandBrake Activity Log ***required*** (see How-to get an activity log)

Threads=32 logfile---------------------------------------------------------------------------------------------------

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[03:23:32] base preset: Standard-HQ-sscf (Modified)
[15:23:32] hb_init: starting libhb thread
[15:23:32] Starting work at: Mon Dec 28 15:23:32 2020
[15:23:32] 1 job(s) to process
[15:23:32] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 1,
        "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"
      },
      {
        "Name": "Chapter 21"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\LUCY_threads-32.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "138",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "138",
          "height": "804",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 21
    },
    "Title": 35,
    "Path": "F:\\BD-DVD_Process_F_HDD\\1-BD_Rips\\zHB_Benchmarks\\LUCY_NA"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": true,
        "Default": false,
        "Forced": true,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5:threads=32",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[15:23:32] CPU: AMD Ryzen 9 3950X 16-Core Processor
[15:23:32]  - logical processor count: 32
[15:23:32] Intel Quick Sync Video support: no
[15:23:32] hb_scan: path=F:\BD-DVD_Process_F_HDD\1-BD_Rips\zHB_Benchmarks\LUCY_NA, title_index=35
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
[15:23:32] scan: BD has 40 title(s)
[15:23:32] bd: scanning title 35
[15:23:32] bd: playlist 00800.MPLS
[15:23:32] bd: duration is 01:29:27 (5367362 ms)
[15:23:32] bd: video id=0x1011, stream type=H.264, format 1080p
[15:23:32] bd: aspect = 16:9
[15:23:32] bd: audio id=0x711100, lang=English (DTS), 3cc=eng
[15:23:32] bd: audio id=0x1100, lang=English (DTS-HD MA), 3cc=eng
[15:23:32] bd: audio id=0x1101, lang=español (DTS), 3cc=spa
[15:23:32] bd: audio id=0x1102, lang=Francais (DTS), 3cc=fra
[15:23:32] bd: audio id=0x1103, lang=English (AC3), 3cc=eng
[15:23:32] bd: subtitle id=0x1200, lang=English [PGS], 3cc=eng
[15:23:32] bd: subtitle id=0x1201, lang=español [PGS], 3cc=spa
[15:23:32] bd: subtitle id=0x1202, lang=Francais [PGS], 3cc=fra
[15:23:32] bd: subtitle id=0x1203, lang=español [PGS], 3cc=spa
[15:23:32] bd: subtitle id=0x1204, lang=Francais [PGS], 3cc=fra
[15:23:32] bd: chap 1, 326367 ms
[15:23:32] bd: chap 2, 191900 ms
[15:23:32] bd: chap 3, 427635 ms
[15:23:32] bd: chap 4, 350391 ms
[15:23:32] bd: chap 5, 269102 ms
[15:23:32] bd: chap 6, 262136 ms
[15:23:32] bd: chap 7, 428719 ms
[15:23:32] bd: chap 8, 247205 ms
[15:23:32] bd: chap 9, 349098 ms
[15:23:32] bd: chap 10, 158158 ms
[15:23:32] bd: chap 11, 321779 ms
[15:23:32] bd: chap 12, 243576 ms
[15:23:32] bd: chap 13, 152026 ms
[15:23:32] bd: chap 14, 163246 ms
[15:23:32] bd: chap 15, 142684 ms
[15:23:32] bd: chap 16, 161786 ms
[15:23:32] bd: chap 17, 150316 ms
[15:23:32] bd: chap 18, 384467 ms
[15:23:32] bd: chap 19, 220970 ms
[15:23:32] bd: chap 20, 415540 ms
[15:23:32] bd: chap 21, 250 ms
[15:23:32] bd: title 35 has 21 chapters
[15:23:32] scan: decoding previews for title 35
[15:23:32] scan: title angle(s) 1
[15:23:32] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[15:23:32] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[15:23:32] scan: audio 0x1101: dca, rate=48000Hz, bitrate=768000 español (DTS) (5.1 ch) (768 kbps)
[15:23:32] scan: audio 0x1102: dca, rate=48000Hz, bitrate=768000 Francais (DTS) (5.1 ch) (768 kbps)
[15:23:32] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround) (192 kbps)
[15:23:33] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1
[15:23:33] scan: supported video decoders: avcodec qsv
[15:23:33] stream: 8 good frames, 0 errors (0%)
[15:23:33] libhb: scan thread found 1 valid title(s)
[15:23:33] Starting Task: Encoding Pass
[15:23:33] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[15:23:33] Auto Passthru: fallback is AC3
[15:23:33] Auto Passthru: using DTS-HD Passthru for track 1
[15:23:33] job configuration:
[15:23:33]  * source
[15:23:33]    + F:\BD-DVD_Process_F_HDD\1-BD_Rips\zHB_Benchmarks\LUCY_NA
[15:23:33]    + title 35, chapter(s) 1 to 21
[15:23:33]  * destination
[15:23:33]    + M:\001_OUTPUT_to_VERIFY\LUCY_threads-32.mkv
[15:23:33]    + container: Matroska (libavformat)
[15:23:33]      + chapter markers
[15:23:33]  * video track
[15:23:33]    + decoder: h264
[15:23:33]      + bitrate 200 kbps
[15:23:33]    + filters
[15:23:33]      + Framerate Shaper (mode=1)
[15:23:33]        + frame rate: 23.976 fps -> constant 23.976 fps
[15:23:33]      + Subtitle renderer ()
[15:23:33]      + Crop and Scale (width=1920:height=804:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[15:23:33]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 1920 * 804
[15:23:33]    + Output geometry
[15:23:33]      + storage dimensions: 1920 x 804
[15:23:33]      + pixel aspect ratio: 1 : 1
[15:23:33]      + display dimensions: 1920 x 804
[15:23:33]    + encoder: H.264 (libx264)
[15:23:33]      + preset:  veryslow
[15:23:33]      + options: ref=5:bframes=5:threads=32
[15:23:33]      + profile: high
[15:23:33]      + level:   4.2
[15:23:33]      + quality: 20.50 (RF)
[15:23:33]      + color profile: 1-1-1
[15:23:33]  * subtitle track 1, English [PGS] (track 0, id 0x1200, Picture) -> Render/Burn-in, Forced Only
[15:23:33]  * audio track 1
[15:23:33]    + decoder: English (DTS-HD MA) (5.1 ch) (track 2, id 0x1100)
[15:23:33]      + samplerate: 48000 Hz
[15:23:33]    + DTS-HD Passthru
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
[15:23:33] sync: expecting 128688 video frames
[15:23:33] encx264: min-keyint: 24, keyint: 240
[15:23:33] encx264: encoding at constant RF 20.500000
[15:23:33] encx264: unparsed options: ref=5:bframes=5:threads=32:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[15:23:33] sync: first pts video is 0
[15:23:33] sync: "Chapter 1" (1) at frame 1 time 0
[15:23:33] sync: first pts audio 0x1100 is 0
[15:25:46] sync: "Chapter 2" (2) at frame 7826 time 29373093
[15:27:06] sync: "Chapter 3" (3) at frame 12427 time 46644097
[15:29:42] sync: "Chapter 4" (4) at frame 22672 time 85101266
[15:31:59] sync: "Chapter 5" (5) at frame 31068 time 116617751
[15:34:00] sync: "Chapter 6" (6) at frame 37533 time 140885745
[15:35:35] sync: "Chapter 7" (7) at frame 43818 time 164478063
[15:38:12] sync: "Chapter 8" (8) at frame 54097 time 203062860
[15:39:50] sync: "Chapter 9" (9) at frame 60024 time 225311336
[15:41:40] sync: "Chapter 10" (10) at frame 68394 time 256730223
[15:42:41] sync: "Chapter 11" (11) at frame 72186 time 270964443
[15:45:01] sync: "Chapter 12" (12) at frame 79901 time 299924625
[15:46:38] sync: "Chapter 13" (13) at frame 85741 time 321846525
[15:47:56] sync: "Chapter 14" (14) at frame 89386 time 335528943
[15:48:57] sync: "Chapter 15" (15) at frame 93300 time 350221121
[15:49:51] sync: "Chapter 16" (16) at frame 96721 time 363062700
[15:50:47] sync: "Chapter 17" (17) at frame 100600 time 377623496
[15:51:47] sync: "Chapter 18" (18) at frame 104204 time 391152011
[15:54:42] sync: "Chapter 19" (19) at frame 113419 time 425742817
[15:56:15] sync: "Chapter 20" (20) at frame 118705 time 445585140
[15:57:33] bd: End of title
[15:57:33] reader: done. 1 scr changes
[15:57:33] sync: "Chapter 21" (21) at frame 128668 time 482983751
[15:57:35] work: average encoding speed for job is 63.007149 fps
[15:57:35] vfr: 128688 frames output, 0 dropped and 0 duped for CFR/PFR
[15:57:35] vfr: lost time: 0 (0 frames)
[15:57:35] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:57:35] stream: 128688 good frames, 0 errors (0%)
[15:57:35] dca-decoder done: 503191 frames, 0 decoder errors
[15:57:35] h264-decoder done: 128688 frames, 0 decoder errors
[15:57:35] sync: got 128688 frames, 128688 expected
[15:57:35] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x264 [info]: frame I:1508  Avg QP:18.06  size:153687
x264 [info]: frame P:31515 Avg QP:21.48  size: 35099
x264 [info]: frame B:95665 Avg QP:24.47  size: 10221
x264 [info]: consecutive B-frames:  4.0%  3.6% 14.0% 17.1% 20.5% 40.8%
x264 [info]: mb I  I16..4: 19.1% 69.3% 11.6%
x264 [info]: mb P  I16..4:  3.7% 12.8%  1.3%  P16..4: 39.3%  9.6%  9.6%  0.2%  0.1%    skip:23.3%
x264 [info]: mb B  I16..4:  0.3%  1.2%  0.1%  B16..8: 35.9%  4.3%  1.0%  direct: 2.9%  skip:54.4%  L0:45.7% L1:48.5% BI: 5.9%
x264 [info]: 8x8 transform intra:72.0% inter:78.8%
x264 [info]: direct mvs  spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 67.0% 71.9% 37.3% inter: 11.6% 12.1% 1.3%
x264 [info]: i16 v,h,dc,p: 25% 20%  6% 49%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11%  9%  6% 10% 14% 13% 14% 11% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 10%  3%  9% 14% 13% 13%  9% 11%
x264 [info]: i8c dc,h,v,p: 34% 25% 20% 21%
x264 [info]: Weighted P-Frames: Y:4.0% UV:2.8%
x264 [info]: ref P L0: 56.0% 12.7% 17.9%  7.0%  5.8%  0.6%  0.0%
x264 [info]: ref B L0: 83.5% 11.3%  4.2%  1.1%
x264 [info]: ref B L1: 95.7%  4.3%
x264 [info]: kb/s:3451.51
[15:57:35] mux: track 0, 128688 frames, 2315632474 bytes, 3451.40 kbps, fifo 512
[15:57:35] mux: track 1, 503191 frames, 2873161340 bytes, 4282.39 kbps, fifo 4096
[15:57:35] Finished work at: Mon Dec 28 15:57:35 2020
[15:57:35] libhb: work result = 0

# Encode Completed ...

 
Default Threads logfile-------------------------------------------------------------------------------------------------

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[02:41:28] base preset: Standard-HQ-sscf
[14:41:28] hb_init: starting libhb thread
[14:41:28] Starting work at: Mon Dec 28 14:41:28 2020
[14:41:28] 1 job(s) to process
[14:41:28] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 1,
        "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"
      },
      {
        "Name": "Chapter 21"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\LUCY_NoParam.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "138",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "138",
          "height": "804",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 21
    },
    "Title": 35,
    "Path": "F:\\BD-DVD_Process_F_HDD\\1-BD_Rips\\zHB_Benchmarks\\LUCY_NA"
  },
  "Subtitle": {
    "Search": {
      "Burn": false,
      "Default": false,
      "Enable": false,
      "Forced": false
    },
    "SubtitleList": [
      {
        "Burn": true,
        "Default": false,
        "Forced": true,
        "ID": 1,
        "Offset": 0,
        "Track": 0
      }
    ]
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[14:41:28] CPU: AMD Ryzen 9 3950X 16-Core Processor
[14:41:28]  - logical processor count: 32
[14:41:28] Intel Quick Sync Video support: no
[14:41:28] hb_scan: path=F:\BD-DVD_Process_F_HDD\1-BD_Rips\zHB_Benchmarks\LUCY_NA, title_index=35
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
[14:41:28] scan: BD has 40 title(s)
[14:41:28] bd: scanning title 35
[14:41:28] bd: playlist 00800.MPLS
[14:41:28] bd: duration is 01:29:27 (5367362 ms)
[14:41:28] bd: video id=0x1011, stream type=H.264, format 1080p
[14:41:28] bd: aspect = 16:9
[14:41:28] bd: audio id=0x711100, lang=English (DTS), 3cc=eng
[14:41:28] bd: audio id=0x1100, lang=English (DTS-HD MA), 3cc=eng
[14:41:28] bd: audio id=0x1101, lang=español (DTS), 3cc=spa
[14:41:28] bd: audio id=0x1102, lang=Francais (DTS), 3cc=fra
[14:41:28] bd: audio id=0x1103, lang=English (AC3), 3cc=eng
[14:41:28] bd: subtitle id=0x1200, lang=English [PGS], 3cc=eng
[14:41:28] bd: subtitle id=0x1201, lang=español [PGS], 3cc=spa
[14:41:28] bd: subtitle id=0x1202, lang=Francais [PGS], 3cc=fra
[14:41:28] bd: subtitle id=0x1203, lang=español [PGS], 3cc=spa
[14:41:28] bd: subtitle id=0x1204, lang=Francais [PGS], 3cc=fra
[14:41:28] bd: chap 1, 326367 ms
[14:41:28] bd: chap 2, 191900 ms
[14:41:28] bd: chap 3, 427635 ms
[14:41:28] bd: chap 4, 350391 ms
[14:41:28] bd: chap 5, 269102 ms
[14:41:28] bd: chap 6, 262136 ms
[14:41:28] bd: chap 7, 428719 ms
[14:41:28] bd: chap 8, 247205 ms
[14:41:28] bd: chap 9, 349098 ms
[14:41:28] bd: chap 10, 158158 ms
[14:41:28] bd: chap 11, 321779 ms
[14:41:28] bd: chap 12, 243576 ms
[14:41:28] bd: chap 13, 152026 ms
[14:41:28] bd: chap 14, 163246 ms
[14:41:28] bd: chap 15, 142684 ms
[14:41:28] bd: chap 16, 161786 ms
[14:41:28] bd: chap 17, 150316 ms
[14:41:28] bd: chap 18, 384467 ms
[14:41:28] bd: chap 19, 220970 ms
[14:41:28] bd: chap 20, 415540 ms
[14:41:28] bd: chap 21, 250 ms
[14:41:28] bd: title 35 has 21 chapters
[14:41:28] scan: decoding previews for title 35
[14:41:28] scan: title angle(s) 1
[14:41:28] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[14:41:28] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[14:41:28] scan: audio 0x1101: dca, rate=48000Hz, bitrate=768000 español (DTS) (5.1 ch) (768 kbps)
[14:41:28] scan: audio 0x1102: dca, rate=48000Hz, bitrate=768000 Francais (DTS) (5.1 ch) (768 kbps)
[14:41:28] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround) (192 kbps)
[14:41:30] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1
[14:41:30] scan: supported video decoders: avcodec qsv
[14:41:30] stream: 8 good frames, 0 errors (0%)
[14:41:30] libhb: scan thread found 1 valid title(s)
[14:41:30] Starting Task: Encoding Pass
[14:41:30] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[14:41:30] Auto Passthru: fallback is AC3
[14:41:30] Auto Passthru: using DTS-HD Passthru for track 1
[14:41:30] job configuration:
[14:41:30]  * source
[14:41:30]    + F:\BD-DVD_Process_F_HDD\1-BD_Rips\zHB_Benchmarks\LUCY_NA
[14:41:30]    + title 35, chapter(s) 1 to 21
[14:41:30]  * destination
[14:41:30]    + M:\001_OUTPUT_to_VERIFY\LUCY_NoParam.mkv
[14:41:30]    + container: Matroska (libavformat)
[14:41:30]      + chapter markers
[14:41:30]  * video track
[14:41:30]    + decoder: h264
[14:41:30]      + bitrate 200 kbps
[14:41:30]    + filters
[14:41:30]      + Framerate Shaper (mode=1)
[14:41:30]        + frame rate: 23.976 fps -> constant 23.976 fps
[14:41:30]      + Subtitle renderer ()
[14:41:30]      + Crop and Scale (width=1920:height=804:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[14:41:30]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 1920 * 804
[14:41:30]    + Output geometry
[14:41:30]      + storage dimensions: 1920 x 804
[14:41:30]      + pixel aspect ratio: 1 : 1
[14:41:30]      + display dimensions: 1920 x 804
[14:41:30]    + encoder: H.264 (libx264)
[14:41:30]      + preset:  veryslow
[14:41:30]      + options: ref=5:bframes=5
[14:41:30]      + profile: high
[14:41:30]      + level:   4.2
[14:41:30]      + quality: 20.50 (RF)
[14:41:30]      + color profile: 1-1-1
[14:41:30]  * subtitle track 1, English [PGS] (track 0, id 0x1200, Picture) -> Render/Burn-in, Forced Only
[14:41:30]  * audio track 1
[14:41:30]    + decoder: English (DTS-HD MA) (5.1 ch) (track 2, id 0x1100)
[14:41:30]      + samplerate: 48000 Hz
[14:41:30]    + DTS-HD Passthru
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
[14:41:30] sync: expecting 128688 video frames
[14:41:30] encx264: min-keyint: 24, keyint: 240
[14:41:30] encx264: encoding at constant RF 20.500000
[14:41:30] encx264: unparsed options: ref=5:bframes=5:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[14:41:30] sync: first pts video is 0
[14:41:30] sync: "Chapter 1" (1) at frame 1 time 0
[14:41:30] sync: first pts audio 0x1100 is 0
[14:44:05] sync: "Chapter 2" (2) at frame 7826 time 29373093
[14:45:42] sync: "Chapter 3" (3) at frame 12427 time 46644097
[14:48:57] sync: "Chapter 4" (4) at frame 22672 time 85101266
[14:51:45] sync: "Chapter 5" (5) at frame 31068 time 116617751
[14:54:07] sync: "Chapter 6" (6) at frame 37533 time 140885745
[14:56:06] sync: "Chapter 7" (7) at frame 43818 time 164478063
[14:59:19] sync: "Chapter 8" (8) at frame 54097 time 203062860
[15:01:19] sync: "Chapter 9" (9) at frame 60024 time 225311336
[15:03:42] sync: "Chapter 10" (10) at frame 68394 time 256730223
[15:04:57] sync: "Chapter 11" (11) at frame 72186 time 270964443
[15:07:42] sync: "Chapter 12" (12) at frame 79901 time 299924625
[15:09:41] sync: "Chapter 13" (13) at frame 85741 time 321846525
[15:11:07] sync: "Chapter 14" (14) at frame 89386 time 335528943
[15:12:23] sync: "Chapter 15" (15) at frame 93300 time 350221121
[15:13:29] sync: "Chapter 16" (16) at frame 96721 time 363062700
[15:14:41] sync: "Chapter 17" (17) at frame 100600 time 377623496
[15:15:53] sync: "Chapter 18" (18) at frame 104204 time 391152011
[15:17:02] hb_init: starting libhb thread

 # Starting Scan ...

[15:17:02] CPU: AMD Ryzen 9 3950X 16-Core Processor
[15:17:02]  - logical processor count: 32
[15:17:02] Intel Quick Sync Video support: no
[15:17:02] hb_scan: path=F:\BD-DVD_Process_F_HDD\1-BD_Rips\zHB_Benchmarks\LUCY_NA, title_index=35
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
src/libbluray/bdj/bdj.c:133: Error opening registry key SOFTWARE\JavaSoft\Java Runtime Environment\
src/libbluray/bdj/bdj.c:746: BD-J check: Failed to load JVM library
[15:17:02] scan: BD has 40 title(s)
[15:17:02] bd: scanning title 35
[15:17:02] bd: playlist 00800.MPLS
[15:17:02] bd: duration is 01:29:27 (5367362 ms)
[15:17:02] bd: video id=0x1011, stream type=H.264, format 1080p
[15:17:02] bd: aspect = 16:9
[15:17:02] bd: audio id=0x711100, lang=English (DTS), 3cc=eng
[15:17:02] bd: audio id=0x1100, lang=English (DTS-HD MA), 3cc=eng
[15:17:02] bd: audio id=0x1101, lang=español (DTS), 3cc=spa
[15:17:02] bd: audio id=0x1102, lang=Francais (DTS), 3cc=fra
[15:17:02] bd: audio id=0x1103, lang=English (AC3), 3cc=eng
[15:17:02] bd: subtitle id=0x1200, lang=English [PGS], 3cc=eng
[15:17:02] bd: subtitle id=0x1201, lang=español [PGS], 3cc=spa
[15:17:02] bd: subtitle id=0x1202, lang=Francais [PGS], 3cc=fra
[15:17:02] bd: subtitle id=0x1203, lang=español [PGS], 3cc=spa
[15:17:02] bd: subtitle id=0x1204, lang=Francais [PGS], 3cc=fra
[15:17:02] bd: chap 1, 326367 ms
[15:17:02] bd: chap 2, 191900 ms
[15:17:02] bd: chap 3, 427635 ms
[15:17:02] bd: chap 4, 350391 ms
[15:17:02] bd: chap 5, 269102 ms
[15:17:02] bd: chap 6, 262136 ms
[15:17:02] bd: chap 7, 428719 ms
[15:17:02] bd: chap 8, 247205 ms
[15:17:02] bd: chap 9, 349098 ms
[15:17:02] bd: chap 10, 158158 ms
[15:17:02] bd: chap 11, 321779 ms
[15:17:02] bd: chap 12, 243576 ms
[15:17:02] bd: chap 13, 152026 ms
[15:17:02] bd: chap 14, 163246 ms
[15:17:02] bd: chap 15, 142684 ms
[15:17:02] bd: chap 16, 161786 ms
[15:17:02] bd: chap 17, 150316 ms
[15:17:02] bd: chap 18, 384467 ms
[15:17:02] bd: chap 19, 220970 ms
[15:17:02] bd: chap 20, 415540 ms
[15:17:02] bd: chap 21, 250 ms
[15:17:02] bd: title 35 has 21 chapters
[15:17:02] scan: decoding previews for title 35
[15:17:02] scan: title angle(s) 1
[15:17:02] scan: audio 0x711100: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[15:17:02] scan: audio 0x1100: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[15:17:02] scan: audio 0x1101: dca, rate=48000Hz, bitrate=768000 español (DTS) (5.1 ch) (768 kbps)
[15:17:02] scan: audio 0x1102: dca, rate=48000Hz, bitrate=768000 Francais (DTS) (5.1 ch) (768 kbps)
[15:17:02] scan: audio 0x1103: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (Dolby Surround) (192 kbps)
[15:17:04] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1
[15:17:04] scan: supported video decoders: avcodec qsv
[15:17:04] stream: 8 good frames, 0 errors (0%)
[15:17:04] libhb: scan thread found 1 valid title(s)

 # Processing Scan Information ...


 # Scan Finished for Queue Edit ...

[15:19:14] sync: "Chapter 19" (19) at frame 113419 time 425742817
[15:21:04] sync: "Chapter 20" (20) at frame 118705 time 445585140
[15:22:45] bd: End of title
[15:22:45] reader: done. 1 scr changes
[15:22:45] sync: "Chapter 21" (21) at frame 128668 time 482983751
[15:22:46] work: average encoding speed for job is 51.965893 fps
[15:22:47] vfr: 128688 frames output, 0 dropped and 0 duped for CFR/PFR
[15:22:47] vfr: lost time: 0 (0 frames)
[15:22:47] vfr: gained time: 0 (0 frames) (0 not accounted for)
[15:22:47] stream: 128688 good frames, 0 errors (0%)
[15:22:47] dca-decoder done: 503191 frames, 0 decoder errors
[15:22:47] h264-decoder done: 128688 frames, 0 decoder errors
[15:22:47] sync: got 128688 frames, 128688 expected
[15:22:47] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
x264 [info]: frame I:1511  Avg QP:18.06  size:154166
x264 [info]: frame P:30897 Avg QP:21.45  size: 35386
x264 [info]: frame B:96280 Avg QP:24.47  size: 10280
x264 [info]: consecutive B-frames:  3.8%  3.3% 12.9% 16.7% 21.6% 41.7%
x264 [info]: mb I  I16..4: 19.1% 69.2% 11.7%
x264 [info]: mb P  I16..4:  3.8% 13.0%  1.3%  P16..4: 39.2%  9.7%  9.6%  0.2%  0.1%    skip:23.2%
x264 [info]: mb B  I16..4:  0.3%  1.2%  0.1%  B16..8: 35.8%  4.3%  1.0%  direct: 2.9%  skip:54.4%  L0:45.7% L1:48.4% BI: 5.9%
x264 [info]: 8x8 transform intra:72.0% inter:78.8%
x264 [info]: direct mvs  spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 67.1% 72.0% 37.4% inter: 11.6% 12.1% 1.3%
x264 [info]: i16 v,h,dc,p: 25% 20%  6% 49%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11%  9%  6% 10% 14% 13% 14% 11% 12%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 10%  3%  9% 14% 13% 13%  9% 11%
x264 [info]: i8c dc,h,v,p: 34% 25% 20% 21%
x264 [info]: Weighted P-Frames: Y:4.1% UV:2.8%
x264 [info]: ref P L0: 56.1% 12.7% 17.9%  6.8%  5.9%  0.5%  0.0%
x264 [info]: ref B L0: 83.4% 11.3%  4.2%  1.1%
x264 [info]: ref B L1: 95.6%  4.4%
x264 [info]: kb/s:3452.00
[15:22:47] mux: track 0, 128688 frames, 2315956728 bytes, 3451.88 kbps, fifo 512
[15:22:47] mux: track 1, 503191 frames, 2873161340 bytes, 4282.39 kbps, fifo 4096
[15:22:47] Finished work at: Mon Dec 28 15:22:47 2020
[15:22:47] libhb: work result = 0

# Encode Completed ...

 
Deleted User 13735

Re: Faster Encodes with threads=32

Post by Deleted User 13735 »

You are using the x264 encoder, which I would expect to be happy around 6-8 logical processors.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Faster Encodes with threads=32

Post by mduell »

musicvid wrote: Tue Dec 29, 2020 1:35 am You are using the x264 encoder, which I would expect to be happy around 6-8 logical processors.
Diminishing returns doesn't mean no returns, so it continues to scale.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Faster Encodes with threads=32

Post by mduell »

Default threads for a 16c/32t chip would be 48 (1.5x), so constraining it here with medium-resolution content helps a little bit.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

I've seen the 6-8 logical processors (threads) statement in a few places....given the number of CPUs today with 10+ cores (20+ threads), I wonder if the common suggestion should be clearer that significant gains are available utilizing additional threads and noting that the parameter must be used to access them...???

With a 15-minute BluRay file I got:
6 threads = 23:38
8 threads = 18:05
16 threads = 13:02
32 threads = 7:51
With the full movie example the results are:
16 threads = 1:07:50
32 threads = 34:03

I'll be interested in seeing what the full movie 8 thread result is. The 32 thread result was twice as fast as the 16 thread job.

"Diminishing returns" is obviously a relative term and performance isn't proportional to the number of threads used, but it appears that modern CPUs may be able to complete encodes in 1/3 - 1/2 the time of the "happy" platform specification.

I just encoded a new movie with threads set to 32. Over the course of the encode, my PC averaged 78.7% CPU utilization with peaks near 90%.

In months of reading Handbrake "best practices" and performance discussions, it was never apparent this much untapped performance was available!
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

mduell wrote: Tue Dec 29, 2020 2:34 am Default threads for a 16c/32t chip would be 48 (1.5x), so constraining it here with medium-resolution content helps a little bit.
I had seen a reference indicating that 'default', however, it was also stated that HB can't use more threads than the CPU has.

I'm not sure I understand the 'constraining' comment...???

My tests have given performance results: 6 < 8 < 16 < Default < 32

I'm not an expert, just trying to understand the results I'm finding.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

mduell wrote: Tue Dec 29, 2020 2:14 am
musicvid wrote: Tue Dec 29, 2020 1:35 am You are using the x264 encoder, which I would expect to be happy around 6-8 logical processors.
Diminishing returns doesn't mean no returns, so it continues to scale.
This is a quote made to a user with a 12 core/24 thread processor just a couple of weeks ago:

"For example, using x264 as your encoder will limit the number of cores used to less than the 12 you have, because more threads do not help."

I value this (and other) forums as a reliable source of information. I try to contribute to the collective knowledgebase when there appears to be a gap.
Deleted User 13735

Re: Faster Encodes with threads=32

Post by Deleted User 13735 »

Since you have an interest in objectivity, which is a rarity in public forums, and since your results are different than many of us have been led to expect, they would be most helpful if you posted your test procedures and reproducible results, and let others try their hands using the same criteria. I'm sure the developers won't mind you posting them in the Tiki Bar, as some of us have done with other types of tests. Interesting stuff, and I am glad you are sharing quantified evidence, rather than just impressions.
Deleted User 11865

Re: Faster Encodes with threads=32

Post by Deleted User 11865 »

wyliec2 wrote: Tue Dec 29, 2020 3:34 am
mduell wrote: Tue Dec 29, 2020 2:34 am Default threads for a 16c/32t chip would be 48 (1.5x), so constraining it here with medium-resolution content helps a little bit.
I had seen a reference indicating that 'default', however, it was also stated that HB can't use more threads than the CPU has.

I'm not sure I understand the 'constraining' comment...???

My tests have given performance results: 6 < 8 < 16 < Default < 32

I'm not an expert, just trying to understand the results I'm finding.
mduell is correct, automatic thread selection with x264 is 1.5x the number of logical processors (unless you enable slice-based threads, but that's only useful in low-latency real-time encoding scenarios), so 48 in this case, which would give (in your testing):

6 < 8 < 16 < 48 < 32
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Faster Encodes with threads=32

Post by mduell »

wyliec2 wrote: Tue Dec 29, 2020 3:27 am I've seen the 6-8 logical processors (threads) statement in a few places....given the number of CPUs today with 10+ cores (20+ threads), I wonder if the common suggestion should be clearer that significant gains are available utilizing additional threads and noting that the parameter must be used to access them...???

With a 15-minute BluRay file I got:
6 threads = 23:38
8 threads = 18:05
16 threads = 13:02
32 threads = 7:51
With the full movie example the results are:
16 threads = 1:07:50
32 threads = 34:03

I'll be interested in seeing what the full movie 8 thread result is. The 32 thread result was twice as fast as the 16 thread job.

"Diminishing returns" is obviously a relative term and performance isn't proportional to the number of threads used, but it appears that modern CPUs may be able to complete encodes in 1/3 - 1/2 the time of the "happy" platform specification.

I just encoded a new movie with threads set to 32. Over the course of the encode, my PC averaged 78.7% CPU utilization with peaks near 90%.

In months of reading Handbrake "best practices" and performance discussions, it was never apparent this much untapped performance was available!
The statement should read that more than 6-8 threads has diminishing returns. Diminishing meaning each additional thread adds a little less performance than the prior. So doubling the thread count again will not double performance. That does not mean that the additional gains are 0 or near 0; it just means they're not 100% or near 100%.

And that's what you found; each time you doubled the number of threads, you got about 50% better performance. But eventually this will not be true, as you found from 32 to 48 performance goes down a little.
wyliec2 wrote: Tue Dec 29, 2020 3:34 am
mduell wrote: Tue Dec 29, 2020 2:34 am Default threads for a 16c/32t chip would be 48 (1.5x), so constraining it here with medium-resolution content helps a little bit.
I had seen a reference indicating that 'default', however, it was also stated that HB can't use more threads than the CPU has.

I'm not sure I understand the 'constraining' comment...???

My tests have given performance results: 6 < 8 < 16 < Default < 32

I'm not an expert, just trying to understand the results I'm finding.
HB most certainly can and does spawn more software threads than the CPU has hardware threads.

The default is 48 threads for your chip, so by setting it to 32 threads you're constraining the number of threads. As you found, with your combination of source, settings, encoder, and CPU, this can be advantageous.
wyliec2 wrote: Tue Dec 29, 2020 1:34 pm
mduell wrote: Tue Dec 29, 2020 2:14 am
musicvid wrote: Tue Dec 29, 2020 1:35 am You are using the x264 encoder, which I would expect to be happy around 6-8 logical processors.
Diminishing returns doesn't mean no returns, so it continues to scale.
This is a quote made to a user with a 12 core/24 thread processor just a couple of weeks ago:

"For example, using x264 as your encoder will limit the number of cores used to less than the 12 you have, because more threads do not help."

I value this (and other) forums as a reliable source of information. I try to contribute to the collective knowledgebase when there appears to be a gap.
This poster is confused, full of [Censored], or referring to a situation that is not relevant to you.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

mduell wrote: Tue Dec 29, 2020 9:05 pm
wyliec2 wrote: Tue Dec 29, 2020 3:27 am I've seen the 6-8 logical processors (threads) statement in a few places....given the number of CPUs today with 10+ cores (20+ threads), I wonder if the common suggestion should be clearer that significant gains are available utilizing additional threads and noting that the parameter must be used to access them...???

With a 15-minute BluRay file I got:
6 threads = 23:38
8 threads = 18:05
16 threads = 13:02
32 threads = 7:51
With the full movie example the results are:
16 threads = 1:07:50
32 threads = 34:03

I'll be interested in seeing what the full movie 8 thread result is. The 32 thread result was twice as fast as the 16 thread job.
The statement should read that more than 6-8 threads has diminishing returns. Diminishing meaning each additional thread adds a little less performance than the prior. So doubling the thread count again will not double performance. That does not mean that the additional gains are 0 or near 0; it just means they're not 100% or near 100%.

And that's what you found; each time you doubled the number of threads, you got about 50% better performance. But eventually this will not be true, as you found from 32 to 48 performance goes down a little.
Thanks for your detailed reply!

I will note that in the full movie example going from 16 to 32 threads was 100% improvement - I could encode the movie twice in the same length of time using 32 threads. This is for that ONE example only. With limited testing, I've found there to often be a near 100% improvement at some point - sometimes 6 to 12 threads or 8 to 16 threads. Other doublings will produce significantly less and I have examples where 24 threads is sometimes faster than the default and sometimes slower. Other times the difference between 24 and 32 threads is just a few seconds.

I have approximately 2000 movies (encoded from mostly bluray folders to MKV) on a media server. My two priorities are filesize and quality - meaning I take what I can get for encode times and will always look for performance opportunities.

At the suggestion of musicvid, I've played around with the Tears of Steel .mov content on the Benchmarks page. Interestingly, the parameters for benchmarking the 1080p file in H.265 produce EXACTLY the same encode times whether at default or threads=32. When I use my standard settings of H.264 + Very Slow, I get results more similar to the examples here.

I can see where with some setting combinations, it seems there is a 'hard' limit beyond which adding cores (whether it's 32 or 48) does nothing. It appears settings that drive a more intensive compute workload may benefit from a 32-thread specification - I'm still trying to wrap my head around the '6<8<12<16<24<48<32' situation.

Are there scenarios in which assigning more logical tasks than there are actual processors is an advantage??
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: Faster Encodes with threads=32

Post by mduell »

I'm a bit skeptical of your full movie results, especially with only 16 cores; may be influenced by other things you were doing on your computer at the time.

Again, the exact result is going to depend on a lot of factors: turn the wrong (or right) filter on, and suddenly there will be no difference from 4 to 40 threads; encode some lower resolution content and it may have very small differences from 10 to 30 threads; etc.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

Sorry - I'm back with more results....

And I'll be blunt - you skepticism is an incorrect speculation. I've spent a lifetime in a variety of technical endeavors which have all demanded meticulous methodology - I wouldn't waste my time compiling half-baked data or your time discussing it. The PC platform is a dedicated encoding machine (long story) with NOTHING else running on it aside from a couple of monitoring processes which track CPU utilization, core voltage, CPU and CPU package temps, CPU package power....total < 2% CPU utilization. I purpose-built it with selected components as I have several other PCs and servers.

Specifics of my testing are:
Source - tears_of_steel_1080p.mov; 12:14 duration; 570,092 KB
All filters OFF
H.264(x264)
Constant Framerate - Same as Source
Constant Quality - RF = 20.5
Preset = VerySlow
Tune=None
Profile=High
Level=4.2
Optional Params= ref=5:bframes=5(:threads=xx)
Audio=mp3 2ch set to auto passthru

Results of testing:
1) 5:26 - no parameters 'default'
2) 4:36 - threads=32
3) 8:55 - threads=16 (again, with these settings, 32 threads yields near 100% improvement)
4) 4:04 - threads=48 (I had expected this to match the no parameters default so this was a surprise!)
5) 5:29 - threads=24 (just to complete the series)
6) 4:10 - threads=40 (the threads=48 result had intrigued me)
7) 5:23 - no parameters 'default' (close enough to validate the first result)
8) 3:54 - threads=60 (just for the sake of experimentation)

Again, these are with the specific file and settings specified. They are definitive results with the only variable being the thread parameter value or simply the lack of the thread parameter.

With these settings - the default does not seem to be 48 threads.

I'm still not clear on how assigning HB thread counts beyond actual logical processors is beneficial - it does continue to produce reductions in encode times.

I read one claim (possibly on REDDIT) that too many threads can get out of sync and cause audio problems - any input regarding that suggestion?

Being largely retired aside from some P/T analytics work, I enjoy a respectful and articulate dialogue on perplexing technical matters....FWIW.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

I should have qualified the specifics of my platform:

AMD 3950X 16 core/32 thread CPU
ASUS ROG Crosshair VIII Formula motherboard
32 GB G.Skill 3600/CL16 RAM (2x16)
Gigabyte 1050 TI GPU - CPU doesn't have IGPU so minimal GPU required for display

I do have a moderate all-core overclock to 4225. I could expound greatly how poorly Precision Boost Overdrive works for productivity applications - of course it's targeted for gamers which I don't do. 4225 gives me stable operation under 70 degrees C which I prefer since at times I have run dual HB instances for several days straight at >90% CPU utilization.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

Rodeo wrote: Tue Dec 29, 2020 4:12 pm
wyliec2 wrote: Tue Dec 29, 2020 3:34 am
mduell wrote: Tue Dec 29, 2020 2:34 am Default threads for a 16c/32t chip would be 48 (1.5x), so constraining it here with medium-resolution content helps a little bit.
I had seen a reference indicating that 'default', however, it was also stated that HB can't use more threads than the CPU has.

I'm not sure I understand the 'constraining' comment...???

My tests have given performance results: 6 < 8 < 16 < Default < 32

I'm not an expert, just trying to understand the results I'm finding.
mduell is correct, automatic thread selection with x264 is 1.5x the number of logical processors (unless you enable slice-based threads, but that's only useful in low-latency real-time encoding scenarios), so 48 in this case, which would give (in your testing):

6 < 8 < 16 < 48 < 32
Wondering if you had seen the later results in which the default (no thread parameter) produced clearly different results than a threads=48 setting? All on a dedicated machine with nothin else running and with identical settings aside from the threads parameter....
rollin_eng
Veteran User
Posts: 4854
Joined: Wed May 04, 2011 11:06 pm

Re: Faster Encodes with threads=32

Post by rollin_eng »

Can you post your logs please.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Faster Encodes with threads=32

Post by wyliec2 »

rollin_eng wrote: Thu Dec 31, 2020 11:32 am Can you post your logs please.
Threads=16 Encode time=8:55*****************************************************************

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[06:08:38] base preset: Standard-HQ-sscf (Modified)
[18:08:38] hb_init: starting libhb thread
[18:08:38] Starting work at: Tue Dec 29 18:08:38 2020
[18:08:38] 1 job(s) to process
[18:08:38] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\tears_of_steel_1080_HQ_thr16.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "M:\\000_RIPS\\Downloads\\tears_of_steel_1080p.mov"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5:threads=16",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[18:08:38] CPU: AMD Ryzen 9 3950X 16-Core Processor
[18:08:38]  - logical processor count: 32
[18:08:38] Intel Quick Sync Video support: no
[18:08:38] hb_scan: path=M:\000_RIPS\Downloads\tears_of_steel_1080p.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
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(M:\000_RIPS\Downloads\tears_of_steel_1080p.mov\) failed
[18:08:38] 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
[18:08:38] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'M:\000_RIPS\Downloads\tears_of_steel_1080p.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf53.32.100
  Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[18:08:38] scan: decoding previews for title 1
[18:08:38] scan: audio 0x1: mp3float, rate=44100Hz, bitrate=191999 English (MP3) (2.0 ch) (191 kbps)
[18:08:38] scan: 10 previews, 1920x800, 24.000 fps, autocrop = 0/0/0/0, aspect 2.40:1, PAR 1:1
[18:08:38] scan: supported video decoders: avcodec qsv
[18:08:38] libhb: scan thread found 1 valid title(s)
[18:08:38] Skipping subtitle scan.  No suitable subtitle tracks.
[18:08:38] Starting Task: Encoding Pass
[18:08:38] Skipping crop/scale filter
[18:08:38] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[18:08:38] Auto Passthru: fallback is AC3
[18:08:38] Auto Passthru: using MP3 Passthru for track 1
[18:08:38] work: only 1 chapter, disabling chapter markers
[18:08:38] job configuration:
[18:08:38]  * source
[18:08:38]    + M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
[18:08:38]    + title 1, chapter(s) 1 to 1
[18:08:38]    + container: mov,mp4,m4a,3gp,3g2,mj2
[18:08:38]    + data rate: 6361 kbps
[18:08:38]  * destination
[18:08:38]    + M:\001_OUTPUT_to_VERIFY\tears_of_steel_1080_HQ_thr16.mkv
[18:08:38]    + container: Matroska (libavformat)
[18:08:38]  * video track
[18:08:38]    + decoder: h264
[18:08:38]      + bitrate 6162 kbps
[18:08:38]    + filter
[18:08:38]      + Framerate Shaper (mode=1)
[18:08:38]        + frame rate: 24.000 fps -> constant 24.000 fps
[18:08:38]    + Output geometry
[18:08:38]      + storage dimensions: 1920 x 800
[18:08:38]      + pixel aspect ratio: 1 : 1
[18:08:38]      + display dimensions: 1920 x 800
[18:08:38]    + encoder: H.264 (libx264)
[18:08:38]      + preset:  veryslow
[18:08:38]      + options: ref=5:bframes=5:threads=16
[18:08:38]      + profile: high
[18:08:38]      + level:   4.2
[18:08:38]      + quality: 20.50 (RF)
[18:08:38]      + color profile: 1-1-1
[18:08:38]  * audio track 1
[18:08:38]    + decoder: English (MP3) (2.0 ch) (191 kbps) (track 1, id 0x1)
[18:08:38]      + bitrate: 191 kbps, samplerate: 44100 Hz
[18:08:38]    + MP3 Passthru
[18:08:38] sync: expecting 17620 video frames
[18:08:38] encx264: min-keyint: 24, keyint: 240
[18:08:38] encx264: encoding at constant RF 20.500000
[18:08:38] encx264: unparsed options: ref=5:bframes=5:threads=16:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[18:08:38] sync: first pts video is 0
[18:08:38] sync: "Chapter 1" (1) at frame 1 time 0
[18:08:38] sync: first pts audio 0x1 is 0
[18:17:31] reader: done. 1 scr changes
[18:17:33] work: average encoding speed for job is 32.952320 fps
[18:17:33] vfr: 17620 frames output, 0 dropped and 0 duped for CFR/PFR
[18:17:33] vfr: lost time: 0 (0 frames)
[18:17:33] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:17:33] mp3float-decoder done: 28102 frames, 0 decoder errors
[18:17:33] h264-decoder done: 17620 frames, 0 decoder errors
[18:17:33] sync: got 17620 frames, 17620 expected
[18:17:33] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:154   Avg QP:17.77  size:135587
x264 [info]: frame P:5080  Avg QP:21.57  size: 50906
x264 [info]: frame B:12386 Avg QP:25.41  size: 10880
x264 [info]: consecutive B-frames:  5.0%  7.7% 10.8% 49.5% 11.3% 15.8%
x264 [info]: mb I  I16..4: 20.2% 34.6% 45.2%
x264 [info]: mb P  I16..4:  6.0% 12.0%  4.6%  P16..4: 40.0% 12.1%  7.8%  0.7%  0.2%    skip:16.6%
x264 [info]: mb B  I16..4:  1.0%  1.1%  0.6%  B16..8: 35.2%  5.9%  1.2%  direct: 2.9%  skip:52.2%  L0:46.1% L1:44.3% BI: 9.6%
x264 [info]: 8x8 transform intra:49.3% inter:46.2%
x264 [info]: direct mvs  spatial:99.7% temporal:0.3%
x264 [info]: coded y,uvDC,uvAC intra: 56.5% 62.2% 26.9% inter: 12.1% 12.4% 2.0%
x264 [info]: i16 v,h,dc,p: 26% 22% 17% 36%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 15% 17%  6%  7%  9%  9%  8% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13%  9%  7% 11% 11% 11%  9% 12%
x264 [info]: i8c dc,h,v,p: 44% 24% 21% 11%
x264 [info]: Weighted P-Frames: Y:4.1% UV:2.0%
x264 [info]: ref P L0: 61.3% 17.1% 13.2%  4.4%  3.7%  0.3%  0.0%
x264 [info]: ref B L0: 87.0% 10.5%  2.0%  0.5%
x264 [info]: ref B L1: 96.4%  3.6%
x264 [info]: kb/s:4513.90
[18:17:33] mux: track 0, 17620 frames, 414238554 bytes, 4513.58 kbps, fifo 1024
[18:17:33] mux: track 1, 28102 frames, 17618233 bytes, 191.97 kbps, fifo 2048
[18:17:33] Finished work at: Tue Dec 29 18:17:33 2020
[18:17:33] libhb: work result = 0

# Encode Completed ...

No Thread parameter Encode Time = 5:24***************************************************

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[08:41:39] base preset: Standard-HQ-sscf
[20:41:39] hb_init: starting libhb thread
[20:41:39] Starting work at: Tue Dec 29 20:41:39 2020
[20:41:39] 1 job(s) to process
[20:41:39] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\tears_of_steel_1080_HQ_None.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "M:\\000_RIPS\\Downloads\\tears_of_steel_1080p.mov"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[20:41:39] CPU: AMD Ryzen 9 3950X 16-Core Processor
[20:41:39]  - logical processor count: 32
[20:41:39] Intel Quick Sync Video support: no
[20:41:39] hb_scan: path=M:\000_RIPS\Downloads\tears_of_steel_1080p.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
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(M:\000_RIPS\Downloads\tears_of_steel_1080p.mov\) failed
[20:41:39] 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
[20:41:39] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'M:\000_RIPS\Downloads\tears_of_steel_1080p.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf53.32.100
  Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[20:41:39] scan: decoding previews for title 1
[20:41:39] scan: audio 0x1: mp3float, rate=44100Hz, bitrate=191999 English (MP3) (2.0 ch) (191 kbps)
[20:41:40] scan: 10 previews, 1920x800, 24.000 fps, autocrop = 0/0/0/0, aspect 2.40:1, PAR 1:1
[20:41:40] scan: supported video decoders: avcodec qsv
[20:41:40] libhb: scan thread found 1 valid title(s)
[20:41:40] Skipping subtitle scan.  No suitable subtitle tracks.
[20:41:40] Starting Task: Encoding Pass
[20:41:40] Skipping crop/scale filter
[20:41:40] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[20:41:40] Auto Passthru: fallback is AC3
[20:41:40] Auto Passthru: using MP3 Passthru for track 1
[20:41:40] work: only 1 chapter, disabling chapter markers
[20:41:40] job configuration:
[20:41:40]  * source
[20:41:40]    + M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
[20:41:40]    + title 1, chapter(s) 1 to 1
[20:41:40]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:41:40]    + data rate: 6361 kbps
[20:41:40]  * destination
[20:41:40]    + M:\001_OUTPUT_to_VERIFY\tears_of_steel_1080_HQ_None.mkv
[20:41:40]    + container: Matroska (libavformat)
[20:41:40]  * video track
[20:41:40]    + decoder: h264
[20:41:40]      + bitrate 6162 kbps
[20:41:40]    + filter
[20:41:40]      + Framerate Shaper (mode=1)
[20:41:40]        + frame rate: 24.000 fps -> constant 24.000 fps
[20:41:40]    + Output geometry
[20:41:40]      + storage dimensions: 1920 x 800
[20:41:40]      + pixel aspect ratio: 1 : 1
[20:41:40]      + display dimensions: 1920 x 800
[20:41:40]    + encoder: H.264 (libx264)
[20:41:40]      + preset:  veryslow
[20:41:40]      + options: ref=5:bframes=5
[20:41:40]      + profile: high
[20:41:40]      + level:   4.2
[20:41:40]      + quality: 20.50 (RF)
[20:41:40]      + color profile: 1-1-1
[20:41:40]  * audio track 1
[20:41:40]    + decoder: English (MP3) (2.0 ch) (191 kbps) (track 1, id 0x1)
[20:41:40]      + bitrate: 191 kbps, samplerate: 44100 Hz
[20:41:40]    + MP3 Passthru
[20:41:40] sync: expecting 17620 video frames
[20:41:40] encx264: min-keyint: 24, keyint: 240
[20:41:40] encx264: encoding at constant RF 20.500000
[20:41:40] encx264: unparsed options: ref=5:bframes=5:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[20:41:40] sync: first pts video is 0
[20:41:40] sync: "Chapter 1" (1) at frame 1 time 0
[20:41:40] sync: first pts audio 0x1 is 0
[20:47:01] reader: done. 1 scr changes
[20:47:03] work: average encoding speed for job is 54.540257 fps
[20:47:03] vfr: 17620 frames output, 0 dropped and 0 duped for CFR/PFR
[20:47:03] vfr: lost time: 0 (0 frames)
[20:47:03] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:47:03] mp3float-decoder done: 28102 frames, 0 decoder errors
[20:47:03] h264-decoder done: 17620 frames, 0 decoder errors
[20:47:03] sync: got 17620 frames, 17620 expected
[20:47:03] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:153   Avg QP:17.73  size:133796
x264 [info]: frame P:5280  Avg QP:21.67  size: 48563
x264 [info]: frame B:12187 Avg QP:25.40  size: 10744
x264 [info]: consecutive B-frames:  5.5%  9.7% 11.9% 48.8%  9.0% 15.1%
x264 [info]: mb I  I16..4: 20.8% 34.6% 44.6%
x264 [info]: mb P  I16..4:  5.9% 11.7%  4.4%  P16..4: 40.3% 12.0%  7.7%  0.6%  0.2%    skip:17.2%
x264 [info]: mb B  I16..4:  1.0%  1.1%  0.6%  B16..8: 35.1%  5.8%  1.1%  direct: 2.8%  skip:52.5%  L0:46.0% L1:44.6% BI: 9.4%
x264 [info]: 8x8 transform intra:49.2% inter:46.0%
x264 [info]: direct mvs  spatial:99.5% temporal:0.5%
x264 [info]: coded y,uvDC,uvAC intra: 56.4% 62.1% 26.7% inter: 12.2% 12.3% 2.0%
x264 [info]: i16 v,h,dc,p: 26% 22% 17% 35%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 15% 17%  6%  7%  9%  9%  8% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13%  9%  7% 11% 11% 11%  9% 12%
x264 [info]: i8c dc,h,v,p: 44% 24% 21% 11%
x264 [info]: Weighted P-Frames: Y:3.9% UV:2.0%
x264 [info]: ref P L0: 62.3% 17.1% 12.9%  4.1%  3.4%  0.3%  0.0%
x264 [info]: ref B L0: 86.2% 11.2%  2.1%  0.5%
x264 [info]: ref B L1: 96.4%  3.6%
x264 [info]: kb/s:4443.89
[20:47:03] mux: track 0, 17620 frames, 407813731 bytes, 4443.58 kbps, fifo 1024
[20:47:03] mux: track 1, 28102 frames, 17618233 bytes, 191.97 kbps, fifo 2048
[20:47:03] Finished work at: Tue Dec 29 20:47:03 2020
[20:47:03] libhb: work result = 0

# Encode Completed ...

Threads = 32 Encode Time = 4:37***********************************************************

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[06:04:01] base preset: Standard-HQ-sscf (Modified)
[18:04:01] hb_init: starting libhb thread
[18:04:01] Starting work at: Tue Dec 29 18:04:01 2020
[18:04:01] 1 job(s) to process
[18:04:01] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\tears_of_steel_1080_HQ_thr32.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "M:\\000_RIPS\\Downloads\\tears_of_steel_1080p.mov"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5:threads=32",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[18:04:01] CPU: AMD Ryzen 9 3950X 16-Core Processor
[18:04:01]  - logical processor count: 32
[18:04:01] Intel Quick Sync Video support: no
[18:04:01] hb_scan: path=M:\000_RIPS\Downloads\tears_of_steel_1080p.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
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(M:\000_RIPS\Downloads\tears_of_steel_1080p.mov\) failed
[18:04:01] 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
[18:04:01] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'M:\000_RIPS\Downloads\tears_of_steel_1080p.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf53.32.100
  Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[18:04:01] scan: decoding previews for title 1
[18:04:01] scan: audio 0x1: mp3float, rate=44100Hz, bitrate=191999 English (MP3) (2.0 ch) (191 kbps)
[18:04:02] scan: 10 previews, 1920x800, 24.000 fps, autocrop = 0/0/0/0, aspect 2.40:1, PAR 1:1
[18:04:02] scan: supported video decoders: avcodec qsv
[18:04:02] libhb: scan thread found 1 valid title(s)
[18:04:02] Skipping subtitle scan.  No suitable subtitle tracks.
[18:04:02] Starting Task: Encoding Pass
[18:04:02] Skipping crop/scale filter
[18:04:02] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[18:04:02] Auto Passthru: fallback is AC3
[18:04:02] Auto Passthru: using MP3 Passthru for track 1
[18:04:02] work: only 1 chapter, disabling chapter markers
[18:04:02] job configuration:
[18:04:02]  * source
[18:04:02]    + M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
[18:04:02]    + title 1, chapter(s) 1 to 1
[18:04:02]    + container: mov,mp4,m4a,3gp,3g2,mj2
[18:04:02]    + data rate: 6361 kbps
[18:04:02]  * destination
[18:04:02]    + M:\001_OUTPUT_to_VERIFY\tears_of_steel_1080_HQ_thr32.mkv
[18:04:02]    + container: Matroska (libavformat)
[18:04:02]  * video track
[18:04:02]    + decoder: h264
[18:04:02]      + bitrate 6162 kbps
[18:04:02]    + filter
[18:04:02]      + Framerate Shaper (mode=1)
[18:04:02]        + frame rate: 24.000 fps -> constant 24.000 fps
[18:04:02]    + Output geometry
[18:04:02]      + storage dimensions: 1920 x 800
[18:04:02]      + pixel aspect ratio: 1 : 1
[18:04:02]      + display dimensions: 1920 x 800
[18:04:02]    + encoder: H.264 (libx264)
[18:04:02]      + preset:  veryslow
[18:04:02]      + options: ref=5:bframes=5:threads=32
[18:04:02]      + profile: high
[18:04:02]      + level:   4.2
[18:04:02]      + quality: 20.50 (RF)
[18:04:02]      + color profile: 1-1-1
[18:04:02]  * audio track 1
[18:04:02]    + decoder: English (MP3) (2.0 ch) (191 kbps) (track 1, id 0x1)
[18:04:02]      + bitrate: 191 kbps, samplerate: 44100 Hz
[18:04:02]    + MP3 Passthru
[18:04:02] sync: expecting 17620 video frames
[18:04:02] encx264: min-keyint: 24, keyint: 240
[18:04:02] encx264: encoding at constant RF 20.500000
[18:04:02] encx264: unparsed options: ref=5:bframes=5:threads=32:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[18:04:02] sync: first pts video is 0
[18:04:02] sync: "Chapter 1" (1) at frame 1 time 0
[18:04:02] sync: first pts audio 0x1 is 0
[18:08:36] reader: done. 1 scr changes
[18:08:37] work: average encoding speed for job is 64.041817 fps
[18:08:37] vfr: 17620 frames output, 0 dropped and 0 duped for CFR/PFR
[18:08:37] vfr: lost time: 0 (0 frames)
[18:08:37] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:08:37] mp3float-decoder done: 28102 frames, 0 decoder errors
[18:08:37] h264-decoder done: 17620 frames, 0 decoder errors
[18:08:37] sync: got 17620 frames, 17620 expected
[18:08:37] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:152   Avg QP:17.74  size:134133
x264 [info]: frame P:5473  Avg QP:21.77  size: 46536
x264 [info]: frame B:11995 Avg QP:25.39  size: 10603
x264 [info]: consecutive B-frames:  6.1% 11.8% 12.0% 47.9%  7.8% 14.4%
x264 [info]: mb I  I16..4: 20.6% 34.7% 44.7%
x264 [info]: mb P  I16..4:  5.8% 11.5%  4.3%  P16..4: 40.6% 11.9%  7.6%  0.5%  0.2%    skip:17.7%
x264 [info]: mb B  I16..4:  0.9%  1.0%  0.5%  B16..8: 35.1%  5.8%  1.1%  direct: 2.8%  skip:52.7%  L0:45.9% L1:44.8% BI: 9.3%
x264 [info]: 8x8 transform intra:49.2% inter:45.9%
x264 [info]: direct mvs  spatial:99.3% temporal:0.7%
x264 [info]: coded y,uvDC,uvAC intra: 56.3% 62.0% 26.6% inter: 12.2% 12.3% 2.0%
x264 [info]: i16 v,h,dc,p: 26% 22% 17% 35%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 15% 17%  6%  7%  9%  9%  8% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13%  9%  7% 11% 11% 11%  9% 12%
x264 [info]: i8c dc,h,v,p: 44% 24% 21% 11%
x264 [info]: Weighted P-Frames: Y:3.8% UV:1.8%
x264 [info]: ref P L0: 63.0% 17.0% 12.7%  3.9%  3.1%  0.2%  0.0%
x264 [info]: ref B L0: 85.7% 11.7%  2.2%  0.5%
x264 [info]: ref B L1: 96.5%  3.5%
x264 [info]: kb/s:4383.39
[18:08:37] mux: track 0, 17620 frames, 402261720 bytes, 4383.08 kbps, fifo 1024
[18:08:37] mux: track 1, 28102 frames, 17618233 bytes, 191.97 kbps, fifo 2048
[18:08:38] Finished work at: Tue Dec 29 18:08:38 2020
[18:08:38] libhb: work result = 0

# Encode Completed ...

Threads = 48 Encode Time = 4:04***********************************************************

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[08:27:55] base preset: Standard-HQ-sscf (Modified)
[20:27:55] hb_init: starting libhb thread
[20:27:55] Starting work at: Tue Dec 29 20:27:55 2020
[20:27:55] 1 job(s) to process
[20:27:55] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\tears_of_steel_1080_HQ_thr48.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "M:\\000_RIPS\\Downloads\\tears_of_steel_1080p.mov"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5:threads=48",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[20:27:55] CPU: AMD Ryzen 9 3950X 16-Core Processor
[20:27:55]  - logical processor count: 32
[20:27:55] Intel Quick Sync Video support: no
[20:27:55] hb_scan: path=M:\000_RIPS\Downloads\tears_of_steel_1080p.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
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(M:\000_RIPS\Downloads\tears_of_steel_1080p.mov\) failed
[20:27:55] 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
[20:27:55] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'M:\000_RIPS\Downloads\tears_of_steel_1080p.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf53.32.100
  Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[20:27:55] scan: decoding previews for title 1
[20:27:55] scan: audio 0x1: mp3float, rate=44100Hz, bitrate=191999 English (MP3) (2.0 ch) (191 kbps)
[20:27:55] scan: 10 previews, 1920x800, 24.000 fps, autocrop = 0/0/0/0, aspect 2.40:1, PAR 1:1
[20:27:55] scan: supported video decoders: avcodec qsv
[20:27:55] libhb: scan thread found 1 valid title(s)
[20:27:55] Skipping subtitle scan.  No suitable subtitle tracks.
[20:27:55] Starting Task: Encoding Pass
[20:27:55] Skipping crop/scale filter
[20:27:55] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[20:27:55] Auto Passthru: fallback is AC3
[20:27:55] Auto Passthru: using MP3 Passthru for track 1
[20:27:55] work: only 1 chapter, disabling chapter markers
[20:27:55] job configuration:
[20:27:55]  * source
[20:27:55]    + M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
[20:27:55]    + title 1, chapter(s) 1 to 1
[20:27:55]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:27:55]    + data rate: 6361 kbps
[20:27:55]  * destination
[20:27:55]    + M:\001_OUTPUT_to_VERIFY\tears_of_steel_1080_HQ_thr48.mkv
[20:27:55]    + container: Matroska (libavformat)
[20:27:55]  * video track
[20:27:55]    + decoder: h264
[20:27:55]      + bitrate 6162 kbps
[20:27:55]    + filter
[20:27:55]      + Framerate Shaper (mode=1)
[20:27:55]        + frame rate: 24.000 fps -> constant 24.000 fps
[20:27:55]    + Output geometry
[20:27:55]      + storage dimensions: 1920 x 800
[20:27:55]      + pixel aspect ratio: 1 : 1
[20:27:55]      + display dimensions: 1920 x 800
[20:27:55]    + encoder: H.264 (libx264)
[20:27:55]      + preset:  veryslow
[20:27:55]      + options: ref=5:bframes=5:threads=48
[20:27:55]      + profile: high
[20:27:55]      + level:   4.2
[20:27:55]      + quality: 20.50 (RF)
[20:27:55]      + color profile: 1-1-1
[20:27:55]  * audio track 1
[20:27:55]    + decoder: English (MP3) (2.0 ch) (191 kbps) (track 1, id 0x1)
[20:27:55]      + bitrate: 191 kbps, samplerate: 44100 Hz
[20:27:55]    + MP3 Passthru
[20:27:55] sync: expecting 17620 video frames
[20:27:55] encx264: min-keyint: 24, keyint: 240
[20:27:55] encx264: encoding at constant RF 20.500000
[20:27:55] encx264: unparsed options: ref=5:bframes=5:threads=48:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[20:27:55] sync: first pts video is 0
[20:27:55] sync: "Chapter 1" (1) at frame 1 time 0
[20:27:55] sync: first pts audio 0x1 is 0
[20:31:58] reader: done. 1 scr changes
[20:31:59] work: average encoding speed for job is 72.448364 fps
[20:31:59] vfr: 17620 frames output, 0 dropped and 0 duped for CFR/PFR
[20:31:59] vfr: lost time: 0 (0 frames)
[20:31:59] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:31:59] mp3float-decoder done: 28102 frames, 0 decoder errors
[20:31:59] h264-decoder done: 17620 frames, 0 decoder errors
[20:31:59] sync: got 17620 frames, 17620 expected
[20:31:59] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:151   Avg QP:17.77  size:134088
x264 [info]: frame P:5738  Avg QP:21.91  size: 44187
x264 [info]: frame B:11731 Avg QP:25.37  size: 10507
x264 [info]: consecutive B-frames:  6.9% 14.9% 11.8% 46.4%  6.4% 13.7%
x264 [info]: mb I  I16..4: 20.6% 34.9% 44.6%
x264 [info]: mb P  I16..4:  5.7% 10.9%  4.0%  P16..4: 40.9% 11.8%  7.5%  0.4%  0.2%    skip:18.5%
x264 [info]: mb B  I16..4:  0.9%  1.0%  0.5%  B16..8: 35.1%  5.7%  1.1%  direct: 2.7%  skip:53.0%  L0:45.7% L1:45.2% BI: 9.1%
x264 [info]: 8x8 transform intra:49.2% inter:45.6%
x264 [info]: direct mvs  spatial:98.7% temporal:1.3%
x264 [info]: coded y,uvDC,uvAC intra: 56.0% 61.8% 26.3% inter: 12.3% 12.3% 2.0%
x264 [info]: i16 v,h,dc,p: 26% 22% 17% 35%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 19% 15% 17%  6%  7%  9%  9%  8% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13%  9%  7% 11% 11% 12%  9% 12%
x264 [info]: i8c dc,h,v,p: 44% 24% 21% 11%
x264 [info]: Weighted P-Frames: Y:3.7% UV:1.8%
x264 [info]: ref P L0: 63.6% 16.9% 12.7%  3.7%  2.8%  0.2%  0.0%
x264 [info]: ref B L0: 85.5% 11.8%  2.3%  0.5%
x264 [info]: ref B L1: 96.5%  3.5%
x264 [info]: kb/s:4326.51
[20:31:59] mux: track 0, 17620 frames, 397041015 bytes, 4326.19 kbps, fifo 1024
[20:31:59] mux: track 1, 28102 frames, 17618233 bytes, 191.97 kbps, fifo 2048
[20:31:59] Finished work at: Tue Dec 29 20:31:59 2020
[20:31:59] libhb: work result = 0

# Encode Completed ...

Threads = 60 Encode Time = 3:55**********************************************************

Code: Select all

HandBrake 1.3.3 (2020061300)
OS: Microsoft Windows NT 10.0.19041.0
CPU: AMD Ryzen 9 3950X 16-Core Processor            
Ram: 32682 MB, 
GPU Information:
  Microsoft Remote Display Adapter - 10.0.19041.662
  NVIDIA GeForce GTX 1050 Ti - 26.21.14.3200
Screen: 3840x2160
Temp Dir: C:\Users\wylie\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake
Data Dir: C:\Users\wylie\AppData\Roaming\HandBrake

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


# Starting Encode ...

[08:47:03] base preset: Standard-HQ-sscf (Modified)
[20:47:03] hb_init: starting libhb thread
[20:47:03] Starting work at: Tue Dec 29 20:47:03 2020
[20:47:03] 1 job(s) to process
[20:47:03] json job:
{
  "Audio": {
    "AudioList": [
      {
        "DRC": 0.0,
        "Encoder": "copy",
        "Gain": 0.0,
        "Mixdown": -1,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "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"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "M:\\001_OUTPUT_to_VERIFY\\tears_of_steel_1080_HQ_thr60.mkv",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 12,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "800",
          "width": "1920"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "M:\\000_RIPS\\Downloads\\tears_of_steel_1080p.mov"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x264",
    "Level": "4.2",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "ref=5:bframes=5:threads=60",
    "Preset": "veryslow",
    "Profile": "high",
    "Quality": 20.5,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[20:47:03] CPU: AMD Ryzen 9 3950X 16-Core Processor
[20:47:03]  - logical processor count: 32
[20:47:03] Intel Quick Sync Video support: no
[20:47:03] hb_scan: path=M:\000_RIPS\Downloads\tears_of_steel_1080p.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:323: failed opening UDF image M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
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(M:\000_RIPS\Downloads\tears_of_steel_1080p.mov\) failed
[20:47:03] 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
[20:47:03] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'M:\000_RIPS\Downloads\tears_of_steel_1080p.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf53.32.100
  Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : libx264
    Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[20:47:03] scan: decoding previews for title 1
[20:47:03] scan: audio 0x1: mp3float, rate=44100Hz, bitrate=191999 English (MP3) (2.0 ch) (191 kbps)
[20:47:04] scan: 10 previews, 1920x800, 24.000 fps, autocrop = 0/0/0/0, aspect 2.40:1, PAR 1:1
[20:47:04] scan: supported video decoders: avcodec qsv
[20:47:04] libhb: scan thread found 1 valid title(s)
[20:47:04] Skipping subtitle scan.  No suitable subtitle tracks.
[20:47:04] Starting Task: Encoding Pass
[20:47:04] Skipping crop/scale filter
[20:47:04] Auto Passthru: allowed codecs are AAC, AC3, E-AC3, TrueHD, DTS, DTS-HD, MP3, FLAC
[20:47:04] Auto Passthru: fallback is AC3
[20:47:04] Auto Passthru: using MP3 Passthru for track 1
[20:47:04] work: only 1 chapter, disabling chapter markers
[20:47:04] job configuration:
[20:47:04]  * source
[20:47:04]    + M:\000_RIPS\Downloads\tears_of_steel_1080p.mov
[20:47:04]    + title 1, chapter(s) 1 to 1
[20:47:04]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:47:04]    + data rate: 6361 kbps
[20:47:04]  * destination
[20:47:04]    + M:\001_OUTPUT_to_VERIFY\tears_of_steel_1080_HQ_thr60.mkv
[20:47:04]    + container: Matroska (libavformat)
[20:47:04]  * video track
[20:47:04]    + decoder: h264
[20:47:04]      + bitrate 6162 kbps
[20:47:04]    + filter
[20:47:04]      + Framerate Shaper (mode=1)
[20:47:04]        + frame rate: 24.000 fps -> constant 24.000 fps
[20:47:04]    + Output geometry
[20:47:04]      + storage dimensions: 1920 x 800
[20:47:04]      + pixel aspect ratio: 1 : 1
[20:47:04]      + display dimensions: 1920 x 800
[20:47:04]    + encoder: H.264 (libx264)
[20:47:04]      + preset:  veryslow
[20:47:04]      + options: ref=5:bframes=5:threads=60
[20:47:04]      + profile: high
[20:47:04]      + level:   4.2
[20:47:04]      + quality: 20.50 (RF)
[20:47:04]      + color profile: 1-1-1
[20:47:04]  * audio track 1
[20:47:04]    + decoder: English (MP3) (2.0 ch) (191 kbps) (track 1, id 0x1)
[20:47:04]      + bitrate: 191 kbps, samplerate: 44100 Hz
[20:47:04]    + MP3 Passthru
[20:47:04] sync: expecting 17620 video frames
[20:47:04] encx264: min-keyint: 24, keyint: 240
[20:47:04] encx264: encoding at constant RF 20.500000
[20:47:04] encx264: unparsed options: ref=5:bframes=5:threads=60:level=4.2:b-adapt=2:direct=auto:analyse=all:me=umh:merange=24:subme=10:trellis=2:vbv-bufsize=78125:vbv-maxrate=62500:rc-lookahead=60
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High, level 4.2, 4:2:0, 8-bit
[20:47:04] sync: first pts video is 0
[20:47:04] sync: "Chapter 1" (1) at frame 1 time 0
[20:47:04] sync: first pts audio 0x1 is 0
[20:50:56] reader: done. 1 scr changes
[20:50:57] work: average encoding speed for job is 75.633011 fps
[20:50:57] vfr: 17620 frames output, 0 dropped and 0 duped for CFR/PFR
[20:50:57] vfr: lost time: 0 (0 frames)
[20:50:57] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:50:58] mp3float-decoder done: 28102 frames, 0 decoder errors
[20:50:58] h264-decoder done: 17620 frames, 0 decoder errors
[20:50:58] sync: got 17620 frames, 17620 expected
[20:50:58] sync: framerate min 24.000 fps, max 24.000 fps, avg 24.000 fps
x264 [info]: frame I:152   Avg QP:17.77  size:133570
x264 [info]: frame P:5846  Avg QP:21.98  size: 43364
x264 [info]: frame B:11622 Avg QP:25.38  size: 10425
x264 [info]: consecutive B-frames:  7.5% 15.5% 11.9% 45.3%  6.4% 13.4%
x264 [info]: mb I  I16..4: 20.7% 34.8% 44.5%
x264 [info]: mb P  I16..4:  5.6% 10.8%  3.9%  P16..4: 41.1% 11.9%  7.5%  0.4%  0.1%    skip:18.7%
x264 [info]: mb B  I16..4:  0.9%  1.0%  0.5%  B16..8: 35.0%  5.6%  1.0%  direct: 2.6%  skip:53.1%  L0:45.6% L1:45.3% BI: 9.0%
x264 [info]: 8x8 transform intra:49.2% inter:45.6%
x264 [info]: direct mvs  spatial:98.0% temporal:2.0%
x264 [info]: coded y,uvDC,uvAC intra: 55.9% 61.7% 26.2% inter: 12.3% 12.3% 1.9%
x264 [info]: i16 v,h,dc,p: 26% 22% 17% 35%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 15% 17%  6%  7%  9%  9%  8% 11%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13%  9%  7% 11% 11% 11%  9% 12%
x264 [info]: i8c dc,h,v,p: 44% 24% 21% 10%
x264 [info]: Weighted P-Frames: Y:3.5% UV:1.7%
x264 [info]: ref P L0: 63.4% 16.8% 13.1%  3.6%  2.8%  0.3%  0.0%
x264 [info]: ref B L0: 85.4% 11.9%  2.3%  0.5%
x264 [info]: ref B L1: 96.6%  3.4%
x264 [info]: kb/s:4303.90
[20:50:58] mux: track 0, 17620 frames, 394966074 bytes, 4303.59 kbps, fifo 1024
[20:50:58] mux: track 1, 28102 frames, 17618233 bytes, 191.97 kbps, fifo 2048
[20:50:58] Finished work at: Tue Dec 29 20:50:58 2020
[20:50:58] libhb: work result = 0

# Encode Completed ...

nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: Faster Encodes with threads=32

Post by nhyone »

Have you compared the file size? When you use more threads, the file is slightly larger due to reduced encoding efficiency.

You get the smallest file with 1 lookahead thread, and that roughly limits you to 6 encoding threads. (More is useless as they are starved.)

Between 6 threads and 32 threads, the size difference is around 3-5%, iirc.

So I just encode multiple videos concurrently.

I'm surprised with your results that 32 threads is twice as fast as 16 threads. Given that it is a 16-core CPU, the hyperthreading must be very good. On my old Xeon setup, HT cores only give maybe 15% speedup. If 16 threads takes 100 mins, then using 32 threads only reduces it to 85 mins.
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: Faster Encodes with threads=32

Post by nhyone »

Interestingly, from your tests, using more threads lead to smaller file size:

Code: Select all

threads 16  414,238,554 bytes, 4,513.58 kbps, P:5080  Avg QP:21.57  size: 50906
no threads  407,813,731 bytes, 4,443.58 kbps, P:5280  Avg QP:21.67  size: 48563
threads 32  402,261,720 bytes, 4,383.08 kbps, P:5473  Avg QP:21.77  size: 46536
threads 48  397,041,015 bytes, 4,326.19 kbps, P:5738  Avg QP:21.91  size: 44187
threads 60  394,966,074 bytes, 4,303.59 kbps, P:5846  Avg QP:21.98  size: 43364
From the logs, I think the main reason is that the P frames are of slightly worse quality when more threads are used.

(From the looks of it, x264 defaults to max 20 threads if not specified?)
Himcules
Posts: 3
Joined: Tue Feb 23, 2021 6:11 pm

Re: Faster Encodes with threads=32

Post by Himcules »

"approximately 2000 movies (encoded from mostly bluray folders to MKV) on a media server." - defo want to be moving to H.265

Prob best to only run one instance of HB, and keep testing with threads as you have been. Your GPU could perhaps be Upgraded and use of HW acceleration on BOTH the CPU and GPU is most important.
"80+ % CPU utilization" - this is good.

My Q is that, within the encoding process, when you change the number of threads what is the quality and size of the resulting output files? When you take 1 identical source and output several versions to compare.
Post Reply