1cabdff1aSopenharmony_ci# License 2cabdff1aSopenharmony_ci 3cabdff1aSopenharmony_ciMost files in FFmpeg are under the GNU Lesser General Public License version 2.1 4cabdff1aSopenharmony_cior later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other 5cabdff1aSopenharmony_cifiles have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to 6cabdff1aSopenharmony_ciFFmpeg. 7cabdff1aSopenharmony_ci 8cabdff1aSopenharmony_ciSome optional parts of FFmpeg are licensed under the GNU General Public License 9cabdff1aSopenharmony_civersion 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of 10cabdff1aSopenharmony_cithese parts are used by default, you have to explicitly pass `--enable-gpl` to 11cabdff1aSopenharmony_ciconfigure to activate them. In this case, FFmpeg's license changes to GPL v2+. 12cabdff1aSopenharmony_ci 13cabdff1aSopenharmony_ciSpecifically, the GPL parts of FFmpeg are: 14cabdff1aSopenharmony_ci 15cabdff1aSopenharmony_ci- libpostproc 16cabdff1aSopenharmony_ci- optional x86 optimization in the files 17cabdff1aSopenharmony_ci - `libavcodec/x86/flac_dsp_gpl.asm` 18cabdff1aSopenharmony_ci - `libavcodec/x86/idct_mmx.c` 19cabdff1aSopenharmony_ci - `libavfilter/x86/vf_removegrain.asm` 20cabdff1aSopenharmony_ci- the following building and testing tools 21cabdff1aSopenharmony_ci - `compat/solaris/make_sunver.pl` 22cabdff1aSopenharmony_ci - `doc/t2h.pm` 23cabdff1aSopenharmony_ci - `doc/texi2pod.pl` 24cabdff1aSopenharmony_ci - `libswresample/tests/swresample.c` 25cabdff1aSopenharmony_ci - `tests/checkasm/*` 26cabdff1aSopenharmony_ci - `tests/tiny_ssim.c` 27cabdff1aSopenharmony_ci- the following filters in libavfilter: 28cabdff1aSopenharmony_ci - `signature_lookup.c` 29cabdff1aSopenharmony_ci - `vf_blackframe.c` 30cabdff1aSopenharmony_ci - `vf_boxblur.c` 31cabdff1aSopenharmony_ci - `vf_colormatrix.c` 32cabdff1aSopenharmony_ci - `vf_cover_rect.c` 33cabdff1aSopenharmony_ci - `vf_cropdetect.c` 34cabdff1aSopenharmony_ci - `vf_delogo.c` 35cabdff1aSopenharmony_ci - `vf_eq.c` 36cabdff1aSopenharmony_ci - `vf_find_rect.c` 37cabdff1aSopenharmony_ci - `vf_fspp.c` 38cabdff1aSopenharmony_ci - `vf_histeq.c` 39cabdff1aSopenharmony_ci - `vf_hqdn3d.c` 40cabdff1aSopenharmony_ci - `vf_kerndeint.c` 41cabdff1aSopenharmony_ci - `vf_lensfun.c` (GPL version 3 or later) 42cabdff1aSopenharmony_ci - `vf_mcdeint.c` 43cabdff1aSopenharmony_ci - `vf_mpdecimate.c` 44cabdff1aSopenharmony_ci - `vf_nnedi.c` 45cabdff1aSopenharmony_ci - `vf_owdenoise.c` 46cabdff1aSopenharmony_ci - `vf_perspective.c` 47cabdff1aSopenharmony_ci - `vf_phase.c` 48cabdff1aSopenharmony_ci - `vf_pp.c` 49cabdff1aSopenharmony_ci - `vf_pp7.c` 50cabdff1aSopenharmony_ci - `vf_pullup.c` 51cabdff1aSopenharmony_ci - `vf_repeatfields.c` 52cabdff1aSopenharmony_ci - `vf_sab.c` 53cabdff1aSopenharmony_ci - `vf_signature.c` 54cabdff1aSopenharmony_ci - `vf_smartblur.c` 55cabdff1aSopenharmony_ci - `vf_spp.c` 56cabdff1aSopenharmony_ci - `vf_stereo3d.c` 57cabdff1aSopenharmony_ci - `vf_super2xsai.c` 58cabdff1aSopenharmony_ci - `vf_tinterlace.c` 59cabdff1aSopenharmony_ci - `vf_uspp.c` 60cabdff1aSopenharmony_ci - `vf_vaguedenoiser.c` 61cabdff1aSopenharmony_ci - `vsrc_mptestsrc.c` 62cabdff1aSopenharmony_ci 63cabdff1aSopenharmony_ciShould you, for whatever reason, prefer to use version 3 of the (L)GPL, then 64cabdff1aSopenharmony_cithe configure parameter `--enable-version3` will activate this licensing option 65cabdff1aSopenharmony_cifor you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts, 66cabdff1aSopenharmony_ci`COPYING.GPLv3` to learn the exact legal terms that apply in this case. 67cabdff1aSopenharmony_ci 68cabdff1aSopenharmony_ciThere are a handful of files under other licensing terms, namely: 69cabdff1aSopenharmony_ci 70cabdff1aSopenharmony_ci* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and 71cabdff1aSopenharmony_ci `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for 72cabdff1aSopenharmony_ci licensing details. Specifically note that you must credit the IJG in the 73cabdff1aSopenharmony_ci documentation accompanying your program if you only distribute executables. 74cabdff1aSopenharmony_ci You must also indicate any changes including additions and deletions to 75cabdff1aSopenharmony_ci those three files in the documentation. 76cabdff1aSopenharmony_ci* `tests/reference.pnm` is under the expat license. 77cabdff1aSopenharmony_ci 78cabdff1aSopenharmony_ci 79cabdff1aSopenharmony_ci## External libraries 80cabdff1aSopenharmony_ci 81cabdff1aSopenharmony_ciFFmpeg can be combined with a number of external libraries, which sometimes 82cabdff1aSopenharmony_ciaffect the licensing of binaries resulting from the combination. 83cabdff1aSopenharmony_ci 84cabdff1aSopenharmony_ci### Compatible libraries 85cabdff1aSopenharmony_ci 86cabdff1aSopenharmony_ciThe following libraries are under GPL version 2: 87cabdff1aSopenharmony_ci- avisynth 88cabdff1aSopenharmony_ci- frei0r 89cabdff1aSopenharmony_ci- libcdio 90cabdff1aSopenharmony_ci- libdavs2 91cabdff1aSopenharmony_ci- librubberband 92cabdff1aSopenharmony_ci- libvidstab 93cabdff1aSopenharmony_ci- libx264 94cabdff1aSopenharmony_ci- libx265 95cabdff1aSopenharmony_ci- libxavs 96cabdff1aSopenharmony_ci- libxavs2 97cabdff1aSopenharmony_ci- libxvid 98cabdff1aSopenharmony_ci 99cabdff1aSopenharmony_ciWhen combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by 100cabdff1aSopenharmony_cipassing `--enable-gpl` to configure. 101cabdff1aSopenharmony_ci 102cabdff1aSopenharmony_ciThe following libraries are under LGPL version 3: 103cabdff1aSopenharmony_ci- gmp 104cabdff1aSopenharmony_ci- libaribb24 105cabdff1aSopenharmony_ci- liblensfun 106cabdff1aSopenharmony_ci 107cabdff1aSopenharmony_ciWhen combining them with FFmpeg, use the configure option `--enable-version3` to 108cabdff1aSopenharmony_ciupgrade FFmpeg to the LGPL v3. 109cabdff1aSopenharmony_ci 110cabdff1aSopenharmony_ciThe VMAF, mbedTLS, RK MPI, OpenCORE and VisualOn libraries are under the Apache License 111cabdff1aSopenharmony_ci2.0. That license is incompatible with the LGPL v2.1 and the GPL v2, but not with 112cabdff1aSopenharmony_civersion 3 of those licenses. So to combine these libraries with FFmpeg, the 113cabdff1aSopenharmony_cilicense version needs to be upgraded by passing `--enable-version3` to configure. 114cabdff1aSopenharmony_ci 115cabdff1aSopenharmony_ciThe smbclient library is under the GPL v3, to combine it with FFmpeg, 116cabdff1aSopenharmony_cithe options `--enable-gpl` and `--enable-version3` have to be passed to 117cabdff1aSopenharmony_ciconfigure to upgrade FFmpeg to the GPL v3. 118cabdff1aSopenharmony_ci 119cabdff1aSopenharmony_ci### Incompatible libraries 120cabdff1aSopenharmony_ci 121cabdff1aSopenharmony_ciThere are certain libraries you can combine with FFmpeg whose licenses are not 122cabdff1aSopenharmony_cicompatible with the GPL and/or the LGPL. If you wish to enable these 123cabdff1aSopenharmony_cilibraries, even in circumstances that their license may be incompatible, pass 124cabdff1aSopenharmony_ci`--enable-nonfree` to configure. This will cause the resulting binary to be 125cabdff1aSopenharmony_ciunredistributable. 126cabdff1aSopenharmony_ci 127cabdff1aSopenharmony_ciThe Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are 128cabdff1aSopenharmony_ciincompatible with the GPLv2 and v3. To the best of our knowledge, they are 129cabdff1aSopenharmony_cicompatible with the LGPL. 130