Confused in how the settings are meant to work - Slow to Fast

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
Synthespian
Posts: 2
Joined: Mon Nov 23, 2020 8:39 pm

Confused in how the settings are meant to work - Slow to Fast

Post by Synthespian »

Speed, Quality, Size?
I've been trying to play with the settings and struggling to understand why I'm getting the results I'm getting.
I generally would have thought running the encoding on the "very slow" setting would provide a file with better calculations and thus a smaller file size, but take a long time to get a better result.

So, using: H265. Constant Quality 21.
And then changing the encoder speed I'm trying to work out what gains I get for "taking longer".
I'm not seeing a remarkable quality uplift.
It's extending from 20min on Medium -> 4hrs on very slow on the same piece of footage (approx 60min)
And yet despite taking longer the file sizes are larger on the slower settings.
I'm clearly reducing my settings now, but I don't quite understand the settings enough clearly.

Is there a pinned post anywhere that I've missed please? Or some other pointer to some advice please?
rollin_eng
Veteran User
Posts: 3693
Joined: Wed May 04, 2011 11:06 pm

Re: Confused in how the settings are meant to work - Slow to Fast

Post by rollin_eng »

The preset can change size and/or quality.

If your file is bigger it should have better quality.

https://handbrake.fr/docs/en/1.3.0/tech ... tunes.html

http://x265.org/performance-presets/

Rather than being bigger at very slow think of it smaller at medium :)
User avatar
s55
HandBrake Team
Posts: 9900
Joined: Sun Dec 24, 2006 1:05 pm

Re: Confused in how the settings are meant to work - Slow to Fast

Post by s55 »

If your file is bigger it should have better quality.
To expand on this, if you are already at the point where you can't tell the difference in quality, you may have more play to move the quality slider and thus, reduce filesize.
Synthespian
Posts: 2
Joined: Mon Nov 23, 2020 8:39 pm

Re: Confused in how the settings are meant to work - Slow to Fast

Post by Synthespian »

Thanks. I'll have a play around with the settings. I'm not too worried about the file size at the moment, just was confused about the settings.

As I said, my brain seemed to think: "Do more calculations now, at a slower speed, to have a better overall effect"
I guess I was struggling how the constant bitrate impact could be achieved if the quality was (if not that visually) lower (because it was quicker).
musicvid
Veteran User
Posts: 3817
Joined: Sat Jun 27, 2009 1:19 am

Re: Confused in how the settings are meant to work - Slow to Fast

Post by musicvid »

Simple statement:
Slower encode = more bits = better quality up to a point.
Once you have reached the point of optimal quality, arguably ~0.995 SSIM, you can continue making the file as large as you could possibly imagine, without a bit of advantage.
unknown User
Posts: 31
Joined: Sat Mar 18, 2017 10:28 am

Re: Confused in how the settings are meant to work - Slow to Fast

Post by unknown User »

musicvid wrote: Tue Nov 24, 2020 10:11 pm Simple statement:
Slower encode = more bits = better quality up to a point.
Once you have reached the point of optimal quality, arguably ~0.995 SSIM, you can continue making the file as large as you could possibly imagine, without a bit of advantage.
Sorry for capturing this thread but this is confusing me as well as the thread opener. Isn't the preset slider meant to optimize encoding efficiency? Or is there a difference in handling between x264 and x265?
For me it was always clear that a file at a given Quality (RF slider) is the smaller the higher a preset is selected. That means placebo preset reduces the file size most while ultrafast produces the biggest one, both with the same Quality by choosing the same RF value This is always reproducible using x264! X265 works different?
User avatar
s55
HandBrake Team
Posts: 9900
Joined: Sun Dec 24, 2006 1:05 pm

Re: Confused in how the settings are meant to work - Slow to Fast

Post by s55 »

Speed, Quality, Filesize. Those are your 3 key variables. The Preset slider can impact all 3 to varying degrees.

Note, that filesize can *increase* using slower presets as more advanced encoding techniques are added. This is normal behaviour.
When this occurs, you can sometimes adjust RF down and still be in a good position in quality terms.

Your essentially using 2 controls to move the dot in the "Speed, Quality, Filesize" Triangle.
unknown User
Posts: 31
Joined: Sat Mar 18, 2017 10:28 am

Re: Confused in how the settings are meant to work - Slow to Fast

Post by unknown User »

Wow, that's tricky. So I always have to encode any source file with different preset and RF settings and compare the results which one the smallest file with the best quality is?
Woodstock
Veteran User
Posts: 3939
Joined: Tue Aug 27, 2013 6:39 am

Re: Confused in how the settings are meant to work - Slow to Fast

Post by Woodstock »

That depends on you, really. There is a trade-off between your time figuring out the "optimal settings" and accepting a "close facsimile".

You do not have to encode the whole video to determine this - pick a short section that is "hard to encode" (high detail, high motion) and encode that with the different settings. Compare the results both visually and size-wise.

Settings that are optimal for encoding a video of game play may not work as well for anime, and vice versa.
unknown User
Posts: 31
Joined: Sat Mar 18, 2017 10:28 am

Re: Confused in how the settings are meant to work - Slow to Fast

Post by unknown User »

Understand, thank you! Well, understand that's not a simple thing of setting quality here and compression there ;-). I'll leave it at RF 20 and Preset slow and take what I get.
mduell
Veteran User
Posts: 7329
Joined: Sat Apr 21, 2007 8:54 pm

Re: Confused in how the settings are meant to work - Slow to Fast

Post by mduell »

s55 wrote: Sat Dec 19, 2020 4:26 pmNote, that filesize can *increase* using slower presets as more advanced encoding techniques are added. This is normal behaviour.
When this occurs, you can sometimes adjust RF down and still be in a good position in quality terms.
You mean up.
xokia
Posts: 15
Joined: Wed Dec 23, 2020 9:50 pm

Re: Confused in how the settings are meant to work - Slow to Fast

Post by xokia »

musicvid wrote: Tue Nov 24, 2020 10:11 pm Simple statement:
Slower encode = more bits = better quality up to a point.
Once you have reached the point of optimal quality, arguably ~0.995 SSIM, you can continue making the file as large as you could possibly imagine, without a bit of advantage.
Im curious if it would make more sense for some of the presets to estimate the SSIM. This would help the average user select the optimal setting. Or maybe they do that already and I just don't know where to look. Everyone has different needs I suppose. I'm looking for the point where you get diminishing returns on files size and image quality. For me that's the sweet spot.
musicvid
Veteran User
Posts: 3817
Joined: Sat Jun 27, 2009 1:19 am

Re: Confused in how the settings are meant to work - Slow to Fast

Post by musicvid »

You have to choose the SSIM tune in your settings. But for x264, that "sweet spot" often occurs at RF 18-19.
Post Reply