一,在git上下载源码
二,阅读./configure --help中的选项,将需要安装的内容写入配置中
三,下载所需要的库
yum -y install autoconf automake gcc-c++ git libtool make nasm pkgconfig zlib-devel
四,使用./configure 来配置
安装的方法:
https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
https://support.assetbank.co.uk/hc/en-gb/articles/115006491547-Installing-Ffmpeg-on-Linux
常见的错误及解决
https://blog.csdn.net/weixin_40385634/article/details/79601105?utm_source=blogxgwz5(可以参考)
https://java-er.com/blog/linux-installffmpeg/
注意:./myconfig.sh是我自己写的脚本(在github上可以看到)
1,gnutls错误
手动下载,gnutls 3.5.19可以,大于这个版本的有问题
wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.5/gnutls-3.5.19.tar.xz
xz -d gnutls-3.5.19.tar.xz
tar xf gnutls-3.5.19.tar
cd gnutls-3.5.19
export PKG_CONFIG_PATH = /usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
./configure --enable-shared
make
make install
安装这个gnutls需要nettle库,所以需要手动下载这个
wget https://ftp.gnu.org/gnu/nettle/nettle-3.1.1.tar.gz
tar zxf nettle-3.1.1.tar.gz cd nettle-3.1.1 ./configure –enable-shared make make install
2,
![](https://img.haomeiwen.com/i6152878/1ecd17966c081b36.png)
![](https://img.haomeiwen.com/i6152878/e9ccdf83a6711ec0.png)
3,
![](https://img.haomeiwen.com/i6152878/9b01e52acf16edd6.png)
![](https://img.haomeiwen.com/i6152878/b340d5d5aa7955e1.png)
4,
![](https://img.haomeiwen.com/i6152878/79d3d62f54bf51f2.png)
https://sourceforge.net/projects/libdc1394/files/libdc1394-2/
去官网下载libdc1394-2手动 编译
5 这个库下的比较困难
![](https://img.haomeiwen.com/i6152878/b6b008fa75b65d01.png)
解决:
1, yum install gsm-tools
如果还是不行,则在下载
2,yum install gsm-devel*
6.
![](https://img.haomeiwen.com/i6152878/4352e990102f426e.png)
git clone https://github.com/gypified/libmp3lame.git
执行 ./configure
make
make install
7,
![](https://img.haomeiwen.com/i6152878/740bb020bedc180f.png)
下载libopencore_amrnb: https://sourceforge.net/projects/opencore-amr/files/opencore-amr/
然后执行安装的三部
8,
![](https://img.haomeiwen.com/i6152878/984642baff449a0b.png)
未解决
9,
![](https://img.haomeiwen.com/i6152878/f22e1af569d2c7d6.png)
解决:
下载版本:https://github.com/cisco/openh264
然后
make ARCH=x86_64
make install
10,
![](https://img.haomeiwen.com/i6152878/a594b1d643d30f68.png)
解决:下载
https://github.com/uclouvain/openjpeg.git
然后:
yum install cmake
make
make install
11,
![](https://img.haomeiwen.com/i6152878/012236d15b873720.png)
解决:
https://ftp.osuosl.org/pub/xiph/releases/opus/
wget http://downloads.xiph.org/releases/opus/opus-1.2.1.tar.gz
然后:
安装三部曲
注意:如果pkg_config没有找到,需要手动的设置路径,见前面PKG_CONFIG_PATH路径的设置,如果设置好之后,库也存在还是不行,则要检查是否使用yum下载了低版本的,若是则删除
yum remove opus-1.0.2-6.el7.x86_64 opus-tools-0.1.6-1.el7.x86_64 opusfile-0.5-1.el7.x86_64 opus-devel-1.0.2-6.el7.x86_64 opusfile-devel-0.5-1.el7.x86_64
12
![](https://img.haomeiwen.com/i6152878/79a64bc9aca42ec6.png)
解决:
13
![](https://img.haomeiwen.com/i6152878/660bd89b8bba5979.png)
解决:
https://sourceforge.net/projects/soxr/files/
然后安装Install文件来安装
./go
cd Realse
make install
14
![](https://img.haomeiwen.com/i6152878/39a9673e9f3fab66.png)
解决:
https://xiph.org/downloads/
下载libspeex
三部曲,尽量动态链接 --enable-shared
15,
![](https://img.haomeiwen.com/i6152878/46da1e4ecdb217e1.png)
解决:
https://xiph.org/downloads/
下载 libspeex
然后三部曲
在配置的时候会有报错,缺少一个库libogg
yum install libogg* 下载就好
16,未解决
![](https://img.haomeiwen.com/i6152878/52a156ca6f830396.png)
解决:
下载 https://github.com/philips/libv4l.git
在 编译的过程中,会出现 videodev.h缺少的问题
下载 libv4l-devel 然后建立链接
sudo yum install libv4l-devel sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
然后三部曲
17
![](https://img.haomeiwen.com/i6152878/125074f6074d747a.png)
解决:
下载
git clone https://github.com/xiph/vorbis.git
执行:
./autogen.sh
./configure --enable-shared
make
make install
![](https://img.haomeiwen.com/i6152878/b2f29f3a5bbb5ad2.png)
18
![](https://img.haomeiwen.com/i6152878/89ad61ebefcb5484.png)
解决 :
下载
git clone --depth 1 http://git.videolan.org/git/x264
安装时需要下载 nasm
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.bz2
tar xjvf nasm-2.13.02.tar.bz2 cd nasm-2.13.02 ./autogen.sh ./configure --enable-shared
make
make install
之后继续安装x264
./configure -enable-shared
make
make install
19
![](https://img.haomeiwen.com/i6152878/eb69164aa2eb2eff.png)
解决:
下载
git clone https://github.com/videolan/x265.git
cd x265
cd bulid
cmake .../source
make
make install
20,
![](https://img.haomeiwen.com/i6152878/d36c6a0937827bc4.png)
解决:
下载:
https://www.xvid.com/download/
![](https://img.haomeiwen.com/i6152878/3898d878f9973498.png)
![](https://img.haomeiwen.com/i6152878/0c559d5b4069688b.png)
下载完之后
解压然后根据read文件来安装
21,
![](https://img.haomeiwen.com/i6152878/1432ad272df9b3a9.png)
解决:直接通过yum下载
yum install openal-soft openal-soft-devel
22,
![](https://img.haomeiwen.com/i6152878/1d41611f6d9bcee2.png)
解决:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/libcdio.html
(步骤)
下载:
http://git.savannah.gnu.org/cgit/libcdio.git
23,
![](https://img.haomeiwen.com/i6152878/bf8f633f917c3314.png)
解决:
下载: git clone https://github.com/enthought/bzip2-1.0.6.git
然后执行:
make
make install
24,
![](https://img.haomeiwen.com/i6152878/28ef7e4db64db52c.png)
解决:
yum install list libxcb*
然后就好 l
网友评论