Page 1 of 1

HB & T2 chip

Posted: Wed Oct 31, 2018 5:36 pm
by hanumang
Any idea yet how likely it will be for HandBrake to access the T2 chips on the recently released Macs?

I am thinking about a Mac Mini as a low-cost, dedicated HEVC encoding/iTunes library station so I can free up my laptop. Was wondering if upgrading to the 6-core version would be worth it or, if T2 access might be possible, just going with a 4-core to find that right cost/performance balance. Not sure if waiting (and splurging) on a Mac Pro will be worth it for me as I'm not really video editing right now.

(Mine is a Mac household; I know a Windows box would be more cost-effective)

TIA

Re: HB & T2 chip

Posted: Wed Oct 31, 2018 5:42 pm
by Ritsuka
I guess it will be available via VideoToolbox, but probably the only available setting will be the average bitrate.

Re: HB & T2 chip

Posted: Wed Oct 31, 2018 6:52 pm
by s55
@hanumang -> Remember, decode, filters, audio, libhb etc are all CPU, regardless of T2 chip. So a weak CPU may bottleneck the the chip.

(That's assuming it's even any good)

Re: HB & T2 chip

Posted: Wed Oct 31, 2018 8:36 pm
by mduell
The fixed function video encoder hardware tends to be... not great... and Apple's APIs to it are... even worse.

Re: HB & T2 chip

Posted: Wed Oct 31, 2018 9:14 pm
by hanumang
Thank you gentleman -- I guess a 6-core it is.

Re: HB & T2 chip

Posted: Wed Nov 07, 2018 3:46 pm
by End User
Marco Arment reviewed the new Mac mini:

https://marco.org/2018/11/06/mac-mini-2018-review

He benchmarked ffmpeg H.265 encode performance using the T2:

https://marco.org/media/2018/11/macmini-ffmpeg.png

From Marco:

"ffmpeg can do it by specifying -c:v hevc_videotoolbox instead of -c:v x265. I also needed -vtag hvc1 for the output MP4s with either codec to be playable on macOS.

Compressor uses the T2’s HEVC acceleration when encoding 8-bit HEVC, but not 10-bit.

Re: HB & T2 chip

Posted: Wed Nov 07, 2018 4:24 pm
by BradleyS
It's important to remember that fast != quality when comparing hardware encoders.

Re: HB & T2 chip

Posted: Wed Nov 07, 2018 4:48 pm
by End User
At this point I'm just glad that someone tried.

Re: HB & T2 chip

Posted: Thu Nov 08, 2018 2:04 pm
by Melon_Life
This is really interesting. I somehow totally missed the part about the T2 being able to encode HEVC at lightening speed. Thanks for pointing this out! I'd love to give it a shot on my 2018 13 MBP.
While I know a lot of people aren't necessarily big fans of fixed function hardware around here, it'd be nice to have the option in a pinch.
That said, after reading a bit more about the videotoolbox API I can see why the Handbrake developers aren't too hot on it (the only setting is bit rate... come on Apple :/)

Re: HB & T2 chip

Posted: Thu Nov 08, 2018 3:16 pm
by Ritsuka
Can you run this small cli app https://subler.org/downloads/VideoToolboxTest.zip and paste the output here? It will list the available VideoToolbox encoders and decoders.

Re: HB & T2 chip

Posted: Thu Nov 08, 2018 7:03 pm
by s55
@Melon_life It's not only the bitrate, but essentially none of the config options are available. So It's really not utilising Quicksync to it's full potential.

I'd be surprised if the T2 hardware isn't much more capable than the software allows.

Re: HB & T2 chip

Posted: Mon Nov 12, 2018 6:54 pm
by macmuchmore
I hope the HandBrake Team can test with the new T2 HEVC encoding on the new macs (especially the mac mini). I am getting mine this wee and will gladly provide any information the team needs. I LOVE Handbrake btw, you guys have really created a great piece of software (I've been using it for years) - thanks!!

Re: HB & T2 chip

Posted: Mon Nov 12, 2018 6:56 pm
by s55
Sadly not, If only we disposal income!

In theory, it should just work when we drop the video toolbox patch in but we won't really know how good or bad it is.

Re: HB & T2 chip

Posted: Mon Nov 12, 2018 7:20 pm
by BradleyS
Feel free to build and test the feature branch before it lands: https://github.com/HandBrake/HandBrake/pull/1522

Re: HB & T2 chip

Posted: Mon Nov 12, 2018 7:39 pm
by macmuchmore
Um - I am not sure how to do that.... I am not very technical and I don't think I can figure that out.

Re: HB & T2 chip

Posted: Mon Nov 12, 2018 9:53 pm
by mduell

Re: HB & T2 chip

Posted: Thu Nov 15, 2018 1:52 am
by hanumang
Ritsuka wrote:
Thu Nov 08, 2018 3:16 pm
Can you run this small cli app https://subler.org/downloads/VideoToolboxTest.zip and paste the output here? It will list the available VideoToolbox encoders and decoders.
Not sure whom you were addressing but, since no one has responded yet...

Code: Select all

Last login: Tue Nov 13 18:11:56 on console
/Users/excelsior/Downloads/VideoToolboxTest ; exit;
Stans-Mac-mini:~ excelsior$ /Users/excelsior/Downloads/VideoToolboxTest ; exit;
2018-11-14 20:46:45.723 VideoToolboxTest[3285:849950] {
    CodecName = "24-bit RGB";
    CodecType = 24;
    DisplayName = "24-bit RGB";
    EncoderID = "com.apple.videotoolbox.videoencoder.24rgb";
    EncoderName = "Apple 24-bit RGB";
}
2018-11-14 20:46:45.723 VideoToolboxTest[3285:849950] {
    CodecName = "32-bit ARGB";
    CodecType = 32;
    DisplayName = "32-bit ARGB";
    EncoderID = "com.apple.videotoolbox.videoencoder.32argb";
    EncoderName = "Apple 32-bit ARGB";
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    CodecName = "Apple ProRes 422";
    CodecType = 1634755438;
    DisplayName = "Apple ProRes 422";
    EncoderID = "com.apple.videotoolbox.videoencoder.prores422";
    EncoderName = "Apple ProRes 422";
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    ColorPrimaries =     {
    };
    FieldCount =     {
    };
    FieldDetail =     {
    };
    PixelAspectRatio =     {
    };
    SourceFrameCount =     {
    };
    TransferFunction =     {
    };
    YCbCrMatrix =     {
        SupportedValueList =         (
            "ITU_R_709_2",
            "ITU_R_601_4",
            "ITU_R_2020"
        );
    };
    "kVTCodecPropertyKey_CustomColorPrimaries" =     {
    };
    "kVTCodecPropertyKey_CustomTransferFunction" =     {
    };
    "kVTCodecPropertyKey_CustomYCbCrMatrix" =     {
    };
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    CodecName = "Apple ProRes 422 HQ";
    CodecType = 1634755432;
    DisplayName = "Apple ProRes 422 HQ";
    EncoderID = "com.apple.videotoolbox.videoencoder.prores422hq";
    EncoderName = "Apple ProRes 422 HQ";
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    ColorPrimaries =     {
    };
    FieldCount =     {
    };
    FieldDetail =     {
    };
    PixelAspectRatio =     {
    };
    SourceFrameCount =     {
    };
    TransferFunction =     {
    };
    YCbCrMatrix =     {
        SupportedValueList =         (
            "ITU_R_709_2",
            "ITU_R_601_4",
            "ITU_R_2020"
        );
    };
    "kVTCodecPropertyKey_CustomColorPrimaries" =     {
    };
    "kVTCodecPropertyKey_CustomTransferFunction" =     {
    };
    "kVTCodecPropertyKey_CustomYCbCrMatrix" =     {
    };
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    CodecName = "Apple ProRes 422 LT";
    CodecType = 1634755443;
    DisplayName = "Apple ProRes 422 LT";
    EncoderID = "com.apple.videotoolbox.videoencoder.prores422lt";
    EncoderName = "Apple ProRes 422 LT";
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    ColorPrimaries =     {
    };
    FieldCount =     {
    };
    FieldDetail =     {
    };
    PixelAspectRatio =     {
    };
    SourceFrameCount =     {
    };
    TransferFunction =     {
    };
    YCbCrMatrix =     {
        SupportedValueList =         (
            "ITU_R_709_2",
            "ITU_R_601_4",
            "ITU_R_2020"
        );
    };
    "kVTCodecPropertyKey_CustomColorPrimaries" =     {
    };
    "kVTCodecPropertyKey_CustomTransferFunction" =     {
    };
    "kVTCodecPropertyKey_CustomYCbCrMatrix" =     {
    };
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    CodecName = "Apple ProRes 422 Proxy";
    CodecType = 1634755439;
    DisplayName = "Apple ProRes 422 Proxy";
    EncoderID = "com.apple.videotoolbox.videoencoder.prores422proxy";
    EncoderName = "Apple ProRes 422 Proxy";
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    ColorPrimaries =     {
    };
    FieldCount =     {
    };
    FieldDetail =     {
    };
    PixelAspectRatio =     {
    };
    SourceFrameCount =     {
    };
    TransferFunction =     {
    };
    YCbCrMatrix =     {
        SupportedValueList =         (
            "ITU_R_709_2",
            "ITU_R_601_4",
            "ITU_R_2020"
        );
    };
    "kVTCodecPropertyKey_CustomColorPrimaries" =     {
    };
    "kVTCodecPropertyKey_CustomTransferFunction" =     {
    };
    "kVTCodecPropertyKey_CustomYCbCrMatrix" =     {
    };
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    CodecName = "Apple ProRes 4444";
    CodecType = 1634743400;
    DisplayName = "Apple ProRes 4444";
    EncoderID = "com.apple.videotoolbox.videoencoder.prores4444";
    EncoderName = "Apple ProRes 4444";
}
2018-11-14 20:46:45.726 VideoToolboxTest[3285:849950] {
    ColorPrimaries =     {
    };
    FieldCount =     {
    };
    FieldDetail =     {
    };
    PixelAspectRatio =     {
    };
    SourceFrameCount =     {
    };
    TransferFunction =     {
    };
    YCbCrMatrix =     {
        SupportedValueList =         (
            "ITU_R_709_2",
            "ITU_R_601_4",
            "ITU_R_2020"
        );
    };
    "kVTCodecPropertyKey_AlphaMode" =     {
    };
    "kVTCodecPropertyKey_CustomColorPrimaries" =     {
    };
    "kVTCodecPropertyKey_CustomTransferFunction" =     {
    };
    "kVTCodecPropertyKey_CustomYCbCrMatrix" =     {
    };
    "kVTCodecPropertyKey_PreserveAlphaChannel" =     {
    };
}
2018-11-14 20:46:45.727 VideoToolboxTest[3285:849950] {
    CodecName = "H.263";
    CodecType = 1748121139;
    DisplayName = "H.263";
    EncoderID = "com.apple.videotoolbox.videoencoder.h263";
    EncoderName = "Apple H.263";
}
2018-11-14 20:46:45.727 VideoToolboxTest[3285:849950] {
    AllowTemporalCompression =     {
        PropertyType = Boolean;
        ReadWriteStatus = ReadWrite;
    };
    AverageBitRate =     {
        PropertyType = Number;
        ReadWriteStatus = ReadWrite;
    };
    AverageDataRate =     {
        PropertyType = Number;
        ReadWriteStatus = ReadWrite;
    };
    ExpectedFrameRate =     {
        PropertyType = Number;
        ReadWriteStatus = ReadWrite;
    };
    MaxKeyFrameInterval =     {
        PropertyType = Number;
        ReadWriteStatus = ReadWrite;
    };
    SourceFrameCount =     {
        PropertyType = Number;
        ReadWriteStatus = ReadWrite;
    };
}
2018-11-14 20:46:45.730 VideoToolboxTest[3285:849950] {
    CodecName = "H.264";
    CodecType = 1635148593;
    DisplayName = "Apple H.264 (HW)";
    EncoderID = "com.apple.videotoolbox.videoencoder.h264.gva";
    EncoderName = "Apple H.264 (HW)";
}
2018-11-14 20:46:45.730 VideoToolboxTest[3285:849950] {
    AllowFrameReordering =     {
    };
    AllowTemporalCompression =     {
    };
    AverageBitRate =     {
    };
    AverageDataRate =     {
    };
    ColorPrimaries =     {
    };
    ConnectionID =     {
    };
    ConvergenceDurationForAverageDataRate =     {
    };
    DataRateLimits =     {
    };
    Depth =     {
    };
    EncoderUsage =     {
    };
    ExpectedDuration =     {
    };
    ExpectedFrameRate =     {
    };
    ExpectedInputBufferDimensions =     {
    };
    H264EntropyMode =     {
    };
    InputQueueMaxCount =     {
    };
    MaxFrameDelayCount =     {
    };
    MaxKeyFrameInterval =     {
    };
    MaxKeyFrameIntervalDuration =     {
    };
    MultiPassStorage =     {
    };
    NegotiationDetails =     {
    };
    NumberOfSlices =     {
    };
    PixelAspectRatio =     {
    };
    Priority =     {
    };
    ProfileLevel =     {
    };
    RealTime =     {
    };
    SourceFrameCount =     {
    };
    ThrottleForBackground =     {
    };
    TransferFunction =     {
    };
    UsingHardwareAcceleratedVideoEncoder =     {
    };
    YCbCrMatrix =     {
    };
}
2018-11-14 20:46:45.732 VideoToolboxTest[3285:849950] {
    CodecName = "H.264";
    CodecType = 1635148593;
    DisplayName = "Apple H.264 (SW)";
    EncoderID = "com.apple.videotoolbox.videoencoder.h264";
    EncoderName = "Apple H.264 (SW)";
}
2018-11-14 20:46:45.733 VideoToolboxTest[3285:849950] {
    AllowFrameReordering =     {
    };
    AllowTemporalCompression =     {
    };
    AverageBitRate =     {
    };
    AverageDataRate =     {
    };
    ColorPrimaries =     {
    };
    DataRateLimits =     {
    };
    EncoderUsage =     {
    };
    ExpectedFrameRate =     {
    };
    H264EntropyMode =     {
    };
    MaxKeyFrameInterval =     {
    };
    MaxKeyFrameIntervalDuration =     {
    };
    MoreFramesAfterEnd =     {
    };
    MoreFramesBeforeStart =     {
    };
    MultiPassStorage =     {
    };
    NegotiationDetails =     {
    };
    NumberOfParallelCores =     {
    };
    NumberOfSlices =     {
    };
    PixelAspectRatio =     {
    };
    ProfileLevel =     {
        SupportedValueList =         (
            "H264_Baseline_AutoLevel",
            "H264_Baseline_1_3",
            "H264_Baseline_3_0",
            "H264_Baseline_3_1",
            "H264_Baseline_3_2",
            "H264_Baseline_4_0",
            "H264_Baseline_4_1",
            "H264_Baseline_4_2",
            "H264_Baseline_5_0",
            "H264_Baseline_5_1",
            "H264_Baseline_5_2",
            "H264_Main_AutoLevel",
            "H264_Main_3_0",
            "H264_Main_3_1",
            "H264_Main_3_2",
            "H264_Main_4_0",
            "H264_Main_4_1",
            "H264_Main_4_2",
            "H264_Main_5_0",
            "H264_Main_5_1",
            "H264_Main_5_2",
            "H264_High_AutoLevel",
            "H264_High_3_0",
            "H264_High_3_1",
            "H264_High_3_2",
            "H264_High_4_0",
            "H264_High_4_1",
            "H264_High_4_2",
            "H264_High_5_0",
            "H264_High_5_1",
            "H264_High_5_2"
        );
    };
    RealTime =     {
    };
    SourceFrameCount =     {
    };
    TotalByteBudget =     {
    };
    TransferFunction =     {
    };
    YCbCrMatrix =     {
    };
}
AVEBridge Info: AVEEncoder_CreateInstance: Received CreateInstance (from VT)
Assert - (remoteService != NULL) - f: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleAVEBridge/AppleAVEBridge-6.18/AppleAVEEncoder/AppleAVEEncoder.c l: 283
AVE XPC Error: could not find remote service
Assert - (err == noErr) - f: /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleAVEBridge/AppleAVEBridge-6.18/AppleAVEEncoder/AppleAVEEncoder.c l: 1829
AVE ERROR: XPC failed
AVEBridge Info: connectHandler: Device connected (0x00007fc14ed02050)AVEBridge Info: stopUserClient: IOServiceClose was successful.

AVEBridge Error: AVEEncoder_CreateInstance: returning err = -12908
2018-11-14 20:46:45.740 VideoToolboxTest[3285:849950] {
    CodecName = HEVC;
    CodecType = 1752589105;
    DisplayName = "Apple HEVC (AVE)";
    EncoderID = "com.apple.videotoolbox.videoencoder.hevc.ave";
    EncoderName = "Apple HEVC (AVE)";
}
2018-11-14 20:46:45.743 VideoToolboxTest[3285:849950] {
    CodecName = HEVC;
    CodecType = 1752589105;
    DisplayName = "Apple HEVC (HW)";
    EncoderID = "com.apple.videotoolbox.videoencoder.hevc.gva";
    EncoderName = "Apple HEVC (HW)";
}
2018-11-14 20:46:45.743 VideoToolboxTest[3285:849950] {
    AllowFrameReordering =     {
    };
    AllowTemporalCompression =     {
    };
    AverageBitRate =     {
    };
    ColorPrimaries =     {
    };
    ConnectionID =     {
    };
    ContentLightLevelInfo =     {
    };
    DataRateLimits =     {
    };
    EncoderUsage =     {
    };
    ExpectedFrameRate =     {
    };
    MasteringDisplayColorVolume =     {
    };
    MaxKeyFrameInterval =     {
    };
    NegotiationDetails =     {
    };
    PixelAspectRatio =     {
    };
    Priority =     {
    };
    ProfileLevel =     {
        SupportedValueList =         (
            "HEVC_Main_AutoLevel"
        );
    };
    RealTime =     {
    };
    TransferFunction =     {
    };
    UsingHardwareAcceleratedVideoEncoder =     {
    };
    YCbCrMatrix =     {
    };
}
2018-11-14 20:46:45.748 VideoToolboxTest[3285:849950] {
    CodecName = HEVC;
    CodecType = 1752589105;
    DisplayName = "Apple HEVC (SW)";
    EncoderID = "com.apple.videotoolbox.videoencoder.hevc.vcp";
    EncoderName = "Apple HEVC (SW)";
}
2018-11-14 20:46:45.748 VideoToolboxTest[3285:849950] {
    AllowFrameReordering =     {
    };
    AllowTemporalCompression =     {
    };
    AverageBitRate =     {
    };
    ColorPrimaries =     {
    };
    ContentLightLevelInfo =     {
    };
    EncoderUsage =     {
    };
    ExpectedFrameRate =     {
    };
    FigThreadPriority =     {
    };
    InitialQP =     {
    };
    InitialQPI =     {
    };
    MasteringDisplayColorVolume =     {
    };
    MaxKeyFrameInterval =     {
    };
    MaxKeyFrameIntervalDuration =     {
    };
    NegotiationDetails =     {
    };
    NumberOfParallelCores =     {
    };
    PixelAspectRatio =     {
    };
    PrivateKey000 =     {
    };
    PrivateKey001 =     {
    };
    PrivateKey002 =     {
    };
    PrivateKey003 =     {
    };
    PrivateKey004 =     {
    };
    PrivateKey005 =     {
    };
    PrivateKey023 =     {
    };
    PrivateKey024 =     {
    };
    PrivateKey034 =     {
    };
    PrivateKey035 =     {
    };
    PrivateKey036 =     {
    };
    ProfileLevel =     {
        SupportedValueList =         (
            "HEVC_Main10_AutoLevel",
            "HEVC_Main_AutoLevel",
            "HEVC_MainStill_AutoLevel",
            "HEVC_Monochrome_AutoLevel"
        );
    };
    Quality =     {
    };
    QuantizationScalingLists =     {
    };
    QuantizationScalingMatrixPreset =     {
    };
    RequireDeterministicDependencyAndReordering =     {
    };
    RequiredHEVCPictureParameterSetID =     {
    };
    RequiredHEVCSequenceParameterSetID =     {
    };
    SourceFrameCount =     {
    };
    ThermalLevel =     {
    };
    TransferFunction =     {
    };
    UsingCellular =     {
    };
    YCbCrMatrix =     {
    };
}
2018-11-14 20:46:45.749 VideoToolboxTest[3285:849950] {
    CodecName = JPEG;
    CodecType = 1785750887;
    DisplayName = JPEG;
    EncoderID = "com.apple.videotoolbox.videoencoder.jpeg";
    EncoderName = "Apple JPEG";
}
2018-11-14 20:46:45.749 VideoToolboxTest[3285:849950] {
    Quality =     {
        PropertyType = Number;
        ReadWriteStatus = ReadWrite;
    };
}
2018-11-14 20:46:45.749 VideoToolboxTest[3285:849950] NegotiationDetails
2018-11-14 20:46:45.749 VideoToolboxTest[3285:849950] NegotiationDetails
logout
Saving session...
...saving history...truncating history files...
...completed.
Deleting expired sessions...none found.

[Process completed]


Re: HB & T2 chip

Posted: Tue Dec 18, 2018 2:47 am
by LowBoost
New guy to the forums although I have lurked every once in a while for a while. I just ordered a 2018 MacMini 6-Core hoping to get better Handbrake performance than my 2015 iMac i7-5k Retina and I just found this post.

Please bear with my ignorance on the subject, but it seems I will run into some limitations with it? Should I cancel my order?

Re: HB & T2 chip

Posted: Tue Dec 18, 2018 8:11 pm
by s55
We don't and won't know the status of the T2 chip for some time since none of the developers have a system with one. So if your buying it for that, there is no guarantee it'll work, ever be supported or be any good if/when it is.

That said, depending on what CPU you have on that iMac, the next release will likely be able to use QuickSync via VideoToolbox so upgrading may not be worth it.

Re: HB & T2 chip

Posted: Wed Dec 19, 2018 12:10 am
by LowBoost
@s55: Thanks for the prompt reply.

I ordered the 3.2GHz 6-core Intel Core i7Turbo Boost up to 4.6GHz 12MB shared L3 cache (Highest available).
Oh well, it looks like I should cancel my order before the order ships. I was planning on giving my wife/son the iMac, but use both to help transcode my videos from x264 to x265 (To save space in NAS).

@hanumag: Have you tried Handbrake with your new MacMini?

*UPDATE*
I reached out to cancel my order, but I was told it is scheduled to be delivered tomorrow. I was skeptical as the order stated it would be delivered on Dec 26. I received an email almost immediately with tracking information. It shows it left China last night.

I will install Handbrake and give it a try as soon as I receive it. Is there anything I can check for you/devs while I am at it?

Re: HB & T2 chip

Posted: Sun Dec 23, 2018 5:15 pm
by hanumang
LowBoost wrote:
Wed Dec 19, 2018 12:10 am
@hanumag: Have you tried Handbrake with your new MacMini?
Yessir. I have only used the VideoToolBox encoder option to test. As stated by several posters already, the VTB encoder is fast but is it limited in options (bitrate only, limited to 1-pass).

Honestly, if you're looking to churn out quick encodes (video dailies, game footage, etc), you're better off using x265 and the ultrafast preset. On my i5, at least, they run at virtually the same speed (~100fps for 1080p24 source to 1080p24 output).

For anything that I am doing where I care about output quality and file size, I use x265 with the preset set to slower -- which grinds at ~4fps. But this frees up my laptop, so I'm okay with that.

Re: HB & T2 chip

Posted: Tue Apr 09, 2019 2:31 pm
by Nomis101
There is a test about the impact of the T2 chip
https://appleinsider.com/articles/19/04 ... most-users