1巨双、下載ffmpeg
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
2只壳、進(jìn)入目錄
cd ffmpeg
3涧卵、運(yùn)行安裝
./configure --enable-shared --prefix=/monchickey/ffmpeg
提示出錯(cuò):
yasm/nasm not found or too old. Use --disable-yasm for a crippled build
或者
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
4捧搞、按照提示需要安裝yasm
使用如下
yum install yasm
5、make
6健民、make install
7抒巢、測(cè)試是否成功,執(zhí)行ffmpeg -version
提示出錯(cuò):
-bash: ffmpeg: command not found
或者
ffmpeg: error while loading shared libraries: libavfilter.so.7: cannot open shared object file: No such file or directory
8.動(dòng)態(tài)鏈接庫 vi /etc/ld.so.conf
加入:/usr/local/ffmpeg/lib
執(zhí)行ldconfig
9.為Ffmpeg加入環(huán)境變量vi /etc/profile
加入以下內(nèi)容:FFMPEG=/usr/local/ffmpeg
PATH加入:$FFMPEG/bin
10.使修改立即生效source /etc/profile
如果依舊不行 ,則你安裝的方式可能是編譯安裝秉犹,也就是在安裝成功后又自動(dòng)生成編譯文件蛉谜,那么第8步需要你填寫編譯后的地址
先查找該命令文件的地址find / -name libavdevice.so.56 得到該文件的目錄地址,寫這個(gè)地址