H264 Encoders other than ffmpeg x264

寵の児 提交于 2019-12-18 21:56:45

问题


The iPhone app I am working on captures images in series within certain user-defined time interval, I am looking for a way to combine these images into H264 encoded videos. I have done some research on Google, it looks like I will have to use something like ffmpeg/mencoder on iPhone? (Also found someone ported ffmpeg to iPhone, ffmpeg4iPhone)

However, I found that x264 is under GPL license, and requires me to open source my project if I use ffmpeg. Also found some people suggested to use Ogg Theora, but I will need to port it to iPhone if I use it. (Which I am not sure how to do it now).

Is there any workaround for this? Any ideas? Thanks.


回答1:


I think you are in a GPL-bind there and have two suggestions:

  1. Just go ahead and GPL your project. There is no reason you cannot sell open source software, and the app store's delay/penalty period will give you a nice lead time over any potential completing project with the GPL'd code. Your place on iTunes store, your motivation and any branding is probably more valuable than the source code. Plus, you can get other people to fix bugs for you. Update: As of January 2011, GPL and App Store do not mix.

  2. Have the iPhone app upload the raw images to a server and do the processing there. That way you are not releasing and distributing the FFmpeg and x264 code, and are hence not required to distribute it.

Good luck and let us know here if you get it published!




回答2:


Appears ffmpeg now has support for cisco's "openh264" (BSD FWIW) encoding codec:

https://www.ffmpeg.org/ffmpeg-codecs.html#libopenh264

FWIW here is what I get from my LGPL build:

ffmpeg.exe -codecs | grep h264
...
ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_qsv ) (encoders: libopenh264 h264_nvenc h264_qsv nvenc nvenc_h264 )

which mentions a few other encoders FWIW, and FFmpeg might support even others.




回答3:


I believe you'll only be able to find commercial versions of x264 implementations if you don't intend to use ffmpeg (there might exist a few other opensource versions but with very low quality). Also, you need to bear in mind that if you make use of those codecs and you decide not to use the platform/iPhone ones you will have to pay royalties because of the patents (I think it's roughly 1 dollar per download).

If this is still affordable to you, then I believe you might be able to find an older version of ffmpeg that was LGPL'ed. You can use this in your code without having to open source the whole project. You only need to opensource changes that you might make to ffmpeg.

Hope this helps!



来源:https://stackoverflow.com/questions/1968790/h264-encoders-other-than-ffmpeg-x264

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!