HB & T2 chip

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
hanumang
Posts: 44
Joined: Thu Feb 04, 2010 6:11 pm

HB & T2 chip

Post by hanumang » Wed Oct 31, 2018 5:36 pm

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

User avatar
Ritsuka
HandBrake Team
Posts: 1000
Joined: Fri Jan 12, 2007 11:29 am

Re: HB & T2 chip

Post by Ritsuka » Wed Oct 31, 2018 5:42 pm

I guess it will be available via VideoToolbox, but probably the only available setting will be the average bitrate.

User avatar
s55
HandBrake Team
Posts: 9267
Joined: Sun Dec 24, 2006 1:05 pm

Re: HB & T2 chip

Post by s55 » Wed Oct 31, 2018 6:52 pm

@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)

mduell
Veteran User
Posts: 6194
Joined: Sat Apr 21, 2007 8:54 pm

Re: HB & T2 chip

Post by mduell » Wed Oct 31, 2018 8:36 pm

The fixed function video encoder hardware tends to be... not great... and Apple's APIs to it are... even worse.

hanumang
Posts: 44
Joined: Thu Feb 04, 2010 6:11 pm

Re: HB & T2 chip

Post by hanumang » Wed Oct 31, 2018 9:14 pm

Thank you gentleman -- I guess a 6-core it is.

End User
Posts: 2
Joined: Wed Nov 07, 2018 3:39 pm

Re: HB & T2 chip

Post by End User » Wed Nov 07, 2018 3:46 pm

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.

User avatar
BradleyS
Moderator
Posts: 1427
Joined: Thu Aug 09, 2007 12:16 pm

Re: HB & T2 chip

Post by BradleyS » Wed Nov 07, 2018 4:24 pm

It's important to remember that fast != quality when comparing hardware encoders.

End User
Posts: 2
Joined: Wed Nov 07, 2018 3:39 pm

Re: HB & T2 chip

Post by End User » Wed Nov 07, 2018 4:48 pm

At this point I'm just glad that someone tried.

Melon_Life
Posts: 2
Joined: Tue Jun 30, 2015 3:36 pm

Re: HB & T2 chip

Post by Melon_Life » Thu Nov 08, 2018 2:04 pm

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 :/)

User avatar
Ritsuka
HandBrake Team
Posts: 1000
Joined: Fri Jan 12, 2007 11:29 am

Re: HB & T2 chip

Post by Ritsuka » 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.

User avatar
s55
HandBrake Team
Posts: 9267
Joined: Sun Dec 24, 2006 1:05 pm

Re: HB & T2 chip

Post by s55 » Thu Nov 08, 2018 7:03 pm

@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.

macmuchmore
Posts: 6
Joined: Tue May 21, 2013 5:10 pm

Re: HB & T2 chip

Post by macmuchmore » Mon Nov 12, 2018 6:54 pm

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!!

User avatar
s55
HandBrake Team
Posts: 9267
Joined: Sun Dec 24, 2006 1:05 pm

Re: HB & T2 chip

Post by s55 » Mon Nov 12, 2018 6:56 pm

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.

User avatar
BradleyS
Moderator
Posts: 1427
Joined: Thu Aug 09, 2007 12:16 pm

Re: HB & T2 chip

Post by BradleyS » Mon Nov 12, 2018 7:20 pm

Feel free to build and test the feature branch before it lands: https://github.com/HandBrake/HandBrake/pull/1522

macmuchmore
Posts: 6
Joined: Tue May 21, 2013 5:10 pm

Re: HB & T2 chip

Post by macmuchmore » Mon Nov 12, 2018 7:39 pm

Um - I am not sure how to do that.... I am not very technical and I don't think I can figure that out.

mduell
Veteran User
Posts: 6194
Joined: Sat Apr 21, 2007 8:54 pm

Re: HB & T2 chip

Post by mduell » Mon Nov 12, 2018 9:53 pm


hanumang
Posts: 44
Joined: Thu Feb 04, 2010 6:11 pm

Re: HB & T2 chip

Post by hanumang » Thu Nov 15, 2018 1:52 am

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]


Post Reply