replaygain: add metaflac backend#6800
Open
SamadBallaj1 wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6800 +/- ##
==========================================
- Coverage 74.97% 74.67% -0.30%
==========================================
Files 163 163
Lines 20957 21014 +57
Branches 3302 3308 +6
==========================================
- Hits 15712 15693 -19
- Misses 4485 4563 +78
+ Partials 760 758 -2
🚀 New features to boost your workflow:
|
77f8ddb to
5b41a28
Compare
Add a MetaflacBackend that computes ReplayGain for FLAC files with metaflac --add-replay-gain and reads the values back with --show-tag. Only FLAC is supported. Includes docs, a changelog entry, and tests.
5b41a28 to
345b72f
Compare
Author
|
Pushed some updates, this is ready for review whenever you have a chance. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The replaygain plugin can't compute ReplayGain when metaflac is the only tool available. The existing backends (command, gstreamer, audiotools, ffmpeg) each need something heavier installed, which doesn't work on minimal setups like a NAS where those won't install. Issue #1203 asks for a metaflac based option so FLAC users on those setups can still tag ReplayGain.
This adds a metaflac backend for that case. It runs
metaflac --add-replay-gainto compute the gain and reads the values back withmetaflac --show-tag. I modeled it on the existingCommandBackendsince both wrap an external tool. It only handles FLAC, skips other formats, and shifts the gain to the configuredtargetlevellike the other backends.One limitation: metaflac scans a whole album in one pass, so the files of an album need the same sample rate and channel layout.
Before, selecting the metaflac backend failed:
After, the backend works and the plugin tests pass:
The 4 skipped are the Opus R128 cases, which don't apply to the metaflac path.
To Do