ffmpeg源码1(安装)
一,在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,


3,


4,

https://sourceforge.net/projects/libdc1394/files/libdc1394-2/
去官网下载libdc1394-2手动 编译
5 这个库下的比较困难

解决:
1, yum install gsm-tools
如果还是不行,则在下载
2,yum install gsm-devel*
6.

git clone https://github.com/gypified/libmp3lame.git
执行 ./configure
make
make install
7,

下载libopencore_amrnb: https://sourceforge.net/projects/opencore-amr/files/opencore-amr/
然后执行安装的三部
8,

未解决
9,

解决:
下载版本:https://github.com/cisco/openh264
然后
make ARCH=x86_64
make install
10,

解决:下载
https://github.com/uclouvain/openjpeg.git
然后:
yum install cmake
make
make install
11,

解决:
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

解决:
13

解决:
https://sourceforge.net/projects/soxr/files/
然后安装Install文件来安装
./go
cd Realse
make install
14

解决:
https://xiph.org/downloads/
下载libspeex
三部曲,尽量动态链接 --enable-shared
15,

解决:
https://xiph.org/downloads/
下载 libspeex
然后三部曲
在配置的时候会有报错,缺少一个库libogg
yum install libogg* 下载就好
16,未解决

解决:
下载 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

解决:
下载
git clone https://github.com/xiph/vorbis.git
执行:
./autogen.sh
./configure --enable-shared
make
make install

18

解决 :
下载
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

解决:
下载
git clone https://github.com/videolan/x265.git
cd x265
cd bulid
cmake .../source
make
make install
20,

解决:
下载:
https://www.xvid.com/download/


下载完之后
解压然后根据read文件来安装
21,

解决:直接通过yum下载
yum install openal-soft openal-soft-devel
22,

解决:
http://www.linuxfromscratch.org/blfs/view/svn/multimedia/libcdio.html
(步骤)
下载:
http://git.savannah.gnu.org/cgit/libcdio.git
23,

解决:
下载: git clone https://github.com/enthought/bzip2-1.0.6.git
然后执行:
make
make install
24,

解决:
yum install list libxcb*
然后就好 l