Visual Studio 2013+FFMPEG开发环境配置
来源:互联网 发布:优酷for mac 编辑:程序博客网 时间:2024/06/05 23:41
官网:https://ffmpeg.zeranoe.com/builds/
包含三个版本:Static、Shared以及Dev
Static --- 包含3个应用程序:ffmpeg.exe , ffplay.exe , ffprobe.exe,体积都很大,相关的DLL已经被编译到exe里面去了。
Shared --- 除了ffmpeg.exe , ffplay.exe , ffprobe.exe之外还有一些DLL,exe体积很小,在运行时到相应的DLL中调用功能。
Dev --- 开发者(developer)版本,里面包含了库文件xxx.lib以及头文件xxx.h,这个版本不含exe文件
一般我们用到的是Shared(*.dll)和Dev(*.lib;*.h)。
1、打开 Visual Studio 2013,新建项目,选择 Visual C++ 中的 Win32 控制台应用程序,确定,完成。
2、进入 FFmpeg 源码文件夹下的 doc/examples 文件夹,找到 metadata.c 文件,该文件是一个独立 demo,运行结果为打印音视频媒体文件基本信息。打开将其中的内容复制并粘贴到 ffmpeg-test.cpp 中,稍微修改如下。
3、在 Visual Studio 中的项目名上右击,打开属性,分别设置 配置属性 -> C/C++ -> 附加包含目录 和 配置属性 -> 链接器 -> 附加库目录 为第二步解压好的 32-bit Dev 文件夹下的 include 文件夹和 lib 文件夹,同时在 配置属性 -> 链接器 -> 输入 -> 附加依赖项 添加 avformat.lib 和 avutil.lib。
4、再将第二步解压的 32-bit Shared 文件夹下的 bin 文件夹中的 avcodec-56.dll、avformat-56.dll、avutil-54.dll 和 swresample-1.dll 拷贝到与解决方案同名的项目文件夹中。最终的文件结构如下图。
在VS2013环境下编译出现:
这是由于该函数被标记为attribute_deprecated,意味着该函数在不久的将来会被淘汰。
解决:1、将SDL检查关闭(暂时的方法)
2、更改为新的函数(参考ffplay.c)
5、编译执行成功得到结果如下。
命令行下编译:
E:\MyDocument\Desktop\FFmpeg>tree /F文件夹 PATH 列表
卷序列号为 32D1-7CF3
E:.
│ avcodec-55.dll
│ avcodec.lib
│ avdevice-55.dll
│ avdevice.lib
│ avfilter-4.dll
│ avfilter.lib
│ avformat-55.dll
│ avformat.lib
│ avutil-52.dll
│ avutil.lib
│ ffmpeg.cpp
│ ffmpeg.exe
│ ffmpeg.obj
│ inttypes.h
│ postproc-52.dll
│ postproc.lib
│ stdint.h
│ swresample-0.dll
│ swresample.lib
│ swscale-2.dll
│ swscale.lib
│ _mingw.h
│
├─libavcodec
│ avcodec.h
│ avfft.h
│ dxva2.h
│ old_codec_ids.h
│ vaapi.h
│ vda.h
│ vdpau.h
│ version.h
│ xvmc.h
│
├─libavdevice
│ avdevice.h
│ version.h
│
├─libavfilter
│ asrc_abuffer.h
│ avcodec.h
│ avfilter.h
│ avfiltergraph.h
│ buffersink.h
│ buffersrc.h
│ version.h
│
├─libavformat
│ avformat.h
│ avio.h
│ version.h
│
├─libavutil
│ adler32.h
│ aes.h
│ attributes.h
│ audioconvert.h
│ audio_fifo.h
│ avassert.h
│ avconfig.h
│ avstring.h
│ avutil.h
│ base64.h
│ blowfish.h
│ bprint.h
│ bswap.h
│ buffer.h
│ channel_layout.h
│ common.h
│ cpu.h
│ crc.h
│ dict.h
│ downmix_info.h
│ error.h
│ eval.h
│ ffversion.h
│ fifo.h
│ file.h
│ frame.h
│ hmac.h
│ imgutils.h
│ intfloat.h
│ intfloat_readwrite.h
│ intreadwrite.h
│ lfg.h
│ log.h
│ lzo.h
│ macros.h
│ mathematics.h
│ md5.h
│ mem.h
│ murmur3.h
│ old_pix_fmts.h
│ opt.h
│ parseutils.h
│ pixdesc.h
│ pixfmt.h
│ random_seed.h
│ rational.h
│ replaygain.h
│ ripemd.h
│ samplefmt.h
│ sha.h
│ sha512.h
│ stereo3d.h
│ time.h
│ timecode.h
│ timestamp.h
│ version.h
│ xtea.h
│
├─libpostproc
│ postprocess.h
│ version.h
│
├─libswresample
│ swresample.h
│ version.h
│
└─libswscale
swscale.h
version.h
E:\MyDocument\Desktop\FFmpeg>
转自:http://blog.csdn.net/x_iya/article/details/51629208
- Visual Studio 2013+FFMPEG开发环境配置
- 配置visual studio中的ffmpeg开发环境
- Visual studio 通用开发环境配置:SDL,FFMPEG为例
- Visual studio 通用开发环境配置:SDL,FFMPEG为例
- Visual Studio 2013 + Qt + FFMPEG开发环境配置,手把手详细图文
- Visual Studio 2013 开发环境配置
- Windows 8.1 Visual Studio 2013配置OpenGL开发环境
- OpenGL超级宝典visual studio 2013开发环境配置,GLTools
- OpenGL超级宝典visual studio 2013开发环境配置,GLTools
- Visual Studio开发QT程序--环境配置
- Visual Studio 2005配置SystemC开发环境
- Visual Studio 2008配置SystemC开发环境
- windows visual studio openGL开发环境配置
- Visual Studio 2015配置opencv开发环境
- Visual Studio 2015配置opencv开发环境
- visual studio配置OpenCL开发环境
- Visual Studio快捷配置OpenCV开发环境
- Visual Studio Code配置PHP开发环境
- 神经网络系列讲解之离散型Hopfield网络
- 机器学习25-主题模型LDA(一)
- android 事件监听方法大全
- Android之百度地图(一)申请秘钥
- sql注入总结
- Visual Studio 2013+FFMPEG开发环境配置
- Round 2 B
- python2.7 编码问题解析(一)
- JSP中的include的两种使用方法法
- sybase 主键自动增长
- 2017十大网络黑客攻击事件丨阿里云河南
- 合天网安实验室:CTF-MISC练习
- Windows系统版本判断
- QT 中使用 Windows API----SendMessage() 进行窗体间消息传递