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

Does --video-params disable default parameters and prevent target quality? #662

Open
mqudsi opened this issue Sep 6, 2022 · 4 comments
Open

Comments

@mqudsi
Copy link
Contributor

mqudsi commented Sep 6, 2022

I observed that if I run av1an -e svt-av1 --target-quality=xx .... the output includes

Params: --preset 4 --keyint 240 --rc 0 --crf 25

But if I run av1an -e svt-av1 -v '--preset 10' --target-quality=xx ..., the output just says

Params: --preset 10

To me, this implies that the presence of an explicitly specified --video-params is preventing av1an from supplying its own parameters. My reading of the help output led me to assume that --video-params would be in addition to to and not instead of the default per-encoder video parameters av1an used to get its job done.

IMHO, av1an should always pass its video parameters unless the -v includes the same parameter (in which case the manually supplied parameter should win) - this would be for things like --preset, --keyint, etc. But if -v included --crf and --target-quality was used, I would expect av1an to throw an error complaining that --crf and --target-quality cannot be used together.

@clidx
Copy link

clidx commented Sep 8, 2022

I agree with both of your points, but would just add that --crf and --target-quality not conflicting is a holdover from before when --crf had to be manually specified in the params so that av1an could change it. Now, not having them conflict adds unnecessary ambiguity about what av1an is actually doing.

@mqudsi
Copy link
Contributor Author

mqudsi commented Sep 8, 2022

Aside from fixing this, can you enlighten me as to what av1an is doing in this case? Is it currently possible to use target quality with a different svt-av1 preset?

@FreezyLemon
Copy link
Contributor

FreezyLemon commented Sep 8, 2022

When av1an shows you

Params: --preset 4 --keyint 240 --rc 0 --crf 25

it just means that those are the "base" parameters it uses for encoding. Target quality mode decides on a CRF value for every chunk based on your target quality setting, which means your actual encoder parameters will be --preset 4 --keyint 240 --rc 0 --crf x, with x possibly being different for every chunk.

If you use custom --video-params, that just means that your "base" parameters are different. It does not mean that av1an won't be able to change the CRF value. If you use --video-params "--preset 8 --keyint 0 --lookahead 60", then av1an will automatically add the required stuff to make it work: --preset 8 --keyint 0 --lookahead 60 --crf x. Again, x being decided by the target quality algorithm.

Small edit:
Target quality or not, av1an only uses default encoder parameters if you do not use --video-params. Just FYI

@mqudsi
Copy link
Contributor Author

mqudsi commented Sep 8, 2022

Thanks for the explanation! I definitely wasn’t able to intuit that from the output.

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

No branches or pull requests

3 participants