使用libfdk-aac库编码(s16)
libfdk-aac输入的音频格式为s16编码后输出的音频格式为AV_SAMPLE_FMT_FLTP。
在ubuntu16下系统有包:

sudo apt-get install libfdk-aac-dev

在centos7下:
首选要卸载系统原有的fdk-aac,不然使用AV_SAMPLE_FMT_S16格式时会报错:

Specified sample format -1 is invalid or not supported

卸载:

sudo yum remove fdk-aac
git clone https://github.com/mstorsjo/fdk-aac.git

或:

https://sourceforge.net/projects/opencore-amr/files/fdk-aac/

然后编译:

./autogen.sh
./configure CFLAGS=-fPIC
make -j20
sudo make install

在编译ffmpeg时需要增加编译选项:

--enable-nonfree  --enable-libfdk-aac

编译x264,获取网站

http://www.videolan.org/developers/x264.html

打开下载的x264源码,执行

./configure --enable-shared --enable-static --disable-asm
make
make install

可以看一下x264都支持哪些参数配置

x264 -h
x264 --fullhelp
ffmpeg -h encoder=libx264

这些配置,ffmpeg都有对应的接口来配置。
编译ffmpeg命令:这里增加了h264编码和解码

cd ffmpeg-4.3
make uninstall
./configure --disable-x86asm --enable-shared --enable-libx264 --enable-swscale --enable-avresample --enable-gpl --enable-nonfree  --enable-libfdk-aac --enable-decoder=h264 --prefix=/usr/local
make clean
make -j20
make install

编码后可以查看ffmpeg对x264支持的参数配置,包括支持的像素格式:

ffmpeg -h encoder=libx264

Encoder libx264 [libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10]:
General capabilities: delay threads
Threading capabilities: auto
Supported pixel formats: yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p nv12 nv16 nv21 yuv420p10le yuv422p10le yuv444p10le nv20le
libx264 AVOptions:
-preset E…V… Set the encoding preset (cf. x264 --fullhelp) (default “medium”)
-tune E…V… Tune the encoding params (cf. x264 --fullhelp)
-profile E…V… Set profile restrictions (cf. x264 --fullhelp)
-fastfirstpass E…V… Use fast settings when encoding first pass (default true)
-level E…V… Specify level (as defined by Annex A)
-passlogfile E…V… Filename for 2 pass stats
-wpredp E…V… Weighted prediction for P-frames
-a53cc E…V… Use A53 Closed Captions (if available) (default true)
-x264opts E…V… x264 options
-crf E…V… Select the quality for constant quality mode (from -1 to FLT_MAX) (default -1)
-crf_max E…V… In CRF mode, prevents VBV from lowering quality beyond this point. (from -1 to FLT_MAX) (default -1)
-qp E…V… Constant quantization parameter rate control method (from -1 to INT_MAX) (default -1)
-aq-mode E…V… AQ method (from -1 to INT_MAX) (default -1)
none E…V…
variance E…V… Variance AQ (complexity mask)
autovariance E…V… Auto-variance AQ
autovariance-biased E…V… Auto-variance AQ with bias to dark scenes
-aq-strength E…V… AQ strength. Reduces blocking and blurring in flat and textured areas. (from -1 to FLT_MAX) (default -1)
-psy E…V… Use psychovisual optimizations. (default auto)
-psy-rd E…V… Strength of psychovisual optimization, in : format.
-rc-lookahead E…V… Number of frames to look ahead for frametype and ratecontrol (from -1 to INT_MAX) (default -1)
-weightb E…V… Weighted prediction for B-frames. (default auto)
-weightp E…V… Weighted prediction analysis method. (from -1 to INT_MAX) (default -1)
none E…V…
simple E…V…
smart E…V…
-ssim E…V… Calculate and print SSIM stats. (default auto)
-intra-refresh E…V… Use Periodic Intra Refresh instead of IDR frames. (default auto)
-bluray-compat E…V… Bluray compatibility workarounds. (default auto)
-b-bias E…V… Influences how often B-frames are used (from INT_MIN to INT_MAX) (default INT_MIN)
-b-pyramid E…V… Keep some B-frames as references. (from -1 to INT_MAX) (default -1)
none E…V…
strict E…V… Strictly hierarchical pyramid
normal E…V… Non-strict (not Blu-ray compatible)
-mixed-refs E…V… One reference per partition, as opposed to one reference per macroblock (default auto)
-8x8dct E…V… High profile 8x8 transform. (default auto)
-fast-pskip E…V… (default auto)
-aud E…V… Use access unit delimiters. (default auto)
-mbtree E…V… Use macroblock tree ratecontrol. (default auto)
-deblock E…V… Loop filter parameters, in alpha:beta form.
-cplxblur E…V… Reduce fluctuations in QP (before curve compression) (from -1 to FLT_MAX) (default -1)
-partitions E…V… A comma-separated list of partitions to consider. Possible values: p8x8, p4x4, b8x8, i8x8, i4x4, none, all
-direct-pred E…V… Direct MV prediction mode (from -1 to INT_MAX) (default -1)
none E…V…
spatial E…V…
temporal E…V…
auto E…V…
-slice-max-size E…V… Limit the size of each slice in bytes (from -1 to INT_MAX) (default -1)
-stats E…V… Filename for 2 pass stats
-nal-hrd E…V… Signal HRD information (requires vbv-bufsize; cbr not allowed in .mp4) (from -1 to INT_MAX) (default -1)
none E…V…
vbr E…V…
cbr E…V…
-avcintra-class E…V… AVC-Intra class 50/100/200 (from -1 to 200) (default -1)
-me_method E…V… Set motion estimation method (from -1 to 4) (default -1)
dia E…V…
hex E…V…
umh E…V…
esa E…V…
tesa E…V…
-motion-est E…V… Set motion estimation method (from -1 to 4) (default -1)
dia E…V…
hex E…V…
umh E…V…
esa E…V…
tesa E…V…
-forced-idr E…V… If forcing keyframes, force them as IDR frames. (default false)
-coder E…V… Coder type (from -1 to 1) (default default)
default E…V…
cavlc E…V…
cabac E…V…
vlc E…V…
ac E…V…
-b_strategy E…V… Strategy to choose between I/P/B-frames (from -1 to 2) (default -1)
-chromaoffset E…V… QP difference between chroma and luma (from INT_MIN to INT_MAX) (default -1)
-sc_threshold E…V… Scene change threshold (from INT_MIN to INT_MAX) (default -1)
-noise_reduction E…V… Noise reduction (from INT_MIN to INT_MAX) (default -1)
-x264-params E…V… Override the x264 configuration using a :-separated list of key=value parameters

哎呦喂ヾ(✿゚▽゚)ノ~路长馆小,雪轻帘薄,酒热乎,这位爷~您ヾ(✿゚▽゚)ノ~ 里面坐~
本公众号专注分享C++,ffmpeg,opencv等相关音视频知识
webrtc,udp,tcp,rtsp,rtmp,srt/nginx+rtmp等流媒体协议和服务器
同时也会有大厂音视频技术专家不定期直播分享…
国人开发流媒体srs服务器,及yangrtc(国人版的webrtc)协议新动向
偶尔分享下程序员梦呓碎碎念(๑•॒̀ ູ॒•́๑)啦啦啦
目前刚刚开通,接受读者的优质投稿…
鉴于国内音视频圈子小,起步晚,以致分享少,门槛高,特开通分享,一起扇动这阵风吧!
微信扫描下方二维码,关注公众号,赶快进入音视频开发者社区吧!

libfdk-aac和x264安装编译相关推荐

  1. linux 编译x264,linux 编译ffmpeg 支持x264, x265

    1. 前言 本教程涉及的ffmpeg, x264, x265 2. 环境依赖 2.1 删除系统中安装的ffmpeg等库 sudo apt-get --purge remove ffmpeg mplay ...

  2. Linux 下的 FFmpeg 安装编译环境配置总结

    1. 安装编译 官网下载地址:http://ffmpeg.org/ 官网安装指导 : http://trac.ffmpeg.org/wiki/CompilationGuide(并选择对应平台) 在安装 ...

  3. Qt——用在ARM板上的Mplayer(1.3.0,1.0rc4)安装编译步骤!还有,Mplayer背景抖动闪烁问题解答,终于来了!

    注意:若转载,请贴上链接"https://blog.csdn.net/qq_41042595/article/details/112308184",如若发现抄袭或未标明来源现象,都 ...

  4. (亲测可行)ubuntu16.04+Opencv3.4.3+opencv_contrib3.4.3安装编译全过程

    ubuntu16.04+Opencv3.4.3+Opencv_contrib3.4.3安装编译全过程 1.资源下载 opencv3.4.3+opencv_contrib3.4.3下载链接: https ...

  5. linux 服务器 安装网卡驱动,linux下安装编译网卡驱动的方法

    安装linux操作系统后发现没有网卡驱动,表现为 system → Administration → Network下Hardware列表为空. 以下为安装编译网卡驱动的过程,本人是菜鸟,以下是我从网 ...

  6. YOLOv3 Darknet安装编译与训练自己的数据集

    YOLOv3 Darknet安装编译与训练自己的数据集 文章目录: 1安装编译darknet与测试darknet 1.1 安装编译darknet 1.1.1 下载darknet安装包 1.1.2 编译 ...

  7. openwrt安装编译

    官网安装编译推荐: https://wiki.openwrt.org/doc/howto/buildroot.exigence https://wiki.openwrt.org/doc/howto/b ...

  8. linux glibc 编译安装,glibc的安装编译

    有些软件可能要求系统的 Glibc 高于某个版本才可以正常运行.如果您的 Glibc 低于要求的版本,为了运行这些软件,您就不得不升级您的 Glibc 了 .您可以寻找已经编译好的 rpm 包或者使用 ...

  9. linux下安装编译网卡驱动

    安装linux操作系统后发现没有网卡驱动,表现为 system → Administration → Network下Hardware列表为空. 以下为安装编译网卡驱动的过程,本人是菜鸟,以下是我从网 ...

最新文章

  1. python鱼眼图像识别_一种融合鱼眼图像与深度图像的动态环境视觉里程计方法与流程...
  2. 删除顺序表指定下标的元素
  3. JS实现表格Table动态添加删除行
  4. 今日小程序推荐:香蕉打码-二维码随意生成
  5. redis开启redis_Redis聚类
  6. java中接口文件创建_功能接口简介–在Java 8中重新创建的概念
  7. intent几种传值数组、对象、集合(Array,Object,List)
  8. HTML-盒子模型(padding-margining)-样式继承-浮动
  9. python线性回归实例_python线性回归示例
  10. 隐藏a标签seo_百度SEO网站整体优化方案 - 蜘蛛池博客
  11. java两人猜数字游戏,三人背后猜数字游戏
  12. PowerShell 查询 Excel记录
  13. STL中容器的介绍及分类
  14. Base64(电子邮件传输算法)
  15. D-star Lite算法及其动态路径规划实验研究
  16. CRM客户关系管理系统项目总结
  17. 给一个函数求导MATLAB,matlab求导
  18. android自定义view设置背景颜色,Android View的几种背景颜色设置
  19. 教你使用Python实现新个税计算器!
  20. python乒乓球比赛规则介绍_用英语介绍乒乓球的比赛规则

热门文章

  1. 秀场直播主播pk实现的四种技术架构
  2. 超牛图片无损放大工具
  3. pre小技巧:强制换行与横向滚动条[转]
  4. 如何打造一个自己的「天空之城」,密歇根大学博士后教您虚空造物、偷天换日!...
  5. java音频剪辑_Android实现mp3音频剪辑(带试听)
  6. 信号相干与量子比特(Qubit )的控制
  7. Kurento官网实例-Java
  8. 美团一面被Java并发“打败”后,闭关一月自信爆表再战美团
  9. 原生js实现导航条动画
  10. oracle锁表解锁