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

Implement --auto-lower-loudness-target #273

Merged
merged 2 commits into from
Dec 15, 2024
Merged

Conversation

ahmetsait
Copy link
Contributor

No description provided.

@@ -249,6 +249,22 @@ def create_parser() -> argparse.ArgumentParser:
),
)

group_ebu.add_argument(
"--safe-ebu",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this is the most easily understandable option name. It implies that it is always the safest option … is that the case?

Maybe --auto-lower-loudness-target — and then we should just clarify in the README how to use these various options.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making overly verbose options does not make reading the manual unnecessary. It only makes writing and memorizing them harder. Especially when there is no bash completion for it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that reasoning, however I'd like to strike a balance between usability and understandability here.

I personally very much prefer speaking arguments, even if they are longer, and maybe there will be a "one size fits all" option in the future that could carry this name? Or let's call it -sm / --safe-ebu-margin?

If completions are an issue, let's create bash/zsh completions and ship them with this repo. I think this should be easy to do …

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some basic completions here: d0d2741

type=float,
help=textwrap.dedent(
"""\
Automatically lower EBU Integrated Loudness Target to prevent falling
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the option value is a relative one, right?

So it should say "automatically lower EBU Integrated Loudness Target by this value" or something.

Still thinking about the use case of explicitly providing a value here? Shouldn't this rather just be a boolean option and, if enabled, lower the loudness target automatically to the right value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the second paragraph mentions "by the given amount" and the --help text shows that it expects a value --safe-ebu MARGIN so it seems clear enough?

I thought about the boolean option, but I couldn't decide what the right value would be. Sometimes a margin value of 0 works just fine, at others it falls back to dynamic again. Should we just set it to some arbitrary small value like 0.005 or something?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think having a default value that's small but prevents most cases of dynamic fallback is the better option!

In your tests, did 0.005 suffice? I think even 0.1 or something would not make a difference in terms of actual perceived loudness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A value of 0.005 seemed to work the few times I've used it but as you've said even a 0.1 is unnoticeable so better to go with that.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

ffmpeg_normalize/_streams.py Outdated Show resolved Hide resolved
@ahmetsait ahmetsait requested a review from slhck December 15, 2024 10:55
@ahmetsait ahmetsait changed the title Implement --safe-ebu Implement --auto-lower-loudness-target Dec 15, 2024
@slhck slhck merged commit c0923e8 into slhck:master Dec 15, 2024
5 checks passed
@slhck
Copy link
Owner

slhck commented Dec 15, 2024

Merged with added completions, thanks!

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

Successfully merging this pull request may close these issues.

2 participants