Apple's T2 chip makes a giant difference in video encoding for most users

Posted:
in Current Mac Hardware edited December 2019
Apple's T2 chip in the Mac mini, MacBook Pro, and iMac Pro can greatly speed video encoding, but by how much? Now that Apple has two machines with the same CPU, one with the T2, and one without, there's a good way to tell.




There has already been a lot of discussion that the T2 and Intel's QuickSync routines speed encoding. Support for hardware encoding for the pair of features is in Apple's VideoToolbox routines.

But, with the release of the 2019 iMac 4K that uses the same processor as the low-end 2018 Mac mini, there's finally an opportunity to test the processors both with and without the T2, using the exact same software encoder settings.

For this test, we're going to use Handbrake, an AppleInsider 4K video master, Apple and Intel encoding software, and a pile of hardware. Let's break down the pieces that are involved in this testing.

What is Handbrake?

An open-source transcoding tool, Handbrake can be used to convert video from one format into another. For example, it could be used to change a H.265-based MP4 file into an MPEG-4 or and MPEG-2. Or for audio, it can convert from an AAC file to an MP3. Handbrake allows high quality media like a HD Blu-ray movie to be turned into something more compatible or space-saving for another device, like mobile devices.

At the same time, Handbrake is able to transcode video to a variety of different specifications, including changing the bitrate, whether the video is optimized for online usage, the resolution, support for VFR and CFR, and applying assorted video filters to improve the picture. It includes a variety of presets for devices commonly used to view the resulting files, saving even more time for those who want to watch videos from one source via another piece of hardware.

Completed Handbrake encode, with activity log
Completed Handbrake encode, with activity log


Handbrake is also an exceptional tool for people who use home servers as part of their network, as large collections of videos can be passed through the software so they can be standardized to the same file type and format. For streaming across a network, and for saving disk space, Handbrake has proven itself to be valuable to the users who need it.

And, it can encode a video in 4K in H.264 or HEVC, suitable for streaming from iTunes to an Apple TV. We're encoding to H.265 HEVC here.

What is Intel QuickSync?

Introduced in 2011, Intel's QuickSync encoding routines are driven by on-die hardware, and is considerably faster and more power-efficient when used rather than just number-crunching by the processor. Encodes using QuickSync to its maximum extent typically takes a fraction of the usual time, and are sometimes faster than transcoding with the assistance of a graphics card.

QuickSync has evolved over the years. The 5,1 Mac Pro and cylindrical 6,1 Mac Pro don't have it at all -- and neither does the iMac Pro because of Intel's architectural choices in the Xeon processor.

What is Apple's VideoToolbox?

VideoToolbox is Apple's low-level framework for iOS, macOS, and tvOS that provides software with access to hardware-based encoders and decoders, for the purposes of compression, decompression and transcoding. For developers, it is a way to tap into Apple's hardware directly rather than using their own software-based solution, typically saving time and simplifying the process of adding the functionality to their apps and tools.

VideoToolbox taps into the T2 if available, and any Intel QuickSync support that any given machine has.

The test video

The video that we're using for the source, we generated for our iMac 4K review. As fed to Handbrake, it is a 1.49GB file, with a resolution of 3840x2160, and a color profile of 1-1-1, with a two-channel stereo mix.





We didn't use the YouTube video, but rather our 4K master.

The Handbrake settings

We've selected an encoder using Apple's VideoToolkit, and upped the bitrate to 18,000 kilobits per second. No other transformations are being performed on the video, and resolution is maintained.

Handbrake itself has far more options than Apple's VideoToolkit. If you select the encoder in Handbrake that utilizes the T2, it will (mostly) prevent you from changing something critical. But, there are still a few parameters that will prevent an encode.

These are mostly left as an exercise for the reader to discover. Bitrate and similar basic settings can be changed, but stray too far from this, and your encode may fail. At least it will fail early

The results

We've run the encode on a wide array of recent hardware, but what we're specifically looking at here, is the i3-8100 in the Mac mini with T2, compared to the iMac 4K without.

Transcoding test durations for Macs with the Core i3-8100 in Handbrake
Transcoding test durations for Macs with the Core i3-8100 in Handbrake


Considering the possibility that the slow hard drive was the problem, we re-ran the test to both a USB 3.1 type C SSD on the iMac 4K with identical results. Additionally, running the test on an i7 Mac mini with an external 4200RPM laptop hard drive connected by USB 3.1 type A provided identical results with a higher speed encode, effectively eliminating the slow drive on the entry-level iMac 4K as a bottleneck.

So, 100 percent of the difference between the iMac 4K and i3 Mac mini with the basic Video Toolkit is because of the T2.

Early testing on longer video encodes showed similar proportionality between encodes using the T2 and those that aren't or can't, but we'll be looking more at that at a future date.

The eight-minute software encode from the i3 Mac mini is interesting. While this encode setting doesn't completely exclude all of Quicksync, it does cut off a great deal of it, resulting in a much slower encode than the unconstrained machine. This is a good demonstration of what Quicksync brings to the table.

You may want more than just the T2

Having the T2 isn't the only variable to consider, though. Multiple cores means more "grunt" behind the QuickSync routines, and more CPU power itself to throw at the problem.



We like the 5,1 Mac Pro tower a great deal here at AppleInsider for myriad reasons, and we like how the cylindrical 6,1 Mac Pro generally, works, performs, and looks. But these video encode numbers may be the most compelling reason for video-centric folk to upgrade to a T2 machine that we've seen yet.

Consider your workflow

Apple's T2 will likely make it all the way across the product line. It's already on the Mac mini, MacBook Pro, and iMac Pro. There are benefits, like video encoding, and problems that may or may not manifest in the future regarding repairability. Like it or not, it's here, so at least it provides some benefit beyond security to the end-user.

But, this isn't the ultimate test on the matter, and is just a practical demonstration on what the T2 will do for the vast majority of the Mac user-base. Professional video editors may find the restrictions that the T2 applies on video encodes problematic, and may find that the applications that they're using, like Adobe's recent updates and DaVinci Resolve are better served by a powerful GPU.
«13

Comments

  • Reply 1 of 56
    MacProMacPro Posts: 19,718member
    Great article.  The new Mac Pro will be tricked out for the fastest encoding I am quite sure ... 🤞🏻
    racerhomie3cgWerks
  • Reply 2 of 56
    indiekidukindiekiduk Posts: 381member
    The T2 is just Apples new name for the SMC. It does many things. The article should clarify it is comparing the use of the T2's h265 HEVC 8-bit only hardware encoder. Because the T2 also manages the power on/off switch, the clock and the sound buttons among all the other SMC features but obviously those have nothing to do with video encoding. If you weren't encoding h265 HEVC 8-bit then there would be no difference than having a T2 or not.
    edited April 2019 racerhomie3elijahg
  • Reply 3 of 56
    Mike WuertheleMike Wuerthele Posts: 6,858administrator
    The T2 is just Apples new name for the SMC. It does many things. The article should clarify it is comparing the use of the T2's h265 HEVC 8-bit only hardware encoder. Because the T2 also manages the power on/off switch, the clock and the sound buttons among all the other SMC features but obviously those have nothing to do with video encoding. If you weren't encoding h265 HEVC 8-bit then there would be no difference than having a T2 or not.
    It does. There's an image with it selected, and...

    FTA: "And, it can encode a video in 4K in H.264 or HEVC, suitable for streaming from iTunes to an Apple TV. We're encoding to H.265 HEVC here."
    watto_cobra
  • Reply 4 of 56
    thttht Posts: 5,421member
    Did you measure power (watts) or energy used during all these runs?

    The advantage of the T2 could be factors of 3x to 5x on a WHr basis, which is also really nice, above and beyond the 2x in time?

    Is QuickSync dependent on clock rate and number of cores? Ie, is the QS hardware in the uncore or in the cores themselves?

    samrodwatto_cobra
  • Reply 5 of 56
    Mike WuertheleMike Wuerthele Posts: 6,858administrator
    tht said:
    Did you measure power (watts) or energy used during all these runs?

    The advantage of the T2 could be factors of 3x to 5x on a WHr basis, which is also really nice, above and beyond the 2x in time?

    Is QuickSync dependent on clock rate and number of cores? Ie, is the QS hardware in the uncore or in the cores themselves?

    We didn't measure power during the runs, but I'll put it on the list of things to do for a follow-up. Interesting thought.

    Regarding Quicksync, there is a (slight) increase in what you get from it as the number of cores increase, but it is not linear. 
    edited April 2019 cgWerkswatto_cobra
  • Reply 6 of 56
    lorin schultzlorin schultz Posts: 2,771member
    The article seems to confirm what I've been suspecting -- that hardware acceleration only works if one accepts having certain parameter settings fixed.

    Years ago I did a mountain of tests with Handbrake, adjusting various parameters to evaluate their impact on the compressed result. I eventually settled on a combination of settings that yield the best (for my purposes) balance between file size and compression artifacts. After all the effort that went into that, I'd be reluctant to surrender any of that control to a chip that may prioritize differently than I would. I'll have to wait until I can compare myself, but I suspect I may choose to live with longer encode times to get a better end result.
    muthuk_vanalingam
  • Reply 7 of 56
    thttht Posts: 5,421member
    The article seems to confirm what I've been suspecting -- that hardware acceleration only works if one accepts having certain parameter settings fixed.

    Years ago I did a mountain of tests with Handbrake, adjusting various parameters to evaluate their impact on the compressed result. I eventually settled on a combination of settings that yield the best (for my purposes) balance between file size and compression artifacts. After all the effort that went into that, I'd be reluctant to surrender any of that control to a chip that may prioritize differently than I would. I'll have to wait until I can compare myself, but I suspect I may choose to live with longer encode times to get a better end result.
    Handbrake with the T2 is right in my wheelhouse, other than the fact that I won’t be replacing my 2013 iMac 27 until it dies. So, maybe a prospective T3 Mac will be even better. 

    I do a lot of 1080p and 2160p transcodes down to 480p to 720p for viewing on our iPhones and iPads or plain MPEG2 to H.265. I don’t really care much for quality that much, but the 2013 iMac can take all night or more if I’m transcoding a lot of movies. 
    watto_cobra
  • Reply 8 of 56
    Mike WuertheleMike Wuerthele Posts: 6,858administrator
    The article seems to confirm what I've been suspecting -- that hardware acceleration only works if one accepts having certain parameter settings fixed.

    Years ago I did a mountain of tests with Handbrake, adjusting various parameters to evaluate their impact on the compressed result. I eventually settled on a combination of settings that yield the best (for my purposes) balance between file size and compression artifacts. After all the effort that went into that, I'd be reluctant to surrender any of that control to a chip that may prioritize differently than I would. I'll have to wait until I can compare myself, but I suspect I may choose to live with longer encode times to get a better end result.
    Obviously, I wouldn't re-encode your encodes you already have, but if you have a T2 machine, it's worth a fiddle.
    watto_cobra
  • Reply 9 of 56
    samrodsamrod Posts: 60unconfirmed, member
    Curious about the massive discrepancy between the "2018 Mac Mini i3 CPU only" at 8m 51s and the "5,1 Mac Pro" at 51m 14s, both without T2/QS. Is it possible to break down the differences between T2 and QuickSync performances and which settings are required for each?
    watto_cobra
  • Reply 10 of 56
    tipootipoo Posts: 1,141member
    Edit: Nevermind, saw a rust drive was ruled out as the bottleneck 

    Though for super duper confirmation that it's not some internal caching on the T2 powered SSD, one could boot from that external rust drive and test there. 
    edited April 2019
  • Reply 11 of 56
    normangnormang Posts: 118member
    For some reason I am not clear on which preset uses the Apple Video Toolkit, is this any preset that specifies an Apple Device?
    edited April 2019 watto_cobra
  • Reply 12 of 56
    Mike WuertheleMike Wuerthele Posts: 6,858administrator
    normang said:
    For some reason I am not clear on which preset uses the Apple Video Toolkit, is this any preset that specifies an Apple Device?
    No, when you pull down the Video Encoder menu in the Video tab of Handbrake, there's an option for "H.265 (VideoToolbox)"
    cgWerkswatto_cobra
  • Reply 13 of 56
    macplusplusmacplusplus Posts: 2,112member
    The article seems to confirm what I've been suspecting -- that hardware acceleration only works if one accepts having certain parameter settings fixed.

    Years ago I did a mountain of tests with Handbrake, adjusting various parameters to evaluate their impact on the compressed result. I eventually settled on a combination of settings that yield the best (for my purposes) balance between file size and compression artifacts. After all the effort that went into that, I'd be reluctant to surrender any of that control to a chip that may prioritize differently than I would. I'll have to wait until I can compare myself, but I suspect I may choose to live with longer encode times to get a better end result.
    Your years ago settings are for H264. T2 chip encodes in H265, it has no (direct) effect on H264 encoding.
    watto_cobraspock1234
  • Reply 14 of 56
    thttht Posts: 5,421member
    samrod said:
    Curious about the massive discrepancy between the "2018 Mac Mini i3 CPU only" at 8m 51s and the "5,1 Mac Pro" at 51m 14s, both without T2/QS. Is it possible to break down the differences between T2 and QuickSync performances and which settings are required for each?
    The 5,1 Mac Pro is a cheese grater model that is likely using 10 year old Xeon processors. A comparative system today should be about 2^3 times faster, without any fancy dedicated onchip ASICs even.
    watto_cobra
  • Reply 15 of 56
    melgrossmelgross Posts: 33,510member
    tht said:
    samrod said:
    Curious about the massive discrepancy between the "2018 Mac Mini i3 CPU only" at 8m 51s and the "5,1 Mac Pro" at 51m 14s, both without T2/QS. Is it possible to break down the differences between T2 and QuickSync performances and which settings are required for each?
    The 5,1 Mac Pro is a cheese grater model that is likely using 10 year old Xeon processors. A comparative system today should be about 2^3 times faster, without any fancy dedicated onchip ASICs even.
    It’s upsetting to know that my 2012 Mac Pro, with two 6 core CPU’s, running at 3.47GHz, is slower than my iPhone Max, core for core, or my 2018 iPad Pro 12.9”. Such is progress.
    muthuk_vanalingamwatto_cobra
  • Reply 16 of 56
    hentaiboyhentaiboy Posts: 1,252member
    How does one toggle the T2 and QuickSync?
  • Reply 17 of 56
    mtbnutmtbnut Posts: 199member
    Any word on how this T2 chip helps encoding using Apple Compressor? I haven't noticed any significant increase in render speed on my MBP 15" 2018 2.6 GHz Intel Core i7 with 32 GB 2400 MHz DDR4 compared to my 2013 MBP (using Final Cut Pro and Compressor). Then again, I haven't tweaked any of the settings in Compressor like you have with Handbrake.
    edited April 2019
  • Reply 18 of 56
    DuhSesameDuhSesame Posts: 1,278member
    That’s cool, reminds me those x87 co-processors in the early days.  I thought about that T2 can be used for this purpose since it got Fusion cores in them, and hopefully they can makeup the loss from the throttling of an i9 processors.
    watto_cobra
  • Reply 19 of 56
    Mike WuertheleMike Wuerthele Posts: 6,858administrator
    hentaiboy said:
    How does one toggle the T2 and QuickSync?
    The T2 is explicitly not used unless the Video Toolkit is enabled. Features of QuickSync can be disabled on the ffmpeg command line at the core of handbrake, or by some encoding choices.
  • Reply 20 of 56
    Mike WuertheleMike Wuerthele Posts: 6,858administrator

    mtbnut said:
    Any word on how this T2 chip helps encoding using Apple Compressor? I haven't noticed any significant increase in render speed on my MBP 15" 2018 2.6 GHz Intel Core i7 with 32 GB 2400 MHz DDR4 compared to my 2013 MBP (using Final Cut Pro and Compressor). Then again, I haven't tweaked any of the settings in Compressor like you have with Handbrake.
    It depends on your output format. It doesn't do a lot unless you're outputting HEVC/H.265. I'm not sure "tweak" is quite the right word. Rather, used HEVC as an output, and told it to use the VideoToolkit.

    Like we said in the tail-end of the piece, what you're doing, depends on if the T2 is used. If you're slapping a lot of filters on, it's not going to help. 
    cgWerks
Sign In or Register to comment.