code-charity / code-charity/youtube

[Feature Request] Enhance loudness normalization. - Youtube's normalization only ever decreases, not increases volume?

Open
#925 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature request good first issue help wanted up-for-grabs
Dominant language
JavaScript
Stars
4.6k
Forks
996
Avg merge
2d 15h
Merged PRs (30d)
7

Description

PROBLEM:

Currently the normalization functionality is only reducing the volume of videos to give them enough headroom to avoid clipping and reduce the differences between very loud and normal loudness content, like advertisements and normal videos or electric music vs classic music.

However, this falls short on lower volume videos, and I noticed that I more and more often have to reach for the volume knob if I'm not listening via headphones, but via loudspeakers.

I think the YouTube-Extention might be able to improve on that:

SOLUTION:

Change the calculation which is used to normalize the loudness, to include steps up the volume, as long as there's headroom. So if the user has set 50% volume in the YouTube player and the video is quiet, the player can set it to say 70% to make it louder like it is currently doing the other way around.

RELEVANCE / SCOPE:
I think this makes sense to set the volume to say 50% and have this way more room for the algorithm to adjust the volume. This gives a more consistent experience with the audio level and should be preferred by everyone.

"SIDE EFFECTS":
The user should be made aware that this is expected behavior that the volume is slightly less than it's used to. But in most cases, the absolute volume output of the speakers or headphones is not reached anyway. So the user can just turn the master volume of the operating system a bit higher to compensate.

SHORT Table (Summary)
Problem Low volume videos are not adjusted for by the loudness normalization
Solution Reduce the user set volume and adjust the loudness adjusting algorithm to allow for adjustments above the set volume
Scope default
Side effects slightly less average volume from the browser

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing loudness-normalization implementation and the volume calculation used by the YouTube player. Trace how headroom and user volume are handled, then verify that quiet videos can be increased without clipping while louder videos retain their current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.