VS2017配置ffmpeg

版权声明:本文为YuanChuang文章,未经博主允许转载。 https://blog.csdn.net/zzy1448331580/article/details/89073127

0.将x86改为x64(这个要根据自己的情况)

1.将ffmpeg的包含文件和库文件复制到项目的路径下面

2.项目里面项目 -> 属性 -> VC++目录 设置包含文件和库文件

3.将mingw安装目录下的include的inttypes.h,stdint.h,_mingw.h三个文件拷到包含目录下面

4.

#ifdef __cplusplus
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//some other include <>.....
extern "C"
{
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
//some other include "".....
#include "libavutil/imgutils.h"
};
#endif

5.

#pragma comment(lib,"avutil.lib")
#pragma comment(lib,"avcodec.lib")
#pragma comment(lib,"avformat.lib")
#pragma comment(lib,"swresample.lib")
#pragma comment(lib,"swscale.lib")
#pragma comment(lib,"avfilter.lib")
#pragma comment(lib,"avdevice.lib")
//some other

OK

还是配置不好的话,传送门:ffmpeg教程 项目

猜你喜欢

转载自blog.csdn.net/zzy1448331580/article/details/89073127