1 官網(wǎng)下載安裝包
http://ffmpeg.org/download.html#releases
2 解壓源碼包進(jìn)行安裝
tar xvJf ffmpeg-4.4.tar.xz
cd ffmpeg-4.4
#指定安裝目錄
./configure --enable-shared --enable-openssl --prefix=/usr/local/ffmpeg
需要先安裝gcc和yasm(yum/apt-get install -y gcc yasm)
如果使用 ubuntu 系統(tǒng),需要在編譯安裝前執(zhí)行 (apt-get install -y libssl-dev)
執(zhí)行make
make && make install
3 修改配置文件
3.1 修改ld.so.conf
vim /etc/ld.so.conf
#寫(xiě)入一下內(nèi)容
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/
輸入ldconfig使修改生效。
3.2 配置環(huán)境變量
vim /etc/profile
#添加配置信息
PATH=$PATH:/usr/local/ffmpeg/bin
export PATH
#使配置生效
source /etc/profile
3.3 查看是否配置成功
ffmpeg -version

php-ffmpeg地址:https://github.com/PHP-FFMpeg/PHP-FFMpeg
ffmpeg手冊(cè):https://ffmpeg.org/ffmpeg.html