linux CentOS 7.9 安装 ffmpeg 6.0 教程【亲测成功】

查看当前系统版本
[root@demodemo ffmpeg-6.0]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:        7.9.2009
Codename:       Core


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

tar -zxvf ffmpeg-6.0.tar.gz 

cd ffmpeg-6.0/

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

make

sudo make install

vi /etc/profile
追加这一行
export PATH=$PATH:/usr/local/ffmpeg/bin

source /etc/profile

ffmpeg -version

[root@demodemo ffmpeg-6.0]# ffmpeg -version
ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration: --prefix=/usr/local/ffmpeg
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100

 

可能触发的错误 

编译FFMPEG时,出现了错误 nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.

这是因为 FFMPEG为了提高编译速度,使用了汇编指令,如MMX和SSE等。如果系统中没有yasm指令的话,就会该错误。

1)下载:wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz

2)解压:tar zxvf yasm-1.3.0.tar.gz

3)切换路径: cd yasm-1.3.0

4)执行配置: ./configure

5)编译:make

6)安装:make install

 

参考文章

https://blog.csdn.net/xiaowang_lj/article/details/133764754

https://blog.csdn.net/weixin_43135178/article/details/133762950 

posted @ 2024-03-30 18:24  露娜喵喵  阅读(2)  评论(0编辑  收藏  举报