在 openSUSE Leap 15.2 上编译安装带 AAC Decoder 的 ffmpeg

Author Avatar
黎明余光 7月9日
  • 在其它设备中阅读本文章

警告:以下命令均不保证规范性,可能存在但不限于:

  • 无用操作、重复操作等
  • 副作用未处理等

但是它能跑。

zypper addrepo http://packman.inode.at/suse/openSUSE_Leap_15.2/ packman-x86_64
# OR mirror by tsinghua / bfsu
# https://mirrors.[tuna.tsinghua|bfsu].edu.cn/packman/suse/openSUSE_Leap_15.2/

zypper in fdk-aac2-devel # AND some tools for compiling

zypper source-install ffmpeg-3 # for dependencies, ffmpeg-4 may work as well

cd /home/ffmpeg-src # where the source of ffmpeg is

./configure --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-libfdk-aac --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --enable-nonfree --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --disable-cuda --disable-cuvid --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --enable-encoders --enable-decoders
# most of it was copied from the binary delivered by openSUSE, with modifications to enable aac decoder

make install
$ ffmpeg -decoders | grep aac
ffmpeg version 4.3 Copyleft (c) 2000-2020 the FFmpeg developers
  built with gcc 7 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g' --disable-htmlpages --enable-libfdk-aac --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --enable-nonfree --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls --enable-ladspa --disable-cuda --disable-cuvid --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-vaapi --enable-vdpau --enable-muxers --enable-demuxers --enable-encoders --enable-decoders
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
 A....D aac                  AAC (Advanced Audio Coding)
 A....D aac_fixed            AAC (Advanced Audio Coding) (codec aac)
 A....D libfdk_aac           Fraunhofer FDK AAC (codec aac)
 A....D aac_latm             AAC LATM (Advanced Audio Coding LATM syntax)

PS: 猜猜我为什么要用 ffmpeg?

本文链接:https://blog.lim-light.com/archives/compile-ffmpeg-with-aac-decoder-on-opensuse-leap-15-2.html
本文采用 CC BY-NC-SA 3.0 CN 协议进行许可,阅读 相关说明