ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

centos 安装 ffmpeg

2022-02-23 15:31:16  阅读:172  来源: 互联网

标签:ffmpeg tar conf make centos yasm install 安装


centos 安装ffmpeg

1 下载ffmpeg 安装包

下载 ffmpeg-4.1.tar.xz

https://johnvansickle.com/ffmpeg/release-source/

2 解压

tar xvJf ffmpeg-4.1.tar.xz



3、安装gcc和yasm编译器

sudo yum install gcc

sudo yum install yasm


4、指定安装目录/usr/local/ffmpeg

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



4.2 如果上步有错误:

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.0.tar.gz #解压

③cd yasm-1.3.0 #进入目录 
④./configure #配置 
⑤make && make install #编译安装


5 执行 make (非常久)

make

6 执行 make install (安装)

make install

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

1 vim /etc/ld.so.conf
1 输入以下内容
    include ld.so.conf.d/*.conf
    /usr/local/ffmpeg/lib/

8.使修改的文件/etc/ld.so.conf生效

ldconfig

9 查看版本

./ffmpeg -version

10、配置环境变量

vim ~/.bashrc

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

11、使环境变量生效

source ~/.bashrc

12、查看ffmpeg版本

ffmpeg -version

标签:ffmpeg,tar,conf,make,centos,yasm,install,安装
来源: https://blog.csdn.net/weixin_44591652/article/details/123091212

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有