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 ng0 <ng0@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>
45 ;;; This file is part of GNU Guix.
47 ;;; GNU Guix is free software; you can redistribute it and/or modify it
48 ;;; under the terms of the GNU General Public License as published by
49 ;;; the Free Software Foundation; either version 3 of the License, or (at
50 ;;; your option) any later version.
52 ;;; GNU Guix is distributed in the hope that it will be useful, but
53 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
54 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55 ;;; GNU General Public License for more details.
57 ;;; You should have received a copy of the GNU General Public License
58 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
60 (define-module (gnu packages video)
61 #:use-module (ice-9 match)
62 #:use-module (srfi srfi-1)
63 #:use-module (srfi srfi-26)
64 #:use-module ((guix licenses) #:prefix license:)
65 #:use-module (guix utils)
66 #:use-module (guix packages)
67 #:use-module (guix download)
68 #:use-module (guix git-download)
69 #:use-module (guix svn-download)
70 #:use-module (guix build-system cargo)
71 #:use-module (guix build-system cmake)
72 #:use-module (guix build-system copy)
73 #:use-module (guix build-system gnu)
74 #:use-module (guix build-system glib-or-gtk)
75 #:use-module (guix build-system meson)
76 #:use-module (guix build-system perl)
77 #:use-module (guix build-system python)
78 #:use-module (guix build-system waf)
79 #:use-module (guix build-system trivial)
80 #:use-module (gnu packages)
81 #:use-module (gnu packages algebra)
82 #:use-module (gnu packages assembly)
83 #:use-module (gnu packages audio)
84 #:use-module (gnu packages autotools)
85 #:use-module (gnu packages avahi)
86 #:use-module (gnu packages backup)
87 #:use-module (gnu packages base)
88 #:use-module (gnu packages bison)
89 #:use-module (gnu packages boost)
90 #:use-module (gnu packages cdrom)
91 #:use-module (gnu packages check)
92 #:use-module (gnu packages cmake)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages cpp)
95 #:use-module (gnu packages crates-io)
96 #:use-module (gnu packages curl)
97 #:use-module (gnu packages dejagnu)
98 #:use-module (gnu packages dns)
99 #:use-module (gnu packages docbook)
100 #:use-module (gnu packages documentation)
101 #:use-module (gnu packages elf)
102 #:use-module (gnu packages file)
103 #:use-module (gnu packages flex)
104 #:use-module (gnu packages fonts)
105 #:use-module (gnu packages fontutils)
106 #:use-module (gnu packages freedesktop)
107 #:use-module (gnu packages fribidi)
108 #:use-module (gnu packages gettext)
109 #:use-module (gnu packages ghostscript)
110 #:use-module (gnu packages gl)
111 #:use-module (gnu packages glib)
112 #:use-module (gnu packages guile)
113 #:use-module (gnu packages gnome)
114 #:use-module (gnu packages gnunet)
115 #:use-module (gnu packages gnupg)
116 #:use-module (gnu packages gstreamer)
117 #:use-module (gnu packages gtk)
118 #:use-module (gnu packages image)
119 #:use-module (gnu packages imagemagick)
120 #:use-module (gnu packages iso-codes)
121 #:use-module (gnu packages libidn)
122 #:use-module (gnu packages libreoffice)
123 #:use-module (gnu packages linux)
124 #:use-module (gnu packages lua)
125 #:use-module (gnu packages m4)
126 #:use-module (gnu packages man)
127 #:use-module (gnu packages markup)
128 #:use-module (gnu packages mp3)
129 #:use-module (gnu packages ncurses)
130 #:use-module (gnu packages networking)
131 #:use-module (gnu packages ocr)
132 #:use-module (gnu packages perl)
133 #:use-module (gnu packages perl-check)
134 #:use-module (gnu packages pkg-config)
135 #:use-module (gnu packages popt)
136 #:use-module (gnu packages pretty-print)
137 #:use-module (gnu packages protobuf)
138 #:use-module (gnu packages pulseaudio)
139 #:use-module (gnu packages python)
140 #:use-module (gnu packages python-crypto)
141 #:use-module (gnu packages python-web)
142 #:use-module (gnu packages python-xyz)
143 #:use-module (gnu packages qt)
144 #:use-module (gnu packages rdesktop)
145 #:use-module (gnu packages ruby)
146 #:use-module (gnu packages rust-apps)
147 #:use-module (gnu packages samba)
148 #:use-module (gnu packages sdl)
149 #:use-module (gnu packages serialization)
150 #:use-module (gnu packages shells)
151 #:use-module (gnu packages sqlite)
152 #:use-module (gnu packages ssh)
153 #:use-module (gnu packages swig)
154 #:use-module (gnu packages texinfo)
155 #:use-module (gnu packages textutils)
156 #:use-module (gnu packages tls)
157 #:use-module (gnu packages time)
158 #:use-module (gnu packages upnp)
159 #:use-module (gnu packages version-control)
160 #:use-module (gnu packages vulkan)
161 #:use-module (gnu packages web)
162 #:use-module (gnu packages webkit)
163 #:use-module (gnu packages wxwidgets)
164 #:use-module (gnu packages xdisorg)
165 #:use-module (gnu packages xiph)
166 #:use-module (gnu packages xml)
167 #:use-module (gnu packages xorg))
175 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
176 version "/" name "-" version ".tar.gz"))
179 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
180 (build-system gnu-build-system)
182 `(("makeinfo" ,texinfo)))
184 `(("ncurses" ,ncurses)))
187 (modify-phases %standard-phases
189 (lambda* (#:key build inputs outputs #:allow-other-keys)
190 ;; This old `configure' script doesn't support
191 ;; variables passed as arguments.
192 (let ((out (assoc-ref outputs "out"))
193 (ncurses (assoc-ref inputs "ncurses")))
194 (setenv "CONFIG_SHELL" (which "bash"))
195 (invoke "./configure"
196 (string-append "--prefix=" out)
197 (string-append "--build=" build)
198 ;; The ancient config.guess is unable to
199 ;; guess the host triplet on mips64el.
200 ,@(if (string=? "mips64el-linux"
202 '("--host=mips64el-unknown-linux-gnu")
204 ;; The same is also true with aarch64.
205 ,@(if (string=? "aarch64-linux"
207 '("--host=aarch64-unknown-linux-gnu")
209 (string-append "--with-ncurses="
211 (home-page "http://aa-project.sourceforge.net/aalib/")
212 (synopsis "ASCII-art library")
214 "AA-lib is a low level gfx library which does not require graphics device.
215 In fact, there is no graphical output possible. AA-lib replaces those
216 old-fashioned output methods with powerful ascii-art renderer.")
217 (license license:lgpl2.0+)))
219 (define-public celluloid
226 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
227 "/download/v" version "/celluloid-" version ".tar.xz"))
229 (base32 "1s3qkism96gi44incvsb6rqg255qcvjvw61ya7nw30md0sapj4sl"))))
230 (build-system glib-or-gtk-build-system)
232 `(("intltool" ,intltool)
233 ("pkg-config" ,pkg-config)))
236 ("libepoxy" ,libepoxy)
238 (home-page "https://github.com/celluloid-player/celluloid")
239 (synopsis "GTK+ frontend for the mpv media player")
240 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
241 It interacts with mpv via the client API exported by libmpv, allowing access to
242 mpv's powerful playback capabilities.")
243 (license license:gpl3+)))
245 (define-public liba52
252 ;; A mirror://sourceforge URI doesn't work, presumably
253 ;; because the SourceForge project is misconfigured.
254 "http://liba52.sourceforge.net/files/a52dec-" version
258 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
259 (patches (search-patches "liba52-enable-pic.patch"
260 "liba52-set-soname.patch"
261 "liba52-use-mtune-not-mcpu.patch"
262 "liba52-link-with-libm.patch"))))
263 (build-system gnu-build-system)
264 ;; XXX We need to run ./bootstrap because of the build system fixes above.
266 `(("autoconf" ,autoconf)
267 ("automake" ,automake)
268 ("libtool" ,libtool)))
269 (arguments `(#:configure-flags '("--enable-shared")
271 (modify-phases %standard-phases
272 ;; XXX We need to run ./bootstrap because of the build
273 ;; system fixes above.
275 (lambda _ (invoke "sh" "bootstrap"))))))
276 (home-page "http://liba52.sourceforge.net/")
277 (synopsis "ATSC A/52 stream decoder")
278 (description "liba52 is a library for decoding ATSC A/52 streams. The
279 A/52 standard is used in a variety of applications, including digital
280 television and DVD. It is also known as AC-3.")
281 (license license:gpl2+)))
283 (define-public libaom
286 (version "1.0.0-errata1-avif")
290 (url "https://aomedia.googlesource.com/aom/")
291 (commit (string-append "v" version))))
292 (file-name (git-file-name name version))
295 "169yfgh7zigc21h71qclfyr7s4wwp2i9vbr4z6pkabypvass4v7m"))))
296 (build-system cmake-build-system)
299 ("pkg-config" ,pkg-config)
300 ("python" ,python))) ; to detect the version
302 `(#:tests? #f ;no check target
304 ;; build dynamic library
305 (list "-DBUILD_SHARED_LIBS=YES"
307 "-DAOM_TARGET_CPU=generic"
308 (string-append "-DCMAKE_INSTALL_PREFIX="
309 (assoc-ref %outputs "out")))))
310 (home-page "https://aomedia.googlesource.com/aom/")
311 (synopsis "AV1 video codec")
312 (description "Libaom is the reference implementation of AV1. It includes a
313 shared library and encoder and decoder command-line executables.")
314 (license license:bsd-2)))
316 (define-public libmpeg2
322 ;; A mirror://sourceforge URI doesn't work, presumably
323 ;; because the SourceForge project is misconfigured.
324 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
325 name "-" version ".tar.gz"))
326 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
327 "libmpeg2-global-symbol-test.patch"))
330 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
338 (build-system gnu-build-system)
339 (home-page "http://libmpeg2.sourceforge.net/")
340 (synopsis "MPEG1 and MPEG2 video decoder library")
342 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
343 (license license:gpl2+)))
345 (define-public libx264
346 ;; There are no tags in the repository, so we take the version number from
347 ;; the X264_BUILD variable defined in x264.h.
348 (let ((version "159")
349 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
353 (version (git-version version revision commit))
357 (url "https://code.videolan.org/videolan/x264.git")
359 (file-name (git-file-name name version))
362 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
363 (build-system gnu-build-system)
365 `(("pkg-config" ,pkg-config)
367 ;; TODO: Add gpac input
369 `(#:tests? #f ;no check target
370 #:configure-flags '("--enable-shared"
371 ;; Don't build the command-line program. If we
372 ;; want it later, we should do so in a different
373 ;; package to avoid a circular dependency (the x264
374 ;; program depends on ffmpeg and ffmpeg depends on
378 ;; On MIPS, we must pass "--disable-asm" or else
379 ;; configure fails after printing: "You specified a
380 ;; pre-MSA CPU in your CFLAGS. If you really want
381 ;; to run on such a CPU, configure with
383 ,@(if (string-prefix? "mips"
384 (or (%current-target-system)
388 (home-page "https://www.videolan.org/developers/x264.html")
389 (synopsis "H.264 video coding library")
390 (description "libx264 is an advanced encoding library for creating
391 H.264 (MPEG-4 AVC) video streams.")
392 (license (list license:gpl2+ ;most files
393 license:isc ;common/x86/x86inc.asm
394 license:lgpl2.1+ ;extras/getopt.c
395 license:bsd-3 ;extras/inttypes.h
396 (license:non-copyleft ;extras/cl*.h
398 "See extras/cl.h in the distribution."))))))
400 (define-public mkvtoolnix
407 (uri (string-append "https://mkvtoolnix.download/sources/"
408 "mkvtoolnix-" version ".tar.xz"))
410 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
411 (modules '((guix build utils)))
413 ;; Delete bundled libraries.
414 (for-each delete-file-recursively
422 (build-system gnu-build-system)
423 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
432 ("libmatroska" ,libmatroska)
434 ("libvorbis" ,libvorbis)
438 ("qtmultimedia" ,qtmultimedia)
442 `(("docbook-xsl" ,docbook-xsl)
443 ("gettext" ,gettext-minimal)
444 ("googletest" ,googletest)
446 ("json-modern-cxx" ,json-modern-cxx)
448 ("pkg-config" ,pkg-config)
454 (list (string-append "--with-boost="
455 (assoc-ref %build-inputs "boost"))
456 (string-append "--with-docbook-xsl-root="
457 (assoc-ref %build-inputs "docbook-xsl")
458 "/xml/xsl/docbook-xsl-"
459 ,(package-version docbook-xsl))
460 "--enable-update-check=no"
461 "--enable-precompiled-headers=no")
463 (modify-phases %standard-phases
464 (add-after 'unpack 'patch-relative-file-names
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let ((out (assoc-ref outputs "out")))
467 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
469 (string-append out "/bin/" match)))
471 (add-before 'configure 'add-googletest
472 (lambda* (#:key inputs #:allow-other-keys)
474 (string-append (assoc-ref inputs "googletest")
475 "/include/gtest") "lib/gtest")
479 (let ((-j (list "-j" (number->string (parallel-job-count)))))
480 (apply invoke "rake" -j))))
483 (invoke "rake" "tests/unit")))
486 (invoke "rake" "install")))
487 (add-after 'install 'post-install
488 (lambda* (#:key outputs #:allow-other-keys)
489 ;; Move the Qt interface to "gui".
490 (let* ((out (assoc-ref outputs "out"))
491 (gui (assoc-ref outputs "gui"))
492 (strip-store-dir (lambda (path)
493 (substring path (string-prefix-length out path)))))
496 (mkdir-p (string-append gui (dirname file)))
497 (rename-file (string-append out file)
498 (string-append gui file)))
499 (append '("/bin/mkvtoolnix-gui"
500 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
501 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
502 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
503 (map strip-store-dir (find-files out "\\.ogg$"))
504 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
505 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
508 (delete-file-recursively (string-append out file)))
509 '("/share/applications"
512 "/share/mkvtoolnix")))
514 (home-page "https://mkvtoolnix.download")
515 (synopsis "Tools to create, alter and inspect Matroska files")
517 "MKVToolNix provides tools for getting information about Matroska files
518 (@command{mkvinfo}), extracting tracks/data from Matroska files
519 (@command{mkvextract}), and creating Matroska files from other media files
520 (@command{mkvmerge}).")
521 (license license:gpl2)))
523 (define-public straw-viewer
525 (name "straw-viewer")
531 (url "https://github.com/trizen/straw-viewer")
533 (file-name (git-file-name name version))
535 (base32 "067j8wdfy29bi5ahky10xzzs8cr3mn95wl4kyqqjvjzri77a25j3"))))
536 (build-system perl-build-system)
538 `(("perl-module-build" ,perl-module-build)
539 ("perl-test-pod" ,perl-test-pod)))
541 `(("perl-data-dump" ,perl-data-dump)
542 ("perl-json" ,perl-json)
543 ("perl-libwww" ,perl-libwww)
544 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
545 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
546 ("perl-mozilla-ca" ,perl-mozilla-ca)
547 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
548 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
549 ("xdg-utils" ,xdg-utils)
551 ;; Some videos play without youtube-dl, but others silently fail to.
552 ("youtube-dl" ,youtube-dl)))
554 ;; Required only when building the graphical interface (--gtk).
555 ;;("perl-file-sharedir" ,perl-file-sharedir)
557 `(#:modules ((guix build perl-build-system)
561 (modify-phases %standard-phases
562 (add-after 'unpack 'refer-to-inputs
563 (lambda* (#:key inputs #:allow-other-keys)
564 (substitute* "lib/WWW/StrawViewer.pm"
566 (format #f "'~a/bin/youtube-dl'"
567 (assoc-ref inputs "youtube-dl"))))
568 (substitute* "bin/gtk-straw-viewer"
570 (format #f "'~a/bin/xdg-open'"
571 (assoc-ref inputs "xdg-utils"))))
573 (add-after 'install 'install-desktop
574 (lambda* (#:key outputs #:allow-other-keys)
575 (let* ((out (assoc-ref outputs "out"))
576 (sharedir (string-append out "/share")))
577 (install-file "share/gtk-straw-viewer.desktop"
578 (string-append sharedir "/applications"))
579 (install-file "share/icons/gtk-straw-viewer.png"
580 (string-append sharedir "/pixmaps"))
582 (add-after 'install 'wrap-program
583 (lambda* (#:key outputs #:allow-other-keys)
584 (let* ((out (assoc-ref outputs "out"))
585 (bin-dir (string-append out "/bin/"))
586 (site-dir (string-append out "/lib/perl5/site_perl/"))
587 (lib-path (getenv "PERL5LIB")))
588 (for-each (cut wrap-program <>
589 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
590 (find-files bin-dir))
593 "Light-weight application for searching and streaming videos from YouTube")
595 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
596 invidio.us} and plays them locally in a native media player like @command{vlc}
599 You can search for videos, playlists, and/or channels. The videos are streamed
600 directly to the player at the best chosen resolution and with closed captions if
602 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
603 ;; Both a command-line and a graphical interface are available.
604 (home-page "https://github.com/trizen/youtube-viewer")
605 (license license:perl-license)))
611 (outputs '("out" "static"))
615 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
616 "/downloads/x265_" version ".tar.gz")
617 (string-append "https://download.videolan.org/videolan/x265/"
618 "x265_" version ".tar.gz")))
620 (base32 "170b61cgpcs5n35qps0p40dqs1q81vkgagzbs4zv7pzls6718vpj"))
621 (patches (search-patches "x265-arm-flags.patch"))
622 (modules '((guix build utils)))
624 (delete-file-recursively "source/compat/getopt")
626 (build-system cmake-build-system)
628 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
630 ;; Ensure position independent code for everyone.
631 (list "-DENABLE_PIC=TRUE"
632 ,@(if (string-prefix? "armhf" (or (%current-system)
633 (%current-target-system)))
634 '("-DENABLE_ASSEMBLY=OFF")
636 (string-append "-DCMAKE_INSTALL_PREFIX="
637 (assoc-ref %outputs "out")))
639 (modify-phases %standard-phases
640 (add-after 'unpack 'prepare-build
642 (delete-file-recursively "build")
644 ;; recognize armv8 in 32-bit mode as ARM
645 (substitute* "CMakeLists.txt"
646 (("armv6l") "armv8l"))
648 (add-before 'configure 'build-12-bit
649 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
650 (mkdir "../build-12bit")
651 (with-directory-excursion "../build-12bit"
654 "-DHIGH_BIT_DEPTH=ON"
659 (substitute* (cons "cmake_install.cmake"
661 (find-files "CMakeFiles/x265-shared.dir" ".")
662 (find-files "CMakeFiles/x265-static.dir" ".")))
663 (("libx265") "libx265_main12"))
665 (add-before 'configure 'build-10-bit
666 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
667 (mkdir "../build-10bit")
668 (with-directory-excursion "../build-10bit"
671 "-DHIGH_BIT_DEPTH=ON"
675 (substitute* (cons "cmake_install.cmake"
677 (find-files "CMakeFiles/x265-shared.dir" ".")
678 (find-files "CMakeFiles/x265-static.dir" ".")))
679 (("libx265") "libx265_main10"))
681 (add-after 'install 'install-more-libs
683 (with-directory-excursion "../build-12bit"
684 (invoke "make" "install"))
685 (with-directory-excursion "../build-10bit"
686 (invoke "make" "install"))))
687 (add-before 'strip 'move-static-libs
688 (lambda* (#:key outputs #:allow-other-keys)
689 (let ((out (assoc-ref outputs "out"))
690 (static (assoc-ref outputs "static")))
691 (mkdir-p (string-append static "/lib"))
692 (with-directory-excursion
693 (string-append out "/lib")
697 (string-append static "/lib/" file)))
698 (find-files "." "\\.a$"))))
700 (home-page "http://x265.org/")
701 (synopsis "Library for encoding h.265/HEVC video streams")
702 (description "x265 is a H.265 / HEVC video encoder application library,
703 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
704 (license license:gpl2+)))
706 (define-public libass
713 "https://github.com/libass/libass/releases/download/"
714 version "/libass-" version ".tar.xz"))
717 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
718 (build-system gnu-build-system)
720 `(("pkg-config" ,pkg-config)
723 `(("freetype" ,freetype)
725 ("fontconfig" ,fontconfig)
726 ("harfbuzz" ,harfbuzz)
728 (home-page "https://github.com/libass/libass")
729 (synopsis "Subtitle rendering library for the ASS/SSA format")
730 (description "libass is a subtitle rendering library for the
731 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
732 (license license:isc)))
734 (define-public libcaca
737 (version "0.99.beta19")
740 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
744 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
745 (build-system gnu-build-system)
746 (native-inputs `(("pkg-config" ,pkg-config)))
748 `(("freeglut" ,freeglut)
755 (home-page "http://caca.zoy.org/wiki/libcaca")
756 (synopsis "Colour ASCII-art library")
757 (description "libcaca is a graphics library that outputs text instead of
758 pixels, so that it can work on older video cards or text terminals. It
759 supports Unicode, 2048 colors, dithering of color images, and advanced text
761 (license license:wtfpl2)))
763 (define-public libdca
770 "https://download.videolan.org/pub/videolan/libdca/"
771 version "/libdca-" version ".tar.bz2"))
774 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
775 (build-system gnu-build-system)
777 `(("autoconf" ,autoconf)
778 ("automake" ,automake)
779 ("libtool" ,libtool)))
780 (home-page "https://www.videolan.org/developers/libdca.html")
781 (synopsis "DTS Coherent Acoustics decoder")
782 (description "libdca is a library for decoding DTS Coherent Acoustics
784 (license license:gpl2+)))
793 "mirror://sourceforge/libdv/libdv/"
794 version "/libdv-" version ".tar.gz"))
797 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
798 (build-system gnu-build-system)
799 (native-inputs `(("pkg-config" ,pkg-config)))
800 (inputs `(("libxv" ,libxv)))
801 (home-page "http://libdv.sourceforge.net/")
802 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
803 (description "The Quasar DV codec (libdv) is a software codec for DV
804 video, the encoding format used by most digital camcorders, typically those
805 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
806 developed according to the official standards for DV video: IEC 61834 and
808 (license license:lgpl2.1+)))
810 (define-public libmatroska
817 (uri (string-append "https://dl.matroska.org/downloads/"
818 "libmatroska/libmatroska-" version ".tar.xz"))
820 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
821 (build-system cmake-build-system)
823 `(("libebml" ,libebml)))
826 (list "-DBUILD_SHARED_LIBS=YES")
827 #:tests? #f)) ; no test suite
828 (home-page "https://www.matroska.org")
829 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
831 "Matroska aims to become the standard of multimedia container formats.
832 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
833 of XML. EBML enables the Matroska Development Team to gain significant
834 advantages in terms of future format extensibility, without breaking file
835 support in old parsers.
836 libebml is a C++ library to read and write EBML files.")
837 (license license:lgpl2.1)))
847 ;; Newer releases are only available on GitHub.
848 (string-append "https://github.com/01org/libva/releases/download/"
849 version "/libva-" version ".tar.bz2")
850 ;; Keep the old URL around for compatibility.
851 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
852 "libva/libva-" version "/libva-" version ".tar.bz2")))
854 (base32 "19df3r02k1p4cbyvifkdjyc8q7hi23f5b3x3390z52l25mjfnmvc"))))
855 (build-system gnu-build-system)
857 `(("pkg-config" ,pkg-config)))
862 ("libxfixes" ,libxfixes)
864 ("wayland" ,wayland)))
867 (modify-phases %standard-phases
869 'build 'fix-dlopen-paths
870 (lambda* (#:key outputs #:allow-other-keys)
871 (let ((out (assoc-ref outputs "out")))
872 (substitute* "va/drm/va_drm_auth_x11.c"
873 (("\"libva-x11\\.so\\.%d\"")
874 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
876 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
877 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
879 (list (string-append "--with-drivers-path="
880 (assoc-ref %build-inputs "mesa") "/lib/dri"))
881 ;; However, we can't write to mesa's store directory, so override the
882 ;; following make variable to install the dummy driver to libva's
883 ;; $prefix/lib/dri directory.
885 (list (string-append "dummy_drv_video_ladir="
886 (assoc-ref %outputs "out") "/lib/dri"))))
887 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
888 (synopsis "Video acceleration library")
889 (description "The main motivation for VA-API (Video Acceleration API) is
890 to enable hardware accelerated video decode/encode at various
891 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
892 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
893 (license license:expat)))
895 (define-public libva-utils
902 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
903 version "/libva-utils-" version ".tar.bz2"))
905 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
906 (build-system gnu-build-system)
909 (list "--enable-wayland"
912 `(("pkg-config" ,pkg-config)))
918 ("wayland" ,wayland)))
919 (home-page "https://01.org/linuxmedia/vaapi")
920 (synopsis "Collection of testing utilities for VA-API")
922 "This is a collection of utilities to query and test the @acronym{VA-API,
923 Video Acceleration API} implemented by the libva library.
925 These tools require a supported graphics chip, driver, and VA-API back end to
927 (license license:expat)))
929 (define-public ffmpeg
935 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
937 ;; See <https://issues.guix.gnu.org/issue/39719>
938 (patches (search-patches "ffmpeg-prefer-dav1d.patch"))
941 "176jn1lcdf0gk7sa5l2mv0faqp5dsqdhx1gqcrgymqhfmdal4xfb"))))
942 (build-system gnu-build-system)
945 ("fontconfig" ,fontconfig)
946 ("freetype" ,freetype)
947 ("frei0r-plugins" ,frei0r-plugins)
954 ("libbluray" ,libbluray)
956 ("libcdio-paranoia" ,libcdio-paranoia)
958 ("libtheora" ,libtheora)
960 ("libvdpau" ,libvdpau)
961 ("libvorbis" ,libvorbis)
967 ("pulseaudio" ,pulseaudio)
979 ("pkg-config" ,pkg-config)
981 ("python" ,python-2) ; scripts use interpreter python2
985 `(#:test-target "fate"
987 ;; possible additional inputs:
988 ;; --enable-avisynth enable reading of AviSynth script
990 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
991 ;; --enable-libcelt enable CELT decoding via libcelt [no]
992 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
993 ;; and libraw1394 [no]
994 ;; --enable-libfaac enable AAC encoding via libfaac [no]
995 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
996 ;; --enable-libflite enable flite (voice synthesis) support via
998 ;; --enable-libgme enable Game Music Emu via libgme [no]
999 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1000 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1001 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1002 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1003 ;; --enable-libnut enable NUT (de)muxing via libnut,
1004 ;; native (de)muxer exists [no]
1005 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1006 ;; libopencore-amrnb [no]
1007 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1008 ;; libopencore-amrwb [no]
1009 ;; --enable-libopencv enable video filtering via libopencv [no]
1010 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1012 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1013 ;; --enable-libschroedinger enable Dirac de/encoding via
1014 ;; libschroedinger [no]
1015 ;; --enable-libshine enable fixed-point MP3 encoding via
1017 ;; --enable-libssh enable SFTP protocol via libssh [no]
1018 ;; (libssh2 does not work)
1019 ;; --enable-libstagefright-h264 enable H.264 decoding via
1020 ;; libstagefright [no]
1021 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1023 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1024 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1025 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1026 ;; libvo-amrwbenc [no]
1027 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1028 ;; --enable-libxavs enable AVS encoding via xavs [no]
1029 ;; --enable-libzmq enable message passing via libzmq [no]
1030 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1031 ;; --enable-opencl enable OpenCL code
1032 '("--enable-avresample"
1033 "--enable-gpl" ; enable optional gpl licensed parts
1036 "--enable-fontconfig"
1041 "--enable-libbluray"
1045 "--enable-libfreetype"
1046 "--enable-libmp3lame"
1051 "--enable-libtheora"
1052 "--enable-libtwolame"
1053 "--enable-libvidstab"
1054 "--enable-libvorbis"
1063 "--enable-runtime-cpudetect"
1065 ;; The HTML pages take 7.2 MiB
1066 "--disable-htmlpages"
1068 ;; The static libraries are 23 MiB
1071 ;; Runtime cpu detection is not implemented on
1072 ;; MIPS, so we disable some features.
1073 "--disable-mips32r2"
1075 "--disable-mipsdspr2"
1076 "--disable-mipsfpu")
1078 (modify-phases %standard-phases
1081 ;; configure does not work followed by "SHELL=..." and
1082 ;; "CONFIG_SHELL=..."; set environment variables instead
1083 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1084 (let ((out (assoc-ref outputs "out")))
1085 (substitute* "configure"
1086 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1087 (setenv "SHELL" (which "bash"))
1088 (setenv "CONFIG_SHELL" (which "bash"))
1091 (string-append "--prefix=" out)
1092 ;; Add $libdir to the RUNPATH of all the binaries.
1093 (string-append "--extra-ldflags=-Wl,-rpath="
1097 'check 'set-ld-library-path
1099 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1101 (let* ((dso (find-files "." "\\.so$"))
1102 (path (string-join (map dirname dso) ":")))
1103 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1104 (setenv "LD_LIBRARY_PATH" path)
1106 (home-page "https://www.ffmpeg.org/")
1107 (synopsis "Audio and video framework")
1108 (description "FFmpeg is a complete, cross-platform solution to record,
1109 convert and stream audio and video. It includes the libavcodec
1110 audio/video codec library.")
1111 (license license:gpl2+)))
1113 (define-public ffmpeg-3.4
1119 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1123 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1125 (substitute-keyword-arguments (package-arguments ffmpeg)
1126 ((#:configure-flags flags)
1127 `(delete "--enable-libdav1d" (delete "--enable-libaom"
1129 (inputs (alist-delete "dav1d" (alist-delete "libaom"
1130 (package-inputs ffmpeg))))))
1132 (define-public ffmpeg-for-stepmania
1141 (url "https://github.com/stepmania/ffmpeg.git")
1142 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1144 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1145 (file-name (git-file-name "ffmpeg" version))))
1147 (substitute-keyword-arguments (package-arguments ffmpeg)
1148 ((#:configure-flags flags)
1149 '(list "--disable-programs"
1152 "--disable-avdevice"
1153 "--disable-swresample"
1154 "--disable-postproc"
1155 "--disable-avfilter"
1157 "--enable-static"))))
1160 (define-public ffmpegthumbnailer
1162 (name "ffmpegthumbnailer")
1167 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1169 (file-name (git-file-name name version))
1172 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1173 (build-system cmake-build-system)
1175 `(("pkg-config" ,pkg-config)))
1177 `(("ffmpeg" ,ffmpeg)
1178 ("libjpeg-turbo" ,libjpeg-turbo)
1182 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1183 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1184 (synopsis "Create thumbnails from video files")
1185 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1186 can be used by file managers to create thumbnails for your video files. The
1187 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1188 videoformats depend on the configuration flags of ffmpeg.")
1189 (license license:gpl2+)))
1198 "https://download.videolan.org/pub/videolan/vlc/"
1199 (car (string-split version #\-))
1200 "/vlc-" version ".tar.xz"))
1203 "0cackl1084hcmg4myf3kvjvd6sjxmzn0c0qkmanz6brvgzyanrm9"))))
1204 (build-system gnu-build-system)
1208 ("gettext" ,gettext-minimal)
1209 ("git" ,git) ; needed for a test
1210 ("pkg-config" ,pkg-config)))
1211 ;; FIXME: Add optional inputs once available.
1213 `(("alsa-lib" ,alsa-lib)
1215 ;; XXX Try removing dav1d here and testing AV1 playback when FFmpeg 4.3
1217 ;; <https://issues.guix.gnu.org/issue/39719>
1223 ("fontconfig" ,fontconfig)
1224 ("freetype" ,freetype)
1225 ("fribidi" ,fribidi)
1228 ("libarchive" ,libarchive)
1230 ("libavc1394" ,libavc1394)
1231 ("libbluray" ,libbluray)
1232 ("libcaca" ,libcaca)
1233 ("libcddb" ,libcddb)
1235 ("libdvbpsi" ,libdvbpsi)
1236 ("libdvdnav" ,libdvdnav)
1237 ("libdvdread" ,libdvdread)
1238 ("libebml" ,libebml)
1239 ("libgcrypt" ,libgcrypt)
1241 ("libkate" ,libkate)
1243 ("libmatroska" ,libmatroska)
1244 ("libmicrodns" ,libmicrodns)
1245 ("libmodplug" ,libmodplug)
1246 ("libmpeg2" ,libmpeg2)
1249 ("libraw1394" ,libraw1394)
1250 ("librsvg" ,librsvg)
1251 ("libsamplerate" ,libsamplerate)
1252 ("libsecret" ,libsecret)
1253 ("libssh2" ,libssh2)
1254 ("libupnp" ,libupnp)
1256 ("libvdpau" ,libvdpau)
1257 ("libvorbis" ,libvorbis)
1259 ("libtheora" ,libtheora)
1260 ("libx264" ,libx264)
1261 ("libxext" ,libxext)
1263 ("libxinerama" ,libxinerama)
1264 ("libxml2" ,libxml2)
1266 ("livemedia-utils" ,livemedia-utils)
1271 ("pulseaudio" ,pulseaudio)
1272 ("protobuf" ,protobuf)
1273 ("python" ,python-wrapper)
1276 ("qtx11extras" ,qtx11extras)
1279 ("sdl-image" ,sdl-image)
1281 ("speexdsp" ,speexdsp)
1283 ("twolame" ,twolame)
1285 ("wayland" ,wayland)
1286 ("wayland-protocols" ,wayland-protocols)
1288 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1292 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1293 (assoc-ref %build-inputs "ffmpeg")
1294 "/lib")) ;needed for the tests
1297 (modify-phases %standard-phases
1298 (add-after 'unpack 'patch-source
1299 (lambda* (#:key inputs #:allow-other-keys)
1300 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1301 (substitute* "configure"
1302 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1303 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1304 ;; Some of the tests require using the display to test out VLC,
1305 ;; which fails in our sandboxed build system
1306 (substitute* "test/run_vlc.sh"
1307 (("./vlc --ignore-config") "echo"))
1309 (add-after 'strip 'regenerate-plugin-cache
1310 (lambda* (#:key outputs #:allow-other-keys)
1311 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1312 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1313 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1314 ;; it references. Thus, we first reset the timestamps of all
1315 ;; these files, and then regenerate the cache such that the
1316 ;; mtimes it includes are always zero instead of being dependent
1317 ;; on the build time.
1318 (let* ((out (assoc-ref outputs "out"))
1319 (pkglibdir (string-append out "/lib/vlc"))
1320 (plugindir (string-append pkglibdir "/plugins"))
1321 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1322 ;; TODO: Factorize 'reset-timestamps'.
1323 (for-each (lambda (file)
1324 (let ((s (lstat file)))
1325 (unless (eq? (stat:type s) 'symlink)
1327 (find-files plugindir))
1328 (invoke cachegen plugindir))))
1329 (add-after 'install 'wrap-executable
1330 (lambda* (#:key outputs #:allow-other-keys)
1331 (let ((out (assoc-ref outputs "out"))
1332 (plugin-path (getenv "QT_PLUGIN_PATH")))
1333 (wrap-program (string-append out "/bin/vlc")
1334 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1336 (home-page "https://www.videolan.org/")
1337 (synopsis "Audio and video framework")
1338 (description "VLC is a cross-platform multimedia player and framework
1339 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1340 streaming protocols.")
1341 (license license:gpl2+)))
1343 (define-public mplayer
1350 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1354 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
1355 (build-system gnu-build-system)
1356 ;; FIXME: Add additional inputs once available.
1358 `(("pkg-config" ,pkg-config)
1361 `(("alsa-lib" ,alsa-lib)
1362 ("cdparanoia" ,cdparanoia)
1364 ("fontconfig" ,fontconfig)
1365 ("freetype" ,freetype)
1369 ("libdvdcss" ,libdvdcss)
1370 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1371 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
1372 ("libjpeg" ,libjpeg)
1373 ("libmpeg2" ,libmpeg2)
1374 ("libmpg123" ,mpg123) ; audio codec for MP3
1376 ("libtheora" ,libtheora)
1377 ("libvdpau" ,libvdpau)
1378 ("libvorbis" ,libvorbis)
1380 ("libx264" ,libx264)
1381 ("libxinerama" ,libxinerama)
1383 ("libxxf86dga" ,libxxf86dga)
1387 ("pulseaudio" ,pulseaudio)
1388 ("python" ,python-wrapper)
1393 `(#:tests? #f ; no test target
1395 (modify-phases %standard-phases
1397 ;; configure does not work followed by "SHELL=..." and
1398 ;; "CONFIG_SHELL=..."; set environment variables instead
1399 (lambda* (#:key inputs outputs #:allow-other-keys)
1400 (let ((out (assoc-ref outputs "out"))
1401 (libx11 (assoc-ref inputs "libx11")))
1402 (substitute* "configure"
1403 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1404 (setenv "SHELL" (which "bash"))
1405 (setenv "CONFIG_SHELL" (which "bash"))
1406 (invoke "./configure"
1407 (string-append "--extra-cflags=-I"
1408 libx11 "/include") ; to detect libx11
1409 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1410 (string-append "--prefix=" out)
1411 ;; Enable runtime cpu detection where supported,
1412 ;; and choose a suitable target.
1413 ,@(match (or (%current-target-system)
1416 '("--enable-runtime-cpudetection"
1417 "--target=x86_64-linux"))
1419 '("--enable-runtime-cpudetection"
1420 "--target=i686-linux"))
1422 '("--target=mips3-linux"))
1423 (_ (list (string-append
1425 (or (%current-target-system)
1426 (nix-system->gnu-triplet
1427 (%current-system)))))))
1428 "--disable-iwmmxt")))))))
1429 (home-page "https://www.mplayerhq.hu")
1430 (synopsis "Audio and video player")
1431 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1432 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1433 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1434 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1435 (license license:gpl2)))
1444 (url "https://github.com/mpv-player/mpv.git")
1445 (commit (string-append "v" version))))
1446 (file-name (git-file-name name version))
1449 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1450 (build-system waf-build-system)
1452 `(("perl" ,perl) ; for zsh completion file
1453 ("pkg-config" ,pkg-config)
1454 ("python-docutils" ,python-docutils)))
1455 ;; Missing features: libguess, V4L2
1457 `(("alsa-lib" ,alsa-lib)
1464 ("libbluray" ,libbluray)
1465 ("libcaca" ,libcaca)
1466 ("libbs2b" ,libbs2b)
1467 ("libcdio-paranoia" ,libcdio-paranoia)
1468 ("libdvdread" ,libdvdread)
1469 ("libdvdnav" ,libdvdnav)
1470 ("libjpeg" ,libjpeg)
1472 ("libvdpau" ,libvdpau)
1474 ("libxext" ,libxext)
1475 ("libxinerama" ,libxinerama)
1476 ("libxrandr" ,libxrandr)
1477 ("libxscrnsaver" ,libxscrnsaver)
1479 ;; XXX: lua > 5.2 is not currently supported; see
1480 ;; waftools/checks/custom.py
1484 ("pulseaudio" ,pulseaudio)
1486 ("shaderc" ,shaderc)
1487 ("vulkan-headers" ,vulkan-headers)
1488 ("vulkan-loader" ,vulkan-loader)
1490 ("wayland" ,wayland)
1491 ("wayland-protocols" ,wayland-protocols)
1492 ("libxkbcommon" ,libxkbcommon)
1493 ("youtube-dl" ,youtube-dl)
1497 (modify-phases %standard-phases
1499 'unpack 'patch-paths
1500 (lambda* (#:key inputs #:allow-other-keys)
1501 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1502 (substitute* "player/lua/ytdl_hook.lua"
1503 (("\"youtube-dl\",")
1504 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1507 'configure 'setup-waf
1508 (lambda* (#:key inputs #:allow-other-keys)
1509 (let ((waf (assoc-ref inputs "waf")))
1510 (copy-file (string-append waf "/bin/waf") "waf"))
1513 #:configure-flags (list "--enable-libmpv-shared"
1516 "--disable-build-date")
1517 ;; No check function defined.
1519 (home-page "https://mpv.io/")
1520 (synopsis "Audio and video player")
1521 (description "mpv is a general-purpose audio and video player. It is a
1522 fork of mplayer2 and MPlayer. It shares some features with the former
1523 projects while introducing many more.")
1524 (license license:gpl2+)))
1526 (define-public gnome-mpv
1527 (deprecated-package "gnome-mpv" celluloid))
1529 (define-public mpv-mpris
1537 (url "https://github.com/hoyon/mpv-mpris")
1539 (file-name (git-file-name name version))
1542 "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"))))
1543 (build-system copy-build-system)
1546 '(("mpris.so" "lib/"))
1548 (modify-phases %standard-phases
1549 (add-before 'install 'build
1551 (setenv "CC" (which "gcc"))
1552 (invoke "make"))))))
1554 `(("pkg-config" ,pkg-config)))
1558 (home-page "https://github.com/hoyon/mpv-mpris")
1559 (synopsis "MPRIS plugin for mpv")
1560 (description "This package provides an @dfn{MPRIS} (Media Player Remote
1561 Interfacing Specification) plugin for the @code{mpv} media player. It implements
1562 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
1565 To load this plugin, specify the following option when starting mpv:
1566 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
1567 @file{$HOME/.config/mpv/scripts}.")
1568 (license license:expat)))
1570 (define-public libvpx
1575 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1578 (url "https://chromium.googlesource.com/webm/libvpx")
1579 (commit (string-append "v" version))))
1580 (file-name (git-file-name name version))
1583 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
1584 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1585 (build-system gnu-build-system)
1587 `(#:configure-flags (list "--enable-shared"
1590 ;; Limit size to avoid CVE-2015-1258
1591 "--size-limit=16384x16384"
1592 (string-append "--prefix=" (assoc-ref %outputs "out")))
1593 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1594 (assoc-ref %outputs "out") "/lib"))
1595 #:phases (modify-phases %standard-phases
1597 (lambda* (#:key configure-flags #:allow-other-keys)
1598 ;; The configure script does not understand some of the GNU
1599 ;; options, so we only add the flags specified above.
1600 (apply invoke "./configure" configure-flags))))
1601 #:tests? #f)) ; no check target
1605 (synopsis "VP8/VP9 video codec")
1606 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1607 (license license:bsd-3)
1608 (home-page "https://www.webmproject.org/")))
1610 (define-public youtube-dl
1613 (version "2020.03.24")
1616 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1617 "releases/download/" version "/youtube-dl-"
1621 "05l4asakakxn53wrvxn6c03fd80zdizdbj6r2cj8c1ja3sj9i8s5"))))
1622 (build-system python-build-system)
1624 ;; The problem here is that the directory for the man page and completion
1625 ;; files is relative, and for some reason, setup.py uses the
1626 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1627 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1628 ;; completion file is called 'youtube-dl' rather than
1629 ;; 'youtube-dl.bash-completion'.
1630 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1631 #:phases (modify-phases %standard-phases
1632 (add-before 'install 'fix-the-data-directories
1633 (lambda* (#:key outputs #:allow-other-keys)
1634 (let ((prefix (assoc-ref outputs "out")))
1635 (mkdir "bash-completion")
1636 (rename-file "youtube-dl.bash-completion"
1637 "bash-completion/youtube-dl")
1638 (substitute* "setup.py"
1639 (("youtube-dl\\.bash-completion")
1640 "bash-completion/youtube-dl")
1642 (string-append "'" prefix "/etc/"))
1644 (string-append "'" prefix "/share/")))
1646 (add-after 'install 'install-completion
1647 (lambda* (#:key outputs #:allow-other-keys)
1648 (let* ((out (assoc-ref outputs "out"))
1649 (zsh (string-append out
1650 "/share/zsh/site-functions")))
1652 (copy-file "youtube-dl.zsh"
1653 (string-append zsh "/_youtube-dl"))
1655 (synopsis "Download videos from YouTube.com and other sites")
1657 "Youtube-dl is a small command-line program to download videos from
1658 YouTube.com and many more sites.")
1659 (home-page "https://yt-dl.org")
1660 (license license:public-domain)))
1662 (define-public youtube-dl-gui
1664 (name "youtube-dl-gui")
1669 (uri (pypi-uri "Youtube-DLG" version))
1672 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1673 (build-system python-build-system)
1675 ;; In Guix, wxpython has not yet been packaged for Python 3.
1676 `(#:python ,python-2
1677 ;; This package has no tests.
1680 (modify-phases %standard-phases
1681 (add-before 'build 'patch-source
1682 (lambda* (#:key inputs #:allow-other-keys)
1683 ;; The youtube-dl-gui program lets you configure options. Some of
1684 ;; them are problematic, so we change their defaults.
1685 (substitute* "youtube_dl_gui/optionsmanager.py"
1686 ;; When this is true, the builder process will try (and fail) to
1687 ;; write logs to the builder user's home directory.
1688 (("'enable_log': True") "'enable_log': False")
1689 ;; This determines which youtube-dl program youtube-dl-gui will
1690 ;; run. If we don't set this, then youtube-dl-gui might download
1691 ;; an arbitrary copy from the Internet into the user's home
1692 ;; directory and run it, so let's make sure youtube-dl-gui uses
1693 ;; the youtube-dl from the inputs by default.
1694 (("'youtubedl_path': self.config_path")
1695 (string-append "'youtubedl_path': '"
1696 (assoc-ref inputs "youtube-dl")
1698 ;; When this is True, when youtube-dl-gui is finished downloading
1699 ;; a file, it will try (and possibly fail) to open the directory
1700 ;; containing the downloaded file. This can fail because it
1701 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1702 ;; adding xdg-utils to the propagated inputs is not enough to
1703 ;; make this work, so for now we set the default to False.
1704 (("'open_dl_dir': True") "'open_dl_dir': False"))
1705 ;; The youtube-dl program from the inputs is actually a wrapper
1706 ;; script written in bash, so attempting to invoke it as a python
1707 ;; script will fail.
1708 (substitute* "youtube_dl_gui/downloaders.py"
1709 (("cmd = \\['python', self\\.youtubedl_path\\]")
1710 "cmd = [self.youtubedl_path]"))
1711 ;; Use relative paths for installing data files so youtube-dl-gui
1712 ;; installs the files relative to its prefix in the store, rather
1713 ;; than relative to /. Also, instead of installing data files into
1714 ;; $prefix/usr/share, install them into $prefix/share for
1715 ;; consistency (see: (standards) Directory Variables).
1716 (substitute* "setup.py"
1717 (("= '/usr/share") "= 'share"))
1718 ;; Update get_locale_file() so it finds the installed localization
1720 (substitute* "youtube_dl_gui/utils.py"
1721 (("os\\.path\\.join\\('/usr', 'share'")
1722 (string-append "os.path.join('"
1723 (assoc-ref %outputs "out")
1726 (add-after 'install 'create-desktop-file
1727 (lambda* (#:key outputs #:allow-other-keys)
1728 (let* ((out (assoc-ref outputs "out"))
1729 (applications (string-append out "/share/applications")))
1730 (mkdir-p applications)
1731 (call-with-output-file
1732 (string-append applications "/youtube-dl-gui.desktop")
1737 Name=Youtube-dl GUI~@
1738 Comment=Graphical interface to download video with youtube-dl~@
1739 Exec=youtube-dl-gui~@
1740 TryExec=youtube-dl-gui~@
1742 Icon=youtube-dl-gui~@
1744 Categories=AudioVideo;Audio;Video;Network~%")))
1747 `(("python2-wxpython" ,python2-wxpython)
1748 ("youtube-dl" ,youtube-dl)))
1749 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1751 "GUI (Graphical User Interface) for @command{youtube-dl}")
1753 "Youtube-dlG is a GUI (Graphical User Interface) for
1754 @command{youtube-dl}. You can use it to download videos from YouTube and any
1755 other site that youtube-dl supports.")
1756 (license license:unlicense)))
1758 (define-public you-get
1761 (version "0.4.1410")
1765 (url "https://github.com/soimort/you-get.git")
1766 (commit (string-append "v" version))))
1767 (file-name (git-file-name name version))
1770 "1v4lfldcijgngg0s4q5w4ixa0k8k75dwmkhf57pgb31bqlrr8h0s"))))
1771 (build-system python-build-system)
1773 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1776 (modify-phases %standard-phases
1777 (add-after 'unpack 'qualify-input-references
1778 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1779 ;; happens to be in the user's $PATH at run time.
1780 (lambda* (#:key inputs #:allow-other-keys)
1781 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1783 (substitute* "src/you_get/processor/ffmpeg.py"
1784 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1785 ;; same string is also used when sniffing ffmpeg's output.
1786 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1787 (string-append prefix "'" ffmpeg "'")))
1789 #:tests? #f)) ; XXX some tests need Internet access
1790 (synopsis "Download videos, audio, or images from Web sites")
1792 "You-Get is a command-line utility to download media contents (videos,
1793 audio, images) from the Web. It can use either mpv or vlc for playback.")
1794 (home-page "https://you-get.org/")
1795 (license license:expat)))
1797 (define-public youtube-viewer
1799 (name "youtube-viewer")
1804 (url "https://github.com/trizen/youtube-viewer.git")
1806 (file-name (git-file-name name version))
1809 "1caz56sxy554avz2vdv9gm7gyqcq0gyixzrh5v9ixmg6vxif5d4f"))))
1810 (build-system perl-build-system)
1812 `(("perl-module-build" ,perl-module-build)))
1814 `(("perl-data-dump" ,perl-data-dump)
1815 ("perl-file-sharedir" ,perl-file-sharedir)
1816 ("perl-gtk2" ,perl-gtk2)
1817 ("perl-json" ,perl-json)
1818 ("perl-json-xs" ,perl-json-xs)
1819 ("perl-libwww" ,perl-libwww)
1820 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1821 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1822 ("perl-mozilla-ca" ,perl-mozilla-ca)
1823 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1824 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1825 ("xdg-utils" ,xdg-utils)
1827 ;; Some videos play without youtube-dl, but others silently fail to.
1828 ("youtube-dl" ,youtube-dl)))
1830 `(#:modules ((guix build perl-build-system)
1833 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
1834 ;; is broken without perl-gtk3.
1835 #:module-build-flags '("--gtk2")
1837 (modify-phases %standard-phases
1838 (add-after 'unpack 'refer-to-inputs
1839 (lambda* (#:key inputs #:allow-other-keys)
1840 (substitute* "lib/WWW/YoutubeViewer.pm"
1842 (format #f "'~a/bin/youtube-dl'"
1843 (assoc-ref inputs "youtube-dl"))))
1844 (substitute* '("bin/gtk2-youtube-viewer"
1845 "bin/gtk3-youtube-viewer")
1847 (format #f "'~a/bin/xdg-open'"
1848 (assoc-ref inputs "xdg-utils"))))
1850 (add-after 'install 'install-desktop
1851 (lambda* (#:key outputs #:allow-other-keys)
1852 (let* ((out (assoc-ref outputs "out"))
1853 (sharedir (string-append out "/share")))
1854 (install-file "share/gtk-youtube-viewer.desktop"
1855 (string-append sharedir "/applications"))
1856 (install-file "share/icons/gtk-youtube-viewer.png"
1857 (string-append sharedir "/pixmaps"))
1859 (add-after 'install 'wrap-program
1860 (lambda* (#:key outputs #:allow-other-keys)
1861 (let* ((out (assoc-ref outputs "out"))
1862 (bin-dir (string-append out "/bin/"))
1863 (site-dir (string-append out "/lib/perl5/site_perl/"))
1864 (lib-path (getenv "PERL5LIB")))
1865 (for-each (cut wrap-program <>
1866 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1867 (find-files bin-dir))
1870 "Lightweight application for searching and streaming videos from YouTube")
1872 "Youtube-viewer searches and plays YouTube videos in a native player.
1873 It comes with various search options; it can search for videos, playlists
1874 and/or channels. The videos are streamed directly in a selected video player
1875 at the best resolution (customizable) and with closed-captions (if available).
1876 Both command-line and GTK2 interface are available.")
1877 (home-page "https://github.com/trizen/youtube-viewer")
1878 (license license:perl-license)))
1880 (define-public libbluray
1886 (uri (string-append "https://download.videolan.org/videolan/"
1887 name "/" version "/"
1888 name "-" version ".tar.bz2"))
1891 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1892 (build-system gnu-build-system)
1894 `(#:configure-flags '("--disable-bdjava-jar")
1896 (modify-phases %standard-phases
1897 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1898 ;; Avoid the need to propagate libxml2 by referring to it
1899 ;; directly, as is already done for fontconfig & freetype.
1900 (lambda* (#:key inputs #:allow-other-keys)
1901 (let ((libxml2 (assoc-ref inputs "libxml2")))
1902 (substitute* "configure"
1903 ((" libxml-2.0") ""))
1904 (substitute* "src/libbluray.pc.in"
1905 (("^Libs.private:" field)
1906 (string-append field " -L" libxml2 "/lib -lxml2")))
1908 (add-before 'build 'fix-dlopen-paths
1909 (lambda* (#:key inputs #:allow-other-keys)
1910 (let ((libaacs (assoc-ref inputs "libaacs"))
1911 (libbdplus (assoc-ref inputs "libbdplus")))
1912 (substitute* "src/libbluray/disc/aacs.c"
1914 (string-append "\"" libaacs "/lib/libaacs\"")))
1915 (substitute* "src/libbluray/disc/bdplus.c"
1917 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1919 (native-inputs `(("pkg-config" ,pkg-config)))
1921 `(("fontconfig" ,fontconfig)
1922 ("freetype" ,freetype)
1923 ("libaacs" ,libaacs)
1924 ("libbdplus" ,libbdplus)
1925 ("libxml2" ,libxml2)))
1926 (home-page "https://www.videolan.org/developers/libbluray.html")
1927 (synopsis "Blu-Ray Disc playback library")
1929 "libbluray is a library designed for Blu-Ray Disc playback for media
1930 players, like VLC or MPlayer.")
1931 (license license:lgpl2.1+)))
1933 (define-public libdvdread
1939 (uri (string-append "https://download.videolan.org/videolan/"
1940 "libdvdread/" version "/"
1941 "libdvdread-" version ".tar.bz2"))
1944 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
1945 (build-system gnu-build-system)
1947 `(#:configure-flags '("--with-libdvdcss=yes")))
1949 `(("pkg-config" ,pkg-config)))
1951 `(("libdvdcss" ,libdvdcss)))
1952 (home-page "http://dvdnav.mplayerhq.hu/")
1953 (synopsis "Library for reading video DVDs")
1955 "Libdvdread provides a simple foundation for reading DVD video
1956 disks. It provides the functionality that is required to access many
1957 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1958 authentication and descrambling (if an external libdvdcss library is
1960 (license license:gpl2+)))
1962 (define-public dvdauthor
1969 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1973 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1974 (build-system gnu-build-system)
1976 `(("libdvdread" ,libdvdread)
1978 ("imagemagick" ,imagemagick)
1979 ("libxml2" ,libxml2)
1980 ("freetype" ,freetype)))
1982 `(("pkg-config" ,pkg-config)))
1983 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1984 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1985 MPEG-2 stream containing VOB packets.")
1986 (home-page "http://dvdauthor.sourceforge.net")
1987 (license license:gpl3+)))
1989 (define-public libdvdnav
1995 (uri (string-append "https://download.videolan.org/videolan/"
1996 "libdvdnav/" version "/"
1997 "libdvdnav-" version ".tar.bz2"))
2000 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2001 (build-system gnu-build-system)
2003 `(("pkg-config" ,pkg-config)))
2005 `(("libdvdread" ,libdvdread)))
2006 (home-page "http://dvdnav.mplayerhq.hu/")
2007 (synopsis "Library for video DVD navigation features")
2009 "Libdvdnav is a library for developers of multimedia
2010 applications. It allows easy use of sophisticated DVD navigation features
2011 such as DVD menus, multiangle playback and even interactive DVD games. All
2012 this functionality is provided through a simple API which provides the DVD
2013 playback as a single logical stream of blocks, intermitted by special
2014 dvdnav events to report certain conditions. The main usage of libdvdnav is
2015 a loop regularly calling a function to get the next block, surrounded by
2016 additional calls to tell the library of user interaction. The whole
2017 DVD virtual machine and internal playback states are completely
2019 (license license:gpl2+)))
2021 (define-public libdvdcss
2027 (uri (string-append "https://download.videolan.org/pub/"
2028 name "/" version "/"
2029 name "-" version ".tar.bz2"))
2032 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
2033 (build-system gnu-build-system)
2034 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2035 (synopsis "Library for accessing DVDs as block devices")
2037 "libdvdcss is a simple library designed for accessing DVDs like a block
2038 device without having to bother about the decryption.")
2039 (license license:gpl2+)))
2041 (define-public srt2vtt
2048 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2052 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
2053 (build-system gnu-build-system)
2055 `(("guile" ,guile-2.0)))
2056 (synopsis "SubRip to WebVTT subtitle converter")
2057 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2058 for use with HTML5 video.")
2059 (home-page "https://dthompson.us/projects/srt2vtt.html")
2060 (license license:gpl3+)))
2062 (define-public avidemux
2069 "mirror://sourceforge/avidemux/avidemux/" version "/"
2070 "avidemux_" version ".tar.gz"))
2073 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
2074 (patches (search-patches "avidemux-install-to-lib.patch"))))
2075 (build-system cmake-build-system)
2078 ("pkg-config" ,pkg-config)
2079 ("python" ,python-wrapper)
2080 ("qttools" ,qttools)
2082 ;; FIXME: Once packaged, add libraries not found during the build.
2084 `(("alsa-lib" ,alsa-lib)
2085 ("fontconfig" ,fontconfig)
2086 ("freetype" ,freetype)
2087 ("fribidi" ,fribidi)
2092 ("libvdpau" ,libvdpau)
2093 ("libvorbis" ,libvorbis)
2096 ("pulseaudio" ,pulseaudio)
2101 `(#:tests? #f ; no check target
2103 ;; Make sure files inside the included ffmpeg tarball are
2105 (let ((ffmpeg "ffmpeg-4.1.4"))
2106 (modify-phases %standard-phases
2107 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2109 (with-directory-excursion "avidemux_core/ffmpeg_package"
2110 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2111 (delete-file (string-append ffmpeg ".tar.bz2")))
2113 (add-after 'patch-source-shebangs 'repack-ffmpeg
2115 (with-directory-excursion "avidemux_core/ffmpeg_package"
2116 (substitute* (string-append ffmpeg "/configure")
2117 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2118 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2119 ;; avoid non-determinism in the archive
2120 "--sort=name" "--mtime=@0"
2121 "--owner=root:0" "--group=root:0")
2122 (delete-file-recursively ffmpeg))
2126 ;; Copy-paste settings from the cmake build system.
2127 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2128 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2131 (lambda* (#:key inputs outputs #:allow-other-keys)
2132 (let* ((out (assoc-ref outputs "out"))
2133 (lib (string-append out "/lib"))
2136 (lambda* (component srcdir #:optional (args '()))
2137 (let ((builddir (string-append "build_" component)))
2139 (with-directory-excursion builddir
2140 (apply invoke "cmake"
2141 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2142 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2143 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2144 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2145 "\"-Wl,-rpath=" lib "\"")
2146 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2147 (string-append "../" srcdir)
2151 (number->string (parallel-job-count)))
2152 (invoke "make" "install"))))))
2154 (build_component "core" "avidemux_core")
2155 (build_component "cli" "avidemux/cli")
2156 (build_component "qt4" "avidemux/qt4")
2157 (build_component "plugins_common" "avidemux_plugins"
2158 '("-DPLUGIN_UI=COMMON"))
2159 (build_component "plugins_cli" "avidemux_plugins"
2160 '("-DPLUGIN_UI=CLI"))
2161 (build_component "plugins_qt4" "avidemux_plugins"
2162 '("-DPLUGIN_UI=QT4"))
2163 (build_component "plugins_settings" "avidemux_plugins"
2164 '("-DPLUGIN_UI=SETTINGS"))
2165 ;; Remove .exe and .dll file.
2166 (delete-file-recursively
2167 (string-append out "/share/ADM6_addons"))
2169 (delete 'install)))))
2170 (home-page "http://fixounet.free.fr/avidemux/")
2171 (synopsis "Video editor")
2172 (description "Avidemux is a video editor designed for simple cutting,
2173 filtering and encoding tasks. It supports many file types, including AVI,
2174 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2175 can be automated using projects, job queue and powerful scripting
2177 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2178 ;; Software with various licenses is included, see License.txt.
2179 (license license:gpl2+)))
2181 (define-public vapoursynth
2183 (name "vapoursynth")
2188 (url "https://github.com/vapoursynth/vapoursynth.git")
2189 (commit (string-append "R" version))))
2190 (file-name (git-file-name name version))
2193 "1d298mlb24nlc2x7pixfbkd0qbpv4c706c32idsgpi96z1spkhvl"))))
2194 (build-system gnu-build-system)
2196 `(("autoconf" ,autoconf)
2197 ("automake" ,automake)
2198 ("cython" ,python-cython)
2199 ("libtool" ,libtool)
2200 ("pkg-config" ,pkg-config)
2204 `(("ffmpeg" ,ffmpeg)
2206 ("tesseract-ocr" ,tesseract-ocr)
2208 (home-page "http://www.vapoursynth.com/")
2209 (synopsis "Video processing framework")
2210 (description "VapourSynth is a C++ library and Python module for video
2211 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2212 multithreading, generalized colorspaces, per frame properties, and videos with
2214 ;; src/core/cpufeatures only allows x86, ARM or PPC
2215 (supported-systems (fold delete %supported-systems
2216 '("mips64el-linux" "aarch64-linux")))
2217 ;; As seen from the source files.
2218 (license license:lgpl2.1+)))
2227 "http://downloads.xvid.com/downloads/xvidcore-"
2228 version ".tar.bz2"))
2231 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
2232 (build-system gnu-build-system)
2233 (native-inputs `(("yasm" ,yasm)))
2236 (modify-phases %standard-phases
2237 (add-before 'configure 'pre-configure
2239 (chdir "build/generic")
2240 (substitute* "configure"
2241 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2243 #:tests? #f)) ; no test suite
2244 (home-page "https://www.xvid.com/")
2245 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2246 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2247 codec library. It uses ASP features such as b-frames, global and quarter
2248 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2249 and custom quantization matrices.")
2250 (license license:gpl2+)))
2252 (define-public streamlink
2259 (uri (pypi-uri "streamlink" version))
2262 "0cnlg3ra3g6dml4xfy9ysy9b4qwyn458fadd8ac44cfwi3v4gq6y"))))
2263 (build-system python-build-system)
2264 (home-page "https://github.com/streamlink/streamlink")
2266 `(("python-freezegun" ,python-freezegun)
2267 ("python-pytest" ,python-pytest)
2268 ("python-mock" ,python-mock)
2269 ("python-requests-mock" ,python-requests-mock)))
2271 `(("python-pysocks" ,python-pysocks)
2272 ("python-websocket-client" ,python-websocket-client)
2273 ("python-iso3166" ,python-iso3166)
2274 ("python-iso639" ,python-iso639)
2275 ("python-isodate" ,python-isodate)
2276 ("python-pycryptodome" ,python-pycryptodome)
2277 ("python-requests" ,python-requests)
2278 ("python-urllib3" ,python-urllib3)))
2279 (synopsis "Extract streams from various services")
2280 (description "Streamlink is command-line utility that extracts streams
2281 from sites like Twitch.tv and pipes them into a video player of choice.")
2282 (license license:bsd-2)))
2284 (define-public twitchy
2285 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2288 (version (git-version "3.4" "1" commit))
2293 (url "https://github.com/BasioMeusPuga/twitchy.git")
2295 (file-name (git-file-name name version))
2298 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2299 (build-system python-build-system)
2302 (modify-phases %standard-phases
2303 (add-after 'unpack 'patch-paths
2304 (lambda* (#:key inputs #:allow-other-keys)
2305 (substitute* "twitchy/twitchy_play.py"
2307 (string-append "\"" (assoc-ref inputs "streamlink")
2308 "/bin/streamlink ")))
2310 (add-before 'check 'check-setup
2312 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2314 (add-after 'install 'install-rofi-plugin
2315 (lambda* (#:key outputs #:allow-other-keys)
2316 (install-file "plugins/rofi-twitchy"
2317 (string-append (assoc-ref outputs "out")
2321 `(("python-requests" ,python-requests)
2322 ("streamlink" ,streamlink)))
2323 (home-page "https://github.com/BasioMeusPuga/twitchy")
2324 (synopsis "Command-line interface for Twitch.tv")
2326 "This package provides a command-line interface for Twitch.tv")
2327 (license license:gpl3+))))
2336 (url "https://github.com/mltframework/mlt.git")
2337 (commit (string-append "v" version))))
2338 (file-name (git-file-name name version))
2341 "0iiqym15n8kbnjzj0asmm86gs23yykz0va5b475cc4v2vv5admgx"))))
2342 (build-system gnu-build-system)
2344 `(#:tests? #f ; no tests
2345 #:make-flags '("CC=gcc" "CXX=g++")
2347 (list "--enable-gpl3"
2350 (modify-phases %standard-phases
2352 'configure 'override-LDFLAGS
2353 (lambda* (#:key outputs #:allow-other-keys)
2354 (substitute* "config.mak"
2356 (string-append "LDFLAGS+=-Wl,-rpath="
2357 (assoc-ref outputs "out")
2361 `(("alsa-lib" ,alsa-lib)
2362 ("ffmpeg" ,ffmpeg-3.4)
2364 ("frei0r-plugins" ,frei0r-plugins)
2365 ("gdk-pixbuf" ,gdk-pixbuf)
2367 ("libxml2" ,libxml2)
2370 ("libsamplerate" ,libsamplerate)
2371 ("pulseaudio" ,pulseaudio)
2377 `(("pkg-config" ,pkg-config)))
2378 (home-page "https://www.mltframework.org/")
2379 (synopsis "Author, manage, and run multitrack audio/video compositions")
2381 "MLT is a multimedia framework, designed and developed for television
2382 broadcasting. It provides a toolkit for broadcasters, video editors, media
2383 players, transcoders, web streamers and many more types of applications. The
2384 functionality of the system is provided via an assortment of ready to use
2385 tools, XML authoring components, and an extensible plug-in based API.")
2386 (license license:gpl3)))
2388 (define-public v4l-utils
2394 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2395 "/v4l-utils-" version ".tar.bz2"))
2398 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2399 (build-system gnu-build-system)
2402 (list (string-append "--with-udevdir="
2403 (assoc-ref %outputs "out")
2407 ("pkg-config" ,pkg-config)))
2409 `(("alsa-lib" ,alsa-lib)
2411 ("libjpeg" ,libjpeg)
2415 (synopsis "Realtime video capture utilities for Linux")
2416 (description "The v4l-utils provide a series of libraries and utilities to
2417 be used for realtime video capture via Linux-specific APIs.")
2418 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2419 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2420 (license (list license:lgpl2.1+ license:gpl2))))
2429 (url "https://github.com/obsproject/obs-studio.git")
2431 (file-name (git-file-name name version))
2434 "02ppkp1j5yxnxv663nz5wv4vbcg3k53l43xq94d1p1b3j4wxwq8b"))))
2435 (build-system cmake-build-system)
2437 `(#:tests? #f)) ; no tests
2439 `(("pkg-config" ,pkg-config)))
2441 `(("alsa-lib" ,alsa-lib)
2445 ("fontconfig" ,fontconfig)
2446 ("freetype" ,freetype)
2448 ("jansson" ,jansson)
2449 ("libx264" ,libx264)
2450 ("libxcomposite" ,libxcomposite)
2452 ("pulseaudio" ,pulseaudio)
2455 ("qtx11extras" ,qtx11extras)
2457 ("v4l-utils" ,v4l-utils)
2459 (synopsis "Live streaming software")
2460 (description "Open Broadcaster Software provides a graphical interface for
2461 video recording and live streaming. OBS supports capturing audio and video
2462 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2464 (home-page "https://obsproject.com")
2465 (supported-systems '("x86_64-linux" "i686-linux"))
2466 (license license:gpl2+)))
2468 (define-public libvdpau
2476 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2478 (file-name (git-file-name name version))
2481 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2482 (build-system meson-build-system)
2484 `(("pkg-config" ,pkg-config)))
2486 `(("libx11" ,libx11 "out")
2487 ("libxext" ,libxext)
2488 ("xorgproto" ,xorgproto)))
2489 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2490 (synopsis "Video Decode and Presentation API")
2491 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2492 provides an interface to video decode acceleration and presentation hardware
2493 present in modern GPUs.")
2494 (license (license:x11-style "file://COPYING"))))
2496 (define-public vdpauinfo
2503 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2504 name "-" version ".tar.gz"))
2507 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2508 (build-system gnu-build-system)
2510 `(("pkg-config" ,pkg-config)
2511 ("libx11" ,libx11)))
2513 `(("libvdpau" ,libvdpau)))
2514 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2515 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2516 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2518 (license (license:x11-style "file://COPYING"))))
2520 (define-public libvdpau-va-gl
2522 (name "libvdpau-va-gl")
2527 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2528 "releases/download/v" version "/libvdpau-va-gl-"
2532 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2533 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2534 (modules '((guix build utils)))
2535 (snippet '(begin (delete-file-recursively "3rdparty")
2537 (build-system cmake-build-system)
2539 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2541 `(("libvdpau" ,libvdpau)
2542 ("pkg-config" ,pkg-config)))
2546 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2547 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2549 "Many applications can use VDPAU to accelerate portions of the video
2550 decoding process and video post-processing to the GPU video hardware. Since
2551 there is no VDPAU available on Intel chips, they fall back to different drawing
2552 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2553 scaling and VA-API (if available) to accelerate video decoding.")
2554 (license license:expat)))
2556 (define-public recordmydesktop
2558 (name "recordmydesktop")
2562 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2563 version "/recordmydesktop-" version ".tar.gz"))
2566 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2567 (build-system gnu-build-system)
2568 (inputs `(("popt" ,popt)
2573 ("libxfixes" ,libxfixes)
2574 ("libxdamage" ,libxdamage)
2575 ("libxext" ,libxext)
2576 ("alsa-lib" ,alsa-lib)
2577 ("libvorbis" ,libvorbis)
2578 ("libtheora" ,libtheora)))
2579 (home-page "http://recordmydesktop.sourceforge.net/")
2580 (synopsis "Desktop session video recorder")
2582 "recordMyDesktop is a command-line tool that captures the activity in
2583 your graphical desktop and encodes it as a video. This is a useful tool for
2584 making @dfn{screencasts}.")
2585 (license license:gpl2+)))
2587 (define-public simplescreenrecorder
2589 (name "simplescreenrecorder")
2595 (url "https://github.com/MaartenBaert/ssr.git")
2597 (file-name (git-file-name name version))
2600 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2601 (build-system cmake-build-system)
2602 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2603 ;; README.md, the program builds and functions properly without them.
2604 ;; As a result, they are omitted. Please add them back if problems appear.
2606 `(("alsa-lib" ,alsa-lib)
2611 ("pulseaudio" ,pulseaudio)
2613 ("qtx11extras" ,qtx11extras)))
2614 (native-inputs `(("pkg-config" ,pkg-config)))
2617 (list "-DWITH_QT5=TRUE")
2618 #:tests? #f)) ; no test suite
2619 ;; Using HTTPS causes part of the page to be displayed improperly.
2620 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
2621 (synopsis "Screen recorder")
2622 (description "SimpleScreenRecorder is an easy to use screen recorder with
2623 a graphical user interface. It supports recording the entire screen, or a
2624 part of it, and allows encoding in many different codecs and file formats.
2625 Other features include a live preview and live streaming.")
2626 (license (list license:gpl3+ ; most files
2627 license:zlib ; glinject/elfhacks.*
2628 license:isc ; glinject/*
2629 license:x11)))) ; build-aux/install-sh
2631 (define-public libsmpeg
2634 (version "0.4.5-401")
2638 (url "svn://svn.icculus.org/smpeg/trunk/")
2639 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2640 (file-name (string-append name "-" version "-checkout"))
2643 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2644 (build-system gnu-build-system)
2646 ;; libsmpeg fails to build with -std=c++11, which is the default with
2647 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2648 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
2650 `(("autoconf" ,autoconf)
2651 ("automake" ,automake)))
2654 (home-page "https://icculus.org/smpeg/")
2655 (synopsis "SDL MPEG decoding library")
2657 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2658 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2659 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2660 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2661 and MPEG system streams.")
2662 (license (list license:expat
2668 (define-public libsmpeg-with-sdl1
2669 (package (inherit libsmpeg)
2671 (version "0.4.5-399")
2675 (url "svn://svn.icculus.org/smpeg/trunk/")
2676 (revision 399))) ; tagged release 0.4.5
2677 (file-name (string-append name "-" version "-checkout"))
2680 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2684 (define-public libbdplus
2691 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2692 version "/" name "-" version ".tar.bz2"))
2694 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2696 `(("libgcrypt" ,libgcrypt)))
2697 (build-system gnu-build-system)
2698 (home-page "https://www.videolan.org/developers/libbdplus.html")
2699 (synopsis "Library for decrypting certain Blu-Ray discs")
2700 (description "libbdplus is a library which implements the BD+ System
2702 (license license:lgpl2.1+)))
2704 (define-public libaacs
2711 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2712 version "/" name "-" version ".tar.bz2"))
2714 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2716 `(("libgcrypt" ,libgcrypt)))
2720 (build-system gnu-build-system)
2721 (home-page "https://www.videolan.org/developers/libaacs.html")
2722 (synopsis "Library for decrypting certain Blu-Ray discs")
2723 (description "libaacs is a library which implements the Advanced Access
2724 Content System specification.")
2725 (license license:lgpl2.1+)))
2727 (define-public mps-youtube
2729 (name "mps-youtube")
2735 (url "https://github.com/mps-youtube/mps-youtube.git")
2736 (commit (string-append "v" version))))
2737 (file-name (git-file-name name version))
2740 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2741 (build-system python-build-system)
2743 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2744 ;; test suite results differ depending on the country and also introduce
2745 ;; non-determinism in the tests.
2746 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2749 `(("python-pafy" ,python-pafy)
2750 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2751 (home-page "https://github.com/mps-youtube/mps-youtube")
2752 (synopsis "Terminal based YouTube player and downloader")
2754 "@code{mps-youtube} is based on mps, a terminal based program to
2755 search, stream and download music. This implementation uses YouTube as
2756 a source of content and can play and download video as well as audio.
2757 It can use either mpv or mplayer for playback, and for conversion of
2758 formats ffmpeg or libav is used. Users should install one of the
2759 supported players in addition to this package.")
2760 (license license:gpl3+)))
2762 (define-public handbrake
2768 (uri (string-append "https://download.handbrake.fr/releases/"
2769 version "/HandBrake-" version "-source.tar.bz2"))
2772 "09rcrq0kjs1lc1as7w3glbpbfvzldwpx3xv0pfmkn4pl7acxw1f0"))
2773 (modules '((guix build utils)))
2775 ;; Remove "contrib" and source not necessary for
2776 ;; building/running under a GNU environment.
2778 (for-each delete-file-recursively
2779 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
2780 (substitute* "make/include/main.defs"
2781 ;; Disable unconditional inclusion of "contrib" libraries
2782 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2783 ;; which would lead to fetching and building of these
2784 ;; libraries. Use our own instead.
2785 (("MODULES \\+= contrib") "# MODULES += contrib"))
2787 (build-system glib-or-gtk-build-system)
2789 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
2790 ("autoconf" ,autoconf)
2791 ("intltool" ,intltool)
2792 ("libtool" ,libtool)
2793 ("pkg-config" ,pkg-config)
2794 ("python" ,python-2))) ; For configuration
2797 ("dbus-glib" ,dbus-glib)
2799 ("fontconfig" ,fontconfig)
2800 ("freetype" ,freetype)
2802 ("gstreamer" ,gstreamer)
2803 ("gst-plugins-base" ,gst-plugins-base)
2805 ("jansson" ,jansson)
2808 ("libbluray" ,libbluray)
2810 ("libdvdnav" ,libdvdnav)
2811 ("libdvdread" ,libdvdread)
2812 ("libgudev" ,libgudev)
2813 ("libmpeg2" ,libmpeg2)
2814 ("libnotify" ,libnotify)
2815 ("libnuma" ,numactl)
2818 ("libsamplerate" ,libsamplerate)
2819 ("libtheora" ,libtheora)
2820 ("libvorbis" ,libvorbis)
2822 ("libxml2" ,libxml2)
2823 ("libx264" ,libx264)
2828 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2830 (list "--disable-gtk-update-checks"
2832 (string-append "CPPFLAGS=-I"
2833 (assoc-ref %build-inputs "libxml2")
2837 (modify-phases %standard-phases
2839 ;; Run bootstrap ahead of time so that shebangs get patched.
2841 (setenv "CONFIG_SHELL" (which "sh"))
2842 ;; Patch the Makefile so that it doesn't bootstrap again.
2843 (substitute* "gtk/module.rules"
2844 ((".*autoreconf.*") ""))
2845 (with-directory-excursion "gtk"
2846 (invoke "autoreconf" "-fiv"))))
2847 (add-before 'configure 'patch-SHELL
2849 (substitute* "gtk/po/Makefile.in.in"
2850 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
2852 (add-before 'configure 'relax-reqs
2854 (substitute* "make/configure.py"
2855 ;; cmake is checked for so that it can be used to build
2856 ;; contrib/harfbuzz and contrib/x265, but we get these as
2857 ;; inputs, so don't abort if it's not found. Similarly, meson
2858 ;; and ninja are only needed for contrib/libdav1d, and nasm
2860 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
2861 (string-append & "False")))
2864 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2865 ;; 'configure' is not an autoconf-generated script, and
2866 ;; errors on unrecognized arguments,
2867 ;; e.g. --enable-fast-install
2868 (let ((out (assoc-ref outputs "out")))
2869 (apply invoke "./configure"
2870 (string-append "--prefix=" out)
2871 (or configure-flags '())))))
2872 (add-after 'configure 'chdir-build
2873 (lambda _ (chdir "./build") #t)))))
2874 (home-page "https://handbrake.fr")
2875 (synopsis "Video transcoder")
2877 "HandBrake is a tool for converting video from any format to a selection
2878 of modern, widely supported codecs.")
2879 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2880 ;; Combination under GPLv2. See LICENSE.
2881 (license license:gpl2)))
2883 (define-public intel-vaapi-driver
2885 (name "intel-vaapi-driver")
2890 (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
2891 "releases/download/" version "/intel-vaapi-driver-"
2892 version ".tar.bz2"))
2894 (base32 "12fhydgwpvyh97gxqlgv77wsf9yax321h46vi49j4sxghpcxvqki"))))
2895 (build-system gnu-build-system)
2897 `(("pkg-config" ,pkg-config)))
2899 `(("libdrm" ,libdrm)
2901 ("libx11" ,libx11)))
2904 (modify-phases %standard-phases
2905 (add-before 'configure 'set-target-directory
2906 (lambda* (#:key outputs #:allow-other-keys)
2907 (let ((out (assoc-ref outputs "out")))
2908 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2910 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2911 ;; this to all VA-API back ends instead of once to libva.
2912 (native-search-paths
2913 (list (search-path-specification
2914 (variable "LIBVA_DRIVERS_PATH")
2915 (files '("lib/dri")))))
2916 (supported-systems '("i686-linux" "x86_64-linux"))
2917 (home-page "https://01.org/linuxmedia/vaapi")
2918 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2920 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2921 hardware-accelerated video processing on Intel GEN Graphics devices supported by
2922 the i915 driver, such as integrated Intel HD Graphics. It provides access to
2923 both hardware and shader functionality for faster encoding, decoding, and
2924 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2925 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2926 license:expat)))) ; the rest, excluding the test suite
2928 (define-public openh264
2934 (uri (string-append "https://github.com/cisco/"
2935 name "/releases/download/v"
2936 version "/Source.Code.tar.gz"))
2937 (file-name (string-append name "-" version ".tar.gz"))
2940 "0iq802xfsfkskg6q1j0kg90xh04vv1sxf61mrmahgynz5d7hx2ii"))))
2941 (build-system gnu-build-system)
2944 ("python" ,python)))
2946 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2948 #:test-target "test"
2949 #:phases (modify-phases %standard-phases
2950 ;; no configure script
2951 (delete 'configure))))
2952 (home-page "https://www.openh264.org/")
2953 (synopsis "H264 decoder library")
2955 "Openh264 is a library which can decode H264 video streams.")
2956 (license license:bsd-2)))
2958 (define-public libmp4v2
2965 ;; XXX: The new location of upstream is uncertain and will become relevant the
2966 ;; moment when the googlecode archive shuts down. It is past the date it
2967 ;; should've been turned off. I tried to communicate with upstream, but this
2968 ;; wasn't very responsive and not very helpful. The short summary is, it is
2969 ;; chaos when it comes to the amount of forks and only time will tell where
2970 ;; the new upstream location is.
2971 (uri (string-append "https://storage.googleapis.com/google-"
2972 "code-archive-downloads/v2/"
2973 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2974 (file-name (string-append name "-" version ".tar.bz2"))
2975 (patches (search-patches "libmp4v2-c++11.patch"))
2978 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2979 (build-system gnu-build-system)
2981 "static")) ; 3.7MiB .a file
2984 (modify-phases %standard-phases
2985 (add-after 'unpack 'remove-dates
2987 ;; Make the build reproducible.
2988 (substitute* "configure"
2989 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2990 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2992 (add-after 'install 'move-static-libraries
2993 (lambda* (#:key outputs #:allow-other-keys)
2994 ;; Move static libraries to the "static" output.
2995 (let* ((out (assoc-ref outputs "out"))
2996 (lib (string-append out "/lib"))
2997 (static (assoc-ref outputs "static"))
2998 (slib (string-append static "/lib")))
3000 (for-each (lambda (file)
3001 (install-file file slib)
3003 (find-files lib "\\.a$"))
3006 `(("help2man" ,help2man)
3007 ("dejagnu" ,dejagnu)))
3008 (home-page "https://code.google.com/archive/p/mp4v2/")
3009 (synopsis "API to create and modify mp4 files")
3011 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3012 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3013 file format that has been used as a multimedia file format in a variety of platforms and
3014 applications. It is a very powerful and extensible format that can accommodate
3015 practically any type of media.")
3016 (license license:mpl1.1)))
3018 (define-public libmediainfo
3020 (name "libmediainfo")
3024 (uri (string-append "https://mediaarea.net/download/source/"
3026 name "_" version ".tar.bz2"))
3029 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
3030 ;; TODO add a Big Buck Bunny webm for tests.
3032 `(("autoconf" ,autoconf)
3033 ("automake" ,automake)
3034 ("libtool" ,libtool)
3035 ("pkg-config" ,pkg-config)
3037 ("tinyxml2" ,tinyxml2)
3039 ("libzen" ,libzen)))
3040 (build-system gnu-build-system)
3042 '(#:tests? #f ; see above TODO
3044 ;; build scripts not in root of archive
3045 (modify-phases %standard-phases
3046 (add-after 'unpack 'change-to-build-dir
3048 (chdir "Project/GNU/Library")
3050 (home-page "https://mediaarea.net/en/MediaInfo")
3051 (synopsis "Library for retrieving media metadata")
3052 (description "MediaInfo is a library used for retrieving technical
3053 information and other metadata about audio or video files. A non-exhaustive
3054 list of the information MediaInfo can retrieve from media files include:
3057 @item General: title, author, director, album, track number, date, duration...
3058 @item Video: codec, aspect, fps, bitrate...
3059 @item Audio: codec, sample rate, channels, language, bitrate...
3060 @item Text: language of subtitle
3061 @item Chapters: number of chapters, list of chapters
3064 MediaInfo supports the following formats:
3067 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3068 MPEG-2, MPEG-4, DVD (VOB)...
3069 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3070 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3071 @item Subtitles: SRT, SSA, ASS, SAMI...
3073 (license license:bsd-2)))
3075 ;; TODO also have a GUI version available
3076 (define-public mediainfo
3082 ;; Warning: This source has proved unreliable 1 time at least.
3083 ;; Consider an alternate source or report upstream if this
3085 (uri (string-append "https://mediaarea.net/download/source/"
3086 name "/" version "/"
3087 name "_" version ".tar.bz2"))
3090 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
3092 `(("autoconf" ,autoconf)
3093 ("automake" ,automake)
3094 ("libtool" ,libtool)
3095 ("pkg-config" ,pkg-config)
3097 ("libmediainfo" ,libmediainfo)
3098 ("libzen" ,libzen)))
3099 (build-system gnu-build-system)
3101 '(#:tests? #f ; lacks tests
3103 ;; build scripts not in root of archive
3104 (modify-phases %standard-phases
3105 (add-after 'unpack 'change-to-build-dir
3107 (chdir "Project/GNU/CLI")
3109 (home-page "https://mediaarea.net/en/MediaInfo")
3110 (synopsis "Utility for reading media metadata")
3111 (description "MediaInfo is a utility used for retrieving technical
3112 information and other metadata about audio or video files. It supports the
3113 many codecs and formats supported by libmediainfo.")
3114 (license license:bsd-2)))
3116 (define-public livemedia-utils
3118 (name "livemedia-utils")
3119 (version "2019.05.29")
3123 "https://download.videolan.org/contrib/live555/live."
3127 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
3128 (build-system gnu-build-system)
3130 '(#:tests? #f ; no tests
3131 #:make-flags (list "CC=gcc"
3132 (string-append "LDFLAGS=-Wl,-rpath="
3133 (assoc-ref %outputs "out") "/lib")
3134 (string-append "PREFIX="
3135 (assoc-ref %outputs "out")))
3136 #:phases (modify-phases %standard-phases
3137 (add-before 'configure 'fix-makefiles-generation
3139 (substitute* "genMakefiles"
3144 (invoke "./genMakefiles"
3145 "linux-with-shared-libraries"))))))
3146 (home-page "http://www.live555.com/liveMedia/")
3147 (synopsis "Set of C++ libraries for multimedia streaming")
3148 (description "This code forms a set of C++ libraries for multimedia
3149 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3150 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3151 JPEG video, and several audio codecs. They can easily be extended to support
3152 additional (audio and/or video) codecs, and can also be used to build basic
3153 RTSP or SIP clients and servers.")
3154 (license license:lgpl3+)))
3156 (define-public libdvbpsi
3163 "https://download.videolan.org/pub/libdvbpsi/"
3164 version "/libdvbpsi-" version ".tar.bz2"))
3167 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
3168 (build-system gnu-build-system)
3169 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3170 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3172 (description "libdvbpsi is a simple library designed for decoding and
3173 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3174 and ITU-T H.222.0.")
3175 (license license:lgpl2.1)))
3177 (define-public ffms2
3181 (home-page "https://github.com/FFMS/ffms2")
3185 (url "https://github.com/FFMS/ffms2.git")
3187 (file-name (git-file-name name version))
3190 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3191 (build-system gnu-build-system)
3194 (list "--enable-avresample")))
3198 `(("ffmpeg" ,ffmpeg)))
3200 `(("pkg-config" ,pkg-config)))
3201 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3203 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3204 programmers to access a standard API to open and decompress media files.")
3205 ;; sources are distributed under a different license that the binary.
3206 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3207 (license license:gpl2+))); inherits from ffmpeg
3209 (define-public aegisub
3216 "http://ftp.aegisub.org/pub/archives/releases/source/"
3217 name "-" version ".tar.xz"))
3220 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3221 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3222 "aegisub-boost68.patch"))))
3223 (build-system gnu-build-system)
3226 (list "--disable-update-checker"
3227 "--without-portaudio"
3230 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3231 ;; tests require busted, a lua package we don't have yet
3234 (modify-phases %standard-phases
3235 (add-before 'configure 'fix-ldflags
3237 (setenv "LDFLAGS" "-pthread")
3239 (add-after 'unpack 'fix-boost-headers
3242 '("src/subtitles_provider_libass.cpp"
3243 "src/colour_button.cpp"
3244 "src/video_provider_dummy.cpp"
3245 "./src/video_frame.cpp")
3246 (("#include <boost/gil/gil_all.hpp>")
3247 "#include <boost/gil.hpp>"))
3253 ("hunspell" ,hunspell)
3256 ("alsa-lib" ,alsa-lib)
3257 ("pulseaudio" ,pulseaudio)
3259 ("freetype" ,freetype)
3260 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3262 `(("intltool" ,intltool)
3263 ("desktop-file-utils" ,desktop-file-utils)
3264 ("pkg-config" ,pkg-config)))
3265 (home-page "http://www.aegisub.org/")
3266 (synopsis "Subtitle engine")
3268 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3269 it quick and easy to time subtitles to audio, and features many powerful
3270 tools for styling them, including a built-in real-time video preview.")
3271 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3272 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3273 license:expat)))) ; and src/gl that is under a license similar
3274 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3275 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3276 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3278 (define-public gst-transcoder
3280 (name "gst-transcoder")
3286 (url "https://github.com/pitivi/gst-transcoder.git")
3288 (file-name (git-file-name name version))
3291 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3292 (build-system meson-build-system)
3294 `(("gobject-introspection" ,gobject-introspection)
3296 ("gstreamer" ,gstreamer)
3297 ("gst-plugins-base" ,gst-plugins-base)))
3299 `(("python" ,python)
3300 ("pkg-config" ,pkg-config)))
3301 (home-page "https://github.com/pitivi/gst-transcoder/")
3302 (synopsis "GStreamer Transcoding API")
3303 (description "GStreamer Transcoding API")
3304 (license license:lgpl2.1)))
3313 (uri (string-append "mirror://sourceforge/gmerlin/"
3314 name "/" version "/"
3315 name "-" version ".tar.gz"))
3316 (file-name (string-append name "-" version ".tar.gz"))
3319 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3320 (build-system gnu-build-system)
3322 '(#:configure-flags '("LIBS=-lm")))
3324 `(("pkg-config" ,pkg-config)
3325 ("doxygen" ,doxygen)))
3326 (home-page "http://gmerlin.sourceforge.net")
3327 (synopsis "Low level library for multimedia API building")
3329 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3330 library, upon which multimedia APIs can be built. Gavl handles all the
3331 details of audio and video formats like colorspaces, sample rates,
3332 multichannel configurations, etc. It provides standardized definitions for
3333 those formats as well as container structures for carrying audio samples or
3334 video images inside an application.
3336 In addition, it handles the sometimes ugly task of converting between all
3337 these formats and provides some elementary operations (copying, scaling,
3338 alpha blending etc).")
3339 (license license:gpl3)))
3341 (define-public frei0r-plugins
3343 (name "frei0r-plugins")
3348 (uri (string-append "https://files.dyne.org/frei0r/"
3349 "frei0r-plugins-" version ".tar.gz"))
3352 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
3353 (build-system gnu-build-system)
3356 (modify-phases %standard-phases
3357 (add-after 'unpack 'patch-Makefile
3359 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3360 ;; names in the tarball. Try removing this for future versions.
3361 (substitute* "Makefile.in"
3362 (("README\\.md ChangeLog TODO AUTHORS")
3363 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3365 ;; TODO: opencv for additional face detection filters.
3370 `(("pkg-config" ,pkg-config)))
3371 (home-page "https://www.dyne.org/software/frei0r/")
3372 (synopsis "Minimalistic plugin API for video effects")
3374 "Frei0r is a minimalistic plugin API for video effects.
3375 The main emphasis is on simplicity for an API that will round up
3376 the most common video effects into simple filters, sources and
3377 mixers that can be controlled by parameters. Frei0r wants to
3378 provide a way to share these simple effects between many
3379 applications, avoiding their reimplementation by different projects.
3380 It counts more than 100 plugins.")
3381 (license (list license:gpl2+
3382 ;; The following files are licensed as LGPL2.1+:
3383 ;; src/generator/ising0r/ising0r.c
3384 ;; src/generator/onecol0r/onecol0r.cpp
3385 ;; src/generator/nois0r/nois0r.cpp
3386 ;; src/generator/lissajous0r/lissajous0r.cpp
3387 ;; src/filter/ndvi/gradientlut.hpp
3388 ;; src/filter/ndvi/ndvi.cpp
3389 ;; src/filter/facedetect/facedetect.cpp
3390 license:lgpl2.1+))))
3392 (define-public motion
3396 (home-page "https://motion-project.github.io/")
3400 (url "https://github.com/Motion-Project/motion.git")
3401 (commit (string-append "release-" version))))
3404 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3405 (file-name (git-file-name name version))))
3406 (build-system gnu-build-system)
3408 `(("autoconf" ,autoconf-wrapper)
3409 ("automake" ,automake)
3410 ("gettext" ,gettext-minimal)
3411 ("pkg-config" ,pkg-config)))
3413 `(("libjpeg" ,libjpeg)
3414 ("ffmpeg" ,ffmpeg-3.4)
3415 ("libmicrohttpd" ,libmicrohttpd)
3416 ("sqlite" ,sqlite)))
3418 '(#:phases (modify-phases %standard-phases
3421 (patch-shebang "version.sh")
3422 (invoke "autoreconf" "-vfi"))))
3423 #:configure-flags '("--sysconfdir=/etc")
3424 #:make-flags (list (string-append "sysconfdir="
3425 (assoc-ref %outputs "out")
3428 #:tests? #f)) ; no 'check' target
3429 (synopsis "Detect motion from video signals")
3431 "Motion is a program that monitors the video signal from one or more
3432 cameras and is able to detect if a significant part of the picture has
3433 changed. Or in other words, it can detect motion.")
3435 ;; Some files say "version 2" and others "version 2 or later".
3436 (license license:gpl2)))
3438 (define-public subdl
3439 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3443 (version (git-version "1.0.3" revision commit))
3447 (url "https://github.com/alexanderwink/subdl.git")
3449 (file-name (git-file-name name version))
3452 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3453 (build-system trivial-build-system)
3455 `(#:modules ((guix build utils))
3457 (use-modules (guix build utils))
3458 (let* ((out (assoc-ref %outputs "out"))
3459 (bin (string-append out "/bin"))
3460 (source (assoc-ref %build-inputs "source"))
3461 (python (assoc-ref %build-inputs "python")))
3462 (install-file (string-append source "/subdl") bin)
3463 (patch-shebang (string-append bin "/subdl")
3464 (list (string-append python "/bin")))))))
3465 (inputs `(("python" ,python)))
3466 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3467 (description "Subdl is a command-line tool for downloading subtitles from
3468 opensubtitles.org. By default, it will search for English subtitles, display
3469 the results, download the highest-rated result in the requested language and
3470 save it to the appropriate filename.")
3471 (license license:gpl3+)
3472 (home-page "https://github.com/alexanderwink/subdl"))))
3474 (define-public l-smash
3481 (url "https://github.com/l-smash/l-smash.git")
3482 (commit (string-append "v" version))))
3483 (file-name (git-file-name name version))
3486 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3487 (build-system gnu-build-system)
3489 `(#:tests? #f ;no tests
3491 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3492 (assoc-ref %outputs "out") "/lib"))
3494 (modify-phases %standard-phases
3495 ;; configure fails if it is followed by CONFIG_SHELL
3497 (lambda* (#:key outputs #:allow-other-keys)
3498 (let ((out (assoc-ref outputs "out")))
3499 (invoke "./configure" (string-append "--prefix=" out)
3500 "--disable-static")))))))
3502 `(("which" ,which)))
3503 (home-page "https://l-smash.github.io/l-smash/")
3504 (synopsis "MP4 multiplexer and demultiplexer library")
3506 "L-SMASH is a cross-platform library that handles the ISO base media file
3507 format and some of its derived file formats, including MP4. It operates as a
3508 multiplexer and demultiplexer, and can mux video and audio in several formats
3509 using standalone executable files.")
3510 (license license:isc)))
3512 (define-public qtfaststart
3514 (name "qtfaststart")
3518 (uri (pypi-uri "qtfaststart" version))
3521 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3522 (build-system python-build-system)
3524 '(#:tests? #f)) ; no test suite
3525 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3526 (description "qtfaststart enables streaming and pseudo-streaming of
3527 QuickTime and MP4 files by moving metadata and offset information to the
3528 beginning of the file. It can also print some useful information about the
3529 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3530 project, which is released into the public domain, as well as ISO 14496-12:2005
3531 (the official spec for MP4), which can be obtained from the ISO or found
3533 (home-page "https://github.com/danielgtaylor/qtfaststart")
3534 (license license:expat)))
3536 (define-public vidstab
3537 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3541 (version (git-version "1.1.0" revision commit))
3545 (url "https://github.com/georgmartius/vid.stab.git")
3547 (file-name (git-file-name name version))
3550 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3551 (build-system cmake-build-system)
3553 '(#:tests? #f)) ; tests are not run as part of standard build process
3554 (home-page "http://public.hronopik.de/vid.stab/")
3555 (synopsis "Video stabilization library")
3556 (description "Vidstab is a video stabilization library which can be used
3557 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3558 vehicle typically suffers from undesirable shakes and jitters. Activities such
3559 as surfing, skiing, riding and walking while shooting videos are especially
3560 prone to erratic camera shakes. Vidstab targets these video contents to help
3561 create smoother and stable videos.")
3562 (license license:gpl2+))))
3564 (define-public libopenshot
3566 (name "libopenshot")
3571 (url "https://github.com/OpenShot/libopenshot")
3572 (commit (string-append "v" version))))
3573 (file-name (git-file-name name version))
3576 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
3577 (modules '((guix build utils)))
3579 ;; Allow overriding of the python installation dir
3580 (substitute* "src/bindings/python/CMakeLists.txt"
3581 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3582 (string-append set " CACHE PATH "
3583 "\"Python bindings directory\")")))
3584 (delete-file-recursively "thirdparty")
3586 (build-system cmake-build-system)
3588 `(("pkg-config" ,pkg-config)
3591 ("unittest++" ,unittest-cpp)))
3592 (propagated-inputs ;all referenced in installed headers
3593 `(("cppzmq" ,cppzmq)
3595 ("imagemagick" ,imagemagick)
3596 ("jsoncpp" ,jsoncpp)
3597 ("libopenshot-audio" ,libopenshot-audio)
3599 ("qtmultimedia" ,qtmultimedia)
3600 ("zeromq" ,zeromq)))
3603 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3604 ,(version-major+minor (package-version python))
3606 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3608 (modify-phases %standard-phases
3609 (add-before 'configure 'set-vars
3610 (lambda* (#:key inputs #:allow-other-keys)
3611 (setenv "LIBOPENSHOT_AUDIO_DIR"
3612 (assoc-ref inputs "libopenshot-audio"))
3614 (assoc-ref inputs "zeromq"))
3615 (setenv "UNITTEST_DIR"
3616 (string-append (assoc-ref inputs "unittest++")
3617 "/include/UnitTest++"))
3619 (home-page "https://openshot.org")
3620 (synopsis "Video-editing, animation, and playback library")
3621 (description "OpenShot Library (libopenshot) is a powerful C++ video
3622 editing library with a multi-threaded and feature rich video editing
3623 API. It includes bindings for Python, Ruby, and other languages.")
3624 (license license:lgpl3+)))
3626 (define-public openshot
3633 (url "https://github.com/OpenShot/openshot-qt")
3634 (commit (string-append "v" version))))
3635 (file-name (git-file-name name version))
3638 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
3639 (modules '((guix build utils)))
3642 ;; TODO: Unbundle jquery and others from src/timeline/media
3643 (delete-file-recursively "src/images/fonts") #t))))
3644 (build-system python-build-system)
3646 `(("ffmpeg" ,ffmpeg)
3647 ("font-ubuntu" ,font-ubuntu)
3648 ("libopenshot" ,libopenshot)
3650 ("python-pyqt" ,python-pyqt)
3651 ("python-pyzmq" ,python-pyzmq)
3652 ("python-requests" ,python-requests)
3655 `(#:modules ((guix build python-build-system)
3656 (guix build qt-utils)
3658 #:imported-modules (,@%python-build-system-modules
3659 (guix build qt-utils))
3660 #:phases (modify-phases %standard-phases
3661 (delete 'build) ;install phase does all the work
3664 (setenv "QT_QPA_PLATFORM" "offscreen")
3665 (invoke "python" "src/tests/query_tests.py")))
3666 (add-after 'unpack 'patch-font-location
3667 (lambda* (#:key inputs #:allow-other-keys)
3668 (let ((font (assoc-ref inputs "font-ubuntu")))
3669 (substitute* "src/classes/app.py"
3670 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3671 (("fonts") "share/fonts/truetype")))
3673 (add-before 'install 'set-tmp-home
3675 ;; src/classes/info.py "needs" to create several
3676 ;; directories in $HOME when loaded during build
3677 (setenv "HOME" "/tmp")
3679 (add-after 'install 'wrap-program
3680 (lambda* (#:key outputs #:allow-other-keys)
3681 (let ((out (assoc-ref outputs "out")))
3682 (wrap-qt-program out "openshot-qt"))
3684 (home-page "https://www.openshot.org/")
3685 (synopsis "Video editor")
3686 (description "OpenShot takes your videos, photos, and music files and
3687 helps you create the film you have always dreamed of. Easily add sub-titles,
3688 transitions, and effects and then export your film to many common formats.")
3689 (license license:gpl3+)))
3691 (define-public dav1d
3698 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3699 "/dav1d/" version "/dav1d-" version ".tar.xz"))
3702 "0w5k572jzxp7zwdbsa0jgjzri6hsrkydawzzilrw46nxpcak37q9"))))
3703 (build-system meson-build-system)
3704 (native-inputs `(("nasm" ,nasm)))
3705 (home-page "https://code.videolan.org/videolan/dav1d")
3706 (synopsis "AV1 decoder")
3707 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3708 speed and correctness.")
3709 (license license:bsd-2)))
3711 (define-public wlstream
3712 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3716 (version (git-version "0.0" revision commit))
3721 (url "https://github.com/atomnuker/wlstream.git")
3723 (file-name (git-file-name name version))
3726 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3727 (build-system meson-build-system)
3728 (native-inputs `(("libdrm" ,libdrm)
3729 ("pkg-config" ,pkg-config)))
3730 (inputs `(("ffmpeg" ,ffmpeg)
3731 ("pulseaudio" ,pulseaudio)
3732 ("wayland" ,wayland)
3733 ("wayland-protocols" ,wayland-protocols)))
3734 (home-page "https://github.com/atomnuker/wlstream")
3735 (synopsis "Screen capture tool for Wayland sessions")
3736 (description "Wlstream is a screen capture tool for recording audio and
3737 video from a Wayland session.")
3738 (license license:lgpl2.1+))))
3740 (define-public gaupol
3747 (url "https://github.com/otsaloma/gaupol/")
3749 (file-name (git-file-name name version))
3752 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
3753 (build-system python-build-system)
3755 `(("gettext" ,gettext-minimal)
3756 ("pkg-config" ,pkg-config)))
3758 `(("python-pygobject" ,python-pygobject)
3760 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3761 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3762 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3763 ("iso-codes" ,iso-codes) ; Optional: Translations.
3764 ("gstreamer" ,gstreamer)
3765 ("gst-libav" ,gst-libav)
3766 ("gst-plugins-base" ,gst-plugins-base)
3767 ("gst-plugins-good" ,gst-plugins-good)
3768 ("gst-plugins-bad" ,gst-plugins-bad)
3769 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3771 `(#:tests? #f ; Tests seem to require networking.
3773 (modify-phases %standard-phases
3774 ;; gaupol's setup.py script does not support one of the Python build
3775 ;; system's default flags, "--single-version-externally-managed".
3777 (lambda* (#:key outputs #:allow-other-keys)
3778 (invoke "python" "setup.py" "install"
3779 (string-append "--prefix=" (assoc-ref outputs "out"))
3781 (add-after 'install 'wrap-gaupol
3782 (lambda* (#:key outputs #:allow-other-keys)
3783 (let ((out (assoc-ref outputs "out"))
3784 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3785 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3786 (wrap-program (string-append out "/bin/gaupol")
3787 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3788 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3790 (add-after 'unpack 'patch-data-dir
3791 ;; Fix some path variables that setup.py seems to garble.
3792 (lambda* (#:key outputs #:allow-other-keys)
3793 (let ((out (assoc-ref outputs "out")))
3794 (substitute* "setup.py"
3795 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3796 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3797 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3798 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3800 (synopsis "Editor for text-based subtitles")
3802 "Gaupol supports multiple subtitle file formats and provides means of
3803 creating subtitles, editing texts and timing subtitles to match video. The
3804 user interface features a builtin video player and is designed with attention
3805 to convenience of translating and batch processing of multiple documents.")
3806 (home-page "https://otsaloma.io/gaupol/")
3807 (license license:gpl3+)))
3809 (define-public theorafile
3810 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
3813 (version (git-version "0.0.0" "1" commit))
3818 (url "https://github.com/FNA-XNA/Theorafile.git")
3820 (file-name (git-file-name name version))
3822 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
3823 (build-system gnu-build-system)
3825 '(#:make-flags '("CC=gcc")
3827 (modify-phases %standard-phases
3832 (invoke "make" "test")))
3834 (lambda* (#:key outputs #:allow-other-keys)
3835 (let ((out (assoc-ref outputs "out")))
3836 (install-file "libtheorafile.so" (string-append out "/lib"))
3837 (install-file "theorafile.h" (string-append out "/include")))
3842 (home-page "https://github.com/FNA-XNA/Theorafile")
3843 (synopsis "Ogg Theora Video Decoder Library")
3844 (description "Theorafile is a library for quickly and easily decoding Ogg
3845 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
3846 (license license:zlib))))
3848 (define-public dvdbackup
3855 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
3856 "dvdbackup-" version "/"
3857 "dvdbackup-" version ".tar.xz"))
3859 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
3860 (build-system gnu-build-system)
3862 `(("libdvdcss" ,libdvdcss)
3863 ("libdvdread" ,libdvdread)))
3864 (home-page "http://dvdbackup.sourceforge.net")
3865 (synopsis "DVD video ripper")
3867 "A simple command line tool to backup video from a DVD. Decrypts the
3868 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
3869 transcode or reformat the videos in any way, producing perfect backups.")
3870 (license license:gpl3+)))
3872 (define-public svt-av1
3879 (url "https://github.com/OpenVisualCloud/SVT-AV1.git")
3880 (commit (string-append "v" version))))
3881 (file-name (git-file-name name version))
3884 "0273fxgf4r832y9s0p8hqdj1j1nj8nlz4hylya0b4nsif89yfrhp"))))
3885 (build-system cmake-build-system)
3886 ;; SVT-AV1 only supports Intel-compatible CPUs.
3887 (supported-systems '("x86_64-linux" "i686-linux"))
3889 ;; The test suite tries to download test data and git clone a 3rd-party
3890 ;; fork of libaom. Skip it.
3893 (modify-phases %standard-phases
3894 (add-after 'install 'install-documentation
3895 (lambda* (#:key outputs #:allow-other-keys)
3896 (let* ((out (assoc-ref %outputs "out"))
3897 (doc (string-append out "/share/doc/svt-av1-" ,version)))
3898 (copy-recursively "../source/Docs" doc)
3902 (synopsis "AV1 video codec")
3903 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
3904 work-in-progress, aiming to support video-on-demand and live streaming
3905 applications. It only supports Intel-compatible CPUs (x86).")
3906 (home-page "https://github.com/OpenVisualCloud/SVT-AV1")
3907 (license license:bsd-2)))
3909 (define-public w-scan
3912 (version "20170107")
3916 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
3917 version ".tar.bz2"))
3919 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
3920 (build-system gnu-build-system)
3921 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
3923 "This is a small command line utility used to perform frequency scans for
3924 DVB and ATSC transmissions without initial tuning data. It can print the
3925 result in several formats:
3927 @item VDR channels.conf,
3928 @item czap/tzap/xine/mplayer channels.conf,
3929 @item Gstreamer dvbsrc plugin,
3930 @item VLC xspf playlist,
3932 @item initial tuning data for scan or dvbv5-scan.
3934 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
3935 (license license:gpl2+)))
3937 (define-public rav1e
3944 (uri (crate-uri "rav1e" version))
3946 (string-append name "-" version ".tar.gz"))
3949 "1bsmj8kqzs5pf8dl98rsl6a67cljj1gkj3b5hmd8hn8wdy4ya173"))))
3950 (build-system cargo-build-system)
3953 (("rust-simd-helpers" ,rust-simd-helpers-0.1)
3954 ("rust-ivf" ,rust-ivf-0.1)
3955 ("rust-cfg-if" ,rust-cfg-if-0.1)
3956 ("rust-paste" ,rust-paste-0.1)
3957 ("rust-signal-hook" ,rust-signal-hook-0.1)
3958 ("rust-aom-sys" ,rust-aom-sys-0.1)
3959 ("rust-nasm-rs" ,rust-nasm-rs-0.1)
3960 ("rust-arbitrary" ,rust-arbitrary-0.2)
3961 ("rust-better-panic" ,rust-better-panic-0.2)
3962 ("rust-noop-proc-macro"
3963 ,rust-noop-proc-macro-0.2)
3964 ("rust-num-traits" ,rust-num-traits-0.2)
3965 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
3966 ("rust-err-derive" ,rust-err-derive-0.2)
3967 ("rust-interpolate-name"
3968 ,rust-interpolate-name-0.2)
3969 ("rust-rustc-version" ,rust-rustc-version-0.2)
3970 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
3971 ("rust-libc" ,rust-libc-0.2)
3972 ("rust-image" ,rust-image-0.22)
3973 ("rust-arg-enum-proc-macro"
3974 ,rust-arg-enum-proc-macro-0.3)
3975 ("rust-num-derive" ,rust-num-derive-0.3)
3976 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
3977 ("rust-backtrace" ,rust-backtrace-0.3)
3978 ("rust-log" ,rust-log-0.4)
3979 ("rust-y4m" ,rust-y4m-0.5)
3980 ("rust-arrayvec" ,rust-arrayvec-0.5)
3981 ("rust-toml" ,rust-toml-0.5)
3982 ("rust-fern" ,rust-fern-0.5)
3983 ("rust-rust-hawktracer"
3984 ,rust-rust-hawktracer-0.7)
3985 ("rust-rand" ,rust-rand-0.7)
3986 ("rust-itertools" ,rust-itertools-0.8)
3987 ("rust-bitstream-io" ,rust-bitstream-io-0.8)
3988 ("rust-console" ,rust-console-0.9)
3989 ("rust-serde" ,rust-serde-1.0)
3990 ("rust-cc" ,rust-cc-1.0)
3991 ("rust-rayon" ,rust-rayon-1.3)
3992 ("rust-byteorder" ,rust-byteorder-1.3)
3993 ("rust-clap" ,rust-clap-2)
3994 ("rust-vergen" ,rust-vergen-3.1))
3995 #:cargo-development-inputs
3996 (("rust-rand-chacha" ,rust-rand-chacha-0.2)
3997 ("rust-interpolate-name"
3998 ,rust-interpolate-name-0.2)
3999 ("rust-criterion" ,rust-criterion-0.3)
4000 ("rust-pretty-assertions"
4001 ,rust-pretty-assertions-0.6)
4002 ("rust-rand" ,rust-rand-0.7)
4003 ("rust-semver" ,rust-semver-0.9))
4005 (modify-phases %standard-phases
4007 (lambda* (#:key outputs #:allow-other-keys)
4008 (let ((out (assoc-ref outputs "out")))
4009 (invoke "cargo" "cinstall" "--release"
4010 (string-append "--prefix=" out))))))))
4012 `(("cargo-c" ,rust-cargo-c)))
4015 (home-page "https://github.com/xiph/rav1e/")
4016 (synopsis "The fastest and safest AV1 encoder")
4018 "The fastest and safest AV1 encoder.")
4019 (license license:bsd-2)))
4029 (url "https://github.com/phw/peek.git")
4031 (file-name (git-file-name name version))
4033 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4034 (build-system meson-build-system)
4035 (arguments '(#:glib-or-gtk? #t))
4039 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4040 ("gettext" ,gettext-minimal)
4041 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4042 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4043 ("pkg-config" ,pkg-config)
4045 (home-page "https://github.com/phw/peek")
4046 (synopsis "Simple animated GIF screen recorder")
4048 "Peek makes it easy to create short screencasts of a screen area. It was
4049 built for the specific use case of recording screen areas, e.g. for easily
4050 showing UI features of your own apps or for showing a bug in bug reports.
4051 With Peek, you simply place the Peek window over the area you want to record
4052 and press \"Record\". Peek is optimized for generating animated GIFs, but you
4053 can also directly record to WebM or MP4 if you prefer.")
4054 (license license:gpl3+)))
4056 (define-public wf-recorder
4058 (name "wf-recorder")
4063 (url "https://github.com/ammen99/wf-recorder.git")
4064 (commit (string-append "v" version))))
4065 (file-name (git-file-name name version))
4068 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4069 (build-system meson-build-system)
4071 `(("pkg-config" ,pkg-config)))
4073 `(("ffmpeg" ,ffmpeg)
4074 ("pulseaudio" ,pulseaudio)
4075 ("wayland" ,wayland)
4076 ("wayland-protocols" ,wayland-protocols)
4077 ("libx264" ,libx264)))
4078 (home-page "https://github.com/ammen99/wf-recorder")
4079 (synopsis "Screen recorder for wlroots-based compositors")
4081 "@code{wf-recorder} is a utility program for screen recording of
4082 wlroots-based compositors. More specifically, those that support
4083 @code{wlr-screencopy-v1} and @code{xdg-output}.")
4084 (license license:expat)))