Skip to content

Instantly share code, notes, and snippets.

@dmd
Created September 30, 2024 12:14
Show Gist options
  • Save dmd/a4d5663278794d491c11c4b91bda5cf2 to your computer and use it in GitHub Desktop.
Save dmd/a4d5663278794d491c11c4b91bda5cf2 to your computer and use it in GitHub Desktop.
( stuff before this... )
command="mkvpropedit \"$input_file\""
# Set all audio tracks to not default
echo "$audio_tracks" | jq -r '.id' | while read -r track_id; do
command+=" --edit track:a$track_id --set flag-default=0"
done
# Set the English track to default
command+=" --edit track:a$english_track --set flag-default=1"
# Execute the command
eval "$command"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment