feat: add selective audio stream normalization#295
Merged
Conversation
Add support for selective audio stream normalization, addressing issue #285. New CLI arguments: - `-as/--audio-streams`: Select specific audio streams by index (comma-separated) - `--audio-default-only`: Only normalize audio streams with 'default' disposition - `--keep-other-audio`: Keep non-selected streams as passthrough (unchanged) Implementation details: - Added `is_default` flag to AudioStream to track disposition - Updated MediaFile.parse_streams() to parse "(default)" flag from FFmpeg output - Added _get_streams_to_normalize() method to filter streams based on selection - Updated first pass, filter generation, and second pass for selected + passthrough streams - Proper output stream index tracking for correct codec assignment Validation: - Prevents using both `-as` and `--audio-default-only` together - Prevents using both `--keep-other-audio` and `--keep-original-audio` together Tests: - Added 6 new test cases covering all scenarios - All 46 tests passing (40 original + 6 new) Documentation: - Updated docs/usage/options.md with complete documentation for new options
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.
Add support for selective audio stream normalization, addressing issue #285.
New CLI arguments:
-as/--audio-streams: Select specific audio streams by index (comma-separated)--audio-default-only: Only normalize audio streams with 'default' disposition--keep-other-audio: Keep non-selected streams as passthrough (unchanged)Implementation details:
is_defaultflag to AudioStream to track dispositionValidation:
-asand--audio-default-onlytogether--keep-other-audioand--keep-original-audiotogetherTests:
Documentation: