ffmpeg 安装过程

这篇博客详细介绍了ffmpeg的安装过程,包括各个组件如faac、libogg、libtheora、vo-aacenc、xvidcore、Amr和libopus、libvpx的安装步骤,为3gp转换提供支持。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先可以了解下ffmpeg的介绍

视频格式:点击打开链接

安装工具:点击打开链接

1、faac

./bootstrap
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install
编译遇到错误
解决如下:
编译FAAC-1.28时遇到错误:
mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
解决方法:
从123行开始修改此文件mpeg4ip.h,到129行结束。
修改前:
#ifdef __cplusplus
extern "C" {
#endif
char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif

修改后:

#ifdef __cplusplus
extern "C++" {
#endif
const char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif

2、安装lame
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install

3、安装libogg

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install

4、安装libtheora

这一步需要ogg所以吧ogg的路径加上即可安装

./configure --with-ogg=/root/tasks/tools/new_ffmpeg/ffmpeg/ --with-ogg-libraries=/root/tasks/tools/new_ffmpeg/ffmpeg/lib --with-ogg-includes=/root/tasks/tools/new_ffmpeg/ffmpeg/include  --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install
5、安装libvorbis

xz -d  libvorbis-1.3.5.tar.xz
tar -xvf libvorbis-1.3.5.tar
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install

6、安装vo-aacenc

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install

7、安装xvidcore

cd  /xvidcore/build/generic
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install
8、安装yasm

chmod +x YASM-VERSION-GEN.sh
sh autogen.sh
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared
make && make install
check检查安装好否
yasm  --version 
9、安装x264
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared --enable-static --enable-pic
make && make install
10、安装libraw1394

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
11、安装libraw1394

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
12、安装libfreetype

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
13 安装fribidi

tar -jxvf fribidi-0.10.4.tar.bz2 
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
14.安装libxml
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
15、安装fonconfig

export PKG_CONFIG_PATH=/root/tasks/tools/new_ffmpeg/ffmpeg/lib/pkgconfig:$PKG_CONFIG_PATH
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg  --enable-shared 
make && make install
16安装libspeex

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared --enable-sse
make && make install
17、安装twolame
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install

18、安装Amr(for 3gp conversion): 

#wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
# tar -zxvf opencore-amr-0.1.3.tar.gz
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
19、安装libfdk_aac
sh autogen.sh
./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install

20、安装libopus

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install

21、安装libvpx

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-shared 
make && make install
22、安装ffmpeg

./configure --prefix=/root/tasks/tools/new_ffmpeg/ffmpeg --enable-static --enable-gpl --enable-version3 --enable-libfdk-aac --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-pic  --enable-libdc1394 --enable-libass --enable-pic  --enable-libtwolame --enable-libspeex --enable-libopus --enable-libvpx  --enable-libopencore-amrnb --enable-libopencore-amrwb  --enable-libfreetype
make && make install







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值