1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
16 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
22 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
23 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
24 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
30 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
31 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
32 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
34 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
35 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
36 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
37 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
38 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
39 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
40 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
41 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
42 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
43 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
44 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
45 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
47 ;;; This file is part of GNU Guix.
49 ;;; GNU Guix is free software; you can redistribute it and/or modify it
50 ;;; under the terms of the GNU General Public License as published by
51 ;;; the Free Software Foundation; either version 3 of the License, or (at
52 ;;; your option) any later version.
54 ;;; GNU Guix is distributed in the hope that it will be useful, but
55 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
56 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57 ;;; GNU General Public License for more details.
59 ;;; You should have received a copy of the GNU General Public License
60 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62 (define-module (gnu packages video)
63 #:use-module (ice-9 match)
64 #:use-module (srfi srfi-1)
65 #:use-module (srfi srfi-26)
66 #:use-module ((guix licenses) #:prefix license:)
67 #:use-module (guix utils)
68 #:use-module (guix packages)
69 #:use-module (guix download)
70 #:use-module (guix git-download)
71 #:use-module (guix svn-download)
72 #:use-module (guix build-system cargo)
73 #:use-module (guix build-system cmake)
74 #:use-module (guix build-system copy)
75 #:use-module (guix build-system gnu)
76 #:use-module (guix build-system glib-or-gtk)
77 #:use-module (guix build-system meson)
78 #:use-module (guix build-system perl)
79 #:use-module (guix build-system python)
80 #:use-module (guix build-system waf)
81 #:use-module (guix build-system trivial)
82 #:use-module (gnu packages)
83 #:use-module (gnu packages algebra)
84 #:use-module (gnu packages assembly)
85 #:use-module (gnu packages audio)
86 #:use-module (gnu packages autotools)
87 #:use-module (gnu packages avahi)
88 #:use-module (gnu packages backup)
89 #:use-module (gnu packages base)
90 #:use-module (gnu packages bison)
91 #:use-module (gnu packages boost)
92 #:use-module (gnu packages cdrom)
93 #:use-module (gnu packages check)
94 #:use-module (gnu packages cmake)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages cpp)
97 #:use-module (gnu packages crates-io)
98 #:use-module (gnu packages curl)
99 #:use-module (gnu packages dejagnu)
100 #:use-module (gnu packages dns)
101 #:use-module (gnu packages docbook)
102 #:use-module (gnu packages documentation)
103 #:use-module (gnu packages elf)
104 #:use-module (gnu packages file)
105 #:use-module (gnu packages flex)
106 #:use-module (gnu packages fonts)
107 #:use-module (gnu packages fontutils)
108 #:use-module (gnu packages freedesktop)
109 #:use-module (gnu packages fribidi)
110 #:use-module (gnu packages gettext)
111 #:use-module (gnu packages ghostscript)
112 #:use-module (gnu packages gl)
113 #:use-module (gnu packages glib)
114 #:use-module (gnu packages guile)
115 #:use-module (gnu packages gnome)
116 #:use-module (gnu packages gnunet)
117 #:use-module (gnu packages gnupg)
118 #:use-module (gnu packages gstreamer)
119 #:use-module (gnu packages gtk)
120 #:use-module (gnu packages image)
121 #:use-module (gnu packages imagemagick)
122 #:use-module (gnu packages iso-codes)
123 #:use-module (gnu packages libidn)
124 #:use-module (gnu packages libreoffice)
125 #:use-module (gnu packages libusb)
126 #:use-module (gnu packages linux)
127 #:use-module (gnu packages lua)
128 #:use-module (gnu packages m4)
129 #:use-module (gnu packages man)
130 #:use-module (gnu packages markup)
131 #:use-module (gnu packages maths)
132 #:use-module (gnu packages mp3)
133 #:use-module (gnu packages ncurses)
134 #:use-module (gnu packages networking)
135 #:use-module (gnu packages ocr)
136 #:use-module (gnu packages perl)
137 #:use-module (gnu packages perl-check)
138 #:use-module (gnu packages pkg-config)
139 #:use-module (gnu packages popt)
140 #:use-module (gnu packages pretty-print)
141 #:use-module (gnu packages protobuf)
142 #:use-module (gnu packages pulseaudio)
143 #:use-module (gnu packages python)
144 #:use-module (gnu packages python-crypto)
145 #:use-module (gnu packages python-web)
146 #:use-module (gnu packages python-xyz)
147 #:use-module (gnu packages qt)
148 #:use-module (gnu packages rdesktop)
149 #:use-module (gnu packages ruby)
150 #:use-module (gnu packages rust-apps)
151 #:use-module (gnu packages samba)
152 #:use-module (gnu packages sdl)
153 #:use-module (gnu packages serialization)
154 #:use-module (gnu packages shells)
155 #:use-module (gnu packages sqlite)
156 #:use-module (gnu packages ssh)
157 #:use-module (gnu packages swig)
158 #:use-module (gnu packages texinfo)
159 #:use-module (gnu packages textutils)
160 #:use-module (gnu packages tls)
161 #:use-module (gnu packages time)
162 #:use-module (gnu packages upnp)
163 #:use-module (gnu packages version-control)
164 #:use-module (gnu packages vulkan)
165 #:use-module (gnu packages web)
166 #:use-module (gnu packages webkit)
167 #:use-module (gnu packages wxwidgets)
168 #:use-module (gnu packages xdisorg)
169 #:use-module (gnu packages xiph)
170 #:use-module (gnu packages xml)
171 #:use-module (gnu packages xorg))
179 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
180 version "/" name "-" version ".tar.gz"))
183 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
184 (build-system gnu-build-system)
186 `(("makeinfo" ,texinfo)))
188 `(("ncurses" ,ncurses)))
191 (modify-phases %standard-phases
193 (lambda* (#:key build inputs outputs #:allow-other-keys)
194 ;; This old `configure' script doesn't support
195 ;; variables passed as arguments.
196 (let ((out (assoc-ref outputs "out"))
197 (ncurses (assoc-ref inputs "ncurses")))
198 (setenv "CONFIG_SHELL" (which "bash"))
199 (invoke "./configure"
200 (string-append "--prefix=" out)
201 (string-append "--build=" build)
202 ;; The ancient config.guess is unable to
203 ;; guess the host triplet on mips64el.
204 ,@(if (string=? "mips64el-linux"
206 '("--host=mips64el-unknown-linux-gnu")
208 ;; The same is also true with aarch64.
209 ,@(if (string=? "aarch64-linux"
211 '("--host=aarch64-unknown-linux-gnu")
213 (string-append "--with-ncurses="
215 (home-page "http://aa-project.sourceforge.net/aalib/")
216 (synopsis "ASCII-art library")
218 "AA-lib is a low level gfx library which does not require graphics device.
219 In fact, there is no graphical output possible. AA-lib replaces those
220 old-fashioned output methods with powerful ascii-art renderer.")
221 (license license:lgpl2.0+)))
223 (define-public celluloid
230 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
231 "/download/v" version "/celluloid-" version ".tar.xz"))
233 (base32 "1s3qkism96gi44incvsb6rqg255qcvjvw61ya7nw30md0sapj4sl"))))
234 (build-system glib-or-gtk-build-system)
236 `(("intltool" ,intltool)
237 ("pkg-config" ,pkg-config)))
240 ("libepoxy" ,libepoxy)
242 (home-page "https://github.com/celluloid-player/celluloid")
243 (synopsis "GTK+ frontend for the mpv media player")
244 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
245 It interacts with mpv via the client API exported by libmpv, allowing access to
246 mpv's powerful playback capabilities.")
247 (license license:gpl3+)))
249 (define-public liba52
256 ;; A mirror://sourceforge URI doesn't work, presumably
257 ;; because the SourceForge project is misconfigured.
258 "http://liba52.sourceforge.net/files/a52dec-" version
262 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
263 (patches (search-patches "liba52-enable-pic.patch"
264 "liba52-set-soname.patch"
265 "liba52-use-mtune-not-mcpu.patch"
266 "liba52-link-with-libm.patch"))))
267 (build-system gnu-build-system)
268 ;; XXX We need to run ./bootstrap because of the build system fixes above.
270 `(("autoconf" ,autoconf)
271 ("automake" ,automake)
272 ("libtool" ,libtool)))
273 (arguments `(#:configure-flags '("--enable-shared")
275 (modify-phases %standard-phases
276 ;; XXX We need to run ./bootstrap because of the build
277 ;; system fixes above.
279 (lambda _ (invoke "sh" "bootstrap"))))))
280 (home-page "http://liba52.sourceforge.net/")
281 (synopsis "ATSC A/52 stream decoder")
282 (description "liba52 is a library for decoding ATSC A/52 streams. The
283 A/52 standard is used in a variety of applications, including digital
284 television and DVD. It is also known as AC-3.")
285 (license license:gpl2+)))
287 (define-public libaom
294 (url "https://aomedia.googlesource.com/aom/")
295 (commit (string-append "v" version))))
296 (file-name (git-file-name name version))
299 "1616xjhj6770ykn82ml741h8hx44v507iky3s9h7a5lnk9d4cxzy"))))
300 (build-system cmake-build-system)
303 ("pkg-config" ,pkg-config)
304 ("python" ,python))) ; to detect the version
306 `(#:tests? #f ;no check target
308 ;; build dynamic library
309 (list "-DBUILD_SHARED_LIBS=YES"
311 "-DAOM_TARGET_CPU=generic"
312 (string-append "-DCMAKE_INSTALL_PREFIX="
313 (assoc-ref %outputs "out")))))
314 (home-page "https://aomedia.googlesource.com/aom/")
315 (synopsis "AV1 video codec")
316 (description "Libaom is the reference implementation of AV1. It includes a
317 shared library and encoder and decoder command-line executables.")
318 (license license:bsd-2)))
320 (define-public libmpeg2
326 ;; A mirror://sourceforge URI doesn't work, presumably
327 ;; because the SourceForge project is misconfigured.
328 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
329 name "-" version ".tar.gz"))
330 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
331 "libmpeg2-global-symbol-test.patch"))
334 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
342 (build-system gnu-build-system)
343 (home-page "http://libmpeg2.sourceforge.net/")
344 (synopsis "MPEG1 and MPEG2 video decoder library")
346 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
347 (license license:gpl2+)))
349 (define-public libx264
350 ;; There are no tags in the repository, so we take the version number from
351 ;; the X264_BUILD variable defined in x264.h.
352 (let ((version "159")
353 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
357 (version (git-version version revision commit))
361 (url "https://code.videolan.org/videolan/x264.git")
363 (file-name (git-file-name name version))
366 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
367 (build-system gnu-build-system)
369 `(("pkg-config" ,pkg-config)
371 ;; TODO: Add gpac input
373 `(#:tests? #f ;no check target
374 #:configure-flags '("--enable-shared"
375 ;; Don't build the command-line program. If we
376 ;; want it later, we should do so in a different
377 ;; package to avoid a circular dependency (the x264
378 ;; program depends on ffmpeg and ffmpeg depends on
382 ;; On MIPS, we must pass "--disable-asm" or else
383 ;; configure fails after printing: "You specified a
384 ;; pre-MSA CPU in your CFLAGS. If you really want
385 ;; to run on such a CPU, configure with
387 ,@(if (string-prefix? "mips"
388 (or (%current-target-system)
392 (home-page "https://www.videolan.org/developers/x264.html")
393 (synopsis "H.264 video coding library")
394 (description "libx264 is an advanced encoding library for creating
395 H.264 (MPEG-4 AVC) video streams.")
396 (license (list license:gpl2+ ;most files
397 license:isc ;common/x86/x86inc.asm
398 license:lgpl2.1+ ;extras/getopt.c
399 license:bsd-3 ;extras/inttypes.h
400 (license:non-copyleft ;extras/cl*.h
402 "See extras/cl.h in the distribution."))))))
404 (define-public mkvtoolnix
411 (uri (string-append "https://mkvtoolnix.download/sources/"
412 "mkvtoolnix-" version ".tar.xz"))
414 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
415 (modules '((guix build utils)))
417 ;; Delete bundled libraries.
418 (for-each delete-file-recursively
426 (build-system gnu-build-system)
427 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
436 ("libmatroska" ,libmatroska)
438 ("libvorbis" ,libvorbis)
442 ("qtmultimedia" ,qtmultimedia)
446 `(("docbook-xsl" ,docbook-xsl)
447 ("gettext" ,gettext-minimal)
448 ("googletest" ,googletest)
450 ("json-modern-cxx" ,json-modern-cxx)
452 ("pkg-config" ,pkg-config)
458 (list (string-append "--with-boost="
459 (assoc-ref %build-inputs "boost"))
460 (string-append "--with-docbook-xsl-root="
461 (assoc-ref %build-inputs "docbook-xsl")
462 "/xml/xsl/docbook-xsl-"
463 ,(package-version docbook-xsl))
464 "--enable-update-check=no"
465 "--enable-precompiled-headers=no")
467 (modify-phases %standard-phases
468 (add-after 'unpack 'patch-relative-file-names
469 (lambda* (#:key outputs #:allow-other-keys)
470 (let ((out (assoc-ref outputs "out")))
471 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
473 (string-append out "/bin/" match)))
475 (add-before 'configure 'add-googletest
476 (lambda* (#:key inputs #:allow-other-keys)
478 (string-append (assoc-ref inputs "googletest")
479 "/include/gtest") "lib/gtest")
483 (let ((-j (list "-j" (number->string (parallel-job-count)))))
484 (apply invoke "rake" -j))))
487 (invoke "rake" "tests/unit")))
490 (invoke "rake" "install")))
491 (add-after 'install 'post-install
492 (lambda* (#:key outputs #:allow-other-keys)
493 ;; Move the Qt interface to "gui".
494 (let* ((out (assoc-ref outputs "out"))
495 (gui (assoc-ref outputs "gui"))
496 (strip-store-dir (lambda (path)
497 (substring path (string-prefix-length out path)))))
500 (mkdir-p (string-append gui (dirname file)))
501 (rename-file (string-append out file)
502 (string-append gui file)))
503 (append '("/bin/mkvtoolnix-gui"
504 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
505 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
506 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
507 (map strip-store-dir (find-files out "\\.ogg$"))
508 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
509 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
512 (delete-file-recursively (string-append out file)))
513 '("/share/applications"
516 "/share/mkvtoolnix")))
518 (home-page "https://mkvtoolnix.download")
519 (synopsis "Tools to create, alter and inspect Matroska files")
521 "MKVToolNix provides tools for getting information about Matroska files
522 (@command{mkvinfo}), extracting tracks/data from Matroska files
523 (@command{mkvextract}), and creating Matroska files from other media files
524 (@command{mkvmerge}).")
525 (license license:gpl2)))
527 (define-public straw-viewer
529 (name "straw-viewer")
535 (url "https://github.com/trizen/straw-viewer")
537 (file-name (git-file-name name version))
539 (base32 "067j8wdfy29bi5ahky10xzzs8cr3mn95wl4kyqqjvjzri77a25j3"))))
540 (build-system perl-build-system)
542 `(("perl-module-build" ,perl-module-build)
543 ("perl-test-pod" ,perl-test-pod)))
545 `(("perl-data-dump" ,perl-data-dump)
546 ("perl-json" ,perl-json)
547 ("perl-libwww" ,perl-libwww)
548 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
549 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
550 ("perl-mozilla-ca" ,perl-mozilla-ca)
551 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
552 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
553 ("xdg-utils" ,xdg-utils)
555 ;; Some videos play without youtube-dl, but others silently fail to.
556 ("youtube-dl" ,youtube-dl)))
558 ;; Required only when building the graphical interface (--gtk).
559 ;;("perl-file-sharedir" ,perl-file-sharedir)
561 `(#:modules ((guix build perl-build-system)
565 (modify-phases %standard-phases
566 (add-after 'unpack 'refer-to-inputs
567 (lambda* (#:key inputs #:allow-other-keys)
568 (substitute* "lib/WWW/StrawViewer.pm"
570 (format #f "'~a/bin/youtube-dl'"
571 (assoc-ref inputs "youtube-dl"))))
572 (substitute* "bin/gtk-straw-viewer"
574 (format #f "'~a/bin/xdg-open'"
575 (assoc-ref inputs "xdg-utils"))))
577 (add-after 'install 'install-desktop
578 (lambda* (#:key outputs #:allow-other-keys)
579 (let* ((out (assoc-ref outputs "out"))
580 (sharedir (string-append out "/share")))
581 (install-file "share/gtk-straw-viewer.desktop"
582 (string-append sharedir "/applications"))
583 (install-file "share/icons/gtk-straw-viewer.png"
584 (string-append sharedir "/pixmaps"))
586 (add-after 'install 'wrap-program
587 (lambda* (#:key outputs #:allow-other-keys)
588 (let* ((out (assoc-ref outputs "out"))
589 (bin-dir (string-append out "/bin/"))
590 (site-dir (string-append out "/lib/perl5/site_perl/"))
591 (lib-path (getenv "PERL5LIB")))
592 (for-each (cut wrap-program <>
593 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
594 (find-files bin-dir))
597 "Light-weight application for searching and streaming videos from YouTube")
599 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
600 invidio.us} and plays them locally in a native media player like @command{vlc}
603 You can search for videos, playlists, and/or channels. The videos are streamed
604 directly to the player at the best chosen resolution and with closed captions if
606 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
607 ;; Both a command-line and a graphical interface are available.
608 (home-page "https://github.com/trizen/youtube-viewer")
609 (license license:perl-license)))
615 (outputs '("out" "static"))
619 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
620 "/downloads/x265_" version ".tar.gz")
621 (string-append "https://download.videolan.org/videolan/x265/"
622 "x265_" version ".tar.gz")))
624 (base32 "170b61cgpcs5n35qps0p40dqs1q81vkgagzbs4zv7pzls6718vpj"))
625 (patches (search-patches "x265-arm-flags.patch"))
626 (modules '((guix build utils)))
628 (delete-file-recursively "source/compat/getopt")
630 (build-system cmake-build-system)
632 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
633 (if (string-prefix? "i686" (%current-system))
637 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
639 ;; Ensure position independent code for everyone.
640 (list "-DENABLE_PIC=TRUE"
641 ,@(if (string-prefix? "armhf" (or (%current-system)
642 (%current-target-system)))
643 '("-DENABLE_ASSEMBLY=OFF")
645 (string-append "-DCMAKE_INSTALL_PREFIX="
646 (assoc-ref %outputs "out")))
648 (modify-phases %standard-phases
649 (add-after 'unpack 'prepare-build
651 (delete-file-recursively "build")
653 ;; recognize armv8 in 32-bit mode as ARM
654 (substitute* "CMakeLists.txt"
655 (("armv6l") "armv8l"))
657 (add-before 'configure 'build-12-bit
658 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
659 (mkdir "../build-12bit")
660 (with-directory-excursion "../build-12bit"
663 "-DHIGH_BIT_DEPTH=ON"
668 (substitute* (cons "cmake_install.cmake"
670 (find-files "CMakeFiles/x265-shared.dir" ".")
671 (find-files "CMakeFiles/x265-static.dir" ".")))
672 (("libx265") "libx265_main12"))
674 (add-before 'configure 'build-10-bit
675 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
676 (mkdir "../build-10bit")
677 (with-directory-excursion "../build-10bit"
680 "-DHIGH_BIT_DEPTH=ON"
684 (substitute* (cons "cmake_install.cmake"
686 (find-files "CMakeFiles/x265-shared.dir" ".")
687 (find-files "CMakeFiles/x265-static.dir" ".")))
688 (("libx265") "libx265_main10"))
690 (add-after 'install 'install-more-libs
692 (with-directory-excursion "../build-12bit"
693 (invoke "make" "install"))
694 (with-directory-excursion "../build-10bit"
695 (invoke "make" "install"))))
696 (add-before 'strip 'move-static-libs
697 (lambda* (#:key outputs #:allow-other-keys)
698 (let ((out (assoc-ref outputs "out"))
699 (static (assoc-ref outputs "static")))
700 (mkdir-p (string-append static "/lib"))
701 (with-directory-excursion
702 (string-append out "/lib")
706 (string-append static "/lib/" file)))
707 (find-files "." "\\.a$"))))
709 (home-page "http://x265.org/")
710 (synopsis "Library for encoding h.265/HEVC video streams")
711 (description "x265 is a H.265 / HEVC video encoder application library,
712 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
713 (license license:gpl2+)))
715 (define-public libass
722 "https://github.com/libass/libass/releases/download/"
723 version "/libass-" version ".tar.xz"))
726 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
727 (build-system gnu-build-system)
729 `(("pkg-config" ,pkg-config)
732 `(("freetype" ,freetype)
734 ("fontconfig" ,fontconfig)
735 ("harfbuzz" ,harfbuzz)
737 (home-page "https://github.com/libass/libass")
738 (synopsis "Subtitle rendering library for the ASS/SSA format")
739 (description "libass is a subtitle rendering library for the
740 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
741 (license license:isc)))
743 (define-public libcaca
746 (version "0.99.beta19")
749 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
753 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
754 (build-system gnu-build-system)
755 (native-inputs `(("pkg-config" ,pkg-config)))
757 `(("freeglut" ,freeglut)
764 (home-page "http://caca.zoy.org/wiki/libcaca")
765 (synopsis "Colour ASCII-art library")
766 (description "libcaca is a graphics library that outputs text instead of
767 pixels, so that it can work on older video cards or text terminals. It
768 supports Unicode, 2048 colors, dithering of color images, and advanced text
770 (license license:wtfpl2)))
772 (define-public libdca
779 "https://download.videolan.org/pub/videolan/libdca/"
780 version "/libdca-" version ".tar.bz2"))
783 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
784 (build-system gnu-build-system)
786 `(("autoconf" ,autoconf)
787 ("automake" ,automake)
788 ("libtool" ,libtool)))
789 (home-page "https://www.videolan.org/developers/libdca.html")
790 (synopsis "DTS Coherent Acoustics decoder")
791 (description "libdca is a library for decoding DTS Coherent Acoustics
793 (license license:gpl2+)))
802 "mirror://sourceforge/libdv/libdv/"
803 version "/libdv-" version ".tar.gz"))
806 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
807 (build-system gnu-build-system)
808 (native-inputs `(("pkg-config" ,pkg-config)))
809 (inputs `(("libxv" ,libxv)))
810 (home-page "http://libdv.sourceforge.net/")
811 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
812 (description "The Quasar DV codec (libdv) is a software codec for DV
813 video, the encoding format used by most digital camcorders, typically those
814 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
815 developed according to the official standards for DV video: IEC 61834 and
817 (license license:lgpl2.1+)))
819 (define-public libmatroska
826 (uri (string-append "https://dl.matroska.org/downloads/"
827 "libmatroska/libmatroska-" version ".tar.xz"))
829 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
830 (build-system cmake-build-system)
832 `(("libebml" ,libebml)))
835 (list "-DBUILD_SHARED_LIBS=YES")
836 #:tests? #f)) ; no test suite
837 (home-page "https://www.matroska.org")
838 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
840 "Matroska aims to become the standard of multimedia container formats.
841 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
842 of XML. EBML enables the Matroska Development Team to gain significant
843 advantages in terms of future format extensibility, without breaking file
844 support in old parsers.
845 libebml is a C++ library to read and write EBML files.")
846 (license license:lgpl2.1)))
856 ;; Newer releases are only available on GitHub.
857 (string-append "https://github.com/01org/libva/releases/download/"
858 version "/libva-" version ".tar.bz2")
859 ;; Keep the old URL around for compatibility.
860 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
861 "libva/libva-" version "/libva-" version ".tar.bz2")))
863 (base32 "014av7ayyc624xfmr63xhbgg7nw8fynsswj1g2wmk4lnkyfz23x0"))))
864 (build-system gnu-build-system)
866 `(("pkg-config" ,pkg-config)))
871 ("libxfixes" ,libxfixes)
873 ("wayland" ,wayland)))
876 (modify-phases %standard-phases
878 'build 'fix-dlopen-paths
879 (lambda* (#:key outputs #:allow-other-keys)
880 (let ((out (assoc-ref outputs "out")))
881 (substitute* "va/drm/va_drm_auth_x11.c"
882 (("\"libva-x11\\.so\\.%d\"")
883 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
885 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
886 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
888 (list (string-append "--with-drivers-path="
889 (assoc-ref %build-inputs "mesa") "/lib/dri"))
890 ;; However, we can't write to mesa's store directory, so override the
891 ;; following make variable to install the dummy driver to libva's
892 ;; $prefix/lib/dri directory.
894 (list (string-append "dummy_drv_video_ladir="
895 (assoc-ref %outputs "out") "/lib/dri"))))
896 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
897 (synopsis "Video acceleration library")
898 (description "The main motivation for VA-API (Video Acceleration API) is
899 to enable hardware accelerated video decode/encode at various
900 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
901 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
902 (license license:expat)))
904 (define-public libva-utils
911 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
912 version "/libva-utils-" version ".tar.bz2"))
914 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
915 (build-system gnu-build-system)
918 (list "--enable-wayland"
921 `(("pkg-config" ,pkg-config)))
927 ("wayland" ,wayland)))
928 (home-page "https://01.org/linuxmedia/vaapi")
929 (synopsis "Collection of testing utilities for VA-API")
931 "This is a collection of utilities to query and test the @acronym{VA-API,
932 Video Acceleration API} implemented by the libva library.
934 These tools require a supported graphics chip, driver, and VA-API back end to
936 (license license:expat)))
938 (define-public ffmpeg
944 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
948 "0pbrsv5v96yd8qzb9bk4kw7qk4xqpi03rsd5xfbwnjzlhijd02hx"))))
949 (build-system gnu-build-system)
952 ("fontconfig" ,fontconfig)
953 ("freetype" ,freetype)
954 ("frei0r-plugins" ,frei0r-plugins)
961 ("libbluray" ,libbluray)
963 ("libcdio-paranoia" ,libcdio-paranoia)
965 ("libtheora" ,libtheora)
967 ("libvdpau" ,libvdpau)
968 ("libvorbis" ,libvorbis)
974 ("pulseaudio" ,pulseaudio)
975 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
976 ;; See also the related configure flag when changing this.
977 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
992 ("pkg-config" ,pkg-config)
994 ("python" ,python-2) ; scripts use interpreter python2
998 `(#:test-target "fate"
1000 ;; possible additional inputs:
1001 ;; --enable-avisynth enable reading of AviSynth script
1003 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1004 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1005 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1006 ;; and libraw1394 [no]
1007 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1008 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1009 ;; --enable-libflite enable flite (voice synthesis) support via
1011 ;; --enable-libgme enable Game Music Emu via libgme [no]
1012 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1013 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1014 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1015 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1016 ;; --enable-libnut enable NUT (de)muxing via libnut,
1017 ;; native (de)muxer exists [no]
1018 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1019 ;; libopencore-amrnb [no]
1020 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1021 ;; libopencore-amrwb [no]
1022 ;; --enable-libopencv enable video filtering via libopencv [no]
1023 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1025 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1026 ;; --enable-libschroedinger enable Dirac de/encoding via
1027 ;; libschroedinger [no]
1028 ;; --enable-libshine enable fixed-point MP3 encoding via
1030 ;; --enable-libssh enable SFTP protocol via libssh [no]
1031 ;; (libssh2 does not work)
1032 ;; --enable-libstagefright-h264 enable H.264 decoding via
1033 ;; libstagefright [no]
1034 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1036 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1037 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1038 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1039 ;; libvo-amrwbenc [no]
1040 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1041 ;; --enable-libxavs enable AVS encoding via xavs [no]
1042 ;; --enable-libzmq enable message passing via libzmq [no]
1043 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1044 ;; --enable-opencl enable OpenCL code
1045 '("--enable-avresample"
1046 "--enable-gpl" ; enable optional gpl licensed parts
1049 "--enable-fontconfig"
1054 "--enable-libbluray"
1058 "--enable-libfreetype"
1059 "--enable-libmp3lame"
1062 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1064 '("--enable-librav1e")
1068 "--enable-libtheora"
1069 "--enable-libtwolame"
1070 "--enable-libvidstab"
1071 "--enable-libvorbis"
1080 "--enable-runtime-cpudetect"
1082 ;; The HTML pages take 7.2 MiB
1083 "--disable-htmlpages"
1085 ;; The static libraries are 23 MiB
1088 ;; Runtime cpu detection is not implemented on
1089 ;; MIPS, so we disable some features.
1090 "--disable-mips32r2"
1092 "--disable-mipsdspr2"
1093 "--disable-mipsfpu")
1095 (modify-phases %standard-phases
1098 ;; configure does not work followed by "SHELL=..." and
1099 ;; "CONFIG_SHELL=..."; set environment variables instead
1100 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1101 (let ((out (assoc-ref outputs "out")))
1102 (substitute* "configure"
1103 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1104 (setenv "SHELL" (which "bash"))
1105 (setenv "CONFIG_SHELL" (which "bash"))
1108 (string-append "--prefix=" out)
1109 ;; Add $libdir to the RUNPATH of all the binaries.
1110 (string-append "--extra-ldflags=-Wl,-rpath="
1114 'check 'set-ld-library-path
1116 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1118 (let* ((dso (find-files "." "\\.so$"))
1119 (path (string-join (map dirname dso) ":")))
1120 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1121 (setenv "LD_LIBRARY_PATH" path)
1123 (home-page "https://www.ffmpeg.org/")
1124 (synopsis "Audio and video framework")
1125 (description "FFmpeg is a complete, cross-platform solution to record,
1126 convert and stream audio and video. It includes the libavcodec
1127 audio/video codec library.")
1128 (license license:gpl2+)))
1130 ;; ungoogled-chromium crashes with ffmpeg 4.3, so stick with this version for
1131 ;; now. See <https://issues.guix.gnu.org/41987>.
1132 (define-public ffmpeg-4.2
1138 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1142 "0cddkb5sma9dzy8i59sfls19rhjlq40zn9mh3x666dqkxl5ckxlx"))))
1144 (substitute-keyword-arguments (package-arguments ffmpeg)
1145 ((#:configure-flags flags)
1146 `(delete "--enable-librav1e" ,flags))))))
1148 (define-public ffmpeg-3.4
1154 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1158 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1160 (substitute-keyword-arguments (package-arguments ffmpeg)
1161 ((#:configure-flags flags)
1162 `(delete "--enable-libdav1d" (delete "--enable-libaom" (delete "--enable-librav1e"
1164 (inputs (alist-delete "dav1d" (alist-delete "libaom" (alist-delete "rav1e"
1165 (package-inputs ffmpeg)))))))
1167 (define-public ffmpeg-for-stepmania
1176 (url "https://github.com/stepmania/ffmpeg.git")
1177 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1179 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1180 (file-name (git-file-name "ffmpeg" version))))
1182 (substitute-keyword-arguments (package-arguments ffmpeg)
1183 ((#:configure-flags flags)
1184 '(list "--disable-programs"
1187 "--disable-avdevice"
1188 "--disable-swresample"
1189 "--disable-postproc"
1190 "--disable-avfilter"
1192 "--enable-static"))))
1195 (define-public ffmpegthumbnailer
1197 (name "ffmpegthumbnailer")
1202 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1204 (file-name (git-file-name name version))
1207 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1208 (build-system cmake-build-system)
1210 `(("pkg-config" ,pkg-config)))
1212 `(("ffmpeg" ,ffmpeg)
1213 ("libjpeg-turbo" ,libjpeg-turbo)
1217 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1218 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1219 (synopsis "Create thumbnails from video files")
1220 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1221 can be used by file managers to create thumbnails for your video files. The
1222 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1223 videoformats depend on the configuration flags of ffmpeg.")
1224 (license license:gpl2+)))
1233 "https://download.videolan.org/pub/videolan/vlc/"
1234 (car (string-split version #\-))
1235 "/vlc-" version ".tar.xz"))
1238 "06a9hfl60f6l0fs5c9ma5s8np8kscm4ala6m2pdfji9lyfna351y"))))
1239 (build-system gnu-build-system)
1243 ("gettext" ,gettext-minimal)
1244 ("git" ,git) ; needed for a test
1245 ("pkg-config" ,pkg-config)))
1246 ;; FIXME: Add optional inputs once available.
1248 `(("alsa-lib" ,alsa-lib)
1254 ("fontconfig" ,fontconfig)
1255 ("freetype" ,freetype)
1256 ("fribidi" ,fribidi)
1259 ("libarchive" ,libarchive)
1261 ("libavc1394" ,libavc1394)
1262 ("libbluray" ,libbluray)
1263 ("libcaca" ,libcaca)
1264 ("libcddb" ,libcddb)
1266 ("libdvbpsi" ,libdvbpsi)
1267 ("libdvdnav" ,libdvdnav)
1268 ("libdvdread" ,libdvdread)
1269 ("libebml" ,libebml)
1270 ("libgcrypt" ,libgcrypt)
1272 ("libkate" ,libkate)
1274 ("libmatroska" ,libmatroska)
1275 ("libmicrodns" ,libmicrodns)
1276 ("libmodplug" ,libmodplug)
1277 ("libmpeg2" ,libmpeg2)
1280 ("libraw1394" ,libraw1394)
1281 ("librsvg" ,librsvg)
1282 ("libsamplerate" ,libsamplerate)
1283 ("libsecret" ,libsecret)
1284 ("libssh2" ,libssh2)
1285 ("libupnp" ,libupnp)
1287 ("libvdpau" ,libvdpau)
1288 ("libvorbis" ,libvorbis)
1290 ("libtheora" ,libtheora)
1291 ("libx264" ,libx264)
1292 ("libxext" ,libxext)
1294 ("libxinerama" ,libxinerama)
1295 ("libxml2" ,libxml2)
1297 ("livemedia-utils" ,livemedia-utils)
1302 ("pulseaudio" ,pulseaudio)
1303 ("protobuf" ,protobuf)
1304 ("python" ,python-wrapper)
1307 ("qtx11extras" ,qtx11extras)
1310 ("sdl-image" ,sdl-image)
1312 ("speexdsp" ,speexdsp)
1314 ("twolame" ,twolame)
1316 ("wayland" ,wayland)
1317 ("wayland-protocols" ,wayland-protocols)
1319 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1323 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1324 (assoc-ref %build-inputs "ffmpeg")
1325 "/lib")) ;needed for the tests
1328 (modify-phases %standard-phases
1329 (add-after 'unpack 'patch-source
1330 (lambda* (#:key inputs #:allow-other-keys)
1331 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1332 (substitute* "configure"
1333 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1334 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1335 ;; Some of the tests require using the display to test out VLC,
1336 ;; which fails in our sandboxed build system
1337 (substitute* "test/run_vlc.sh"
1338 (("./vlc --ignore-config") "echo"))
1340 (add-after 'strip 'regenerate-plugin-cache
1341 (lambda* (#:key outputs #:allow-other-keys)
1342 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1343 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1344 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1345 ;; it references. Thus, we first reset the timestamps of all
1346 ;; these files, and then regenerate the cache such that the
1347 ;; mtimes it includes are always zero instead of being dependent
1348 ;; on the build time.
1349 (let* ((out (assoc-ref outputs "out"))
1350 (pkglibdir (string-append out "/lib/vlc"))
1351 (plugindir (string-append pkglibdir "/plugins"))
1352 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1353 ;; TODO: Factorize 'reset-timestamps'.
1354 (for-each (lambda (file)
1355 (let ((s (lstat file)))
1356 (unless (eq? (stat:type s) 'symlink)
1358 (find-files plugindir))
1359 (invoke cachegen plugindir))))
1360 (add-after 'install 'wrap-executable
1361 (lambda* (#:key outputs #:allow-other-keys)
1362 (let ((out (assoc-ref outputs "out"))
1363 (plugin-path (getenv "QT_PLUGIN_PATH")))
1364 (wrap-program (string-append out "/bin/vlc")
1365 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1367 (home-page "https://www.videolan.org/")
1368 (synopsis "Audio and video framework")
1369 (description "VLC is a cross-platform multimedia player and framework
1370 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1371 streaming protocols.")
1372 (license license:gpl2+)))
1374 (define-public mplayer
1381 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1385 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
1386 (build-system gnu-build-system)
1387 ;; FIXME: Add additional inputs once available.
1389 `(("pkg-config" ,pkg-config)
1392 `(("alsa-lib" ,alsa-lib)
1393 ("cdparanoia" ,cdparanoia)
1395 ("fontconfig" ,fontconfig)
1396 ("freetype" ,freetype)
1400 ("libdvdcss" ,libdvdcss)
1401 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1402 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
1403 ("libjpeg" ,libjpeg-turbo)
1404 ("libmpeg2" ,libmpeg2)
1405 ("libmpg123" ,mpg123) ; audio codec for MP3
1407 ("libtheora" ,libtheora)
1408 ("libvdpau" ,libvdpau)
1409 ("libvorbis" ,libvorbis)
1411 ("libx264" ,libx264)
1412 ("libxinerama" ,libxinerama)
1414 ("libxxf86dga" ,libxxf86dga)
1418 ("pulseaudio" ,pulseaudio)
1419 ("python" ,python-wrapper)
1424 `(#:tests? #f ; no test target
1426 (modify-phases %standard-phases
1428 ;; configure does not work followed by "SHELL=..." and
1429 ;; "CONFIG_SHELL=..."; set environment variables instead
1430 (lambda* (#:key inputs outputs #:allow-other-keys)
1431 (let ((out (assoc-ref outputs "out"))
1432 (libx11 (assoc-ref inputs "libx11")))
1433 (substitute* "configure"
1434 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1435 (setenv "SHELL" (which "bash"))
1436 (setenv "CONFIG_SHELL" (which "bash"))
1437 (invoke "./configure"
1438 (string-append "--extra-cflags=-I"
1439 libx11 "/include") ; to detect libx11
1440 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1441 (string-append "--prefix=" out)
1442 ;; Enable runtime cpu detection where supported,
1443 ;; and choose a suitable target.
1444 ,@(match (or (%current-target-system)
1447 '("--enable-runtime-cpudetection"
1448 "--target=x86_64-linux"))
1450 '("--enable-runtime-cpudetection"
1451 "--target=i686-linux"))
1453 '("--target=mips3-linux"))
1454 (_ (list (string-append
1456 (or (%current-target-system)
1457 (nix-system->gnu-triplet
1458 (%current-system)))))))
1459 "--disable-iwmmxt")))))))
1460 (home-page "https://www.mplayerhq.hu")
1461 (synopsis "Audio and video player")
1462 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1463 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1464 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1465 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1466 (license license:gpl2)))
1475 (url "https://github.com/mpv-player/mpv.git")
1476 (commit (string-append "v" version))))
1477 (file-name (git-file-name name version))
1480 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1481 (build-system waf-build-system)
1483 `(("perl" ,perl) ; for zsh completion file
1484 ("pkg-config" ,pkg-config)
1485 ("python-docutils" ,python-docutils)))
1486 ;; Missing features: libguess, V4L2
1488 `(("alsa-lib" ,alsa-lib)
1495 ("libbluray" ,libbluray)
1496 ("libcaca" ,libcaca)
1497 ("libbs2b" ,libbs2b)
1498 ("libcdio-paranoia" ,libcdio-paranoia)
1499 ("libdvdread" ,libdvdread)
1500 ("libdvdnav" ,libdvdnav)
1501 ("libjpeg" ,libjpeg-turbo)
1503 ("libvdpau" ,libvdpau)
1505 ("libxext" ,libxext)
1506 ("libxinerama" ,libxinerama)
1507 ("libxrandr" ,libxrandr)
1508 ("libxscrnsaver" ,libxscrnsaver)
1510 ;; XXX: lua > 5.2 is not currently supported; see
1511 ;; waftools/checks/custom.py
1515 ("pulseaudio" ,pulseaudio)
1517 ("shaderc" ,shaderc)
1518 ("vulkan-headers" ,vulkan-headers)
1519 ("vulkan-loader" ,vulkan-loader)
1521 ("wayland" ,wayland)
1522 ("wayland-protocols" ,wayland-protocols)
1523 ("libxkbcommon" ,libxkbcommon)
1524 ("youtube-dl" ,youtube-dl)
1528 (modify-phases %standard-phases
1530 'unpack 'patch-paths
1531 (lambda* (#:key inputs #:allow-other-keys)
1532 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1533 (substitute* "player/lua/ytdl_hook.lua"
1534 (("\"youtube-dl\",")
1535 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1538 'configure 'setup-waf
1539 (lambda* (#:key inputs #:allow-other-keys)
1540 (let ((waf (assoc-ref inputs "waf")))
1541 (copy-file (string-append waf "/bin/waf") "waf"))
1544 #:configure-flags (list "--enable-libmpv-shared"
1547 "--disable-build-date")
1548 ;; No check function defined.
1550 (home-page "https://mpv.io/")
1551 (synopsis "Audio and video player")
1552 (description "mpv is a general-purpose audio and video player. It is a
1553 fork of mplayer2 and MPlayer. It shares some features with the former
1554 projects while introducing many more.")
1555 (license license:gpl2+)))
1557 (define-public gnome-mpv
1558 (deprecated-package "gnome-mpv" celluloid))
1560 (define-public mpv-mpris
1568 (url "https://github.com/hoyon/mpv-mpris")
1570 (file-name (git-file-name name version))
1573 "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk"))))
1574 (build-system copy-build-system)
1577 '(("mpris.so" "lib/"))
1579 (modify-phases %standard-phases
1580 (add-before 'install 'build
1582 (setenv "CC" (which "gcc"))
1583 (invoke "make"))))))
1585 `(("pkg-config" ,pkg-config)))
1589 (home-page "https://github.com/hoyon/mpv-mpris")
1590 (synopsis "MPRIS plugin for mpv")
1591 (description "This package provides an @dfn{MPRIS} (Media Player Remote
1592 Interfacing Specification) plugin for the @code{mpv} media player. It implements
1593 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
1596 To load this plugin, specify the following option when starting mpv:
1597 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
1598 @file{$HOME/.config/mpv/scripts}.")
1599 (license license:expat)))
1601 (define-public libvpx
1606 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1609 (url "https://chromium.googlesource.com/webm/libvpx")
1610 (commit (string-append "v" version))))
1611 (file-name (git-file-name name version))
1614 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
1615 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1616 (build-system gnu-build-system)
1618 `(#:configure-flags (list "--enable-shared"
1621 ;; Limit size to avoid CVE-2015-1258
1622 "--size-limit=16384x16384"
1623 (string-append "--prefix=" (assoc-ref %outputs "out")))
1624 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1625 (assoc-ref %outputs "out") "/lib"))
1626 #:phases (modify-phases %standard-phases
1628 (lambda* (#:key configure-flags #:allow-other-keys)
1629 ;; The configure script does not understand some of the GNU
1630 ;; options, so we only add the flags specified above.
1631 (apply invoke "./configure" configure-flags))))
1632 #:tests? #f)) ; no check target
1636 (synopsis "VP8/VP9 video codec")
1637 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1638 (license license:bsd-3)
1639 (home-page "https://www.webmproject.org/")))
1641 (define-public youtube-dl
1644 (version "2020.06.16")
1647 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1648 "releases/download/" version "/youtube-dl-"
1652 "1fgqi8pvw13p79gl38lnpl7ifa7cwxhzk53c6lmjsk1yhz5455m9"))))
1653 (build-system python-build-system)
1655 ;; The problem here is that the directory for the man page and completion
1656 ;; files is relative, and for some reason, setup.py uses the
1657 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1658 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1659 ;; completion file is called 'youtube-dl' rather than
1660 ;; 'youtube-dl.bash-completion'.
1661 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1662 #:phases (modify-phases %standard-phases
1663 (add-before 'install 'fix-the-data-directories
1664 (lambda* (#:key outputs #:allow-other-keys)
1665 (let ((prefix (assoc-ref outputs "out")))
1666 (mkdir "bash-completion")
1667 (rename-file "youtube-dl.bash-completion"
1668 "bash-completion/youtube-dl")
1669 (substitute* "setup.py"
1670 (("youtube-dl\\.bash-completion")
1671 "bash-completion/youtube-dl")
1673 (string-append "'" prefix "/etc/"))
1675 (string-append "'" prefix "/share/")))
1677 (add-after 'install 'install-completion
1678 (lambda* (#:key outputs #:allow-other-keys)
1679 (let* ((out (assoc-ref outputs "out"))
1680 (zsh (string-append out
1681 "/share/zsh/site-functions")))
1683 (copy-file "youtube-dl.zsh"
1684 (string-append zsh "/_youtube-dl"))
1686 (synopsis "Download videos from YouTube.com and other sites")
1688 "Youtube-dl is a small command-line program to download videos from
1689 YouTube.com and many more sites.")
1690 (home-page "https://yt-dl.org")
1691 (license license:public-domain)))
1693 (define-public youtube-dl-gui
1695 (name "youtube-dl-gui")
1700 (uri (pypi-uri "Youtube-DLG" version))
1703 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1704 (build-system python-build-system)
1706 ;; In Guix, wxpython has not yet been packaged for Python 3.
1707 `(#:python ,python-2
1708 ;; This package has no tests.
1711 (modify-phases %standard-phases
1712 (add-before 'build 'patch-source
1713 (lambda* (#:key inputs #:allow-other-keys)
1714 ;; The youtube-dl-gui program lets you configure options. Some of
1715 ;; them are problematic, so we change their defaults.
1716 (substitute* "youtube_dl_gui/optionsmanager.py"
1717 ;; When this is true, the builder process will try (and fail) to
1718 ;; write logs to the builder user's home directory.
1719 (("'enable_log': True") "'enable_log': False")
1720 ;; This determines which youtube-dl program youtube-dl-gui will
1721 ;; run. If we don't set this, then youtube-dl-gui might download
1722 ;; an arbitrary copy from the Internet into the user's home
1723 ;; directory and run it, so let's make sure youtube-dl-gui uses
1724 ;; the youtube-dl from the inputs by default.
1725 (("'youtubedl_path': self.config_path")
1726 (string-append "'youtubedl_path': '"
1727 (assoc-ref inputs "youtube-dl")
1729 ;; When this is True, when youtube-dl-gui is finished downloading
1730 ;; a file, it will try (and possibly fail) to open the directory
1731 ;; containing the downloaded file. This can fail because it
1732 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1733 ;; adding xdg-utils to the propagated inputs is not enough to
1734 ;; make this work, so for now we set the default to False.
1735 (("'open_dl_dir': True") "'open_dl_dir': False"))
1736 ;; The youtube-dl program from the inputs is actually a wrapper
1737 ;; script written in bash, so attempting to invoke it as a python
1738 ;; script will fail.
1739 (substitute* "youtube_dl_gui/downloaders.py"
1740 (("cmd = \\['python', self\\.youtubedl_path\\]")
1741 "cmd = [self.youtubedl_path]"))
1742 ;; Use relative paths for installing data files so youtube-dl-gui
1743 ;; installs the files relative to its prefix in the store, rather
1744 ;; than relative to /. Also, instead of installing data files into
1745 ;; $prefix/usr/share, install them into $prefix/share for
1746 ;; consistency (see: (standards) Directory Variables).
1747 (substitute* "setup.py"
1748 (("= '/usr/share") "= 'share"))
1749 ;; Update get_locale_file() so it finds the installed localization
1751 (substitute* "youtube_dl_gui/utils.py"
1752 (("os\\.path\\.join\\('/usr', 'share'")
1753 (string-append "os.path.join('"
1754 (assoc-ref %outputs "out")
1757 (add-after 'install 'create-desktop-file
1758 (lambda* (#:key outputs #:allow-other-keys)
1759 (let* ((out (assoc-ref outputs "out"))
1760 (applications (string-append out "/share/applications")))
1761 (mkdir-p applications)
1762 (call-with-output-file
1763 (string-append applications "/youtube-dl-gui.desktop")
1768 Name=Youtube-dl GUI~@
1769 Comment=Graphical interface to download video with youtube-dl~@
1770 Exec=youtube-dl-gui~@
1771 TryExec=youtube-dl-gui~@
1773 Icon=youtube-dl-gui~@
1775 Categories=AudioVideo;Audio;Video;Network~%")))
1778 `(("python2-wxpython" ,python2-wxpython)
1779 ("youtube-dl" ,youtube-dl)))
1780 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1782 "GUI (Graphical User Interface) for @command{youtube-dl}")
1784 "Youtube-dlG is a GUI (Graphical User Interface) for
1785 @command{youtube-dl}. You can use it to download videos from YouTube and any
1786 other site that youtube-dl supports.")
1787 (license license:unlicense)))
1789 (define-public you-get
1792 (version "0.4.1410")
1796 (url "https://github.com/soimort/you-get.git")
1797 (commit (string-append "v" version))))
1798 (file-name (git-file-name name version))
1801 "1v4lfldcijgngg0s4q5w4ixa0k8k75dwmkhf57pgb31bqlrr8h0s"))))
1802 (build-system python-build-system)
1804 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1807 (modify-phases %standard-phases
1808 (add-after 'unpack 'qualify-input-references
1809 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1810 ;; happens to be in the user's $PATH at run time.
1811 (lambda* (#:key inputs #:allow-other-keys)
1812 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1814 (substitute* "src/you_get/processor/ffmpeg.py"
1815 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1816 ;; same string is also used when sniffing ffmpeg's output.
1817 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1818 (string-append prefix "'" ffmpeg "'")))
1820 #:tests? #f)) ; XXX some tests need Internet access
1821 (synopsis "Download videos, audio, or images from Web sites")
1823 "You-Get is a command-line utility to download media contents (videos,
1824 audio, images) from the Web. It can use either mpv or vlc for playback.")
1825 (home-page "https://you-get.org/")
1826 (license license:expat)))
1828 (define-public youtube-viewer
1830 (name "youtube-viewer")
1835 (url "https://github.com/trizen/youtube-viewer.git")
1837 (file-name (git-file-name name version))
1840 "1c7wynx0fzs8awb1s4rdrl8xavqlj64z95yckhl1m1gnhahhq291"))))
1841 (build-system perl-build-system)
1843 `(("perl-module-build" ,perl-module-build)))
1845 `(("perl-data-dump" ,perl-data-dump)
1846 ("perl-file-sharedir" ,perl-file-sharedir)
1847 ("perl-gtk2" ,perl-gtk2)
1848 ("perl-json" ,perl-json)
1849 ("perl-json-xs" ,perl-json-xs)
1850 ("perl-libwww" ,perl-libwww)
1851 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1852 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1853 ("perl-mozilla-ca" ,perl-mozilla-ca)
1854 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1855 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1856 ("xdg-utils" ,xdg-utils)
1858 ;; Some videos play without youtube-dl, but others silently fail to.
1859 ("youtube-dl" ,youtube-dl)))
1861 `(#:modules ((guix build perl-build-system)
1864 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
1865 ;; is broken without perl-gtk3.
1866 #:module-build-flags '("--gtk2")
1868 (modify-phases %standard-phases
1869 (add-after 'unpack 'refer-to-inputs
1870 (lambda* (#:key inputs #:allow-other-keys)
1871 (substitute* "lib/WWW/YoutubeViewer.pm"
1873 (format #f "'~a/bin/youtube-dl'"
1874 (assoc-ref inputs "youtube-dl"))))
1875 (substitute* '("bin/gtk2-youtube-viewer"
1876 "bin/gtk3-youtube-viewer")
1878 (format #f "'~a/bin/xdg-open'"
1879 (assoc-ref inputs "xdg-utils"))))
1881 (add-after 'install 'install-desktop
1882 (lambda* (#:key outputs #:allow-other-keys)
1883 (let* ((out (assoc-ref outputs "out"))
1884 (sharedir (string-append out "/share")))
1885 (install-file "share/gtk-youtube-viewer.desktop"
1886 (string-append sharedir "/applications"))
1887 (install-file "share/icons/gtk-youtube-viewer.png"
1888 (string-append sharedir "/pixmaps"))
1890 (add-after 'install 'wrap-program
1891 (lambda* (#:key outputs #:allow-other-keys)
1892 (let* ((out (assoc-ref outputs "out"))
1893 (bin-dir (string-append out "/bin/"))
1894 (site-dir (string-append out "/lib/perl5/site_perl/"))
1895 (lib-path (getenv "PERL5LIB")))
1896 (for-each (cut wrap-program <>
1897 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1898 (find-files bin-dir))
1901 "Lightweight application for searching and streaming videos from YouTube")
1903 "Youtube-viewer searches and plays YouTube videos in a native player.
1904 It comes with various search options; it can search for videos, playlists
1905 and/or channels. The videos are streamed directly in a selected video player
1906 at the best resolution (customizable) and with closed-captions (if available).
1907 Both command-line and GTK2 interface are available.")
1908 (home-page "https://github.com/trizen/youtube-viewer")
1909 (license license:perl-license)))
1911 (define-public libbluray
1917 (uri (string-append "https://download.videolan.org/videolan/"
1918 name "/" version "/"
1919 name "-" version ".tar.bz2"))
1922 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1923 (build-system gnu-build-system)
1925 `(#:configure-flags '("--disable-bdjava-jar")
1927 (modify-phases %standard-phases
1928 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1929 ;; Avoid the need to propagate libxml2 by referring to it
1930 ;; directly, as is already done for fontconfig & freetype.
1931 (lambda* (#:key inputs #:allow-other-keys)
1932 (let ((libxml2 (assoc-ref inputs "libxml2")))
1933 (substitute* "configure"
1934 ((" libxml-2.0") ""))
1935 (substitute* "src/libbluray.pc.in"
1936 (("^Libs.private:" field)
1937 (string-append field " -L" libxml2 "/lib -lxml2")))
1939 (add-before 'build 'fix-dlopen-paths
1940 (lambda* (#:key inputs #:allow-other-keys)
1941 (let ((libaacs (assoc-ref inputs "libaacs"))
1942 (libbdplus (assoc-ref inputs "libbdplus")))
1943 (substitute* "src/libbluray/disc/aacs.c"
1945 (string-append "\"" libaacs "/lib/libaacs\"")))
1946 (substitute* "src/libbluray/disc/bdplus.c"
1948 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1950 (native-inputs `(("pkg-config" ,pkg-config)))
1952 `(("fontconfig" ,fontconfig)
1953 ("freetype" ,freetype)
1954 ("libaacs" ,libaacs)
1955 ("libbdplus" ,libbdplus)
1956 ("libxml2" ,libxml2)))
1957 (home-page "https://www.videolan.org/developers/libbluray.html")
1958 (synopsis "Blu-Ray Disc playback library")
1960 "libbluray is a library designed for Blu-Ray Disc playback for media
1961 players, like VLC or MPlayer.")
1962 (license license:lgpl2.1+)))
1964 (define-public libdvdread
1970 (uri (string-append "https://download.videolan.org/videolan/"
1971 "libdvdread/" version "/"
1972 "libdvdread-" version ".tar.bz2"))
1975 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
1976 (build-system gnu-build-system)
1978 `(#:configure-flags '("--with-libdvdcss=yes")))
1980 `(("pkg-config" ,pkg-config)))
1982 `(("libdvdcss" ,libdvdcss)))
1983 (home-page "http://dvdnav.mplayerhq.hu/")
1984 (synopsis "Library for reading video DVDs")
1986 "Libdvdread provides a simple foundation for reading DVD video
1987 disks. It provides the functionality that is required to access many
1988 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1989 authentication and descrambling (if an external libdvdcss library is
1991 (license license:gpl2+)))
1993 (define-public dvdauthor
2000 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2004 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2005 (build-system gnu-build-system)
2007 `(("libdvdread" ,libdvdread)
2009 ("imagemagick" ,imagemagick)
2010 ("libxml2" ,libxml2)
2011 ("freetype" ,freetype)))
2013 `(("pkg-config" ,pkg-config)))
2014 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2015 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2016 MPEG-2 stream containing VOB packets.")
2017 (home-page "http://dvdauthor.sourceforge.net")
2018 (license license:gpl3+)))
2020 (define-public libdvdnav
2026 (uri (string-append "https://download.videolan.org/videolan/"
2027 "libdvdnav/" version "/"
2028 "libdvdnav-" version ".tar.bz2"))
2031 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2032 (build-system gnu-build-system)
2034 `(("pkg-config" ,pkg-config)))
2036 `(("libdvdread" ,libdvdread)))
2037 (home-page "http://dvdnav.mplayerhq.hu/")
2038 (synopsis "Library for video DVD navigation features")
2040 "Libdvdnav is a library for developers of multimedia
2041 applications. It allows easy use of sophisticated DVD navigation features
2042 such as DVD menus, multiangle playback and even interactive DVD games. All
2043 this functionality is provided through a simple API which provides the DVD
2044 playback as a single logical stream of blocks, intermitted by special
2045 dvdnav events to report certain conditions. The main usage of libdvdnav is
2046 a loop regularly calling a function to get the next block, surrounded by
2047 additional calls to tell the library of user interaction. The whole
2048 DVD virtual machine and internal playback states are completely
2050 (license license:gpl2+)))
2052 (define-public libdvdcss
2058 (uri (string-append "https://download.videolan.org/pub/"
2059 name "/" version "/"
2060 name "-" version ".tar.bz2"))
2063 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
2064 (build-system gnu-build-system)
2065 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2066 (synopsis "Library for accessing DVDs as block devices")
2068 "libdvdcss is a simple library designed for accessing DVDs like a block
2069 device without having to bother about the decryption.")
2070 (license license:gpl2+)))
2072 (define-public srt2vtt
2079 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2083 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
2084 (build-system gnu-build-system)
2086 `(("guile" ,guile-2.0)))
2087 (synopsis "SubRip to WebVTT subtitle converter")
2088 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2089 for use with HTML5 video.")
2090 (home-page "https://dthompson.us/projects/srt2vtt.html")
2091 (license license:gpl3+)))
2093 (define-public avidemux
2100 "mirror://sourceforge/avidemux/avidemux/" version "/"
2101 "avidemux_" version ".tar.gz"))
2104 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
2105 (patches (search-patches "avidemux-install-to-lib.patch"))))
2106 (build-system cmake-build-system)
2109 ("pkg-config" ,pkg-config)
2110 ("python" ,python-wrapper)
2111 ("qttools" ,qttools)
2113 ;; FIXME: Once packaged, add libraries not found during the build.
2115 `(("alsa-lib" ,alsa-lib)
2116 ("fontconfig" ,fontconfig)
2117 ("freetype" ,freetype)
2118 ("fribidi" ,fribidi)
2123 ("libvdpau" ,libvdpau)
2124 ("libvorbis" ,libvorbis)
2127 ("pulseaudio" ,pulseaudio)
2132 `(#:tests? #f ; no check target
2134 ;; Make sure files inside the included ffmpeg tarball are
2136 (let ((ffmpeg "ffmpeg-4.1.4"))
2137 (modify-phases %standard-phases
2138 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2140 (with-directory-excursion "avidemux_core/ffmpeg_package"
2141 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2142 (delete-file (string-append ffmpeg ".tar.bz2")))
2144 (add-after 'patch-source-shebangs 'repack-ffmpeg
2146 (with-directory-excursion "avidemux_core/ffmpeg_package"
2147 (substitute* (string-append ffmpeg "/configure")
2148 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2149 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2150 ;; avoid non-determinism in the archive
2151 "--sort=name" "--mtime=@0"
2152 "--owner=root:0" "--group=root:0")
2153 (delete-file-recursively ffmpeg))
2157 ;; Copy-paste settings from the cmake build system.
2158 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2159 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2162 (lambda* (#:key inputs outputs #:allow-other-keys)
2163 (let* ((out (assoc-ref outputs "out"))
2164 (lib (string-append out "/lib"))
2167 (lambda* (component srcdir #:optional (args '()))
2168 (let ((builddir (string-append "build_" component)))
2170 (with-directory-excursion builddir
2171 (apply invoke "cmake"
2172 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2173 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2174 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2175 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2176 "\"-Wl,-rpath=" lib "\"")
2177 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2178 (string-append "../" srcdir)
2182 (number->string (parallel-job-count)))
2183 (invoke "make" "install"))))))
2185 (build_component "core" "avidemux_core")
2186 (build_component "cli" "avidemux/cli")
2187 (build_component "qt4" "avidemux/qt4")
2188 (build_component "plugins_common" "avidemux_plugins"
2189 '("-DPLUGIN_UI=COMMON"))
2190 (build_component "plugins_cli" "avidemux_plugins"
2191 '("-DPLUGIN_UI=CLI"))
2192 (build_component "plugins_qt4" "avidemux_plugins"
2193 '("-DPLUGIN_UI=QT4"))
2194 (build_component "plugins_settings" "avidemux_plugins"
2195 '("-DPLUGIN_UI=SETTINGS"))
2196 ;; Remove .exe and .dll file.
2197 (delete-file-recursively
2198 (string-append out "/share/ADM6_addons"))
2200 (delete 'install)))))
2201 (home-page "http://fixounet.free.fr/avidemux/")
2202 (synopsis "Video editor")
2203 (description "Avidemux is a video editor designed for simple cutting,
2204 filtering and encoding tasks. It supports many file types, including AVI,
2205 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2206 can be automated using projects, job queue and powerful scripting
2208 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2209 ;; Software with various licenses is included, see License.txt.
2210 (license license:gpl2+)))
2212 (define-public vapoursynth
2214 (name "vapoursynth")
2219 (url "https://github.com/vapoursynth/vapoursynth.git")
2220 (commit (string-append "R" version))))
2221 (file-name (git-file-name name version))
2224 "1d298mlb24nlc2x7pixfbkd0qbpv4c706c32idsgpi96z1spkhvl"))))
2225 (build-system gnu-build-system)
2227 `(("autoconf" ,autoconf)
2228 ("automake" ,automake)
2229 ("cython" ,python-cython)
2230 ("libtool" ,libtool)
2231 ("pkg-config" ,pkg-config)
2235 `(("ffmpeg" ,ffmpeg)
2237 ("tesseract-ocr" ,tesseract-ocr)
2239 (home-page "http://www.vapoursynth.com/")
2240 (synopsis "Video processing framework")
2241 (description "VapourSynth is a C++ library and Python module for video
2242 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2243 multithreading, generalized colorspaces, per frame properties, and videos with
2245 ;; src/core/cpufeatures only allows x86, ARM or PPC
2246 (supported-systems (fold delete %supported-systems
2247 '("mips64el-linux" "aarch64-linux")))
2248 ;; As seen from the source files.
2249 (license license:lgpl2.1+)))
2258 "http://downloads.xvid.com/downloads/xvidcore-"
2259 version ".tar.bz2"))
2262 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
2263 (build-system gnu-build-system)
2264 (native-inputs `(("yasm" ,yasm)))
2267 (modify-phases %standard-phases
2268 (add-before 'configure 'pre-configure
2270 (chdir "build/generic")
2271 (substitute* "configure"
2272 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2274 #:tests? #f)) ; no test suite
2275 (home-page "https://www.xvid.com/")
2276 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2277 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2278 codec library. It uses ASP features such as b-frames, global and quarter
2279 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2280 and custom quantization matrices.")
2281 (license license:gpl2+)))
2283 (define-public streamlink
2290 (uri (pypi-uri "streamlink" version))
2293 "1s458k8z1lv0w8i82sxs8dys66fwm4yr9j1m7fzp7r0piz8phcpd"))))
2294 (build-system python-build-system)
2295 (home-page "https://github.com/streamlink/streamlink")
2297 `(("python-freezegun" ,python-freezegun)
2298 ("python-pytest" ,python-pytest)
2299 ("python-mock" ,python-mock)
2300 ("python-requests-mock" ,python-requests-mock)))
2302 `(("python-pysocks" ,python-pysocks)
2303 ("python-websocket-client" ,python-websocket-client)
2304 ("python-iso3166" ,python-iso3166)
2305 ("python-iso639" ,python-iso639)
2306 ("python-isodate" ,python-isodate)
2307 ("python-pycryptodome" ,python-pycryptodome)
2308 ("python-requests" ,python-requests)
2309 ("python-urllib3" ,python-urllib3)))
2310 (synopsis "Extract streams from various services")
2311 (description "Streamlink is command-line utility that extracts streams
2312 from sites like Twitch.tv and pipes them into a video player of choice.")
2313 (license license:bsd-2)))
2315 (define-public twitchy
2316 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2319 (version (git-version "3.4" "1" commit))
2324 (url "https://github.com/BasioMeusPuga/twitchy.git")
2326 (file-name (git-file-name name version))
2329 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2330 (build-system python-build-system)
2333 (modify-phases %standard-phases
2334 (add-after 'unpack 'patch-paths
2335 (lambda* (#:key inputs #:allow-other-keys)
2336 (substitute* "twitchy/twitchy_play.py"
2338 (string-append "\"" (assoc-ref inputs "streamlink")
2339 "/bin/streamlink ")))
2341 (add-before 'check 'check-setup
2343 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2345 (add-after 'install 'install-rofi-plugin
2346 (lambda* (#:key outputs #:allow-other-keys)
2347 (install-file "plugins/rofi-twitchy"
2348 (string-append (assoc-ref outputs "out")
2352 `(("python-requests" ,python-requests)
2353 ("streamlink" ,streamlink)))
2354 (home-page "https://github.com/BasioMeusPuga/twitchy")
2355 (synopsis "Command-line interface for Twitch.tv")
2357 "This package provides a command-line interface for Twitch.tv")
2358 (license license:gpl3+))))
2367 (url "https://github.com/mltframework/mlt.git")
2368 (commit (string-append "v" version))))
2369 (file-name (git-file-name name version))
2372 "14kayzas2wisyw0z27qkcm4qnxbdb7bqa0hg7gaj5kbm3nvsnafk"))))
2373 (build-system gnu-build-system)
2375 `(#:tests? #f ; no tests
2376 #:make-flags '("CC=gcc" "CXX=g++")
2378 (list "--enable-gpl3"
2381 (modify-phases %standard-phases
2383 'configure 'override-LDFLAGS
2384 (lambda* (#:key outputs #:allow-other-keys)
2385 (substitute* "config.mak"
2387 (string-append "LDFLAGS+=-Wl,-rpath="
2388 (assoc-ref outputs "out")
2392 `(("alsa-lib" ,alsa-lib)
2395 ("frei0r-plugins" ,frei0r-plugins)
2396 ("gdk-pixbuf" ,gdk-pixbuf)
2398 ("libxml2" ,libxml2)
2401 ("libsamplerate" ,libsamplerate)
2402 ("pulseaudio" ,pulseaudio)
2408 `(("pkg-config" ,pkg-config)))
2409 (home-page "https://www.mltframework.org/")
2410 (synopsis "Author, manage, and run multitrack audio/video compositions")
2412 "MLT is a multimedia framework, designed and developed for television
2413 broadcasting. It provides a toolkit for broadcasters, video editors, media
2414 players, transcoders, web streamers and many more types of applications. The
2415 functionality of the system is provided via an assortment of ready to use
2416 tools, XML authoring components, and an extensible plug-in based API.")
2417 (license license:gpl3)))
2419 (define-public v4l-utils
2425 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2426 "/v4l-utils-" version ".tar.bz2"))
2429 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2430 (build-system gnu-build-system)
2433 (list (string-append "--with-udevdir="
2434 (assoc-ref %outputs "out")
2438 ("pkg-config" ,pkg-config)))
2440 `(("alsa-lib" ,alsa-lib)
2442 ("libjpeg" ,libjpeg-turbo)
2446 (synopsis "Realtime video capture utilities for Linux")
2447 (description "The v4l-utils provide a series of libraries and utilities to
2448 be used for realtime video capture via Linux-specific APIs.")
2449 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2450 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2451 (license (list license:lgpl2.1+ license:gpl2))))
2460 (url "https://github.com/obsproject/obs-studio.git")
2462 (file-name (git-file-name name version))
2465 "0j2k65q3wfyfxhvkl6icz4qy0s3kfqhksizy2i3ah7yml266axbj"))))
2466 (build-system cmake-build-system)
2468 `(#:tests? #f ; no test suite
2470 (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version))))
2472 `(("pkg-config" ,pkg-config)))
2474 `(("alsa-lib" ,alsa-lib)
2478 ("fontconfig" ,fontconfig)
2479 ("freetype" ,freetype)
2481 ("jansson" ,jansson)
2482 ("libx264" ,libx264)
2483 ("libxcomposite" ,libxcomposite)
2484 ("mbedtls" ,mbedtls-apache)
2486 ("pulseaudio" ,pulseaudio)
2489 ("qtx11extras" ,qtx11extras)
2491 ("v4l-utils" ,v4l-utils)
2493 (synopsis "Live streaming software")
2494 (description "Open Broadcaster Software provides a graphical interface for
2495 video recording and live streaming. OBS supports capturing audio and video
2496 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2498 (home-page "https://obsproject.com")
2499 (supported-systems '("x86_64-linux" "i686-linux"))
2500 (license license:gpl2+)))
2502 (define-public libvdpau
2510 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2512 (file-name (git-file-name name version))
2515 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2516 (build-system meson-build-system)
2518 `(("pkg-config" ,pkg-config)))
2520 `(("libx11" ,libx11 "out")
2521 ("libxext" ,libxext)
2522 ("xorgproto" ,xorgproto)))
2523 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2524 (synopsis "Video Decode and Presentation API")
2525 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2526 provides an interface to video decode acceleration and presentation hardware
2527 present in modern GPUs.")
2528 (license (license:x11-style "file://COPYING"))))
2530 (define-public vdpauinfo
2537 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2538 name "-" version ".tar.gz"))
2541 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2542 (build-system gnu-build-system)
2544 `(("pkg-config" ,pkg-config)
2545 ("libx11" ,libx11)))
2547 `(("libvdpau" ,libvdpau)))
2548 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2549 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2550 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2552 (license (license:x11-style "file://COPYING"))))
2554 (define-public libvdpau-va-gl
2556 (name "libvdpau-va-gl")
2561 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2562 "releases/download/v" version "/libvdpau-va-gl-"
2566 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2567 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2568 (modules '((guix build utils)))
2569 (snippet '(begin (delete-file-recursively "3rdparty")
2571 (build-system cmake-build-system)
2573 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2575 `(("libvdpau" ,libvdpau)
2576 ("pkg-config" ,pkg-config)))
2580 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2581 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2583 "Many applications can use VDPAU to accelerate portions of the video
2584 decoding process and video post-processing to the GPU video hardware. Since
2585 there is no VDPAU available on Intel chips, they fall back to different drawing
2586 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2587 scaling and VA-API (if available) to accelerate video decoding.")
2588 (license license:expat)))
2590 (define-public recordmydesktop
2592 (name "recordmydesktop")
2596 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2597 version "/recordmydesktop-" version ".tar.gz"))
2600 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2601 (build-system gnu-build-system)
2602 (inputs `(("popt" ,popt)
2607 ("libxfixes" ,libxfixes)
2608 ("libxdamage" ,libxdamage)
2609 ("libxext" ,libxext)
2610 ("alsa-lib" ,alsa-lib)
2611 ("libvorbis" ,libvorbis)
2612 ("libtheora" ,libtheora)))
2613 (home-page "http://recordmydesktop.sourceforge.net/")
2614 (synopsis "Desktop session video recorder")
2616 "recordMyDesktop is a command-line tool that captures the activity in
2617 your graphical desktop and encodes it as a video. This is a useful tool for
2618 making @dfn{screencasts}.")
2619 (license license:gpl2+)))
2621 (define-public simplescreenrecorder
2623 (name "simplescreenrecorder")
2629 (url "https://github.com/MaartenBaert/ssr.git")
2631 (file-name (git-file-name name version))
2634 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2635 (build-system cmake-build-system)
2636 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2637 ;; README.md, the program builds and functions properly without them.
2638 ;; As a result, they are omitted. Please add them back if problems appear.
2640 `(("alsa-lib" ,alsa-lib)
2645 ("pulseaudio" ,pulseaudio)
2647 ("qtx11extras" ,qtx11extras)))
2648 (native-inputs `(("pkg-config" ,pkg-config)))
2651 (list "-DWITH_QT5=TRUE")
2652 #:tests? #f)) ; no test suite
2653 ;; Using HTTPS causes part of the page to be displayed improperly.
2654 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
2655 (synopsis "Screen recorder")
2656 (description "SimpleScreenRecorder is an easy to use screen recorder with
2657 a graphical user interface. It supports recording the entire screen, or a
2658 part of it, and allows encoding in many different codecs and file formats.
2659 Other features include a live preview and live streaming.")
2660 (license (list license:gpl3+ ; most files
2661 license:zlib ; glinject/elfhacks.*
2662 license:isc ; glinject/*
2663 license:x11)))) ; build-aux/install-sh
2665 (define-public libsmpeg
2668 (version "0.4.5-401")
2672 (url "svn://svn.icculus.org/smpeg/trunk/")
2673 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2674 (file-name (string-append name "-" version "-checkout"))
2677 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2678 (build-system gnu-build-system)
2680 ;; libsmpeg fails to build with -std=c++11, which is the default with
2681 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2682 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
2684 `(("autoconf" ,autoconf)
2685 ("automake" ,automake)))
2688 (home-page "https://icculus.org/smpeg/")
2689 (synopsis "SDL MPEG decoding library")
2691 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2692 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2693 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2694 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2695 and MPEG system streams.")
2696 (license (list license:expat
2702 (define-public libsmpeg-with-sdl1
2703 (package (inherit libsmpeg)
2705 (version "0.4.5-399")
2709 (url "svn://svn.icculus.org/smpeg/trunk/")
2710 (revision 399))) ; tagged release 0.4.5
2711 (file-name (string-append name "-" version "-checkout"))
2714 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2718 (define-public libbdplus
2725 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2726 version "/" name "-" version ".tar.bz2"))
2728 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2730 `(("libgcrypt" ,libgcrypt)))
2731 (build-system gnu-build-system)
2732 (home-page "https://www.videolan.org/developers/libbdplus.html")
2733 (synopsis "Library for decrypting certain Blu-Ray discs")
2734 (description "libbdplus is a library which implements the BD+ System
2736 (license license:lgpl2.1+)))
2738 (define-public libaacs
2745 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2746 version "/" name "-" version ".tar.bz2"))
2748 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2750 `(("libgcrypt" ,libgcrypt)))
2754 (build-system gnu-build-system)
2755 (home-page "https://www.videolan.org/developers/libaacs.html")
2756 (synopsis "Library for decrypting certain Blu-Ray discs")
2757 (description "libaacs is a library which implements the Advanced Access
2758 Content System specification.")
2759 (license license:lgpl2.1+)))
2761 (define-public mps-youtube
2763 (name "mps-youtube")
2769 (url "https://github.com/mps-youtube/mps-youtube.git")
2770 (commit (string-append "v" version))))
2771 (file-name (git-file-name name version))
2774 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2775 (build-system python-build-system)
2777 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2778 ;; test suite results differ depending on the country and also introduce
2779 ;; non-determinism in the tests.
2780 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2783 `(("python-pafy" ,python-pafy)
2784 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2785 (home-page "https://github.com/mps-youtube/mps-youtube")
2786 (synopsis "Terminal based YouTube player and downloader")
2788 "@code{mps-youtube} is based on mps, a terminal based program to
2789 search, stream and download music. This implementation uses YouTube as
2790 a source of content and can play and download video as well as audio.
2791 It can use either mpv or mplayer for playback, and for conversion of
2792 formats ffmpeg or libav is used. Users should install one of the
2793 supported players in addition to this package.")
2794 (license license:gpl3+)))
2796 (define-public handbrake
2802 (uri (string-append "https://github.com/HandBrake/HandBrake/"
2803 "releases/download/" version "/"
2804 "HandBrake-" version "-source.tar.bz2"))
2807 "11bzhyp052bmng5119x74xvdj5632smx6qsk537ygda8bzckg2i1"))
2808 (modules '((guix build utils)))
2810 ;; Remove "contrib" and source not necessary for
2811 ;; building/running under a GNU environment.
2813 (for-each delete-file-recursively
2814 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
2815 (substitute* "make/include/main.defs"
2816 ;; Disable unconditional inclusion of "contrib" libraries
2817 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2818 ;; which would lead to fetching and building of these
2819 ;; libraries. Use our own instead.
2820 (("MODULES \\+= contrib") "# MODULES += contrib"))
2822 (build-system glib-or-gtk-build-system)
2824 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
2825 ("autoconf" ,autoconf)
2826 ("intltool" ,intltool)
2827 ("libtool" ,libtool)
2828 ("pkg-config" ,pkg-config)
2829 ("python" ,python-2))) ; For configuration
2832 ("dbus-glib" ,dbus-glib)
2834 ("fontconfig" ,fontconfig)
2835 ("freetype" ,freetype)
2837 ("gstreamer" ,gstreamer)
2838 ("gst-plugins-base" ,gst-plugins-base)
2840 ("jansson" ,jansson)
2843 ("libbluray" ,libbluray)
2845 ("libdvdnav" ,libdvdnav)
2846 ("libdvdread" ,libdvdread)
2847 ("libgudev" ,libgudev)
2848 ("libmpeg2" ,libmpeg2)
2849 ("libnotify" ,libnotify)
2850 ("libnuma" ,numactl)
2853 ("libsamplerate" ,libsamplerate)
2854 ("libtheora" ,libtheora)
2855 ("libvorbis" ,libvorbis)
2857 ("libxml2" ,libxml2)
2858 ("libx264" ,libx264)
2863 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2865 (list "--disable-gtk-update-checks"
2867 (string-append "CPPFLAGS=-I"
2868 (assoc-ref %build-inputs "libxml2")
2872 (modify-phases %standard-phases
2874 ;; Run bootstrap ahead of time so that shebangs get patched.
2876 (setenv "CONFIG_SHELL" (which "sh"))
2877 ;; Patch the Makefile so that it doesn't bootstrap again.
2878 (substitute* "gtk/module.rules"
2879 ((".*autoreconf.*") ""))
2880 (with-directory-excursion "gtk"
2881 (invoke "autoreconf" "-fiv"))))
2882 (add-before 'configure 'patch-SHELL
2884 (substitute* "gtk/po/Makefile.in.in"
2885 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
2887 (add-before 'configure 'relax-reqs
2889 (substitute* "make/configure.py"
2890 ;; cmake is checked for so that it can be used to build
2891 ;; contrib/harfbuzz and contrib/x265, but we get these as
2892 ;; inputs, so don't abort if it's not found. Similarly, meson
2893 ;; and ninja are only needed for contrib/libdav1d, and nasm
2895 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
2896 (string-append & "False")))
2899 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2900 ;; 'configure' is not an autoconf-generated script, and
2901 ;; errors on unrecognized arguments,
2902 ;; e.g. --enable-fast-install
2903 (let ((out (assoc-ref outputs "out")))
2904 (apply invoke "./configure"
2905 (string-append "--prefix=" out)
2906 (or configure-flags '())))))
2907 (add-after 'configure 'chdir-build
2908 (lambda _ (chdir "./build") #t)))))
2909 (home-page "https://handbrake.fr")
2910 (synopsis "Video transcoder")
2912 "HandBrake is a tool for converting video from any format to a selection
2913 of modern, widely supported codecs.")
2914 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2915 ;; Combination under GPLv2. See LICENSE.
2916 (license license:gpl2)))
2918 (define-public intel-vaapi-driver
2920 (name "intel-vaapi-driver")
2926 (url "https://github.com/intel/intel-vaapi-driver")
2929 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
2930 (file-name (git-file-name name version))))
2931 (build-system gnu-build-system)
2933 `(("autoconf" ,autoconf)
2934 ("automake" ,automake)
2935 ("libtool" ,libtool)
2936 ("pkg-config" ,pkg-config)))
2938 `(("libdrm" ,libdrm)
2940 ("libx11" ,libx11)))
2943 (modify-phases %standard-phases
2944 (add-before 'configure 'set-target-directory
2945 (lambda* (#:key outputs #:allow-other-keys)
2946 (let ((out (assoc-ref outputs "out")))
2947 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2949 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2950 ;; this to all VA-API back ends instead of once to libva.
2951 (native-search-paths
2952 (list (search-path-specification
2953 (variable "LIBVA_DRIVERS_PATH")
2954 (files '("lib/dri")))))
2955 (supported-systems '("i686-linux" "x86_64-linux"))
2956 (home-page "https://01.org/linuxmedia/vaapi")
2957 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2959 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2960 hardware-accelerated video processing on Intel GEN Graphics devices supported by
2961 the i915 driver, such as integrated Intel HD Graphics. It provides access to
2962 both hardware and shader functionality for faster encoding, decoding, and
2963 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2964 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2965 license:expat)))) ; the rest, excluding the test suite
2967 (define-public openh264
2974 (url "https://github.com/cisco/openh264")
2975 (commit (string-append "v" version))))
2976 (file-name (git-file-name name version))
2979 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
2980 (build-system gnu-build-system)
2983 ("python" ,python)))
2985 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2987 #:test-target "test"
2988 #:phases (modify-phases %standard-phases
2989 ;; no configure script
2990 (delete 'configure))))
2991 (home-page "https://www.openh264.org/")
2992 (synopsis "H264 decoder library")
2994 "Openh264 is a library which can decode H264 video streams.")
2995 (license license:bsd-2)))
2997 (define-public libmp4v2
3004 ;; XXX: The new location of upstream is uncertain and will become relevant the
3005 ;; moment when the googlecode archive shuts down. It is past the date it
3006 ;; should've been turned off. I tried to communicate with upstream, but this
3007 ;; wasn't very responsive and not very helpful. The short summary is, it is
3008 ;; chaos when it comes to the amount of forks and only time will tell where
3009 ;; the new upstream location is.
3010 (uri (string-append "https://storage.googleapis.com/google-"
3011 "code-archive-downloads/v2/"
3012 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
3013 (file-name (string-append name "-" version ".tar.bz2"))
3014 (patches (search-patches "libmp4v2-c++11.patch"))
3017 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
3018 (build-system gnu-build-system)
3020 "static")) ; 3.7MiB .a file
3023 (modify-phases %standard-phases
3024 (add-after 'unpack 'remove-dates
3026 ;; Make the build reproducible.
3027 (substitute* "configure"
3028 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
3029 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
3031 (add-after 'install 'move-static-libraries
3032 (lambda* (#:key outputs #:allow-other-keys)
3033 ;; Move static libraries to the "static" output.
3034 (let* ((out (assoc-ref outputs "out"))
3035 (lib (string-append out "/lib"))
3036 (static (assoc-ref outputs "static"))
3037 (slib (string-append static "/lib")))
3039 (for-each (lambda (file)
3040 (install-file file slib)
3042 (find-files lib "\\.a$"))
3045 `(("help2man" ,help2man)
3046 ("dejagnu" ,dejagnu)))
3047 (home-page "https://code.google.com/archive/p/mp4v2/")
3048 (synopsis "API to create and modify mp4 files")
3050 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3051 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3052 file format that has been used as a multimedia file format in a variety of platforms and
3053 applications. It is a very powerful and extensible format that can accommodate
3054 practically any type of media.")
3055 (license license:mpl1.1)))
3057 (define-public libmediainfo
3059 (name "libmediainfo")
3063 (uri (string-append "https://mediaarea.net/download/source/"
3064 name "/" version "/"
3065 name "_" version ".tar.xz"))
3068 "0wkzj5s34m8dvy7hif4h8f90q8ncrzd930gij1zzw3h5nw732j38"))))
3069 ;; TODO add a Big Buck Bunny webm for tests.
3071 `(("autoconf" ,autoconf)
3072 ("automake" ,automake)
3073 ("libtool" ,libtool)
3074 ("pkg-config" ,pkg-config)
3076 ("tinyxml2" ,tinyxml2)
3078 ("libzen" ,libzen)))
3079 (build-system gnu-build-system)
3081 '(#:tests? #f ; see above TODO
3083 ;; build scripts not in root of archive
3084 (modify-phases %standard-phases
3085 (add-after 'unpack 'change-to-build-dir
3087 (chdir "Project/GNU/Library")
3089 (home-page "https://mediaarea.net/en/MediaInfo")
3090 (synopsis "Library for retrieving media metadata")
3091 (description "MediaInfo is a library used for retrieving technical
3092 information and other metadata about audio or video files. A non-exhaustive
3093 list of the information MediaInfo can retrieve from media files include:
3096 @item General: title, author, director, album, track number, date, duration...
3097 @item Video: codec, aspect, fps, bitrate...
3098 @item Audio: codec, sample rate, channels, language, bitrate...
3099 @item Text: language of subtitle
3100 @item Chapters: number of chapters, list of chapters
3103 MediaInfo supports the following formats:
3106 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3107 MPEG-2, MPEG-4, DVD (VOB)...
3108 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3109 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3110 @item Subtitles: SRT, SSA, ASS, SAMI...
3112 (license license:bsd-2)))
3114 ;; TODO also have a GUI version available
3115 (define-public mediainfo
3121 ;; Warning: This source has proved unreliable 1 time at least.
3122 ;; Consider an alternate source or report upstream if this
3124 (uri (string-append "https://mediaarea.net/download/source/"
3125 name "/" version "/"
3126 name "_" version ".tar.xz"))
3129 "1f1shnycf0f1fwka9k9s250l228xjkg0k4k73h8bpld8msighgnw"))))
3131 `(("autoconf" ,autoconf)
3132 ("automake" ,automake)
3133 ("libtool" ,libtool)
3134 ("pkg-config" ,pkg-config)
3136 ("libmediainfo" ,libmediainfo)
3137 ("libzen" ,libzen)))
3138 (build-system gnu-build-system)
3140 '(#:tests? #f ; lacks tests
3142 ;; build scripts not in root of archive
3143 (modify-phases %standard-phases
3144 (add-after 'unpack 'change-to-build-dir
3146 (chdir "Project/GNU/CLI")
3148 (home-page "https://mediaarea.net/en/MediaInfo")
3149 (synopsis "Utility for reading media metadata")
3150 (description "MediaInfo is a utility used for retrieving technical
3151 information and other metadata about audio or video files. It supports the
3152 many codecs and formats supported by libmediainfo.")
3153 (license license:bsd-2)))
3155 (define-public livemedia-utils
3157 (name "livemedia-utils")
3158 (version "2019.05.29")
3162 "https://download.videolan.org/contrib/live555/live."
3166 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
3167 (build-system gnu-build-system)
3169 '(#:tests? #f ; no tests
3170 #:make-flags (list "CC=gcc"
3171 (string-append "LDFLAGS=-Wl,-rpath="
3172 (assoc-ref %outputs "out") "/lib")
3173 (string-append "PREFIX="
3174 (assoc-ref %outputs "out")))
3175 #:phases (modify-phases %standard-phases
3176 (add-before 'configure 'fix-makefiles-generation
3178 (substitute* "genMakefiles"
3183 (invoke "./genMakefiles"
3184 "linux-with-shared-libraries"))))))
3185 (home-page "http://www.live555.com/liveMedia/")
3186 (synopsis "Set of C++ libraries for multimedia streaming")
3187 (description "This code forms a set of C++ libraries for multimedia
3188 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3189 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3190 JPEG video, and several audio codecs. They can easily be extended to support
3191 additional (audio and/or video) codecs, and can also be used to build basic
3192 RTSP or SIP clients and servers.")
3193 (license license:lgpl3+)))
3195 (define-public libdvbpsi
3202 "https://download.videolan.org/pub/libdvbpsi/"
3203 version "/libdvbpsi-" version ".tar.bz2"))
3206 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
3207 (build-system gnu-build-system)
3208 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3209 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3211 (description "libdvbpsi is a simple library designed for decoding and
3212 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3213 and ITU-T H.222.0.")
3214 (license license:lgpl2.1)))
3216 (define-public ffms2
3220 (home-page "https://github.com/FFMS/ffms2")
3224 (url "https://github.com/FFMS/ffms2.git")
3226 (file-name (git-file-name name version))
3229 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3230 (build-system gnu-build-system)
3233 (list "--enable-avresample")))
3237 `(("ffmpeg" ,ffmpeg)))
3239 `(("pkg-config" ,pkg-config)))
3240 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3242 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3243 programmers to access a standard API to open and decompress media files.")
3244 ;; sources are distributed under a different license that the binary.
3245 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3246 (license license:gpl2+))); inherits from ffmpeg
3248 (define-public aegisub
3255 "http://ftp.aegisub.org/pub/archives/releases/source/"
3256 name "-" version ".tar.xz"))
3259 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3260 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3261 "aegisub-make43.patch"
3262 "aegisub-boost68.patch"))))
3263 (build-system gnu-build-system)
3266 (list "--disable-update-checker"
3267 "--without-portaudio"
3270 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3271 ;; tests require busted, a lua package we don't have yet
3274 (modify-phases %standard-phases
3275 (add-before 'configure 'fix-ldflags
3277 (setenv "LDFLAGS" "-pthread")
3279 (add-after 'unpack 'fix-boost-headers
3282 '("src/subtitles_provider_libass.cpp"
3283 "src/colour_button.cpp"
3284 "src/video_provider_dummy.cpp"
3285 "./src/video_frame.cpp")
3286 (("#include <boost/gil/gil_all.hpp>")
3287 "#include <boost/gil.hpp>"))
3293 ("hunspell" ,hunspell)
3296 ("alsa-lib" ,alsa-lib)
3297 ("pulseaudio" ,pulseaudio)
3299 ("freetype" ,freetype)
3300 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3302 `(("intltool" ,intltool)
3303 ("desktop-file-utils" ,desktop-file-utils)
3304 ("pkg-config" ,pkg-config)))
3305 (home-page "http://www.aegisub.org/")
3306 (synopsis "Subtitle engine")
3308 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3309 it quick and easy to time subtitles to audio, and features many powerful
3310 tools for styling them, including a built-in real-time video preview.")
3311 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3312 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3313 license:expat)))) ; and src/gl that is under a license similar
3314 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3315 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3316 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3318 (define-public gst-transcoder
3320 (name "gst-transcoder")
3326 (url "https://github.com/pitivi/gst-transcoder.git")
3328 (file-name (git-file-name name version))
3331 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3332 (build-system meson-build-system)
3334 `(("gobject-introspection" ,gobject-introspection)
3336 ("gstreamer" ,gstreamer)
3337 ("gst-plugins-base" ,gst-plugins-base)))
3339 `(("python" ,python)
3340 ("pkg-config" ,pkg-config)))
3341 (home-page "https://github.com/pitivi/gst-transcoder/")
3342 (synopsis "GStreamer Transcoding API")
3343 (description "GStreamer Transcoding API")
3344 (license license:lgpl2.1)))
3353 (uri (string-append "mirror://sourceforge/gmerlin/"
3354 name "/" version "/"
3355 name "-" version ".tar.gz"))
3356 (file-name (string-append name "-" version ".tar.gz"))
3359 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3360 (build-system gnu-build-system)
3362 '(#:configure-flags '("LIBS=-lm")))
3364 `(("pkg-config" ,pkg-config)
3365 ("doxygen" ,doxygen)))
3366 (home-page "http://gmerlin.sourceforge.net")
3367 (synopsis "Low level library for multimedia API building")
3369 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3370 library, upon which multimedia APIs can be built. Gavl handles all the
3371 details of audio and video formats like colorspaces, sample rates,
3372 multichannel configurations, etc. It provides standardized definitions for
3373 those formats as well as container structures for carrying audio samples or
3374 video images inside an application.
3376 In addition, it handles the sometimes ugly task of converting between all
3377 these formats and provides some elementary operations (copying, scaling,
3378 alpha blending etc).")
3379 (license license:gpl3)))
3381 (define-public frei0r-plugins
3383 (name "frei0r-plugins")
3388 (uri (string-append "https://files.dyne.org/frei0r/"
3389 "frei0r-plugins-" version ".tar.gz"))
3392 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
3393 (build-system gnu-build-system)
3396 (modify-phases %standard-phases
3397 (add-after 'unpack 'patch-Makefile
3399 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3400 ;; names in the tarball. Try removing this for future versions.
3401 (substitute* "Makefile.in"
3402 (("README\\.md ChangeLog TODO AUTHORS")
3403 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3405 ;; TODO: opencv for additional face detection filters.
3410 `(("pkg-config" ,pkg-config)))
3411 (home-page "https://www.dyne.org/software/frei0r/")
3412 (synopsis "Minimalistic plugin API for video effects")
3414 "Frei0r is a minimalistic plugin API for video effects.
3415 The main emphasis is on simplicity for an API that will round up
3416 the most common video effects into simple filters, sources and
3417 mixers that can be controlled by parameters. Frei0r wants to
3418 provide a way to share these simple effects between many
3419 applications, avoiding their reimplementation by different projects.
3420 It counts more than 100 plugins.")
3421 (license (list license:gpl2+
3422 ;; The following files are licensed as LGPL2.1+:
3423 ;; src/generator/ising0r/ising0r.c
3424 ;; src/generator/onecol0r/onecol0r.cpp
3425 ;; src/generator/nois0r/nois0r.cpp
3426 ;; src/generator/lissajous0r/lissajous0r.cpp
3427 ;; src/filter/ndvi/gradientlut.hpp
3428 ;; src/filter/ndvi/ndvi.cpp
3429 ;; src/filter/facedetect/facedetect.cpp
3430 license:lgpl2.1+))))
3432 (define-public motion
3436 (home-page "https://motion-project.github.io/")
3440 (url "https://github.com/Motion-Project/motion.git")
3441 (commit (string-append "release-" version))))
3444 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3445 (file-name (git-file-name name version))))
3446 (build-system gnu-build-system)
3448 `(("autoconf" ,autoconf-wrapper)
3449 ("automake" ,automake)
3450 ("gettext" ,gettext-minimal)
3451 ("pkg-config" ,pkg-config)))
3453 `(("libjpeg" ,libjpeg-turbo)
3454 ("ffmpeg" ,ffmpeg-3.4)
3455 ("libmicrohttpd" ,libmicrohttpd)
3456 ("sqlite" ,sqlite)))
3458 '(#:phases (modify-phases %standard-phases
3461 (patch-shebang "version.sh")
3462 (invoke "autoreconf" "-vfi"))))
3463 #:configure-flags '("--sysconfdir=/etc")
3464 #:make-flags (list (string-append "sysconfdir="
3465 (assoc-ref %outputs "out")
3468 #:tests? #f)) ; no 'check' target
3469 (synopsis "Detect motion from video signals")
3471 "Motion is a program that monitors the video signal from one or more
3472 cameras and is able to detect if a significant part of the picture has
3473 changed. Or in other words, it can detect motion.")
3475 ;; Some files say "version 2" and others "version 2 or later".
3476 (license license:gpl2)))
3478 (define-public subdl
3479 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3483 (version (git-version "1.0.3" revision commit))
3487 (url "https://github.com/alexanderwink/subdl.git")
3489 (file-name (git-file-name name version))
3492 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3493 (build-system trivial-build-system)
3495 `(#:modules ((guix build utils))
3497 (use-modules (guix build utils))
3498 (let* ((out (assoc-ref %outputs "out"))
3499 (bin (string-append out "/bin"))
3500 (source (assoc-ref %build-inputs "source"))
3501 (python (assoc-ref %build-inputs "python")))
3502 (install-file (string-append source "/subdl") bin)
3503 (patch-shebang (string-append bin "/subdl")
3504 (list (string-append python "/bin")))))))
3505 (inputs `(("python" ,python)))
3506 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3507 (description "Subdl is a command-line tool for downloading subtitles from
3508 opensubtitles.org. By default, it will search for English subtitles, display
3509 the results, download the highest-rated result in the requested language and
3510 save it to the appropriate filename.")
3511 (license license:gpl3+)
3512 (home-page "https://github.com/alexanderwink/subdl"))))
3514 (define-public l-smash
3521 (url "https://github.com/l-smash/l-smash.git")
3522 (commit (string-append "v" version))))
3523 (file-name (git-file-name name version))
3526 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3527 (build-system gnu-build-system)
3529 `(#:tests? #f ;no tests
3531 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3532 (assoc-ref %outputs "out") "/lib"))
3534 (modify-phases %standard-phases
3535 ;; configure fails if it is followed by CONFIG_SHELL
3537 (lambda* (#:key outputs #:allow-other-keys)
3538 (let ((out (assoc-ref outputs "out")))
3539 (invoke "./configure" (string-append "--prefix=" out)
3540 "--disable-static")))))))
3542 `(("which" ,which)))
3543 (home-page "https://l-smash.github.io/l-smash/")
3544 (synopsis "MP4 multiplexer and demultiplexer library")
3546 "L-SMASH is a cross-platform library that handles the ISO base media file
3547 format and some of its derived file formats, including MP4. It operates as a
3548 multiplexer and demultiplexer, and can mux video and audio in several formats
3549 using standalone executable files.")
3550 (license license:isc)))
3552 (define-public qtfaststart
3554 (name "qtfaststart")
3558 (uri (pypi-uri "qtfaststart" version))
3561 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3562 (build-system python-build-system)
3564 '(#:tests? #f)) ; no test suite
3565 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3566 (description "qtfaststart enables streaming and pseudo-streaming of
3567 QuickTime and MP4 files by moving metadata and offset information to the
3568 beginning of the file. It can also print some useful information about the
3569 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3570 project, which is released into the public domain, as well as ISO 14496-12:2005
3571 (the official spec for MP4), which can be obtained from the ISO or found
3573 (home-page "https://github.com/danielgtaylor/qtfaststart")
3574 (license license:expat)))
3576 (define-public vidstab
3577 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3581 (version (git-version "1.1.0" revision commit))
3585 (url "https://github.com/georgmartius/vid.stab.git")
3587 (file-name (git-file-name name version))
3590 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3591 (build-system cmake-build-system)
3593 '(#:tests? #f)) ; tests are not run as part of standard build process
3594 (home-page "http://public.hronopik.de/vid.stab/")
3595 (synopsis "Video stabilization library")
3596 (description "Vidstab is a video stabilization library which can be used
3597 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3598 vehicle typically suffers from undesirable shakes and jitters. Activities such
3599 as surfing, skiing, riding and walking while shooting videos are especially
3600 prone to erratic camera shakes. Vidstab targets these video contents to help
3601 create smoother and stable videos.")
3602 (license license:gpl2+))))
3604 (define-public libopenshot
3606 (name "libopenshot")
3611 (url "https://github.com/OpenShot/libopenshot")
3612 (commit (string-append "v" version))))
3613 (file-name (git-file-name name version))
3616 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
3617 (modules '((guix build utils)))
3619 ;; Allow overriding of the python installation dir
3620 (substitute* "src/bindings/python/CMakeLists.txt"
3621 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3622 (string-append set " CACHE PATH "
3623 "\"Python bindings directory\")")))
3624 (delete-file-recursively "thirdparty")
3626 (build-system cmake-build-system)
3628 `(("pkg-config" ,pkg-config)
3631 ("unittest++" ,unittest-cpp)))
3632 (propagated-inputs ;all referenced in installed headers
3633 `(("cppzmq" ,cppzmq)
3635 ("imagemagick" ,imagemagick)
3636 ("jsoncpp" ,jsoncpp)
3637 ("libopenshot-audio" ,libopenshot-audio)
3639 ("qtmultimedia" ,qtmultimedia)
3640 ("zeromq" ,zeromq)))
3643 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3644 ,(version-major+minor (package-version python))
3646 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3648 (modify-phases %standard-phases
3649 (add-before 'configure 'set-vars
3650 (lambda* (#:key inputs #:allow-other-keys)
3651 (setenv "LIBOPENSHOT_AUDIO_DIR"
3652 (assoc-ref inputs "libopenshot-audio"))
3654 (assoc-ref inputs "zeromq"))
3655 (setenv "UNITTEST_DIR"
3656 (string-append (assoc-ref inputs "unittest++")
3657 "/include/UnitTest++"))
3659 (home-page "https://openshot.org")
3660 (synopsis "Video-editing, animation, and playback library")
3661 (description "OpenShot Library (libopenshot) is a powerful C++ video
3662 editing library with a multi-threaded and feature rich video editing
3663 API. It includes bindings for Python, Ruby, and other languages.")
3664 (license license:lgpl3+)))
3666 (define-public openshot
3673 (url "https://github.com/OpenShot/openshot-qt")
3674 (commit (string-append "v" version))))
3675 (file-name (git-file-name name version))
3678 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
3679 (modules '((guix build utils)))
3682 ;; TODO: Unbundle jquery and others from src/timeline/media
3683 (delete-file-recursively "src/images/fonts") #t))))
3684 (build-system python-build-system)
3686 `(("ffmpeg" ,ffmpeg)
3687 ("font-ubuntu" ,font-ubuntu)
3688 ("libopenshot" ,libopenshot)
3690 ("python-pyqt" ,python-pyqt)
3691 ("python-pyzmq" ,python-pyzmq)
3692 ("python-requests" ,python-requests)
3695 `(#:modules ((guix build python-build-system)
3696 (guix build qt-utils)
3698 #:imported-modules (,@%python-build-system-modules
3699 (guix build qt-utils))
3700 #:phases (modify-phases %standard-phases
3701 (delete 'build) ;install phase does all the work
3704 (setenv "QT_QPA_PLATFORM" "offscreen")
3705 (invoke "python" "src/tests/query_tests.py")))
3706 (add-after 'unpack 'patch-font-location
3707 (lambda* (#:key inputs #:allow-other-keys)
3708 (let ((font (assoc-ref inputs "font-ubuntu")))
3709 (substitute* "src/classes/app.py"
3710 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3711 (("fonts") "share/fonts/truetype")))
3713 (add-before 'install 'set-tmp-home
3715 ;; src/classes/info.py "needs" to create several
3716 ;; directories in $HOME when loaded during build
3717 (setenv "HOME" "/tmp")
3719 (add-after 'install 'wrap-program
3720 (lambda* (#:key outputs #:allow-other-keys)
3721 (let ((out (assoc-ref outputs "out")))
3722 (wrap-qt-program out "openshot-qt"))
3724 (home-page "https://www.openshot.org/")
3725 (synopsis "Video editor")
3726 (description "OpenShot takes your videos, photos, and music files and
3727 helps you create the film you have always dreamed of. Easily add sub-titles,
3728 transitions, and effects and then export your film to many common formats.")
3729 (license license:gpl3+)))
3731 (define-public dav1d
3738 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3739 "/dav1d/" version "/dav1d-" version ".tar.xz"))
3742 "0xcykraf42gkymzqx1k1lcdclgk9y5yf7rr56vslrgmr0r849qnk"))))
3743 (build-system meson-build-system)
3744 (native-inputs `(("nasm" ,nasm)))
3745 (home-page "https://code.videolan.org/videolan/dav1d")
3746 (synopsis "AV1 decoder")
3747 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3748 speed and correctness.")
3749 (license license:bsd-2)))
3751 (define-public wlstream
3752 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3756 (version (git-version "0.0" revision commit))
3761 (url "https://github.com/atomnuker/wlstream.git")
3763 (file-name (git-file-name name version))
3766 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3767 (build-system meson-build-system)
3768 (native-inputs `(("libdrm" ,libdrm)
3769 ("pkg-config" ,pkg-config)))
3770 (inputs `(("ffmpeg" ,ffmpeg)
3771 ("pulseaudio" ,pulseaudio)
3772 ("wayland" ,wayland)
3773 ("wayland-protocols" ,wayland-protocols)))
3774 (home-page "https://github.com/atomnuker/wlstream")
3775 (synopsis "Screen capture tool for Wayland sessions")
3776 (description "Wlstream is a screen capture tool for recording audio and
3777 video from a Wayland session.")
3778 (license license:lgpl2.1+))))
3780 (define-public gaupol
3787 (url "https://github.com/otsaloma/gaupol/")
3789 (file-name (git-file-name name version))
3792 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
3793 (build-system python-build-system)
3795 `(("gettext" ,gettext-minimal)
3796 ("pkg-config" ,pkg-config)))
3798 `(("python-pygobject" ,python-pygobject)
3800 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3801 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3802 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3803 ("iso-codes" ,iso-codes) ; Optional: Translations.
3804 ("gstreamer" ,gstreamer)
3805 ("gst-libav" ,gst-libav)
3806 ("gst-plugins-base" ,gst-plugins-base)
3807 ("gst-plugins-good" ,gst-plugins-good)
3808 ("gst-plugins-bad" ,gst-plugins-bad)
3809 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3811 `(#:tests? #f ; Tests seem to require networking.
3813 (modify-phases %standard-phases
3814 ;; gaupol's setup.py script does not support one of the Python build
3815 ;; system's default flags, "--single-version-externally-managed".
3817 (lambda* (#:key outputs #:allow-other-keys)
3818 (invoke "python" "setup.py" "install"
3819 (string-append "--prefix=" (assoc-ref outputs "out"))
3821 (add-after 'install 'wrap-gaupol
3822 (lambda* (#:key outputs #:allow-other-keys)
3823 (let ((out (assoc-ref outputs "out"))
3824 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3825 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3826 (wrap-program (string-append out "/bin/gaupol")
3827 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3828 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3830 (add-after 'unpack 'patch-data-dir
3831 ;; Fix some path variables that setup.py seems to garble.
3832 (lambda* (#:key outputs #:allow-other-keys)
3833 (let ((out (assoc-ref outputs "out")))
3834 (substitute* "setup.py"
3835 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3836 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3837 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3838 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3840 (synopsis "Editor for text-based subtitles")
3842 "Gaupol supports multiple subtitle file formats and provides means of
3843 creating subtitles, editing texts and timing subtitles to match video. The
3844 user interface features a builtin video player and is designed with attention
3845 to convenience of translating and batch processing of multiple documents.")
3846 (home-page "https://otsaloma.io/gaupol/")
3847 (license license:gpl3+)))
3849 (define-public theorafile
3850 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
3853 (version (git-version "0.0.0" "1" commit))
3858 (url "https://github.com/FNA-XNA/Theorafile.git")
3860 (file-name (git-file-name name version))
3862 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
3863 (build-system gnu-build-system)
3865 '(#:make-flags '("CC=gcc")
3867 (modify-phases %standard-phases
3872 (invoke "make" "test")))
3874 (lambda* (#:key outputs #:allow-other-keys)
3875 (let ((out (assoc-ref outputs "out")))
3876 (install-file "libtheorafile.so" (string-append out "/lib"))
3877 (install-file "theorafile.h" (string-append out "/include")))
3882 (home-page "https://github.com/FNA-XNA/Theorafile")
3883 (synopsis "Ogg Theora Video Decoder Library")
3884 (description "Theorafile is a library for quickly and easily decoding Ogg
3885 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
3886 (license license:zlib))))
3888 (define-public dvdbackup
3895 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
3896 "dvdbackup-" version "/"
3897 "dvdbackup-" version ".tar.xz"))
3899 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
3900 (build-system gnu-build-system)
3902 `(("libdvdcss" ,libdvdcss)
3903 ("libdvdread" ,libdvdread)))
3904 (home-page "http://dvdbackup.sourceforge.net")
3905 (synopsis "DVD video ripper")
3907 "A simple command line tool to backup video from a DVD. Decrypts the
3908 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
3909 transcode or reformat the videos in any way, producing perfect backups.")
3910 (license license:gpl3+)))
3912 (define-public svt-av1
3919 (url "https://github.com/OpenVisualCloud/SVT-AV1.git")
3920 (commit (string-append "v" version))))
3921 (file-name (git-file-name name version))
3924 "1rh4sz1bmrsxyxfxajsffw5jd17djcrymhwsi877v02fgln027qr"))))
3925 (build-system cmake-build-system)
3926 ;; SVT-AV1 only supports Intel-compatible CPUs.
3927 (supported-systems '("x86_64-linux" "i686-linux"))
3929 ;; The test suite tries to download test data and git clone a 3rd-party
3930 ;; fork of libaom. Skip it.
3933 (modify-phases %standard-phases
3934 (add-after 'install 'install-documentation
3935 (lambda* (#:key outputs #:allow-other-keys)
3936 (let* ((out (assoc-ref %outputs "out"))
3937 (doc (string-append out "/share/doc/svt-av1-" ,version)))
3938 (copy-recursively "../source/Docs" doc)
3942 (synopsis "AV1 video codec")
3943 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
3944 work-in-progress, aiming to support video-on-demand and live streaming
3945 applications. It only supports Intel-compatible CPUs (x86).")
3946 (home-page "https://github.com/OpenVisualCloud/SVT-AV1")
3947 (license license:bsd-2)))
3949 (define-public w-scan
3952 (version "20170107")
3956 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
3957 version ".tar.bz2"))
3959 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
3960 (build-system gnu-build-system)
3961 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
3963 "This is a small command line utility used to perform frequency scans for
3964 DVB and ATSC transmissions without initial tuning data. It can print the
3965 result in several formats:
3967 @item VDR channels.conf,
3968 @item czap/tzap/xine/mplayer channels.conf,
3969 @item Gstreamer dvbsrc plugin,
3970 @item VLC xspf playlist,
3972 @item initial tuning data for scan or dvbv5-scan.
3974 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
3975 (license license:gpl2+)))
3977 (define-public rav1e
3984 (uri (crate-uri "rav1e" version))
3986 (string-append name "-" version ".tar.gz"))
3989 "1bsmj8kqzs5pf8dl98rsl6a67cljj1gkj3b5hmd8hn8wdy4ya173"))))
3990 (build-system cargo-build-system)
3993 (("rust-simd-helpers" ,rust-simd-helpers-0.1)
3994 ("rust-ivf" ,rust-ivf-0.1)
3995 ("rust-cfg-if" ,rust-cfg-if-0.1)
3996 ("rust-paste" ,rust-paste-0.1)
3997 ("rust-signal-hook" ,rust-signal-hook-0.1)
3998 ("rust-aom-sys" ,rust-aom-sys-0.1)
3999 ("rust-nasm-rs" ,rust-nasm-rs-0.1)
4000 ("rust-arbitrary" ,rust-arbitrary-0.2)
4001 ("rust-better-panic" ,rust-better-panic-0.2)
4002 ("rust-noop-proc-macro"
4003 ,rust-noop-proc-macro-0.2)
4004 ("rust-num-traits" ,rust-num-traits-0.2)
4005 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
4006 ("rust-err-derive" ,rust-err-derive-0.2)
4007 ("rust-interpolate-name"
4008 ,rust-interpolate-name-0.2)
4009 ("rust-rustc-version" ,rust-rustc-version-0.2)
4010 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
4011 ("rust-libc" ,rust-libc-0.2)
4012 ("rust-image" ,rust-image-0.22)
4013 ("rust-arg-enum-proc-macro"
4014 ,rust-arg-enum-proc-macro-0.3)
4015 ("rust-num-derive" ,rust-num-derive-0.3)
4016 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
4017 ("rust-backtrace" ,rust-backtrace-0.3)
4018 ("rust-log" ,rust-log-0.4)
4019 ("rust-y4m" ,rust-y4m-0.5)
4020 ("rust-arrayvec" ,rust-arrayvec-0.5)
4021 ("rust-toml" ,rust-toml-0.5)
4022 ("rust-fern" ,rust-fern-0.5)
4023 ("rust-rust-hawktracer"
4024 ,rust-rust-hawktracer-0.7)
4025 ("rust-rand" ,rust-rand-0.7)
4026 ("rust-itertools" ,rust-itertools-0.8)
4027 ("rust-bitstream-io" ,rust-bitstream-io-0.8)
4028 ("rust-console" ,rust-console-0.9)
4029 ("rust-serde" ,rust-serde-1.0)
4030 ("rust-cc" ,rust-cc-1.0)
4031 ("rust-rayon" ,rust-rayon-1)
4032 ("rust-byteorder" ,rust-byteorder-1.3)
4033 ("rust-clap" ,rust-clap-2)
4034 ("rust-vergen" ,rust-vergen-3.1))
4035 #:cargo-development-inputs
4036 (("rust-rand-chacha" ,rust-rand-chacha-0.2)
4037 ("rust-interpolate-name"
4038 ,rust-interpolate-name-0.2)
4039 ("rust-criterion" ,rust-criterion-0.3)
4040 ("rust-pretty-assertions"
4041 ,rust-pretty-assertions-0.6)
4042 ("rust-rand" ,rust-rand-0.7)
4043 ("rust-semver" ,rust-semver-0.9))
4045 (modify-phases %standard-phases
4047 (lambda* (#:key outputs #:allow-other-keys)
4048 (let ((out (assoc-ref outputs "out")))
4049 (invoke "cargo" "cinstall" "--release"
4050 (string-append "--prefix=" out))))))))
4052 `(("cargo-c" ,rust-cargo-c)))
4055 (home-page "https://github.com/xiph/rav1e/")
4056 (synopsis "The fastest and safest AV1 encoder")
4058 "The fastest and safest AV1 encoder.")
4059 (license license:bsd-2)))
4069 (url "https://github.com/phw/peek.git")
4071 (file-name (git-file-name name version))
4073 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4074 (build-system meson-build-system)
4075 (arguments '(#:glib-or-gtk? #t))
4079 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4080 ("gettext" ,gettext-minimal)
4081 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4082 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4083 ("pkg-config" ,pkg-config)
4085 (home-page "https://github.com/phw/peek")
4086 (synopsis "Simple animated GIF screen recorder")
4088 "Peek makes it easy to create short screencasts of a screen area. It was
4089 built for the specific use case of recording screen areas, e.g. for easily
4090 showing UI features of your own apps or for showing a bug in bug reports.
4091 With Peek, you simply place the Peek window over the area you want to record
4092 and press \"Record\". Peek is optimized for generating animated GIFs, but you
4093 can also directly record to WebM or MP4 if you prefer.")
4094 (license license:gpl3+)))
4096 (define-public wf-recorder
4098 (name "wf-recorder")
4103 (url "https://github.com/ammen99/wf-recorder.git")
4104 (commit (string-append "v" version))))
4105 (file-name (git-file-name name version))
4108 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4109 (build-system meson-build-system)
4111 `(("pkg-config" ,pkg-config)))
4113 `(("ffmpeg" ,ffmpeg)
4114 ("pulseaudio" ,pulseaudio)
4115 ("wayland" ,wayland)
4116 ("wayland-protocols" ,wayland-protocols)
4117 ("libx264" ,libx264)))
4118 (home-page "https://github.com/ammen99/wf-recorder")
4119 (synopsis "Screen recorder for wlroots-based compositors")
4121 "@code{wf-recorder} is a utility program for screen recording of
4122 wlroots-based compositors. More specifically, those that support
4123 @code{wlr-screencopy-v1} and @code{xdg-output}.")
4124 (license license:expat)))
4126 (define-public guvcview
4132 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
4133 "src-" version ".tar.gz"))
4136 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
4137 (build-system gnu-build-system)
4139 ;; There are no tests and "make check" would fail on an intltool error.
4142 `(("pkg-config" ,pkg-config)
4143 ("intltool" ,intltool)))
4148 ("v4l-utils" ,v4l-utils) ;libv4l2
4149 ("ffmpeg" ,ffmpeg) ;libavcodec, libavutil
4152 ("portaudio" ,portaudio)
4153 ("alsa-lib" ,alsa-lib)))
4154 (home-page "http://guvcview.sourceforge.net/")
4155 (synopsis "Control your webcam and capture videos and images")
4157 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
4158 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
4159 It provides control over precise settings of the webcam such as exposure,
4160 brightness, contrast, and frame rate.")
4162 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
4163 (license license:gpl2+)))