HanBrake too slow

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
sturmtruppen
Posts: 6
Joined: Fri Sep 06, 2024 9:39 am

HanBrake too slow

Post by sturmtruppen »

Description of problem or question:

Hi, is it normal for HandBrake to take 6 hours to reduce a movie from 17,350 GB to 5,751 GB or is it too slow perhaps because it is poorly configured, or is it not able to take advantage of the 8 cores and 16 threads of the processor?
Thanks.


Steps to reproduce the problem (If Applicable):




HandBrake version (e.g., 1.0.0):

1.8.1


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

Windows 11


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

Code: Select all

HandBrake 1.8.1 (2024062200)
OS: Microsoft Windows NT 10.0.22631.0
CPU: AMD Ryzen 7 2700 Eight-Core Processor          
Ram: 32692 MB, 
GPU Information:
  NVIDIA GeForce 210  - 21.21.13.4201
Screen: 1920x1080
Temp Dir: C:\Users\giann\AppData\Local\Temp\
Install Dir: C:\Program Files\HandBrake\
Data Dir: C:\Users\giann\AppData\Roaming\HandBrake

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

 # Starting Encode ...

[05:25:11] base preset: Super HQ 1080p30 Surround (Modified)
[05:25:12] Remote Process started with Process ID: 5948 using port: 8037. Max Allowed Instances: 1
[05:25:12] Worker: Starting HandBrake Engine ...
[05:25:12] Worker: Parent Process Id 11896
[05:25:12] Worker: Starting Web Server on port 8037 ...
[05:25:12] Worker: Starting Listener: 1
[05:25:12] Worker: Server Started
[05:25:12] Worker: Disconnected worker monitoring enabled!
[05:25:12] Compile-time hardening features are enabled
Cannot load nvEncodeAPI64.dll
[05:25:12] VCE: Init Failed
[05:25:12] vcn: not available on this system
[05:25:12] qsv: not available on this system
2] hb_init: starting libhb thread
[05:25:12] Starting work at: Sun Sep 08 05:25:12 2024
[05:25:12] 1 job(s) to process
[05:25:12] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0,
        "Encoder": "av_aac",
        "Gain": 0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      },
      {
        "Bitrate": 640,
        "DRC": 0,
        "Encoder": "ac3",
        "Gain": 0,
        "Mixdown": 7,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      "copy:aac",
      "copy:ac3"
    ],
    "FallbackEncoder": "av_aac"
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Capitolo 1"
      }
    ],
    "ChapterMarkers": true,
    "AlignAVStart": false,
    "File": "C:\\Users\\giann\\Videos\\Apocalypse Now (Francis Ford Coppola, 1979).mkv",
    "Options": {
      "IpodAtom": false,
      "Optimize": false
    },
    "Mux": "av_mkv"
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 6,
        "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": 20,
        "Settings": {
          "crop-bottom": "2",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "2",
          "height": "1604",
          "width": "3840"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "mode": "2",
          "rate": "27000000/1126125"
        }
      }
    ]
  },
  "PAR": {
    "Num": 1,
    "Den": 1
  },
  "Metadata": {
    "Name": "Apocalypse Now (1979) 4K"
  },
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 1,
    "Path": "J:\\eMule\\Incoming\\Da comprimere\\Apocalypse Now (Francis Ford Coppola, 1979).mkv",
    "HWDecode": 0
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": "x265",
    "Level": "auto",
    "Bitrate": 4500,
    "MultiPass": false,
    "Turbo": true,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "auto",
    "QSV": {
      "Decode": false
    },
    "HardwareDecode": 0
  }
}
[05:25:12] CPU: Unknown
[05:25:12]  - logical processor count: 16
[05:25:12] Intel Quick Sync Video support: no
[05:25:12] hb_scan: path=J:\eMule\Incoming\Da comprimere\Apocalypse Now (Francis Ford Coppola, 1979).mkv, title_index=1
Input #0, matroska,webm, from 'J:\eMule\Incoming\Da comprimere\Apocalypse Now (Francis Ford Coppola, 1979).mkv':
  Metadata:
    title           : Apocalypse Now (1979) 4K
    encoder         : libebml v1.4.1 + libmatroska v1.6.2
    creation_time   : 2021-01-27T15:40:10.000000Z
  Duration: 02:27:16.01, start: 0.000000, bitrate: 16085 kb/s
  Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x1608, SAR 1:1 DAR 160:67, 23.98 fps, 23.98 tbr, 1k tbn (default)
      Metadata:
        BPS-eng         : 15001828
        DURATION-eng    : 02:27:11.846000000
        NUMBER_OF_FRAMES-eng: 211752
        NUMBER_OF_BYTES-eng: 16561730359
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:1(eng): Subtitle: subrip (srt)
      Metadata:
        BPS-eng         : 55
        DURATION-eng    : 02:22:14.716000000
        NUMBER_OF_FRAMES-eng: 1448
        NUMBER_OF_BYTES-eng: 59269
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:2(eng): Subtitle: subrip (srt)
      Metadata:
        title           : SDH
        BPS-eng         : 59
        DURATION-eng    : 02:26:04.320000000
        NUMBER_OF_FRAMES-eng: 1592
        NUMBER_OF_BYTES-eng: 64994
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:3(eng): Audio: eac3, 48000 Hz, 5.1(side), fltp, 320 kb/s
      Metadata:
        BPS-eng         : 319999
        DURATION-eng    : 02:27:11.895000000
        NUMBER_OF_FRAMES-eng: 275996
        NUMBER_OF_BYTES-eng: 353274880
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:4: Subtitle: subrip (srt) (default)
      Metadata:
        BPS-eng         : 14
        DURATION-eng    : 00:00:15.000000000
        NUMBER_OF_FRAMES-eng: 1
        NUMBER_OF_BYTES-eng: 27
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:5(ita): Audio: dts (dca) (DTS), 48000 Hz, stereo, fltp, 768 kb/s (default)
      Metadata:
        BPS-eng         : 767945
        DURATION-eng    : 02:27:12.112000000
        NUMBER_OF_FRAMES-eng: 827952
        NUMBER_OF_BYTES-eng: 847822848
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:6(ita): Subtitle: subrip (srt)
      Metadata:
        BPS-eng         : 44
        DURATION-eng    : 02:22:15.648000000
        NUMBER_OF_FRAMES-eng: 1199
        NUMBER_OF_BYTES-eng: 47353
        _STATISTICS_WRITING_APP-eng: mkvmerge v52.0.0 ('Secret For The Mad') 32-bit
        _STATISTICS_WRITING_DATE_UTC-eng: 2021-01-27 15:40:10
        _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
  Stream #0:7: Video: mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 533x800, 90k tbr, 90k tbn (attached pic)
      Metadata:
        filename        : cover.jpg
        mimetype        : image/jpeg
[05:25:12] scan: decoding previews for title 1
[05:25:12] scan: audio 0x3: eac3, rate=48000Hz, bitrate=320000 English (E-AC3, 5.1 ch, 320 kbps)
[05:25:13] scan: audio 0x5: dca, rate=48000Hz, bitrate=768000 italiano (DTS, 2.0 ch, Lt/Rt), 768 kbps)
[05:25:14] scan: 10 previews, 3840x1608, 23.976 fps, autocrop = 2/2/0/0, aspect 2.39:1, PAR 1:1, color profile: 9-16-9, chroma location: topleft
[05:25:14] scan: mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.001000, max_luminance=1000.000000
[05:25:14] scan: content light level: max_cll=1000, max_fall=462
[05:25:15] libhb: scan thread found 1 valid title(s)
[05:25:15] Skipping subtitle scan.  No suitable subtitle tracks.
[05:25:15] Starting Task: Encoding Pass
[05:25:15] work: track 1, dithering not supported by codec
[05:25:15] work: track 2, dithering not supported by codec
[05:25:15] work: only 1 chapter, disabling chapter markers
[05:25:15] job configuration:
[05:25:15]  * source
[05:25:15]    + J:\eMule\Incoming\Da comprimere\Apocalypse Now (Francis Ford Coppola, 1979).mkv
[05:25:15]    + title 1, chapter(s) 1 to 1
[05:25:15]    + container: matroska,webm
[05:25:15]    + data rate: 16085 kbps
[05:25:15]  * destination
[05:25:15]    + C:\Users\giann\Videos\Apocalypse Now (Francis Ford Coppola, 1979).mkv
[05:25:15]    + container: Matroska (libavformat)
[05:25:15]  * video track
[05:25:15]    + decoder: hevc 10-bit (yuv420p10le)
[05:25:15]    + filters
[05:25:15]      + 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)
[05:25:15]      + Decomb (mode=39)
[05:25:15]      + Framerate Shaper (mode=2:rate=27000000/1126125)
[05:25:15]        + frame rate: 23.976 fps -> peak rate limited to 23.976 fps
[05:25:15]      + Crop and Scale (width=3840:height=1604:crop-top=2:crop-bottom=2:crop-left=0:crop-right=0)
[05:25:15]        + source: 3840 * 1608, crop (2/2/0/0): 3840 * 1604, scale: 3840 * 1604
[05:25:15]      + Format (format=yuv420p)
[05:25:15]    + Output geometry
[05:25:15]      + storage dimensions: 3840 x 1604
[05:25:15]      + pixel aspect ratio: 1 : 1
[05:25:15]      + display dimensions: 3840 x 1604
[05:25:15]    + encoder: H.265 (libx265)
[05:25:15]      + preset:  fast
[05:25:15]      + profile: auto
[05:25:15]      + level:   auto
[05:25:15]      + bitrate: 4500 kbps, pass: 0
[05:25:15]      + color profile: 9-16-9
[05:25:15]      + color range: tv
[05:25:15]      + chroma location: topleft
[05:25:15]      + mastering display metadata: r(0.6800,0.3200) g(0.2650,0.6900) b(0.1500 0.0600) wp(0.3127, 0.3290) min_luminance=0.001000, max_luminance=1000.000000
[05:25:15]      + content light level: max_cll=1000, max_fall=462
[05:25:15]  * audio track 1
[05:25:15]    + decoder: English (E-AC3, 5.1 ch, 320 kbps) (track 1, id 0x3)
[05:25:15]      + bitrate: 320 kbps, samplerate: 48000 Hz
[05:25:15]    + mixdown: Stereo
[05:25:15]    + encoder: AAC (libavcodec)
[05:25:15]      + bitrate: 160 kbps, samplerate: 48000 Hz
[05:25:15]  * audio track 2
[05:25:15]    + decoder: English (E-AC3, 5.1 ch, 320 kbps) (track 1, id 0x3)
[05:25:15]      + bitrate: 320 kbps, samplerate: 48000 Hz
[05:25:15]    + mixdown: 5.1 Channels
[05:25:15]    + encoder: AC3 (libavcodec)
[05:25:15]      + bitrate: 640 kbps, samplerate: 48000 Hz
[05:25:15] sync: expecting 211852 video frames
x265 [info]: HEVC encoder version 3.6+1-aa7f602f7
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 [warning]: Turning on repeat-headers for HDR compatibility
x265 [info]: Main profile, Level-5 (Main tier)
x265 [info]: Thread pool created using 16 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 4 / wpp(26 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 / 2
x265 [info]: Keyframe min / max / scenecut / bias  : 24 / 240 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 15 / 4 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 1 / 0
x265 [info]: References / ref-limit  cu / depth  : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : ABR-4500 kbps / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 rskip mode=1 signhide tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=8 deblock sao
[05:25:15] sync: first pts video is 0
[05:25:15] sync: "Capitolo 1" (1) at frame 1 time 0
[05:25:15] sync: first pts audio 0x3 is 0
[05:25:15] sync: first pts audio 0x3 is 0
[11:25:23] reader: done. 1 scr changes
[11:25:27] work: average encoding speed for job is 9.796925 fps
[11:25:27] comb detect: heavy 753 | light 4353 | uncombed 206646 | total 211752
[11:25:27] decomb: deinterlaced 753 | blended 4353 | unfiltered 206646 | total 211752
[11:25:27] vfr: 211752 frames output, 0 dropped and 0 duped for CFR/PFR
[11:25:27] vfr: lost time: 0 (0 frames)
[11:25:27] vfr: gained time: 0 (0 frames) (0 not accounted for)
[11:25:27] eac3-decoder done: 275996 frames, 0 decoder errors
[11:25:27] eac3-decoder done: 275996 frames, 0 decoder errors
[11:25:27] hevc-decoder done: 211752 frames, 0 decoder errors
[11:25:28] sync: got 211752 frames, 211852 expected
[11:25:28] sync: framerate min 15.385 fps, max 23.976 fps, avg 23.976 fps
x265 [info]: frame I:   1705, Avg QP:23.98  kb/s: 17011.75
x265 [info]: frame P:  42357, Avg QP:25.12  kb/s: 8869.95
x265 [info]: frame B: 167690, Avg QP:28.02  kb/s: 3262.96
x265 [info]: Weighted P-Frames: Y:4.9% UV:3.0%
encoded 211752 frames in 21612.93s (9.80 fps), 4495.24 kb/s, Avg QP:27.41
[11:25:28] mux: track 0, 211752 frames, 4967476260 bytes, 4499.57 kbps, fifo 2048
[11:25:28] mux: track 1, 413995 frames, 178420036 bytes, 161.61 kbps, fifo 4096
[11:25:28] mux: track 2, 275996 frames, 706549760 bytes, 640.00 kbps, fifo 2048
[11:25:28] Finished work at: Sun Sep 08 11:25:28 2024
[11:25:28] libhb: work result = 0
 # Job Completed!
User avatar
s55
HandBrake Team
Posts: 10410
Joined: Sun Dec 24, 2006 1:05 pm

Re: HanBrake too slow

Post by s55 »

It's not particularly slow. Encode time will of course vary depending on source resolution / complexity, Settings used and hardware.
HandBrake should be fully utilising that CPU without much issue.


I'd drop off the Interlace Detection and Deinterlace options on the filters tab unless you know that your content needs it. That'll help a bit but ultimately, h265 is fairly intensive to encode so it will take time.
mduell
Veteran User
Posts: 8343
Joined: Sat Apr 21, 2007 8:54 pm

Re: HanBrake too slow

Post by mduell »

4K content + 6 year old CPU + compute-intensive modern codec + unnecessary filtering... ain't gonna be fast.

I'd drop the unnecessary filtering and use preset veryfast for a bit of a speedup. Beyond that, you need a better CPU.
sturmtruppen
Posts: 6
Joined: Fri Sep 06, 2024 9:39 am

Re: HandBrake too slow

Post by sturmtruppen »

ok, maybe you can advise me on which processor would be best suited for this motherboard (X570 Phantom Gaming 4 with 32GB RAM and 1GB M.2 NVMe HD system).
Bye and thanks.
el-nebu
Posts: 19
Joined: Sat Feb 05, 2022 12:01 pm

Re: HanBrake too slow

Post by el-nebu »

As someone who has already bought a Threadripper just to use Handbrake, I would recommend that you don't get a newer CPU just for this purpose.
However, if you are thinking about a completely new computer anyway, there is nothing to stop you from getting something faster that is also useful for Handbrake.

If you want to buy a new computer, you can also think about running the encoding on a new graphics card.

I would also like to advise you to only encode the original source file and not to re-encode a file that has already been encoded.
I can't believe that your 4K file is only 17 GB, as the original source files, especially for older movies - they are usually between 50 and 100 GB.
mduell
Veteran User
Posts: 8343
Joined: Sat Apr 21, 2007 8:54 pm

Re: HandBrake too slow

Post by mduell »

sturmtruppen wrote: Mon Sep 09, 2024 10:08 amok, maybe you can advise me on which processor would be best suited for this motherboard (X570 Phantom Gaming 4 with 32GB RAM and 1GB M.2 NVMe HD system).
5900X or 5950X would be ideal; may need a firmware update for support.
Post Reply