From 50a129eff31189d870f9333f90b199fa46f009f6 Mon Sep 17 00:00:00 2001 From: Michael Rienstra Date: Thu, 23 Mar 2023 18:33:17 -0700 Subject: [PATCH 1/4] add vp9 support --- build-ffmpeg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-ffmpeg b/build-ffmpeg index bc7b711c..4a432054 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -315,7 +315,6 @@ if build "x264" "5db6aa6"; then build_done "x264" "5db6aa6" fi -CONFIGURE_OPTIONS+=("--enable-libx264") ## ## FFmpeg @@ -355,6 +354,8 @@ download "${FFMPEG_URL}" "FFmpeg-release-$FFMPEG_VERSION.tar.gz" \ --enable-nonfree \ --enable-gpl \ + --enable-libx264 \ + --enable-libvpx \ \ --disable-xlib \ --disable-libxcb-shm \ From f03875b8b67395a963c3734c37ace4455a8d5922 Mon Sep 17 00:00:00 2001 From: Michael Rienstra Date: Fri, 24 Mar 2023 18:04:34 -0700 Subject: [PATCH 2/4] move `--enable-libx264` again --- build-ffmpeg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-ffmpeg b/build-ffmpeg index 4a432054..544cbb3a 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -314,6 +314,7 @@ if build "x264" "5db6aa6"; then execute make install-lib-static build_done "x264" "5db6aa6" + CONFIGURE_OPTIONS+=("--enable-libx264") fi ## @@ -354,7 +355,6 @@ download "${FFMPEG_URL}" "FFmpeg-release-$FFMPEG_VERSION.tar.gz" \ --enable-nonfree \ --enable-gpl \ - --enable-libx264 \ --enable-libvpx \ \ --disable-xlib \ From 8b6c58ea64e2ec27f5ef98b619198a4255323ded Mon Sep 17 00:00:00 2001 From: Michael Rienstra Date: Fri, 24 Mar 2023 18:12:19 -0700 Subject: [PATCH 3/4] undo last 2 moves of `--enable-libx264` --- build-ffmpeg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-ffmpeg b/build-ffmpeg index 544cbb3a..8d64a193 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -314,8 +314,8 @@ if build "x264" "5db6aa6"; then execute make install-lib-static build_done "x264" "5db6aa6" - CONFIGURE_OPTIONS+=("--enable-libx264") fi +CONFIGURE_OPTIONS+=("--enable-libx264") ## ## FFmpeg From 7f2a0e05a328772b96919241cd0a0e1052c9f078 Mon Sep 17 00:00:00 2001 From: Michael Rienstra Date: Fri, 31 Mar 2023 18:21:45 -0700 Subject: [PATCH 4/4] now building `libvpx` as per upstream: https://github.com/markus-perl/ffmpeg-build-script/blob/5ee28a2/build-ffmpeg#L570-L585 Tested locally, working as expected with LosslessCut. --- build-ffmpeg | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build-ffmpeg b/build-ffmpeg index 8d64a193..1c788791 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -317,6 +317,23 @@ if build "x264" "5db6aa6"; then fi CONFIGURE_OPTIONS+=("--enable-libx264") +if build "libvpx" "1.13.0"; then + download "https://github.com/webmproject/libvpx/archive/refs/tags/v1.13.0.tar.gz" "libvpx-1.13.0.tar.gz" + + if [[ "$OSTYPE" == "darwin"* ]]; then + echo "Applying Darwin patch" + sed "s/,--version-script//g" build/make/Makefile >build/make/Makefile.patched + sed "s/-Wl,--no-undefined -Wl,-soname/-Wl,-undefined,error -Wl,-install_name/g" build/make/Makefile.patched >build/make/Makefile + fi + + execute ./configure --prefix="${WORKSPACE}" --disable-unit-tests --disable-shared --disable-examples --as=yasm --enable-vp9-highbitdepth + execute make -j $MJOBS + execute make install + + build_done "libvpx" "1.13.0" +fi +CONFIGURE_OPTIONS+=("--enable-libvpx") + ## ## FFmpeg ## @@ -355,7 +372,6 @@ download "${FFMPEG_URL}" "FFmpeg-release-$FFMPEG_VERSION.tar.gz" \ --enable-nonfree \ --enable-gpl \ - --enable-libvpx \ \ --disable-xlib \ --disable-libxcb-shm \