一、windows安装:

直接下载地址:

https://ffmpeg.zeranoe.com/builds/

https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20160316-git-d0a9114-win64-static.7z

解压后就可以使用:

ffmpeg -i C:\ffmpeg\test.avi -b:v 640k c:\ffmpeg\output.ts

二、linux源代码安装:

例如以下:

下载 源代码包:ffmpeg-2.8.6.tar.bz2

1.从网络上下载到的源代码包,然后解压到指文件夹

如果下载文件夹 /opt/soft

cd /opt/soft

解压包:

tar -jxvf ffmpeg-2.8.6.tar.bz2

进入解压后文件夹

cd ffmpeg-2.8.6

运行

./configure --enable-shared --prefix=/usr/local/ffmpeg

提示出错:

yasm/nasm not found or too old. Use --disable-yasm for a crippled build.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

依照提示须要安装yasm

使用例如以下
yum install yasm

安装完毕后,继续运行

./configure --enable-shared --prefix=/usr/local/ffmpeg

时间比較长,须要等待几分钟

然后运行以下

make

make install

时间比較长,须要等待几分钟

运行过程没有报错,则安装成功

检查是否安装成功:

/usr/local/ffmpeg/bin/ffmpeg --version

报错例如以下:

/usr/local/ffmpeg/bin/ffmpeg: error while loading shared libraries: libavdevice.so.56: cannot open shared object file: No such file or directory

提示库文件找不到。

改动文件/etc/ld.so.conf 内容添加/usr/local/ffmpeg/lib/

vim /etc/ld.so.conf

include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/

使改动生效

ldconfig

运行 /usr/local/ffmpeg/bin/ffmpeg --version

则返回

配置环境变量 path

export PATH=/usr/local/ffmpeg/bin/:$PATH

env

则在不论什么文件夹都能够运行 ffmpeg --version

測试运行转码:

ffmpeg -i test.avi -b:v 640k output.ts

最新文章

  1. Python语法基础
  2. WPF QuickStart系列之线程模型(Thread Model)
  3. VI中的多行删除与复制
  4. cocos2d-x的环境的搭建
  5. C#实现不安装Oracle客户端访问远程服务器数据!!
  6. Linux —— Shell编程之变量赋值和引用
  7. MySQL常见建表选项以约束
  8. void main(), int main() 和int main(void)的区别
  9. SSM框架—详细整合教程(Spring+SpringMVC+MyBatis)
  10. java 中的IO
  11. LeetCode算法题-Jewels and Stones(Java实现)
  12. python的StringIO
  13. Windbg程序调试系列5-高CPU问题分析
  14. C++之标准库map
  15. Java Script--------问题错误解决意外的终止输入Uncaught SyntaxError: Unexpected end of input解决办法
  16. Python开发——函数【装饰器、高阶函数、函数嵌套、闭包】
  17. python(十四)新式类和旧式类
  18. maintenance
  19. 观察者模式——java设计模式
  20. ansible安装文档

热门文章

  1. day03_12/13/2016_bean属性的设置之setter方法注入
  2. sublime text3配置插件
  3. mysql中的各种concat
  4. jQuery与js的区别,并有基本语法详解,
  5. 重绘DataGridView标头
  6. STL_优先队列_(转载)
  7. Python操作数据库及hashlib模块
  8. CAD直接打印,不出现打印对话框(com接口VB语言)
  9. @RequestMapping与controller方法返回值介绍
  10. C#工具帮助类