Log in

View Full Version : A roaylty-free H264 or other encoder?


JoelBenM
2nd December 2007, 16:37
Hi everybody,

We are a self-funded startup, developing a video-capture application that would be freely available for our users. We are looking for an encoder to include in the downlodable application. We wouldn't like to use x264 because it seems its a GPL, which will require us to go open source, and we can't.

Any recommendation for a good encoder sdk, reasonably priced or non-gpl? some links we checked cost much too high. Others dont offer pricing info.

another option is to go with h263, or some other good codec. any options you can think of?

worse case, we will develop a codec. any good starting point?

thanks SO MUCH for _any_ idea,
Joel

celtic_druid
2nd December 2007, 17:05
Doesn't ffmpeg have its own basic H.264 encoder?

mdw
2nd December 2007, 17:24
Hi everybody,

We are a self-funded startup, developing a video-capture application that would be freely available for our users. We are looking for an encoder to include in the downlodable application. We wouldn't like to use x264 because it seems its a GPL, which will require us to go open source, and we can't.

Any recommendation for a good encoder sdk, reasonably priced or non-gpl? some links we checked cost much too high. Others dont offer pricing info.

another option is to go with h263, or some other good codec. any options you can think of?

worse case, we will develop a codec. any good starting point?

thanks SO MUCH for _any_ idea,
Joel

Is there any problem with using separate x264 binary? I mean you would develop your software and call x264 encoder from it.

-mdw

nm
2nd December 2007, 17:32
You don't need to open your source if you only call x264 as an external tool that is not linked into your executables. See:
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#MereAggregation
http://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#NFUseGPLPlugins

If you need an encoder that can be linked into your program, you could consider FFmpeg's MPEG-4 ASP encoder, which is released under LGPL. It's about as good as XviD.

Dark Shikari
2nd December 2007, 20:25
It is impossible to have a royalty-free H.264 encoder because H.264 itself is patented heavily.

x264 itself is not royalty free; if you want to use it commercially, you will have to pay royalties (not through x264 devs, of course, through the MPEG group).

JoelBenM
2nd December 2007, 21:33
Thanks all! definitely very illuminating.

we will have to disregard patent concerns (http://ffmpeg.mplayerhq.hu/legal.html) (but thanks for the warning!). We still indeed need to link the encoder into our application.

nm: your suggestion sounds very interesting. I tried to look in ffmpeg but couldn't find the answer: how can I use MPEG-4 ASP encoder from my code? I am using today VFW, this giving the compressor individual frames to compress. anything similar available here?

also: technically, can I encode first to MPEG-4 ASP and then encode to H264 using ffmpeg? will the quality be reasonable?

again, thanks a lot

Sagekilla
2nd December 2007, 22:21
Unless you encode the video losslessly, then there will be a quality loss depending on how heavily it's compressed in that intermediary step. Besides that, nothing beats a straight compression to H.264.

LoRd_MuldeR
2nd December 2007, 22:40
nm: your suggestion sounds very interesting. I tried to look in ffmpeg but couldn't find the answer: how can I use MPEG-4 ASP encoder from my code? I am using today VFW, this giving the compressor individual frames to compress. anything similar available here?
ffmpeg is a CLI application. So you'd call ffmpeg.exe from your host application, pass the required parameters and wait until it exits. You might also want to redirect the console output (stdout) to your host application, so you can parse the text in order to obtain status information.

A different way would be to directly call the libavcodec library from your host application...

nm
2nd December 2007, 23:23
nm: your suggestion sounds very interesting. I tried to look in ffmpeg but couldn't find the answer: how can I use MPEG-4 ASP encoder from my code? I am using today VFW, this giving the compressor individual frames to compress. anything similar available here?
Call libavcodec directly. Study ffmpeg.c or search for other encoder tools that use libavcodec to see how it is used. FFmpeg's mailing lists are also a good source of information.

also: technically, can I encode first to MPEG-4 ASP and then encode to H264 using ffmpeg? will the quality be reasonable?
You can, but the H.264 encoder implementation in libavcodec is probably not good enough for your purposes. And I'm not sure if it even is there, although I do remember some talk about a baseline encoder being included. Usually people just call x264 through ffmpeg when they want to use it for H.264 encoding.

However, I don't see a technical reason why you couldn't pipe the frames to a separate x264 process (or some other command-line encoder). That's what most x264 frontends do anyway. If you need to do realtime capturing on slow CPUs, use some lossless intermediate format, or to conserve both disk space and CPU time, use high-bitrate MPEG-2 or MPEG-4 ASP.

JoelBenM
3rd December 2007, 04:36
thanks so much!! sounds very good. we will try it

best
J