
Introduction
FFMpeg is a free video library that can record and convert audio and video data. FFMpeg is under GNU Lesser General Public License, but FFMpeg also uses some third part library which maybe under GNU General Public License. So before using FFMpeg library, you'd better spend some time on the license.
FFMpeg includes the following librarys
libavcodec: All of the video and audio encoders and decoders.
libavformat: Demuxers and muxers for audio and video formats.
libavutil: Useful utils of FFMpeg
Get FFMpeg Source Code
There are no formal release of FFMpeg, however, you can get FFMpeg source code on a daily basic.
svn:
For example, you can checkout source code using TortoiseSVN,

Compiling FFMpeg
FFmpeg is developed under Linux, but it can be compiled under most operating systems.
For Windows, FFMpeg can be compilied by MSYS and MingGW. If you had setup MSYS and MingGW system correctly, you can compile FFMpeg under it's folder.
1. Cleanup former build results.
make distclean
2. Setup build parameters.
./configure --enable-shared --disable-static --enable-memalign-hack
If there are no errors, and config.mak and config.h generated, you can build the library, and then, if you want, you can install them into MSYS environment.
make
make install
Using FFMpeg in Your Visual C++ Environment
1. Create inttypes.h and stdint.h if you don't have them. Attachment is a copy of these two files. You can get them from other place if you want.
2. Setting up Additional Include Directories and Additional Library Directories. By default, these folder is under your MSYS folder, for example:
/usr/local/include
/usr/local/lib
3. Add FFmpeg's shared libraries, include libavutil.lib libavcodec.lib libavformat.lib
:
4. Include the FFMpeg header,
#include <ffmpeg/avformat.h>
#include <ffmpeg/avcodec.h>
Using the FFMpeg code
There are an example within FFMpeg, output_example.c. But if you copied codes from this example, following tips may ensure you compiles successfully.
1. Add required casts.
2. Change snprintf
to _snprintf