FFmpeg是一个开源的多媒体库,最新版本是2.4.3,它的License是LGPL或GPL。FFmpeg可以用来记录、转换数字音频、视频,并能将其转换为流的开源计算机程序。它包括了音/视频编码库libavcodec。FFmpeg是在Linux下开发出来的,但它可以在包括Windows在内的大多数操作系统中编译。它可以轻易地实现多种视频格式之间的相互转换。

FFmpeg用vs2010编译步骤:

1.  从https://www.ffmpeg.org/download.html下载最新版本2.4.3,将其解压缩到E:\FFmpeg\ffmpeg-2.4.3下;

2.   从http://sourceforge.net/projects/mingw/files/下载mingw-get-setup.exe 并仿照http://blog.csdn.net/fengbingchun/article/details/7335741中步骤进行安装,除选择安装MinGW外,还需选择安装MSYS;并将C:\MinGW\bin和C:\MinGW\msys\1.0\bin加入到系统环境变量PATH中;

3.  从https://github.com/libav/c99-to-c89/releases 下载c99-to-c89-1.0.2.zip,解压缩,并将c99conv.exe和c99warp.exe复制到C:\MinGW\msys\1.0\bin目录下;

4.  从http://code.google.com/p/msinttypes/downloads/list下载c99头文件inttypes.h和stdint.h(msinttypes),并将其复制到C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include 目录下;

5.  从http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=1683下载pkg-config-0.23,解压缩,并将pkg-config.exe复制到C:\MinGW\msys\1.0\bin目录下,有时还需下载intl.dll等库,将其复制到pkg-config.exe同一目录下;

6.  从http://yasm.tortall.net/Download.html下载win32VS2010.zip(或Win32.exe),解压缩,并将vsyasm.exe改名为yasm.exe复制到C:\MinGW\msys\1.0\bin目录下;

7.  将其msys.bat改名为msys_vs2010.bat,并在msys_vs2010.bat文件的开头加入call"C:\Program Files (x86)\Microsoft Visual Studio10.0\VC\bin\vcvars32.bat" ;

8.  重命名C:\MinGW\msys\1.0\bin下link.exe为link_msys.exe,这是为了防止此link.exe与vc2010中的link.exe发生冲突,编译完ffmpeg后需要再次修改回来;

9.  双击运行msys_vs2010.bat,使用cd命令将其定位到E:\FFmpeg\ffmpeg-2.4.3;接着依次输入命令:./configure  --enable-shared –disable-static –prefix=./build_vs2010  --toolchain=msvc  >log.txt;  make;   make install;

10.             执行以上命令后会在E:\FFmpeg\ffmpeg-2.4.3目录下生成一个vs2010_dll文件夹,此文件夹下包括bin、include、lib、share四个文件,这是动态库,若要生成debug的静态库,则相应命令为./configure  --enable-static –enable-debug--prefix=./vs2010_lib_debug        --toolchain=msvc  >log.txt;更多其它选项可查看configure文件.

以下对上面生成的各个库进行简单的说明,摘自https://www.ffmpeg.org/documentation.html

1.      libavutil:The libavutillibrary is a utility library to aid portable multimedia programming. Itcontains safe portable string functions, random number generators, data structures,additional mathematics functions, cryptography and multimedia relatedfunctionality (like enumerations for pixel and sample formats). It is not alibrary for code needed by both libavcodec and libavformat.

2.      libswscale: The libswscalelibrary performs highly optimized image scaling and colorspace and pixel formatconversion operations. Specifically, this library performs the followingconversions:(1).Rescaling: is the process of changing the video size. Severalrescaling options and algorithms are available. This is usually a lossyprocess.(2).Pixel format conversion: is the process of converting the imageformat and colorspace of the image, for example from planar YUV420P to RGB24packed. It also handles packing conversion, that is converts from packed layout(all pixels belonging to distinct planes interleaved in the same buffer), toplanar layout (all samples belonging to the same plane stored in a dedicatedbuffer or "plane").This is usually a lossy process in case the sourceand destination colorspaces differ.

3.      libswresample: The libswresamplelibrary performs highly optimized audio resampling, rematrixing and sampleformat conversion operations.Specifically, this library performs the followingconversions:(1).Resampling: is the process of changing the audio rate, forexample from a high sample rate of 44100Hz to 8000Hz. Audio conversion fromhigh to low sample rate is a lossy process. Several resampling options andalgorithms are available.(2).Format conversion: is the process of convertingthe type of samples, for example from 16-bit signed samples to unsigned 8-bitor float samples. It also handles packing conversion, when passing from packedlayout (all samples belonging to distinct channels interleaved in the samebuffer), to planar layout (all samples belonging to the same channel stored ina dedicated buffer or "plane").(3).Rematrixing: is the process ofchanging the channel layout, for example from stereo to mono. When the inputchannels cannot be mapped to the output streams, the process is lossy, since itinvolves different gain factors and mixing. Various other audio conversions(e.g. stretching and padding) are enabled through dedicated options.

4.      libavcodec: The libavcodeclibrary provides a generic encoding/decoding framework and contains multipledecoders and encoders for audio, video and subtitle streams, and severalbitstream filters.The shared architecture provides various services rangingfrom bit stream I/O to DSP optimizations, and makes it suitable forimplementing robust and fast codecs as well as for experimentation.

5.      libavformat: The libavformatlibrary provides a generic framework for multiplexing and demultiplexing(muxing and demuxing) audio, video and subtitle streams. It encompassesmultiple muxers and demuxers for multimedia container formats.It also supportsseveral input and output protocols to access a media resource.

6.      libavdevice: The libavdevicelibrary provides a generic framework for grabbing from and rendering to manycommon multimedia input/output devices, and supports several input and outputdevices, including Video4Linux2, VfW, DShow, and ALSA.

7.      libavfilter: The libavfilterlibrary provides a generic audio/video filtering framework containing severalfilters, sources and sinks.

参考文献:

1.      https://www.ffmpeg.org/platform.html

2.      http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=5&t=1683

3.      http://www.cnblogs.com/xylc/p/3683203.html

4.      http://blog.csdn.net/heng615975867/article/details/21601617

FFmpeg简介及在vc2010下编译步骤相关推荐

  1. GDAL库简介以及在Windows下编译过程

    GDAL(Geospatial Data Abstraction Library,地理空间数据抽象库)是一个在X/MIT许可协议下的开源栅格空间数据转换库.官网http://www.gdal.org/ ...

  2. ffmpeg for android windows,windows10下编译ffmpeg for android

    最近实现了一款基于FFMpeg的支持多路视频的实时流媒体播放器:https://github.com/huweijian5/RtspPlayer 有兴趣能够关注下.html 本文记录在windows1 ...

  3. 【FFMPEG系列】之windows下编译FFMPEG篇----之三(MingW64)

    目录结构 序 1 .安装mingw64 1.1 mingw64的安装 1.2 msys的安装 2.编译ffmpeg 2.1 编译 序 前文"windows下编译FFMPEG篇----之一(M ...

  4. Skia简介以及在Windows下编译操作步骤

    Skia是一个C++的开源2D向量图形处理函数库(Cairo是一个矢量库),包括字型.坐标转换.位图等等,相当于轻量级的Cairo,目前主要用于Google的Android和Chrome平台,Skia ...

  5. linux编译ffmpeg成so,「ffmpeg」一 mac 环境下编译ffmpeg,生成so库文件

    1.下载ffmpeg源码,官网,我这里直接采用git 方式下载: 下载ffmpeg.png 终端输入git命令: 静静等待~ 最后下载的版本为3.4.6 . image.png 这里注意一下,刚开始我 ...

  6. 【FFMPEG系列】之windows下编译FFMPEG篇----之二(MSYS2)

    序 有一些ffmpeg编译教程使用mingw与msys工具编译ffmpeg,老版本的Mingw可能不包括msys(此属猜测,欢迎留言告诉),所以安装时既要下载Mingw,又要下载msys.较新版本的M ...

  7. Httpd2.4简介及CenOS6.6下编译安装

    2019独角兽企业重金招聘Python工程师标准>>> CentOS7的镜像中已经提供了httpd2.4的rpm包,httpd2.4相对于httpd2.2有较大的改进,在CentOS ...

  8. 在Windows下编译FFmpeg详细说明

    在Windows下编译FFmpeg详细说明 MinGW:一个可自由使用和自由发布的Windows特定头文件和使用GNC工具集导入库的集合,允许你生成本地的Windows程序而不需要第三方C运行时 Mi ...

  9. FFmpeg在Linux下编译使用

    1.FFmpeg编译 1.1.安装yasm 这里我是直接通过ubuntu包安装的,当然也可以通过编译源码来安装. sudo apt-get install yasm 1.2.下载FFmpeg git ...

最新文章

  1. 清华「计图」现在支持国产芯片了!动态图推理比PyTorch快了270倍
  2. pomelo php,Nginx 502 Bad Gateway 自动重启shell脚本
  3. red hat 6 安装php,Red hat linux服务器简明安装手册(OpenSSL+Mysql+Apache2+PHP)
  4. Linux(Ubuntu 19.10)下 Qt5 连接 MySQL(QMYSQL driver not loaded)
  5. 数据结构(一)——二叉树的性质与两种遍历方法
  6. HDU - 3790 最短路径问题
  7. 报告:上周比特币基金流出9800万美元,ETH、ADA等投资需求上升
  8. LeetCode刷题(46)--Search in Rotated Array
  9. windows10如何查看硬盘序列号
  10. 【matlab】利用matlab解二元一次方程
  11. 为什么要成为软件工程师
  12. DataSource数据源
  13. Ubuntu 16.04.3 LTS 下通过mail发送qq邮件
  14. 深度探索c++对象模型(5):ctor、dtor、copy
  15. html白色的斜线,面试官:如何使用 CSS 实现斜线效果?
  16. python 文本转excel_Python 文本(txt) 转换成 EXCEL(xls)
  17. java 对象和List 里面的对象判断属性是不是为空
  18. 7.2 一次产品异常复位引发的质量提升经历
  19. android TP
  20. 第十三周 任务二

热门文章

  1. PCL显示法线no override found vtkactor
  2. (各种均衡算法在MIMO中的应用对比试验)最小均方误差(MMSE)原理推导以及在MIMO系统中对性能的改善。
  3. Leetcode 526.优美的排列 二进制状压DP
  4. mysql怎么创建表视频教程_mySQL学习入门教程——2.创建表
  5. PCL深度图像(2)
  6. 如何解决VS2015编译C4996错误
  7. TypeScript 的 ?: 、两个问号、?. 分别是什么意思?
  8. 水平反向拆分VSCode编辑器快捷键为Ctrl+\(正交拆分Ctrl+K Ctrl+\),如何快速将当前组编辑器窗口复制到另一侧?设置垂直向下拆分编辑器快捷键Alt+\
  9. centos下设置node.js开机启动(并且启动自己的项目js)
  10. 使用最小堆使用优先级队列(c语言版本)