Handbrake with HVEC H265 4k encoding, more CPU power, advise needed

Hi, I’m new here so I hope I have posted this in the right place. I’m looking to speed up my media encoding of my physical films library that I store on my HTPC. Currently I’m using handbrake to encode 4k HDR content using my 5950x with H265 at R17 and passing through all the audio. Usually an encode takes around 8 hours, and pins all the CPU cores to near 100%. I’m thinking about getting another threadripper (had a 1950x for a while) with more cores than my current 5950x, so 5000 pro or waiting for the 7000 range if they are a thing. My main concern is if the encodes will scale with the extra cores, just wondering if anyone has a threadripper cpu with more than 32 threads that had tried doing this or could try this for me let me know what the outcome was. Thanks very much for any help.

1 Like

I usually only encode on 8 cores, but I can try with more cores this evening if it helps.

That would be great, thank you. What CPU would you be trying it on? I tried looking on your profile for your specs but came up empty handed, guessing I’m looking in the wrong place.

I have a Threadripper 3995WX with 64 cores. I will run a quick test with 8,16,32 and 64 cores on a small sample file. Since this is related have you though about hardware transcoding with a GPU? I know people say the quality can be better and the file size can be smaller with software encoding, but honestly I can not see a difference when encoding with my GPU and the file size is also not that much worse. These days I mostly encode to AV1, but as I said with my GPU, which is so much faster.

Thank you for doing that.

I have tried GPU encoding, but quite sometime ago on an nvidia 980. I haven’t tried on the 6900xt as of yet. The AV1 encoding did catch my interest, but I couldn’t find much information regarding encoding, so I went back to CPU encoding.

The 6900XT can in fact not encode AV1. It is missing the hardware encoders on the chip. AV1 is a new encoding standard that is slowly supported by many devices. The files can be smaller, or the bitrate lower while maintaining the same quality as H264 or H265. It is interesting for the web, since it means you need to transfer less data, but also for your own libraries since it saves disc space. However you need to be aware that the encoding process is more demanding than H265, since the compression algorithm is more complicated and requires more work by the CPU.

Interesting… Do you know if I used one of Intel’s new GPU’s in alongside the 6900xt Handbrake would let me use hardware AV1 encoding at 4k?

The link I provided is a table with hardware support and should answer your question. It shows that Intel Arc GPUs can encode in hardware while Intel Xe iGPUs can only decode in hardware. I brought up GPU hardware encoding since it is not only a big time saver a Intel Arc or AMD RX7600 should be significantly cheaper than to buy a Threadripper. But this is up to you to decide.

I did a transcode of a H265 4K 10bit file to H265 1080p 8bit (no filters, RF16, slow preset):
8 cores: 100% utilization
16 cores: 90% utilization
32 cores: 30-35% utilization
64 cores: 14-20% utilization

Ah, sorry I missed that link. Thanks.

Thank you so much for that. Sorry to be a pain, but could you do the same encode one more time with 64 cores but from 4k h265 to 4k h265 at R16, as I’m mostly after the cpu load for that workload to keep as much quality and keep the files at 4k and save some Hdd space. Thank you again for all your help.

I think you mean H264 to H265, but alright.

I could be wrong, it’s been a long shift here. Aren’t blu rays h265?

Most I’ve seen are H264, some H265. Why would you even transcode from H265 to H265, you won’t save any space, its the same codec, you will just loose quality because you transcoded it.

4K H264 to 4K H265 RF16, slow preset on 64 cores results in 30-35% CPU utilization.

You’ve got me questioning myself now… I will have a look at a few of the blu rays when I get home to make sure.

Thank you for the extra encode and all your help so far. Given me some stuff to look into as well.

I do a lot of ripping and transcoding. I prefer having my media play from my server. Anyways… All the 4k uhd blurays I have ripped have been h.265 native on the disc. Al the normal blurays have been 264 on the disc.

I have a 24 core 48 thread thread ripper 2970 and the 12 core 1920 that I have used to transcode in hand brake. The 1920 was pretty close to maxed out when a handbrake task was started. The 2970 does not get all threads pinned. I have tried doing two transcodes at once but I crashed the system the few times I tried.

My handbrake procedure is to transcode h265 normal blurays to h.265, but I don’t even bother with the 4k uhd blurays.

I was experimenting with CPU AV1 encoding but even at the best quality settings,I was able to find weird artifacts in the picture. But not with h.265 encoding. Which is a shame, because I really want to use Open standards. Maybe it will be ironed out. I have not tried GPU AV1 but I assume it won’t be better than best quality settings of CPU encoding, just faster.

Thanks for all the help guys. I think because of the increased encode time for h265 4k HDR, cost of running the CPU at near 100% load for at least 8 hours per encode, and with some encodes the file size doesn’t shrink a huge amount I’m just going to not bother encoding at all, at least until there is a faster option, GPU encodes always seem to have too much quality dropped, at least for my liking. For now I will just get more HDD space and keep the files as they are from Makemkv, large as they are.

1 Like

This is interesting because this use case is almost exactly the same as mine. I am building out my 4k Plex library, and a few months ago I started ripping/encoding my UHD discs.

I too am using h.265 encoding. I tried using CPU encoding with my 5900x, but like you OP, it just took way too long.

I ended up using NVenc, h.265 10-bit encoding. I can encode a 2 hour movie in about 1 hour (roughly 50 fps) using my 3060 TI.

I don’t think CPUs are fast enough to do this with your CPU - a 3060 TI isn’t that expensive, and there are probably cheaper GPUs that would do almost as good a job.

If you want I can share the specifics of my preset, but it is tuned for quality over speed, so you could probably get the encodes to go a lot faster.

strange my 3900x encodes 40 to 60 fps and 7950x is 50 to 70 fps with hevc in handbrake. That is 1080p though not 4k.

I’ve tried a few times to encode with my 6900xt, but it always comes out as a garbled green mess when I try to encode h265 in 4k 10bit (8 bit comes out fine) so I gave up as I need 10 bit to keep the HDR, HDR 10+ and dolby vision data.

What settings are you using for your encodes, and have you tried the latest nightly build of handbrake that can keep the dolby vision data if that works on your GPU and the quality drop is not too bad then that could be a viable option for me.