Differences between GPL and LGPL licenses
While libx264/265 has a GPL license by default, SDK was delivered with FFmpeg LGPL licenses. Pay special attention to the variations between the two.
GPL
Only developers whose complete project is also licensed under the GPL are permitted to take the code, alter it, and distribute it as a component of their own work.
As a result, the code cannot be included into proprietary applications.
LGPL
Any programmer may use the code, alter it, and then release it as a component of their own project, provided that the LGPL is once again used to license the entire work. Other parts of the project are authorized and are licensed in other ways.
This allows the code to be used in otherwise proprietary software.
Libx264/265
Libx264/265 are free, high-performance and open-source video codecs for encoding and decoding video streams. It is released under the terms of the GNU General Public License. Cause of this fact, we want you to draw your attention that the commercial using of the libx codecs is limited. That's why we do not provide our SDKs with them. Modifying the SDKs' files, you take all the legal liability for using libx codecs.
To add these video codecs to the SDKs, first of all, it's needed to download a GPL version of FFmpeg which contains all the necessary DLLs which are libx codecs implementation files. We recommend you to download GPL FFmpeg version 4.4 for old version of the SDKs (up to versions 2.7.2.13335 inclusive) and FFMpeg 6.0 for newer versions of the SDKs. You can request FFmpeg GPL build for test via support@medialooks.com
Note, some builds of this program don't have DLLs files inside their folders because they are in-built into executable files. So, you need a version, where .dll and .exe files are separate.
Adding the codecs to MPlatform SDK
To add libx codecs to MPlatform SDK, it's needed to download a GPL version of FFmpeg and take from it one of the DLL files which is named "avcodec-58.dll" for FFmpeg 4.4, "avcodec-60.dll" for FFmpeg 6.0 and "avcodec-61.dll" for FFmpeg 7.0. This file is in charge of these codecs. Do not confuse these files. In this article we add the libx264/265 codecs to MFormats and MPlatform SDKs on the example of FFmpeg 4.4. For FFmpeg 6.0 and FFmpeg 7.0 all steps the same, but the name of the DLLs are "avcodec-60.dll" or "avcodec-61.dll" instead of "avcodec-58.dll".
Here it is (x64 version of the file):
Now you need to copy "avcodec-58.dll" and paste it into DecoderLib and EncoderLib folders of MPlatform SDK. Don't confuse x86 and x64 version of the DLL! If you copied "avcodec-58.dll" from x86 branch folders of FFmpeg, you would have to paste it into x86 branch folders of MPlatform.
When you have copied x86 version of "avcodec-58.dll", follow this path "C:\Program Files (x86)\Medialooks\MPlatform SDK\Bin\x86" and paste the file inside DecoderLib and EncoderLib folders of MPlatform, confirming a replacement of the same named files:
For x64 version, the principal is the same. Find and copy x64 version of "avcodec-58.dll", follow this path "C:\Program Files (x86)\Medialooks\MPlatform SDK\Bin\x64" and paste the file inside DecoderLib and EncoderLib folders of MPlatform, confirming a replacement of the same named files:
If you have done everything correctly, the codecs have to appear in a list:
Adding the codecs to MFormats SDK
To add libx codecs to MFormats SDK, it's needed to download a GPL version of FFMpeg and take from it one DLL file which is named "avcodec-58.dll". This file is in charge of these codecs.
Here it is (x64 version of the file):
Now you need to copy "avcodec-58.dll" and paste it into x86 folder of Formats SDK. Don't confuse x86 and x64 version of the DLL! If you copied "avcodec-58.dll" from x86 branch folders of FFmpeg, you would have to paste it into x86 folder of MFormats.
When you have copied x86 version of "avcodec-58.dll", follow this path "C:\Program Files (x86)\Medialooks\MFormats SDK\Bin\x86" and paste the file, confirming the replacement:
This file should be replaced by the copied one (x86):
For x64 version, the principal is the same. Find and copy x64 version of "avcodec-58.dll", follow this path "C:\Program Files (x86)\Medialooks\MFormats SDK\Bin\x64" and paste the file, confirming the replacement:
This file should be replaced by the copied one (x64):
If you have done everything correctly, the codecs have to appear in a list: