linux centos7 ffmpeg、x265、x264、fdk-aac编译

6 篇文章 0 订阅
2 篇文章 0 订阅

linux centos7 ffmpeg、x265、x264、fdk-aac编译

fdk-aac编译

fdk-aac下载链接

[root@localhost fdk-aac]# ./autogen.sh
[root@localhost fdk-aac]# ./configure
[root@localhost fdk-aac]# make -j4
[root@localhost fdk-aac]# make install

在/usr/local/lib/pkgconfig/
pc文件中包含编译后的fdk-aac 信息 ffmpeg编译时会读取此

  1 prefix=/usr/local
  2 exec_prefix=${prefix}
  3 libdir=${exec_prefix}/lib
  4 includedir=${prefix}/include/ffmpeg
  5
  6 Name: Fraunhofer FDK AAC Codec Library
  7 Description: AAC codec library
  8 Version: 2.0.2
  9 Libs: -L${libdir} -lfdk-aac
 10 Libs.private: -lm
 11 Cflags: -I${includedir}

x265编译

x265下载链接
进入build/linux目录下

[root@localhost linux]# pwd
/home/source/x265_git/build/linux
[root@localhost linux]#./make-Makefiles.bash
[root@localhost linux]# ./configure
[root@localhost linux]# make -j4
[root@localhost linux]# make install

生成/usr/local/lib/pkgconfig/x265.pc

x264编译

x264下载链接
进入x264目录

[root@localhost x264]# ./configure
[root@localhost x264]# make -j4
[root@localhost x264]# make install

生成/usr/local/lib/pkgconfig/x264.pc


ffmpeg编译

ffmpeg下载链接

[root@localhost FFmpeg-release-5.0]# ./configure --enable-gpl --enable-version3 --enable-static --enable-pthreads --enable-shared --enable-libx264 --enable-libx265 --enable-libfdk_aac --enable-openssl --enable-nonfree --enable-protocols

若配置错误请查看ffbuild/config.log 缺失三方库文件查看 x264.pc、x264pc、fdk-aac.pc
缺失bits/c++config.h 根目录下查找find . -name config.h
在/etc/profile中配置

export CPLUS_INCLUDE_PATH=:/opt/rh/devtoolset-11/root/usr/include/c++/11/x86_64-redhat-linux:/usr/include/
export C_INCLUDE_PATH=:/opt/rh/devtoolset-11/root/usr/include/c++/11/x86_64-redhat-linux:/usr/include/

保存退出

[root@localhost]# source /etc/profile
[root@localhost]# FFmpeg-release-5.0]# ./configure --enable-gpl --enable-version3 --enable-static --enable-pthreads --enable-shared --enable-libx264 --enable-libx265 --enable-libfdk_aac --enable-openssl --enable-nonfree --enable-protocols
[root@localhost]# make -j4
[root@localhost]# make install

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值