summary refs log tree commit diff
path: root/gnu/packages/gstreamer.scm
diff options
context:
space:
mode:
authorRaghav Gururajan <raghavgururajan@disroot.org>2020-06-29 01:58:27 -0400
committerDanny Milosavljevic <dannym@scratchpost.org>2020-08-18 22:54:12 +0200
commit2aa73609d6dd324ee298aa3fdfdeafb9e58efd73 (patch)
tree5a1406b19a28850fc8feaec22706386cda746dbe /gnu/packages/gstreamer.scm
parent9eafab1838decaae38e61ab556597baab0553b56 (diff)
downloadguix-2aa73609d6dd324ee298aa3fdfdeafb9e58efd73.tar.gz
gnu: Add ccextractor.
* gnu/packages/gstreamer.scm (ccextractor): New variable.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/packages/gstreamer.scm')
-rw-r--r--gnu/packages/gstreamer.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
index a50d86a014..0d2ede7407 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)
@@ -56,6 +57,7 @@
   #:use-module (gnu packages mp3)
   #: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)
@@ -74,6 +76,58 @@
   #: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"
+        "-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))
+         (add-after 'chdir 'fix-build-errors
+           (lambda _
+             (substitute* "CMakeLists.txt"
+               (("libnanomsg")
+                "nanomsg"))
+             #t)))))
+    (native-inputs
+     `(("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)))
+    (inputs
+     `(("ffmeg" ,ffmpeg-3.4)
+       ("nanomsg" ,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")