Libmpeg2

libmpeg2 is a free and open source software library for decoding MPEG-1 and MPEG-2 video streams. libmpeg2 is released under the terms of the GNU GPL license.

Legality and software patents
Since the libmpeg2 source code library is released under free and open source license it is legally redistributable. However, the MPEG-2 compression algorithm method is owned by the MPEG Licensing Authority and are in some countries protected by software patents. Absent such a licence from the MPEG Licensing Authority, it could possibly be illegal in certain countries to distribute compiled versions of libmpeg2 for the purpose of decoding MPEG-1 and/or MPEG-2 video streams. In February 2018, all MPEG-2 patents have expired for any country except Malaysia and the Philippines.