I am using Handbrake to do some encoding of videos into h265. I have plenty of contradictory info on the internet : should I use CPU or Videotoolbox encoding ?
Thanks.
I have the Mini M4, therefore thinking whether I should encode HW or CPU...It depends on your goals -- Videotoolbox (using Apple's hardware encoder) will encode by far the fastest. Software encoding on the CPU will generate smaller files for a given level of visual quality but will take multiple times longer.
At two extremes of use cases, people almost always use Videotoolbox when they want real-time encoding while people tend to use software/CPU encoding for archival purposes (or similarly creating files that will be saved for distribution to a lot of people).
Three additional notes:
-You didn't mention your hardware but Apple Silicon and the T2 chips share a similar media engine -- the ones in the Apple Silicon of course being a newer generation that are both faster and can handle newer media types (e.g. 10-bit HEVC for HDR)
-All else being equal you will probably want to use a relatively higher quality target setting when using hardware encoding (e.g. Videotoolbox) and will need to test different encoding parameters to find the quality/output size/encoding time tradeoff you want
-The relative tradeoffs vary between generations of hardware and so you need to check your assumptions/preferred parameters after major hardware upgrades
I have the Mini M4, therefore thinking whether I should encode HW or CPU...
VideoToolbox does NOT use the GPU on Apple silicon. It uses the Media Engine, dedicated cores created specifically for decoding/encoding.
It depends on the demand.Why would anyone use software encoding when Apple made dedicated hardware specifically for encoding? What is better than dedicated hardware?
Apple puts dedicated hardware for video decoding/encoding in every Mac. Professionals take advantage of it in Final Cut Pro/Compressor.
Users “know better” and keep using VirtualDub and Xvid, like it’s 2005. 🤷♂️
Hardware is a more efficient way to encode on the newer M series Macs (I do encoding on both Mac and AMD/Nvidia hardware). I have noticed in the thread many have claimed poorer quality, this is rectified by going into the video tab and pushing up the constant quality slider (I typically use CQ 80). Unless your doing really high end this is the perfect balance. The file size is large, but certainly nothing compared to H264.I am using Handbrake to do some encoding of videos into h265. I have plenty of contradictory info on the internet : should I use CPU or Videotoolbox encoding ?
Thanks.
Over the time of 14 years, I've encoded around 5000 videos. And during that time, I've learned that no AMD, NVIDIA, or M-Mac hardware encoder has the same output quality as the CPU encoder and get the same size.Hardware is a more efficient way to encode on the newer M series Macs (I do encoding on both Mac and AMD/Nvidia hardware). I have noticed in the thread many have claimed poorer quality, this is rectified by going into the video tab and pushing up the constant quality slider (I typically use CQ 80). Unless your doing really high end this is the perfect balance. The file size is large, but certainly nothing compared to H264.
Hmmm thanks for the feedback, TBH I have not used just Handbrake for all of my encoding (use CLI FFMpeg too). All a bit of a mystery as we are comparing Hardware encoding vs Virtual Hardware encoding. So as per your results, the instructions passed on the same video must be very different in some way, perhaps software has access to different routines?. All very interesting, thanks.Over the time of 14 years, I've encoded around 5000 videos. And during that time, I've learned that no AMD, NVIDIA, or M-Mac hardware encoder has the same output quality as the CPU encoder and get the same size.
You can have acceptable quality but with bigger size.
For example:
I have encoded a Clip in H264 on CPU in a very good quality and get a size of 5 MB. With Videotoolbox (M1 Ultra) I didn't even get the same quality when the file was over 20 MB. with Videotoolbox.
So I can choose whether to use CPU H264 or Videotoolbox H264/H265 and maybe get a file that is approximately the same size, but still not the same quality as the CPU encoded H264.
If you give me the right command, I can also test the quality of ffmpeg.Hmmm thanks for the feedback, TBH I have not used just Handbrake for all of my encoding (use CLI FFMpeg too). All a bit of a mystery as we are comparing Hardware encoding vs Virtual Hardware encoding. So as per your results, the instructions passed on the same video must be very different in some way, perhaps software has access to different routines?. All very interesting, thanks.
Hmmm thanks for the feedback, TBH I have not used just Handbrake for all of my encoding (use CLI FFMpeg too). All a bit of a mystery as we are comparing Hardware encoding vs Virtual Hardware encoding.
So as per your results, the instructions passed on the same video must be very different in some way, perhaps software has access to different routines?. All very interesting, thanks.