代码拉取完成,页面将自动刷新
#!/bin/bash
#scriptdir=$(realpath $(basename $(realpath $0)))
scriptdir=$(realpath $(dirname $0))
rootdir=${scriptdir}
thirddir=${rootdir}/third-part
echo "rootdir=${rootdir}"
echo "thirddir=${thirddir}"
# x264: compile and install
build_x264() {
echo -e "\n\n----> build_x264 \n\n"
cd ${thirddir}
tar xvf x264.tar.gz -C tmp
cd tmp/x264
./configure --enable-shared
make
sudo make install
}
# ffmpeg: compile and install
build_ffmpeg() {
echo -e "\n\n----> build_ffmpeg \n\n"
cd ${thirddir}
tar jxvf ffmpeg-snapshot.tar.bz2 -C tmp/
cd tmp/ffmpeg
./configure --enable-pic --enable-pthreads --enable-shared --disable-static --disable-network --enable-pthreads --enable-ffmpeg --disable-ffplay --enable-ffprobe --enable-gpl --enable-nonfree --enable-libx264 --enable-encoder=libx264 --enable-decoder=h264 --disable-debug
make
sudo make install
}
cd ${thirddir}
mkdir -p tmp
build_x264
build_ffmpeg
echo -e "\n\n----> build finish. it need to open QtCreator to install. \n"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。