Forked from rafaelbiriba/install_ffmpeg_libfdkaac.sh
Last active
May 3, 2023 16:34
-
-
Save Iman/1e37f4d9b83d93a7cb2d3e91a1d107c8 to your computer and use it in GitHub Desktop.
Install FFmpeg with libfdk_aac support (For Ubuntu)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#Credit to @rafaelbiriba and @dustball | |
export BASE=/opt | |
echo "deb http://www.deb-multimedia.org stretch main non-free" >> /etc/apt/sources.list | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 5C808C2B65558117 | |
apt-get update | |
apt-get -y install build-essential autoconf automake cmake libtool git \ | |
wget build-essential ca-certificates \ | |
openssl libssl-dev yasm \ | |
libpcre3-dev libtheora-dev \ | |
libvorbis-dev libvpx-dev libfreetype6-dev \ | |
libgcr-3-dev autoconf automake build-essential \ | |
libass-dev libdrm-dev libfreetype6-dev libtheora-dev libtool \ | |
libvorbis-dev pkg-config texinfo zlib1g-dev \ | |
libfdk-aac-dev libmp3lame-dev yasm \ | |
libmp3lame-dev \ | |
lame checkinstall nasm yasm gnupg2 libass-dev libfreetype6-dev libmp3lame-dev libmp3lame-dev \ | |
libsdl2-dev p11-kit libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \ | |
libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev frei0r-plugins-dev gnutls-dev ladspa-sdk libcaca-dev \ | |
libcdio-paranoia-dev libcodec2-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgme-dev libgsm1-dev \ | |
libjack-dev libmodplug-dev libmp3lame-dev libopencore-amrnb-dev \ | |
libopencore-amrwb-dev libopenjp2-7-dev libopenmpt-dev libopus-dev libpulse-dev librsvg2-dev \ | |
librubberband-dev libshine-dev libsmbclient-dev libsnappy-dev libsoxr-dev libspeex-dev libssh-dev libtesseract-dev \ | |
libtheora-dev libtwolame-dev libv4l-dev libvo-amrwbenc-dev libvorbis-dev libvpx-dev libwavpack-dev libwebp-dev \ | |
libx264-dev libx265-dev libxvidcore-dev libxml2-dev libzmq3-dev libzvbi-dev liblilv-dev libopenal-dev opencl-dev \ | |
libjack-dev libavc1394-0 libavc1394-dev libiec61883-0 \ | |
libiec61883-dev libbluray-dev libbs2b-dev libbs2b0 libdc1394-22 libdc1394-22-dev | |
mkdir ~/ffmpeg_sources | |
cd ~/ffmpeg_sources | |
wget https://ffmpeg.org/releases/ffmpeg-4.2.1.tar.gz | |
tar xzvf ffmpeg-4.2.1.tar.gz | |
cd ffmpeg-4.2.1 | |
PKG_CONFIG_PATH="$BASE/ffmpeg_build/lib/pkgconfig" | |
export PKG_CONFIG_PATH | |
./configure --prefix="$BASE/ffmpeg_build" \ | |
--extra-cflags="-I$BASE/ffmpeg_build/include" --extra-ldflags="-L$BASE/ffmpeg_build/lib" \ | |
--bindir="$BASE/bin" --extra-libs="-ldl" --enable-gpl --enable-libass --enable-libfdk-aac \ | |
--enable-libmp3lame --enable-nonfree \ | |
--disable-static --disable-stripping --enable-avisynth \ | |
--enable-avresample --enable-chromaprint --enable-frei0r \ | |
--enable-gmp --enable-gnutls --enable-gpl --enable-ladspa \ | |
--enable-libass --enable-libbluray --enable-libbs2b \ | |
--enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdc1394 \ | |
--enable-libfontconfig --enable-libfreetype --enable-libfribidi \ | |
--enable-libgme --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame \ | |
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus \ | |
--enable-libpulse --enable-librsvg --enable-librtmp --enable-librubberband --enable-libshine --enable-libsnappy \ | |
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtesseract --enable-libtheora --enable-libtwolame \ | |
--enable-libv4l2 --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp \ | |
--enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 \ | |
--enable-nonfree --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-shared --enable-small \ | |
--enable-version3 --extra-version=0ubuntu0.2 --incdir=/usr/include/x86_64-linux-gnu --libdir=/usr/lib/x86_64-linux-gnu --toolchain=hardened | |
make -j8 | |
make install | |
cp ffmpeg /usr/bin/ | |
cp ffprobe /usr/bin/ | |
make distclean | |
hash -r | |
ffmpeg 2>&1 | head -n1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated to install on ubuntu using solutions provided by @rafaelbiriba and @dustball