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

Significantly improve audio quality when exporting to mp3 #7

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

mikolysz
Copy link
Contributor

@mikolysz mikolysz commented Nov 7, 2023

By default, ffmpeg uses 32k as its bitrate when exporting to mp3. This is the lowest possible setting and results in bad audio quality.

This PR explicitly sets the bitrate to use when the export format is mp3. We use 160k, which is an unusual choice, but this is what we receive from the API.

There's still going to be some quality loss due to the fact that we decode the audio from mp3 and then encode it back again, but that loss is much less significant than what we had before, and might not even be perceptible.

@simonw simonw added the enhancement New feature or request label Nov 13, 2023
@solus-hq
Copy link

@simonw Hello! Is it possible to accept this PR and have a newer version installable via pipx? =)

@simonw simonw merged commit baa5b91 into simonw:main Dec 13, 2023
10 checks passed
simonw added a commit that referenced this pull request Dec 13, 2023
Refs #3, #4, #5, #7, #8, #10, #12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants