wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz

tar -zxvf ffmpeg-3.1.tar.gz

cd ffmpeg-3.1

./configure
make
make install

接着就是漫长的等待了。。。。。。。。可以去喝杯咖啡了o(∩_∩)o

查看一下版本

ffmpeg -version

安装过程中出现以下错误:

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

wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz

tar -zxvf yasm-1.3..tar.gz

cd yasm-1.3.

./configure
make
make install

还有的是,ffmpeg主要是用于解码的。如果需要重新编码,就需要安装新的第三方编码支持。

参考文章

http://blog.creke.net/801.html

http://www.centoscn.com/image-text/install/2015/0523/5512.html

重新编译ffmpeg

1.进入ffmpeg目录,./configure --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libmp3lame --enable-libx264 --enable-pic --enable-libfaac

,然后就生成了新的makefile了。

2.执行sudo make clean && make sudo make install。

3.这样ffmpeg就被重新编译了,完了就可以验证一下,使用ffmpeg工具,把某个视频文件中的视频流转码成h264格式,音频流转码成mp3lame格式,不妨试试。

转MP3错误情况:

“ffmpeg: error while loading shared libraries: libmp3lame.so.0: cannot open shared object file: No such file or directory”等类似的错误

解决办法是建立软链接:
# ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib64/libmp3lame.so.0

或者直接修改修改/etc/ld.so.conf

vi  /etc/ld.so.conf

新增一行

/usr/local/lib

下载源ffmpeg

http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz

下载源yasm

http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz

centos 安装ffmpeg的更多相关文章

  1. CentOS安装ffmpeg+h264

    CentOS安装ffmpeg+h264 前言 坑!坑!坑! 全是坑. 本文安装系统环境为CentOS7.2.我这里提供安装所需的四个源码包,均需要编译安装.所有组件最好都安装最新的稳定版,或者下载使用 ...

  2. centos 安装 ffmpeg

    使用yum方式安装ffmpeg: 先安装Nux Dextop仓库: Nux Dextop库依赖于EPEL库,所有要先安装EPEL库(需要管理员权限). 如果安装过则跳过. $ su root $ yu ...

  3. Centos安装ffmpeg

    yum install -y ffmpeg 使用上面的命令安装却出现以下问题: Google后发现缺少一些扩展: wget https://download1.rpmfusion.org/free/e ...

  4. CentOS 6/7安装ffmpeg

    环境 CentOS 6/7 安装 导入GPG key rpm --import http://packages.atrpms.net/RPM-GPG-KEY.atrpms 安装ATRPMS Repo ...

  5. <亲测>CentOS中yum安装ffmpeg

    CentOS中yum安装ffmpeg 1.升级系统 sudo yum install epel-release -y sudo yum update -y sudo shutdown -r now 2 ...

  6. CentOS中yum安装ffmpeg

    1.升级系统 sudo yum install epel-release -y sudo yum update -y sudo shutdown -r now 2.安装Nux Dextop Yum 源 ...

  7. CentOS下yum安装FFmpeg

    一.yum安装FFmpeg 1.    最偷懒的方式就是yum安装了,自动解决依赖.不过CentOS系统默认无FFmpeg源,企业版 Linux 附加软件包EPEL源也不包含,需要手动添加yum源配置 ...

  8. linux(centos)下安装ffmpeg

    [备忘]windows环境下20行php代码搞定音频裁剪 上次我的这篇文章将了windows下web中如何操作ffmpeg的文章,这里则记录下linux(centos)下的安装 首先:我花了中午大概1 ...

  9. 阿里云服务器---centos编译安装ffmpeg

    环境 系统环境:CentOS release 6.7 (Final) 需求 编译安装ffmpeg 获取依赖 安装依赖包 yum install -y autoconf automake cmake f ...

随机推荐

  1. React-Native hello word 搭建及新手常见问题

    参考文档:http://reactnative.cn/docs/0.20/getting-started.html cmd 打开 敲入 1. npm config set registry https ...

  2. transform-style: preserve-3d在iphone下的bug

    经测,当元素设置transform-style: preserve-3d;后,其实现rotateY时的动画效果会穿透上层的覆盖图层. 马克一下

  3. Linux 条件判断

    1. 按照文件类型判断 -b 文件 #判断文件是否存在,并且是设备文件 -c 文件 #判断文件是否存在,并且是字符设备文件 -d 目录 #判断目录是否存在,并且是否为目录(是目录返回真) -e 文件 ...

  4. Codeforces 740C. Alyona and mex 思路模拟

    C. Alyona and mex time limit per test: 2 seconds memory limit per test: 256 megabytes input: standar ...

  5. PHP的文件格式应该以UTF-8无BOM编码

    前一段时间写PHP,经常在解析文件之前就要对数据进行处理判断,并以header()的方式进行页面跳转.然而后来将文件放到 linux 服务器时常碰到header()解析出错的情况,而在 windows ...

  6. Cordova系列(一)

    1.安装 这里推荐用npm安装cordova,至于npm的安装,网上有很多的.打开命令行,输入 npm install -g cordova 这里就安装了好了最新版的cordova,虽然绝大多数会成功 ...

  7. Balance - 七夕悠然

    想争取一个月至少一篇博客的,还是没搭上七月的末班车.两个小妹妹来上海看我了,工作上又有点儿忙,充分利用所有时间了,还是没有挪出时间来写东西,貌似写东西也要时机一样,需要在可以静静思考的时候,再加上有淡 ...

  8. k次出现与一次出现的数字

    原始的题目是这样的: Single Number II Given an array of integers, every element appears three times except for ...

  9. C语言教学--二维数组和指针的理解

    对于初学者对二维数组和指针的理解很模糊, 或者感觉很难理解, 其实我们和生活联系起来, 这一切都会变得清晰透彻. 我们用理解一维数组的思想来理解二维数组, 对于一维数组,每个箱子里存放的是具体的苹果, ...

  10. 13.Xcode开发的快捷键

    1.文件 CMD + N: 新文件: CMD + SHIFT + N: 新项目: CMD + O: 打开: CMD + S: 保存: CMD + SHIFT + S: 另存为: CMD + W: 关闭 ...