-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Improve audio normalization #11457
Improve audio normalization #11457
Conversation
* Move calculation of LUFS to a scheduled task as it's pretty slow * Correctly calculate album LUFS * Don't try to convert replaygain tags to LUFS values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ API changes look fine, but please make sure they are merged (together with the required web changes!!) before the next unstable build so we have at least 1 week to find any left-over API mismatches between server and web.
I've tested this with @Bond-009's help and it seems to be working (on Windows at least). We found one bug related to albums with only a single track but that is now fixed. I've confirmed this works properly and already integrated the changes into Finamp without issues 😁 |
Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationPostScanTask.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
// Album gain | ||
var albums = _libraryManager.GetItemList(new InternalItemsQuery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm never a fan of pulling all of an item type from the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but this can be changed when progress reporting is added
Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationPostScanTask.cs
Outdated
Show resolved
Hide resolved
Emby.Server.Implementations/ScheduledTasks/Tasks/AudioNormalizationPostScanTask.cs
Outdated
Show resolved
Hide resolved
Recursive = true | ||
}); | ||
|
||
foreach (var a in albums) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add a try..catch
so we don't stop processing on first (or any) failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a try catch inside of CalculateLUFSAsync
where I'd expect these failures to take place.
Seems unlikely anything would go wrong here, and it it does (like failing to create the concat file) it would likely happen to the other items as well
TODO: