• Become a Premium Member for $25/year with no ads to improve your community experience.

GUIDE How to Enable H.264 and HEVC/H.265 encoding on macOS

Hi, I have the same problem. Trying to export to HEVC with Compressor using RX 560 4GB and i5 3470s. Exporting to H.264 took a few minutes and HEVC took a few hours with CPU at 100%. VideoProc says I can encode HEVC and I can use it to encode HEVC on Windows with Premiere Pro. But I don't know why macOS doesn't use my dGPU
Here're my PR files

VideoProc uses VideoToolBox API's to encode/decode.
FCPX & Compressor use Metal (and some proprietary API's depending on the Mac to access the T2 Chip).
Lot of people make the mistake of assuming VideoProc is the ultimate test of macOS's ability to encode/decode H.264 & HEVC...but it is not.

Whatevergreen kext has the ability to enable HEVC & H.264 via the dGPU.
E.g. On my Legacy BIOS Dell system, I recently added an RX 460 and I use the following boot-args to enable FCPX & Compressor to Encode/Decode for both H.264 and HEVC :
Code:
shikigva=96 unfairgva=4 shiki-id=Mac-7BA5B2D9E42DDD94

[NOTE: I believe shiki-id is no longer required].

I running FCPX 1.6.5 & Compressor 4.6.3 on Big Sur.
In order for FCPX to use the dGPU, you have to create a custom output profile in Compressor:
Screenshot 2022-12-14 at 17.26.13.png

where you have to UNCHECK the "Allow Frame reordering" option otherwise HEVC will fail.

The only problem is, the HEVC output file size is HUGH (more than 2x) compared to H.264....which defeats the object of using HEVC. If I turn "down" the Quality setting to the "Fastest" the output file is about the same size as H.264 but quality is poor...fast motion is pixelated in parts. I have not figured out what is going on yet.
It's the same if I use VideoProc to transcode an H.264 clip to HEVC.

I do not use use Davinci Resolve but I suspect it may be using Metal API's and so those Whatevergreen boot-args will need to be set and disable Frame Reordering.
 
VideoProc uses VideoToolBox API's to encode/decode.
FCPX & Compressor use Metal (and some proprietary API's depending on the Mac to access the T2 Chip).
Lot of people make the mistake of assuming VideoProc is the ultimate test of macOS's ability to encode/decode H.264 & HEVC...but it is not.

Whatevergreen kext has the ability to enable HEVC & H.264 via the dGPU.
E.g. On my Legacy BIOS Dell system, I recently added an RX 460 and I use the following boot-args to enable FCPX & Compressor to Encode/Decode for both H.264 and HEVC :
Code:
shikigva=96 unfairgva=4 shiki-id=Mac-7BA5B2D9E42DDD94

[NOTE: I believe shiki-id is no longer required].

I running FCPX 1.6.5 & Compressor 4.6.3 on Big Sur.
In order for FCPX to use the dGPU, you have to create a custom output profile in Compressor:
View attachment 5370

where you have to UNCHECK the "Allow Frame reordering" option otherwise HEVC will fail.

The only problem is, the HEVC output file size is HUGH (more than 2x) compared to H.264....which defeats the object of using HEVC. If I turn "down" the Quality setting to the "Fastest" the output file is about the same size as H.264 but quality is poor...fast motion is pixelated in parts. I have not figured out what is going on yet.
It's the same if I use VideoProc to transcode an H.264 clip to HEVC.

I do not use use Davinci Resolve but I suspect it may be using Metal API's and so those Whatevergreen boot-args will need to be set and disable Frame Reordering.

Shiki function is not implemented for macOS Big Sur 11.x and newer. Adding it will have no effect.

Secondly, HEVC creates more compressed output. Tested with Resolve and Handbrake. What SMBIOS are you using?
 
Shiki function is not implemented for macOS Big Sur 11.x and newer. Adding it will have no effect.

Secondly, HEVC creates more compressed output. Tested with Resolve and Handbrake. What SMBIOS are you using?

I leave the Shiki boot-args as I multi-boot this rig.
unfairgva is required for my rig for all os's. It injects iMacPro1,1 board-id which enables encode/decode.
I'm using iMac14,2 model ID.

Yes I am aware HEVC is supposed to create a more compressed output but with this RX 460 Baffin card, it does not with FCPX, Compressor nor VideoProc.
It does not seem to be related to the App but the drivers since FCPX, Comp and VideoProc all produce exactly same much larger output.
 
VideoProc uses VideoToolBox API's to encode/decode.
FCPX & Compressor use Metal (and some proprietary API's depending on the Mac to access the T2 Chip).
Lot of people make the mistake of assuming VideoProc is the ultimate test of macOS's ability to encode/decode H.264 & HEVC...but it is not.

Whatevergreen kext has the ability to enable HEVC & H.264 via the dGPU.
E.g. On my Legacy BIOS Dell system, I recently added an RX 460 and I use the following boot-args to enable FCPX & Compressor to Encode/Decode for both H.264 and HEVC :
Code:
shikigva=96 unfairgva=4 shiki-id=Mac-7BA5B2D9E42DDD94

[NOTE: I believe shiki-id is no longer required].

I running FCPX 1.6.5 & Compressor 4.6.3 on Big Sur.
In order for FCPX to use the dGPU, you have to create a custom output profile in Compressor:
View attachment 5370

where you have to UNCHECK the "Allow Frame reordering" option otherwise HEVC will fail.

The only problem is, the HEVC output file size is HUGH (more than 2x) compared to H.264....which defeats the object of using HEVC. If I turn "down" the Quality setting to the "Fastest" the output file is about the same size as H.264 but quality is poor...fast motion is pixelated in parts. I have not figured out what is going on yet.
It's the same if I use VideoProc to transcode an H.264 clip to HEVC.

I do not use use Davinci Resolve but I suspect it may be using Metal API's and so those Whatevergreen boot-args will need to be set and disable Frame Reordering.
Thanks for your ìnormations. I've tried it on Monterey and didn't work.

But I've just found out that the Photos app does use my GPU RX 560 for exporting when I export a Memory video. It exported to HEVC 8-bit at 1920x1080. This app is by far the only app that uses my GPU for encoding HEVC
 
Thanks for your ìnormations. I've tried it on Monterey and didn't work.

But I've just found out that the Photos app does use my GPU RX 560 for exporting when I export a Memory video. It exported to HEVC 8-bit at 1920x1080. This app is by far the only app that uses my GPU for encoding HEVC
Then it means the encoding you're trying to use isn't supported or you're not using the correct settings for export.
 
Thanks for your ìnormations. I've tried it on Monterey and didn't work.

But I've just found out that the Photos app does use my GPU RX 560 for exporting when I export a Memory video. It exported to HEVC 8-bit at 1920x1080. This app is by far the only app that uses my GPU for encoding HEVC

Happy New Year !

What exactly did you try ?
What boot-args did you try ?
What Compressor settings did you try ?

Like I said even with my Legacy PC with RX 460, FCPX/Compressor can Encode/Decode both H.264 & HEVC.
 
  • Like
Reactions: KVyDavid
Happy New Year !

What exactly did you try ?
What boot-args did you try ?
What Compressor settings did you try ?

Like I said even with my Legacy PC with RX 460, FCPX/Compressor can Encode/Decode both H.264 & HEVC.
Happy new year!

I tried adding all 3 of your boot-args: shikigva=96 unfairgva=4 shiki-id=Mac-7BA5B2D9E42DDD94
And also removing shiki-id but keep other two

I tried exporting to HEVC using Compressor with the following settings:
 

Attachments

  • 1672628354321.png
    1672628354321.png
    43.5 KB · Views: 3
  • 1672628366118.png
    1672628366118.png
    79.3 KB · Views: 3
Happy new year!

I tried adding all 3 of your boot-args: shikigva=96 unfairgva=4 shiki-id=Mac-7BA5B2D9E42DDD94
And also removing shiki-id but keep other two

I tried exporting to HEVC using Compressor with the following settings:

Your results are as expected since in the Compressor settings, you did NOT UNCHECK the "Allow Frame reordering" as I had suggested.
That box should have no check mark (see my screenshot in post #63 above).
 

Forum statistics

Threads
1,479
Messages
14,003
Members
21,178
Latest member
toadisawesome