Repository navigation
fix: keep each audio stream's own tags when selecting streams - #329
Merged
slhck merged 1 commit intoDec 3, 2026
Merged
Conversation
Owner
|
Good catch, 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.
With
--audio-streams, the output audio tracks get the language and title of a different track:Per-stream tags are mapped by position (
-map_metadata:s:a:N 0:s:a:N), but the output audio order is the normalized streams first, then the passthrough ones. The positions only line up when every audio stream is normalized in input order.--audio-default-onlyhits the same problem when the default track is not the first.For audio, the mapping now follows the output order and takes each track's tags from its own input stream (
0:s:<stream index>). Video and subtitle mapping is unchanged. The stream selection moved up a few lines so the metadata step can use it.Testing: added
test_selected_audio_stream_keeps_its_own_tags. On master it fails (['jpn', 'eng']); with this change it gets['eng', 'jpn']. The full suite passes (191, master 190).