class Vcs < Formula desc "Creates video contact sheets (previews) of videos" homepage "https://p.outlyer.net/vcs/" url "https://p.outlyer.net/vcs/files/vcs-1.13.2.tar.gz" sha256 "fc2a2b3994d5ffb5d87fb3dceaa5f6855aca7a89c58533b12fd11b8fb5b623af" bottle do cellar :any_skip_relocation rebuild 2 sha256 "761c580c6fda988dc80fa4c8bb258d66e73686ff97e412db9a07887c8aa5b9a8" => :catalina sha256 "e515c6075a49bce03427fc1daf665796567e42c2e8c7e3b71a97159cb9152161" => :mojave sha256 "d9b28e21e6a073749b6420104ba6ea6966c3d4833a69d6dbc60683a14564b82a" => :high_sierra sha256 "d9b28e21e6a073749b6420104ba6ea6966c3d4833a69d6dbc60683a14564b82a" => :sierra end depends_on "ffmpeg" depends_on "ghostscript" depends_on "gnu-getopt" depends_on "imagemagick" def install inreplace "vcs", "declare GETOPT=getopt", "declare GETOPT=#{Formula["gnu-getopt"].opt_bin}/getopt" system "make", "install", "prefix=#{prefix}" end test do system Formula["ffmpeg"].bin/"ffmpeg", "-f", "rawvideo", "-s", "hd720", "-pix_fmt", "yuv420p", "-r", "30", "-t", "5", "-i", "/dev/zero", testpath/"video.mp4" assert_predicate testpath/"video.mp4", :exist? system bin/"vcs", "-i", "1", "-o", testpath/"sheet.png", testpath/"video.mp4" assert_predicate testpath/"sheet.png", :exist? end end