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 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019 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 Eric Bavier <bavier@member.fsf.org>
16 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
18 ;;; Copyright © 2017, 2018, 2019 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 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018, 2019 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>
38 ;;; This file is part of GNU Guix.
40 ;;; GNU Guix is free software; you can redistribute it and/or modify it
41 ;;; under the terms of the GNU General Public License as published by
42 ;;; the Free Software Foundation; either version 3 of the License, or (at
43 ;;; your option) any later version.
45 ;;; GNU Guix is distributed in the hope that it will be useful, but
46 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
47 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 ;;; GNU General Public License for more details.
50 ;;; You should have received a copy of the GNU General Public License
51 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
53 (define-module (gnu packages video)
54 #:use-module (ice-9 match)
55 #:use-module (srfi srfi-1)
56 #:use-module (srfi srfi-26)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix utils)
59 #:use-module (guix packages)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix svn-download)
63 #:use-module (guix build-system cmake)
64 #:use-module (guix build-system gnu)
65 #:use-module (guix build-system glib-or-gtk)
66 #:use-module (guix build-system meson)
67 #:use-module (guix build-system perl)
68 #:use-module (guix build-system python)
69 #:use-module (guix build-system waf)
70 #:use-module (guix build-system trivial)
71 #:use-module (gnu packages)
72 #:use-module (gnu packages algebra)
73 #:use-module (gnu packages assembly)
74 #:use-module (gnu packages audio)
75 #:use-module (gnu packages autotools)
76 #:use-module (gnu packages avahi)
77 #:use-module (gnu packages backup)
78 #:use-module (gnu packages base)
79 #:use-module (gnu packages bison)
80 #:use-module (gnu packages boost)
81 #:use-module (gnu packages cdrom)
82 #:use-module (gnu packages check)
83 #:use-module (gnu packages cmake)
84 #:use-module (gnu packages compression)
85 #:use-module (gnu packages cpp)
86 #:use-module (gnu packages curl)
87 #:use-module (gnu packages dejagnu)
88 #:use-module (gnu packages dns)
89 #:use-module (gnu packages docbook)
90 #:use-module (gnu packages documentation)
91 #:use-module (gnu packages elf)
92 #:use-module (gnu packages file)
93 #:use-module (gnu packages flex)
94 #:use-module (gnu packages fonts)
95 #:use-module (gnu packages fontutils)
96 #:use-module (gnu packages freedesktop)
97 #:use-module (gnu packages fribidi)
98 #:use-module (gnu packages gettext)
99 #:use-module (gnu packages ghostscript)
100 #:use-module (gnu packages gl)
101 #:use-module (gnu packages glib)
102 #:use-module (gnu packages guile)
103 #:use-module (gnu packages gnome)
104 #:use-module (gnu packages gnunet)
105 #:use-module (gnu packages gnupg)
106 #:use-module (gnu packages gstreamer)
107 #:use-module (gnu packages gtk)
108 #:use-module (gnu packages image)
109 #:use-module (gnu packages imagemagick)
110 #:use-module (gnu packages iso-codes)
111 #:use-module (gnu packages libidn)
112 #:use-module (gnu packages libreoffice)
113 #:use-module (gnu packages linux)
114 #:use-module (gnu packages lua)
115 #:use-module (gnu packages m4)
116 #:use-module (gnu packages man)
117 #:use-module (gnu packages markup)
118 #:use-module (gnu packages mp3)
119 #:use-module (gnu packages ncurses)
120 #:use-module (gnu packages networking)
121 #:use-module (gnu packages ocr)
122 #:use-module (gnu packages perl)
123 #:use-module (gnu packages pkg-config)
124 #:use-module (gnu packages popt)
125 #:use-module (gnu packages pretty-print)
126 #:use-module (gnu packages protobuf)
127 #:use-module (gnu packages pulseaudio)
128 #:use-module (gnu packages python)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages python-xyz)
132 #:use-module (gnu packages qt)
133 #:use-module (gnu packages rdesktop)
134 #:use-module (gnu packages ruby)
135 #:use-module (gnu packages samba)
136 #:use-module (gnu packages sdl)
137 #:use-module (gnu packages serialization)
138 #:use-module (gnu packages shells)
139 #:use-module (gnu packages sqlite)
140 #:use-module (gnu packages ssh)
141 #:use-module (gnu packages swig)
142 #:use-module (gnu packages texinfo)
143 #:use-module (gnu packages textutils)
144 #:use-module (gnu packages tls)
145 #:use-module (gnu packages time)
146 #:use-module (gnu packages upnp)
147 #:use-module (gnu packages version-control)
148 #:use-module (gnu packages vulkan)
149 #:use-module (gnu packages web)
150 #:use-module (gnu packages webkit)
151 #:use-module (gnu packages wxwidgets)
152 #:use-module (gnu packages xdisorg)
153 #:use-module (gnu packages xiph)
154 #:use-module (gnu packages xml)
155 #:use-module (gnu packages xorg))
163 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
164 version "/" name "-" version ".tar.gz"))
167 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
168 (build-system gnu-build-system)
170 `(("makeinfo" ,texinfo)))
172 `(("ncurses" ,ncurses)))
175 (modify-phases %standard-phases
177 (lambda* (#:key build inputs outputs #:allow-other-keys)
178 ;; This old `configure' script doesn't support
179 ;; variables passed as arguments.
180 (let ((out (assoc-ref outputs "out"))
181 (ncurses (assoc-ref inputs "ncurses")))
182 (setenv "CONFIG_SHELL" (which "bash"))
183 (invoke "./configure"
184 (string-append "--prefix=" out)
185 (string-append "--build=" build)
186 ;; The ancient config.guess is unable to
187 ;; guess the host triplet on mips64el.
188 ,@(if (string=? "mips64el-linux"
190 '("--host=mips64el-unknown-linux-gnu")
192 ;; The same is also true with aarch64.
193 ,@(if (string=? "aarch64-linux"
195 '("--host=aarch64-unknown-linux-gnu")
197 (string-append "--with-ncurses="
199 (home-page "http://aa-project.sourceforge.net/aalib/")
200 (synopsis "ASCII-art library")
202 "AA-lib is a low level gfx library which does not require graphics device.
203 In fact, there is no graphical output possible. AA-lib replaces those
204 old-fashioned output methods with powerful ascii-art renderer.")
205 (license license:lgpl2.0+)))
207 (define-public celluloid
214 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
215 "/download/v" version "/celluloid-" version ".tar.xz"))
217 (base32 "0a3bhvs38gxjplygb0q9cx5djl5y0bmnxgaq0sd65j610a60f5h0"))))
218 (build-system glib-or-gtk-build-system)
220 `(("intltool" ,intltool)
221 ("pkg-config" ,pkg-config)))
224 ("libepoxy" ,libepoxy)
226 (home-page "https://github.com/celluloid-player/celluloid")
227 (synopsis "GTK+ frontend for the mpv media player")
228 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
229 It interacts with mpv via the client API exported by libmpv, allowing access to
230 mpv's powerful playback capabilities.")
231 (license license:gpl3+)))
233 (define-public liba52
240 ;; A mirror://sourceforge URI doesn't work, presumably
241 ;; because the SourceForge project is misconfigured.
242 "http://liba52.sourceforge.net/files/a52dec-" version
246 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
247 (patches (search-patches "liba52-enable-pic.patch"
248 "liba52-set-soname.patch"
249 "liba52-use-mtune-not-mcpu.patch"
250 "liba52-link-with-libm.patch"))))
251 (build-system gnu-build-system)
252 ;; XXX We need to run ./bootstrap because of the build system fixes above.
254 `(("autoconf" ,autoconf)
255 ("automake" ,automake)
256 ("libtool" ,libtool)))
257 (arguments `(#:configure-flags '("--enable-shared")
259 (modify-phases %standard-phases
260 ;; XXX We need to run ./bootstrap because of the build
261 ;; system fixes above.
263 (lambda _ (invoke "sh" "bootstrap"))))))
264 (home-page "http://liba52.sourceforge.net/")
265 (synopsis "ATSC A/52 stream decoder")
266 (description "liba52 is a library for decoding ATSC A/52 streams. The
267 A/52 standard is used in a variety of applications, including digital
268 television and DVD. It is also known as AC-3.")
269 (license license:gpl2+)))
271 (define-public libaom
272 ;; The 1.0.0-errata1 release installs a broken pkg-config .pc file. This
273 ;; is fixed in libaom commit 0ddc150, but we use an even later commit.
274 (let ((commit "22b150bf040608028a56d8bf39e72f771383d836")
278 (version (git-version "1.0.0-errata1" revision commit))
282 (url "https://aomedia.googlesource.com/aom/")
284 (file-name (git-file-name name version))
287 "1pdd5h3n42607n6qmggz4yv8izhjr2kl6knb3kh7gh4v0vy47h1r"))))
288 (build-system cmake-build-system)
291 ("pkg-config" ,pkg-config)
292 ("python" ,python))) ; to detect the version
294 `(#:tests? #f ;no check target
296 ;; build dynamic library
297 (list "-DBUILD_SHARED_LIBS=YES"
299 "-DAOM_TARGET_CPU=generic"
300 (string-append "-DCMAKE_INSTALL_PREFIX="
301 (assoc-ref %outputs "out")))))
302 (home-page "https://aomedia.googlesource.com/aom/")
303 (synopsis "AV1 video codec")
304 (description "Libaom is the reference implementation of AV1. It includes
305 a shared library and encoder and decoder command-line executables.")
306 (license license:bsd-2))))
308 (define-public libmpeg2
314 ;; A mirror://sourceforge URI doesn't work, presumably
315 ;; because the SourceForge project is misconfigured.
316 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
317 name "-" version ".tar.gz"))
318 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
319 "libmpeg2-global-symbol-test.patch"))
322 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
330 (build-system gnu-build-system)
331 (home-page "http://libmpeg2.sourceforge.net/")
332 (synopsis "MPEG1 and MPEG2 video decoder library")
334 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
335 (license license:gpl2+)))
337 (define-public libx264
340 (version "20180810-2245")
343 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
344 "x264-snapshot-" version "-stable.tar.bz2"))
347 "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv"))))
348 (build-system gnu-build-system)
350 `(("pkg-config" ,pkg-config)
352 ;; TODO: Add gpac input
354 `(#:tests? #f ;no check target
355 #:configure-flags '("--enable-shared"
356 ;; Don't build the command-line program. If we
357 ;; want it later, we should do so in a different
358 ;; package to avoid a circular dependency (the x264
359 ;; program depends on ffmpeg and ffmpeg depends on
363 ;; On MIPS, we must pass "--disable-asm" or else
364 ;; configure fails after printing: "You specified a
365 ;; pre-MSA CPU in your CFLAGS. If you really want
366 ;; to run on such a CPU, configure with
368 ,@(if (string-prefix? "mips"
369 (or (%current-target-system)
373 (home-page "https://www.videolan.org/developers/x264.html")
374 (synopsis "H.264 video coding library")
375 (description "libx264 is an advanced encoding library for creating
376 H.264 (MPEG-4 AVC) video streams.")
377 (license (list license:gpl2+ ;most files
378 license:isc ;common/x86/x86inc.asm
379 license:lgpl2.1+ ;extras/getopt.c
380 license:bsd-3 ;extras/inttypes.h
381 (license:non-copyleft ;extras/cl*.h
383 "See extras/cl.h in the distribution.")))))
385 (define-public mkvtoolnix
392 (uri (string-append "https://mkvtoolnix.download/sources/"
393 "mkvtoolnix-" version ".tar.xz"))
395 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
396 (modules '((guix build utils)))
398 ;; Delete bundled libraries.
399 (for-each delete-file-recursively
407 (build-system gnu-build-system)
408 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
417 ("libmatroska" ,libmatroska)
419 ("libvorbis" ,libvorbis)
423 ("qtmultimedia" ,qtmultimedia)
427 `(("docbook-xsl" ,docbook-xsl)
428 ("gettext" ,gettext-minimal)
429 ("googletest" ,googletest)
431 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
433 ("pkg-config" ,pkg-config)
439 (list (string-append "--with-boost="
440 (assoc-ref %build-inputs "boost"))
441 (string-append "--with-docbook-xsl-root="
442 (assoc-ref %build-inputs "docbook-xsl")
443 "/xml/xsl/docbook-xsl-"
444 ,(package-version docbook-xsl))
445 "--enable-update-check=no"
446 "--enable-precompiled-headers=no")
448 (modify-phases %standard-phases
449 (add-after 'unpack 'patch-relative-file-names
450 (lambda* (#:key outputs #:allow-other-keys)
451 (let ((out (assoc-ref outputs "out")))
452 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
454 (string-append out "/bin/" match)))
456 (add-before 'configure 'add-googletest
457 (lambda* (#:key inputs #:allow-other-keys)
459 (string-append (assoc-ref inputs "googletest")
460 "/include/gtest") "lib/gtest")
464 (let ((-j (list "-j" (number->string (parallel-job-count)))))
465 (apply invoke "rake" -j))))
468 (invoke "rake" "tests/unit")))
471 (invoke "rake" "install")))
472 (add-after 'install 'post-install
473 (lambda* (#:key outputs #:allow-other-keys)
474 ;; Move the Qt interface to "gui".
475 (let* ((out (assoc-ref outputs "out"))
476 (gui (assoc-ref outputs "gui"))
477 (strip-store-dir (lambda (path)
478 (substring path (string-prefix-length out path)))))
481 (mkdir-p (string-append gui (dirname file)))
482 (rename-file (string-append out file)
483 (string-append gui file)))
484 (append '("/bin/mkvtoolnix-gui"
485 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
486 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
487 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
488 (map strip-store-dir (find-files out "\\.ogg$"))
489 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
490 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
493 (delete-file-recursively (string-append out file)))
494 '("/share/applications"
497 "/share/mkvtoolnix")))
499 (home-page "https://mkvtoolnix.download")
500 (synopsis "Tools to create, alter and inspect Matroska files")
502 "MKVToolNix provides tools for getting information about Matroska files
503 (@command{mkvinfo}), extracting tracks/data from Matroska files
504 (@command{mkvextract}), and creating Matroska files from other media files
505 (@command{mkvmerge}).")
506 (license license:gpl2)))
512 (outputs '("out" "static"))
516 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
517 "/downloads/x265_" version ".tar.gz")
518 (string-append "https://download.videolan.org/videolan/x265/"
519 "x265_" version ".tar.gz")))
521 (base32 "1k5vijsy6cgcghw69f5275xfmbjjx7js0nlbgxbd6krnjb7sv6zv"))
522 (patches (search-patches "x265-arm-flags.patch"))
523 (modules '((guix build utils)))
525 (delete-file-recursively "source/compat/getopt")
527 (build-system cmake-build-system)
529 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
531 ;; Ensure position independent code for everyone.
532 (list "-DENABLE_PIC=TRUE"
533 ,@(if (string-prefix? "armhf" (or (%current-system)
534 (%current-target-system)))
535 '("-DENABLE_ASSEMBLY=OFF")
537 (string-append "-DCMAKE_INSTALL_PREFIX="
538 (assoc-ref %outputs "out")))
540 (modify-phases %standard-phases
541 (add-after 'unpack 'prepare-build
543 (delete-file-recursively "build")
545 ;; recognize armv8 in 32-bit mode as ARM
546 (substitute* "CMakeLists.txt"
547 (("armv6l") "armv8l"))
549 (add-before 'configure 'build-12-bit
550 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
551 (mkdir "../build-12bit")
552 (with-directory-excursion "../build-12bit"
555 "-DHIGH_BIT_DEPTH=ON"
560 (substitute* (cons "cmake_install.cmake"
562 (find-files "CMakeFiles/x265-shared.dir" ".")
563 (find-files "CMakeFiles/x265-static.dir" ".")))
564 (("libx265") "libx265_main12"))
566 (add-before 'configure 'build-10-bit
567 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
568 (mkdir "../build-10bit")
569 (with-directory-excursion "../build-10bit"
572 "-DHIGH_BIT_DEPTH=ON"
576 (substitute* (cons "cmake_install.cmake"
578 (find-files "CMakeFiles/x265-shared.dir" ".")
579 (find-files "CMakeFiles/x265-static.dir" ".")))
580 (("libx265") "libx265_main10"))
582 (add-after 'install 'install-more-libs
584 (with-directory-excursion "../build-12bit"
585 (invoke "make" "install"))
586 (with-directory-excursion "../build-10bit"
587 (invoke "make" "install"))))
588 (add-before 'strip 'move-static-libs
589 (lambda* (#:key outputs #:allow-other-keys)
590 (let ((out (assoc-ref outputs "out"))
591 (static (assoc-ref outputs "static")))
592 (mkdir-p (string-append static "/lib"))
593 (with-directory-excursion
594 (string-append out "/lib")
598 (string-append static "/lib/" file)))
599 (find-files "." "\\.a$"))))
601 (home-page "http://x265.org/")
602 (synopsis "Library for encoding h.265/HEVC video streams")
603 (description "x265 is a H.265 / HEVC video encoder application library,
604 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
605 (license license:gpl2+)))
607 (define-public libass
614 "https://github.com/libass/libass/releases/download/"
615 version "/libass-" version ".tar.xz"))
618 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
619 (build-system gnu-build-system)
621 `(("pkg-config" ,pkg-config)
624 `(("freetype" ,freetype)
626 ("fontconfig" ,fontconfig)
627 ("harfbuzz" ,harfbuzz)
629 (home-page "https://github.com/libass/libass")
630 (synopsis "Subtitle rendering library for the ASS/SSA format")
631 (description "libass is a subtitle rendering library for the
632 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
633 (license license:isc)))
635 (define-public libcaca
638 (version "0.99.beta19")
641 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
645 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
646 (build-system gnu-build-system)
647 (native-inputs `(("pkg-config" ,pkg-config)))
649 `(("freeglut" ,freeglut)
656 (home-page "http://caca.zoy.org/wiki/libcaca")
657 (synopsis "Colour ASCII-art library")
658 (description "libcaca is a graphics library that outputs text instead of
659 pixels, so that it can work on older video cards or text terminals. It
660 supports Unicode, 2048 colors, dithering of color images, and advanced text
662 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
664 (define-public libdca
671 "https://download.videolan.org/pub/videolan/libdca/"
672 version "/libdca-" version ".tar.bz2"))
675 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
676 (build-system gnu-build-system)
677 (home-page "https://www.videolan.org/developers/libdca.html")
678 (synopsis "DTS Coherent Acoustics decoder")
679 (description "libdca is a library for decoding DTS Coherent Acoustics
681 (license license:gpl2+)))
690 "mirror://sourceforge/libdv/libdv/"
691 version "/libdv-" version ".tar.gz"))
694 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
695 (build-system gnu-build-system)
696 (native-inputs `(("pkg-config" ,pkg-config)))
697 (inputs `(("libxv" ,libxv)))
698 (home-page "http://libdv.sourceforge.net/")
699 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
700 (description "The Quasar DV codec (libdv) is a software codec for DV
701 video, the encoding format used by most digital camcorders, typically those
702 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
703 developed according to the official standards for DV video: IEC 61834 and
705 (license license:lgpl2.1+)))
707 (define-public libmatroska
714 (uri (string-append "https://dl.matroska.org/downloads/"
715 "libmatroska/libmatroska-" version ".tar.xz"))
717 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
718 (build-system cmake-build-system)
720 `(("libebml" ,libebml)))
723 (list "-DBUILD_SHARED_LIBS=YES")
724 #:tests? #f)) ; no test suite
725 (home-page "https://www.matroska.org")
726 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
728 "Matroska aims to become the standard of multimedia container formats.
729 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
730 of XML. EBML enables the Matroska Development Team to gain significant
731 advantages in terms of future format extensibility, without breaking file
732 support in old parsers.
733 libebml is a C++ library to read and write EBML files.")
734 (license license:lgpl2.1)))
744 ;; Newer releases are only available on GitHub.
745 (string-append "https://github.com/01org/libva/releases/download/"
746 version "/libva-" version ".tar.bz2")
747 ;; Keep the old URL around for compatibility.
748 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
749 "libva/libva-" version "/libva-" version ".tar.bz2")))
751 (base32 "0y38mw1ggxm15zq06r4qpwhd5wx4bppw1rsxpr6sq1m5d79rra1s"))))
752 (build-system gnu-build-system)
754 `(("pkg-config" ,pkg-config)))
759 ("libxfixes" ,libxfixes)
761 ("wayland" ,wayland)))
764 (modify-phases %standard-phases
766 'build 'fix-dlopen-paths
767 (lambda* (#:key outputs #:allow-other-keys)
768 (let ((out (assoc-ref outputs "out")))
769 (substitute* "va/drm/va_drm_auth_x11.c"
770 (("\"libva-x11\\.so\\.%d\"")
771 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
773 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
774 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
776 (list (string-append "--with-drivers-path="
777 (assoc-ref %build-inputs "mesa") "/lib/dri"))
778 ;; However, we can't write to mesa's store directory, so override the
779 ;; following make variable to install the dummy driver to libva's
780 ;; $prefix/lib/dri directory.
782 (list (string-append "dummy_drv_video_ladir="
783 (assoc-ref %outputs "out") "/lib/dri"))))
784 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
785 (synopsis "Video acceleration library")
786 (description "The main motivation for VA-API (Video Acceleration API) is
787 to enable hardware accelerated video decode/encode at various
788 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
789 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
790 (license license:expat)))
792 (define-public libva-utils
799 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
800 version "/libva-utils-" version ".tar.bz2"))
802 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
803 (build-system gnu-build-system)
806 (list "--enable-wayland"
809 `(("pkg-config" ,pkg-config)))
815 ("wayland" ,wayland)))
816 (home-page "https://01.org/linuxmedia/vaapi")
817 (synopsis "Collection of testing utilities for VA-API")
819 "This is a collection of utilities to query and test the @acronym{VA-API,
820 Video Acceleration API} implemented by the libva library.
822 These tools require a supported graphics chip, driver, and VA-API back end to
824 (license license:expat)))
826 (define-public ffmpeg
832 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
836 "1m5nkc61ihgcf0b2wabm0zyqa8sj3c0w8fi6kr879lb0kdzciiyf"))))
837 (build-system gnu-build-system)
840 ("fontconfig" ,fontconfig)
841 ("freetype" ,freetype)
842 ("frei0r-plugins" ,frei0r-plugins)
849 ("libbluray" ,libbluray)
851 ("libcdio-paranoia" ,libcdio-paranoia)
853 ("libtheora" ,libtheora)
855 ("libvdpau" ,libvdpau)
856 ("libvorbis" ,libvorbis)
862 ("pulseaudio" ,pulseaudio)
874 ("pkg-config" ,pkg-config)
876 ("python" ,python-2) ; scripts use interpreter python2
880 `(#:test-target "fate"
882 ;; possible additional inputs:
883 ;; --enable-avisynth enable reading of AviSynth script
885 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
886 ;; --enable-libcelt enable CELT decoding via libcelt [no]
887 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
888 ;; and libraw1394 [no]
889 ;; --enable-libfaac enable AAC encoding via libfaac [no]
890 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
891 ;; --enable-libflite enable flite (voice synthesis) support via
893 ;; --enable-libgme enable Game Music Emu via libgme [no]
894 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
895 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
896 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
897 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
898 ;; --enable-libnut enable NUT (de)muxing via libnut,
899 ;; native (de)muxer exists [no]
900 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
901 ;; libopencore-amrnb [no]
902 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
903 ;; libopencore-amrwb [no]
904 ;; --enable-libopencv enable video filtering via libopencv [no]
905 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
907 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
908 ;; --enable-libschroedinger enable Dirac de/encoding via
909 ;; libschroedinger [no]
910 ;; --enable-libshine enable fixed-point MP3 encoding via
912 ;; --enable-libssh enable SFTP protocol via libssh [no]
913 ;; (libssh2 does not work)
914 ;; --enable-libstagefright-h264 enable H.264 decoding via
915 ;; libstagefright [no]
916 ;; --enable-libutvideo enable Ut Video encoding and decoding via
918 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
919 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
920 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
921 ;; libvo-amrwbenc [no]
922 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
923 ;; --enable-libxavs enable AVS encoding via xavs [no]
924 ;; --enable-libzmq enable message passing via libzmq [no]
925 ;; --enable-libzvbi enable teletext support via libzvbi [no]
926 ;; --enable-opencl enable OpenCL code
927 '("--enable-avresample"
928 "--enable-gpl" ; enable optional gpl licensed parts
931 "--enable-fontconfig"
940 "--enable-libfreetype"
941 "--enable-libmp3lame"
947 "--enable-libtwolame"
948 "--enable-libvidstab"
958 "--enable-runtime-cpudetect"
960 ;; The HTML pages take 7.2 MiB
961 "--disable-htmlpages"
963 ;; The static libraries are 23 MiB
966 ;; Runtime cpu detection is not implemented on
967 ;; MIPS, so we disable some features.
970 "--disable-mipsdspr2"
973 (modify-phases %standard-phases
976 ;; configure does not work followed by "SHELL=..." and
977 ;; "CONFIG_SHELL=..."; set environment variables instead
978 (lambda* (#:key outputs configure-flags #:allow-other-keys)
979 (let ((out (assoc-ref outputs "out")))
980 (substitute* "configure"
981 (("#! /bin/sh") (string-append "#!" (which "sh"))))
982 (setenv "SHELL" (which "bash"))
983 (setenv "CONFIG_SHELL" (which "bash"))
986 (string-append "--prefix=" out)
987 ;; Add $libdir to the RUNPATH of all the binaries.
988 (string-append "--extra-ldflags=-Wl,-rpath="
992 'check 'set-ld-library-path
994 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
996 (let* ((dso (find-files "." "\\.so$"))
997 (path (string-join (map dirname dso) ":")))
998 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
999 (setenv "LD_LIBRARY_PATH" path)
1001 (home-page "https://www.ffmpeg.org/")
1002 (synopsis "Audio and video framework")
1003 (description "FFmpeg is a complete, cross-platform solution to record,
1004 convert and stream audio and video. It includes the libavcodec
1005 audio/video codec library.")
1006 (license license:gpl2+)))
1008 (define-public ffmpeg-3.4
1014 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1018 "0gmqbhg5jjcfanrxrl657zn12lzz73sfs8xwryfy7n9rn6f2fwim"))))
1020 (substitute-keyword-arguments (package-arguments ffmpeg)
1021 ((#:configure-flags flags)
1022 `(delete "--enable-libdav1d" (delete "--enable-libaom"
1024 (inputs (alist-delete "dav1d" (alist-delete "libaom"
1025 (package-inputs ffmpeg))))))
1027 (define-public ffmpeg-for-stepmania
1036 (url "https://github.com/stepmania/ffmpeg.git")
1037 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1039 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1040 (file-name (git-file-name "ffmpeg" version))))
1042 (substitute-keyword-arguments (package-arguments ffmpeg)
1043 ((#:configure-flags flags)
1044 '(list "--disable-programs"
1047 "--disable-avdevice"
1048 "--disable-swresample"
1049 "--disable-postproc"
1050 "--disable-avfilter"
1052 "--enable-static"))))
1055 (define-public ffmpegthumbnailer
1057 (name "ffmpegthumbnailer")
1062 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1064 (file-name (git-file-name name version))
1067 "0kl8aa547icy9b05njps02a8sw4yn4f8fzs228kig247sn09s4cp"))))
1068 (build-system cmake-build-system)
1070 `(("pkg-config" ,pkg-config)))
1072 `(("ffmpeg" ,ffmpeg)
1073 ("libjpeg-turbo" ,libjpeg-turbo)
1077 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1078 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1079 (synopsis "Create thumbnails from video files")
1080 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1081 can be used by file managers to create thumbnails for your video files. The
1082 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1083 videoformats depend on the configuration flags of ffmpeg.")
1084 (license license:gpl2+)))
1093 "https://download.videolan.org/pub/videolan/vlc/"
1094 (car (string-split version #\-))
1095 "/vlc-" version ".tar.xz"))
1098 "1xmxjpyzdhabchwncz6lvx3kzvl7fz9c42bkv3nbj68albs9w570"))
1101 ;; TODO: The test "libvlc_slaves" fails. Applied upstream as
1102 ;; <https://git.videolan.org/?p=vlc.git;a=commit;h=4186c94104ee528abd6860611b49515f3e6ec644>.
1103 ;; Try removing it in 3.0.9.
1104 "vlc-fix-test_libvlc_slaves.patch"))))
1105 (build-system gnu-build-system)
1109 ("gettext" ,gettext-minimal)
1110 ("git" ,git) ; needed for a test
1111 ("pkg-config" ,pkg-config)))
1112 ;; FIXME: Add optional inputs once available.
1114 `(("alsa-lib" ,alsa-lib)
1120 ("fontconfig" ,fontconfig)
1121 ("freetype" ,freetype)
1122 ("fribidi" ,fribidi)
1125 ("libarchive" ,libarchive)
1127 ("libavc1394" ,libavc1394)
1128 ("libbluray" ,libbluray)
1129 ("libcaca" ,libcaca)
1130 ("libcddb" ,libcddb)
1132 ("libdvbpsi" ,libdvbpsi)
1133 ("libdvdnav" ,libdvdnav)
1134 ("libdvdread" ,libdvdread)
1135 ("libebml" ,libebml)
1136 ("libgcrypt" ,libgcrypt)
1138 ("libkate" ,libkate)
1140 ("libmatroska" ,libmatroska)
1141 ("libmicrodns" ,libmicrodns)
1142 ("libmodplug" ,libmodplug)
1143 ("libmpeg2" ,libmpeg2)
1146 ("libraw1394" ,libraw1394)
1147 ("librsvg" ,librsvg)
1148 ("libsamplerate" ,libsamplerate)
1149 ("libsecret" ,libsecret)
1150 ("libssh2" ,libssh2)
1151 ("libupnp" ,libupnp)
1153 ("libvdpau" ,libvdpau)
1154 ("libvorbis" ,libvorbis)
1156 ("libtheora" ,libtheora)
1157 ("libx264" ,libx264)
1158 ("libxext" ,libxext)
1160 ("libxinerama" ,libxinerama)
1161 ("libxml2" ,libxml2)
1163 ("livemedia-utils" ,livemedia-utils)
1168 ("pulseaudio" ,pulseaudio)
1169 ("protobuf" ,protobuf)
1170 ("python" ,python-wrapper)
1173 ("qtx11extras" ,qtx11extras)
1176 ("sdl-image" ,sdl-image)
1178 ("speexdsp" ,speexdsp)
1180 ("twolame" ,twolame)
1182 ("wayland" ,wayland)
1183 ("wayland-protocols" ,wayland-protocols)
1185 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1189 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1190 (assoc-ref %build-inputs "ffmpeg")
1191 "/lib")) ;needed for the tests
1194 (modify-phases %standard-phases
1195 (add-after 'unpack 'patch-source
1196 (lambda* (#:key inputs #:allow-other-keys)
1197 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1198 (substitute* "configure"
1199 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1200 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1201 ;; Some of the tests require using the display to test out VLC,
1202 ;; which fails in our sandboxed build system
1203 (substitute* "test/run_vlc.sh"
1204 (("./vlc --ignore-config") "echo"))
1206 ;; modules/text_renderer/freetype/text_layout.c uses a
1207 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1208 ;; from fribidi.h, so for now we enable the use of deprecated
1209 ;; fribidi interfaces from this file.
1210 ;; FIXME: Try removing this for vlc >= 3.0.3.
1211 (substitute* "modules/text_renderer/freetype/text_layout.c"
1212 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1214 ;; Fix build with libssh2 > 1.8.0:
1215 ;; <https://trac.videolan.org/vlc/ticket/22060>
1216 ;; <https://git.videolan.org/?p=vlc.git;a=commit;h=11449b5cd8b415768e010d9b7c1d6ba3cea21f82>
1217 (substitute* "modules/access/sftp.c"
1218 (("010801") "010900"))
1220 (add-after 'strip 'regenerate-plugin-cache
1221 (lambda* (#:key outputs #:allow-other-keys)
1222 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1223 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1224 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1225 ;; it references. Thus, we first reset the timestamps of all
1226 ;; these files, and then regenerate the cache such that the
1227 ;; mtimes it includes are always zero instead of being dependent
1228 ;; on the build time.
1229 (let* ((out (assoc-ref outputs "out"))
1230 (pkglibdir (string-append out "/lib/vlc"))
1231 (plugindir (string-append pkglibdir "/plugins"))
1232 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1233 ;; TODO: Factorize 'reset-timestamps'.
1234 (for-each (lambda (file)
1235 (let ((s (lstat file)))
1236 (unless (eq? (stat:type s) 'symlink)
1238 (find-files plugindir))
1239 (invoke cachegen plugindir))))
1240 (add-after 'install 'wrap-executable
1241 (lambda* (#:key outputs #:allow-other-keys)
1242 (let ((out (assoc-ref outputs "out"))
1243 (plugin-path (getenv "QT_PLUGIN_PATH")))
1244 (wrap-program (string-append out "/bin/vlc")
1245 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1247 (home-page "https://www.videolan.org/")
1248 (synopsis "Audio and video framework")
1249 (description "VLC is a cross-platform multimedia player and framework
1250 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1251 streaming protocols.")
1252 (license license:gpl2+)))
1254 (define-public mplayer
1261 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1265 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
1266 (build-system gnu-build-system)
1267 ;; FIXME: Add additional inputs once available.
1269 `(("pkg-config" ,pkg-config)))
1271 `(("alsa-lib" ,alsa-lib)
1272 ("cdparanoia" ,cdparanoia)
1273 ("ffmpeg" ,ffmpeg-3.4)
1274 ("fontconfig" ,fontconfig)
1275 ("freetype" ,freetype)
1276 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
1279 ("libdvdcss" ,libdvdcss)
1280 ("libdvdnav" ,libdvdnav)
1281 ("libjpeg" ,libjpeg)
1282 ("libmpeg2" ,libmpeg2)
1283 ("libmpg123" ,mpg123) ; audio codec for MP3
1285 ("libtheora" ,libtheora)
1286 ("libvdpau" ,libvdpau)
1287 ("libvorbis" ,libvorbis)
1289 ("libx264" ,libx264)
1290 ("libxinerama" ,libxinerama)
1292 ("libxxf86dga" ,libxxf86dga)
1296 ("pulseaudio" ,pulseaudio)
1297 ("python" ,python-wrapper)
1303 `(#:tests? #f ; no test target
1305 (modify-phases %standard-phases
1307 ;; configure does not work followed by "SHELL=..." and
1308 ;; "CONFIG_SHELL=..."; set environment variables instead
1309 (lambda* (#:key inputs outputs #:allow-other-keys)
1310 (let ((out (assoc-ref outputs "out"))
1311 (libx11 (assoc-ref inputs "libx11")))
1312 (substitute* "configure"
1313 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1314 (setenv "SHELL" (which "bash"))
1315 (setenv "CONFIG_SHELL" (which "bash"))
1316 (invoke "./configure"
1317 (string-append "--extra-cflags=-I"
1318 libx11 "/include") ; to detect libx11
1319 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1320 (string-append "--prefix=" out)
1321 ;; Enable runtime cpu detection where supported,
1322 ;; and choose a suitable target.
1323 ,@(match (or (%current-target-system)
1326 '("--enable-runtime-cpudetection"
1327 "--target=x86_64-linux"))
1329 '("--enable-runtime-cpudetection"
1330 "--target=i686-linux"))
1332 '("--target=mips3-linux"))
1333 (_ (list (string-append
1335 (or (%current-target-system)
1336 (nix-system->gnu-triplet
1337 (%current-system)))))))
1338 "--disable-iwmmxt")))))))
1339 (home-page "https://www.mplayerhq.hu/design7/news.html")
1340 (synopsis "Audio and video player")
1341 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1342 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1343 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1344 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1345 (license license:gpl2)))
1354 (url "https://github.com/mpv-player/mpv.git")
1355 (commit (string-append "v" version))))
1356 (file-name (git-file-name name version))
1359 "17mxjgcfljlv6h0ik3332xsqbs0ybvk6dkwflyl0cjh15vl1iv6f"))))
1360 (build-system waf-build-system)
1362 `(("perl" ,perl) ; for zsh completion file
1363 ("pkg-config" ,pkg-config)
1364 ("python-docutils" ,python-docutils)))
1365 ;; Missing features: libguess, V4L2
1367 `(("alsa-lib" ,alsa-lib)
1374 ("libbluray" ,libbluray)
1375 ("libcaca" ,libcaca)
1376 ("libbs2b" ,libbs2b)
1377 ("libcdio-paranoia" ,libcdio-paranoia)
1378 ("libdvdread" ,libdvdread)
1379 ("libdvdnav" ,libdvdnav)
1380 ("libjpeg" ,libjpeg)
1382 ("libvdpau" ,libvdpau)
1384 ("libxext" ,libxext)
1385 ("libxinerama" ,libxinerama)
1386 ("libxrandr" ,libxrandr)
1387 ("libxscrnsaver" ,libxscrnsaver)
1389 ;; XXX: lua > 5.2 is not currently supported; see
1390 ;; waftools/checks/custom.py
1394 ("pulseaudio" ,pulseaudio)
1396 ("shaderc" ,shaderc)
1397 ("vulkan-headers" ,vulkan-headers)
1398 ("vulkan-loader" ,vulkan-loader)
1400 ("wayland" ,wayland)
1401 ("wayland-protocols" ,wayland-protocols)
1402 ("libxkbcommon" ,libxkbcommon)
1403 ("youtube-dl" ,youtube-dl)
1407 (modify-phases %standard-phases
1409 'unpack 'patch-paths
1410 (lambda* (#:key inputs #:allow-other-keys)
1411 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1412 (substitute* "player/lua/ytdl_hook.lua"
1413 (("\"youtube-dl\",")
1414 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1417 'configure 'setup-waf
1418 (lambda* (#:key inputs #:allow-other-keys)
1419 (let ((waf (assoc-ref inputs "waf")))
1420 (copy-file (string-append waf "/bin/waf") "waf"))
1423 #:configure-flags (list "--enable-libmpv-shared"
1426 "--disable-build-date")
1427 ;; No check function defined.
1429 (home-page "https://mpv.io/")
1430 (synopsis "Audio and video player")
1431 (description "mpv is a general-purpose audio and video player. It is a
1432 fork of mplayer2 and MPlayer. It shares some features with the former
1433 projects while introducing many more.")
1434 (license license:gpl2+)))
1436 (define-public gnome-mpv
1437 (deprecated-package "gnome-mpv" celluloid))
1439 (define-public libvpx
1444 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1447 (url "https://chromium.googlesource.com/webm/libvpx")
1448 (commit (string-append "v" version))))
1449 (file-name (git-file-name name version))
1452 "0mm1dcfa268rwsrgzqpbbgq4lwrvdzgp90h9dxsnkhai70l7gipq"))
1453 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1454 (build-system gnu-build-system)
1456 `(#:configure-flags (list "--enable-shared"
1458 ;; Limit size to avoid CVE-2015-1258
1459 "--size-limit=16384x16384"
1460 (string-append "--prefix=" (assoc-ref %outputs "out")))
1461 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1462 (assoc-ref %outputs "out") "/lib"))
1463 #:phases (modify-phases %standard-phases
1465 (lambda* (#:key configure-flags #:allow-other-keys)
1466 ;; The configure script does not understand some of the GNU
1467 ;; options, so we only add the flags specified above.
1468 (apply invoke "./configure" configure-flags))))
1469 #:tests? #f)) ; no check target
1473 (synopsis "VP8/VP9 video codec")
1474 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1475 (license license:bsd-3)
1476 (home-page "https://www.webmproject.org/")))
1478 ;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
1479 (define-public libvpx-1.7
1484 (inherit (package-source libvpx))
1486 (url "https://chromium.googlesource.com/webm/libvpx")
1487 (commit (string-append "v" version))))
1488 (file-name (git-file-name "libvpx" version))
1491 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1494 (origin-patches (package-source libvpx))
1495 (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
1497 (define-public youtube-dl
1500 (version "2019.11.22")
1503 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1504 "releases/download/" version "/youtube-dl-"
1508 "0avdlp0dc9p3lm68mfnic21x6blxmr0zvlxa4br5vj4y4sckq2m8"))))
1509 (build-system python-build-system)
1511 ;; The problem here is that the directory for the man page and completion
1512 ;; files is relative, and for some reason, setup.py uses the
1513 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1514 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1515 ;; completion file is called 'youtube-dl' rather than
1516 ;; 'youtube-dl.bash-completion'.
1517 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1518 #:phases (modify-phases %standard-phases
1519 (add-before 'install 'fix-the-data-directories
1520 (lambda* (#:key outputs #:allow-other-keys)
1521 (let ((prefix (assoc-ref outputs "out")))
1522 (mkdir "bash-completion")
1523 (rename-file "youtube-dl.bash-completion"
1524 "bash-completion/youtube-dl")
1525 (substitute* "setup.py"
1526 (("youtube-dl\\.bash-completion")
1527 "bash-completion/youtube-dl")
1529 (string-append "'" prefix "/etc/"))
1531 (string-append "'" prefix "/share/")))
1533 (synopsis "Download videos from YouTube.com and other sites")
1535 "Youtube-dl is a small command-line program to download videos from
1536 YouTube.com and many more sites.")
1537 (home-page "https://yt-dl.org")
1538 (license license:public-domain)))
1540 (define-public youtube-dl-gui
1542 (name "youtube-dl-gui")
1547 (uri (pypi-uri "Youtube-DLG" version))
1550 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1551 (build-system python-build-system)
1553 ;; In Guix, wxpython has not yet been packaged for Python 3.
1554 `(#:python ,python-2
1555 ;; This package has no tests.
1558 (modify-phases %standard-phases
1559 (add-before 'build 'patch-source
1560 (lambda* (#:key inputs #:allow-other-keys)
1561 ;; The youtube-dl-gui program lets you configure options. Some of
1562 ;; them are problematic, so we change their defaults.
1563 (substitute* "youtube_dl_gui/optionsmanager.py"
1564 ;; When this is true, the builder process will try (and fail) to
1565 ;; write logs to the builder user's home directory.
1566 (("'enable_log': True") "'enable_log': False")
1567 ;; This determines which youtube-dl program youtube-dl-gui will
1568 ;; run. If we don't set this, then youtube-dl-gui might download
1569 ;; an arbitrary copy from the Internet into the user's home
1570 ;; directory and run it, so let's make sure youtube-dl-gui uses
1571 ;; the youtube-dl from the inputs by default.
1572 (("'youtubedl_path': self.config_path")
1573 (string-append "'youtubedl_path': '"
1574 (assoc-ref inputs "youtube-dl")
1576 ;; When this is True, when youtube-dl-gui is finished downloading
1577 ;; a file, it will try (and possibly fail) to open the directory
1578 ;; containing the downloaded file. This can fail because it
1579 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1580 ;; adding xdg-utils to the propagated inputs is not enough to
1581 ;; make this work, so for now we set the default to False.
1582 (("'open_dl_dir': True") "'open_dl_dir': False"))
1583 ;; The youtube-dl program from the inputs is actually a wrapper
1584 ;; script written in bash, so attempting to invoke it as a python
1585 ;; script will fail.
1586 (substitute* "youtube_dl_gui/downloaders.py"
1587 (("cmd = \\['python', self\\.youtubedl_path\\]")
1588 "cmd = [self.youtubedl_path]"))
1589 ;; Use relative paths for installing data files so youtube-dl-gui
1590 ;; installs the files relative to its prefix in the store, rather
1591 ;; than relative to /. Also, instead of installing data files into
1592 ;; $prefix/usr/share, install them into $prefix/share for
1593 ;; consistency (see: (standards) Directory Variables).
1594 (substitute* "setup.py"
1595 (("= '/usr/share") "= 'share"))
1596 ;; Update get_locale_file() so it finds the installed localization
1598 (substitute* "youtube_dl_gui/utils.py"
1599 (("os\\.path\\.join\\('/usr', 'share'")
1600 (string-append "os.path.join('"
1601 (assoc-ref %outputs "out")
1604 (add-after 'install 'create-desktop-file
1605 (lambda* (#:key outputs #:allow-other-keys)
1606 (let* ((out (assoc-ref outputs "out"))
1607 (applications (string-append out "/share/applications")))
1608 (mkdir-p applications)
1609 (call-with-output-file
1610 (string-append applications "/youtube-dl-gui.desktop")
1615 Name=Youtube-dl GUI~@
1616 Comment=Graphical interface to download video with youtube-dl~@
1617 Exec=youtube-dl-gui~@
1618 TryExec=youtube-dl-gui~@
1620 Icon=youtube-dl-gui~@
1622 Categories=AudioVideo;Audio;Video;Network~%")))
1625 `(("python2-wxpython" ,python2-wxpython)
1626 ("youtube-dl" ,youtube-dl)))
1627 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1629 "GUI (Graphical User Interface) for @command{youtube-dl}")
1631 "Youtube-dlG is a GUI (Graphical User Interface) for
1632 @command{youtube-dl}. You can use it to download videos from YouTube and any
1633 other site that youtube-dl supports.")
1634 (license license:unlicense)))
1636 (define-public you-get
1639 (version "0.4.1355")
1643 (url "https://github.com/soimort/you-get.git")
1644 (commit (string-append "v" version))))
1645 (file-name (git-file-name name version))
1648 "0xq7z04hvw3b3npiahlpzhbxsjvam9n9dynplyrkn84dx6k9ajbj"))))
1649 (build-system python-build-system)
1651 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1654 (modify-phases %standard-phases
1655 (add-after 'unpack 'qualify-input-references
1656 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1657 ;; happens to be in the user's $PATH at run time.
1658 (lambda* (#:key inputs #:allow-other-keys)
1659 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1661 (substitute* "src/you_get/processor/ffmpeg.py"
1662 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1663 ;; same string is also used when sniffing ffmpeg's output.
1664 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1665 (string-append prefix "'" ffmpeg "'")))
1667 #:tests? #f)) ; XXX some tests need Internet access
1668 (synopsis "Download videos, audio, or images from Web sites")
1670 "You-Get is a command-line utility to download media contents (videos,
1671 audio, images) from the Web. It can use either mpv or vlc for playback.")
1672 (home-page "https://you-get.org/")
1673 (license license:expat)))
1675 (define-public youtube-viewer
1677 (name "youtube-viewer")
1682 (url "https://github.com/trizen/youtube-viewer.git")
1684 (file-name (git-file-name name version))
1687 "0zz0r3vd2pg9zzykhrq0vnvqp5842dbgsg8cfygw9vzb9j8mlq0a"))))
1688 (build-system perl-build-system)
1690 `(("perl-module-build" ,perl-module-build)))
1691 ;; FIXME: Add optional dependencies once available:
1692 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1694 `(("perl-data-dump" ,perl-data-dump)
1695 ("perl-file-sharedir" ,perl-file-sharedir)
1696 ("perl-gtk2" ,perl-gtk2)
1697 ("perl-json" ,perl-json)
1698 ("perl-libwww" ,perl-libwww)
1699 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1700 ("perl-mozilla-ca" ,perl-mozilla-ca)
1701 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1703 ;; Some videos play without youtube-dl, but others silently fail to.
1704 ("youtube-dl" ,youtube-dl)))
1706 `(#:modules ((guix build perl-build-system)
1709 #:module-build-flags '("--gtk")
1711 (modify-phases %standard-phases
1712 (add-after 'unpack 'refer-to-inputs
1713 (lambda* (#:key inputs #:allow-other-keys)
1714 (substitute* "lib/WWW/YoutubeViewer.pm"
1716 (format #f "'~a/bin/youtube-dl'"
1717 (assoc-ref inputs "youtube-dl"))))
1719 (add-after 'install 'install-desktop
1720 (lambda* (#:key outputs #:allow-other-keys)
1721 (let* ((out (assoc-ref outputs "out"))
1722 (sharedir (string-append out "/share")))
1723 (install-file "share/gtk-youtube-viewer.desktop"
1724 (string-append sharedir "/applications"))
1725 (install-file "share/icons/gtk-youtube-viewer.png"
1726 (string-append sharedir "/pixmaps"))
1728 (add-after 'install 'wrap-program
1729 (lambda* (#:key outputs #:allow-other-keys)
1730 (let* ((out (assoc-ref outputs "out"))
1731 (bin-dir (string-append out "/bin/"))
1732 (site-dir (string-append out "/lib/perl5/site_perl/"))
1733 (lib-path (getenv "PERL5LIB")))
1734 (for-each (cut wrap-program <>
1735 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1736 (find-files bin-dir))
1739 "Lightweight application for searching and streaming videos from YouTube")
1741 "Youtube-viewer searches and plays YouTube videos in a native player.
1742 It comes with various search options; it can search for videos, playlists
1743 and/or channels. The videos are streamed directly in a selected video player
1744 at the best resolution (customizable) and with closed-captions (if available).
1745 Both command-line and GTK2 interface are available.")
1746 (home-page "https://github.com/trizen/youtube-viewer")
1747 (license license:perl-license)))
1749 (define-public libbluray
1755 (uri (string-append "https://download.videolan.org/videolan/"
1756 name "/" version "/"
1757 name "-" version ".tar.bz2"))
1760 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1761 (build-system gnu-build-system)
1763 `(#:configure-flags '("--disable-bdjava-jar")
1765 (modify-phases %standard-phases
1766 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1767 ;; Avoid the need to propagate libxml2 by referring to it
1768 ;; directly, as is already done for fontconfig & freetype.
1769 (lambda* (#:key inputs #:allow-other-keys)
1770 (let ((libxml2 (assoc-ref inputs "libxml2")))
1771 (substitute* "configure"
1772 ((" libxml-2.0") ""))
1773 (substitute* "src/libbluray.pc.in"
1774 (("^Libs.private:" field)
1775 (string-append field " -L" libxml2 "/lib -lxml2")))
1777 (add-before 'build 'fix-dlopen-paths
1778 (lambda* (#:key inputs #:allow-other-keys)
1779 (let ((libaacs (assoc-ref inputs "libaacs"))
1780 (libbdplus (assoc-ref inputs "libbdplus")))
1781 (substitute* "src/libbluray/disc/aacs.c"
1783 (string-append "\"" libaacs "/lib/libaacs\"")))
1784 (substitute* "src/libbluray/disc/bdplus.c"
1786 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1788 (native-inputs `(("pkg-config" ,pkg-config)))
1790 `(("fontconfig" ,fontconfig)
1791 ("freetype" ,freetype)
1792 ("libaacs" ,libaacs)
1793 ("libbdplus" ,libbdplus)
1794 ("libxml2" ,libxml2)))
1795 (home-page "https://www.videolan.org/developers/libbluray.html")
1796 (synopsis "Blu-Ray Disc playback library")
1798 "libbluray is a library designed for Blu-Ray Disc playback for media
1799 players, like VLC or MPlayer.")
1800 (license license:lgpl2.1+)))
1802 (define-public libdvdread
1808 (uri (string-append "https://download.videolan.org/videolan/"
1809 "libdvdread/" version "/"
1810 "libdvdread-" version ".tar.bz2"))
1813 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
1814 (build-system gnu-build-system)
1816 `(#:configure-flags '("--with-libdvdcss=yes")))
1818 `(("pkg-config" ,pkg-config)))
1820 `(("libdvdcss" ,libdvdcss)))
1821 (home-page "http://dvdnav.mplayerhq.hu/")
1822 (synopsis "Library for reading video DVDs")
1824 "Libdvdread provides a simple foundation for reading DVD video
1825 disks. It provides the functionality that is required to access many
1826 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1827 authentication and descrambling (if an external libdvdcss library is
1829 (license license:gpl2+)))
1831 (define-public dvdauthor
1838 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1842 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1843 (build-system gnu-build-system)
1845 `(("libdvdread" ,libdvdread)
1847 ("imagemagick" ,imagemagick)
1848 ("libxml2" ,libxml2)
1849 ("freetype" ,freetype)))
1851 `(("pkg-config" ,pkg-config)))
1852 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1853 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1854 MPEG-2 stream containing VOB packets.")
1855 (home-page "http://dvdauthor.sourceforge.net")
1856 (license license:gpl3+)))
1858 (define-public libdvdnav
1864 (uri (string-append "https://download.videolan.org/videolan/"
1865 "libdvdnav/" version "/"
1866 "libdvdnav-" version ".tar.bz2"))
1869 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
1870 (build-system gnu-build-system)
1872 `(("pkg-config" ,pkg-config)))
1874 `(("libdvdread" ,libdvdread)))
1875 (home-page "http://dvdnav.mplayerhq.hu/")
1876 (synopsis "Library for video DVD navigation features")
1878 "Libdvdnav is a library for developers of multimedia
1879 applications. It allows easy use of sophisticated DVD navigation features
1880 such as DVD menus, multiangle playback and even interactive DVD games. All
1881 this functionality is provided through a simple API which provides the DVD
1882 playback as a single logical stream of blocks, intermitted by special
1883 dvdnav events to report certain conditions. The main usage of libdvdnav is
1884 a loop regularly calling a function to get the next block, surrounded by
1885 additional calls to tell the library of user interaction. The whole
1886 DVD virtual machine and internal playback states are completely
1888 (license license:gpl2+)))
1890 (define-public libdvdcss
1896 (uri (string-append "https://download.videolan.org/pub/"
1897 name "/" version "/"
1898 name "-" version ".tar.bz2"))
1901 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1902 (build-system gnu-build-system)
1903 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1904 (synopsis "Library for accessing DVDs as block devices")
1906 "libdvdcss is a simple library designed for accessing DVDs like a block
1907 device without having to bother about the decryption.")
1908 (license license:gpl2+)))
1910 (define-public srt2vtt
1917 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1921 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1922 (build-system gnu-build-system)
1924 `(("guile" ,guile-2.0)))
1925 (synopsis "SubRip to WebVTT subtitle converter")
1926 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1927 for use with HTML5 video.")
1928 (home-page "https://dthompson.us/projects/srt2vtt.html")
1929 (license license:gpl3+)))
1931 (define-public avidemux
1938 "mirror://sourceforge/avidemux/avidemux/" version "/"
1939 "avidemux_" version ".tar.gz"))
1942 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
1943 (patches (search-patches "avidemux-install-to-lib.patch"))))
1944 (build-system cmake-build-system)
1947 ("pkg-config" ,pkg-config)
1948 ("python" ,python-wrapper)
1949 ("qttools" ,qttools)
1951 ;; FIXME: Once packaged, add libraries not found during the build.
1953 `(("alsa-lib" ,alsa-lib)
1954 ("fontconfig" ,fontconfig)
1955 ("freetype" ,freetype)
1956 ("fribidi" ,fribidi)
1961 ("libvdpau" ,libvdpau)
1962 ("libvorbis" ,libvorbis)
1965 ("pulseaudio" ,pulseaudio)
1970 `(#:tests? #f ; no check target
1972 ;; Make sure files inside the included ffmpeg tarball are
1974 (let ((ffmpeg "ffmpeg-4.1.4"))
1975 (modify-phases %standard-phases
1976 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1978 (with-directory-excursion "avidemux_core/ffmpeg_package"
1979 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
1980 (delete-file (string-append ffmpeg ".tar.bz2")))
1982 (add-after 'patch-source-shebangs 'repack-ffmpeg
1984 (with-directory-excursion "avidemux_core/ffmpeg_package"
1985 (substitute* (string-append ffmpeg "/configure")
1986 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1987 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
1988 ;; avoid non-determinism in the archive
1989 "--sort=name" "--mtime=@0"
1990 "--owner=root:0" "--group=root:0")
1991 (delete-file-recursively ffmpeg))
1995 ;; Copy-paste settings from the cmake build system.
1996 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1997 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2000 (lambda* (#:key inputs outputs #:allow-other-keys)
2001 (let* ((out (assoc-ref outputs "out"))
2002 (lib (string-append out "/lib"))
2005 (lambda* (component srcdir #:optional (args '()))
2006 (let ((builddir (string-append "build_" component)))
2008 (with-directory-excursion builddir
2009 (apply invoke "cmake"
2010 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2011 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2012 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2013 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2014 "\"-Wl,-rpath=" lib "\"")
2015 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2016 (string-append "../" srcdir)
2020 (number->string (parallel-job-count)))
2021 (invoke "make" "install"))))))
2023 (build_component "core" "avidemux_core")
2024 (build_component "cli" "avidemux/cli")
2025 (build_component "qt4" "avidemux/qt4")
2026 (build_component "plugins_common" "avidemux_plugins"
2027 '("-DPLUGIN_UI=COMMON"))
2028 (build_component "plugins_cli" "avidemux_plugins"
2029 '("-DPLUGIN_UI=CLI"))
2030 (build_component "plugins_qt4" "avidemux_plugins"
2031 '("-DPLUGIN_UI=QT4"))
2032 (build_component "plugins_settings" "avidemux_plugins"
2033 '("-DPLUGIN_UI=SETTINGS"))
2034 ;; Remove .exe and .dll file.
2035 (delete-file-recursively
2036 (string-append out "/share/ADM6_addons"))
2038 (delete 'install)))))
2039 (home-page "http://fixounet.free.fr/avidemux/")
2040 (synopsis "Video editor")
2041 (description "Avidemux is a video editor designed for simple cutting,
2042 filtering and encoding tasks. It supports many file types, including AVI,
2043 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2044 can be automated using projects, job queue and powerful scripting
2046 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2047 ;; Software with various licenses is included, see License.txt.
2048 (license license:gpl2+)))
2050 (define-public vapoursynth
2052 (name "vapoursynth")
2057 (url "https://github.com/vapoursynth/vapoursynth.git")
2058 (commit (string-append "R" version))))
2059 (file-name (git-file-name name version))
2062 "1i6163bidlp0p9zcnxpsphr44ayfzd51fig4ri7vbrbl9lw9jaih"))))
2063 (build-system gnu-build-system)
2065 `(("autoconf" ,autoconf)
2066 ("automake" ,automake)
2067 ("cython" ,python-cython)
2068 ("libtool" ,libtool)
2069 ("pkg-config" ,pkg-config)
2073 `(("ffmpeg" ,ffmpeg)
2075 ("tesseract-ocr" ,tesseract-ocr)
2077 (home-page "http://www.vapoursynth.com/")
2078 (synopsis "Video processing framework")
2079 (description "VapourSynth is a C++ library and Python module for video
2080 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2081 multithreading, generalized colorspaces, per frame properties, and videos with
2083 ;; src/core/cpufeatures only allows x86, ARM or PPC
2084 (supported-systems (fold delete %supported-systems
2085 '("mips64el-linux" "aarch64-linux")))
2086 ;; As seen from the source files.
2087 (license license:lgpl2.1+)))
2096 "http://downloads.xvid.org/downloads/xvidcore-"
2097 version ".tar.bz2"))
2100 "1d0hy1w9sn6491a3vhyf3vmhq4xkn6yd4ralx1191s6qz5wz483w"))))
2101 (build-system gnu-build-system)
2102 (native-inputs `(("yasm" ,yasm)))
2105 (modify-phases %standard-phases
2107 'configure 'pre-configure
2109 (chdir "build/generic")
2110 (substitute* "configure"
2111 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2113 ;; No 'check' target.
2115 (home-page "https://www.xvid.com/")
2116 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2117 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2118 codec library. It uses ASP features such as b-frames, global and quarter
2119 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2120 and custom quantization matrices.")
2121 (license license:gpl2+)))
2123 (define-public streamlink
2130 (uri (pypi-uri "streamlink" version))
2133 "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
2134 (patches (search-patches "streamlink-update-test.patch"))))
2135 (build-system python-build-system)
2136 (home-page "https://github.com/streamlink/streamlink")
2138 `(("python-freezegun" ,python-freezegun)
2139 ("python-pytest" ,python-pytest)
2140 ("python-mock" ,python-mock)
2141 ("python-requests-mock" ,python-requests-mock)))
2143 `(("python-pysocks" ,python-pysocks)
2144 ("python-websocket-client" ,python-websocket-client)
2145 ("python-iso3166" ,python-iso3166)
2146 ("python-iso639" ,python-iso639)
2147 ("python-isodate" ,python-isodate)
2148 ("python-pycryptodome" ,python-pycryptodome)
2149 ("python-requests" ,python-requests)
2150 ("python-urllib3" ,python-urllib3)))
2151 (synopsis "Extract streams from various services")
2152 (description "Streamlink is command-line utility that extracts streams
2153 from sites like Twitch.tv and pipes them into a video player of choice.")
2154 (license license:bsd-2)))
2156 (define-public livestreamer
2157 (deprecated-package "livestreamer" streamlink))
2159 (define-public twitchy
2160 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2163 (version (git-version "3.4" "1" commit))
2168 (url "https://github.com/BasioMeusPuga/twitchy.git")
2170 (file-name (git-file-name name version))
2173 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2174 (build-system python-build-system)
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'patch-paths
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (substitute* "twitchy/twitchy_play.py"
2182 (string-append "\"" (assoc-ref inputs "streamlink")
2183 "/bin/streamlink ")))
2185 (add-before 'check 'check-setup
2187 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2189 (add-after 'install 'install-rofi-plugin
2190 (lambda* (#:key outputs #:allow-other-keys)
2191 (install-file "plugins/rofi-twitchy"
2192 (string-append (assoc-ref outputs "out")
2196 `(("python-requests" ,python-requests)
2197 ("streamlink" ,streamlink)))
2198 (home-page "https://github.com/BasioMeusPuga/twitchy")
2199 (synopsis "Command-line interface for Twitch.tv")
2201 "This package provides a command-line interface for Twitch.tv")
2202 (license license:gpl3+))))
2211 (url "https://github.com/mltframework/mlt.git")
2212 (commit (string-append "v" version))))
2213 (file-name (git-file-name name version))
2216 "0iiqym15n8kbnjzj0asmm86gs23yykz0va5b475cc4v2vv5admgx"))))
2217 (build-system gnu-build-system)
2219 `(#:tests? #f ; no tests
2220 #:make-flags '("CC=gcc" "CXX=g++")
2222 (list "--enable-gpl3"
2225 (modify-phases %standard-phases
2227 'configure 'override-LDFLAGS
2228 (lambda* (#:key outputs #:allow-other-keys)
2229 (substitute* "config.mak"
2231 (string-append "LDFLAGS+=-Wl,-rpath="
2232 (assoc-ref outputs "out")
2236 `(("alsa-lib" ,alsa-lib)
2237 ("ffmpeg" ,ffmpeg-3.4)
2239 ("frei0r-plugins" ,frei0r-plugins)
2240 ("gdk-pixbuf" ,gdk-pixbuf)
2242 ("libxml2" ,libxml2)
2245 ("libsamplerate" ,libsamplerate)
2246 ("pulseaudio" ,pulseaudio)
2252 `(("pkg-config" ,pkg-config)))
2253 (home-page "https://www.mltframework.org/")
2254 (synopsis "Author, manage, and run multitrack audio/video compositions")
2256 "MLT is a multimedia framework, designed and developed for television
2257 broadcasting. It provides a toolkit for broadcasters, video editors, media
2258 players, transcoders, web streamers and many more types of applications. The
2259 functionality of the system is provided via an assortment of ready to use
2260 tools, XML authoring components, and an extensible plug-in based API.")
2261 (license license:gpl3)))
2263 (define-public v4l-utils
2269 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2270 "/v4l-utils-" version ".tar.bz2"))
2273 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2274 (build-system gnu-build-system)
2277 (list (string-append "--with-udevdir="
2278 (assoc-ref %outputs "out")
2282 ("pkg-config" ,pkg-config)))
2284 `(("alsa-lib" ,alsa-lib)
2286 ("libjpeg" ,libjpeg)
2290 (synopsis "Realtime video capture utilities for Linux")
2291 (description "The v4l-utils provide a series of libraries and utilities to
2292 be used for realtime video capture via Linux-specific APIs.")
2293 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2294 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2295 (license (list license:lgpl2.1+ license:gpl2))))
2304 (url "https://github.com/obsproject/obs-studio.git")
2306 (file-name (git-file-name name version))
2309 "0g8nzs696f3myz4hvygav85b0jgjmn6dicy50axmapdv8miff9xa"))))
2310 (build-system cmake-build-system)
2312 `(#:tests? #f)) ; no tests
2314 `(("pkg-config" ,pkg-config)))
2316 `(("alsa-lib" ,alsa-lib)
2320 ("fontconfig" ,fontconfig)
2321 ("freetype" ,freetype)
2323 ("jansson" ,jansson)
2324 ("libx264" ,libx264)
2325 ("libxcomposite" ,libxcomposite)
2327 ("pulseaudio" ,pulseaudio)
2330 ("qtx11extras" ,qtx11extras)
2332 ("v4l-utils" ,v4l-utils)
2334 (synopsis "Live streaming software")
2335 (description "Open Broadcaster Software provides a graphical interface for
2336 video recording and live streaming. OBS supports capturing audio and video
2337 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2339 (home-page "https://obsproject.com")
2340 (supported-systems '("x86_64-linux" "i686-linux"))
2341 (license license:gpl2+)))
2343 (define-public libvdpau
2350 (uri (string-append "https://gitlab.freedesktop.org/vdpau/libvdpau"
2351 "/uploads/14b620084c027d546fa0b3f083b800c6/"
2352 "libvdpau-" version ".tar.bz2"))
2355 "01ps6g6p6q7j2mjm9vn44pmzq3g75mm7mdgmnhb1qkjjdwc9njba"))))
2356 (build-system gnu-build-system)
2358 `(("pkg-config" ,pkg-config)))
2360 `(("libx11" ,libx11 "out")
2361 ("libxext" ,libxext)
2362 ("xorgproto" ,xorgproto)))
2363 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2364 (synopsis "Video Decode and Presentation API")
2365 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2366 provides an interface to video decode acceleration and presentation hardware
2367 present in modern GPUs.")
2368 (license (license:x11-style "file://COPYING"))))
2370 (define-public vdpauinfo
2377 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2378 name "-" version ".tar.gz"))
2381 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2382 (build-system gnu-build-system)
2384 `(("pkg-config" ,pkg-config)
2385 ("libx11" ,libx11)))
2387 `(("libvdpau" ,libvdpau)))
2388 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2389 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2390 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2392 (license (license:x11-style "file://COPYING"))))
2394 (define-public libvdpau-va-gl
2396 (name "libvdpau-va-gl")
2401 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2402 "releases/download/v" version "/libvdpau-va-gl-"
2406 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2407 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2408 (modules '((guix build utils)))
2409 (snippet '(begin (delete-file-recursively "3rdparty")
2411 (build-system cmake-build-system)
2413 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2415 `(("libvdpau" ,libvdpau)
2416 ("pkg-config" ,pkg-config)))
2420 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2421 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2423 "Many applications can use VDPAU to accelerate portions of the video
2424 decoding process and video post-processing to the GPU video hardware. Since
2425 there is no VDPAU available on Intel chips, they fall back to different drawing
2426 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2427 scaling and VA-API (if available) to accelerate video decoding.")
2428 (license license:expat)))
2430 (define-public recordmydesktop
2432 (name "recordmydesktop")
2436 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2437 version "/recordmydesktop-" version ".tar.gz"))
2440 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2441 (build-system gnu-build-system)
2442 (inputs `(("popt" ,popt)
2447 ("libxfixes" ,libxfixes)
2448 ("libxdamage" ,libxdamage)
2449 ("libxext" ,libxext)
2450 ("alsa-lib" ,alsa-lib)
2451 ("libvorbis" ,libvorbis)
2452 ("libtheora" ,libtheora)))
2453 (home-page "http://recordmydesktop.sourceforge.net/")
2454 (synopsis "Desktop session video recorder")
2456 "recordMyDesktop is a command-line tool that captures the activity in
2457 your graphical desktop and encodes it as a video. This is a useful tool for
2458 making @dfn{screencasts}.")
2459 (license license:gpl2+)))
2461 (define-public simplescreenrecorder
2463 (name "simplescreenrecorder")
2469 (url "https://github.com/MaartenBaert/ssr.git")
2471 (file-name (git-file-name name version))
2474 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2475 (build-system cmake-build-system)
2476 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2477 ;; README.md, the program builds and functions properly without them.
2478 ;; As a result, they are omitted. Please add them back if problems appear.
2480 `(("alsa-lib" ,alsa-lib)
2485 ("pulseaudio" ,pulseaudio)
2487 ("qtx11extras" ,qtx11extras)))
2488 (native-inputs `(("pkg-config" ,pkg-config)))
2491 (list "-DWITH_QT5=TRUE")
2492 #:tests? #f)) ; no test suite
2493 ;; Using HTTPS causes part of the page to be displayed improperly.
2494 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2495 (synopsis "Screen recorder")
2496 (description "SimpleScreenRecorder is an easy to use screen recorder with
2497 a graphical user interface. It supports recording the entire screen, or a
2498 part of it, and allows encoding in many different codecs and file formats.
2499 Other features include a live preview and live streaming.")
2500 (license (list license:gpl3+ ; most files
2501 license:zlib ; glinject/elfhacks.*
2502 license:isc ; glinject/*
2503 license:x11)))) ; build-aux/install-sh
2505 (define-public libsmpeg
2508 (version "0.4.5-401")
2512 (url "svn://svn.icculus.org/smpeg/trunk/")
2513 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2514 (file-name (string-append name "-" version "-checkout"))
2517 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2518 (build-system gnu-build-system)
2520 ;; libsmpeg fails to build with -std=c++11, which is the default with
2521 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2522 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
2524 `(("autoconf" ,autoconf)
2525 ("automake" ,automake)))
2528 (home-page "http://icculus.org/smpeg/")
2529 (synopsis "SDL MPEG decoding library")
2531 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2532 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2533 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2534 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2535 and MPEG system streams.")
2536 (license (list license:expat
2542 (define-public libsmpeg-with-sdl1
2543 (package (inherit libsmpeg)
2545 (version "0.4.5-399")
2549 (url "svn://svn.icculus.org/smpeg/trunk/")
2550 (revision 399))) ; tagged release 0.4.5
2551 (file-name (string-append name "-" version "-checkout"))
2554 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2558 (define-public libbdplus
2565 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2566 version "/" name "-" version ".tar.bz2"))
2568 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2570 `(("libgcrypt" ,libgcrypt)))
2571 (build-system gnu-build-system)
2572 (home-page "https://www.videolan.org/developers/libbdplus.html")
2573 (synopsis "Library for decrypting certain Blu-Ray discs")
2574 (description "libbdplus is a library which implements the BD+ System
2576 (license license:lgpl2.1+)))
2578 (define-public libaacs
2585 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2586 version "/" name "-" version ".tar.bz2"))
2588 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2590 `(("libgcrypt" ,libgcrypt)))
2594 (build-system gnu-build-system)
2595 (home-page "https://www.videolan.org/developers/libaacs.html")
2596 (synopsis "Library for decrypting certain Blu-Ray discs")
2597 (description "libaacs is a library which implements the Advanced Access
2598 Content System specification.")
2599 (license license:lgpl2.1+)))
2601 (define-public mps-youtube
2603 (name "mps-youtube")
2609 (url "https://github.com/mps-youtube/mps-youtube.git")
2610 (commit (string-append "v" version))))
2611 (file-name (git-file-name name version))
2614 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2615 (build-system python-build-system)
2617 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2618 ;; test suite results differ depending on the country and also introduce
2619 ;; non-determinism in the tests.
2620 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2623 `(("python-pafy" ,python-pafy)
2624 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2625 (home-page "https://github.com/mps-youtube/mps-youtube")
2626 (synopsis "Terminal based YouTube player and downloader")
2628 "@code{mps-youtube} is based on mps, a terminal based program to
2629 search, stream and download music. This implementation uses YouTube as
2630 a source of content and can play and download video as well as audio.
2631 It can use either mpv or mplayer for playback, and for conversion of
2632 formats ffmpeg or libav is used. Users should install one of the
2633 supported players in addition to this package.")
2634 (license license:gpl3+)))
2636 (define-public handbrake
2642 (uri (string-append "https://download.handbrake.fr/releases/"
2643 version "/HandBrake-" version "-source.tar.bz2"))
2646 "0k2yaqy7zi06k8mkp9az2mn9dlgj3a1339vacakfh2nn2zsics6z"))
2647 (modules '((guix build utils)))
2649 ;; Remove "contrib" and source not necessary for
2650 ;; building/running under a GNU environment.
2652 (for-each delete-file-recursively
2653 '("contrib" "macosx" "win"))
2654 (substitute* "make/include/main.defs"
2655 ;; Disable unconditional inclusion of "contrib" libraries
2656 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2657 ;; which would lead to fetching and building of these
2658 ;; libraries. Use our own instead.
2659 (("MODULES \\+= contrib") "# MODULES += contrib"))
2661 (patches (search-patches "handbrake-opt-in-nvenc.patch"))))
2662 (build-system glib-or-gtk-build-system)
2664 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2665 ("autoconf" ,autoconf)
2666 ("cmake" ,cmake-minimal) ;TODO: could probably strip check from make/configure.py
2667 ("curl" ,curl) ;not actually used, but tested for
2668 ("intltool" ,intltool)
2669 ("libtool" ,libtool)
2670 ("pkg-config" ,pkg-config)
2671 ("python" ,python-2))) ;for configuration
2674 ("dbus-glib" ,dbus-glib)
2676 ("fontconfig" ,fontconfig)
2677 ("freetype" ,freetype)
2679 ("gstreamer" ,gstreamer)
2680 ("gst-plugins-base" ,gst-plugins-base)
2682 ("jansson" ,jansson)
2685 ("libbluray" ,libbluray)
2686 ("libdvdnav" ,libdvdnav)
2687 ("libdvdread" ,libdvdread)
2688 ("libgudev" ,libgudev)
2689 ("libmpeg2" ,libmpeg2)
2690 ("libnotify" ,libnotify)
2693 ("libsamplerate" ,libsamplerate)
2694 ("libtheora" ,libtheora)
2695 ("libvorbis" ,libvorbis)
2697 ("libxml2" ,libxml2)
2698 ("libx264" ,libx264)
2703 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2705 (list "--disable-gtk-update-checks"
2706 (string-append "CPPFLAGS=-I"
2707 (assoc-ref %build-inputs "libxml2")
2711 (modify-phases %standard-phases
2713 ;; Run bootstrap ahead of time so that shebangs get patched.
2715 (setenv "CONFIG_SHELL" (which "sh"))
2716 (setenv "NOCONFIGURE" "1")
2717 ;; Patch the Makefile so that it doesn't bootstrap again.
2718 (substitute* "gtk/module.rules"
2719 ((".*autogen\\.sh.*") ""))
2720 (invoke "sh" "./gtk/autogen.sh")))
2722 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2723 ;; 'configure' is not an autoconf-generated script, and
2724 ;; errors on unrecognized arguments,
2725 ;; e.g. --enable-fast-install
2726 (let ((out (assoc-ref outputs "out")))
2727 (apply invoke "./configure"
2728 (string-append "--prefix=" out)
2729 (or configure-flags '())))))
2730 (add-after 'configure 'chdir-build
2731 (lambda _ (chdir "./build") #t)))))
2732 (home-page "https://handbrake.fr")
2733 (synopsis "Video transcoder")
2735 "HandBrake is a tool for converting video from any format to a selection
2736 of modern, widely supported codecs.")
2737 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2738 ;; Combination under GPLv2. See LICENSE.
2739 (license license:gpl2)))
2741 (define-public intel-vaapi-driver
2743 (name "intel-vaapi-driver")
2748 (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
2749 "releases/download/" version "/intel-vaapi-driver-"
2750 version ".tar.bz2"))
2752 (base32 "1qyzxh3p8cw4fv8bz9zd4kc8hajlaps7xryzh6pad814n3m5sbjw"))))
2753 (build-system gnu-build-system)
2755 `(("pkg-config" ,pkg-config)))
2757 `(("libdrm" ,libdrm)
2759 ("libx11" ,libx11)))
2762 (modify-phases %standard-phases
2763 (add-before 'configure 'set-target-directory
2764 (lambda* (#:key outputs #:allow-other-keys)
2765 (let ((out (assoc-ref outputs "out")))
2766 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2768 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2769 ;; this to all VA-API back ends instead of once to libva.
2770 (native-search-paths
2771 (list (search-path-specification
2772 (variable "LIBVA_DRIVERS_PATH")
2773 (files '("lib/dri")))))
2774 (supported-systems '("i686-linux" "x86_64-linux"))
2775 (home-page "https://01.org/linuxmedia/vaapi")
2776 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2778 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2779 hardware-accelerated video processing on Intel GEN Graphics devices supported by
2780 the i915 driver, such as integrated Intel HD Graphics. It provides access to
2781 both hardware and shader functionality for faster encoding, decoding, and
2782 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2783 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2784 license:expat)))) ; the rest, excluding the test suite
2786 (define-public openh264
2792 (uri (string-append "https://github.com/cisco/"
2793 name "/releases/download/v"
2794 version "/Source.Code.tar.gz"))
2795 (file-name (string-append name "-" version ".tar.gz"))
2798 "0iq802xfsfkskg6q1j0kg90xh04vv1sxf61mrmahgynz5d7hx2ii"))))
2799 (build-system gnu-build-system)
2802 ("python" ,python)))
2804 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2806 #:test-target "test"
2807 #:phases (modify-phases %standard-phases
2808 ;; no configure script
2809 (delete 'configure))))
2810 (home-page "http://www.openh264.org/")
2811 (synopsis "H264 decoder library")
2813 "Openh264 is a library which can decode H264 video streams.")
2814 (license license:bsd-2)))
2816 (define-public libmp4v2
2823 ;; XXX: The new location of upstream is uncertain and will become relevant the
2824 ;; moment when the googlecode archive shuts down. It is past the date it
2825 ;; should've been turned off. I tried to communicate with upstream, but this
2826 ;; wasn't very responsive and not very helpful. The short summary is, it is
2827 ;; chaos when it comes to the amount of forks and only time will tell where
2828 ;; the new upstream location is.
2829 (uri (string-append "https://storage.googleapis.com/google-"
2830 "code-archive-downloads/v2/"
2831 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2832 (file-name (string-append name "-" version ".tar.bz2"))
2833 (patches (search-patches "libmp4v2-c++11.patch"))
2836 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2837 (build-system gnu-build-system)
2839 "static")) ; 3.7MiB .a file
2842 (modify-phases %standard-phases
2843 (add-after 'unpack 'remove-dates
2845 ;; Make the build reproducible.
2846 (substitute* "configure"
2847 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2848 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2850 (add-after 'install 'move-static-libraries
2851 (lambda* (#:key outputs #:allow-other-keys)
2852 ;; Move static libraries to the "static" output.
2853 (let* ((out (assoc-ref outputs "out"))
2854 (lib (string-append out "/lib"))
2855 (static (assoc-ref outputs "static"))
2856 (slib (string-append static "/lib")))
2858 (for-each (lambda (file)
2859 (install-file file slib)
2861 (find-files lib "\\.a$"))
2864 `(("help2man" ,help2man)
2865 ("dejagnu" ,dejagnu)))
2866 (home-page "https://code.google.com/archive/p/mp4v2/")
2867 (synopsis "API to create and modify mp4 files")
2869 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2870 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2871 file format that has been used as a multimedia file format in a variety of platforms and
2872 applications. It is a very powerful and extensible format that can accommodate
2873 practically any type of media.")
2874 (license license:mpl1.1)))
2876 (define-public libmediainfo
2878 (name "libmediainfo")
2882 (uri (string-append "https://mediaarea.net/download/source/"
2884 name "_" version ".tar.bz2"))
2887 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2888 ;; TODO add a Big Buck Bunny webm for tests.
2890 `(("autoconf" ,autoconf)
2891 ("automake" ,automake)
2892 ("libtool" ,libtool)
2893 ("pkg-config" ,pkg-config)
2895 ("tinyxml2" ,tinyxml2)
2897 ("libzen" ,libzen)))
2898 (build-system gnu-build-system)
2900 '(#:tests? #f ; see above TODO
2902 ;; build scripts not in root of archive
2903 (modify-phases %standard-phases
2904 (add-after 'unpack 'change-to-build-dir
2906 (chdir "Project/GNU/Library")
2908 (home-page "https://mediaarea.net/en/MediaInfo")
2909 (synopsis "Library for retrieving media metadata")
2910 (description "MediaInfo is a library used for retrieving technical
2911 information and other metadata about audio or video files. A non-exhaustive
2912 list of the information MediaInfo can retrieve from media files include:
2915 @item General: title, author, director, album, track number, date, duration...
2916 @item Video: codec, aspect, fps, bitrate...
2917 @item Audio: codec, sample rate, channels, language, bitrate...
2918 @item Text: language of subtitle
2919 @item Chapters: number of chapters, list of chapters
2922 MediaInfo supports the following formats:
2925 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2926 MPEG-2, MPEG-4, DVD (VOB)...
2927 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2928 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2929 @item Subtitles: SRT, SSA, ASS, SAMI...
2931 (license license:bsd-2)))
2933 ;; TODO also have a GUI version available
2934 (define-public mediainfo
2940 ;; Warning: This source has proved unreliable 1 time at least.
2941 ;; Consider an alternate source or report upstream if this
2943 (uri (string-append "https://mediaarea.net/download/source/"
2944 name "/" version "/"
2945 name "_" version ".tar.bz2"))
2948 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
2950 `(("autoconf" ,autoconf)
2951 ("automake" ,automake)
2952 ("libtool" ,libtool)
2953 ("pkg-config" ,pkg-config)
2955 ("libmediainfo" ,libmediainfo)
2956 ("libzen" ,libzen)))
2957 (build-system gnu-build-system)
2959 '(#:tests? #f ; lacks tests
2961 ;; build scripts not in root of archive
2962 (modify-phases %standard-phases
2963 (add-after 'unpack 'change-to-build-dir
2965 (chdir "Project/GNU/CLI")
2967 (home-page "https://mediaarea.net/en/MediaInfo")
2968 (synopsis "Utility for reading media metadata")
2969 (description "MediaInfo is a utility used for retrieving technical
2970 information and other metadata about audio or video files. It supports the
2971 many codecs and formats supported by libmediainfo.")
2972 (license license:bsd-2)))
2974 (define-public livemedia-utils
2976 (name "livemedia-utils")
2977 (version "2019.05.29")
2981 "https://download.videolan.org/contrib/live555/live."
2985 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
2986 (build-system gnu-build-system)
2988 '(#:tests? #f ; no tests
2989 #:make-flags (list "CC=gcc"
2990 (string-append "LDFLAGS=-Wl,-rpath="
2991 (assoc-ref %outputs "out") "/lib")
2992 (string-append "PREFIX="
2993 (assoc-ref %outputs "out")))
2994 #:phases (modify-phases %standard-phases
2995 (add-before 'configure 'fix-makefiles-generation
2997 (substitute* "genMakefiles"
3002 (invoke "./genMakefiles"
3003 "linux-with-shared-libraries"))))))
3004 (home-page "http://www.live555.com/liveMedia/")
3005 (synopsis "Set of C++ libraries for multimedia streaming")
3006 (description "This code forms a set of C++ libraries for multimedia
3007 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3008 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3009 JPEG video, and several audio codecs. They can easily be extended to support
3010 additional (audio and/or video) codecs, and can also be used to build basic
3011 RTSP or SIP clients and servers.")
3012 (license license:lgpl3+)))
3014 (define-public libdvbpsi
3021 "https://download.videolan.org/pub/libdvbpsi/"
3022 version "/libdvbpsi-" version ".tar.bz2"))
3025 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
3026 (build-system gnu-build-system)
3027 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3028 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3030 (description "libdvbpsi is a simple library designed for decoding and
3031 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3032 and ITU-T H.222.0.")
3033 (license license:lgpl2.1)))
3035 (define-public ffms2
3039 (home-page "https://github.com/FFMS/ffms2")
3043 (url "https://github.com/FFMS/ffms2.git")
3045 (file-name (git-file-name name version))
3048 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3049 (build-system gnu-build-system)
3052 (list "--enable-avresample")))
3056 `(("ffmpeg" ,ffmpeg)))
3058 `(("pkg-config" ,pkg-config)))
3059 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3061 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3062 programmers to access a standard API to open and decompress media files.")
3063 ;; sources are distributed under a different license that the binary.
3064 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3065 (license license:gpl2+))); inherits from ffmpeg
3067 (define-public aegisub
3074 "http://ftp.aegisub.org/pub/archives/releases/source/"
3075 name "-" version ".tar.xz"))
3078 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3079 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3080 "aegisub-boost68.patch"))))
3081 (build-system gnu-build-system)
3084 (list "--disable-update-checker"
3085 "--without-portaudio"
3088 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3089 ;; tests require busted, a lua package we don't have yet
3092 (modify-phases %standard-phases
3093 (add-before 'configure 'fix-ldflags
3095 (setenv "LDFLAGS" "-pthread")
3097 (add-after 'unpack 'fix-boost-headers
3100 '("src/subtitles_provider_libass.cpp"
3101 "src/colour_button.cpp"
3102 "src/video_provider_dummy.cpp"
3103 "./src/video_frame.cpp")
3104 (("#include <boost/gil/gil_all.hpp>")
3105 "#include <boost/gil.hpp>"))
3109 ("desktop-file-utils" ,desktop-file-utils)
3112 ("hunspell" ,hunspell)
3115 ("alsa-lib" ,alsa-lib)
3116 ("pulseaudio" ,pulseaudio)
3118 ("freetype" ,freetype)
3119 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3121 `(("intltool" ,intltool)
3122 ("pkg-config" ,pkg-config)))
3123 (home-page "http://www.aegisub.org/")
3124 (synopsis "Subtitle engine")
3126 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3127 it quick and easy to time subtitles to audio, and features many powerful
3128 tools for styling them, including a built-in real-time video preview.")
3129 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3130 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3131 license:expat)))) ; and src/gl that is under a license similar
3132 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3133 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3134 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3136 (define-public gst-transcoder
3138 (name "gst-transcoder")
3144 (url "https://github.com/pitivi/gst-transcoder.git")
3146 (file-name (git-file-name name version))
3149 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3150 (build-system meson-build-system)
3152 `(("gobject-introspection" ,gobject-introspection)
3154 ("gstreamer" ,gstreamer)
3155 ("gst-plugins-base" ,gst-plugins-base)))
3157 `(("python" ,python)
3158 ("pkg-config" ,pkg-config)))
3159 (home-page "https://github.com/pitivi/gst-transcoder/")
3160 (synopsis "GStreamer Transcoding API")
3161 (description "GStreamer Transcoding API")
3162 (license license:lgpl2.1)))
3171 (uri (string-append "mirror://sourceforge/gmerlin/"
3172 name "/" version "/"
3173 name "-" version ".tar.gz"))
3174 (file-name (string-append name "-" version ".tar.gz"))
3177 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3178 (build-system gnu-build-system)
3180 '(#:configure-flags '("LIBS=-lm")))
3182 `(("pkg-config" ,pkg-config)
3183 ("doxygen" ,doxygen)))
3184 (home-page "http://gmerlin.sourceforge.net")
3185 (synopsis "Low level library for multimedia API building")
3187 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3188 library, upon which multimedia APIs can be built. Gavl handles all the
3189 details of audio and video formats like colorspaces, sample rates,
3190 multichannel configurations, etc. It provides standardized definitions for
3191 those formats as well as container structures for carrying audio samples or
3192 video images inside an application.
3194 In addition, it handles the sometimes ugly task of converting between all
3195 these formats and provides some elementary operations (copying, scaling,
3196 alpha blending etc).")
3197 (license license:gpl3)))
3199 (define-public frei0r-plugins
3201 (name "frei0r-plugins")
3206 (uri (string-append "https://files.dyne.org/frei0r/"
3207 "frei0r-plugins-" version ".tar.gz"))
3210 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
3211 (build-system gnu-build-system)
3214 (modify-phases %standard-phases
3215 (add-after 'unpack 'autotools
3217 (invoke "sh" "autogen.sh"))))))
3218 ;; TODO: opencv for additional face detection filters.
3223 `(("pkg-config" ,pkg-config)
3224 ("libtool" ,libtool)
3225 ("automake" ,automake)
3226 ("autoconf" ,autoconf)))
3227 (home-page "https://www.dyne.org/software/frei0r/")
3228 (synopsis "Minimalistic plugin API for video effects")
3230 "Frei0r is a minimalistic plugin API for video effects.
3231 The main emphasis is on simplicity for an API that will round up
3232 the most common video effects into simple filters, sources and
3233 mixers that can be controlled by parameters. Frei0r wants to
3234 provide a way to share these simple effects between many
3235 applications, avoiding their reimplementation by different projects.
3236 It counts more than 100 plugins.")
3237 (license (list license:gpl2+
3238 ;; The following files are licensed as LGPL2.1+:
3239 ;; src/generator/ising0r/ising0r.c
3240 ;; src/generator/onecol0r/onecol0r.cpp
3241 ;; src/generator/nois0r/nois0r.cpp
3242 ;; src/generator/lissajous0r/lissajous0r.cpp
3243 ;; src/filter/ndvi/gradientlut.hpp
3244 ;; src/filter/ndvi/ndvi.cpp
3245 ;; src/filter/facedetect/facedetect.cpp
3246 license:lgpl2.1+))))
3248 (define-public motion
3252 (home-page "https://motion-project.github.io/")
3256 (url "https://github.com/Motion-Project/motion.git")
3257 (commit (string-append "release-" version))))
3260 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3261 (file-name (git-file-name name version))))
3262 (build-system gnu-build-system)
3264 `(("autoconf" ,autoconf-wrapper)
3265 ("automake" ,automake)
3266 ("gettext" ,gettext-minimal)
3267 ("pkg-config" ,pkg-config)))
3269 `(("libjpeg" ,libjpeg)
3270 ("ffmpeg" ,ffmpeg-3.4)
3271 ("libmicrohttpd" ,libmicrohttpd)
3272 ("sqlite" ,sqlite)))
3274 '(#:phases (modify-phases %standard-phases
3277 (patch-shebang "version.sh")
3278 (invoke "autoreconf" "-vfi"))))
3279 #:configure-flags '("--sysconfdir=/etc")
3280 #:make-flags (list (string-append "sysconfdir="
3281 (assoc-ref %outputs "out")
3284 #:tests? #f)) ; no 'check' target
3285 (synopsis "Detect motion from video signals")
3287 "Motion is a program that monitors the video signal from one or more
3288 cameras and is able to detect if a significant part of the picture has
3289 changed. Or in other words, it can detect motion.")
3291 ;; Some files say "version 2" and others "version 2 or later".
3292 (license license:gpl2)))
3294 (define-public subdl
3295 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3299 (version (git-version "1.0.3" revision commit))
3303 (url "https://github.com/alexanderwink/subdl.git")
3305 (file-name (git-file-name name version))
3308 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3309 (build-system trivial-build-system)
3311 `(#:modules ((guix build utils))
3313 (use-modules (guix build utils))
3314 (let* ((out (assoc-ref %outputs "out"))
3315 (bin (string-append out "/bin"))
3316 (source (assoc-ref %build-inputs "source"))
3317 (python (assoc-ref %build-inputs "python")))
3318 (install-file (string-append source "/subdl") bin)
3319 (patch-shebang (string-append bin "/subdl")
3320 (list (string-append python "/bin")))))))
3321 (inputs `(("python" ,python)))
3322 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3323 (description "Subdl is a command-line tool for downloading subtitles from
3324 opensubtitles.org. By default, it will search for English subtitles, display
3325 the results, download the highest-rated result in the requested language and
3326 save it to the appropriate filename.")
3327 (license license:gpl3+)
3328 (home-page "https://github.com/alexanderwink/subdl"))))
3330 (define-public l-smash
3337 (url "https://github.com/l-smash/l-smash.git")
3338 (commit (string-append "v" version))))
3339 (file-name (git-file-name name version))
3342 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3343 (build-system gnu-build-system)
3345 `(#:tests? #f ;no tests
3347 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3348 (assoc-ref %outputs "out") "/lib"))
3350 (modify-phases %standard-phases
3351 ;; configure fails if it is followed by CONFIG_SHELL
3353 (lambda* (#:key outputs #:allow-other-keys)
3354 (let ((out (assoc-ref outputs "out")))
3355 (invoke "./configure" (string-append "--prefix=" out)
3356 "--disable-static")))))))
3358 `(("which" ,which)))
3359 (home-page "https://l-smash.github.io/l-smash/")
3360 (synopsis "MP4 multiplexer and demultiplexer library")
3362 "L-SMASH is a cross-platform library that handles the ISO base media file
3363 format and some of its derived file formats, including MP4. It operates as a
3364 multiplexer and demultiplexer, and can mux video and audio in several formats
3365 using standalone executable files.")
3366 (license license:isc)))
3368 (define-public qtfaststart
3370 (name "qtfaststart")
3374 (uri (pypi-uri "qtfaststart" version))
3377 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3378 (build-system python-build-system)
3380 '(#:tests? #f)) ; no test suite
3381 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3382 (description "qtfaststart enables streaming and pseudo-streaming of
3383 QuickTime and MP4 files by moving metadata and offset information to the
3384 beginning of the file. It can also print some useful information about the
3385 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3386 project, which is released into the public domain, as well as ISO 14496-12:2005
3387 (the official spec for MP4), which can be obtained from the ISO or found
3389 (home-page "https://github.com/danielgtaylor/qtfaststart")
3390 (license license:expat)))
3392 (define-public vidstab
3393 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3397 (version (git-version "1.1.0" revision commit))
3401 (url "https://github.com/georgmartius/vid.stab.git")
3403 (file-name (git-file-name name version))
3406 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3407 (build-system cmake-build-system)
3409 '(#:tests? #f)) ; tests are not run as part of standard build process
3410 (home-page "http://public.hronopik.de/vid.stab/")
3411 (synopsis "Video stabilization library")
3412 (description "Vidstab is a video stabilization library which can be used
3413 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3414 vehicle typically suffers from undesirable shakes and jitters. Activities such
3415 as surfing, skiing, riding and walking while shooting videos are especially
3416 prone to erratic camera shakes. Vidstab targets these video contents to help
3417 create smoother and stable videos.")
3418 (license license:gpl2+))))
3420 (define-public libopenshot
3422 (name "libopenshot")
3427 (url "https://github.com/OpenShot/libopenshot")
3428 (commit (string-append "v" version))))
3429 (file-name (git-file-name name version))
3432 "0r1qmr8ar5n72603xkj9h065vbpznrqsq88kxxmn9n8djyyvk03k"))
3433 (modules '((guix build utils)))
3435 ;; Allow overriding of the python installation dir
3436 (substitute* "src/bindings/python/CMakeLists.txt"
3437 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3438 (string-append set " CACHE PATH "
3439 "\"Python bindings directory\")")))
3440 (delete-file-recursively "thirdparty")
3442 (build-system cmake-build-system)
3444 `(("pkg-config" ,pkg-config)
3447 ("unittest++" ,unittest-cpp)))
3448 (propagated-inputs ;all referenced in installed headers
3449 `(("cppzmq" ,cppzmq)
3451 ("imagemagick" ,imagemagick)
3452 ("jsoncpp" ,jsoncpp)
3453 ("libopenshot-audio" ,libopenshot-audio)
3455 ("qtmultimedia" ,qtmultimedia)
3456 ("zeromq" ,zeromq)))
3459 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3460 ,(version-major+minor (package-version python))
3462 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3464 (modify-phases %standard-phases
3465 (add-before 'configure 'set-vars
3466 (lambda* (#:key inputs #:allow-other-keys)
3467 (setenv "LIBOPENSHOT_AUDIO_DIR"
3468 (assoc-ref inputs "libopenshot-audio"))
3470 (assoc-ref inputs "zeromq"))
3471 (setenv "UNITTEST_DIR"
3472 (string-append (assoc-ref inputs "unittest++")
3473 "/include/UnitTest++"))
3475 (home-page "https://openshot.org")
3476 (synopsis "Video-editing, animation, and playback library")
3477 (description "OpenShot Library (libopenshot) is a powerful C++ video
3478 editing library with a multi-threaded and feature rich video editing
3479 API. It includes bindings for Python, Ruby, and other languages.")
3480 (license license:lgpl3+)))
3482 (define-public openshot
3489 (url "https://github.com/OpenShot/openshot-qt")
3490 (commit (string-append "v" version))))
3491 (file-name (git-file-name name version))
3494 "0mg63v36h7l8kv2sgf6x8c1n3ygddkqqwlciz7ccxpbm4x1idqba"))
3495 (modules '((guix build utils)))
3498 (delete-file-recursively "src/images/fonts") #t))))
3499 (build-system python-build-system)
3501 `(("ffmpeg" ,ffmpeg)
3502 ("font-ubuntu" ,font-ubuntu)
3503 ("libopenshot" ,libopenshot)
3505 ("python-pyqt" ,python-pyqt)
3506 ("python-pyzmq" ,python-pyzmq)
3507 ("python-requests" ,python-requests)
3510 `(#:tests? #f ;no tests
3511 #:modules ((guix build python-build-system)
3512 (guix build qt-utils)
3514 #:imported-modules (,@%python-build-system-modules
3515 (guix build qt-utils))
3516 #:phases (modify-phases %standard-phases
3517 (delete 'build) ;install phase does all the work
3518 (add-after 'unpack 'patch-font-location
3519 (lambda* (#:key inputs #:allow-other-keys)
3520 (let ((font (assoc-ref inputs "font-ubuntu")))
3521 (substitute* "src/classes/app.py"
3522 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3523 (("fonts") "share/fonts/truetype")))
3525 (add-before 'install 'set-tmp-home
3527 ;; src/classes/info.py "needs" to create several
3528 ;; directories in $HOME when loaded during build
3529 (setenv "HOME" "/tmp")
3531 (add-after 'install 'wrap-program
3532 (lambda* (#:key outputs #:allow-other-keys)
3533 (let ((out (assoc-ref outputs "out")))
3534 (wrap-qt-program out "openshot-qt"))
3536 (home-page "https://openshot.org")
3537 (synopsis "Video editor")
3538 (description "OpenShot takes your videos, photos, and music files and
3539 helps you create the film you have always dreamed of. Easily add sub-titles,
3540 transitions, and effects and then export your film to many common formats.")
3541 (license license:gpl3+)))
3543 (define-public dav1d
3550 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3551 "/dav1d/" version "/dav1d-" version ".tar.xz"))
3554 "03cf6f9if45prq97qp7llzi1p71dyw9ymc87hc225iy89kmzjsdd"))))
3555 (build-system meson-build-system)
3556 (native-inputs `(("nasm" ,nasm)))
3557 (home-page "https://code.videolan.org/videolan/dav1d")
3558 (synopsis "AV1 decoder")
3559 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3560 speed and correctness.")
3561 (license license:bsd-2)))
3563 (define-public wlstream
3564 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3568 (version (git-version "0.0" revision commit))
3573 (url "https://github.com/atomnuker/wlstream.git")
3575 (file-name (git-file-name name version))
3578 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3579 (build-system meson-build-system)
3580 (native-inputs `(("libdrm" ,libdrm)
3581 ("pkg-config" ,pkg-config)))
3582 (inputs `(("ffmpeg" ,ffmpeg)
3583 ("pulseaudio" ,pulseaudio)
3584 ("wayland" ,wayland)
3585 ("wayland-protocols" ,wayland-protocols)))
3586 (home-page "https://github.com/atomnuker/wlstream")
3587 (synopsis "Screen capture tool for Wayland sessions")
3588 (description "Wlstream is a screen capture tool for recording audio and
3589 video from a Wayland session.")
3590 (license license:lgpl2.1+))))
3592 (define-public gaupol
3599 (url "https://github.com/otsaloma/gaupol/")
3601 (file-name (git-file-name name version))
3604 "164wlxxjiqvkzbqjzvqvz2zkn0kgqmhn52294xx4vc9b9ngdnn0m"))))
3605 (build-system python-build-system)
3607 `(("gettext" ,gettext-minimal)
3608 ("pkg-config" ,pkg-config)))
3610 `(("python-pygobject" ,python-pygobject)
3612 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3613 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3614 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3615 ("iso-codes" ,iso-codes) ; Optional: Translations.
3616 ("gstreamer" ,gstreamer)
3617 ("gst-libav" ,gst-libav)
3618 ("gst-plugins-base" ,gst-plugins-base)
3619 ("gst-plugins-good" ,gst-plugins-good)
3620 ("gst-plugins-bad" ,gst-plugins-bad)
3621 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3623 `(#:tests? #f ; Tests seem to require networking.
3625 (modify-phases %standard-phases
3626 ;; gaupol's setup.py script does not support one of the Python build
3627 ;; system's default flags, "--single-version-externally-managed".
3629 (lambda* (#:key outputs #:allow-other-keys)
3630 (invoke "python" "setup.py" "install"
3631 (string-append "--prefix=" (assoc-ref outputs "out"))
3633 (add-after 'install 'wrap-gaupol
3634 (lambda* (#:key outputs #:allow-other-keys)
3635 (let ((out (assoc-ref outputs "out"))
3636 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3637 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3638 (wrap-program (string-append out "/bin/gaupol")
3639 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3640 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3642 (add-after 'unpack 'patch-data-dir
3643 ;; Fix some path variables that setup.py seems to garble.
3644 (lambda* (#:key outputs #:allow-other-keys)
3645 (let ((out (assoc-ref outputs "out")))
3646 (substitute* "setup.py"
3647 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3648 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3649 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3650 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3652 (synopsis "Editor for text-based subtitles")
3654 "Gaupol supports multiple subtitle file formats and provides means of
3655 creating subtitles, editing texts and timing subtitles to match video. The
3656 user interface features a builtin video player and is designed with attention
3657 to convenience of translating and batch processing of multiple documents.")
3658 (home-page "https://otsaloma.io/gaupol/")
3659 (license license:gpl3+)))