• 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

I've just found out that after removing unfairgva=5 boot-args, Compressor still uses my GPU for HEVC encoding. But I have to select encoder type to Fast and disable Allow frame reordering.

If I choose Slower or both, my CPU will maxed out and my GPU will be like this:
Screen Shot 2023-01-05 at 10.58.23 AM.png
 
I tried exporting a video to H.264 and HEVC with the same bitrate (50000kbps) and the file size is the same. I don't know why H.264 output a file with slightly lower bitrate, so its file size is a little smaller

But HEVC can use half the bitrate and still output the same quality as H.264 with double the bitrate. So I export that video again in HEVC with 25000 kbps bitrate. Its file size is smaller by almost 50%

But I don't know why choosing encoder type to Slower just use my GPU by a few %, while my CPU is at 100%. So I have to choose Fast

The whole purpose of HEVC is produce same quality video as H.264 at the same bitrate but at almost half the file size. THat's not what we are seeing on macOS with AMD dGPU.

Without professional broadcast quality monitors and appropriate test equipment it is not easy to tell the difference between videos with half the bitrate using just human eyes...even with high motion content.

I am not sure why "Slower" setting does not use he dGPU. Your are using iMacPro1,1 model ID. I can only speculate that the drivers are reserving that option for IGPU based systems and on a real iMacPro1,1 (which does NOT have an IGPU) it has enough CPU raw processing power that users do not notice the extra load on the CPU.
 
I've just found out that after removing unfairgva=5 boot-args, Compressor still uses my GPU for HEVC encoding. But I have to select encoder type to Fast and disable Allow frame reordering.

That's because you are using iMacPro1,1 model ID and one of the functions of unfairgva boot-args is to change the board id of the system for video acceleration to that of an iMacPro1,1. If your model ID is set to iMacPro1,1, then your board id is already set and that's why encoding is works via the dGPU.

The other function of unfairgva is to enable DRM playback (Netflix, Prime, AppleTV, etc).

I am doing some testing with iMacPro1,1 model ID on my Hack 2 and will let everyone know what I find.
 
  • Like
Reactions: KVyDavid
The whole purpose of HEVC is produce same quality video as H.264 at the same bitrate but at almost half the file size.
I thought so at first. But after doing some research, every information I found says that HEVC can be encoded with half the bitrate yet deliver the same quality compare to H.264. With the same bitrate, HEVC will be sharper

I test that out. Tried exporting the same video to H.264 and HEVC at 10000kbps (I set it to low bitrate so that the difference will be clearer). I then import them to FCP X to zoom in the videos. The results are very clear. H.264 is a lot less detailed, especially hair strands, skin wrinkles and other uneven color/surface textures. H.264 process those textures and smooth them out while HEVC retains them very well. I can see the differences in some parts without needing to zoom in

I then export another HEVC file at 5000kbps and compare it with the above H.264 video. And HEVC, in spite of lower bitrate, still retain more details. Some details are even better than H.264 with double the bitrate. It's hard to include screenshots here, image compression will make it harder for you to see. You can try that out and see the difference.

So my conclusion is: Because of more efficient algorithm, HEVC needs less data (about 50%) to give out the same (maybe slightly better) results than H.264 with double the bitrate

P.s: This maybe out of topic. But still need to clarify some misconceptions for everyone (even myself too) 🙂
 
  • Like
Reactions: MacNB
I am doing some testing with iMacPro1,1 model ID on my Hack 2 and will let everyone know what I find.
Hoping for some interesting informations 😀
 
I thought so at first. But after doing some research, every information I found says that HEVC can be encoded with half the bitrate yet deliver the same quality compare to H.264. With the same bitrate, HEVC will be sharper

I test that out. Tried exporting the same video to H.264 and HEVC at 10000kbps (I set it to low bitrate so that the difference will be clearer). I then import them to FCP X to zoom in the videos. The results are very clear. H.264 is a lot less detailed, especially hair strands, skin wrinkles and other uneven color/surface textures. H.264 process those textures and smooth them out while HEVC retains them very well. I can see the differences in some parts without needing to zoom in

I then export another HEVC file at 5000kbps and compare it with the above H.264 video. And HEVC, in spite of lower bitrate, still retain more details. Some details are even better than H.264 with double the bitrate. It's hard to include screenshots here, image compression will make it harder for you to see. You can try that out and see the difference.

So my conclusion is: Because of more efficient algorithm, HEVC needs less data (about 50%) to give out the same (maybe slightly better) results than H.264 with double the bitrate

P.s: This maybe out of topic. But still need to clarify some misconceptions for everyone (even myself too) 🙂

Good observations. HEVC vs H.264 subject is complex. There are pro's & con's for each. Larry Jordan is well known guru in the Broadcast industry. See his article on the subject.
But generally Lower bitrate should produce lower file size especially with HEVC.
In your experiment you did not state the file sizes of H.264 & HEVC outputs.

Interesting discussion but yes you are right...we are getting a bit off-topic....unless we find any technically info on AMD's dGPU encoder.
 
Last edited:
  • Like
Reactions: KVyDavid
In your experiment you did not state the file sizes of H.264 & HEVC outputs.
Oh, I forgot to mention that.
As I've mention before, with the same bitrate, H.264 and HEVC have the same file size. So when I exported HEVC to 5000kbps, and H.264 to 10000kbps, HEVC outputted about half the file size compare to H.264 (about 100MB vs 180MB)
 

Forum statistics

Threads
1,447
Messages
13,764
Members
20,574
Latest member
eeeee