FFmpeg installation tutorial based on centos 7

888u

Last update at :2024-05-23,Edit by888u

A few years ago, we shared how to install FFmpeg in the article about installing youtube-dl. However, considering that FFmpeg is widely used and is only useful when downloading YouTube videos, it was specially extracted as a separate article. Articles to share.

Considering that we only shared the compilation and installation method before, this consumes a lot of CPU resources. For example, we have been unable to install it on Oracle's AMD machine, so this tutorial also adds pre-compilation How to install the file. But regardless of the installation method, it is recommended that you use screen (http://www.138vps.com/vpsjc/933.html).


Install FFmpeg Method 1

1. Install 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

If: [make: *** No targets specified and no makefile found. Stop.] please see note 1


2. Install FFmpeg

cd /root
wget http://www.ffmpeg.org/releases/ffmpeg-3.3.3.tar.gz
tar -zxvf ffmpeg-3.3.3.tar.gz
cd ffmpeg-3.3.3
./configure
make
make install


After a long level, the compilation is finally completed, we can check the installed ffmpeg version

ffmpeg -version


Install FFmpeg method two

yum install gcc gcc-c++ autoconf automake
yun -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel

cd /root
wget https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-lgpl.tar.xz
tar -xvf ffmpeg-master-latest-linux64-lgpl.tar.xz

mkdir /usr/local/ffmpeg

cp ffmpeg-master-latest-linux64-lgpl/bin/ffmpeg /usr/local/ffmpeg/ffmpeg
cp ffmpeg-master-latest-linux64-lgpl/bin/ffplay /usr/local/ffmpeg/ffplay
cp ffmpeg-master-latest-linux64-lgpl/bin/ffprobe /usr/local/ffmpeg/ffprobe

ln -s /usr/local/ffmpeg/ffmpeg /usr/bin/ffmpeg
ln -s /usr/local/ffmpeg/ffplay /usr/bin/ffplay
ln -s /usr/local/ffmpeg/ffprobe /usr/bin/ffprobe


At this time, if you execute ffmpeg, it will usually report a GLIBC_2.18 not found If you get an error, just install it again

cd /root
wget http://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz
tar zxf glibc-2.18.tar.gz
cd glibc-2.18/
mkdir build
cd build/
../configure --prefix=/usr
make -j2
make install


We can check the installed ffmpeg version

ffmpeg --version 


Finally, delete the downloaded and decompressed junk files.


Remarks

1. Note 1 If there is a problem following the above operations, it may be that some dependencies are not available. Install it, the solution is as follows:

yum install gcc gcc-c++ autoconf automake
yun -y install zlib zlib-devel openssl openssl-devel pcre pcre-devel


Recommended site search: domain name transfer, high-defense US server, free domain name registration, US server rental, IP viewing, Hong Kong vps host rental, US virtual host, ASP free space application, foreign trade space, website space registration-free,

FFmpeg installation tutorial based on centos 7

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码