CentOS7安装ffmpeg

首先在官网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

[[email protected] ~]$ cd /usr/ffmpeg/[[email protected] ffmpeg]$ tar -jxvf ffmpeg-4.2.1.tar.bz2

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

安装yasm命令:yum install yasm

[[email protected] ffmpeg]$ cd ffmpeg-4.2.1/
[[email protected] 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完毕后执行命令

[[email protected] 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;}

[[email protected] 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(安装)命令

[[email protected] 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命令打开文件

[[email protected] ffmpeg-4.2.1]$ vim /etc/ld.so.conf

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

     然后执行ldconfig命令使其生效

[[email protected] 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;}

配置环境变量

[[email protected] ffmpeg-4.2.1]$ vim /etc/profil

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

#set ffmpeg environment

PATH=$PATH:/usr/ffmpeg/bin

export PATH

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

[[email protected] 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;}

原文地址:https://www.cnblogs.com/wangrong1/p/11951856.html

时间: 2024-08-30 09:36:49

CentOS7安装ffmpeg的相关文章

Centos7安装ffmpeg和使用youtube-dl下载Youtube视频

FFmpeg是一套可以用来记录.转换数字音频.视频,并能将其转化为流的开源计算机程序.称之为音视频处理的神器都不过分.国内的暴风影音.QQ影音和格式工厂等等,都是FFMPEG换个马甲.国外的开源项目养活了多少国内产品. 安装ffmpeg CentOS 6和7安装方法是不一样的,下面分别说明: 安装前都需要先安装epel扩展源 yum -y install epel-release CentOS 6比较简单,安装yum源之后直接安装即可: su -c 'yum localinstall --nog

Centos7 安装配置OpenLdap服务及OpenLdap管理工具

我们上一篇文章中介绍了,Centos7+Openvpn使用Windows AD(LDAP)验证登录的配置介绍.说到LDAP服务,我们知道不止windows有,linux下也有,比如openldap,sambaLDAP服务,具体就不多介绍了,我们今天主要介绍一下Centos7 安装配置OpenLdap及Ldap管理工具等操作,为后面的Centos7+Openvpn+openldap验证登录做好基础. 我们首先配置一个指定源,我们源地址指向了阿里云的仓库源 cd /etc/yum.repos.d v

CentOS下yum安装FFmpeg

一.yum安装FFmpeg 1.    最偷懒的方式就是yum安装了,自动解决依赖.不过CentOS系统默认无FFmpeg源,企业版 Linux 附加软件包EPEL源也不包含,需要手动添加yum源配置/etc/yum.repos.d/dag.repo:   [dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag

CentOS7安装python-pip

python中的一个十分好用的包管理工具python-pip是我们使用python必不可少的一件工具.但是在CentOS7安装时候却遇到了一些小问题: [[email protected] magic]# yum install python-pip 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirrors.btte.ne

HP服务器 hp 360g5 centos7安装问题

HP服务器  hp 360g5 centos7安装问题 一 :启动盘无法识别硬盘 1.进入安装光盘,用上下键选择安装centos--Install Centos7(注意不可按Enter键),如图: 2.按Tab键,对安装进行额外配置,在屏幕最下方会显示如下字样: 3.在额外配置的命令行上添加配置: hpsa.hpsa_simple_mode=1 hpsa.hpsa_allow_any=1,如图所示: 二:安装完成后无法引导  出现情况:CentOS开机进度条卡死在100% 显示 firmware

Centos7安装mariadb galera cluster数据库集群 & 详解

#Galera集群特点 集群之间无延时,同步复制.而master-slave主从异步复制,存在延迟. active-active多主,集群内部服务器都是同时写,必须等所有集群内所有数据库都完成数据写入,才会反馈完成,所以不存在数据丢失的情况. 集群节点自动故障转移,如果集群中单个节点故障,失效节点会自动被清除. 扩展方便,只要将新的节点添加到集群,新节点自动复制数据. #Galera集群原理     #主要通过galera插件保证数据的一致性,该数据复制的过程是可认证的复制,原理如下: #解析

关于在ubuntu14.04下编译安装ffmpeg

首先下载ffmpeg-2.4.3.tar.bz2和last_x264.tar.bz2,可以见附件. cd ~ mkdir ffmpeg && cd ffmpeg libx264需要yasm,所以先安装yasm sudo apt-get install yasm 然后安装libx264 sudo aptitude -y install libx264-dev 把两个附件拷贝到当前路径下并解压 进入到x264-snapshot-20141130-2245(last_x264.tar.bz2解压

Centos7 安装MPlayer过程详解

使用自带的totem基本上都无法播放视频,各种格式都不支持,令人无语.想到了MPlayer,为了看片,决定编译安装,过程真的是折腾.如图是自带的Totem播放提示,安装了解码还是无法播放,反正要找其他播放器了,也没兴趣去管他是什么原因. 需要用到的东西在MPlayer官网上都有,就一个页面可以把所有东西都下载好http://mplayerhq.hu/design7/dload.html 0x01 准备工作 使用svn方式获取获取源码命令 svn checkout svn://svn.mplaye

CentOS7安装redis数据库及php-redis扩展

redis 首先把redis安装到服务器中 1.wget http://download.redis.io/redis-stable.tar.gz 下载redis源码 2. tar xvzf redis-stable.tar.gz 解压 3.cd redis-stable 4.make   make的时候可能出现问题,我的就出现了异常 异常一: make[2]: cc: Command not found 异常原因:没有安装gcc 解决方案:yum install gcc-c++ 异常二: zm