Some x265 presets aren't working as intended

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
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Some x265 presets aren't working as intended

Post by nikkoaki »

Description of problem or question:
Tried to encode a video with x256. All profiles between Ultra Fast and Medium seem to work ok. Switching to Slow or a slower profile will result in a very low quality video.



Steps to reproduce the problem (If Applicable):
Just select the slow profile, multi-pass encoding, constant frame rate and a low fixed bit rate.



HandBrake version (e.g., 1.0.0):
1.7.3 compiled with the FDK flag



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



HandBrake Activity Log for the Medium Preset

Code: Select all

 # Starting Encode ...

[13:10:33] base preset: Medium 1080p30 (Modified)
[13:10:33] Remote Process started with Process ID: 16980 using port: 8037. Max Allowed Instances: 1
[13:10:33] Worker: Starting HandBrake Engine ...
[13:10:33] Worker: Parent Process Id 16428
[13:10:33] Worker: Starting Web Server on port 8037 ...
[13:10:33] Worker: Starting Listener: 1
[13:10:34] Worker: Server Started
[13:10:34] Worker: Disconnected worker monitoring enabled!
[13:10:34] Compile-time hardening features are enabled
[13:10:34] nvenc: version 12.1 is available
[13:10:34] nvdec: is not compiled into this build
[13:10:34] CUDA Version: 7.5
[13:10:34] vcn: not available on this system
[13:10:34] qsv: not available on this system
[13:10:34] hb_init: starting libhb thread
[13:10:34] Starting work at: Wed Mar 06 13:10:34 2024
[13:10:34] 1 job(s) to process
[13:10:34] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Miguel\\Desktop\\Output\\x265 300kbps medium preset.mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 19,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 10,
        "Settings": {
          "mode": "1",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Miguel\\Desktop\\Output\\Original.mp4",
    "HWDecode": 4
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "Bitrate": 300,
    "MultiPass": true,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "medium",
    "Profile": "auto",
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[13:10:34] CPU: AMD Ryzen 7 3700X 8-Core Processor
[13:10:34]  - logical processor count: 16
[13:10:34] Intel Quick Sync Video support: no
[13:10:34] hb_scan: path=C:\Users\Miguel\Desktop\Output\Original.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Miguel\Desktop\Output\Original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42iso2mp41
    creation_time   : 2024-03-06T13:09:13.000000Z
    encoder         : HandBrake 1.7.3 2024030500
  Duration: 00:00:10.03, start: 0.000000, bitrate: 5939 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 5933 kb/s, 30 fps, 30 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2024-03-06T13:09:13.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
[13:10:34] scan: decoding previews for title 1
[13:10:35] using container PAR 1:1
[13:10:35] scan: 10 previews, 1920x1080, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[13:10:35] libhb: scan thread found 1 valid title(s)
[13:10:35] Skipping subtitle scan.  No suitable subtitle tracks.
[13:10:35] Starting Task: Analysis Pass
[13:10:35] work: skipping crop/scale filter
[13:10:35] work: only 1 chapter, disabling chapter markers
[13:10:35] job configuration:
[13:10:35]  * source
[13:10:35]    + C:\Users\Miguel\Desktop\Output\Original.mp4
[13:10:35]    + title 1, chapter(s) 1 to 1
[13:10:35]    + container: mov,mp4,m4a,3gp,3g2,mj2
[13:10:35]    + data rate: 5939 kbps
[13:10:35]  * destination
[13:10:35]    + C:\Users\Miguel\Desktop\Output\x265 300kbps medium preset.mp4
[13:10:35]    + container: MPEG-4 (libavformat)
[13:10:35]      + align initial A/V stream timestamps
[13:10:35]  * video track
[13:10:35]    + decoder: hevc 8-bit (yuv420p)
[13:10:35]      + bitrate 5933 kbps
[13:10:35]    + filters
[13:10:35]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:10:35]      + Decomb (mode=39)
[13:10:35]      + Framerate Shaper (mode=1:rate=27000000/900000)
[13:10:35]        + frame rate: 30.000 fps -> constant 30.000 fps
[13:10:35]    + Output geometry
[13:10:35]      + storage dimensions: 1920 x 1080
[13:10:35]      + pixel aspect ratio: 1 : 1
[13:10:35]      + display dimensions: 1920 x 1080
[13:10:35]    + encoder: H.265 (libx265)
[13:10:35]      + preset:  medium
[13:10:35]      + profile: auto
[13:10:35]      + level:   auto
[13:10:35]      + bitrate: 300 kbps, pass: 1
[13:10:35]      + color profile: 1-1-1
[13:10:35]      + chroma location: left
[13:10:35] sync: expecting 300 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing lslices=6 deblock sao
x265 [info]: tools: stats-write
[13:10:35] sync: first pts video is 0
[13:10:35] sync: "Chapter 1" (1) at frame 1 time 0
[13:10:38] reader: done. 1 scr changes
[13:10:40] work: average encoding speed for job is 0.000000 fps
[13:10:40] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[13:10:40] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[13:10:40] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[13:10:40] vfr: lost time: 0 (0 frames)
[13:10:40] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:10:40] hevc-decoder done: 301 frames, 0 decoder errors
[13:10:40] sync: got 301 frames, 300 expected
[13:10:40] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:39.56  kb/s: 18171.48
x265 [info]: frame P:     68, Avg QP:47.49  kb/s: 660.89
x265 [info]: frame B:    231, Avg QP:50.89  kb/s: 63.97
x265 [info]: Weighted P-Frames: Y:11.8% UV:10.3%
encoded 301 frames in 4.96s (60.70 fps), 319.14 kb/s, Avg QP:50.05
[13:10:40] Starting Task: Encoding Pass
[13:10:40] work: skipping crop/scale filter
[13:10:40] work: only 1 chapter, disabling chapter markers
[13:10:40] job configuration:
[13:10:40]  * source
[13:10:40]    + C:\Users\Miguel\Desktop\Output\Original.mp4
[13:10:40]    + title 1, chapter(s) 1 to 1
[13:10:40]    + container: mov,mp4,m4a,3gp,3g2,mj2
[13:10:40]    + data rate: 5939 kbps
[13:10:40]  * destination
[13:10:40]    + C:\Users\Miguel\Desktop\Output\x265 300kbps medium preset.mp4
[13:10:40]    + container: MPEG-4 (libavformat)
[13:10:40]      + align initial A/V stream timestamps
[13:10:40]  * video track
[13:10:40]    + decoder: hevc 8-bit (yuv420p)
[13:10:40]      + bitrate 5933 kbps
[13:10:40]    + filters
[13:10:40]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:10:40]      + Decomb (mode=39)
[13:10:40]      + Framerate Shaper (mode=1:rate=27000000/900000)
[13:10:40]        + frame rate: 30.000 fps -> constant 30.000 fps
[13:10:40]    + Output geometry
[13:10:40]      + storage dimensions: 1920 x 1080
[13:10:40]      + pixel aspect ratio: 1 : 1
[13:10:40]      + display dimensions: 1920 x 1080
[13:10:40]    + encoder: H.265 (libx265)
[13:10:40]      + preset:  medium
[13:10:40]      + profile: auto
[13:10:40]      + level:   auto
[13:10:40]      + bitrate: 300 kbps, pass: 2
[13:10:40]      + color profile: 1-1-1
[13:10:40]      + chroma location: left
[13:10:40] sync: expecting 301 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : hex / 57 / 2 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / off / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 early-skip rskip mode=1 signhide tmvp
x265 [info]: tools: b-intra strong-intra-smoothing lslices=6 deblock sao
x265 [info]: tools: stats-read
[13:10:40] sync: first pts video is 0
[13:10:40] sync: "Chapter 1" (1) at frame 1 time 0
[13:10:42] reader: done. 1 scr changes
[13:10:43] work: average encoding speed for job is 0.000000 fps
[13:10:43] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[13:10:44] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[13:10:44] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[13:10:44] vfr: lost time: 0 (0 frames)
[13:10:44] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:10:44] hevc-decoder done: 301 frames, 0 decoder errors
[13:10:44] sync: got 301 frames, 301 expected
[13:10:44] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:44.69  kb/s: 6339.12
x265 [info]: frame P:     68, Avg QP:44.80  kb/s: 933.79
x265 [info]: frame B:    231, Avg QP:50.71  kb/s: 71.32
x265 [info]: Weighted P-Frames: Y:13.2% UV:11.8%
encoded 301 frames in 3.58s (84.15 fps), 307.81 kb/s, Avg QP:49.33
[13:10:44] mux: track 0, 301 frames, 387244 bytes, 307.74 kbps, fifo 512
[13:10:44] Finished work at: Wed Mar 06 13:10:44 2024
[13:10:44] libhb: work result = 0

 # Job Completed!
HandBrake Activity Log for the Slow Preset

Code: Select all

 # Starting Encode ...

[13:13:14] base preset: Medium 1080p30 (Modified)
[13:13:14] Remote Process started with Process ID: 6416 using port: 8037. Max Allowed Instances: 1
[13:13:14] Worker: Starting HandBrake Engine ...
[13:13:14] Worker: Parent Process Id 16428
[13:13:14] Worker: Starting Web Server on port 8037 ...
[13:13:14] Worker: Starting Listener: 1
[13:13:14] Worker: Server Started
[13:13:15] Worker: Disconnected worker monitoring enabled!
[13:13:15] Compile-time hardening features are enabled
[13:13:15] nvenc: version 12.1 is available
[13:13:15] nvdec: is not compiled into this build
[13:13:15] CUDA Version: 7.5
[13:13:15] vcn: not available on this system
[13:13:15] qsv: not available on this system
[13:13:15] hb_init: starting libhb thread
[13:13:15] Starting work at: Wed Mar 06 13:13:15 2024
[13:13:15] 1 job(s) to process
[13:13:15] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Miguel\\Desktop\\Output\\x265 300kbps slow preset.mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 19,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 10,
        "Settings": {
          "mode": "1",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Miguel\\Desktop\\Output\\Original.mp4",
    "HWDecode": 4
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "Bitrate": 300,
    "MultiPass": true,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "slow",
    "Profile": "auto",
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[13:13:15] CPU: AMD Ryzen 7 3700X 8-Core Processor
[13:13:15]  - logical processor count: 16
[13:13:15] Intel Quick Sync Video support: no
[13:13:15] hb_scan: path=C:\Users\Miguel\Desktop\Output\Original.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Miguel\Desktop\Output\Original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42iso2mp41
    creation_time   : 2024-03-06T13:09:13.000000Z
    encoder         : HandBrake 1.7.3 2024030500
  Duration: 00:00:10.03, start: 0.000000, bitrate: 5939 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 5933 kb/s, 30 fps, 30 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2024-03-06T13:09:13.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
[13:13:15] scan: decoding previews for title 1
[13:13:16] using container PAR 1:1
[13:13:16] scan: 10 previews, 1920x1080, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[13:13:16] libhb: scan thread found 1 valid title(s)
[13:13:16] Skipping subtitle scan.  No suitable subtitle tracks.
[13:13:16] Starting Task: Analysis Pass
[13:13:16] work: skipping crop/scale filter
[13:13:16] work: only 1 chapter, disabling chapter markers
[13:13:16] job configuration:
[13:13:16]  * source
[13:13:16]    + C:\Users\Miguel\Desktop\Output\Original.mp4
[13:13:16]    + title 1, chapter(s) 1 to 1
[13:13:16]    + container: mov,mp4,m4a,3gp,3g2,mj2
[13:13:16]    + data rate: 5939 kbps
[13:13:16]  * destination
[13:13:16]    + C:\Users\Miguel\Desktop\Output\x265 300kbps slow preset.mp4
[13:13:16]    + container: MPEG-4 (libavformat)
[13:13:16]      + align initial A/V stream timestamps
[13:13:16]  * video track
[13:13:16]    + decoder: hevc 8-bit (yuv420p)
[13:13:16]      + bitrate 5933 kbps
[13:13:16]    + filters
[13:13:16]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:13:16]      + Decomb (mode=39)
[13:13:16]      + Framerate Shaper (mode=1:rate=27000000/900000)
[13:13:16]        + frame rate: 30.000 fps -> constant 30.000 fps
[13:13:16]    + Output geometry
[13:13:16]      + storage dimensions: 1920 x 1080
[13:13:16]      + pixel aspect ratio: 1 : 1
[13:13:16]      + display dimensions: 1920 x 1080
[13:13:16]    + encoder: H.265 (libx265)
[13:13:16]      + preset:  slow
[13:13:16]      + profile: auto
[13:13:16]      + level:   auto
[13:13:16]      + bitrate: 300 kbps, pass: 1
[13:13:16]      + color profile: 1-1-1
[13:13:16]      + chroma location: left
[13:13:16] sync: expecting 300 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 signhide tmvp strong-intra-smoothing lslices=4
x265 [info]: tools: deblock sao stats-write
[13:13:16] sync: first pts video is 0
[13:13:16] sync: "Chapter 1" (1) at frame 1 time 0
[13:13:21] reader: done. 1 scr changes
[13:13:25] work: average encoding speed for job is 42.973103 fps
[13:13:25] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[13:13:25] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[13:13:25] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[13:13:25] vfr: lost time: 0 (0 frames)
[13:13:25] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:13:25] hevc-decoder done: 301 frames, 0 decoder errors
[13:13:25] sync: got 301 frames, 300 expected
[13:13:25] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:41.24  kb/s: 16468.32
x265 [info]: frame P:     67, Avg QP:50.72  kb/s: 405.11
x265 [info]: frame B:    232, Avg QP:50.91  kb/s: 169.71
x265 [info]: Weighted P-Frames: Y:11.9% UV:11.9%
encoded 301 frames in 9.14s (32.91 fps), 330.41 kb/s, Avg QP:50.81
[13:13:25] Starting Task: Encoding Pass
[13:13:25] work: skipping crop/scale filter
[13:13:25] work: only 1 chapter, disabling chapter markers
[13:13:25] job configuration:
[13:13:25]  * source
[13:13:25]    + C:\Users\Miguel\Desktop\Output\Original.mp4
[13:13:25]    + title 1, chapter(s) 1 to 1
[13:13:25]    + container: mov,mp4,m4a,3gp,3g2,mj2
[13:13:25]    + data rate: 5939 kbps
[13:13:25]  * destination
[13:13:25]    + C:\Users\Miguel\Desktop\Output\x265 300kbps slow preset.mp4
[13:13:25]    + container: MPEG-4 (libavformat)
[13:13:25]      + align initial A/V stream timestamps
[13:13:25]  * video track
[13:13:25]    + decoder: hevc 8-bit (yuv420p)
[13:13:25]      + bitrate 5933 kbps
[13:13:25]    + filters
[13:13:25]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[13:13:25]      + Decomb (mode=39)
[13:13:25]      + Framerate Shaper (mode=1:rate=27000000/900000)
[13:13:25]        + frame rate: 30.000 fps -> constant 30.000 fps
[13:13:25]    + Output geometry
[13:13:25]      + storage dimensions: 1920 x 1080
[13:13:25]      + pixel aspect ratio: 1 : 1
[13:13:25]      + display dimensions: 1920 x 1080
[13:13:25]    + encoder: H.265 (libx265)
[13:13:25]      + preset:  slow
[13:13:25]      + profile: auto
[13:13:25]      + level:   auto
[13:13:25]      + bitrate: 300 kbps, pass: 2
[13:13:25]      + color profile: 1-1-1
[13:13:25]      + chroma location: left
[13:13:25] sync: expecting 301 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 signhide tmvp strong-intra-smoothing lslices=4
x265 [info]: tools: deblock sao stats-read
[13:13:25] sync: first pts video is 0
[13:13:25] sync: "Chapter 1" (1) at frame 1 time 0
[13:13:30] reader: done. 1 scr changes
[13:13:33] work: average encoding speed for job is 48.821548 fps
[13:13:33] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[13:13:34] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[13:13:34] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[13:13:34] vfr: lost time: 0 (0 frames)
[13:13:34] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:13:34] hevc-decoder done: 301 frames, 0 decoder errors
[13:13:34] sync: got 301 frames, 301 expected
[13:13:34] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:48.35  kb/s: 2477.16
x265 [info]: frame P:     67, Avg QP:49.48  kb/s: 496.03
x265 [info]: frame B:    232, Avg QP:50.99  kb/s: 120.36
x265 [info]: Weighted P-Frames: Y:11.9% UV:11.9%
encoded 301 frames in 8.67s (34.73 fps), 219.64 kb/s, Avg QP:50.63
[13:13:34] mux: track 0, 301 frames, 276672 bytes, 219.87 kbps, fifo 512
[13:13:34] Finished work at: Wed Mar 06 13:13:34 2024
[13:13:34] libhb: work result = 0

 # Job Completed!

Sample videos: https://drive.google.com/drive/folders/ ... sp=sharing
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

Just tried the provided pre compiled hb.dll and the problem persists.
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Some x265 presets aren't working as intended

Post by s55 »

Not unsurprising when you are trying to encode at 300kbit. When you enable more features, it is normal that it can require more bit-rate as the encoder can be retaining more detail.

The preset affects Speed, Quality and Filesize. All 3 are affected but your artificially capping bitrate which is causing you problems.
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

The 300kbps was on purpose to see which encoder one can retain more detail at the same extreme low bit rate (trying different presets too).
I always thought that choosing a slower preset would give better results at the expense of encoding speed, at a fixed bit rate.
x265 is the only one that behaves like this. AV1 gives ever so slightly a better result with a much slower preset and x264 is basically the same.
Rodeo314
Novice
Posts: 56
Joined: Wed Jan 17, 2024 3:44 am

Re: Some x265 presets aren't working as intended

Post by Rodeo314 »

Either way, x265 is not developed by HandBrake, so there's pretty much nothing we can do about it.
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Some x265 presets aren't working as intended

Post by s55 »

x264/AV1 are not really relevant. They are different encoders. Nothing states that x265 must behave the same.

Not all features that the slower presents turn on area bout compression efficiency.
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

s55 wrote: Thu Mar 07, 2024 5:36 pm x264/AV1 are not really relevant. They are different encoders. Nothing states that x265 must behave the same.

Not all features that the slower presents turn on area bout compression efficiency.
Thank you for the explanation
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

Was doing another couple of tests and noticed that i wasn't getting bad quality videos this time at the same resolution/bit rate/encoder.
Tried the old video sample again and yep, i'm now getting nice quality on the slower presets. It's actually the "Turbo analysis pass" that seems to bork the image quality on the slower presets, or actually, having it turned off creates low quality videos.
This is messing with my mind again because i thought it was supposed to be the opposite. Thought that turning on that option would give faster encoding speeds at the expense of a bit of quality in some scenarios.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Some x265 presets aren't working as intended

Post by mduell »

The turbo first pass just skips a bunch of options that are slow and typically don't make a difference.

For trying something with extremely low bitrates, I'd leave it off, you want all the encode options applied to the first pass.
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

mduell wrote: Fri Mar 08, 2024 6:19 pm The turbo first pass just skips a bunch of options that are slow and typically don't make a difference.

For trying something with extremely low bitrates, I'd leave it off, you want all the encode options applied to the first pass.
That's what i thought, but turning it off will produce a lower quality video. The quality improves a lot if i turn it on.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Some x265 presets aren't working as intended

Post by mduell »

Can you post both encoding logs so we can see whats happening?
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

Sure


Turbo analysis OFF:

Code: Select all

HandBrake 1.7.3 (2024030500)
OS: Microsoft Windows NT 10.0.19045.0
CPU: AMD Ryzen 7 3700X 8-Core Processor             
Ram: 16310 MB, 
GPU Information:
  NVIDIA GeForce RTX 2060 SUPER - 31.0.15.3623
Screen: 2048x1152
Temp Dir: C:\Users\Miguel\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\Miguel\AppData\Roaming\HandBrake

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

 # Starting Encode ...

[20:27:45] base preset: Fast 1080p30 (Modified)
[20:27:45] Remote Process started with Process ID: 12172 using port: 8037. Max Allowed Instances: 1
[20:27:45] Worker: Starting HandBrake Engine ...
[20:27:45] Worker: Parent Process Id 8292
[20:27:45] Worker: Starting Web Server on port 8037 ...
[20:27:45] Worker: Starting Listener: 1
[20:27:45] Worker: Server Started
[20:27:46] Worker: Disconnected worker monitoring enabled!
[20:27:46] Compile-time hardening features are enabled
[20:27:46] nvenc: version 12.1 is available
[20:27:46] nvdec: is not compiled into this build
[20:27:46] CUDA Version: 7.5
[20:27:46] vcn: not available on this system
[20:27:46] qsv: not available on this system
[20:27:46] hb_init: starting libhb thread
[20:27:46] Starting work at: Fri Mar 08 20:27:46 2024
[20:27:46] 1 job(s) to process
[20:27:46] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Miguel\\Desktop\\Output\\x265 medium MP turbo OFF.mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 19,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 10,
        "Settings": {
          "mode": "1",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Miguel\\Desktop\\Original.mp4",
    "HWDecode": 4
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "Bitrate": 300,
    "MultiPass": true,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "slow",
    "Profile": "auto",
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[20:27:46] CPU: AMD Ryzen 7 3700X 8-Core Processor
[20:27:46]  - logical processor count: 16
[20:27:46] Intel Quick Sync Video support: no
[20:27:46] hb_scan: path=C:\Users\Miguel\Desktop\Original.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Miguel\Desktop\Original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42iso2mp41
    creation_time   : 2024-03-06T13:09:13.000000Z
    encoder         : HandBrake 1.7.3 2024030500
  Duration: 00:00:10.03, start: 0.000000, bitrate: 5939 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 5933 kb/s, 30 fps, 30 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2024-03-06T13:09:13.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
[20:27:46] scan: decoding previews for title 1
[20:27:48] using container PAR 1:1
[20:27:48] scan: 10 previews, 1920x1080, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[20:27:48] libhb: scan thread found 1 valid title(s)
[20:27:48] Skipping subtitle scan.  No suitable subtitle tracks.
[20:27:48] Starting Task: Analysis Pass
[20:27:48] work: skipping crop/scale filter
[20:27:48] work: only 1 chapter, disabling chapter markers
[20:27:48] job configuration:
[20:27:48]  * source
[20:27:48]    + C:\Users\Miguel\Desktop\Original.mp4
[20:27:48]    + title 1, chapter(s) 1 to 1
[20:27:48]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:27:48]    + data rate: 5939 kbps
[20:27:48]  * destination
[20:27:48]    + C:\Users\Miguel\Desktop\Output\x265 medium MP turbo OFF.mp4
[20:27:48]    + container: MPEG-4 (libavformat)
[20:27:48]      + align initial A/V stream timestamps
[20:27:48]  * video track
[20:27:48]    + decoder: hevc 8-bit (yuv420p)
[20:27:48]      + bitrate 5933 kbps
[20:27:48]    + filters
[20:27:48]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[20:27:48]      + Decomb (mode=39)
[20:27:48]      + Framerate Shaper (mode=1:rate=27000000/900000)
[20:27:48]        + frame rate: 30.000 fps -> constant 30.000 fps
[20:27:48]    + Output geometry
[20:27:48]      + storage dimensions: 1920 x 1080
[20:27:48]      + pixel aspect ratio: 1 : 1
[20:27:48]      + display dimensions: 1920 x 1080
[20:27:48]    + encoder: H.265 (libx265)
[20:27:48]      + preset:  slow
[20:27:48]      + profile: auto
[20:27:48]      + level:   auto
[20:27:48]      + bitrate: 300 kbps, pass: 1
[20:27:48]      + color profile: 1-1-1
[20:27:48]      + chroma location: left
[20:27:48] sync: expecting 300 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 signhide tmvp strong-intra-smoothing lslices=4
x265 [info]: tools: deblock sao stats-write
[20:27:48] sync: first pts video is 0
[20:27:48] sync: "Chapter 1" (1) at frame 1 time 0
[20:27:56] reader: done. 1 scr changes
[20:28:00] work: average encoding speed for job is 29.433407 fps
[20:28:00] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[20:28:00] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[20:28:00] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[20:28:00] vfr: lost time: 0 (0 frames)
[20:28:00] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:28:00] hevc-decoder done: 301 frames, 0 decoder errors
[20:28:00] sync: got 301 frames, 300 expected
[20:28:00] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:41.24  kb/s: 16468.32
x265 [info]: frame P:     67, Avg QP:50.72  kb/s: 405.11
x265 [info]: frame B:    232, Avg QP:50.91  kb/s: 169.71
x265 [info]: Weighted P-Frames: Y:11.9% UV:11.9%
encoded 301 frames in 12.23s (24.62 fps), 330.41 kb/s, Avg QP:50.81
[20:28:00] Starting Task: Encoding Pass
[20:28:00] work: skipping crop/scale filter
[20:28:00] work: only 1 chapter, disabling chapter markers
[20:28:00] job configuration:
[20:28:00]  * source
[20:28:00]    + C:\Users\Miguel\Desktop\Original.mp4
[20:28:00]    + title 1, chapter(s) 1 to 1
[20:28:00]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:28:00]    + data rate: 5939 kbps
[20:28:00]  * destination
[20:28:00]    + C:\Users\Miguel\Desktop\Output\x265 medium MP turbo OFF.mp4
[20:28:00]    + container: MPEG-4 (libavformat)
[20:28:00]      + align initial A/V stream timestamps
[20:28:00]  * video track
[20:28:00]    + decoder: hevc 8-bit (yuv420p)
[20:28:00]      + bitrate 5933 kbps
[20:28:00]    + filters
[20:28:00]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[20:28:00]      + Decomb (mode=39)
[20:28:00]      + Framerate Shaper (mode=1:rate=27000000/900000)
[20:28:00]        + frame rate: 30.000 fps -> constant 30.000 fps
[20:28:00]    + Output geometry
[20:28:00]      + storage dimensions: 1920 x 1080
[20:28:00]      + pixel aspect ratio: 1 : 1
[20:28:00]      + display dimensions: 1920 x 1080
[20:28:00]    + encoder: H.265 (libx265)
[20:28:00]      + preset:  slow
[20:28:00]      + profile: auto
[20:28:00]      + level:   auto
[20:28:00]      + bitrate: 300 kbps, pass: 2
[20:28:00]      + color profile: 1-1-1
[20:28:00]      + chroma location: left
[20:28:00] sync: expecting 301 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 signhide tmvp strong-intra-smoothing lslices=4
x265 [info]: tools: deblock sao stats-read
[20:28:00] sync: first pts video is 0
[20:28:00] sync: "Chapter 1" (1) at frame 1 time 0
[20:28:08] reader: done. 1 scr changes
[20:28:11] work: average encoding speed for job is 31.920019 fps
[20:28:11] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[20:28:11] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[20:28:11] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[20:28:11] vfr: lost time: 0 (0 frames)
[20:28:11] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:28:12] hevc-decoder done: 301 frames, 0 decoder errors
[20:28:12] sync: got 301 frames, 301 expected
[20:28:12] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:48.35  kb/s: 2477.16
x265 [info]: frame P:     67, Avg QP:49.48  kb/s: 496.03
x265 [info]: frame B:    232, Avg QP:50.99  kb/s: 120.36
x265 [info]: Weighted P-Frames: Y:11.9% UV:11.9%
encoded 301 frames in 11.56s (26.04 fps), 219.64 kb/s, Avg QP:50.63
[20:28:12] mux: track 0, 301 frames, 276672 bytes, 219.87 kbps, fifo 512
[20:28:12] Finished work at: Fri Mar 08 20:28:12 2024
[20:28:12] libhb: work result = 0

 # Job Completed!


Turbo analysis ON:

Code: Select all

HandBrake 1.7.3 (2024030500)
OS: Microsoft Windows NT 10.0.19045.0
CPU: AMD Ryzen 7 3700X 8-Core Processor             
Ram: 16310 MB, 
GPU Information:
  NVIDIA GeForce RTX 2060 SUPER - 31.0.15.3623
Screen: 2048x1152
Temp Dir: C:\Users\Miguel\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\Miguel\AppData\Roaming\HandBrake

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

 # Starting Encode ...

[20:28:22] base preset: Fast 1080p30 (Modified)
[20:28:22] Remote Process started with Process ID: 10064 using port: 8037. Max Allowed Instances: 1
[20:28:23] Worker: Starting HandBrake Engine ...
[20:28:23] Worker: Parent Process Id 8292
[20:28:23] Worker: Starting Web Server on port 8037 ...
[20:28:23] Worker: Starting Listener: 1
[20:28:23] Worker: Server Started
[20:28:23] Worker: Disconnected worker monitoring enabled!
[20:28:23] Compile-time hardening features are enabled
[20:28:23] nvenc: version 12.1 is available
[20:28:23] nvdec: is not compiled into this build
[20:28:23] CUDA Version: 7.5
[20:28:23] vcn: not available on this system
[20:28:23] qsv: not available on this system
[20:28:23] hb_init: starting libhb thread
[20:28:23] Starting work at: Fri Mar 08 20:28:23 2024
[20:28:23] 1 job(s) to process
[20:28:23] json job:
{
  "Audio": {
    "AudioList": [],
    "CopyMask": [
      "copy:aac"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": true,
    "File": "C:\\Users\\Miguel\\Desktop\\Output\\x265 medium MP turbo ON.mp4",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mp4"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 5,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 4,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 19,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "1080",
          "width": "1920"
        }
      },
      {
        "ID": 10,
        "Settings": {
          "mode": "1",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "C:\\Users\\Miguel\\Desktop\\Original.mp4",
    "HWDecode": 4
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "Bitrate": 300,
    "MultiPass": true,
    "Turbo": true,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "slow",
    "Profile": "auto",
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[20:28:23] CPU: AMD Ryzen 7 3700X 8-Core Processor
[20:28:23]  - logical processor count: 16
[20:28:23] Intel Quick Sync Video support: no
[20:28:23] hb_scan: path=C:\Users\Miguel\Desktop\Original.mp4, title_index=1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Miguel\Desktop\Original.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 512
    compatible_brands: mp42iso2mp41
    creation_time   : 2024-03-06T13:09:13.000000Z
    encoder         : HandBrake 1.7.3 2024030500
  Duration: 00:00:10.03, start: 0.000000, bitrate: 5939 kb/s
  Stream #0:0[0x1](und): Video: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 5933 kb/s, 30 fps, 30 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2024-03-06T13:09:13.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
[20:28:23] scan: decoding previews for title 1
[20:28:24] using container PAR 1:1
[20:28:24] scan: 10 previews, 1920x1080, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[20:28:24] libhb: scan thread found 1 valid title(s)
[20:28:24] Skipping subtitle scan.  No suitable subtitle tracks.
[20:28:24] Starting Task: Analysis Pass
[20:28:24] work: skipping crop/scale filter
[20:28:24] work: only 1 chapter, disabling chapter markers
[20:28:24] job configuration:
[20:28:24]  * source
[20:28:24]    + C:\Users\Miguel\Desktop\Original.mp4
[20:28:24]    + title 1, chapter(s) 1 to 1
[20:28:24]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:28:24]    + data rate: 5939 kbps
[20:28:24]  * destination
[20:28:24]    + C:\Users\Miguel\Desktop\Output\x265 medium MP turbo ON.mp4
[20:28:24]    + container: MPEG-4 (libavformat)
[20:28:24]      + align initial A/V stream timestamps
[20:28:24]  * video track
[20:28:24]    + decoder: hevc 8-bit (yuv420p)
[20:28:24]      + bitrate 5933 kbps
[20:28:24]    + filters
[20:28:24]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[20:28:24]      + Decomb (mode=39)
[20:28:24]      + Framerate Shaper (mode=1:rate=27000000/900000)
[20:28:24]        + frame rate: 30.000 fps -> constant 30.000 fps
[20:28:24]    + Output geometry
[20:28:24]      + storage dimensions: 1920 x 1080
[20:28:24]      + pixel aspect ratio: 1 : 1
[20:28:24]      + display dimensions: 1920 x 1080
[20:28:24]    + encoder: H.265 (libx265)
[20:28:24]      + preset:  slow
[20:28:24]      + profile: auto
[20:28:24]      + level:   auto
[20:28:24]      + bitrate: 300 kbps, pass: 1
[20:28:24]      + fast first pass
[20:28:24]      + color profile: 1-1-1
[20:28:24]      + chroma location: left
[20:28:24] sync: expecting 300 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 2 / 1
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: limit-modes rd=2 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: early-skip rskip mode=1 signhide tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=4 deblock sao stats-write
[20:28:24] sync: first pts video is 0
[20:28:24] sync: "Chapter 1" (1) at frame 1 time 0
[20:28:27] reader: done. 1 scr changes
[20:28:29] work: average encoding speed for job is 0.000000 fps
[20:28:29] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[20:28:29] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[20:28:29] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[20:28:29] vfr: lost time: 0 (0 frames)
[20:28:29] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:28:29] hevc-decoder done: 301 frames, 0 decoder errors
[20:28:29] sync: got 301 frames, 300 expected
[20:28:29] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:39.46  kb/s: 17076.72
x265 [info]: frame P:     67, Avg QP:46.92  kb/s: 716.70
x265 [info]: frame B:    232, Avg QP:50.87  kb/s: 61.18
x265 [info]: Weighted P-Frames: Y:11.9% UV:11.9%
encoded 301 frames in 5.22s (57.62 fps), 320.16 kb/s, Avg QP:49.91
[20:28:29] Starting Task: Encoding Pass
[20:28:29] work: skipping crop/scale filter
[20:28:29] work: only 1 chapter, disabling chapter markers
[20:28:29] job configuration:
[20:28:29]  * source
[20:28:29]    + C:\Users\Miguel\Desktop\Original.mp4
[20:28:29]    + title 1, chapter(s) 1 to 1
[20:28:29]    + container: mov,mp4,m4a,3gp,3g2,mj2
[20:28:29]    + data rate: 5939 kbps
[20:28:29]  * destination
[20:28:29]    + C:\Users\Miguel\Desktop\Output\x265 medium MP turbo ON.mp4
[20:28:29]    + container: MPEG-4 (libavformat)
[20:28:29]      + align initial A/V stream timestamps
[20:28:29]  * video track
[20:28:29]    + decoder: hevc 8-bit (yuv420p)
[20:28:29]      + bitrate 5933 kbps
[20:28:29]    + filters
[20:28:29]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[20:28:29]      + Decomb (mode=39)
[20:28:29]      + Framerate Shaper (mode=1:rate=27000000/900000)
[20:28:29]        + frame rate: 30.000 fps -> constant 30.000 fps
[20:28:29]    + Output geometry
[20:28:29]      + storage dimensions: 1920 x 1080
[20:28:29]      + pixel aspect ratio: 1 : 1
[20:28:29]      + display dimensions: 1920 x 1080
[20:28:29]    + encoder: H.265 (libx265)
[20:28:29]      + preset:  slow
[20:28:29]      + profile: auto
[20:28:29]      + level:   auto
[20:28:29]      + bitrate: 300 kbps, pass: 2
[20:28:29]      + color profile: 1-1-1
[20:28:29]      + chroma location: left
[20:28:29] sync: expecting 301 video frames
x265 [info]: HEVC encoder version 3.5+1-f0c1022b6
x265 [info]: build info [Windows][GCC 13.2.0][64 bit] 8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(17 rows)
x265 [info]: Coding QT: max CU size, min CU size : 64 / 8
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : star / 57 / 3 / 3
x265 [info]: Keyframe min / max / scenecut / bias  : 30 / 300 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 25 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 4 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-300 kbps / 0.60
x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00
x265 [info]: tools: rskip mode=1 signhide tmvp strong-intra-smoothing lslices=4
x265 [info]: tools: deblock sao stats-read
[20:28:29] sync: first pts video is 0
[20:28:29] sync: "Chapter 1" (1) at frame 1 time 0
[20:28:35] reader: done. 1 scr changes
[20:28:38] work: average encoding speed for job is 43.240711 fps
[20:28:38] comb detect: heavy 16 | light 85 | uncombed 200 | total 301
[20:28:38] decomb: deinterlaced 16 | blended 85 | unfiltered 200 | total 301
[20:28:38] vfr: 301 frames output, 0 dropped and 0 duped for CFR/PFR
[20:28:38] vfr: lost time: 0 (0 frames)
[20:28:38] vfr: gained time: 0 (0 frames) (0 not accounted for)
[20:28:39] hevc-decoder done: 301 frames, 0 decoder errors
[20:28:39] sync: got 301 frames, 301 expected
[20:28:39] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x265 [info]: frame I:      2, Avg QP:45.52  kb/s: 4928.28
x265 [info]: frame P:     67, Avg QP:45.18  kb/s: 916.99
x265 [info]: frame B:    232, Avg QP:50.90  kb/s: 95.46
x265 [info]: Weighted P-Frames: Y:11.9% UV:11.9%
encoded 301 frames in 9.29s (32.39 fps), 310.44 kb/s, Avg QP:49.59
[20:28:39] mux: track 0, 301 frames, 390542 bytes, 310.36 kbps, fifo 512
[20:28:39] Finished work at: Fri Mar 08 20:28:39 2024
[20:28:39] libhb: work result = 0

 # Job Completed!


Link with the videos: https://drive.google.com/drive/folders/ ... drive_link
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Some x265 presets aren't working as intended

Post by mduell »

Oh, it's missing on rate control by a lot given how short the content is and how high the QPs are. The encode looks worse because it's a third smaller.

For non-stillimage HD video in the 300 kbps range, you may be better off targeting like RF 50 rather than a specific bitrate.
nikkoaki
Posts: 14
Joined: Wed Mar 06, 2024 1:20 pm

Re: Some x265 presets aren't working as intended

Post by nikkoaki »

mduell wrote: Fri Mar 08, 2024 9:22 pm Oh, it's missing on rate control by a lot given how short the content is and how high the QPs are. The encode looks worse because it's a third smaller.

For non-stillimage HD video in the 300 kbps range, you may be better off targeting like RF 50 rather than a specific bitrate.
Thanks a bunch
Post Reply