FFMPEG第三方库编译

来源:互联网 发布:sai mac下下来打不开 编辑:程序博客网 时间:2024/06/02 14:12

FFMPEG第三方库编译

 

      FFMPEG拥有出众的编解码能力,但是有些却需要第三方库支持。下面将介绍如何编译这些第三方库(for arm),在我的另一篇blog关于ffmpeg编译中引用了这些库。

 

lame:
# tar -zxvf lame-3.97.tar.gz
# cd lame-3.97
# ./configure --prefix=/usr/local/ffextra --host=arm-linux CC=arm-linux-gcc --enable-shared
# make
# make install(ubuntu下注意用户与权限之间关系,否则会出错)

 

faad:
# tar -zxvf faad2-2.7.tar.gz
# cd faad2-2.7
# autoreconf -vif
# ./configure --prefix=/usr/local/ffextra --host=arm-linux CC=arm-linux-gcc --with-mpeg4ip --enable-shared
# make  (报错)
# make install

 

error: unrecognized command line option "-iquote"
../frontend/main.c的第34行的#define off_t__int64的那一行注释

../libfaad/Makefile中226行
AM_CFLAGS = -iquote $(top_srcdir)/include改为
AM_CFLAGS = -I $(top_srcdir)/include

 

faad采用浮点运算,在arm难以流畅的运行,针对arm进行优化:
/faad/libfaad/common.h中定义:#defined FIXED_POINT(效果不明显)

 

faac:
# tar -zxvf faac-1.28.tar.gz
# cd faac-1.28
# chmod +x bootstrap
# ./bootstrap
# ./configure --prefix=/usr/local/ffextra --host=arm-linux CC=arm-linux-gcc --with-mp4v2 --enable-shared
# make
# make install

 

amrnb:
编译时需要linux工具:patch unzip wget(Ubuntu下采用apt-get安装)
make报错:/.libs/libamrnb.so: undefined reference to `rpl_malloc',在configure时加上

ac_cv_func_malloc_0_nonnull=yes

# tar -zxvf amrnb-6.1.0.4.tar.bz2
# cd amrnb-6.1.0.4
# ./configure --prefix=/usr/local/ffextra --host=arm-linux CC=arm-linux-gcc --enable-shared

ac_cv_func_malloc_0_nonnull=yes
# make
# make install

 

amrwb-7.0.0.1:同amrnb一样.

原创粉丝点击