ffmpeg在VS2013中的配置

VS2013利用ffmpeg解決圖像視頻問題,怎麼進行配置環境的搭建呢?

ffmpeg分爲shared、Dev、static三個版本。

在VS2013中的配置方法:

1.將ffmpeg的源文件拷貝至項目文件夾下;
2.在VS2013中進行配置:
項目屬性-->VC++目錄-->包含目錄中添加:$(ProjectDir)\include。
C/C++目錄-->附加包含目錄中添加:$(ProjectDir)\include
鏈接器-->附加庫目錄中添加:$(ProjectDir)\lib
輸入-->附加依賴項中添加:
avcodec.lib
avdevice.lib
avfilter.lib
avformat.lib
avutil.lib
postproc.lib
swresample.lib
swscale.lib

3.編寫程序測試:
如果是C++程序,要使用extern "C"進行擴展,例如:
#ifdef __cplusplus
extern "C"
{
#endif

#include "libavcodec/avcodec.h"
#include "libavdevice/avdevice.h"
#include "libavformat/avformat.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libswscale/swscale.h"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "windows.h"
#include "process.h"

#ifdef __cplusplus
}
#endif


ffmpeg的static版本的使用:
在系統變量中添加ffmpeg\bin的路徑即可。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章