如何将FFmpeg编译为静态文件(单个文件)

时间:2019-05-28 09:09:04

标签: linux ffmpeg ubuntu-18.04

我想将FFmpeg 4.1.3编译为静态文件或单个文件,编译后。它是共享二进制文件。

这就是我要做的

安装依赖项

apt-get -y install build-essential autoconf automake cmake libtool git \
checkinstall nasm yasm libass-dev libfreetype6-dev libsdl2-dev libtool \
libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev libchromaprint-dev \
frei0r-plugins-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 librtmp-dev libshine-dev \
libsmbclient-dev libsnappy-dev libsoxr-dev libspeex-dev libssh-dev \
libtesseract-dev libtheora-dev libtwolame-dev libv4l-dev libvo-amrwbenc-dev \
libvpx-dev libwavpack-dev libwebp-dev libx264-dev libx265-dev \
libxvidcore-dev libxml2-dev libzmq3-dev libzvbi-dev liblilv-dev libmysofa-dev \
libopenal-dev opencl-dev gnutls-dev libfdk-aac-devre

准备FFmpeg源代码

wget https://github.com/FFmpeg/FFmpeg/archive/n4.1.3.tar.gz
tar -xvf n4.1.3.tar.gz
cd FFmpeg-n4.1.3

构建

./configure --disable-shared --enable-static --enable-pthreads --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-filters --enable-openssl --enable-runtime-cpudetect --extra-version=Patrickz

然后制作并进行安装

编译已通过,但它是共享二进制文件。请提供任何解决方案或建议。

0 个答案:

没有答案