This commit is contained in:
2026-01-06 17:48:09 -06:00
parent 3c3fc6164c
commit 691d0f857a
5 changed files with 49 additions and 9 deletions

View File

@@ -33,11 +33,12 @@ The default enabled libraries included in the `ffmpeg` build are:
- libx265 - libx265
- libwebp - libwebp
- libvpx - libvpx
- libass
- libvorbis - libvorbis
- libmp3lame - libmp3lame
The user-overridable compile options are: The user-overridable compile options are:
- `ENABLE`: configure what ffmpeg enables (default: libsvtav1_psy libopus libdav1d libaom librav1e libvmaf libx264 libx265 libwebp libvpx libvorbis libmp3lame) - `ENABLE`: configure what ffmpeg enables (default: libsvtav1_psy libopus libdav1d libaom librav1e libvmaf libx264 libx265 libwebp libvpx libass libvorbis libmp3lame)
- `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot (default: local) - `PREFIX`: prefix to install to, default is local install in ./gitignore/sysroot (default: local)
- `STATIC`: static or shared build (default: ON) - `STATIC`: static or shared build (default: ON)
- `LTO`: enable link time optimization (default: ON) - `LTO`: enable link time optimization (default: ON)
@@ -80,7 +81,7 @@ encode -i input [options] output
[-v] print relevant version info [-v] print relevant version info
[-s] use same container as input, default is convert to mkv [-s] use same container as input, default is convert to mkv
[output] if unset, defaults to ${HOME}/av1-input-file-name.mkv [output] if unset, defaults to ${PWD}/av1-input-file-name.mkv
[-u] update script (git pull ffmpeg-builder) [-u] update script (git pull ffmpeg-builder)
[-I] system install at /usr/local/bin/encode [-I] system install at /usr/local/bin/encode
@@ -109,6 +110,7 @@ Example usage:
## Estimate film-grain ## Estimate film-grain
```bash ```bash
efg -i input [options] efg -i input [options]
[-P NUM] set preset (default: 10)
[-l NUM] low value (default: 0) [-l NUM] low value (default: 0)
[-s NUM] step value (default: 1) [-s NUM] step value (default: 1)
[-h NUM] high value (default: 30) [-h NUM] high value (default: 30)

View File

@@ -367,8 +367,13 @@ glad 2.0.8 tar.gz https://github.com/Dav1dde/glad/archive
libx265 4.1 tar.gz https://bitbucket.org/multicoreware/x265_git/downloads/x265_${ver}.${ext} libnuma libx265 4.1 tar.gz https://bitbucket.org/multicoreware/x265_git/downloads/x265_${ver}.${ext} libnuma
libnuma 2.0.19 tar.gz https://github.com/numactl/numactl/archive/refs/tags/v${ver}.${ext} libnuma 2.0.19 tar.gz https://github.com/numactl/numactl/archive/refs/tags/v${ver}.${ext}
'
libass 0.17.4 tar.xz https://github.com/libass/libass/releases/download/${ver}/libass-${ver}.${ext} freetype,fribidi,libunibreak
freetype 2.14.1 tar.xz https://downloads.sourceforge.net/freetype/freetype-${ver}.${ext} libpng,harfbuzz
harfbuzz 12.3.0 tar.xz https://github.com/harfbuzz/harfbuzz/releases/download/${ver}/harfbuzz-${ver}.${ext}
fribidi 1.0.16 tar.xz https://github.com/fribidi/fribidi/releases/download/v${ver}/fribidi-${ver}.${ext}
libunibreak 6.1 tar.gz https://github.com/adah1972/libunibreak/releases/download/libunibreak_${ver//./_}/libunibreak-${ver}.${ext}
'
local supported_builds=() local supported_builds=()
unset ver ext url deps extractedDir unset ver ext url deps extractedDir
while read -r line; do while read -r line; do
@@ -452,7 +457,7 @@ download_release() {
continue continue
fi fi
test -d "${alreadyBuilt}" || continue test -d "${alreadyBuilt}" || continue
echo_warn "removing wrong version: ${extractedDir}" echo_warn "removing wrong version: ${alreadyBuilt}"
rm -rf "${alreadyBuilt}" rm -rf "${alreadyBuilt}"
done done
@@ -916,8 +921,8 @@ build_libplacebo() {
# copy downloaded glad release as "submodule" # copy downloaded glad release as "submodule"
( (
installDir="${PWD}/3rdparty/glad" installDir="${PWD}/3rdparty/glad"
get_build_conf glad get_build_conf glad || exit 1
CLEAN=OFF download_release CLEAN=OFF download_release || exit 1
cd "${extractedDir}" || exit 1 cd "${extractedDir}" || exit 1
cp -r ./* "${installDir}" cp -r ./* "${installDir}"
) || return 1 ) || return 1
@@ -959,6 +964,31 @@ build_libvmaf() {
fi fi
} }
build_libass() {
meta_meson_build || return 1
sanitize_sysroot_libs libass || return 1
}
build_freetype() {
meta_meson_build \
-D tests=disabled || return 1
sanitize_sysroot_libs libfreetype || return 1
}
build_harfbuzz() {
meta_meson_build \
-D tests=disabled \
-D docs=disabled \
-D doc_tests=false || return 1
sanitize_sysroot_libs libharfbuzz || return 1
}
build_fribidi() {
meta_meson_build \
-D tests=false || return 1
sanitize_sysroot_libs libfribidi || return 1
}
### PYTHON ### ### PYTHON ###
build_glad() { build_glad() {
true true
@@ -1047,6 +1077,11 @@ build_libnuma() {
sanitize_sysroot_libs libnuma || return 1 sanitize_sysroot_libs libnuma || return 1
} }
build_libunibreak() {
meta_configure_build || return 1
sanitize_sysroot_libs libunibreak || return 1
}
add_project_versioning_to_ffmpeg() { add_project_versioning_to_ffmpeg() {
# embed this project's enables/versions # embed this project's enables/versions
# into ffmpeg with FFMPEG_BUILDER_INFO # into ffmpeg with FFMPEG_BUILDER_INFO

View File

@@ -41,6 +41,7 @@ libx264 \
libx265 \ libx265 \
libwebp \ libwebp \
libvpx \ libvpx \
libass \
libvorbis \ libvorbis \
libmp3lame\ libmp3lame\
" "

View File

@@ -154,7 +154,7 @@ encode_usage() {
echo -e "\t[-d] enable dolby vision (default: ${DV_TOGGLE})" echo -e "\t[-d] enable dolby vision (default: ${DV_TOGGLE})"
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 convert to mkv" echo -e "\t[-s] use same container as input, default is convert to mkv"
echo -e "\n\t[output] if unset, defaults to \${HOME}/av1-input-file-name.mkv" echo -e "\n\t[output] if unset, defaults to \${PWD}/av1-input-file-name.mkv"
echo -e "\n\t[-u] update script (git pull ffmpeg-builder)" echo -e "\n\t[-u] update script (git pull ffmpeg-builder)"
echo -e "\t[-I] system install at ${ENCODE_INSTALL_PATH}" 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}"
@@ -271,7 +271,7 @@ set_encode_opts() {
OUTPUT="${*: -1}" OUTPUT="${*: -1}"
else else
local basename="$(bash_basename "${INPUT}")" local basename="$(bash_basename "${INPUT}")"
OUTPUT="${HOME}/av1-${basename}" OUTPUT="${PWD}/av1-${basename}"
fi fi
# use same container for output # use same container for output

View File

@@ -68,11 +68,13 @@ print_req_pkgs() {
build-essential libssl-dev gobjc++ build-essential libssl-dev gobjc++
mawk libc6-dev mediainfo ninja-build mawk libc6-dev mediainfo ninja-build
mkvtoolnix libgtest-dev lld mkvtoolnix libgtest-dev lld
libfontconfig-dev libglib2.0-dev
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
local pacman_pkgs=( local pacman_pkgs=(
"${common_linux_pkgs[@]}" base-devel "${common_linux_pkgs[@]}" base-devel
python-pipx ninja lld mkvtoolnix-cli python-pipx ninja lld mkvtoolnix-cli
glib2-devel
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
local dnf_pkgs=( local dnf_pkgs=(
@@ -82,7 +84,7 @@ print_req_pkgs() {
libstdc++-static libstdc++-devel libstdc++-static libstdc++-devel
llvm-cmake-utils llvm-devel llvm-cmake-utils llvm-devel
llvm-static compiler-rt lld llvm-static compiler-rt lld
mkvtoolnix mkvtoolnix glib2-static
) )
# shellcheck disable=SC2034 # shellcheck disable=SC2034
local pkg_pkgs=( local pkg_pkgs=(