Skip to content

Commit

Permalink
Enable decklink (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
retokromer authored May 30, 2019
1 parent e3f585e commit 0cfbe95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Formula/ffmpeg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Ffmpeg < Formula
bottle :unneeded

option "with-chromaprint", "Enable the Chromaprint audio fingerprinting library"
option "with-decklink", "Enable DeckLink support"
option "with-fdk-aac", "Enable the Fraunhofer FDK AAC library"
option "with-librsvg", "Enable SVG files as inputs via librsvg"
option "with-libsoxr", "Enable the soxr resample library"
Expand Down Expand Up @@ -145,7 +146,16 @@ def install
args << "--enable-libzmq" if build.with? "zeromq"
args << "--enable-openssl" if build.with? "openssl"

# packages that need additional license options
# These librares are GPL-incompatible, and require ffmpeg be built with
# the "--enable-nonfree" flag, which produces unredistributable libraries
args << "--enable-nonfree" if build.with?("decklink") || build.with?("fdk-aac") || build.with?("openssl")

if build.with? "decklink"
args << "--enable-decklink"
args << "--extra-cflags=-I#{HOMEBREW_PREFIX}/include"
args << "--extra-ldflags=-L#{HOMEBREW_PREFIX}/include"
end

if build.with?("opencore-amr") || build.with?("libvmaf")
args << "--enable-version3"
end
Expand All @@ -161,10 +171,6 @@ def install
args << "--extra-cflags=" + `pkg-config --cflags libopenjp2`.chomp
end

# These librares are GPL-incompatible, and require ffmpeg be built with
# the "--enable-nonfree" flag, which produces unredistributable libraries
args << "--enable-nonfree" if build.with?("fdk-aac") || build.with?("openssl")

system "./configure", *args
system "make", "install"

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ This formula features the following libraries:
| `x265` || x265 HEVC encoder |
| `xz` || XZ compression support |
| `chromaprint` | | Chromaprint audio fingerprinting library |
| `decklink` | | Enable DeckLink support |
| `fdk-aac` | | Fraunhofer FDK AAC library |
| `game-music-emu` | | game-music-emu support |
| `libbluray` | | libbluray support |
Expand Down

0 comments on commit 0cfbe95

Please sign in to comment.