Linux下FFmpeg支持AAC和H264编解码动态库编译

1、依赖模块

下载编译yasm
Download - The Yasm Modular Assembler Project
tar xf yasm-1.3.0.tar.gz
cd yasm-1.3.0/
./configure --prefix=/usr/local/
make 
make install

下载编译nasm
Index of /pub/nasm/releasebuilds

tar xf nasm-2.14.02.tar.bz2
cd nasm-2.14.02/
./configure --prefix=/usr/local/
make 
make install

下载编译x264 
git clone https://code.videolan.org/videolan/x264/-/tree/stable 
cd x264/
./configure --prefix=/usr/local/ --enable-shared --enable-pic 
make 
make install

下载编译faac
Download opencore-amr from SourceForge.net

tar xf fdk-aac-2.0.1.tar.gz 
cd fdk-aac-2.0.1/ 
./autogen.sh 
autoreconf -fiv 
./configure --prefix=/usr/local/ 
make 
make install

下载zlib(png相关)

zlib Home Site

  1. ./configure 

  2. make

  3. make install

下载freetype(drawtext相关)

FreeType Downloads

  1. # 注意不要运行 autogen.sh

  2. ./configure --prefix=${BUILD_LIBS}

  3. make

  4. make install

2、linux下编译ffmpeg+x264+fdk-aac

1、install nasm yasm libx264 libfdk_aac libfreetype2 zlib 

guider link:https://blog.csdn.net/quantum7/article/details/104460115/

2、download ffmpeg by commd:git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

3、cd ffmpeg and do the command as follows

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH


./configure \
--extra-cflags="-fPIC" \
--enable-pic --enable-pthreads \
--enable-shared \
--enable-gpl --enable-nonfree \
--enable-libx264 \
--enable-libfdk_aac \
--enable-libfreetype \
--enable-zlib \
--disable-debug \
--disable-vaapi

4、find the libs  in  path as /usr/local/lib(headers in /usr/local/include)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值