Using Video ToolBox on M1 Max Powerbook

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.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

Ritsuka wrote: Thu Dec 09, 2021 7:12 am Commit ce52b4d755a2799a4801f256622b8e8191e71220 ( https://github.com/HandBrake/HandBrake/ ... 8191e71220 ) should fix the slow VideoToolbox speed on M1 Pro and Max.
HandBrake XPC service getting stuck on the efficiency cores after pausing an encode is still not fixed yet.
Cool.

Will that be showing up in a snapshot build soon?

-- Thanks, Verne
User avatar
Ritsuka
HandBrake Team
Posts: 1387
Joined: Fri Jan 12, 2007 11:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by Ritsuka »

It's in the latest snapshot.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

Ritsuka wrote: Fri Dec 10, 2021 8:43 am It's in the latest snapshot.
Woo hoo ... 56 FPS to 288 FPS for 1080p, and 45 minutes for a 1:48:08 transcode down to 9 minutes. The SD transcode goes from 226 FPS to around 340.

Of course there's a couple of hairballs like your XPC problem and the FPS meter, but this certainly fixes the primary problem!

This may make moving transcodes from my iMac to the MacBook Pro worthwhile, even if I have to copy the transcoded files over the network to the iMac where the intermediate storage sits ... or maybe I'll transcode directly out to an iMac share and save a step. That'll slow down the transcode to intermediate storage speeds, but even at these transcode speeds output should be well below the output potential of a 6 TB intermediate drive share on a gigabit switch.

You guys have rock! Thank You :D .

-- Verne
User avatar
Rodeo
HandBrake Team
Posts: 12942
Joined: Tue Mar 03, 2009 8:55 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by Rodeo »

XPC problems?
User avatar
Ritsuka
HandBrake Team
Posts: 1387
Joined: Fri Jan 12, 2007 11:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by Ritsuka »

https://github.com/HandBrake/HandBrake/issues/3933 , on Monterey the XPC service get stuck on a background priority queue after pausing it.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

Rodeo wrote: Fri Dec 10, 2021 4:38 pmXPC problems?
Someone mentioned something about pausing encodes on high efficiency cores.

I'd imagine the termination message never gets through and the process never comes down and is forever waiting for more work or something.

That's the nice thing about software development for one organization is continued employment - there's always a ton of lower priority issues lurking in the background.

I'm just glad I'm retired now, with no endless queue of work sitting before me.

Well, there actually is an endless queue of work, but after years of experience I know how to evade the little lady :).
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

You know, I was monitoring a transcode of that same video on my 2020 Intel core-i9 iMac and the 2021 MacBook Pro and noticed very similar FPS rates between the two.

On the Intel I ran about 50% CPU, and on the MacBook Pro around 70%. Being that the MacBook Pro's CPUs are about 30% faster, you'd think any scaling and the dual encode engines would make the encode on the MBP quite a bit faster.

iMac Terminal Log:

Code: Select all

21.12.10 18:33:31 Host: Verne-iMac5K, ID: varase, Num: 39, Hist: 1038, RC: 0 [~] % mkv2sd /Volumes/Aux/MakeMKV/Movies ~/Desktop


*** Command to be executed is ***

handbrakecli --input "The Marksman.mkv" -e vt_h265 -r 30 --pfr -a 1 -E ffaac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile auto --h264-level 3.1 --output "/Users/varase/Desktop/The Marksman (HEVC).m4v"

[18:50:10] Compile-time hardening features are enabled
[18:50:10] hb_init: starting libhb thread
[18:50:10] thread 700008be0000 started ("libhb")
HandBrake 20211209215045-557e738fc-master (2021121001) - Darwin x86_64 - https://handbrake.fr
20 CPUs detected
Opening The Marksman.mkv...
[18:50:10] CPU: Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
[18:50:10]  - Intel microarchitecture Comet Lake
[18:50:10]  - logical processor count: 20
[18:50:10] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[18:50:10] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[18:50:10] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[18:50:10] scan: decoding previews for title 1
[18:50:10] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[18:50:10] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[18:50:10] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 10, 100.00 %[18:50:11] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[18:50:11] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[18:50:12] Starting work at: Fri Dec 10 18:50:12 2021

[18:50:12] 1 job(s) to process
[18:50:12] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "DRC": 0.0,
                "Encoder": 16384,
                "Mixdown": 6,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3"
        ],
        "FallbackEncoder": "ffac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/Desktop/The Marksman (HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 402,
                    "width": 960
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "Level": "3.1",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Turbo": false,
        "TwoPass": false
    }
}
[18:50:12] Starting Task: Encoding Pass
[18:50:12] job configuration:
[18:50:12]  * source
[18:50:12]    + The Marksman.mkv
[18:50:12]    + title 1, chapter(s) 1 to 20
[18:50:12]    + container: matroska,webm
[18:50:12]    + data rate: 39906 kbps
[18:50:12]  * destination
[18:50:12]    + /Users/varase/Desktop/The Marksman (HEVC).m4v
[18:50:12]    + container: MPEG-4 (libavformat)
[18:50:12]      + chapter markers
[18:50:12]  * video track
[18:50:12]    + decoder: h264 8-bit (yuv420p)
[18:50:12]    + filters
[18:50:12]      + Framerate Shaper (mode=2:rate=27000000/900000)
[18:50:12]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[18:50:12]      + Crop and Scale (width=960:height=402:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[18:50:12]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 960 * 402
[18:50:12]    + Output geometry
[18:50:12]      + storage dimensions: 960 x 402
[18:50:12]      + pixel aspect ratio: 1 : 1
[18:50:12]      + display dimensions: 960 x 402
[18:50:12]    + encoder: H.265 (VideoToolbox)
[18:50:12]      + preset:  medium
[18:50:12]      + profile: auto
[18:50:12]      + quality: 22.00 (CQ)
[18:50:12]      + color profile: 1-1-1
[18:50:12]      + chroma location: left
[18:50:12]  * audio track 1
[18:50:12]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[18:50:12]      + samplerate: 48000 Hz
[18:50:12]    + mixdown: Dolby Pro Logic II
[18:50:12]    + encoder: AAC (Apple AudioToolbox)
[18:50:12]      + bitrate: 160 kbps, samplerate: 48000 Hz
[18:50:12] sync: expecting 155578 video frames
[18:50:12] encvt_Init: encoding with constant quality 22.000000
[18:50:12] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[18:50:12] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[18:50:12] sync: first pts video is 0
[18:50:12] sync: "Chapter 1" (1) at frame 1 time 0
[18:50:12] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.84 % (315.32 fps, avg 332.44 fps, ETA 00h07m30s)[18:50:30] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.57 % (323.82 fps, avg 331.04 fps, ETA 00h07m05s)[18:50:57] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.90 % (324.55 fps, avg 330.17 fps, ETA 00h06m46s)[18:51:17] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.41 % (321.74 fps, avg 328.02 fps, ETA 00h06m27s)[18:51:39] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.80 % (330.60 fps, avg 327.53 fps, ETA 00h06m02s)[18:52:05] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.89 % (323.06 fps, avg 327.51 fps, ETA 00h05m37s)[18:52:29] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.55 % (329.26 fps, avg 326.83 fps, ETA 00h05m12s)[18:52:56] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.69 % (326.64 fps, avg 326.82 fps, ETA 00h04m57s)[18:53:11] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.06 % (312.21 fps, avg 326.41 fps, ETA 00h04m41s)[18:53:28] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 44.99 % (337.44 fps, avg 326.51 fps, ETA 00h04m22s)[18:53:47] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.99 % (316.00 fps, avg 326.26 fps, ETA 00h04m04s)[18:54:05] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.93 % (307.77 fps, avg 326.02 fps, ETA 00h03m35s)[18:54:34] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.41 % (318.99 fps, avg 325.20 fps, ETA 00h03m15s)[18:54:56] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.69 % (320.36 fps, avg 323.82 fps, ETA 00h02m50s)[18:55:23] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.11 % (315.12 fps, avg 322.82 fps, ETA 00h02m19s)[18:55:55] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.41 % (325.43 fps, avg 321.85 fps, ETA 00h01m49s)[18:56:26] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.21 % (300.16 fps, avg 320.95 fps, ETA 00h01m17s)[18:57:00] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.09 % (317.50 fps, avg 319.98 fps, ETA 00h00m43s)[18:57:35] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.68 % (309.37 fps, avg 319.63 fps, ETA 00h00m30s)[18:57:48] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.92 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] work: average encoding speed for job is 320.884827 fps
[18:58:17] vfr: 155579 frames output, 0 dropped and 0 duped for CFR/PFR
[18:58:17] vfr: lost time: 0 (0 frames)
[18:58:17] vfr: gained time: 0 (0 frames) (0 not accounted for)
Encoding: task 1 of 1, 100.00 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] dca-decoder done: 608339 frames, 0 decoder errors
[18:58:17] h264-decoder done: 155579 frames, 0 decoder errors
[18:58:17] sync: got 155579 frames, 155578 expected
[18:58:17] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[18:58:17] mux: track 0, 155579 frames, 877815732 bytes, 1082.22 kbps, fifo 4096
[18:58:17] mux: track 1, 304172 frames, 132760627 bytes, 163.68 kbps, fifo 8192
[18:58:17] Finished work at: Fri Dec 10 18:58:17 2021

[18:58:17] libhb: work result = 0

Encode done!

HandBrake has exited.

21.12.10 18:58:17 Host: Verne-iMac5K, ID: varase, Num: 40, Hist: 1039, RC: 0 [~] %
MacBook Pro Terminal Log:

Code: Select all

21.12.10 18:46:38 Host: Verne-MBP16, ID: varase, Num: 19, Hist: 560, RC: 0 [~] % mkv2sd ~/RIPs/MakeMKV/Movies ~/RIPs/Videos 


*** Command to be executed is ***

handbrakecli --input "The Marksman.mkv" -e vt_h265 -r 30 --pfr -a 1 -E ffaac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile auto --h264-level 3.1 --output "/Users/varase/RIPs/Videos/The Marksman (HEVC).m4v"

[18:47:05] Compile-time hardening features are enabled
[18:47:05] hb_init: starting libhb thread
[18:47:05] thread 16dbdf000 started ("libhb")
HandBrake 20211209215045-557e738fc-master (2021121001) - Darwin arm64 - https://handbrake.fr
10 CPUs detected
Opening The Marksman.mkv...
[18:47:05] CPU: 
[18:47:05]  - logical processor count: 10
[18:47:05] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[18:47:05] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[18:47:05] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[18:47:05] scan: decoding previews for title 1
[18:47:05] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[18:47:05] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[18:47:05] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[18:47:06] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[18:47:06] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[18:47:06] Starting work at: Fri Dec 10 18:47:06 2021

[18:47:06] 1 job(s) to process
[18:47:06] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "DRC": 0.0,
                "Encoder": 16384,
                "Mixdown": 6,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3"
        ],
        "FallbackEncoder": "ffac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/RIPs/Videos/The Marksman (HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 402,
                    "width": 960
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "Level": "3.1",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Turbo": false,
        "TwoPass": false
    }
}
[18:47:06] Starting Task: Encoding Pass
[18:47:06] job configuration:
[18:47:06]  * source
[18:47:06]    + The Marksman.mkv
[18:47:06]    + title 1, chapter(s) 1 to 20
[18:47:06]    + container: matroska,webm
[18:47:06]    + data rate: 39906 kbps
[18:47:06]  * destination
[18:47:06]    + /Users/varase/RIPs/Videos/The Marksman (HEVC).m4v
[18:47:06]    + container: MPEG-4 (libavformat)
[18:47:06]      + chapter markers
[18:47:06]  * video track
[18:47:06]    + decoder: h264 8-bit (yuv420p)
[18:47:06]    + filters
[18:47:06]      + Framerate Shaper (mode=2:rate=27000000/900000)
[18:47:06]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[18:47:06]      + Crop and Scale (width=960:height=402:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[18:47:06]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 960 * 402
[18:47:06]    + Output geometry
[18:47:06]      + storage dimensions: 960 x 402
[18:47:06]      + pixel aspect ratio: 1 : 1
[18:47:06]      + display dimensions: 960 x 402
[18:47:06]    + encoder: H.265 (VideoToolbox)
[18:47:06]      + preset:  medium
[18:47:06]      + profile: auto
[18:47:06]      + quality: 22.00 (CQ)
[18:47:06]      + color profile: 1-1-1
[18:47:06]      + chroma location: left
[18:47:06]  * audio track 1
[18:47:06]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[18:47:06]      + samplerate: 48000 Hz
[18:47:06]    + mixdown: Dolby Pro Logic II
[18:47:06]    + encoder: AAC (Apple AudioToolbox)
[18:47:06]      + bitrate: 160 kbps, samplerate: 48000 Hz
[18:47:06] sync: expecting 155578 video frames
[18:47:06] encvt_Init: encoding with constant quality 22.000000
[18:47:06] sync: first pts video is 0
[18:47:06] sync: "Chapter 1" (1) at frame 1 time 0
[18:47:06] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.79 % (322.52 fps, avg 336.68 fps, ETA 00h07m24s)[18:47:24] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.59 % (296.49 fps, avg 318.63 fps, ETA 00h07m21s)[18:47:53] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.87 % (319.42 fps, avg 319.52 fps, ETA 00h06m59s)[18:48:14] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.44 % (344.13 fps, avg 316.44 fps, ETA 00h06m40s)[18:48:37] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.82 % (335.66 fps, avg 320.25 fps, ETA 00h06m11s)[18:49:02] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.87 % (310.38 fps, avg 319.01 fps, ETA 00h05m47s)[18:49:27] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.53 % (315.51 fps, avg 318.16 fps, ETA 00h05m20s)[18:49:55] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.64 % (346.01 fps, avg 318.07 fps, ETA 00h05m05s)[18:50:11] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.04 % (333.22 fps, avg 318.80 fps, ETA 00h04m48s)[18:50:27] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 45.02 % (344.27 fps, avg 319.44 fps, ETA 00h04m28s)[18:50:46] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.96 % (352.57 fps, avg 320.33 fps, ETA 00h04m08s)[18:51:04] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.92 % (302.99 fps, avg 318.90 fps, ETA 00h03m39s)[18:51:34] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.40 % (325.38 fps, avg 318.71 fps, ETA 00h03m19s)[18:51:56] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.71 % (337.52 fps, avg 319.31 fps, ETA 00h02m52s)[18:52:22] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.10 % (357.64 fps, avg 318.84 fps, ETA 00h02m21s)[18:52:53] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.41 % (319.71 fps, avg 318.20 fps, ETA 00h01m51s)[18:53:25] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.17 % (339.05 fps, avg 317.68 fps, ETA 00h01m17s)[18:53:59] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.09 % (358.20 fps, avg 318.77 fps, ETA 00h00m43s)[18:54:31] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.64 % (294.56 fps, avg 318.21 fps, ETA 00h00m31s)[18:54:44] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.95 % (379.58 fps, avg 322.39 fps, ETA 00h00m01s)[18:55:08] reader: done. 1 scr changes
[18:55:08] work: average encoding speed for job is 322.385437 fps
Encoding: task 1 of 1, 100.00 % (379.58 fps, avg 322.39 fps, ETA 00h00m01s)[18:55:09] vfr: 155579 frames output, 0 dropped and 0 duped for CFR/PFR
[18:55:09] vfr: lost time: 0 (0 frames)
[18:55:09] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:55:09] dca-decoder done: 608339 frames, 0 decoder errors
[18:55:09] h264-decoder done: 155579 frames, 0 decoder errors
[18:55:09] sync: got 155579 frames, 155578 expected
[18:55:09] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[18:55:09] mux: track 0, 155579 frames, 221671026 bytes, 273.29 kbps, fifo 8192
[18:55:09] mux: track 1, 304172 frames, 132762145 bytes, 163.68 kbps, fifo 16384
[18:55:09] Finished work at: Fri Dec 10 18:55:09 2021

[18:55:09] libhb: work result = 0

Encode done!

HandBrake has exited.

21.12.10 18:55:09 Host: Verne-MBP16, ID: varase, Num: 20, Hist: 561, RC: 0 [~] % 
What do you think?
User avatar
Ritsuka
HandBrake Team
Posts: 1387
Joined: Fri Jan 12, 2007 11:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by Ritsuka »

videotoolbox constant quality does not work on intel, it encoded your file at a random bitrate.
User avatar
s55
HandBrake Team
Posts: 10168
Joined: Sun Dec 24, 2006 1:05 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by s55 »

On the Intel I ran about 50% CPU, and on the MacBook Pro around 70%. Being that the MacBook Pro's CPUs are about 30% faster, you'd think any scaling and the dual encode engines would make the encode on the MBP quite a bit faster.
I would expect the dual encode engines are setup for multi-stream. Thus, won't make any difference for single encodes.

Also, 30% faster is a bit mis-leading to say as it doesn't apply to all applications the same way. Intrinsics optimisations play a big part in Handbrake's (and the underlying libraries it uses) performance. ARM is a bit more limited in this area. Also, the underlying libraries are likely less optimised for ARM intrinsic's. Might get a bit better over the next couple of years as more ARM devices show up but I'm not expecting any breakthroughs.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

s55 wrote: Sat Dec 11, 2021 10:23 am
On the Intel I ran about 50% CPU, and on the MacBook Pro around 70%. Being that the MacBook Pro's CPUs are about 30% faster, you'd think any scaling and the dual encode engines would make the encode on the MBP quite a bit faster.
I would expect the dual encode engines are setup for multi-stream. Thus, won't make any difference for single encodes.

Also, 30% faster is a bit mis-leading to say as it doesn't apply to all applications the same way. Intrinsics optimisations play a big part in Handbrake's (and the underlying libraries it uses) performance. ARM is a bit more limited in this area. Also, the underlying libraries are likely less optimised for ARM intrinsic's. Might get a bit better over the next couple of years as more ARM devices show up but I'm not expecting any breakthroughs.
Well, for a 1080p transcode (no scaling) the Intel transcode (I presume using the T2 chip since the target is HEVC) takes 16:55, while the MacBook Pro using the Media Engine took 9:03.

Since transcodes are faster multicore, doesn't that mean they're doing something like passing off work to daughter processes between keyframes or something?

Also, Apple's been doing ARM development on the iPhone since probably 2005 or so, so I'd imagine that bitscaling is deeply embedded in the core image frameworks and may have been optimized a bit in the last 16 years. Does Handbrake do their own scaling or do they rely on system facilities?
User avatar
s55
HandBrake Team
Posts: 10168
Joined: Sun Dec 24, 2006 1:05 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by s55 »

Well, for a 1080p transcode (no scaling) the Intel transcode (I presume using the T2 chip since the target is HEVC) takes 16:55, while the MacBook Pro using the Media Engine took 9:03.

Since transcodes are faster multicore, doesn't that mean they're doing something like passing off work to daughter processes between keyframes or something?
Apple unfortunately is a bit of a blackbox with the fine details.

Based on the performance numbers you are seeing, I'd make an educated guess that it's actually just a beefed up single unit, or the pipeline is just running better on M1 or a mixture of both. I'd have expected far better performance if it was running 2 separate instances. Typically hardware encoders are not built with load sharing in mind. I'd expect this is setup for multi-stream (i.e. Final Cut type workflows with multiple tracks)

For comparison, the performance is in the ballpark of a single Intel QuickSync encode engine running.
Also, Apple's been doing ARM development on the iPhone since probably 2005 or so, so I'd imagine that bitscaling is deeply embedded in the core image frameworks and may have been optimized a bit in the last 16 years. Does Handbrake do their own scaling or do they rely on system facilities?
When using VideoToolbox, the only part of the pipeline that's using hardware acceleration is the video encoder. Everything else is done in software and not using Apple API's. We use libavcodec for filtering as it's far more advanced than anything Apple offers. Not that it actually matters much, crop/scale is only a small % of the pipeline cost typically.
User avatar
Rodeo
HandBrake Team
Posts: 12942
Joined: Tue Mar 03, 2009 8:55 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by Rodeo »

Ritsuka wrote: Sat Dec 11, 2021 6:30 am videotoolbox constant quality does not work on intel, it encoded your file at a random bitrate.
Isn't it possible the encode is running on the T2 chip on a Retina 5K iMac?

BTW, VT is opaque enough that it should be worthwhile to always write the encoder ID to the encode log, IMO.
User avatar
Ritsuka
HandBrake Team
Posts: 1387
Joined: Fri Jan 12, 2007 11:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by Ritsuka »

That's a good idea, I added a log call that prints it.
I don't think constant quality is supported on the T2, but if you can try. The encoderID ending in ave is the T2, gva is Intel or AMD.
User avatar
Rodeo
HandBrake Team
Posts: 12942
Joined: Tue Mar 03, 2009 8:55 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by Rodeo »

I have T2 (MacBook Pro) but not Big Sur, IIRC there's also no CQ support on Catalina regardless of encoder (plus, I think the HB code won't allow CQ on Catalina anyway). I might try a more permissive personal build at some point, but not high priority for me, sorry.

Planning on moving to Big Sur soon, will give it a try then.
User avatar
Rodeo
HandBrake Team
Posts: 12942
Joined: Tue Mar 03, 2009 8:55 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by Rodeo »

varase wrote: Sat Dec 11, 2021 1:08 amiMac Terminal Log:

Code: Select all

21.12.10 18:33:31 Host: Verne-iMac5K, ID: varase, Num: 39, Hist: 1038, RC: 0 [~] % mkv2sd /Volumes/Aux/MakeMKV/Movies ~/Desktop


*** Command to be executed is ***

handbrakecli --input "The Marksman.mkv" -e vt_h265 -r 30 --pfr -a 1 -E ffaac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile auto --h264-level 3.1 --output "/Users/varase/Desktop/The Marksman (HEVC).m4v"

[18:50:10] Compile-time hardening features are enabled
[18:50:10] hb_init: starting libhb thread
[18:50:10] thread 700008be0000 started ("libhb")
HandBrake 20211209215045-557e738fc-master (2021121001) - Darwin x86_64 - https://handbrake.fr
20 CPUs detected
Opening The Marksman.mkv...
[18:50:10] CPU: Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
[18:50:10]  - Intel microarchitecture Comet Lake
[18:50:10]  - logical processor count: 20
[18:50:10] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[18:50:10] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[18:50:10] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[18:50:10] scan: decoding previews for title 1
[18:50:10] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[18:50:10] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[18:50:10] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 10, 100.00 %[18:50:11] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[18:50:11] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[18:50:12] Starting work at: Fri Dec 10 18:50:12 2021

[18:50:12] 1 job(s) to process
[18:50:12] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "DRC": 0.0,
                "Encoder": 16384,
                "Mixdown": 6,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3"
        ],
        "FallbackEncoder": "ffac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/Desktop/The Marksman (HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 402,
                    "width": 960
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "Level": "3.1",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Turbo": false,
        "TwoPass": false
    }
}
[18:50:12] Starting Task: Encoding Pass
[18:50:12] job configuration:
[18:50:12]  * source
[18:50:12]    + The Marksman.mkv
[18:50:12]    + title 1, chapter(s) 1 to 20
[18:50:12]    + container: matroska,webm
[18:50:12]    + data rate: 39906 kbps
[18:50:12]  * destination
[18:50:12]    + /Users/varase/Desktop/The Marksman (HEVC).m4v
[18:50:12]    + container: MPEG-4 (libavformat)
[18:50:12]      + chapter markers
[18:50:12]  * video track
[18:50:12]    + decoder: h264 8-bit (yuv420p)
[18:50:12]    + filters
[18:50:12]      + Framerate Shaper (mode=2:rate=27000000/900000)
[18:50:12]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[18:50:12]      + Crop and Scale (width=960:height=402:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[18:50:12]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 960 * 402
[18:50:12]    + Output geometry
[18:50:12]      + storage dimensions: 960 x 402
[18:50:12]      + pixel aspect ratio: 1 : 1
[18:50:12]      + display dimensions: 960 x 402
[18:50:12]    + encoder: H.265 (VideoToolbox)
[18:50:12]      + preset:  medium
[18:50:12]      + profile: auto
[18:50:12]      + quality: 22.00 (CQ)
[18:50:12]      + color profile: 1-1-1
[18:50:12]      + chroma location: left
[18:50:12]  * audio track 1
[18:50:12]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[18:50:12]      + samplerate: 48000 Hz
[18:50:12]    + mixdown: Dolby Pro Logic II
[18:50:12]    + encoder: AAC (Apple AudioToolbox)
[18:50:12]      + bitrate: 160 kbps, samplerate: 48000 Hz
[18:50:12] sync: expecting 155578 video frames
[18:50:12] encvt_Init: encoding with constant quality 22.000000
[18:50:12] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[18:50:12] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[18:50:12] sync: first pts video is 0
[18:50:12] sync: "Chapter 1" (1) at frame 1 time 0
[18:50:12] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.84 % (315.32 fps, avg 332.44 fps, ETA 00h07m30s)[18:50:30] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.57 % (323.82 fps, avg 331.04 fps, ETA 00h07m05s)[18:50:57] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.90 % (324.55 fps, avg 330.17 fps, ETA 00h06m46s)[18:51:17] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.41 % (321.74 fps, avg 328.02 fps, ETA 00h06m27s)[18:51:39] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.80 % (330.60 fps, avg 327.53 fps, ETA 00h06m02s)[18:52:05] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.89 % (323.06 fps, avg 327.51 fps, ETA 00h05m37s)[18:52:29] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.55 % (329.26 fps, avg 326.83 fps, ETA 00h05m12s)[18:52:56] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.69 % (326.64 fps, avg 326.82 fps, ETA 00h04m57s)[18:53:11] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.06 % (312.21 fps, avg 326.41 fps, ETA 00h04m41s)[18:53:28] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 44.99 % (337.44 fps, avg 326.51 fps, ETA 00h04m22s)[18:53:47] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.99 % (316.00 fps, avg 326.26 fps, ETA 00h04m04s)[18:54:05] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.93 % (307.77 fps, avg 326.02 fps, ETA 00h03m35s)[18:54:34] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.41 % (318.99 fps, avg 325.20 fps, ETA 00h03m15s)[18:54:56] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.69 % (320.36 fps, avg 323.82 fps, ETA 00h02m50s)[18:55:23] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.11 % (315.12 fps, avg 322.82 fps, ETA 00h02m19s)[18:55:55] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.41 % (325.43 fps, avg 321.85 fps, ETA 00h01m49s)[18:56:26] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.21 % (300.16 fps, avg 320.95 fps, ETA 00h01m17s)[18:57:00] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.09 % (317.50 fps, avg 319.98 fps, ETA 00h00m43s)[18:57:35] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.68 % (309.37 fps, avg 319.63 fps, ETA 00h00m30s)[18:57:48] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.92 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] work: average encoding speed for job is 320.884827 fps
[18:58:17] vfr: 155579 frames output, 0 dropped and 0 duped for CFR/PFR
[18:58:17] vfr: lost time: 0 (0 frames)
[18:58:17] vfr: gained time: 0 (0 frames) (0 not accounted for)
Encoding: task 1 of 1, 100.00 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] dca-decoder done: 608339 frames, 0 decoder errors
[18:58:17] h264-decoder done: 155579 frames, 0 decoder errors
[18:58:17] sync: got 155579 frames, 155578 expected
[18:58:17] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[18:58:17] mux: track 0, 155579 frames, 877815732 bytes, 1082.22 kbps, fifo 4096
[18:58:17] mux: track 1, 304172 frames, 132760627 bytes, 163.68 kbps, fifo 8192
[18:58:17] Finished work at: Fri Dec 10 18:58:17 2021

[18:58:17] libhb: work result = 0

Encode done!

HandBrake has exited.

21.12.10 18:58:17 Host: Verne-iMac5K, ID: varase, Num: 40, Hist: 1039, RC: 0 [~] %
In the meantime, would be interesting to know which encoder is being used on the iMac (whenever the next snapshot is released).
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

Rodeo wrote: Sun Dec 12, 2021 1:22 am
varase wrote: Sat Dec 11, 2021 1:08 amiMac Terminal Log:

Code: Select all

21.12.10 18:33:31 Host: Verne-iMac5K, ID: varase, Num: 39, Hist: 1038, RC: 0 [~] % mkv2sd /Volumes/Aux/MakeMKV/Movies ~/Desktop


*** Command to be executed is ***

handbrakecli --input "The Marksman.mkv" -e vt_h265 -r 30 --pfr -a 1 -E ffaac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile auto --h264-level 3.1 --output "/Users/varase/Desktop/The Marksman (HEVC).m4v"

[18:50:10] Compile-time hardening features are enabled
[18:50:10] hb_init: starting libhb thread
[18:50:10] thread 700008be0000 started ("libhb")
HandBrake 20211209215045-557e738fc-master (2021121001) - Darwin x86_64 - https://handbrake.fr
20 CPUs detected
Opening The Marksman.mkv...
[18:50:10] CPU: Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
[18:50:10]  - Intel microarchitecture Comet Lake
[18:50:10]  - logical processor count: 20
[18:50:10] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[18:50:10] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[18:50:10] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[18:50:10] scan: decoding previews for title 1
[18:50:10] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[18:50:10] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[18:50:10] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 10, 100.00 %[18:50:11] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[18:50:11] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[18:50:12] Starting work at: Fri Dec 10 18:50:12 2021

[18:50:12] 1 job(s) to process
[18:50:12] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "DRC": 0.0,
                "Encoder": 16384,
                "Mixdown": 6,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3"
        ],
        "FallbackEncoder": "ffac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/Desktop/The Marksman (HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 402,
                    "width": 960
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "Level": "3.1",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Turbo": false,
        "TwoPass": false
    }
}
[18:50:12] Starting Task: Encoding Pass
[18:50:12] job configuration:
[18:50:12]  * source
[18:50:12]    + The Marksman.mkv
[18:50:12]    + title 1, chapter(s) 1 to 20
[18:50:12]    + container: matroska,webm
[18:50:12]    + data rate: 39906 kbps
[18:50:12]  * destination
[18:50:12]    + /Users/varase/Desktop/The Marksman (HEVC).m4v
[18:50:12]    + container: MPEG-4 (libavformat)
[18:50:12]      + chapter markers
[18:50:12]  * video track
[18:50:12]    + decoder: h264 8-bit (yuv420p)
[18:50:12]    + filters
[18:50:12]      + Framerate Shaper (mode=2:rate=27000000/900000)
[18:50:12]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[18:50:12]      + Crop and Scale (width=960:height=402:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[18:50:12]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 960 * 402
[18:50:12]    + Output geometry
[18:50:12]      + storage dimensions: 960 x 402
[18:50:12]      + pixel aspect ratio: 1 : 1
[18:50:12]      + display dimensions: 960 x 402
[18:50:12]    + encoder: H.265 (VideoToolbox)
[18:50:12]      + preset:  medium
[18:50:12]      + profile: auto
[18:50:12]      + quality: 22.00 (CQ)
[18:50:12]      + color profile: 1-1-1
[18:50:12]      + chroma location: left
[18:50:12]  * audio track 1
[18:50:12]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[18:50:12]      + samplerate: 48000 Hz
[18:50:12]    + mixdown: Dolby Pro Logic II
[18:50:12]    + encoder: AAC (Apple AudioToolbox)
[18:50:12]      + bitrate: 160 kbps, samplerate: 48000 Hz
[18:50:12] sync: expecting 155578 video frames
[18:50:12] encvt_Init: encoding with constant quality 22.000000
[18:50:12] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[18:50:12] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[18:50:12] sync: first pts video is 0
[18:50:12] sync: "Chapter 1" (1) at frame 1 time 0
[18:50:12] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.84 % (315.32 fps, avg 332.44 fps, ETA 00h07m30s)[18:50:30] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.57 % (323.82 fps, avg 331.04 fps, ETA 00h07m05s)[18:50:57] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.90 % (324.55 fps, avg 330.17 fps, ETA 00h06m46s)[18:51:17] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.41 % (321.74 fps, avg 328.02 fps, ETA 00h06m27s)[18:51:39] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.80 % (330.60 fps, avg 327.53 fps, ETA 00h06m02s)[18:52:05] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.89 % (323.06 fps, avg 327.51 fps, ETA 00h05m37s)[18:52:29] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.55 % (329.26 fps, avg 326.83 fps, ETA 00h05m12s)[18:52:56] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.69 % (326.64 fps, avg 326.82 fps, ETA 00h04m57s)[18:53:11] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.06 % (312.21 fps, avg 326.41 fps, ETA 00h04m41s)[18:53:28] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 44.99 % (337.44 fps, avg 326.51 fps, ETA 00h04m22s)[18:53:47] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.99 % (316.00 fps, avg 326.26 fps, ETA 00h04m04s)[18:54:05] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.93 % (307.77 fps, avg 326.02 fps, ETA 00h03m35s)[18:54:34] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.41 % (318.99 fps, avg 325.20 fps, ETA 00h03m15s)[18:54:56] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.69 % (320.36 fps, avg 323.82 fps, ETA 00h02m50s)[18:55:23] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.11 % (315.12 fps, avg 322.82 fps, ETA 00h02m19s)[18:55:55] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.41 % (325.43 fps, avg 321.85 fps, ETA 00h01m49s)[18:56:26] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.21 % (300.16 fps, avg 320.95 fps, ETA 00h01m17s)[18:57:00] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.09 % (317.50 fps, avg 319.98 fps, ETA 00h00m43s)[18:57:35] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.68 % (309.37 fps, avg 319.63 fps, ETA 00h00m30s)[18:57:48] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.92 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] work: average encoding speed for job is 320.884827 fps
[18:58:17] vfr: 155579 frames output, 0 dropped and 0 duped for CFR/PFR
[18:58:17] vfr: lost time: 0 (0 frames)
[18:58:17] vfr: gained time: 0 (0 frames) (0 not accounted for)
Encoding: task 1 of 1, 100.00 % (346.34 fps, avg 320.88 fps, ETA 00h00m00s)[18:58:17] dca-decoder done: 608339 frames, 0 decoder errors
[18:58:17] h264-decoder done: 155579 frames, 0 decoder errors
[18:58:17] sync: got 155579 frames, 155578 expected
[18:58:17] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[18:58:17] mux: track 0, 155579 frames, 877815732 bytes, 1082.22 kbps, fifo 4096
[18:58:17] mux: track 1, 304172 frames, 132760627 bytes, 163.68 kbps, fifo 8192
[18:58:17] Finished work at: Fri Dec 10 18:58:17 2021

[18:58:17] libhb: work result = 0

Encode done!

HandBrake has exited.

21.12.10 18:58:17 Host: Verne-iMac5K, ID: varase, Num: 40, Hist: 1039, RC: 0 [~] %
In the meantime, would be interesting to know which encoder is being used on the iMac (whenever the next snapshot is released).
I ran the exact same script and handbrakecli version on both the Intel iMac 2020, core-i9 3.6 ghz 10 core 20 thread, 128 GB, 4 TB SSD, Radeon Pro 5700 XT with 16 GB as the 2021 MacBook Pro, M1 Max with 32 GPU cores, 32 GB RAM, 2 TB SSD.

Doesn't the output from the terminal command tell you?
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

There machines are running Monterey 12.0.1.

Pretty sure HEVC in QuickSync is a more recent development than the 10910 used in the iMac.

Like I said though, the transcode of Blu Ray MKV to 1080p HEVC runs about twice as quick on the M1 Max as on the (I presume) T2 in the iMac.

So ... what I was wondering is if there is scaling involved, is there another code path which may have the same problem that the 1080p HEVC (non-scaled) transcode had?
User avatar
Rodeo
HandBrake Team
Posts: 12942
Joined: Tue Mar 03, 2009 8:55 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by Rodeo »

varase wrote: Sun Dec 12, 2021 2:31 am
Rodeo wrote: Sun Dec 12, 2021 1:22 am In the meantime, would be interesting to know which encoder is being used on the iMac (whenever the next snapshot is released).
I ran the exact same script and handbrakecli version on both the Intel iMac 2020, core-i9 3.6 ghz 10 core 20 thread, 128 GB, 4 TB SSD, Radeon Pro 5700 XT with 16 GB as the 2021 MacBook Pro, M1 Max with 32 GPU cores, 32 GB RAM, 2 TB SSD.

Doesn't the output from the terminal command tell you?
Only that it's using a hardware-accelerated encoder via the VideoToolBox API… but not wich one. On recent Intel-based Macs, there are at least two encoders (one on the Intel integrated graphics, and one on the T2 chip).

Ritsuka only added the line logging which encoder is being used by VideoToolBox a few hours ago.
AgentMax
Posts: 6
Joined: Sat Dec 04, 2021 8:18 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by AgentMax »

Ritsuka wrote: Fri Dec 10, 2021 8:43 am It's in the latest snapshot.
Yes working now on my M1 Pro. Thank you.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

Here's my latest experience using the latest snapshot build of Handbrake to transcode a Blu Ray 1080p MKV Rip to 1080p HEVC and SD HEVC:

MacBook Pro 16, M1 Max with 32 GPU cores, 32 GB RAM, 2 TB SSD:

Code: Select all

21.12.18 05:27:46 Host: Verne-MBP16, ID: varase, Num: 8, Hist: 604, RC: 0 [~] % mkv2m4v ~/RIPs/MakeMKV/Movies ~/RIPs/Videos


*** Command to be executed is ***

transcode-video --quick --encoder vt_h265 --m4v --output "/Users/varase/RIPs/Videos/The Marksman (1080p HEVC).m4v" "/Users/varase/RIPs/MakeMKV/Movies/The Marksman.mkv"

[09:28:54] Compile-time hardening features are enabled
[09:28:54] hb_init: starting libhb thread
[09:28:54] thread 16f393000 started ("libhb")
HandBrake 20211213190809-622f91044-master (2021121701) - Darwin arm64 - https://handbrake.fr
10 CPUs detected
Opening The Marksman.mkv...
[09:28:54] CPU: 
[09:28:54]  - logical processor count: 10
[09:28:54] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[09:28:54] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[09:28:54] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[09:28:54] scan: decoding previews for title 1
[09:28:54] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[09:28:54] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[09:28:54] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[09:28:55] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[09:28:55] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[09:28:55] Starting work at: Sat Dec 18 09:28:55 2021

[09:28:55] 1 job(s) to process
[09:28:55] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Encoder": 16384,
                "Mixdown": 4,
                "Track": 0
            },
            {
                "Encoder": 2048,
                "Mixdown": -1,
                "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": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/RIPs/Videos/The Marksman (1080p HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1080,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "Bitrate": 6000,
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Turbo": false,
        "TwoPass": false
    }
}
[09:28:55] Starting Task: Encoding Pass
[09:28:55] Skipping vfr filter
[09:28:55] Skipping crop/scale filter
[09:28:55] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[09:28:55] work: mixdown not specified, track 2 setting mixdown 5.1 Channels
[09:28:55] work: bitrate not specified, track 2 setting bitrate 640 Kbps
[09:28:55] job configuration:
[09:28:55]  * source
[09:28:55]    + The Marksman.mkv
[09:28:55]    + title 1, chapter(s) 1 to 20
[09:28:55]    + container: matroska,webm
[09:28:55]    + data rate: 39906 kbps
[09:28:55]  * destination
[09:28:55]    + /Users/varase/RIPs/Videos/The Marksman (1080p HEVC).m4v
[09:28:55]    + container: MPEG-4 (libavformat)
[09:28:55]      + chapter markers
[09:28:55]  * video track
[09:28:55]    + decoder: h264 8-bit (yuv420p)
[09:28:55]    + Output geometry
[09:28:55]      + storage dimensions: 1920 x 1080
[09:28:55]      + pixel aspect ratio: 1 : 1
[09:28:55]      + display dimensions: 1920 x 1080
[09:28:55]    + encoder: H.265 (VideoToolbox)
[09:28:55]      + bitrate: 6000 kbps, pass: 0
[09:28:55]      + color profile: 1-1-1
[09:28:55]      + chroma location: left
[09:28:55]  * audio track 1
[09:28:55]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[09:28:55]      + samplerate: 48000 Hz
[09:28:55]    + mixdown: Stereo
[09:28:55]    + encoder: AAC (Apple AudioToolbox)
[09:28:55]      + bitrate: 160 kbps, samplerate: 48000 Hz
[09:28:55]  * audio track 2
[09:28:55]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[09:28:55]      + samplerate: 48000 Hz
[09:28:55]    + mixdown: 5.1 Channels
[09:28:55]    + encoder: AC3 (libavcodec)
[09:28:55]      + bitrate: 640 kbps, samplerate: 48000 Hz
[09:28:55] sync: expecting 155578 video frames
[09:28:55] encvt_Init: encoding with output bitrate 6000 Kbps
[09:28:55] encvt_Init: com.apple.videotoolbox.videoencoder.ave.hevc
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open file VIDEO_TS.IFO.
Encoding: task 1 of 1, 0.00 %[09:28:55] sync: first pts video is 0
[09:28:55] sync: "Chapter 1" (1) at frame 1 time 0
[09:28:55] sync: first pts audio 0x1 is 0
[09:28:55] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.86 % (283.86 fps, avg 285.76 fps, ETA 00h08m44s)[09:29:16] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.59 % (284.78 fps, avg 285.39 fps, ETA 00h08m13s)[09:29:48] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.86 % (286.99 fps, avg 285.87 fps, ETA 00h07m49s)[09:30:11] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.40 % (287.88 fps, avg 285.80 fps, ETA 00h07m24s)[09:30:36] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.79 % (289.38 fps, avg 285.62 fps, ETA 00h06m55s)[09:31:05] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.87 % (286.98 fps, avg 285.26 fps, ETA 00h06m28s)[09:31:33] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.55 % (290.48 fps, avg 285.42 fps, ETA 00h05m57s)[09:32:04] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.67 % (287.34 fps, avg 285.43 fps, ETA 00h05m39s)[09:32:21] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.03 % (289.64 fps, avg 285.49 fps, ETA 00h05m21s)[09:32:39] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 45.02 % (286.72 fps, avg 285.57 fps, ETA 00h04m59s)[09:33:01] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.95 % (283.65 fps, avg 285.59 fps, ETA 00h04m38s)[09:33:22] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.90 % (286.83 fps, avg 285.54 fps, ETA 00h04m06s)[09:33:55] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.39 % (288.31 fps, avg 285.59 fps, ETA 00h03m41s)[09:34:19] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.70 % (290.81 fps, avg 285.73 fps, ETA 00h03m13s)[09:34:48] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.08 % (290.87 fps, avg 285.61 fps, ETA 00h02m37s)[09:35:23] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.39 % (289.92 fps, avg 285.61 fps, ETA 00h02m04s)[09:35:57] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.19 % (285.39 fps, avg 285.60 fps, ETA 00h01m26s)[09:36:34] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.08 % (287.79 fps, avg 285.64 fps, ETA 00h00m48s)[09:37:12] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.68 % (285.48 fps, avg 285.61 fps, ETA 00h00m34s)[09:37:26] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.96 % (287.54 fps, avg 285.86 fps, ETA 00h00m00s)[09:37:59] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (287.54 fps, avg 285.86 fps, ETA 00h00m00s)[09:38:00] work: average encoding speed for job is 285.862427 fps
[09:38:00] dca-decoder done: 608339 frames, 0 decoder errors
[09:38:00] dca-decoder done: 608339 frames, 0 decoder errors
[09:38:00] h264-decoder done: 155579 frames, 0 decoder errors
[09:38:00] sync: got 155579 frames, 155578 expected
[09:38:00] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[09:38:00] mux: track 0, 155579 frames, 4861508386 bytes, 5993.55 kbps, fifo 2048
[09:38:00] mux: track 1, 304172 frames, 132518652 bytes, 163.38 kbps, fifo 4096
[09:38:00] mux: track 2, 202779 frames, 519114240 bytes, 639.99 kbps, fifo 4096
[09:38:00] Finished work at: Sat Dec 18 09:38:00 2021

[09:38:00] libhb: work result = 0

Encode done!
HandBrake has exited.

Completed: /Users/varase/RIPs/Videos/The Marksman (1080p HEVC).m4v
Elapsed time: 00:09:08



*** Command to be executed is ***

handbrakecli --input "The Marksman.mkv" -e vt_h265 -r 30 --pfr -a 1 -E ffaac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile auto --h264-level 3.1 --output "/Users/varase/RIPs/Videos/The Marksman (HEVC).m4v"

[09:38:01] Compile-time hardening features are enabled
[09:38:01] hb_init: starting libhb thread
[09:38:01] thread 1700b3000 started ("libhb")
HandBrake 20211213190809-622f91044-master (2021121701) - Darwin arm64 - https://handbrake.fr
10 CPUs detected
Opening The Marksman.mkv...
[09:38:01] CPU: 
[09:38:01]  - logical processor count: 10
[09:38:01] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[09:38:01] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[09:38:01] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[09:38:01] scan: decoding previews for title 1
[09:38:01] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[09:38:01] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[09:38:01] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[09:38:02] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[09:38:02] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[09:38:02] Starting work at: Sat Dec 18 09:38:02 2021

[09:38:02] 1 job(s) to process
[09:38:02] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "DRC": 0.0,
                "Encoder": 16384,
                "Mixdown": 6,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3"
        ],
        "FallbackEncoder": "ffac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/RIPs/Videos/The Marksman (HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 402,
                    "width": 960
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "Level": "3.1",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Turbo": false,
        "TwoPass": false
    }
}
[09:38:02] Starting Task: Encoding Pass
[09:38:02] job configuration:
[09:38:02]  * source
[09:38:02]    + The Marksman.mkv
[09:38:02]    + title 1, chapter(s) 1 to 20
[09:38:02]    + container: matroska,webm
[09:38:02]    + data rate: 39906 kbps
[09:38:02]  * destination
[09:38:02]    + /Users/varase/RIPs/Videos/The Marksman (HEVC).m4v
[09:38:02]    + container: MPEG-4 (libavformat)
[09:38:02]      + chapter markers
[09:38:02]  * video track
[09:38:02]    + decoder: h264 8-bit (yuv420p)
[09:38:02]    + filters
[09:38:02]      + Framerate Shaper (mode=2:rate=27000000/900000)
[09:38:02]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[09:38:02]      + Crop and Scale (width=960:height=402:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[09:38:02]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 960 * 402
[09:38:02]    + Output geometry
[09:38:02]      + storage dimensions: 960 x 402
[09:38:02]      + pixel aspect ratio: 1 : 1
[09:38:02]      + display dimensions: 960 x 402
[09:38:02]    + encoder: H.265 (VideoToolbox)
[09:38:02]      + preset:  medium
[09:38:02]      + profile: auto
[09:38:02]      + quality: 22.00 (CQ)
[09:38:02]      + color profile: 1-1-1
[09:38:02]      + chroma location: left
[09:38:02]  * audio track 1
[09:38:02]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[09:38:02]      + samplerate: 48000 Hz
[09:38:02]    + mixdown: Dolby Pro Logic II
[09:38:02]    + encoder: AAC (Apple AudioToolbox)
[09:38:02]      + bitrate: 160 kbps, samplerate: 48000 Hz
[09:38:02] sync: expecting 155578 video frames
[09:38:02] encvt_Init: encoding with constant quality 22.000000
[09:38:02] encvt_Init: com.apple.videotoolbox.videoencoder.ave.hevc
[09:38:02] sync: first pts video is 0
[09:38:02] sync: "Chapter 1" (1) at frame 1 time 0
[09:38:02] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.78 % (319.59 fps, avg 335.45 fps, ETA 00h07m26s)[09:38:20] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.56 % (296.48 fps, avg 317.61 fps, ETA 00h07m23s)[09:38:49] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.89 % (320.22 fps, avg 318.43 fps, ETA 00h07m01s)[09:39:10] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.40 % (337.65 fps, avg 315.36 fps, ETA 00h06m42s)[09:39:33] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.83 % (334.77 fps, avg 319.32 fps, ETA 00h06m11s)[09:39:58] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.86 % (318.63 fps, avg 318.14 fps, ETA 00h05m48s)[09:40:24] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.52 % (313.28 fps, avg 317.26 fps, ETA 00h05m21s)[09:40:52] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.67 % (350.20 fps, avg 317.32 fps, ETA 00h05m05s)[09:41:07] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.01 % (327.51 fps, avg 317.88 fps, ETA 00h04m48s)[09:41:23] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 45.03 % (337.16 fps, avg 318.57 fps, ETA 00h04m28s)[09:41:42] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.96 % (352.10 fps, avg 319.52 fps, ETA 00h04m09s)[09:42:01] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.92 % (303.46 fps, avg 318.11 fps, ETA 00h03m40s)[09:42:31] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.39 % (331.23 fps, avg 317.92 fps, ETA 00h03m19s)[09:42:53] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.70 % (347.60 fps, avg 318.59 fps, ETA 00h02m52s)[09:43:18] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.10 % (343.32 fps, avg 318.03 fps, ETA 00h02m21s)[09:43:50] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.41 % (324.15 fps, avg 317.48 fps, ETA 00h01m51s)[09:44:22] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.22 % (345.48 fps, avg 316.97 fps, ETA 00h01m17s)[09:44:56] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.06 % (346.23 fps, avg 318.00 fps, ETA 00h00m44s)[09:45:28] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.61 % (295.20 fps, avg 317.51 fps, ETA 00h00m31s)[09:45:41] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.88 % (395.94 fps, avg 321.84 fps, ETA 00h00m00s)[09:46:05] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (395.94 fps, avg 321.84 fps, ETA 00h00m00s)[09:46:05] work: average encoding speed for job is 321.837799 fps
[09:46:05] vfr: 155579 frames output, 0 dropped and 0 duped for CFR/PFR
[09:46:05] vfr: lost time: 0 (0 frames)
[09:46:05] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:46:05] dca-decoder done: 608339 frames, 0 decoder errors
[09:46:05] h264-decoder done: 155579 frames, 0 decoder errors
[09:46:05] sync: got 155579 frames, 155578 expected
[09:46:05] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[09:46:06] mux: track 0, 155579 frames, 221671026 bytes, 273.29 kbps, fifo 8192
[09:46:06] mux: track 1, 304172 frames, 132762145 bytes, 163.68 kbps, fifo 16384
[09:46:06] Finished work at: Sat Dec 18 09:46:06 2021

Muxing: this may take awhile...[09:46:06] libhb: work result = 0

Encode done!

HandBrake has exited.

21.12.18 09:46:06 Host: Verne-MBP16, ID: varase, Num: 9, Hist: 605, RC: 0 [~] % 
2020 iMac 5K, core-i9 3.6 ghz 10 core 20 thread 10910, 128 GB RAM, 4 TB SSD, AMD Radeon 5700 XT with 16 GB, 10 gb ethernet:

Code: Select all

21.12.18 05:34:49 Host: Verne-iMac5K, ID: varase, Num: 2, Hist: 1002, RC: 0 [~] % mkv2m4v ~/Movies/MakeMKV ~/Movies/Videos


*** Command to be executed is ***

transcode-video --quick --encoder vt_h265 --m4v --output "/Users/varase/Movies/Videos/The Marksman (1080p HEVC).m4v" "/Users/varase/Movies/MakeMKV/The Marksman.mkv"

[09:28:44] Compile-time hardening features are enabled
[09:28:45] hb_init: starting libhb thread
[09:28:45] thread 7000006fb000 started ("libhb")
HandBrake 20211213190809-622f91044-master (2021121701) - Darwin x86_64 - https://handbrake.fr
20 CPUs detected
Opening The Marksman.mkv...
[09:28:45] CPU: Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
[09:28:45]  - Intel microarchitecture Comet Lake
[09:28:45]  - logical processor count: 20
[09:28:45] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[09:28:45] bd: not a bd - trying as a stream/file instead
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[09:28:45] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[09:28:45] scan: decoding previews for title 1
[09:28:45] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[09:28:45] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[09:28:45] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[09:28:46] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[09:28:46] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[09:28:46] Starting work at: Sat Dec 18 09:28:46 2021

[09:28:46] 1 job(s) to process
[09:28:46] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Encoder": 16384,
                "Mixdown": 4,
                "Track": 0
            },
            {
                "Encoder": 2048,
                "Mixdown": -1,
                "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": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/Movies/Videos/The Marksman (1080p HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 0
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 0,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 0,
                    "height": 1080,
                    "width": 1920
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "Bitrate": 6000,
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Turbo": false,
        "TwoPass": false
    }
}
[09:28:46] Starting Task: Encoding Pass
[09:28:46] Skipping vfr filter
[09:28:46] Skipping crop/scale filter
[09:28:46] work: bitrate not specified, track 1 setting bitrate 160 Kbps
[09:28:46] work: mixdown not specified, track 2 setting mixdown 5.1 Channels
[09:28:46] work: bitrate not specified, track 2 setting bitrate 640 Kbps
[09:28:46] job configuration:
[09:28:46]  * source
[09:28:46]    + The Marksman.mkv
[09:28:46]    + title 1, chapter(s) 1 to 20
[09:28:46]    + container: matroska,webm
[09:28:46]    + data rate: 39906 kbps
[09:28:46]  * destination
[09:28:46]    + /Users/varase/Movies/Videos/The Marksman (1080p HEVC).m4v
[09:28:46]    + container: MPEG-4 (libavformat)
[09:28:46]      + chapter markers
[09:28:46]  * video track
[09:28:46]    + decoder: h264 8-bit (yuv420p)
[09:28:46]    + Output geometry
[09:28:46]      + storage dimensions: 1920 x 1080
[09:28:46]      + pixel aspect ratio: 1 : 1
[09:28:46]      + display dimensions: 1920 x 1080
[09:28:46]    + encoder: H.265 (VideoToolbox)
[09:28:46]      + bitrate: 6000 kbps, pass: 0
[09:28:46]      + color profile: 1-1-1
[09:28:46]      + chroma location: left
[09:28:46]  * audio track 1
[09:28:46]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[09:28:46]      + samplerate: 48000 Hz
[09:28:46]    + mixdown: Stereo
[09:28:46]    + encoder: AAC (Apple AudioToolbox)
[09:28:46]      + bitrate: 160 kbps, samplerate: 48000 Hz
[09:28:46]  * audio track 2
[09:28:46]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[09:28:46]      + samplerate: 48000 Hz
[09:28:46]    + mixdown: 5.1 Channels
[09:28:46]    + encoder: AC3 (libavcodec)
[09:28:46]      + bitrate: 640 kbps, samplerate: 48000 Hz
[09:28:46] sync: expecting 155578 video frames
[09:28:46] encvt_Init: encoding with output bitrate 6000 Kbps
[09:28:46] encvt_Init: com.apple.videotoolbox.videoencoder.hevc.ave
[09:28:46] sync: first pts video is 0
[09:28:46] sync: "Chapter 1" (1) at frame 1 time 0
[09:28:46] sync: first pts audio 0x1 is 0
[09:28:46] sync: first pts audio 0x1 is 0
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open file VIDEO_TS.IFO.
Encoding: task 1 of 1, 3.86 % (153.70 fps, avg 153.97 fps, ETA 00h16m12s)[09:29:25] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.59 % (153.11 fps, avg 153.56 fps, ETA 00h15m16s)[09:30:23] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.90 % (153.80 fps, avg 153.58 fps, ETA 00h14m32s)[09:31:07] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.43 % (153.90 fps, avg 153.53 fps, ETA 00h13m46s)[09:31:53] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.80 % (153.26 fps, avg 153.50 fps, ETA 00h12m52s)[09:32:48] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.92 % (153.21 fps, avg 153.46 fps, ETA 00h12m00s)[09:33:39] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.57 % (153.50 fps, avg 153.43 fps, ETA 00h11m03s)[09:34:37] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.69 % (153.16 fps, avg 153.41 fps, ETA 00h10m32s)[09:35:08] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.06 % (153.31 fps, avg 153.39 fps, ETA 00h09m58s)[09:35:43] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 45.04 % (153.26 fps, avg 153.40 fps, ETA 00h09m18s)[09:36:23] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.99 % (153.50 fps, avg 153.38 fps, ETA 00h08m37s)[09:37:03] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.94 % (153.11 fps, avg 153.36 fps, ETA 00h07m37s)[09:38:03] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.39 % (153.31 fps, avg 153.36 fps, ETA 00h06m52s)[09:38:49] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.73 % (153.85 fps, avg 153.38 fps, ETA 00h05m58s)[09:39:43] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.11 % (153.47 fps, avg 153.35 fps, ETA 00h04m53s)[09:40:48] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.40 % (153.80 fps, avg 153.35 fps, ETA 00h03m49s)[09:41:52] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.21 % (153.26 fps, avg 153.34 fps, ETA 00h02m41s)[09:43:01] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.12 % (153.11 fps, avg 153.33 fps, ETA 00h01m31s)[09:44:11] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.67 % (153.45 fps, avg 153.32 fps, ETA 00h01m05s)[09:44:37] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.94 % (153.94 fps, avg 153.39 fps, ETA 00h00m01s)[09:45:40] reader: done. 1 scr changes
Encoding: task 1 of 1, 100.00 % (154.64 fps, avg 153.40 fps, ETA 00h00m00s)[09:45:40] work: average encoding speed for job is 153.395462 fps
Encoding: task 1 of 1, 100.00 % (154.64 fps, avg 153.40 fps, ETA 00h00m00s)[09:45:41] dca-decoder done: 608339 frames, 0 decoder errors
[09:45:41] dca-decoder done: 608339 frames, 0 decoder errors
[09:45:41] h264-decoder done: 155579 frames, 0 decoder errors
[09:45:41] sync: got 155579 frames, 155578 expected
[09:45:41] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[09:45:41] mux: track 0, 155579 frames, 4858941621 bytes, 5990.39 kbps, fifo 2048
[09:45:41] mux: track 1, 304172 frames, 132509185 bytes, 163.37 kbps, fifo 4096
[09:45:41] mux: track 2, 202779 frames, 519114240 bytes, 639.99 kbps, fifo 4096
[09:45:41] Finished work at: Sat Dec 18 09:45:41 2021

[09:45:41] libhb: work result = 0

Encode done!
HandBrake has exited.

Completed: /Users/varase/Movies/Videos/The Marksman (1080p HEVC).m4v
Elapsed time: 00:16:59



*** Command to be executed is ***

handbrakecli --input "The Marksman.mkv" -e vt_h265 -r 30 --pfr -a 1 -E ffaac -B 160 -6 dpl2 -R Auto -D 0.0 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -X 960 -Y 640 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile auto --h264-level 3.1 --output "/Users/varase/Movies/Videos/The Marksman (HEVC).m4v"

[09:45:42] Compile-time hardening features are enabled
[09:45:42] hb_init: starting libhb thread
[09:45:42] thread 70000b09b000 started ("libhb")
HandBrake 20211213190809-622f91044-master (2021121701) - Darwin x86_64 - https://handbrake.fr
20 CPUs detected
Opening The Marksman.mkv...
[09:45:42] CPU: Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
[09:45:42]  - Intel microarchitecture Comet Lake
[09:45:42]  - logical processor count: 20
[09:45:42] hb_scan: path=The Marksman.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:333: failed opening UDF image The Marksman.mkv
disc.c:437: error opening file BDMV/index.bdmv
disc.c:437: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2646: nav_get_title_list(The Marksman.mkv/) failed
[09:45:42] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: vm: failed to read VIDEO_TS.IFO
[09:45:42] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from 'The Marksman.mkv':
  Metadata:
    title           : The Marksman
    encoder         : libmakemkv v1.16.5 (1.3.10/1.5.2) darwin(arm64-release)
    creation_time   : 2021-11-08T19:52:37.000000Z
  Duration: 01:48:08.94, start: 0.000000, bitrate: 39906 kb/s
  Chapters:
    Chapter #0:0: start 0.000000, end 251.542958
      Metadata:
        title           : Chapter 01
    Chapter #0:1: start 251.542958, end 622.955667
      Metadata:
        title           : Chapter 02
    Chapter #0:2: start 622.955667, end 902.192958
      Metadata:
        title           : Chapter 03
    Chapter #0:3: start 902.192958, end 1197.154292
      Metadata:
        title           : Chapter 04
    Chapter #0:4: start 1197.154292, end 1546.378167
      Metadata:
        title           : Chapter 05
    Chapter #0:5: start 1546.378167, end 1876.833292
      Metadata:
        title           : Chapter 06
    Chapter #0:6: start 1876.833292, end 2243.491250
      Metadata:
        title           : Chapter 07
    Chapter #0:7: start 2243.491250, end 2446.110333
      Metadata:
        title           : Chapter 08
    Chapter #0:8: start 2446.110333, end 2664.995667
      Metadata:
        title           : Chapter 09
    Chapter #0:9: start 2664.995667, end 2923.962708
      Metadata:
        title           : Chapter 10
    Chapter #0:10: start 2923.962708, end 3179.551375
      Metadata:
        title           : Chapter 11
    Chapter #0:11: start 3179.551375, end 3564.978083
      Metadata:
        title           : Chapter 12
    Chapter #0:12: start 3564.978083, end 3855.685167
      Metadata:
        title           : Chapter 13
    Chapter #0:13: start 3855.685167, end 4200.696500
      Metadata:
        title           : Chapter 14
    Chapter #0:14: start 4200.696500, end 4615.444167
      Metadata:
        title           : Chapter 15
    Chapter #0:15: start 4615.444167, end 5023.852167
      Metadata:
        title           : Chapter 16
    Chapter #0:16: start 5023.852167, end 5465.585125
      Metadata:
        title           : Chapter 17
    Chapter #0:17: start 5465.585125, end 5912.406500
      Metadata:
        title           : Chapter 18
    Chapter #0:18: start 5912.406500, end 6079.073000
      Metadata:
        title           : Chapter 19
    Chapter #0:19: start 6079.073000, end 6488.940792
      Metadata:
        title           : Chapter 20
  Stream #0:0(eng): Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Metadata:
      BPS-eng         : 34899677
      DURATION-eng    : 01:48:08.940791666
      NUMBER_OF_FRAMES-eng: 155579
      NUMBER_OF_BYTES-eng: 28307738797
      SOURCE_ID-eng   : 001011
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 5.1(side), s32p (24 bit) (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 3261596
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 2645541364
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:2(eng): Audio: dts (DTS), 48000 Hz, 5.1(side), fltp, 1536 kb/s
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 1509000
      DURATION-eng    : 01:48:08.949333333
      NUMBER_OF_FRAMES-eng: 608339
      NUMBER_OF_BYTES-eng: 1223978068
      SOURCE_ID-eng   : 001100
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 192000
      DURATION-eng    : 01:48:08.960000000
      NUMBER_OF_FRAMES-eng: 202780
      NUMBER_OF_BYTES-eng: 155735040
      SOURCE_ID-eng   : 001101
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:4(eng): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 23907
      DURATION-eng    : 01:38:53.823729166
      NUMBER_OF_FRAMES-eng: 1951
      NUMBER_OF_BYTES-eng: 17733151
      SOURCE_ID-eng   : 001200
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
  Stream #0:5(spa): Subtitle: hdmv_pgs_subtitle
    Metadata:
      BPS-eng         : 17933
      DURATION-eng    : 01:42:58.693354166
      NUMBER_OF_FRAMES-eng: 1598
      NUMBER_OF_BYTES-eng: 13850877
      SOURCE_ID-eng   : 001201
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.5 darwin(arm64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2021-11-08 19:52:37
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[09:45:42] scan: decoding previews for title 1
[09:45:42] scan: audio 0x1: dca, rate=48000Hz, bitrate=1 English (DTS-HD MA) (5.1 ch)
[09:45:42] scan: audio 0x2: dca, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch) (1536 kbps)
[09:45:42] scan: audio 0x3: ac3, rate=48000Hz, bitrate=192000 English (AC3) (2.0 ch) (192 kbps)
Scanning title 1 of 1, preview 9, 90.00 %[09:45:43] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 138/138/0/0, aspect 16:9, PAR 1:1, color profile: 1-1-1, chroma location: left
[09:45:43] libhb: scan thread found 1 valid title(s)
+ Using preset: CLI Default
+ title 1:
  + stream: The Marksman.mkv
  + duration: 01:48:08
  + size: 1920x1080, pixel aspect: 1/1, display aspect: 1.78, 23.976 fps
  + autocrop: 138/138/0/0
  + chapters:
    + 1: duration 00:04:12
    + 2: duration 00:06:11
    + 3: duration 00:04:39
    + 4: duration 00:04:55
    + 5: duration 00:05:49
    + 6: duration 00:05:30
    + 7: duration 00:06:07
    + 8: duration 00:03:23
    + 9: duration 00:03:39
    + 10: duration 00:04:19
    + 11: duration 00:04:16
    + 12: duration 00:06:25
    + 13: duration 00:04:51
    + 14: duration 00:05:45
    + 15: duration 00:06:55
    + 16: duration 00:06:48
    + 17: duration 00:07:22
    + 18: duration 00:07:27
    + 19: duration 00:02:47
    + 20: duration 00:06:50
  + audio tracks:
    + 1, English (DTS-HD MA) (5.1 ch) (iso639-2: eng)
    + 2, English (DTS) (5.1 ch) (1536 kbps) (iso639-2: eng), 48000Hz, 1536000bps
    + 3, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English [PGS]
    + 2, español [PGS]
[09:45:43] Starting work at: Sat Dec 18 09:45:43 2021

[09:45:43] 1 job(s) to process
[09:45:43] json job:
{
    "Audio": {
        "AudioList": [
            {
                "Bitrate": 160,
                "DRC": 0.0,
                "Encoder": 16384,
                "Mixdown": 6,
                "Samplerate": 0,
                "Track": 0
            }
        ],
        "CopyMask": [
            "copy:aac",
            "copy:ac3",
            "copy:dtshd",
            "copy:dts",
            "copy:mp3"
        ],
        "FallbackEncoder": "ffac3"
    },
    "Destination": {
        "AlignAVStart": false,
        "ChapterList": [
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 12,
                    "Ticks": 22638866
                },
                "Name": "Chapter 1"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 11,
                    "Ticks": 33427143
                },
                "Name": "Chapter 2"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 39,
                    "Ticks": 25131357
                },
                "Name": "Chapter 3"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 55,
                    "Ticks": 26546520
                },
                "Name": "Chapter 4"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 49,
                    "Ticks": 31430148
                },
                "Name": "Chapter 5"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 30,
                    "Ticks": 29740962
                },
                "Name": "Chapter 6"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 7,
                    "Ticks": 32999216
                },
                "Name": "Chapter 7"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 23,
                    "Ticks": 18235717
                },
                "Name": "Chapter 8"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 3,
                    "Seconds": 39,
                    "Ticks": 19699680
                },
                "Name": "Chapter 9"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 19,
                    "Ticks": 23307034
                },
                "Name": "Chapter 10"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 16,
                    "Ticks": 23002980
                },
                "Name": "Chapter 11"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 25,
                    "Ticks": 34688404
                },
                "Name": "Chapter 12"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 4,
                    "Seconds": 51,
                    "Ticks": 26163637
                },
                "Name": "Chapter 13"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 5,
                    "Seconds": 45,
                    "Ticks": 31051021
                },
                "Name": "Chapter 14"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 55,
                    "Ticks": 37327289
                },
                "Name": "Chapter 15"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 48,
                    "Ticks": 36756720
                },
                "Name": "Chapter 16"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 22,
                    "Ticks": 39755967
                },
                "Name": "Chapter 17"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 7,
                    "Seconds": 27,
                    "Ticks": 40213924
                },
                "Name": "Chapter 18"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 2,
                    "Seconds": 47,
                    "Ticks": 14999985
                },
                "Name": "Chapter 19"
            },
            {
                "Duration": {
                    "Hours": 0,
                    "Minutes": 6,
                    "Seconds": 50,
                    "Ticks": 36888030
                },
                "Name": "Chapter 20"
            }
        ],
        "ChapterMarkers": true,
        "File": "/Users/varase/Movies/Videos/The Marksman (HEVC).m4v",
        "InlineParameterSets": false,
        "Mp4Options": {
            "IpodAtom": false,
            "Mp4Optimize": false
        },
        "Mux": "m4v"
    },
    "Filters": {
        "FilterList": [
            {
                "ID": 6,
                "Settings": {
                    "mode": 2,
                    "rate": "27000000/900000"
                }
            },
            {
                "ID": 13,
                "Settings": {
                    "crop-bottom": 138,
                    "crop-left": 0,
                    "crop-right": 0,
                    "crop-top": 138,
                    "height": 402,
                    "width": 960
                }
            }
        ]
    },
    "Metadata": {
        "Name": "The Marksman"
    },
    "PAR": {
        "Den": 1,
        "Num": 1
    },
    "SequenceID": 0,
    "Source": {
        "Angle": 0,
        "Path": "The Marksman.mkv",
        "Range": {
            "End": 20,
            "Start": 1,
            "Type": "chapter"
        },
        "Title": 1
    },
    "Subtitle": {
        "Search": {
            "Burn": true,
            "Default": false,
            "Enable": false,
            "Forced": false
        },
        "SubtitleList": []
    },
    "Video": {
        "ChromaLocation": 1,
        "ColorInputFormat": 0,
        "ColorMatrix": 1,
        "ColorOutputFormat": 0,
        "ColorPrimaries": 1,
        "ColorRange": 0,
        "ColorTransfer": 1,
        "Encoder": "vt_h265",
        "Level": "3.1",
        "Preset": "medium",
        "Profile": "auto",
        "QSV": {
            "AdapterIndex": 0,
            "AsyncDepth": 0,
            "Decode": false
        },
        "Quality": 22.0,
        "Turbo": false,
        "TwoPass": false
    }
}
[09:45:43] Starting Task: Encoding Pass
[09:45:43] job configuration:
[09:45:43]  * source
[09:45:43]    + The Marksman.mkv
[09:45:43]    + title 1, chapter(s) 1 to 20
[09:45:43]    + container: matroska,webm
[09:45:43]    + data rate: 39906 kbps
[09:45:43]  * destination
[09:45:43]    + /Users/varase/Movies/Videos/The Marksman (HEVC).m4v
[09:45:43]    + container: MPEG-4 (libavformat)
[09:45:43]      + chapter markers
[09:45:43]  * video track
[09:45:43]    + decoder: h264 8-bit (yuv420p)
[09:45:43]    + filters
[09:45:43]      + Framerate Shaper (mode=2:rate=27000000/900000)
[09:45:43]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[09:45:43]      + Crop and Scale (width=960:height=402:crop-top=138:crop-bottom=138:crop-left=0:crop-right=0)
[09:45:43]        + source: 1920 * 1080, crop (138/138/0/0): 1920 * 804, scale: 960 * 402
[09:45:43]    + Output geometry
[09:45:43]      + storage dimensions: 960 x 402
[09:45:43]      + pixel aspect ratio: 1 : 1
[09:45:43]      + display dimensions: 960 x 402
[09:45:43]    + encoder: H.265 (VideoToolbox)
[09:45:43]      + preset:  medium
[09:45:43]      + profile: auto
[09:45:43]      + quality: 22.00 (CQ)
[09:45:43]      + color profile: 1-1-1
[09:45:43]      + chroma location: left
[09:45:43]  * audio track 1
[09:45:43]    + decoder: English (DTS-HD MA) (5.1 ch) (track 1, id 0x1)
[09:45:43]      + samplerate: 48000 Hz
[09:45:43]    + mixdown: Dolby Pro Logic II
[09:45:43]    + encoder: AAC (Apple AudioToolbox)
[09:45:43]      + bitrate: 160 kbps, samplerate: 48000 Hz
[09:45:43] sync: expecting 155578 video frames
[09:45:43] encvt_Init: encoding with constant quality 22.000000
[09:45:43] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[09:45:43] encvt_Init: com.apple.videotoolbox.videoencoder.hevc.ave
[09:45:43] VTSessionSetProperty: kVTCompressionPropertyKey_Quality failed
[09:45:43] sync: first pts video is 0
[09:45:43] sync: "Chapter 1" (1) at frame 1 time 0
[09:45:43] sync: first pts audio 0x1 is 0
Encoding: task 1 of 1, 3.87 % (324.17 fps, avg 319.59 fps, ETA 00h07m48s)[09:46:02] sync: "Chapter 2" (2) at frame 6032 time 22638866
Encoding: task 1 of 1, 9.58 % (315.77 fps, avg 316.45 fps, ETA 00h07m24s)[09:46:31] sync: "Chapter 3" (3) at frame 14937 time 56066010
Encoding: task 1 of 1, 13.89 % (281.26 fps, avg 313.27 fps, ETA 00h07m07s)[09:46:52] sync: "Chapter 4" (4) at frame 21632 time 81197366
Encoding: task 1 of 1, 18.40 % (315.48 fps, avg 312.74 fps, ETA 00h06m46s)[09:47:15] sync: "Chapter 5" (5) at frame 28706 time 107751393
Encoding: task 1 of 1, 23.76 % (326.64 fps, avg 314.21 fps, ETA 00h06m17s)[09:47:41] sync: "Chapter 6" (6) at frame 37080 time 139185296
Encoding: task 1 of 1, 28.87 % (312.07 fps, avg 314.42 fps, ETA 00h05m52s)[09:48:07] sync: "Chapter 7" (7) at frame 45003 time 168926257
Encoding: task 1 of 1, 34.54 % (340.88 fps, avg 316.23 fps, ETA 00h05m22s)[09:48:33] sync: "Chapter 8" (8) at frame 53793 time 201921720
Encoding: task 1 of 1, 37.69 % (343.13 fps, avg 317.82 fps, ETA 00h05m05s)[09:48:48] sync: "Chapter 9" (9) at frame 58652 time 220161191
Encoding: task 1 of 1, 41.05 % (337.07 fps, avg 319.40 fps, ETA 00h04m47s)[09:49:03] sync: "Chapter 10" (10) at frame 63897 time 239849610
Encoding: task 1 of 1, 45.04 % (341.32 fps, avg 320.77 fps, ETA 00h04m27s)[09:49:22] sync: "Chapter 11" (11) at frame 70106 time 263156643
Encoding: task 1 of 1, 48.94 % (341.89 fps, avg 322.29 fps, ETA 00h04m06s)[09:49:40] sync: "Chapter 12" (12) at frame 76237 time 286170885
Encoding: task 1 of 1, 54.89 % (337.93 fps, avg 323.30 fps, ETA 00h03m37s)[09:50:08] sync: "Chapter 13" (13) at frame 85478 time 320859288
Encoding: task 1 of 1, 59.40 % (338.29 fps, avg 324.19 fps, ETA 00h03m15s)[09:50:29] sync: "Chapter 14" (14) at frame 92447 time 347019172
Encoding: task 1 of 1, 64.73 % (333.33 fps, avg 325.23 fps, ETA 00h02m49s)[09:50:53] sync: "Chapter 15" (15) at frame 100717 time 378062685
Encoding: task 1 of 1, 71.11 % (338.43 fps, avg 326.05 fps, ETA 00h02m17s)[09:51:23] sync: "Chapter 16" (16) at frame 110663 time 415397482
Encoding: task 1 of 1, 77.37 % (330.49 fps, avg 326.42 fps, ETA 00h01m48s)[09:51:52] sync: "Chapter 17" (17) at frame 120456 time 452157956
Encoding: task 1 of 1, 84.22 % (327.08 fps, avg 326.65 fps, ETA 00h01m15s)[09:52:25] sync: "Chapter 18" (18) at frame 131046 time 491910168
Encoding: task 1 of 1, 91.05 % (343.22 fps, avg 327.44 fps, ETA 00h00m42s)[09:52:56] sync: "Chapter 19" (19) at frame 141757 time 532116585
Encoding: task 1 of 1, 93.67 % (327.91 fps, avg 327.66 fps, ETA 00h00m30s)[09:53:08] sync: "Chapter 20" (20) at frame 145753 time 547116570
Encoding: task 1 of 1, 99.90 % (348.96 fps, avg 329.21 fps, ETA 00h00m01s)[09:53:36] reader: done. 1 scr changes
Encoding: task 1 of 1, 99.97 % (353.54 fps, avg 329.28 fps, ETA 00h00m00s)[09:53:36] work: average encoding speed for job is 329.281372 fps
Encoding: task 1 of 1, 100.00 % (353.54 fps, avg 329.28 fps, ETA 00h00m00s)[09:53:36] vfr: 155579 frames output, 0 dropped and 0 duped for CFR/PFR
[09:53:36] vfr: lost time: 0 (0 frames)
[09:53:36] vfr: gained time: 0 (0 frames) (0 not accounted for)
[09:53:36] dca-decoder done: 608339 frames, 0 decoder errors
[09:53:36] h264-decoder done: 155579 frames, 0 decoder errors
[09:53:36] sync: got 155579 frames, 155578 expected
[09:53:36] sync: framerate min 23.976 fps, max 23.976 fps, avg 23.976 fps
[09:53:36] mux: track 0, 155579 frames, 877816032 bytes, 1082.22 kbps, fifo 4096
[09:53:36] mux: track 1, 304172 frames, 132760627 bytes, 163.68 kbps, fifo 8192
[09:53:36] Finished work at: Sat Dec 18 09:53:36 2021

[09:53:36] libhb: work result = 0

Encode done!

HandBrake has exited.

21.12.18 09:53:36 Host: Verne-iMac5K, ID: varase, Num: 3, Hist: 1003, RC: 0 [~] %
For the 1080p transcode, the MBP ran around 55% getting 285 FPS and according to iStat Menus the 8 high performance Firestorm cores lit up; the iMac ran around 18% getting 153 FPS and according to the same the 10 real cores lit up - not so much the 10 virtual hyper threaded cores.

For the SD transcode, the MBP ran around 65% and got 330 FPS with the Firestorm cores lit; the iMac ran around 43% getting 347 FPS, again with the 10 real cores lit up.

Curious thing: the Intel transcodes showed encvt_Init: com.apple.videotoolbox.videoencoder.hevc.ave; the M1 Max encvt_Init: com.apple.videotoolbox.videoencoder.ave.hevc.

Any way, the MBP got almost double the FPS on the 1080p transcode - expected since there are twice the number of H.265 encoders in the M1 Max whereas the T2 chip in the iMac has only one. The SD transcode on the other hand, was 330 for the MBP and 347 for the Intel with T2 - apparently a win for the T2.

This would suggest to me that the 1080p transcode was using the media engine and T2 chip respectively, and the higher CPU utilization on the M1 Max was due to twice the amount of work being dispatched to media engine over the core-i9's low usage due to less work being dispatched due to the single H.265 encoder in the T2.

I find the SD transcode more baffling - the iMac ran faster using about 43% while the MBP used marginally more CPU and still fell behind the Intel, making me wonder if the iMac was using the T2 chip while the MBP fell back into a software encode. Certainly if work was being passed to the hardware encoders the MBP would be showing a speed advantage, not a speed deficit.

Anyway, just some thoughts and observations. What do you think?
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

Sorry, was looking at the wrong transcode - the SD transcodes on the MBP and iMac were much closer with around 318 for the MBP 323 for the iMac.

All other comments still apply though.
User avatar
s55
HandBrake Team
Posts: 10168
Joined: Sun Dec 24, 2006 1:05 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by s55 »

Be careful with drawing conclusions based on marketing.

For example: There is no evidence to support that M1's dual engines are being used here. I'd be quiet surprised if they were based on how they are marketed and experience with how they typically work. As I said before it's more likely that either the M1 has a better encode engine than T2, or something else in the pipeline is running better. HandBrake isn't doing anything that would particularly allow for both encode units to be used either.

Even when in pure software mode, it's NOT the same code that's running on M1 vs Intel. There is some pretty heavy intrinsic going on that's very different between ARM and Intel which can have a dramatic effect on performance. There is no AVX on M1 for example.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

s55 wrote: Sat Dec 18, 2021 5:05 pm Be careful with drawing conclusions based on marketing.

For example: There is no evidence to support that M1's dual engines are being used here. I'd be quiet surprised if they were based on how they are marketed and experience with how they typically work. As I said before it's more likely that either the M1 has a better encode engine than T2, or something else in the pipeline is running better. HandBrake isn't doing anything that would particularly allow for both encode units to be used either.

Even when in pure software mode, it's NOT the same code that's running on M1 vs Intel. There is some pretty heavy intrinsic going on that's very different between ARM and Intel which can have a dramatic effect on performance. There is no AVX on M1 for example.
You don't think the VideoToolbox knows how to take advantage of the two HEVC hardware encoders of the media engine?

I thought that was what the frameworks were for - to abstract the implementation details so the application wouldn't have to do something different for each hardware iteration.

I don't think they're used on a one per stream setup as has been implied here - after all, how many people are doing multiple simultaneous renders or transcodes?
User avatar
s55
HandBrake Team
Posts: 10168
Joined: Sun Dec 24, 2006 1:05 pm

Re: Using Video ToolBox on M1 Max Powerbook

Post by s55 »

You don't think the VideoToolbox knows how to take advantage of the two HEVC hardware encoders of the media engine?
Yup. I don't believe VT can do this. It doesn't make sense based on how the API is designed, how HandBrake interacts with it, or how video encoding works in general.
I thought that was what the frameworks were for - to abstract the implementation details so the application wouldn't have to do something different for each hardware iteration.
Yes, but that doesn't mean they are actually doing anything clever under the hood. As far as we can tell, it's just a basic wrapper over the drivers.

The API is crude and very limiting. For example, on Intel, it actually cripples QuickSync. (It's far more capable when run on Windows)
It's a lowest common denominator API. This is NOT a good thing for video encoders.

I don't think they're used on a one per stream setup as has been implied here - after all, how many people are doing multiple simultaneous renders or transcodes?
Anyone doing NLE or media management, which is basically the vast majority of people using this hardware for it's intended purpose have a high probability of using multiple engines. Think Final Cut, Adobe Suite, Resolve, Photos etc etc.
varase
Posts: 33
Joined: Sat May 14, 2016 9:29 am

Re: Using Video ToolBox on M1 Max Powerbook

Post by varase »

s55 wrote: Sun Dec 19, 2021 12:25 am
You don't think the VideoToolbox knows how to take advantage of the two HEVC hardware encoders of the media engine?
Yup. I don't believe VT can do this. It doesn't make sense based on how the API is designed, how HandBrake interacts with it, or how video encoding works in general.
Okay, if the media engine HEVC encoder is twice as fast as that on the T2 chip - implied with the 1080p transcode - why is the SD transcode slower on the media engine than on the T2 chip?
Post Reply