mirror of
https://github.com/levogevo/ffmpeg-builder.git
synced 2026-01-15 19:06:17 +00:00
small changes
This commit is contained in:
@@ -208,14 +208,14 @@ get_build_conf() {
|
|||||||
local BUILDS_CONF='
|
local BUILDS_CONF='
|
||||||
ffmpeg 8.0 tar.gz https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n${ver}.${ext}
|
ffmpeg 8.0 tar.gz https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n${ver}.${ext}
|
||||||
|
|
||||||
libsvtav1_psy 3.0.2-A tar.gz https://github.com/BlueSwordM/svt-av1-psyex/archive/refs/tags/v${ver}.${ext} dovi_tool,hdr10plus_tool,cpuinfo
|
libsvtav1_psy 3.0.2-B tar.gz https://github.com/BlueSwordM/svt-av1-psyex/archive/refs/tags/v${ver}.${ext} dovi_tool,hdr10plus_tool,cpuinfo
|
||||||
hdr10plus_tool 1.7.1 tar.gz https://github.com/quietvoid/hdr10plus_tool/archive/refs/tags/${ver}.${ext}
|
hdr10plus_tool 1.7.1 tar.gz https://github.com/quietvoid/hdr10plus_tool/archive/refs/tags/${ver}.${ext}
|
||||||
dovi_tool 2.3.0 tar.gz https://github.com/quietvoid/dovi_tool/archive/refs/tags/${ver}.${ext}
|
dovi_tool 2.3.1 tar.gz https://github.com/quietvoid/dovi_tool/archive/refs/tags/${ver}.${ext}
|
||||||
cpuinfo latest git https://github.com/pytorch/cpuinfo/
|
cpuinfo latest git https://github.com/pytorch/cpuinfo/
|
||||||
|
|
||||||
libsvtav1 3.1.2 tar.gz https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${ver}/SVT-AV1-v${ver}.${ext}
|
libsvtav1 3.1.2 tar.gz https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${ver}/SVT-AV1-v${ver}.${ext}
|
||||||
librav1e 0.8.1 tar.gz https://github.com/xiph/rav1e/archive/refs/tags/v${ver}.${ext}
|
librav1e 0.8.1 tar.gz https://github.com/xiph/rav1e/archive/refs/tags/v${ver}.${ext}
|
||||||
libaom 3.12.1 tar.gz https://storage.googleapis.com/aom-releases/libaom-${ver}.${ext}
|
libaom 3.13.1 tar.gz https://storage.googleapis.com/aom-releases/libaom-${ver}.${ext}
|
||||||
libvmaf 3.0.0 tar.gz https://github.com/Netflix/vmaf/archive/refs/tags/v${ver}.${ext}
|
libvmaf 3.0.0 tar.gz https://github.com/Netflix/vmaf/archive/refs/tags/v${ver}.${ext}
|
||||||
libopus 1.5.2 tar.gz https://github.com/xiph/opus/releases/download/v${ver}/opus-${ver}.${ext}
|
libopus 1.5.2 tar.gz https://github.com/xiph/opus/releases/download/v${ver}/opus-${ver}.${ext}
|
||||||
libdav1d 1.5.1 tar.xz http://downloads.videolan.org/videolan/dav1d/${ver}/dav1d-${ver}.${ext}
|
libdav1d 1.5.1 tar.xz http://downloads.videolan.org/videolan/dav1d/${ver}/dav1d-${ver}.${ext}
|
||||||
@@ -587,7 +587,7 @@ build_libjpeg() {
|
|||||||
"${CMAKE_FLAGS[@]}" || return 1
|
"${CMAKE_FLAGS[@]}" || return 1
|
||||||
ccache make -j"${JOBS}" || return 1
|
ccache make -j"${JOBS}" || return 1
|
||||||
${SUDO_MODIFY} make -j"${JOBS}" install || return 1
|
${SUDO_MODIFY} make -j"${JOBS}" install || return 1
|
||||||
sanitize_sysroot_libs libjpeg || return 1
|
sanitize_sysroot_libs libjpeg libturbojpeg || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
build_libpng() {
|
build_libpng() {
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ video_enc_version() {
|
|||||||
if line_contains "${line}" 'libsvtav1_psy='; then
|
if line_contains "${line}" 'libsvtav1_psy='; then
|
||||||
echo "${line}"
|
echo "${line}"
|
||||||
break
|
break
|
||||||
|
elif line_contains "${line}" 'libsvtav1='; then
|
||||||
|
echo "${line}"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
done <<<"${output}"
|
done <<<"${output}"
|
||||||
}
|
}
|
||||||
@@ -105,13 +108,19 @@ encode_usage() {
|
|||||||
echo -e "\t[-v] Print relevant version info"
|
echo -e "\t[-v] Print relevant version info"
|
||||||
echo -e "\t[-s] use same container as input, default is mkv"
|
echo -e "\t[-s] use same container as input, default is mkv"
|
||||||
echo -e "\n\t[output] if unset, defaults to ${HOME}/"
|
echo -e "\n\t[output] if unset, defaults to ${HOME}/"
|
||||||
echo -e "\n\t[-I] system install at ${ENCODE_INSTALL_PATH}"
|
echo -e "\n\t[-u] update script (git pull at ${REPO_DIR})"
|
||||||
|
echo -e "\t[-I] system install at ${ENCODE_INSTALL_PATH}"
|
||||||
echo -e "\t[-U] uninstall from ${ENCODE_INSTALL_PATH}"
|
echo -e "\t[-U] uninstall from ${ENCODE_INSTALL_PATH}"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
encode_update() {
|
||||||
|
cd "${REPO_DIR}" || return 1
|
||||||
|
git pull
|
||||||
|
}
|
||||||
|
|
||||||
set_encode_opts() {
|
set_encode_opts() {
|
||||||
local opts='vi:pcsdg:P:C:IU'
|
local opts='vi:pcsdg:P:C:uIU'
|
||||||
local numOpts=${#opts}
|
local numOpts=${#opts}
|
||||||
# default values
|
# default values
|
||||||
PRESET=3
|
PRESET=3
|
||||||
@@ -132,6 +141,10 @@ set_encode_opts() {
|
|||||||
local OPTARG OPTIND
|
local OPTARG OPTIND
|
||||||
while getopts "${opts}" flag; do
|
while getopts "${opts}" flag; do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
|
u)
|
||||||
|
encode_update
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
I)
|
I)
|
||||||
echo_warn "attempting install"
|
echo_warn "attempting install"
|
||||||
sudo ln -sf "${SCRIPT_DIR}/encode.sh" \
|
sudo ln -sf "${SCRIPT_DIR}/encode.sh" \
|
||||||
|
|||||||
@@ -112,21 +112,6 @@ print_pkg_mgr() {
|
|||||||
echo "export req_pkgs=($(print_req_pkgs))"
|
echo "export req_pkgs=($(print_req_pkgs))"
|
||||||
}
|
}
|
||||||
|
|
||||||
print_os() {
|
|
||||||
if [[ -f /etc/os-release ]]; then
|
|
||||||
source /etc/os-release
|
|
||||||
local OS="${ID}"
|
|
||||||
if [[ ${VERSION_ID} != '' ]]; then
|
|
||||||
OS+="-${VERSION_ID}"
|
|
||||||
fi
|
|
||||||
echo "${OS}"
|
|
||||||
else
|
|
||||||
local os
|
|
||||||
os="$(uname -o)"
|
|
||||||
echo "${os,,}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_for_req_pkgs() {
|
check_for_req_pkgs() {
|
||||||
echo_info "checking for required packages"
|
echo_info "checking for required packages"
|
||||||
local missing_pkgs=()
|
local missing_pkgs=()
|
||||||
|
|||||||
22
lib/utils.sh
22
lib/utils.sh
@@ -194,6 +194,28 @@ is_darwin() {
|
|||||||
line_contains "$(print_os)" darwin
|
line_contains "$(print_os)" darwin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print_os() {
|
||||||
|
if [[ -n ${FB_OS} ]]; then
|
||||||
|
echo "${FB_OS}"
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
FB_OS=''
|
||||||
|
if [[ -f /etc/os-release ]]; then
|
||||||
|
source /etc/os-release
|
||||||
|
FB_OS="${ID}"
|
||||||
|
if [[ ${VERSION_ID} != '' ]]; then
|
||||||
|
FB_OS+="-${VERSION_ID}"
|
||||||
|
fi
|
||||||
|
if [[ ${FB_OS} == 'arch'* ]]; then
|
||||||
|
FB_OS=archlinux
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
FB_OS="$(uname -o)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${FB_OS,,}"
|
||||||
|
}
|
||||||
|
|
||||||
is_positive_integer() {
|
is_positive_integer() {
|
||||||
local input="$1"
|
local input="$1"
|
||||||
if [[ ${input} != ?(-)+([[:digit:]]) || ${input} -lt 0 ]]; then
|
if [[ ${input} != ?(-)+([[:digit:]]) || ${input} -lt 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user