Optimising for quality, speed, or size

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Southpaw1496
Posts: 9
Joined: Wed Jun 30, 2021 3:58 pm

Optimising for quality, speed, or size

Post by Southpaw1496 »

Description of problem or question:

Until recently, I was under the impression that Handbrake compression was lossless. On finding out that this is not the case, I started trying to learn more about video encoding, but I'm not really sure how to continue beyond what I've learned already.

From what I've read, there seems to be a Quality/Speed/Size triangle, you can pick two to prioritise and the other one will suffer (i.e Fast and small encodes are low-quality, small and high-quality encodes take a long time, etc.). I would like to make three presets, each sacrificing one aspect, however, I'm not sure what settings to change to get the results I want. I'm starting with H.265 as my encoder of choice, though that may not even be the right one. I have read the documentation on [adjusting quality](https://handbrake.fr/docs/en/latest/wor ... ality.html), but it doesn't give any advice about lossless encoding, which I'm pretty sure H265 supports, and furthermore, it only gives advice about RF quality, while encoding with VideoToolBox measures quality in CQ. I've also read that GPU compression is generally worse than CPU compression, and I've looked into using [VMAF](https://github.com/Netflix/vmaf) through FFmpeg, but I couldn't get it to work.

I'm really not sure where to go from here, and I'm rather uncertain about continuing to re-encode the videos that I have for fear of a loss in quality, so any advice on what to do next would be appreciated.


HandBrake version (e.g., 1.0.0):

Version 1.5.1 (2022011000)


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

macOS Monterey 10.12.5


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

Code: Select all

Since I'm not troubleshooting an error, I'm not sure that one is required.
rollin_eng
Veteran User
Posts: 4858
Joined: Wed May 04, 2011 11:06 pm

Re: Optimising for quality, speed, or size

Post by rollin_eng »

Presets for speed and quality already exist. Size is usually variable as quality based encode is preferred.

You do not want to do lossless encoding.
mduell
Veteran User
Posts: 8202
Joined: Sat Apr 21, 2007 8:54 pm

Re: Optimising for quality, speed, or size

Post by mduell »

To decrease quality and size, increase the RF.

To increase speed, choose a faster encoder (like a hardware encoder) or a faster software encoder speed preset.

Permute for all 3 presets.
Southpaw1496
Posts: 9
Joined: Wed Jun 30, 2021 3:58 pm

Re: Optimising for quality, speed, or size

Post by Southpaw1496 »

rollin_eng wrote: Thu Sep 08, 2022 3:40 pm You do not want to do lossless encoding.
All I want to ensure is that no quality is lost, and I don't trust my eyes to be the judge of that.
Lostless
Bright Spark User
Posts: 155
Joined: Thu May 24, 2007 7:55 pm

Re: Optimising for quality, speed, or size

Post by Lostless »

Southpaw1496 wrote: Fri Sep 09, 2022 9:37 am
rollin_eng wrote: Thu Sep 08, 2022 3:40 pm You do not want to do lossless encoding.
All I want to ensure is that no quality is lost, and I don't trust my eyes to be the judge of that.
If you want no quality loss, just keep the original rip. Handbrake will make sacrifices to encode the file. And you cant tell the differences during playback, it's done its job.

Hand brake already has the triangle build in, in its presets.
Very Fast- its the best speed and best file size ,decent quality
fast- its OK speed, OK file and OK quality. The middle ground in all 3
High quality - slower speed, bigger file size, good quality
Super high quaility - real slow, even bigger file size, excellent quality (not that i can notice much difference between that and the HQ unless you pixel peep)

each preset i found is about 1/2 as fast (double the time) to encode as the previous and produces files about 20-30% bigger as quality goes up.
Post Reply