Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HandBrake is changing the default SVT-AV1 tune #6012

Open
Nomis101 opened this issue Apr 29, 2024 · 9 comments
Open

HandBrake is changing the default SVT-AV1 tune #6012

Nomis101 opened this issue Apr 29, 2024 · 9 comments

Comments

@Nomis101
Copy link
Contributor

Problem Description

Not sure if this is by purpose. But HandBrake is changing the default tune setting for SVT-AV1.
According to the documentation, the default setting for --tune is 1:
https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Parameters.md

But if "None" is selected for the tune for the SVT-AV1 encoder, 0 is used.

Svt[info]: SVT [config]: preset / tune / pred struct : 4 / VQ / random access

Which is set here:

param->tune = 0;

Activity Log, Crash Log or any other details

N/A

What Operating System are you running?

All

What version of HandBrake are you running?

Current Nightly

Where did you download HandBrake from?

No response

@jstebbins
Copy link
Contributor

"None" is not "Default". HandBrake's psnr tune is 1, i.e. "default". There aren't really "defaults" in HandBrake. There are presets instead which define settings for particular use cases.

However, "None" may be a poor name here since 0 is "VQ" in svt-av1 parlance.

All the names are pretty cryptic for someone not familiar with encoder jargon.

@Nomis101
Copy link
Contributor Author

That is of course correct. My concern was rather that if you select the SVT-AV1 encoder without adjusting any other settings, then I think HandBrake should also use all the default settings SVT-AV1 is using.

@jstebbins
Copy link
Contributor

Generally speaking, HandBrake doesn't reset to default values when changing the encoder. HandBrake will not change any of the other settings unless the current option for some setting doesn't exist for the new encoder. It would be quite annoying if you set up several settings, then noticed you had neglected to set the encoder first, changed the encoder, and had to go back and set all your settings again.

@jstebbins
Copy link
Contributor

Hmm, I seem to be mistaken in the above assertion. It is changing more than I thought when changing encoders. Given the current behavior, it does seem like it should be picking a reasonable default when changing values.

I'm not sure if tune "None" is the actual default for any of the other encoders supported by HandBrake. I'm pretty sure it's not been a priority to try to align with encoder application defaults. They are often a moving target.

@jstebbins
Copy link
Contributor

I might add that encoder application defaults are sometimes not good defaults. In particular, tuning for psnr is generally not used as a default in other encoders because an encode with the best psnr is not necessarily an encode that is visually the best looking. Encoders generally employ psycho-visual optimizations that do not produce the best psnr (or ssim for that matter).

@Nomis101
Copy link
Contributor Author

I was told that SVT-AV1 did choose to set PSNR as the default tune because "it's the happy all objective metrics mode and that has been the focus of the team".
https://gitlab.com/AOMediaCodec/SVT-AV1/-/issues/2167

@galad87
Copy link
Contributor

galad87 commented Apr 30, 2024

Like jstebbins said, defaults are set by presets, and we mostly don't reset anything when switching encoder. The GTK UI might be resetting the quality value too, the Mac GUI doesn't.

I originally named it "none" to keep it similar to other encoders. We could rename it if it doesn't break anything in the UI, but I wouldn't go all the way to make it automatically change to "psnr" when svt-av1 is manually selected, unless VQ is terribly broken.

@jstebbins
Copy link
Contributor

psnr and ssim tunes are typically used by developers to get a metric for a particular change they are making to measure it's effect. So it's not really too surprising that an encoder that has been under heavy development would have this as a default. I imagine they would be using ssim if it were not experimental since it is usually a better metric when it comes to perceived visual quality.

Maybe at this point in development psnr does have some advantages given it's what the developers use. But typically in a mature encoder it's strictly used for getting metrics in a testing scenario.

@Nomis101
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants