CLI much slower than GUI version; using custom preset

HandBrake for Mac 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
MagNj
Posts: 2
Joined: Wed Mar 18, 2020 4:47 am

CLI much slower than GUI version; using custom preset

Post by MagNj »

Description of problem or question:
Compared same job between GUI and CLI and CLI is much slower using a custom preset



Steps to reproduce the problem (If Applicable):
Custom preset creation:
  1. Load preset "Very Fast 480p30"
  2. Change Video -> Encoder Options -> Preset from veryfast to ultrafast
  3. Save preset as "Ultra Fast 480p30"
  4. Export preset "Ultra Fast 480p30" to $HOME/Desktop/Ultra_Fast_480p30.json
Used a 2 minute 1080p test.mov video clip as source file
  • H.264 HD (1-1-1)
  • 5.1 (C L R Ls Rs LFE), AAC, 48000 Hz
  • 1920x1080, 16:9
  • 29.97 FPS
  • 17.98 Mbps
The video file can be downloaded from: https://www.mserv.pw/test.mov

GUI version: Opened test.mov, Applied custom preset "Ultra Fast 480p30", And started job
CLI version:

Code: Select all

time $HOME/bin/HandBrakeCLI --preset-import-file $HOME/Desktop/Ultra_Fast_480p30.json -i $HOME/Movies/test.mov -o $HOME/Movies/test.mp4
GUI version took: 0m 40s
CLI version took: 2m 06s


On a 40 minute video clip the difference was much bigger
GUI 12m
CLI 45m


Contents of Ultra_Fast_480p30.json

Code: Select all

{
  "PresetList" : [
    {
      "AlignAVStart" : true,
      "AudioCopyMask" : [
        "copy:aac"
      ],
      "AudioEncoderFallback" : "ca_aac",
      "AudioLanguageList" : [

      ],
      "AudioList" : [
        {
          "AudioBitrate" : 160,
          "AudioCompressionLevel" : -1,
          "AudioDitherMethod" : "auto",
          "AudioEncoder" : "ca_aac",
          "AudioMixdown" : "stereo",
          "AudioNormalizeMixLevel" : false,
          "AudioSamplerate" : "auto",
          "AudioTrackDRCSlider" : 0,
          "AudioTrackGainSlider" : 0,
          "AudioTrackQuality" : -1,
          "AudioTrackQualityEnable" : false
        }
      ],
      "AudioSecondaryEncoderMode" : true,
      "AudioTrackSelectionBehavior" : "first",
      "ChapterMarkers" : true,
      "ChildrenArray" : [

      ],
      "Default" : false,
      "FileFormat" : "av_mp4",
      "Folder" : false,
      "FolderOpen" : false,
      "InlineParameterSets" : false,
      "Mp4HttpOptimize" : false,
      "Mp4iPodCompatible" : false,
      "PictureAutoCrop" : true,
      "PictureBottomCrop" : 0,
      "PictureChromaSmoothCustom" : "",
      "PictureChromaSmoothPreset" : "off",
      "PictureChromaSmoothTune" : "none",
      "PictureCombDetectCustom" : "",
      "PictureCombDetectPreset" : "fast",
      "PictureDARWidth" : 0,
      "PictureDeblockCustom" : "strength=strong:thresh=20:blocksize=8",
      "PictureDeblockPreset" : "off",
      "PictureDeblockTune" : "medium",
      "PictureDeinterlaceCustom" : "",
      "PictureDeinterlaceFilter" : "decomb",
      "PictureDeinterlacePreset" : "default",
      "PictureDenoiseCustom" : "",
      "PictureDenoiseFilter" : "off",
      "PictureDenoisePreset" : "light",
      "PictureDenoiseTune" : "none",
      "PictureDetelecine" : "off",
      "PictureDetelecineCustom" : "",
      "PictureForceHeight" : 0,
      "PictureForceWidth" : 0,
      "PictureHeight" : 480,
      "PictureItuPAR" : false,
      "PictureKeepRatio" : true,
      "PictureLeftCrop" : 0,
      "PictureLooseCrop" : false,
      "PictureModulus" : 2,
      "PicturePAR" : "auto",
      "PicturePARHeight" : 27,
      "PicturePARWidth" : 32,
      "PictureRightCrop" : 0,
      "PictureRotate" : "angle=0:hflip=0",
      "PictureSharpenCustom" : "",
      "PictureSharpenFilter" : "off",
      "PictureSharpenPreset" : "medium",
      "PictureSharpenTune" : "none",
      "PictureTopCrop" : 0,
      "PictureWidth" : 720,
      "PresetDescription" : "",
      "PresetName" : "Ultra Fast 480p30",
      "SubtitleAddCC" : false,
      "SubtitleAddForeignAudioSearch" : true,
      "SubtitleAddForeignAudioSubtitle" : false,
      "SubtitleBurnBDSub" : true,
      "SubtitleBurnBehavior" : "foreign",
      "SubtitleBurnDVDSub" : true,
      "SubtitleLanguageList" : [

      ],
      "SubtitleTrackSelectionBehavior" : "none",
      "Type" : 1,
      "UsesPictureFilters" : true,
      "UsesPictureSettings" : 1,
      "VideoAvgBitrate" : 1000,
      "VideoColorMatrixCodeOverride" : 0,
      "VideoEncoder" : "x264",
      "VideoFramerate" : "30",
      "VideoFramerateMode" : "pfr",
      "VideoGrayScale" : false,
      "VideoLevel" : "3.1",
      "VideoOptionExtra" : "",
      "VideoPreset" : "ultrafast",
      "VideoProfile" : "main",
      "VideoQSVAsyncDepth" : 4,
      "VideoQSVDecode" : false,
      "VideoQualitySlider" : 22,
      "VideoQualityType" : 2,
      "VideoScaler" : "swscale",
      "VideoTune" : "",
      "VideoTurboTwoPass" : true,
      "VideoTwoPass" : true,
      "x264Option" : "",
      "x264UseAdvancedOptions" : false
    }
  ],
  "VersionMajor" : 42,
  "VersionMicro" : 0,
  "VersionMinor" : 0
}



HandBrake version (e.g., 1.0.0):
1.3.1 for both GUI and CLI


Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
macOS 10.15.3 Catalina, Case-sensitive APFS
MacBook Pro (Retina, 15-inch, Mid 2015)
Processor: 2.8 GHz Quad-Core Intel Core i7
Memory: 16 GB 1600 MHz DDR3
Storage: 1.92 TB Solid State PCI-Express Drive


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

GUI log

Code: Select all

[02:50:55] macgui: Handbrake Version: 1.3.1 (2020010400)
[02:50:55] hb_init: starting libhb thread
[02:50:55] Compile-time hardening features are enabled
[02:50:56] hb_init: starting libhb thread
[02:51:06] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[02:51:06] CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
[02:51:06]  - Intel microarchitecture Haswell
[02:51:06]  - logical processor count: 8
[02:51:06] hb_scan: path=/Users/testuser/Movies/test.mov, title_index=0
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Users/testuser/Movies/test.mov
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Users/testuser/Movies/test.mov/) failed
[02:51:06] 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
[02:51:06] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/testuser/Movies/test.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2020-03-18T06:10:47.000000Z
  Duration: 00:01:59.79, start: 0.000000, bitrate: 10697 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 215 kb/s (default)
    Metadata:
      creation_time   : 2020-03-18T06:10:47.000000Z
      handler_name    : Core Media Audio
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 10475 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2020-03-18T06:10:47.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
[02:51:06] scan: decoding previews for title 1
[02:51:06] scan: audio 0x0: aac, rate=48000Hz, bitrate=215299 Unknown (AAC LC) (5.1 ch) (215 kbps)
[02:51:07] scan: 10 previews, 1920x1080, 29.978 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[02:51:07] libhb: scan thread found 1 valid title(s)
[02:51:07] macgui: ScanCore scan done
[02:51:21] macgui: QueueCore scanning specifically for title: 1
[02:51:21] CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
[02:51:21]  - Intel microarchitecture Haswell
[02:51:21]  - logical processor count: 8
[02:51:21] hb_scan: path=/Users/testuser/Movies/test.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Users/testuser/Movies/test.mov
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Users/testuser/Movies/test.mov/) failed
[02:51:21] 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
[02:51:21] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/testuser/Movies/test.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 0
    compatible_brands: qt  
    creation_time   : 2020-03-18T06:10:47.000000Z
  Duration: 00:01:59.79, start: 0.000000, bitrate: 10697 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 215 kb/s (default)
    Metadata:
      creation_time   : 2020-03-18T06:10:47.000000Z
      handler_name    : Core Media Audio
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 10475 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2020-03-18T06:10:47.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
[02:51:21] scan: decoding previews for title 1
[02:51:21] scan: audio 0x0: aac, rate=48000Hz, bitrate=215299 Unknown (AAC LC) (5.1 ch) (215 kbps)
[02:51:22] scan: 10 previews, 1920x1080, 29.978 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[02:51:22] libhb: scan thread found 1 valid title(s)
[02:51:22] macgui: QueueCore scan done
[02:51:22] macgui: QueueCore started encoding test.mp4
[02:51:22] macgui: QueueCore with preset Ultra Fast 480p30
[02:51:22] Starting work at: Wed Mar 18 02:51:22 2020

[02:51:22] 1 job(s) to process
[02:51:22] Starting Task: Encoding Pass
[02:51:22] work: only 1 chapter, disabling chapter markers
[02:51:22] job configuration:
[02:51:22]  * source
[02:51:22]    + /Users/testuser/Movies/test.mov
[02:51:22]    + title 1, chapter(s) 1 to 1
[02:51:22]    + container: mov,mp4,m4a,3gp,3g2,mj2
[02:51:22]    + data rate: 10697 kbps
[02:51:22]  * destination
[02:51:22]    + /Users/testuser/Movies/test.mp4
[02:51:22]    + container: MPEG-4 (libavformat)
[02:51:22]      + align initial A/V stream timestamps
[02:51:22]  * video track
[02:51:22]    + decoder: h264
[02:51:22]      + bitrate 10475 kbps
[02:51:22]    + filters
[02:51:22]      + Comb Detect (mode=0:spatial-metric=2:motion-thresh=2:spatial-thresh=3:filter-mode=1:block-thresh=80:block-width=16:block-height=16)
[02:51:22]      + Decomb (mode=39)
[02:51:22]      + Framerate Shaper (mode=2:rate=27000000/900000)
[02:51:22]        + frame rate: 29.978 fps -> peak rate limited to 30.000 fps
[02:51:22]      + Crop and Scale (width=720:height=480:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[02:51:22]        + source: 1920 * 1080, crop (0/0/0/0): 1920 * 1080, scale: 720 * 480
[02:51:22]    + Output geometry
[02:51:22]      + storage dimensions: 720 x 480
[02:51:22]      + pixel aspect ratio: 32 : 27
[02:51:22]      + display dimensions: 853 x 480
[02:51:22]    + encoder: H.264 (libx264)
[02:51:22]      + preset:  ultrafast
[02:51:22]      + profile: main
[02:51:22]      + level:   3.1
[02:51:22]      + quality: 22.00 (RF)
[02:51:22]      + color profile: 1-1-1
[02:51:22]  * audio track 1
[02:51:22]    + decoder: Unknown (AAC LC) (5.1 ch) (215 kbps) (track 1, id 0x0)
[02:51:22]      + bitrate: 215 kbps, samplerate: 48000 Hz
[02:51:22]    + mixdown: Stereo
[02:51:22]    + dither: triangular
[02:51:22]    + encoder: AAC (Apple AudioToolbox)
[02:51:22]      + bitrate: 160 kbps, samplerate: 48000 Hz
[02:51:22] sync: expecting 3591 video frames
[02:51:22] encx264: min-keyint: 30, keyint: 300
[02:51:22] encx264: encoding at constant RF 22.000000
[02:51:22] encx264: unparsed options: level=3.1:ref=1:scenecut=0:bframes=0:no-deblock=1:cabac=0:analyse=none:8x8dct=0:weightp=0:me=dia:subme=0:mixed-refs=0:vbv-bufsize=14000:vbv-maxrate=14000:aq-mode=0:mbtree=0:rc-lookahead=0
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Constrained Baseline, level 3.1, 4:2:0, 8-bit
[02:51:22] sync: first pts video is 0
[02:51:22] sync: "Chapter 1" (1) at frame 1 time 0
[02:51:22] sync: first pts audio 0x0 is 0
[02:51:46] reader: done. 1 scr changes
[02:51:46] work: average encoding speed for job is 149.694321 fps
[02:51:46] comb detect: heavy 0 | light 0 | uncombed 3591 | total 3591
[02:51:46] decomb: deinterlaced 0 | blended 0 | unfiltered 3591 | total 3591
[02:51:46] vfr: 3591 frames output, 0 dropped and 0 duped for CFR/PFR
[02:51:46] vfr: lost time: 0 (0 frames)
[02:51:46] vfr: gained time: 0 (0 frames) (0 not accounted for)
[02:51:46] aac-decoder done: 5615 frames, 0 decoder errors
[02:51:46] h264-decoder done: 3591 frames, 0 decoder errors
[02:51:46] sync: got 3591 frames, 3591 expected
[02:51:46] sync: framerate min 29.970 fps, max 29.978 fps, avg 29.973 fps
x264 [info]: frame I:12    Avg QP:17.00  size: 68987
x264 [info]: frame P:3579  Avg QP:19.35  size:  7087
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4:  2.2%  0.0%  0.0%  P16..4: 48.7%  0.0%  0.0%  0.0%  0.0%    skip:49.1%
x264 [info]: coded y,uvDC,uvAC intra: 42.8% 65.6% 30.6% inter: 20.5% 34.7% 3.6%
x264 [info]: i16 v,h,dc,p: 35% 32% 15% 18%
x264 [info]: i8c dc,h,v,p: 37% 29% 25%  9%
x264 [info]: kb/s:1749.02
[02:51:46] mux: track 0, 3591 frames, 26192478 bytes, 1748.75 kbps, fifo 2048
[02:51:46] mux: track 1, 5618 frames, 2463661 bytes, 164.49 kbps, fifo 4096
[02:51:46] Finished work at: Wed Mar 18 02:51:46 2020

[02:51:46] libhb: work result = 0
[02:51:47] macgui: Queue Done, there are no more pending encodes
[02:51:46] macgui: QueueCore work done
CLI log

Code: Select all

time HandBrakeCLI --preset-import-file $HOME/Desktop/Ultra_Fast_480p30.json -i $HOME/Movies/test.mov -o $HOME/Movies/test.mp4
[02:45:34] Compile-time hardening features are enabled
[02:45:34] hb_init: starting libhb thread
[02:45:34] thread 7000033d6000 started ("libhb")
HandBrake 1.3.1 (2020010400) - Darwin x86_64 - https://handbrake.fr
8 CPUs detected
Opening /Users/testuser/Movies/test.mov...
[02:45:34] CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
[02:45:34]  - Intel microarchitecture Haswell
[02:45:34]  - logical processor count: 8
[02:45:34] hb_scan: path=/Users/testuser/Movies/test.mov, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Users/testuser/Movies/test.mov
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Users/testuser/Movies/test.mov/) failed
[02:45:34] 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
[02:45:34] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/testuser/Movies/test.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 0
    compatible_brands: qt
    creation_time   : 2020-03-18T06:10:47.000000Z
  Duration: 00:01:59.79, start: 0.000000, bitrate: 10697 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 215 kb/s (default)
    Metadata:
      creation_time   : 2020-03-18T06:10:47.000000Z
      handler_name    : Core Media Audio
    Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 10475 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 180k tbc (default)
    Metadata:
      creation_time   : 2020-03-18T06:10:47.000000Z
      handler_name    : Core Media Video
      encoder         : H.264
[02:45:34] scan: decoding previews for title 1
[02:45:34] scan: audio 0x0: aac, rate=48000Hz, bitrate=215299 Unknown (AAC LC) (5.1 ch) (215 kbps)
Scanning title 1 of 1, preview 5, 50.00 %[02:45:35] scan: 10 previews, 1920x1080, 29.978 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
Scanning title 1 of 1, preview 10, 100.00 %[02:45:35] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: /Users/testuser/Movies/test.mov
  + duration: 00:01:59
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 29.978 fps
  + autocrop: 0/0/0/0
  + chapters:
    + 1: duration 00:01:59
  + audio tracks:
    + 1, Unknown (AAC LC) (5.1 ch) (215 kbps) (iso639-2: und)
  + subtitle tracks:
[02:45:35] Starting work at: Wed Mar 18 02:45:35 2020

[02:45:35] 1 job(s) to process
[02:45:35] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 128,
                "CompressionLevel": -1.0,
                "DRC": 0.0,
                "DitherMethod": "auto",
                "Encoder": "ca_aac",
                "Gain": 0.0,
                "Mixdown": "dpl2",
                "NormalizeMixLevel": false,
                "PresetEncoder": "ca_aac",
                "Quality": -3.0,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:eac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3",
            "copy:truehd",
            "copy:flac"
        ],
        "FallbackEncoder": "ca_aac"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 1,
                    "Seconds": 59,
                    "Ticks": 10781044
                },
                "Name": ""
            }
        ],
        "ChapterMarkers": false,
        "File": "/Users/testuser/Movies/test.mp4",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 12,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1080,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {},
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "/Users/testuser/Movies/test.mov",
        "Range": {
            "End": 1,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ColorFormat": 0,
        "ColorMatrix": 1,
        "ColorPrimaries": 1,
        "ColorRange": 1,
        "ColorTransfer": 1,
        "Encoder": "x264",
        "Level": "auto",
        "Options": "",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AsyncDepth": 4,
            "Decode": false
        },
        "Quality": 22.0,
        "Tune": "",
        "Turbo": false,
        "TwoPass": false
    }
}
[02:45:35] Starting Task: Encoding Pass
[02:45:35] Skipping vfr filter
[02:45:35] Skipping crop/scale filter
[02:45:35] job configuration:
[02:45:35]  * source
[02:45:35]    + /Users/testuser/Movies/test.mov
[02:45:35]    + title 1, chapter(s) 1 to 1
[02:45:35]    + container: mov,mp4,m4a,3gp,3g2,mj2
[02:45:35]    + data rate: 10697 kbps
[02:45:35]  * destination
[02:45:35]    + /Users/testuser/Movies/test.mp4
[02:45:35]    + container: MPEG-4 (libavformat)
[02:45:35]  * video track
[02:45:35]    + decoder: h264
[02:45:35]      + bitrate 10475 kbps
[02:45:35]    + Output geometry
[02:45:35]      + storage dimensions: 1920 x 1080
[02:45:35]      + pixel aspect ratio: 1 : 1
[02:45:35]      + display dimensions: 1920 x 1080
[02:45:35]    + encoder: H.264 (libx264)
[02:45:35]      + preset:  medium
[02:45:35]      + profile: auto
[02:45:35]      + level:   auto
[02:45:35]      + quality: 22.00 (RF)
[02:45:35]      + color profile: 1-1-1
[02:45:35]  * audio track 1
[02:45:35]    + decoder: Unknown (AAC LC) (5.1 ch) (215 kbps) (track 1, id 0x0)
[02:45:35]      + bitrate: 215 kbps, samplerate: 48000 Hz
[02:45:35]    + mixdown: Dolby Pro Logic II
[02:45:35]    + dither: triangular
[02:45:35]    + encoder: AAC (Apple AudioToolbox)
[02:45:35]      + bitrate: 128 kbps, samplerate: 48000 Hz
[02:45:35] sync: expecting 3591 video frames
[02:45:35] encx264: min-keyint: 30, keyint: 300
[02:45:35] encx264: encoding at constant RF 22.000000
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.0, 4:2:0, 8-bit
[02:45:35] sync: first pts audio 0x0 is 0
[02:45:35] sync: first pts video is 120
[02:45:35] sync: Chapter 1 at frame 1 time 120
Encoding: task 1 of 1, 97.74 % (26.09 fps, avg 29.34 fps, ETA 00h00m03s)[02:47:35] reader: done. 1 scr changes
Encoding: task 1 of 1, 98.86 % (24.74 fps, avg 29.27 fps, ETA 00h00m01s)[02:47:40] work: average encoding speed for job is 29.266033 fps
Encoding: task 1 of 1, 98.86 % (24.74 fps, avg 29.27 fps, ETA 00h00m01s)[02:47:40] aac-decoder done: 5615 frames, 0 decoder errors
[02:47:40] h264-decoder done: 3591 frames, 0 decoder errors
[02:47:40] sync: got 3591 frames, 3591 expected
[02:47:40] sync: framerate min 29.970 fps, max 29.978 fps, avg 29.974 fps
x264 [info]: frame I:14    Avg QP:18.12  size:129953
x264 [info]: frame P:1570  Avg QP:20.51  size: 19612
x264 [info]: frame B:2007  Avg QP:23.55  size:  4304
x264 [info]: consecutive B-frames:  1.2% 72.7%  0.8% 25.4%
x264 [info]: mb I  I16..4: 21.5% 62.0% 16.5%
x264 [info]: mb P  I16..4:  3.7%  5.8%  0.3%  P16..4: 33.0%  6.9%  4.5%  0.0%  0.0%    skip:45.7%
x264 [info]: mb B  I16..4:  0.4%  0.5%  0.0%  B16..8: 23.5%  0.9%  0.1%  direct: 1.6%  skip:73.0%  L0:40.3% L1:57.1% BI: 2.7%
x264 [info]: 8x8 transform intra:59.4% inter:86.1%
x264 [info]: coded y,uvDC,uvAC intra: 35.4% 66.9% 20.3% inter: 7.6% 15.5% 0.4%
x264 [info]: i16 v,h,dc,p: 30% 36% 16% 18%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 23% 34%  2%  2%  3%  3%  3%  3%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 26% 11%  4%  6%  7%  5%  7%  3%
x264 [info]: i8c dc,h,v,p: 45% 29% 21%  5%
x264 [info]: Weighted P-Frames: Y:0.4% UV:0.4%
x264 [info]: ref P L0: 69.1%  9.5% 14.6%  6.8%  0.0%
x264 [info]: ref B L0: 85.1% 13.8%  1.1%
x264 [info]: ref B L1: 98.8%  1.2%
x264 [info]: kb/s:2754.35
[02:47:40] mux: track 0, 3591 frames, 41247618 bytes, 2753.91 kbps, fifo 2048
[02:47:40] mux: track 1, 5618 frames, 1950953 bytes, 130.26 kbps, fifo 2048
[02:47:40] Finished work at: Wed Mar 18 02:47:40 2020

[02:47:40] libhb: work result = 0

Encode done!

HandBrake has exited.

real	2m6.321s
user	14m48.132s
sys	0m8.245s
nhyone
Bright Spark User
Posts: 252
Joined: Fri Jul 24, 2015 4:13 am

Re: CLI much slower than GUI version; using custom preset

Post by nhyone »

CLI is using medium preset.
Deleted User 11865

Re: CLI much slower than GUI version; using custom preset

Post by Deleted User 11865 »

You're importing the preset from the file but not actually using the preset (--preset="Preset_name")…
User avatar
JohnAStebbins
HandBrake Team
Posts: 5722
Joined: Sat Feb 09, 2008 7:21 pm

Re: CLI much slower than GUI version; using custom preset

Post by JohnAStebbins »

The reason for this behaivor is that a preset file can contain multiple presets, so you must specify which of these presets to use. Also, the "--preset-import-file" argument can be a list of files or a directory containing several preset files.
MagNj
Posts: 2
Joined: Wed Mar 18, 2020 4:47 am

Re: CLI much slower than GUI version; using custom preset

Post by MagNj »

Ah got it, thanks a lot! Tried with the following and much better:
time HandBrakeCLI --preset-import-file /Users/testuser/Desktop/Ultra_Fast_480p30.json -Z "Ultra Fast 480p30" -i /Users/testuser/Movies/test.mov -o /Users/testuser/Movies/test-CLI.mp4
real 0m26.291s
user 2m24.204s
sys 0m2.856s
Post Reply