-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove FFmpeg normalization causing "quiet" songs. #1276
Conversation
Just fixed a flag that increased bitrate. See https://trac.ffmpeg.org/wiki/Encode/MP3 |
The dullness is due to the dynaudnorm flag that causes local amplitude modulation instead of global amplitude modulation. This ensures consistent loudness with almost no variation - variation that's supposed to be an integral part of a song. It has been removed multiple times in the past and then been reintroduced again and again. Kind of gave up on getting it out. Try conversion of the song with only loudnorm, if you still feel the audio is dull, go ahead with this PR as is, else remove all flags except loudnorm. You can checkout my personal modified spotdl copy with alternate flags here. |
Please pull changes from |
…to ffmpeg-loudness
My question is why is the audio modification in there at all. I feel like most people would want the unmodified audio. |
Instrumental music on YouTube has wayyy to much loudness variation. Without normalisation, your have to change the volume on a song to song basis. This effect is far less pronounced for mainstream music. P.S. It's mostly for that reason that Spotify itself implemented loudness normalisation in songs by default. |
That makes sense. I will mess with the normalization to see if I could improve it. For now, though, I feel it would be better to have inconsistently varying songs rather than a quieted song (in place over an already compressed mp3 file). Most older songs were naturally quieter. |
I feel like the dynaudnorm should be left out altogether since it applies normalization dynamically over windowed portions of the file and changed characteristics of the song. This is not desired since some songs intend areas to be quiet while others to be loud. |
|
From my set of experimentation, one other thing of note is setting a relatively high level for loudnorm (eg. loudnorm=-3) will cause "pumping" - rhythmic loudness-softness loops. |
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.
LGTM for the most part.
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.
LGTM 👍
@Silverarmor, I think this PR is a Go. |
Publish v3.6.0 * ignore .cache and other hidden files (#1274) * Bump minimal required python version to 3.6.1 (#1278) * Remove FFmpeg normalization causing "quiet" songs. (#1276) * Saved Songs Download and User Authentication (#1240) * regenerate cassettes (#1290) * Use ffmpeg_path to check for version (#1289) * Skip already downloaded songs before doing youtube search (#1287) * Fix security risk (#1285) * Song matching improvements (#1279) * Artist songs fixes (#1284) * More output formats (#1244) * Bump version number to 3.6.0 * Update .gitignore to remove duplicate cache * docs update (#1293) Co-authored-by: Silverarmor <23619946+Silverarmor@users.noreply.github.com> Co-authored-by: Jakub Kot <42355410+xnetcat@users.noreply.github.com> Co-authored-by: Peyton Creery <44987569+phcreery@users.noreply.github.com> Co-authored-by: AZMCode <adrianozambrana@protonmail.com> Co-authored-by: Aiden Gardner <19619206+aiden2480@users.noreply.github.com> Co-authored-by: Oliver Blanthorn <freedom4cows@gmail.com> Co-authored-by: Andrzej Klajnert <github@aklajnert.pl>
Title
Audio downloaded with spotdl is relatively quiet.
Description
Audio normalization flags in the FFmpeg command reduces actual song loudness by almost 50%
Motivation and Context
dr.boaf on discord originally voiced the issue and I too took notice of it. Removing the normalization flags causes the converted audio to match closer to the actual song. The normalization causes the song to be very dull and can be very apparent in certain conditions. I believe @MikhailZex originally introduced the flags. Could you expand on the usage and purpose?
Testing / Screenshots (if appropriate)
Subject: Tristam - Over the Edge
The absence of apad_dir also makes the song the exact same length
Types of Changes
Checklist