Why does Safari add a weird extension to YouTube links?

Solution 1:

The Youtube webapp is adding that to the link (or URL, https://en.wikipedia.org/wiki/URL).

The characters after the question mark in the link is the query string (https://en.wikipedia.org/wiki/Query_string). It's one of the ways data can be passed to the server. The "v" parameter specifies which video to show. The ampersand ("&") separates parameters.

I can't find any reference as to what the "frags" parameter does. "%2C" is a comma (",") that's been percent-encoded (https://en.wikipedia.org/wiki/Percent-encoding), so that part is setting the "frags" parameter to "pl,wn".

It's definitely not a problem. Everything is fine.