FFmpeg-Builds/scripts.d/50-vidstab.sh

44 lines
949 B
Bash
Raw Normal View History

2020-09-06 20:21:23 +00:00
#!/bin/bash
2022-07-12 15:54:12 +00:00
SCRIPT_REPO="https://github.com/georgmartius/vid.stab.git"
2022-12-02 15:21:37 +00:00
SCRIPT_COMMIT="90c76aca2cb06c3ff6f7476a7cd6851b39436656"
2020-09-06 20:21:23 +00:00
ffbuild_enabled() {
2021-06-20 19:59:48 +00:00
[[ $VARIANT == lgpl* ]] && return -1
2020-09-06 20:21:23 +00:00
return 0
}
ffbuild_dockerbuild() {
git-mini-clone "$SCRIPT_REPO" "$SCRIPT_COMMIT_PINNED" vidstab
2020-09-06 20:21:23 +00:00
cd vidstab
mkdir build && cd build
2022-07-06 12:55:26 +00:00
local mycmake=(
-DBUILD_SHARED_LIBS=OFF
-DUSE_OMP=ON
)
2022-05-09 22:15:31 +00:00
if [[ $TARGET == *arm64 ]]; then
2022-07-06 12:55:26 +00:00
mycmake+=(
-DSSE2_FOUND=FALSE
)
2022-05-09 22:15:31 +00:00
fi
2022-07-06 12:55:26 +00:00
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" "${mycmake[@]}" ..
2020-09-06 20:21:23 +00:00
make -j$(nproc)
make install
if [[ $TARGET == linux* ]]; then
echo "Libs.private: -ldl" >> "$FFBUILD_PREFIX"/lib/pkgconfig/vidstab.pc
fi
2020-09-06 20:21:23 +00:00
}
ffbuild_configure() {
echo --enable-libvidstab
}
ffbuild_unconfigure() {
echo --disable-libvidstab
}