On android, urlcheck is a great app to modify URLs before sharing or opening. For this problem, you can use the json editor, and add the following two entries with small a regex I wrote:
"shorten Youtube": {
"regex": "^https?:\/\/(?:[a-z0-9-]+\\.)*?youtube\\.com\/(.*)&.*",
"replacement": [
"https:\/\/youtube.com\/$1"
],
"enabled": true
},
"shorten Youtu.be": {
"regex": "^https?:\/\/(?:[a-z0-9-]+\\.)*?youtu\\.be\/([^?]*)?.*",
"replacement": [
"https:\/\/youtube.com\/watch?v=$1"
],
"enabled": true
},
A button to shorten the link appears in urkcheck when the pattern matches. You can all auto shorten them by replacing
"enabled": true
With
"automatic": true