在商业C/C ++应用程序中使用ffmpeg共享库 [英] Using ffmpeg shared library in a commercial C/C++ application
问题描述
我们有一个基于C ++的应用程序,可以在Windows,Mac和Linux上运行.现在,我需要在此应用程序中添加h.264和h.265解码.ffmpeg似乎可以解决问题.
We have a C++-based application that runs on Windows, Mac, and Linux. I now need to add h.264 and h.265 decoding within this application. It seems ffmpeg will do the trick.
由于我们是商业应用程序,因此我们无法将源代码公开.但是,据我了解,FFMpeg基于LGPL许可要求.仔细阅读有关LGPL要求的各种文章,看来我可以使用ffmpeg而不公开我们的源代码,只要:
As ours is a commercial application, we cannot disclose the source code to public. However, as I understand, FFMpeg is based on LGPL licensing requirements. Going through various articles on LGPL requirements, it seems I can use ffmpeg without disclosing our source code as long as:
- 我将ffmpeg构建为共享库,并确保在配置过程中不要使用"--enable-gpl"标志.
- 我在关于"对话框中确认我们正在使用ffmpeg共享库.
有人可以验证这是否满足要求吗?问候.
Can someone please verify if this more or less meets the requirements? Regards.
请注意,我只需要ffmpeg进行解码,而无需进行编码.因此,我不必使用"--enable-libx264"和"--enable-libx265"标志.
Note that I need ffmpeg only to decode and not to encode. Therefore, I don't have to use "--enable-libx264" and "--enable-libx265" flags.
推荐答案
As a FFmpeg developer, I would expect you to follow the considerations mentioned on our website:
- 不带"--enable-gpl"且不带FFmpeg的情况下编译"--enable-nonfree".
- 使用动态链接(在Windows上,这意味着链接到dll)以与FFmpeg库链接.
- 分发FFmpeg的源代码,无论是否进行了修改.
- 制作确保源代码与您的库二进制文件完全对应正在分发.
- 在FFmpeg源代码的根目录仅用于创建文件更改.
- 说明如何编译FFmpeg,例如配置行,在添加到根目录的文本文件中源代码.
- 使用tarball或zip文件分发源代码.
- 将FFmpeg源代码托管在与您正在分发的二进制文件.
- 添加此软件使用
FFmpeg 代码.org/licenses/old-licenses/lgpl-2.1.html"rel =" noreferrer> LGPLv2.1 及其源代码可以在此处下载[这里是源代码的链接]"你的网页哪里有指向您的应用程序的下载链接. - 提及此软件使用LGPLv2.1下的FFmpeg项目中的库"在程序的关于盒子"中.
- 在您的EULA中提及您的程序在LGPLv2.1下使用FFmpeg.
- 如果您的EULA要求拥有代码中,您必须明确提及您不拥有FFmpeg,以及可以找到相关所有者的位置.
- 取消任何禁止来自EULA的逆向工程.
- 将相同的更改应用于所有您的EULA的翻译.
- 不要拼错FFmpeg(两个大写字母F和小写的"mpeg").
- 请勿将FFmpeg dll重命名为某些混淆的名称,但添加后缀或前缀就可以了(重命名"avcodec.dll""MyProgDec.dll"不是很好,但"avcodec-MyProg.dll"是可以的.
- 走再次遍历所有LGPL外部库的所有项目编译成FFmpeg(例如LAME).
- 确保您的程序是不使用任何GPL库(尤其是libx264).
- Compile FFmpeg without "--enable-gpl" and without "--enable-nonfree".
- Use dynamic linking (on windows, this means linking to dlls) for linking with FFmpeg libraries.
- Distribute the source code of FFmpeg, no matter if you modified it or not.
- Make sure the source code corresponds exactly to the library binaries you are distributing.
- Run the command "git diff > changes.diff" in the root directory of the FFmpeg source code to create a file with only the changes.
- Explain how you compiled FFmpeg, for example the configure line, in a text file added to the root directory of the source code.
- Use tarball or a zip file for distributing the source code.
- Host the FFmpeg source code on the same webserver as the binary you are distributing.
- Add "This software uses code of FFmpeg licensed under the LGPLv2.1 and its source can be downloaded here [where here is a link to the source code]" to every page in your website where there is a download link to your application.
- Mention "This software uses libraries from the FFmpeg project under the LGPLv2.1" in your program "about box".
- Mention in your EULA that your program uses FFmpeg under the LGPLv2.1.
- If your EULA claims ownership over the code, you have to explicitly mention that you do not own FFmpeg, and where the relevant owners can be found.
- Remove any prohibition of reverse engineering from your EULA.
- Apply the same changes to all translations of your EULA.
- Do not misspell FFmpeg (two capitals F and lowercase "mpeg").
- Do not rename FFmpeg dlls to some obfuscated name, but adding a suffix or prefix is fine (renaming "avcodec.dll" to "MyProgDec.dll" is not fine, but to "avcodec-MyProg.dll" is).
- Go through all the items again for any LGPL external library you compiled into FFmpeg (for example LAME).
- Make sure your program is not using any GPL libraries (notably libx264).
根据您到目前为止的发言,我认为您只执行1-2、9-11、15-18点.您需要使FFmpeg的源代码(包括修改(3-5、7-8))随您的应用程序一起提供,提及构建说明(6),删除FFmpeg的所有权声明,删除反向工程禁止(如果有),并检查您的EULA(12-14).
From what you've said so far, I think you're doing only point 1-2, 9-11, 15-18. You need to make the source code (of FFmpeg) including modifications (3-5, 7-8) available along with your application, mention build instructions (6), remove ownership claims on FFmpeg, remove reverse engineering prohibitions (if any), and check your EULA (12-14).
这篇关于在商业C/C ++应用程序中使用ffmpeg共享库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!