One very good thing that has happened in the last few years in the Linux world, is that the patents that encumbered mp3 decoding and encoding have finally expired. There are now very few, if any, "illegal" codecs that most folks would need. When I built my media center last year I didn't have to go out an specifically search for anything like that.
Yes
Just like with the recent expiry of the MP3 patents and AC3, the last of the MPEG-2 patents have now expired.
From the MPEG LA:
Please note that the last US patent expired February 13, 2018, and patents remain active in Philippines and Malaysia after that date.
https://www.phoronix.com/scan.php?page=news_item&px=MPEG-2-Last-Patents-Expire
Yet that does not mean one may not need any proprietary codecs any more. One consequence though of such is that due to the H.265/HEVC video format (crucial to stuffing 4K into modern data pipes) wanting steep royalties, tech giants trying to "get around licensing fees and patents that have added to their costs and complexity of rolling out the tech currently needed to move HD and even 4K video around, like h.264 or the new HEVC" have worked to develop a new video compression scheme, AV1 (faster video startup time, less buffering and better picture quality). For which they claim "all the relevant patent holders are already involved and have agreed to make its use royalty-free, so there won't be the licensing pool problems seen last time around."
I pray it will be used for Good, to the glory of God who made eyes, and not evil.