ffmpeg部署
环境准备
pkg_list=( \
autoconf \
automake \
build-essential \
cmake \
git-core \
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 \
libasound2-dev \
libgl1-mesa-dev \
libglew-dev \
libglm-dev \
mercurial \
libnuma-dev \
nasm \
yasm \
libsdl2-2.0 \
libsdl2-dev \
)
apt -y install ${pkg_list[*]}
下包
mkdir /opt/source_package
wget https://ffmpeg.org/releases/ffmpeg-6.0.tar.xz -O /opt/source_package
cd /opt/source_package && tar -xvf ffmpeg-6.0.tar.xz && cd ffmpeg && ./configure --enable-shared --prefix=/usr/local/ffmpeg
make -j2 && make install
环境变量
touch /etc/profile.d/ffmpeg_env.sh
echo -e "export PATH="/usr/local/ffmpeg/bin:\${PATH}"\nexport LD_LIBRARY_PATH="/usr/local/ffmpeg/lib"" >/etc/profile.d/ffmpeg_env.sh
source /etc/profile
测试
#检查版本
ffmpeg -v
# 转码
ffmpeg -i \[诸神字幕组\]\[凉宫春日的消失\]\[MOVIE\]\[1920x1080\]\[x264_FLAC_5.1ch\]\[中日双语字幕\]\[BDRip\].mkv -vcodec copy -f mp4 /usr/local/nginx/html/nginx_media/disappear_Haruki.mp4
标签:ffmpeg,dev,source,usr,&&,ubuntu,local,最速
From: https://www.cnblogs.com/hukenis/p/17737537.html