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 party 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 libraries:
- 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 releases of FFMpeg; however, you can get the FFMpeg source code on a daily basis.
For example, you can checkout the source code using TortoiseSVN,
FFmpeg is developed under Linux, but it can be compiled under most Operating Systems.
For Windows, FFMpeg can be compiled with MSYS and MingGW. If you have setup MSYS and MingGW systems correctly, you can compile FFMpeg under its folder.
- Cleanup former build results.
- Setup build parameters.
./configure --enable-shared --disable-static --enable-memalign-hack
If there are no errors, and config.mak and config.h were generated, you can build the library, and then, if you want, you can install them into the MSYS environment.
Using FFMpeg in Your Visual C++ Environment
- Create inttypes.h and stdint.h if you don't have them. Provided in the above link is a copy of these two files. You can get them from another place if you want.
- Set up additional include directories and additional library directories. By default, these folders are under your MSYS folder, for example:
- Add FFmpeg's shared libraries, including libavutil.lib, libavcodec.lib, and libavformat.lib.
- Include the FFMpeg header:
Using the FFMpeg code
There is an example within FFMpeg, output_example.c. But if you have copied code from this example, following tips may ensure you compile successfully.
- Add the required casts.