diff --git a/Formula/ffmpeg-encore.rb b/Formula/ffmpeg-encore.rb index c2d2c39..789afd1 100644 --- a/Formula/ffmpeg-encore.rb +++ b/Formula/ffmpeg-encore.rb @@ -9,6 +9,7 @@ class FfmpegEncore < Formula url "https://ffmpeg.org/releases/ffmpeg-7.0.tar.xz" sha256 "4426a94dd2c814945456600c8adfc402bee65ec14a70e8c531ec9a2cd651da7b" license "GPL-3.0-or-later" + revision 1 head "https://github.com/FFmpeg/FFmpeg.git", branch: "master" bottle do diff --git a/Formula/x264-encore.rb b/Formula/x264-encore.rb deleted file mode 100644 index 55296a5..0000000 --- a/Formula/x264-encore.rb +++ /dev/null @@ -1,71 +0,0 @@ -# SPDX-FileCopyrightText: 2009-present, Homebrew contributors -# SPDX-FileCopyrightText: 2021 Sveriges Television AB -# -# SPDX-License-Identifier: BSD-2-Clause -# - -class X264Encore < Formula - desc "H.264/AVC encoder" - homepage "https://www.videolan.org/developers/x264.html" - url "https://code.videolan.org/videolan/x264.git", - revision: "baee400fa9ced6f5481a728138fed6e867b0ff7f" - version "r3095" - license "GPL-2.0-only" - head "https://code.videolan.org/videolan/x264.git", branch: "master" - - bottle do - root_url "https://github.com/svt/homebrew-avtools/releases/download/x264-encore-r3095" - sha256 cellar: :any, big_sur: "5da638265fba821ba32610b123604fef909d924a6ebc67a17c206900541d426d" - sha256 cellar: :any_skip_relocation, x86_64_linux: "4887c0820dcafb7d3a5e6ea597d8df85a9fde23e38f394e0a61875aa26b11e8d" - end - - on_macos do - depends_on "gcc" if DevelopmentTools.clang_build_version <= 902 - end - - on_intel do - depends_on "nasm" => :build - end - - conflicts_with "x264", because: "it comes with the same binary" - - # https://code.videolan.org/videolan/x264/-/commit/b5bc5d69c580429ff716bafcd43655e855c31b02 - fails_with :clang do - build 902 - cause "Stack realignment requires newer Clang" - end - - def install - args = %W[ - --prefix=#{prefix} - --disable-lsmash - --disable-swscale - --disable-ffms - --enable-shared - --enable-static - --enable-strip - ] - - system "./configure", *args - system "make", "install" - end - - test do - assert_match version.to_s.delete("r"), shell_output("#{bin}/x264 --version").lines.first - (testpath/"test.c").write <<~EOS - #include - #include - - int main() - { - x264_picture_t pic; - x264_picture_init(&pic); - x264_picture_alloc(&pic, 1, 1, 1); - x264_picture_clean(&pic); - return 0; - } - EOS - system ENV.cc, "-L#{lib}", "test.c", "-lx264", "-o", "test" - system "./test" - end -end diff --git a/Formula/x265-encore.rb b/Formula/x265-encore.rb deleted file mode 100644 index d706d27..0000000 --- a/Formula/x265-encore.rb +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-FileCopyrightText: 2009-present, Homebrew contributors -# SPDX-FileCopyrightText: 2021 Sveriges Television AB -# -# SPDX-License-Identifier: BSD-2-Clause -# - -class X265Encore < Formula - desc "H.265/HEVC encoder" - homepage "https://bitbucket.org/multicoreware/x265_git" - url "https://bitbucket.org/multicoreware/x265_git/get/3.5.tar.gz" - sha256 "5ca3403c08de4716719575ec56c686b1eb55b078c0fe50a064dcf1ac20af1618" - license "GPL-2.0-only" - head "https://bitbucket.org/multicoreware/x265_git.git", branch: "master" - - bottle do - root_url "https://github.com/svt/homebrew-avtools/releases/download/x265-encore-3.5" - rebuild 1 - sha256 cellar: :any, big_sur: "2018cec29994465253ae75c02cd46783acc6c46e408c28e73505d51bdc71ee04" - sha256 cellar: :any_skip_relocation, x86_64_linux: "99e5ce43f1546c6463ec7274aa4a1b3e733b90bbcb0720594eaefa89d0791c6f" - end - - depends_on "cmake" => :build - depends_on "nasm" => :build if Hardware::CPU.intel? - - conflicts_with "x265", because: "it comes with the same binary" - - def install - # Build based off the script at ./build/linux/multilib.sh - args = std_cmake_args + %W[ - -DLINKED_10BIT=ON - -DLINKED_12BIT=ON - -DEXTRA_LINK_FLAGS=-L. - -DEXTRA_LIB=x265_main10.a;x265_main12.a - -DCMAKE_INSTALL_RPATH=#{rpath} - ] - high_bit_depth_args = std_cmake_args + %w[ - -DHIGH_BIT_DEPTH=ON -DEXPORT_C_API=OFF - -DENABLE_SHARED=OFF -DENABLE_CLI=OFF - ] - (buildpath/"8bit").mkpath - - mkdir "10bit" do - system "cmake", buildpath/"source", "-DENABLE_HDR10_PLUS=ON", *high_bit_depth_args - system "make" - mv "libx265.a", buildpath/"8bit/libx265_main10.a" - end - - mkdir "12bit" do - system "cmake", buildpath/"source", "-DMAIN12=ON", *high_bit_depth_args - system "make" - mv "libx265.a", buildpath/"8bit/libx265_main12.a" - end - - cd "8bit" do - system "cmake", buildpath/"source", *args - system "make" - mv "libx265.a", "libx265_main.a" - - if OS.mac? - system "libtool", "-static", "-o", "libx265.a", "libx265_main.a", - "libx265_main10.a", "libx265_main12.a" - else - system "ar", "cr", "libx265.a", "libx265_main.a", "libx265_main10.a", - "libx265_main12.a" - system "ranlib", "libx265.a" - end - - system "make", "install" - end - end - - test do - yuv_path = testpath/"raw.yuv" - x265_path = testpath/"x265.265" - yuv_path.binwrite "\xCO\xFF\xEE" * 3200 - system bin/"x265", "--input-res", "80x80", "--fps", "1", yuv_path, x265_path - header = "AAAAAUABDAH//w==" - assert_equal header.unpack("m"), [x265_path.read(10)] - end -end diff --git a/README.md b/README.md index 1f6c663..56a44b4 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,6 @@ Currently this tap holds minor modifications of existing core Homebrew formulas * ffmpeg-encore - FFmpeg tailored for encore, with x264, x265, [ffmpg-filter-proxy support](https://github.com/svt/ffmpeg-filter-proxy) * libsrf-proxy-filter - [Subtitle Rendering Format filter](https://github.com/svt/ffmpeg-filter-proxy-filters) * libsvg-proxy-filter - [SVG filter](https://github.com/svt/ffmpeg-filter-proxy-filters) -* x264-encore - [x264 encoder lib](https://code.videolan.org/videolan/x264.git) -* x265-encore - [x265 encoder lib](https://bitbucket.org/multicoreware/x265_git) ## Dependencies @@ -118,7 +116,7 @@ See [CONTRIBUTING](CONTRIBUTING.adoc) - The Formulas in this project is all released under the [BSD 2-clause "Simplified" License](LICENSE) -- The Formulas FFmpeg-encore, x264-encore, x264-encore is built on Brew formulas, formulas themselves released under the same BSD-2 License, but also Copyright 2009-present, Homebrew contributors besides SVT. +- The Formula FFmpeg-encore is built on Brew formulas, formulas themselves released under the same BSD-2 License, but also Copyright 2009-present, Homebrew contributors besides SVT. ### NOTE ABOUT THE FFMPEG FORMULA BUILD BINARY RESULTS