From 9cabd4e0c17539573739a23c25ebcd7cb2e0e896 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Fri, 12 Jun 2020 13:52:39 -0400 Subject: [PATCH 23/58] gnu: Add ccextractor. * gnu/packages/gstreamer.scm (ccextractor): New variable. --- gnu/packages/gstreamer.scm | 50 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 111d812c14..629136d916 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -30,6 +30,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) #:use-module (guix utils) @@ -63,6 +64,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) + #:use-module (gnu packages ocr) #:use-module (gnu packages perl) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages qt) @@ -81,6 +83,54 @@ #:use-module (gnu packages assembly) #:use-module (gnu packages xml)) +(define-public ccextractor + (package + (name "ccextractor") + (version "0.88") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/CCExtractor/ccextractor.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1sya45hvv4d46bk7541yimmafgvgyhkpsvwfz9kv6pm4yi1lz6nb")))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; No target + #:configure-flags + (list + "-DWITH_FFMPEG=ON" + "-DWITH_OCR=ON" + ;; XXX: NanoMsg libraries are not being detected. + ;; "-DWITH_SHARING=ON" + "-DWITH_HARDSUBX=ON") + #:phases + (modify-phases %standard-phases + ;; The package is in a sub-dir of this repo. + (add-after 'unpack 'chdir + (lambda _ + (chdir "src") + #t))))) + (native-inputs + `(("perl" ,perl) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper))) + (inputs + `(("ffmeg" ,ffmpeg-3.4) + ;; XXX: NanoMsg libraries are not being detected. + ;; ("libnanomsg" ,nanomsg) + ("ocr" ,tesseract-ocr) + ("zlib" ,zlib))) + (synopsis "Closed Caption Extractor") + (description "CCExtractor is a tool that analyzes video files and produces +independent subtitle files from the closed captions data. It is portable, small, +and very fast.") + (home-page "https://www.ccextractor.org/") + (license license:gpl2+))) + (define-public libvisual (package (name "libvisual") -- 2.26.2