-
Notifications
You must be signed in to change notification settings - Fork 15
/
ffmpeg-iina.rb
95 lines (83 loc) · 2.43 KB
/
ffmpeg-iina.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Last check with upstream: 042325cd385225e055e2ccf676abe0072cd38dcb <ffmpeg: update 6.0_2 bottle>
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/f/ffmpeg.rb
class FfmpegIina < Formula
desc "Play, record, convert, and stream audio and video"
homepage "https://ffmpeg.org/"
url "https://ffmpeg.org/releases/ffmpeg-7.0.1.tar.xz"
sha256 "bce9eeb0f17ef8982390b1f37711a61b4290dc8c2a0c1a37b5857e85bfb0e4ff"
head "https://github.com/FFmpeg/FFmpeg.git", branch: "master"
keg_only <<EOS
it is intended to only be used for building IINA.
This formula is not recommended for daily use and has no binaraies (ffmpeg, ffplay etc.)
EOS
depends_on "pkg-config" => :build
depends_on "dav1d"
depends_on "fontconfig"
depends_on "freetype"
depends_on "frei0r"
depends_on "gnutls"
depends_on "libass"
depends_on "libbluray"
depends_on "libsoxr"
depends_on "libvidstab"
depends_on "rubberband"
depends_on "snappy"
depends_on "speex"
# depends_on "tesseract"
depends_on "xz"
depends_on "zeromq"
depends_on "zimg"
depends_on "jpeg-xl" # for JPEG-XL format screenshot
depends_on "webp" # for webp format screenshot
on_intel do
depends_on "nasm" => :build
end
uses_from_macos "bzip2"
uses_from_macos "libxml2"
uses_from_macos "zlib"
def install
args = %W[
--prefix=#{prefix}
--enable-shared
--enable-pthreads
--enable-version3
--host-cflags=#{ENV.cflags}
--host-ldflags=#{ENV.ldflags}
--enable-ffplay
--enable-gnutls
--enable-gpl
--enable-libbluray
--enable-libdav1d
--enable-librubberband
--enable-libsnappy
--disable-libtesseract
--enable-libvidstab
--enable-libxml2
--enable-libfontconfig
--enable-libfreetype
--enable-frei0r
--enable-libass
--enable-libspeex
--enable-libsoxr
--enable-videotoolbox
--enable-audiotoolbox
--enable-libzmq
--enable-libzimg
--enable-libwebp
--enable-libjxl
--disable-libjack
--disable-indev=jack
--disable-programs
]
args << "--enable-neon" if Hardware::CPU.arm?
args << "--cc=#{ENV.cc}" if Hardware::CPU.intel?
system "./configure", *args
system "make", "install"
end
test do
# Create an example mp4 file
mp4out = testpath/"video.mp4"
system bin/"ffmpeg", "-filter_complex", "testsrc=rate=1:duration=1", mp4out
assert_predicate mp4out, :exist?
end
end