首先在官网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. Prometheus PromQL 基础

    目录 时序 4 种类型 Counter Gauge Histogram Summary Histogram vs Summary 操作符 时序 4 种类型 Prometheus 时序数据分为 Coun ...

  2. for循环使用element的折叠面板遇到的问题-3

    需求:for循环渲染上去的表单怎么使用element的表单校验 之前做这个的时候,死活绑不上去,不知道哪里出了问题,后来解决办法是prop要注意用拼接,使它和索引的变量一致 <el-form-i ...

  3. PHP常用字符串函数总结

    PHP语言中的字符串函数也是一个比较易懂的知识.今天我们就为大家总结了将近12种PHP字符串函数,希望对又需要的朋友有所帮助,增加读者朋友的PHP知识库. 1.查找字符位置函数 strpos($str ...

  4. .Net Core Web Api使用模型验证验证参数合法性

    在接口开发过程中免不了要去验证参数的合法性,模型验证就是帮助我们去验证参数的合法性,我们可以在需要验证的model属性上加上Data Annotations特性后就会自动帮我们在action前去验证输 ...

  5. Redis 命令执行过程(上)

    今天我们来了解一下 Redis 命令执行的过程.在之前的文章中<当 Redis 发生高延迟时,到底发生了什么>我们曾简单的描述了一条命令的执行过程,本篇文章展示深入说明一下,加深读者对 R ...

  6. Spring Boot整合Servlet、Filter、Listener

    整合 Servlet   方式一:   编写 servlet package com.bjsxt.controller; import javax.servlet.ServletException; ...

  7. JavaEE基础(03):Http请求详解,握手挥手流程简介

    本文源码:GitHub·点这里 || GitEE·点这里 一.Http协议简介 1.概念说明 HTTP超文本传输协议,是用于从万维网服务器传输超文本到本地浏览器的传送协议,基于TCP/IP通信协议来传 ...

  8. cd732D Exams 二分

    题目:http://codeforces.com/problemset/problem/732/D 题意:给你n,m,n个数,m个数,n天,m场考试,给出n天每天能考第几场考试(如果是0则那天考不了试 ...

  9. Python3 函数小练习

    函数小练习 第一题 现有文件info.txt, 其内容如下: alpha male 18 1000 bravo male 28 2000 charlie female 38 3000 delta fe ...

  10. Python递归函数如何写?正确的Python递归函数用法

    前言本文的文字及图片来源于网络,仅供学习.交流使用,不具有任何商业用途,版权归原作者所有,如有问题请及时联系我们以作处理.在函数内部,可以调用其他函数.如果一个函数在内部调用自身本身,这个函数就是递归 ...