首先在官网http://ffmpeg.org/download.html下载ffmpeg-4.2.1.tar.bz2

以下为安装步骤:

  1、使用工具将源码包上传至Linux主机

2、解压源码包

    进入该文件夹下:cd /usr/ffmpeg/(这里我是安装到usr目录下新建的ffmpeg文件夹中)

解压该源码包:tar -jxvf ffmpeg-4.2.1.tar.bz2

[bhsoft@localhost ~]$ cd /usr/ffmpeg/
[bhsoft@localhost ffmpeg]$ tar -jxvf ffmpeg-4.2.1.tar.bz2

  3、进入到解压完成的ffmpeg-4.2.1目录下安装yasm(如已安装跳过此步骤)

安装yasm命令:yum install yasm

[bhsoft@localhost ffmpeg]$ cd ffmpeg-4.2.1/
[bhsoft@localhost ffmpeg-4.2.1]$ yum install yasm

中间遇到Is this ok 选择y,如图

   4、

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

安装yasm完毕后执行命令

[bhsoft@localhost ffmpeg-4.2.1]$ ./configure --enable-shared --prefix=/usr/ffmpeg

5、执行make命令(这一步时间比较长,请耐心等待)

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

[bhsoft@localhost ffmpeg-4.2.1]$ make

6、

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

执行make install(安装)命令

[bhsoft@localhost ffmpeg-4.2.1]$ make install

7、

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

修改文件/etc/ld.so.conf

使用 vim /etc/ld.so.conf命令打开文件

[bhsoft@localhost ffmpeg-4.2.1]$ vim /etc/ld.so.conf

在文件后面添加 /usr/ffmpeg/lib/

     然后执行ldconfig命令使其生效

[bhsoft@localhost ffmpeg-4.2.1]$ ldconfig

8、

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

配置环境变量

[bhsoft@localhost ffmpeg-4.2.1]$ vim /etc/profil

使用 vim /etc/profile命令打开profile文件,在文件末添加环境变量:

#set ffmpeg environment

PATH=$PATH:/usr/ffmpeg/bin

export PATH

随后执行 source /etc/profile使配置生效  

[bhsoft@localhost ffmpeg-4.2.1]$ source /etc/profile

9、查看是否配置成功

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

用命令ffmpeg -version查看,出现下图信息即安装成功



  Normal
0 7.8 磅
0
2 false
false
false EN-US
ZH-CN
X-NONE /* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;} Normal
0 7.8 磅
0
2 false
false
false EN-US
ZH-CN
X-NONE /* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

Normal
0

7.8 磅
0
2

false
false
false

EN-US
ZH-CN
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman",serif;}

CentOS7安装ffmpeg的更多相关文章

  1. centos7 安装 ffmpeg

    升级系统 yum install epel-release -yyum update -y 安装Nux Dextop Yum源 由于centos 没有官方软件包,我们可以使用第三方YUM源(Nux D ...

  2. CentOS7 安装ffmpeg

    安装EPEL Release,因为安装需要使用其他的repo源,所以需要EPEL支持:yum install -y epel-release#如果出现缺少Code提示,可以: sudo rpm --i ...

  3. 在CentOS7 安装ffmpeg

    参考自:https://linuxize.com/post/how-to-install-ffmpeg-on-centos-7/ 首先切换至root用户 yum install epel-releas ...

  4. CentOs7.5安装FFmpeg

    一.FFmpeg简介 FFmpeg是一个自由软件,可以运行音频和视频多种格式的录影.转换.流功能,包含了libavcodec ─这是一个用于多个项目中音频和视频的解码器库,以及libavformat— ...

  5. centos7上安装ffmpeg

    FFmpeg介绍 FFmpeg是一个开源免费跨平台的视频和音频流方案,属于自由软件,采用LGPL或GPL许可证(依据你选择的组件).它提供了录制.转换以及流化音视频的完整解决方案.它包含了非常先进的音 ...

  6. centos7 yum安装ffmpeg,以及ffmpeg的简单用法

    yum install ffmpeg: 安装EPEL Release,因为安装需要使用其他的repo源,所以需要EPEL支持: yum install -y epel-release #如果出现缺少C ...

  7. docker下centos7编译安装ffmpeg

    1.安装基础命令 docker下精简版centos没有make等命令,先安装: yum -y install gcc automake autoconf libtool make yum instal ...

  8. cent7安装ffmpeg

    FFmpeg是一个领先的多媒体框架工具集,几乎能够对任何格式的音视频文件进行解码,编码,转码,复用,解复用,流式传输,过滤和播放. 不管这些音视频文件所采用的格式是由某些标准委员会,社区还是公司设计的 ...

  9. # centos7下FFmpeg环境部署记录

    # centos7下FFmpeg环境部署记录 随着视频在网站上的应用越来越多,越来越多的网站服务器需要支持视频转码,视频压缩,FFmpeg是目前最好用的网站服务器后台转码程序,应用最多.FFmpeg是 ...

随机推荐

  1. Chapter 04—Basic Data Management

    1. 创建新的变量 variable<-expression expression:包含一组大量的操作符和函数.常用的算术操作符如下表: 例1:根据已知变量,创建新变量的三种途径 > my ...

  2. 写一个umi插件 自动生成代码 解放cv的双手

    引言 最近在写一个中台项目,使用的react的umi框架. 各种增删改查.基本是列表页 新建页 详情页这种页面 为了避免不必要的简单重复(主要是想偷懒) 于是想去实现自己的一个代码生成器 探索 首先, ...

  3. 洛谷 题解 P1684 考验

    本蒟蒻又来发题解啦! 这个题的正解应该是贪心 直接找题目的关键: 韵脚只可能是 "AABB", "ABAB", "ABBA" 和" ...

  4. luogu P2417 课程

    题目描述 n个学生去p个课堂,每一个学生都有自己的课堂,并且每个学生只能去一个课堂,题目要求能够安排每一个课堂都有人吗? 输入格式 第一行是测试数据的个数, 每组测试数据的开始分别是p和n, 接着p行 ...

  5. 淘宝适配 flexible.js

    1.引入 阿里cdm文件,也可以自己下载下来引用,不需要在添加<meta name="viewport"">标签了 <script src=" ...

  6. MVC效验器

    步骤一:导入依赖 <!--数据效验--> <dependency> <groupId>org.hibernate</groupId> <artif ...

  7. HDU 1808 Halloween treats

    Every year there is the same problem at Halloween: Each neighbour is only willing to give a certain ...

  8. 基于cyusb3014的usb3.0双目摄像头开发测试小结(使用mt9m001c12stm)

    测试图像 摄像头分辨率为1280*1024,双目分辨率为2560*1024 ps:时钟频率太高,时序约束还得进一步细化,图像偶尔会出现部分雪花,下一步完善

  9. jqurey(尺寸,css操作,效果,遍历)

    尺寸: height():设置或返回元素的高度(不包括内边距.边框或外边距). width():设置或返回元素的宽度(不包括内边距.边框或外边距). 例如: $("#box").h ...

  10. Startup/OWIN框架

    为什么写OWIN框架呢? 因为没接触刀OWIN框架直接去学.NET Core比较生硬,个人见解.首先我们要知道OWIN的由来:ASP.NET和IIS和Windows操作系统的关系在之前是紧密联系的,缺 ...