代码拉取完成,页面将自动刷新
#!/bin/bash
apt update
apt upgrade
apt install git
echo -e "\e[1;31m正在从gitee加速镜像获取ffmpeg...\e[0m"
git clone https://gitee.com/mirrors/ffmpeg.git ~/ffmpeg
apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev
echo -e "\e[1;31m正在安装依赖...\e[0m"
apt install make -y
apt-get install libnuma-dev -y
apt install aptitude -y
aptitude install build-essential -y
aptitude install yasm nasm -y
apt-get install libgmp3-dev -y
apt install pkg-config -y
apt install gnutls-bin -y
aptitude install libaom-dev -y
aptitude install libass-dev -y
aptitude install libbluray-dev -y
aptitude install libfdk-aac-dev -y
aptitude install libmp3lame-dev -y
aptitude install libopencore-amrnb-dev -y
aptitude install libopencore-amrwb-dev -y
aptitude install libopenmpt-dev -y
aptitude install libopus-dev -y
aptitude install libshine-dev -y
aptitude install libsnappy-dev -y
aptitude install libsoxr-dev -y
aptitude install libspeex-dev -y
aptitude install libtheora-dev -y
aptitude install libtwolame-dev -y
aptitude install libvo-amrwbenc-dev -y
aptitude install llibvpx-dev -y
aptitude install libwavpack-dev -y
aptitude install libwebp-dev -y
aptitude install libx264-dev -y
aptitude install libx265-dev -y
aptitude install libxvidcore-dev -y
aptitude install liblzma-dev -y
echo -e "\e[1;31m安装依赖库完成!开始配置安装...(配置时间较长,如没有文字显示,请耐心等待)\e[0m"
cd $HOME/ffmpeg
./configure --prefix=/usr/local --pkg-config-flags=--static --enable-gpl --enable-version3 --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-lzma --enable-zlib --enable-gmp --enable-libvorbis --enable-libvo-amrwbenc --enable-libspeex --enable-libxvid --enable-libaom --enable-libopenmpt --enable-libfdk-aac --enable-nonfree
echo -e "\e[1;31m配置安装完成!开始编译和安装(可能需要较长时间)\e[0m"
cd $HOME/ffmpeg
make
cd $HOME/ffmpeg
make install
cd $HOME/ffmpeg
mv ffmpeg /usr/local/bin/
mv ffprobe /usr/local/bin/
echo -e "\e[1;31m编译和安装完成!\e[0m"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。