Any Reason for GPU encodes if Quality is Priority

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Any Reason for GPU encodes if Quality is Priority

Post by wyliec2 »

Description of problem or question:

I have two different machines - Intel 5690x (8 core/16 thread) with AMD Radeon R9 390 GPU and a new AMD 3950x with Nvidia 2070S GPU.

I've tried VCE on the 5960x/R9 390 and gotten sort of garbage - audio completely out of sync with video.

With the 3950x/2070S using NVEnc I've gotten results all over the map - fast processing but sometimes the files are much smaller than standard h.264 and other times are double the size. Additionally, the GPU seems to stay at 0% utilization during this encode - I know the monitoring works because it maxed out running the Steam Performance evaluation.

I have about 1000 movies I'm converting from ISO to MKV - these are mostly Blu Ray and quality + size are priorities. The standard h.264 encode with Quality RF = 18 and VerySlow encode has been my baseline producing great quality and typically a 50-75% size reduction.

If quality is my main concern and I'm willing to trade encode speed for a smaller file, is there any reason to mess with GPU-based encoding??

Thanks in advance for any insights!

Steps to reproduce the problem (If Applicable):

h.264 VCE on R9 390 or h.264 NVEnc on 2070S platform


HandBrake version (e.g., 1.0.0):

1.3.1

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

Windows 10 Home 64-bit

HandBrake Activity Log ***required*** (see How-to get an activity log)

Code: Select all


This is a 'generalities' question not specific to a particular encode example.
Deleted User 13735

Re: Any Reason for GPU encodes if Quality is Priority

Post by Deleted User 13735 »

Not unless you're in a hurry. For "comparable" quality, your NVENC files may actually be Quite a bit larger than with x264.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by JohnAStebbins »

If quality is my main concern and I'm willing to trade encode speed for a smaller file, is there any reason to mess with GPU-based encoding??
You should have lead with this question. It's really all you needed to say. Currently *all* "GPU" based encoders are less effecient than software encoders. "Less effecient" is another way of saying that for the same quality you will require a larger file size.

Just FYI, the term "GPU encoder" is generally badly misused these days. There are some actual "GPU" encoders that use the GPU compute engines to do video encoding, but these are all abysmally awful. They are typically targeted at specific use cases where you don't want to burden the CPU and you don't care at all about quality. They are not typically that fast, just fast enough for real-time video conferencing generally. They are very poor quality. All the best (fastest, highest quality) "GPU encoders" use dedicated silicon for a hardware based encoder that happens to reside on the same chip as the GPU, but does not use any of the GPUs compute capabilities. The only overlap in function is memory and data bus usage. So they really have very little to do with the GPU. It would be more correct to just simply call them "hardware" encoders.
wyliec2
Posts: 47
Joined: Sat Apr 11, 2020 3:06 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by wyliec2 »

JohnAStebbins wrote: Mon Apr 13, 2020 2:56 pm
If quality is my main concern and I'm willing to trade encode speed for a smaller file, is there any reason to mess with GPU-based encoding??
You should have lead with this question. It's really all you needed to say. Currently *all* "GPU" based encoders are less effecient than software encoders. "Less effecient" is another way of saying that for the same quality you will require a larger file size.
Thanks for your answer!!
All the best (fastest, highest quality) "GPU encoders" use dedicated silicon for a hardware based encoder that happens to reside on the same chip as the GPU, but does not use any of the GPUs compute capabilities. The only overlap in function is memory and data bus usage. So they really have very little to do with the GPU. It would be more correct to just simply call them "hardware" encoders.
Do you think this explains why I had drastically faster times using NVEnc yet the GPU monitor showed minimal activity??

Thanks again for the reply!!
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by JohnAStebbins »

Do you think this explains why I had drastically faster times using NVEnc yet the GPU monitor showed minimal activity??
Yes, that is exactly the reason for that.
MarkS
Posts: 2
Joined: Thu Apr 23, 2020 6:23 am

Re: Any Reason for GPU encodes if Quality is Priority

Post by MarkS »

My GPU-Monitor shows 100% (Encode, not 3D). (GTX 1660 Super)

Is there any way, to tune the nvenc with parameters to "work harder" so you can get the same smaller file size you get with cpu?

I want to reduce the file size of a large video collection (h,264 mostly) with minimal quality loss by converting to h.265
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by rollin_eng »

Why not just use the CPU if thats what you want?
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by JohnAStebbins »

I'm not very familiar with the nvenc options but I believe it has a few "encoder presets" (on the video pane in the HandBrake gui) that are meant to tune the quality for size tradeoff. IIRC, people have commented that on some hardware, some presets don't appear to change the output in any meaningful way. nvenc's best is still not going to come close to what you can get from cpu encoding.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by mduell »

MarkS wrote: Thu Apr 23, 2020 6:28 am My GPU-Monitor shows 100% (Encode, not 3D). (GTX 1660 Super)

Is there any way, to tune the nvenc with parameters to "work harder" so you can get the same smaller file size you get with cpu?

I want to reduce the file size of a large video collection (h,264 mostly) with minimal quality loss by converting to h.265
No, you can't make a GPU into a CPU.

You're not going to get quality preservation with file size reduction with a hardware encoder.
Deleted User 13735

Re: Any Reason for GPU encodes if Quality is Priority

Post by Deleted User 13735 »

You can get "closer" at CQ 13-14, but the files are larger than x264 and not good enough for me. I haven't felt a need for hardware encoding in almost a year. To give to my enemies, maybe.

The oldest advice is sometimes the best. "Size, Quality, Speed, Pick two."
With hardware encoders, it seems reduced to "Size, Speed. Pick One."
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by mduell »

musicvid wrote: Sat Apr 25, 2020 12:59 amThe oldest advice is sometimes the best. "Size, Quality, Speed, Pick two."
With hardware encoders, it seems reduced to "Size, Speed. Pick One."
The same 2 of 3 tradeoff still applies, you're just picking speed when you pick a hardware encoder so you only have one choice left between size and quality. You can't not pick speed with the hardware encoders.
rollin_eng
Veteran User
Posts: 4859
Joined: Wed May 04, 2011 11:06 pm

Re: Any Reason for GPU encodes if Quality is Priority

Post by rollin_eng »

mduell wrote: Sat Apr 25, 2020 3:31 pm
musicvid wrote: Sat Apr 25, 2020 12:59 amThe oldest advice is sometimes the best. "Size, Quality, Speed, Pick two."
With hardware encoders, it seems reduced to "Size, Speed. Pick One."
The same 2 of 3 tradeoff still applies, you're just picking speed when you pick a hardware encoder so you only have one choice left between size and quality. You can't not pick speed with the hardware encoders.
This should go in the FAQ.
Deleted User 13735

Re: Any Reason for GPU encodes if Quality is Priority

Post by Deleted User 13735 »

mduell wrote: Sat Apr 25, 2020 3:31 pm The same 2 of 3 tradeoff still applies, you're just picking speed when you pick a hardware encoder so you only have one choice left between size and quality. You can't not pick speed with the hardware encoders.
+1. Well said.
I would say "limited quality" in reference to software x264/x265.
MarkS
Posts: 2
Joined: Thu Apr 23, 2020 6:23 am

Re: Any Reason for GPU encodes if Quality is Priority

Post by MarkS »

I bought a 6 core Ryzen one week before i got 7 TB of videos to encode...because hey even 4 cores would be enough *g*

A 12 core would have been even cheaper if you look at GHz / Price....
Post Reply