Using FFMpeg in Microsoft Visual C++ Environment
来源:互联网 发布:我的世界编程的软件 编辑:程序博客网 时间:2024/05/17 00:54
Using FFMpeg in Microsoft Visual C++ Environment
- Required Header Files - 5 Kb
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
Get FFMpeg Source Code
There are no formal release of FFMpeg, however, you can get FFMpeg source code on a daily basic.
svn://svn.mplayerhq.hu/ffmpeg/trunk
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
License
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
About the Author
Denny50Software Developer (Senior)
Australia
Member
Senior software engineer with 10 years experience of C/C++ programming. Now also has some project with C#. I'm from Shanghai and now working at Melbourne. At I spare time, I enjoy my family life. My blog, Childhood is a collection about my family, epically my lovely son. Most of them write in Chinese, and a few in my poor English - please forgive me, I'm improving my English as soon as I can.
- Using FFMpeg in Microsoft Visual C++ Environment
- Setting environment for using Microsoft Visual Studio 2008 x86 tools出现此时不应有的解决办法
- vs2010 command prompt 运行时停在Setting environment for using Microsoft Visual Studio 2010 x86 tools.
- 解决VS命令提示符 “Setting environment for using Microsoft Visual Studio. 此时不应有“系列错误
- How to synchronize access to a shared resource in a multithreading environment by using Visual C#
- Using Visual C++ DLLs in a C++Builder Project
- Exporting a function in a DLL using Microsoft Visual C++ 6.0
- Using MySQL in an OpenBSD Environment
- Using Flashback in a Data Guard Environment
- Visual studio using Zeranoe FFmpeg libs and dlls crashes in release mode.
- Using the Microsoft Visual Studio 2005 Debugger
- Using GDB in Visual Studio
- Compiling and Integrating Crypto++ into the Microsoft Visual C++ Environment
- 【C++】串口通信IN C++(适用于Microsoft Visual Studio 2010/2012/2013 ,VC++6.0 )
- Using Cookie in C#
- 原文:http://support.microsoft.com/kb/130869 In Microsoft Visual C++, if the version of the compiler i
- Get files automatically by using FTP in Linux environment.
- Using UTF-8 as the internal representation for strings in C and C++ with Visual Studio
- Python资源
- Kid Develop
- 优化MySQL数据库性能的八大“妙手”
- ArrayAdapter和BaseAdapter的区别
- JSP 快捷键弹出窗口
- Using FFMpeg in Microsoft Visual C++ Environment
- A. Lange Sohne--World famous brand watches
- 算法比我们想象的重要得多
- windows计算程序运行时间
- 突然想起
- 关于iPhone的一个广告加载问题
- XML解析器如何正确读取XML文件的编码的规则
- VS2005对IIS的操作
- MD5 和 SHA1 加密