前言:
.tar.gz包解压:tar -zvxf xxx.tar.gz
.tar.bz2包解压:bzip2 -d xxx.tar.bz2解压成.gz包。
1、lame
地址:http://sourceforge.net/project/showfiles.php?group_id=290&package_id=309#tar -vxf lame-3.99.5.tar.gz
#cd lame-3.99.5
#./configure --enable-shared
#make
#make install
#tar -vxf libogg-1.3.2.tar.gz
#cd libogg-1.3.2
#.configure
#make
#make install
#tar -vxf libvorbis-1.1.2.tar.gz
#cd libvorbis-1.1.2
./autogen.sh
出现错误!!
You must have autoconf installed to compile vorbis.
Download the appropriate package for your distribution,
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/
checking for automake...
You must have automake installed to compile vorbis.
Download the appropriate package for your system,
or get the source from one of the GNU ftp sites
listed in http://www.gnu.org/order/ftp.html
checking for libtool... nope.
You must have libtool installed to compile vorbis.
Download the appropriate package for your system,
or get the source from one of the GNU ftp sites
listed in http://www.gnu.org/order/ftp.html
很正常,将依赖的autoconf、automake、libtool安装起即可!
#yum install autoconf automake libtool
安装完毕之后,回来继续安装libvorbis 。
#./autogen.sh
#make
#make install
#tar -vxf xvidcore-1.1.3.tar.gz
#cd xvidcore-1.1.3/build/generic
#./configure
#make
#make install
#bzip2 -d last_x264.tar.bz2
#tar -vxf last_x264.tar
#cd x264-snapshot-20170615-2245/
#./configure
出现错误:
Found no assembler
Minimum version is nasm-2.13
If you really want to compile without asm, configure with --disable-asm.
提示没有安装nasm包,当然也可以在./configure --disable-asm,但是我们在这里将nasm包安装起来。
#tar -vxf nasm-2.13.01.tar.xz
#cd cd nasm-2.13.01
#./configure
#make && make install
安装完毕nasm之后,继续安装x264.
#cd ../x264-snapshot-20170615-2245/
#./configure
#make && make install
#tar -vxf tar -vxf libdca-0.0.5.tar.bz2
#cd libdca-0.0.5
#./configure
#make && make install
#tar -vxf a52dec-0.7.4.tar.gz
#cd a52dec-0.7.4
#./configure
#make && make install
#tar -vxf faad2-2.7.tar.gz
#cd faad2-2.7
#./configure
#make && make install
#./bootstrap
#./configure
#make
出现错误:
#make
#make install
#同上
#同上
12、ffmpeg
从ffmpeg官网:http://ffmpeg.org/download.html下载tar.bz2格式包。
安装方法:
#tar -jxvf ffmpeg-3.3.3.tar.bz2
#cd ffmpeg-3.3.3
#./configure --enable-shared --prefix=/usr/local/ffmpeg
#make (大概需要10分钟)
#make install
如果遇到类似错误:ffmpeg: error while loading shared libraries:libavdevice.so.55: cannot open shared object file: No such file or directory
没有相应的动态来接库,其实该链接库在我们安装ffmpeg目录下(默认在/usr/local/ffmepg/lib)
1、搜索该动态库
#find / -name libavdevice.so.55
将步骤1搜索到的结果添加到该文件当中。
3、执行ldconfig,使之生效。
也可以将ffmpeg目录加入到环境变量中,如下:
vi /etc/profile
加入以下内容:
FFMPEG=/user/local/ffmpeg
执行下列命令,使之生效:
source /etc/profile