views:

987

answers:

2

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.

A: 

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!

ruibm
Thanks for the reply! I have just checked on ffmpeg's site http://ffmpeg.org/legal.html, its current version is under LGPL license, but utilizes several optional parts under GPL. Is the h264 encoder ffmepg using different than x264 and is under LGPL license? As I know x264 is under GPL license.
noear
Yes, ffmpeg is under LGPL and x264 is under GPL. FFmpeg uses its own LGPL decoder, however for encoding it is relying on x264. So you can't use it for a commercial application.
Serafeim
+5  A: 

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.

  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!

Stu Thompson