1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/pkuvcl-buildFFmpegAVS2

В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
build_linux.sh 2.9 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
luofl Отправлено 23.09.2018 04:59 2fc3dfa
#!/bin/sh
# FFmpegAVS2 build script
#
# Copyright (c) 2018~ Yiqun Xu
# 2018~ Falei Luo
# 2018~ Huiwen Ren
# 2018~ VCL, NELVT, PKU
touch build.log
echo "BUILD TIME: $(date +%Y-%m-%d)" > build.log
if test -t 1 && which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
if test -n "$ncolors" && test $ncolors -ge 8; then
msg_color=$(tput setaf 3)$(tput bold)
error_color=$(tput setaf 1)$(tput bold)
reset_color=$(tput sgr0)
fi
ncols=$(tput cols)
fi
checkfail()
{
echo "$error_color""ERROR: $@ failed.$reset_color"
exit 1
}
printLog()
{
echo ">>> $@" >> $build_dir/build.log
$@ >> $build_dir/build.log
}
###############################
# Sync repositories
###############################
checkGitSources()
{
echo ">>>>"
echo " -------------------------------------------------------------------------- "
echo " dir: $1 "
echo " url: $2 "
echo " -------------------------------------------------------------------------- "
if [ ! -d $1 ]; then
echo "$1 source not found, cloning"
git clone $2 $1 || checkfail "$1 source: git clone failed"
else
echo "$1 source found!"
fi
echo "synchronizing sources..."
curdir=$(pwd)
cd $1
git pull
cd $curdir
echo "success..."
}
###############################
## install pkg-config
#### for ubuntu
###############################
# sudo apt-get install pkg-config
# current dir
build_dir=`pwd`
# sync sources
checkGitSources FFmpegAVS2 https://github.com/pkuvcl/FFmpegAVS2.git
checkGitSources xavs2 https://github.com/pkuvcl/xavs2.git
checkGitSources davs2 https://github.com/pkuvcl/davs2.git
###############################
# build xavs2 encoder
###############################
echo "$msg_color[Start building xAVS2 encoder]$reset_color"
cd xavs2/build/linux # xAVS2 directory
printLog ./configure --prefix=$build_dir/avs2_lib \
--enable-pic \
--enable-shared
printLog make -j8 || checkfail "make failed"
printLog make install
cd -
###############################
# build davs2 decoder
###############################
echo "$msg_color[Start building dAVS2 decoder]$reset_color"
cd davs2/build/linux # dAVS2 directory
printLog ./configure --prefix=$build_dir/avs2_lib \
--enable-pic \
--enable-shared
printLog make -j8 || checkfail "make failed"
printLog make install
cd -
###############################
# build ffmpeg decoder
###############################
echo "$msg_color[Start building FFmpegAVS2]$reset_color"
cd FFmpegAVS2
git checkout avs2
export PKG_CONFIG_PATH=$build_dir/avs2_lib/lib/pkgconfig
printLog ./configure \
--prefix=$build_dir/avs2_lib \
--enable-gpl \
--enable-libxavs2 \
--enable-libdavs2 \
--enable-shared \
--enable-static
printLog make -j8 || checkfail "make failed"
printLog make install
# tar -czvf ./ffmpeg_lib.tar.gz ./install
cd -
echo "Everything done!"

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/pkuvcl-buildFFmpegAVS2.git
git@api.gitlife.ru:oschina-mirror/pkuvcl-buildFFmpegAVS2.git
oschina-mirror
pkuvcl-buildFFmpegAVS2
pkuvcl-buildFFmpegAVS2
master