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 Nils Gillmann <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 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
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 fontutils)
95 #:use-module (gnu packages freedesktop)
96 #:use-module (gnu packages fribidi)
97 #:use-module (gnu packages gettext)
98 #:use-module (gnu packages ghostscript)
99 #:use-module (gnu packages gl)
100 #:use-module (gnu packages glib)
101 #:use-module (gnu packages guile)
102 #:use-module (gnu packages gnome)
103 #:use-module (gnu packages gnunet)
104 #:use-module (gnu packages gnupg)
105 #:use-module (gnu packages gstreamer)
106 #:use-module (gnu packages gtk)
107 #:use-module (gnu packages image)
108 #:use-module (gnu packages imagemagick)
109 #:use-module (gnu packages iso-codes)
110 #:use-module (gnu packages libidn)
111 #:use-module (gnu packages libreoffice)
112 #:use-module (gnu packages linux)
113 #:use-module (gnu packages lua)
114 #:use-module (gnu packages m4)
115 #:use-module (gnu packages man)
116 #:use-module (gnu packages markup)
117 #:use-module (gnu packages mp3)
118 #:use-module (gnu packages ncurses)
119 #:use-module (gnu packages networking)
120 #:use-module (gnu packages ocr)
121 #:use-module (gnu packages perl)
122 #:use-module (gnu packages pkg-config)
123 #:use-module (gnu packages popt)
124 #:use-module (gnu packages pretty-print)
125 #:use-module (gnu packages protobuf)
126 #:use-module (gnu packages pulseaudio)
127 #:use-module (gnu packages python)
128 #:use-module (gnu packages python-crypto)
129 #:use-module (gnu packages python-web)
130 #:use-module (gnu packages python-xyz)
131 #:use-module (gnu packages qt)
132 #:use-module (gnu packages rdesktop)
133 #:use-module (gnu packages ruby)
134 #:use-module (gnu packages samba)
135 #:use-module (gnu packages sdl)
136 #:use-module (gnu packages serialization)
137 #:use-module (gnu packages shells)
138 #:use-module (gnu packages sqlite)
139 #:use-module (gnu packages ssh)
140 #:use-module (gnu packages swig)
141 #:use-module (gnu packages texinfo)
142 #:use-module (gnu packages textutils)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages time)
145 #:use-module (gnu packages upnp)
146 #:use-module (gnu packages version-control)
147 #:use-module (gnu packages vulkan)
148 #:use-module (gnu packages web)
149 #:use-module (gnu packages webkit)
150 #:use-module (gnu packages wxwidgets)
151 #:use-module (gnu packages xdisorg)
152 #:use-module (gnu packages xiph)
153 #:use-module (gnu packages xml)
154 #:use-module (gnu packages xorg))
162 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
163 version "/" name "-" version ".tar.gz"))
166 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
167 (build-system gnu-build-system)
169 `(("makeinfo" ,texinfo)))
171 `(("ncurses" ,ncurses)))
174 (modify-phases %standard-phases
176 (lambda* (#:key build inputs outputs #:allow-other-keys)
177 ;; This old `configure' script doesn't support
178 ;; variables passed as arguments.
179 (let ((out (assoc-ref outputs "out"))
180 (ncurses (assoc-ref inputs "ncurses")))
181 (setenv "CONFIG_SHELL" (which "bash"))
182 (invoke "./configure"
183 (string-append "--prefix=" out)
184 (string-append "--build=" build)
185 ;; The ancient config.guess is unable to
186 ;; guess the host triplet on mips64el.
187 ,@(if (string=? "mips64el-linux"
189 '("--host=mips64el-unknown-linux-gnu")
191 ;; The same is also true with aarch64.
192 ,@(if (string=? "aarch64-linux"
194 '("--host=aarch64-unknown-linux-gnu")
196 (string-append "--with-ncurses="
198 (home-page "http://aa-project.sourceforge.net/aalib/")
199 (synopsis "ASCII-art library")
201 "AA-lib is a low level gfx library which does not require graphics device.
202 In fact, there is no graphical output possible. AA-lib replaces those
203 old-fashioned output methods with powerful ascii-art renderer.")
204 (license license:lgpl2.0+)))
206 (define-public liba52
213 ;; A mirror://sourceforge URI doesn't work, presumably
214 ;; because the SourceForge project is misconfigured.
215 "http://liba52.sourceforge.net/files/a52dec-" version
219 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
220 (patches (search-patches "liba52-enable-pic.patch"
221 "liba52-set-soname.patch"
222 "liba52-use-mtune-not-mcpu.patch"
223 "liba52-link-with-libm.patch"))))
224 (build-system gnu-build-system)
225 ;; XXX We need to run ./bootstrap because of the build system fixes above.
227 `(("autoconf" ,autoconf)
228 ("automake" ,automake)
229 ("libtool" ,libtool)))
230 (arguments `(#:configure-flags '("--enable-shared")
232 (modify-phases %standard-phases
233 ;; XXX We need to run ./bootstrap because of the build
234 ;; system fixes above.
236 (lambda _ (invoke "sh" "bootstrap"))))))
237 (home-page "http://liba52.sourceforge.net/")
238 (synopsis "ATSC A/52 stream decoder")
239 (description "liba52 is a library for decoding ATSC A/52 streams. The
240 A/52 standard is used in a variety of applications, including digital
241 television and DVD. It is also known as AC-3.")
242 (license license:gpl2+)))
244 (define-public libaom
245 ;; The 1.0.0-errata1 release installs a broken pkg-config .pc file. This
246 ;; is fixed in libaom commit 0ddc150, but we use an even later commit.
247 (let ((commit "22b150bf040608028a56d8bf39e72f771383d836")
251 (version (git-version "1.0.0-errata1" revision commit))
255 (url "https://aomedia.googlesource.com/aom/")
257 (file-name (git-file-name name version))
260 "1pdd5h3n42607n6qmggz4yv8izhjr2kl6knb3kh7gh4v0vy47h1r"))))
261 (build-system cmake-build-system)
264 ("pkg-config" ,pkg-config)
265 ("python" ,python))) ; to detect the version
267 `(#:tests? #f ;no check target
269 ;; build dynamic library
270 (list "-DBUILD_SHARED_LIBS=YES"
272 "-DAOM_TARGET_CPU=generic"
273 (string-append "-DCMAKE_INSTALL_PREFIX="
274 (assoc-ref %outputs "out")))))
275 (home-page "https://aomedia.googlesource.com/aom/")
276 (synopsis "AV1 video codec")
277 (description "Libaom is the reference implementation of AV1. It includes
278 a shared library and encoder and decoder command-line executables.")
279 (license license:bsd-2))))
281 (define-public libmpeg2
287 ;; A mirror://sourceforge URI doesn't work, presumably
288 ;; because the SourceForge project is misconfigured.
289 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
290 name "-" version ".tar.gz"))
293 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
301 (build-system gnu-build-system)
302 (home-page "http://libmpeg2.sourceforge.net/")
303 (synopsis "MPEG1 and MPEG2 video decoder library")
305 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
306 (license license:gpl2+)))
308 (define-public libx264
311 (version "20180810-2245")
314 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
315 "x264-snapshot-" version "-stable.tar.bz2"))
318 "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv"))))
319 (build-system gnu-build-system)
321 `(("pkg-config" ,pkg-config)
323 ;; TODO: Add gpac input
325 `(#:tests? #f ;no check target
326 #:configure-flags '("--enable-shared"
327 ;; Don't build the command-line program. If we
328 ;; want it later, we should do so in a different
329 ;; package to avoid a circular dependency (the x264
330 ;; program depends on ffmpeg and ffmpeg depends on
334 ;; On MIPS, we must pass "--disable-asm" or else
335 ;; configure fails after printing: "You specified a
336 ;; pre-MSA CPU in your CFLAGS. If you really want
337 ;; to run on such a CPU, configure with
339 ,@(if (string-prefix? "mips"
340 (or (%current-target-system)
344 (home-page "https://www.videolan.org/developers/x264.html")
345 (synopsis "H.264 video coding library")
346 (description "libx264 is an advanced encoding library for creating
347 H.264 (MPEG-4 AVC) video streams.")
348 (license (list license:gpl2+ ;most files
349 license:isc ;common/x86/x86inc.asm
350 license:lgpl2.1+ ;extras/getopt.c
351 license:bsd-3 ;extras/inttypes.h
352 (license:non-copyleft ;extras/cl*.h
354 "See extras/cl.h in the distribution.")))))
356 (define-public mkvtoolnix
363 (uri (string-append "https://mkvtoolnix.download/sources/"
364 name "-" version ".tar.xz"))
367 "0d8va2iamzc7y3wi71z8mk2vnqvnkgwb2p7casdfp37400x8r2pr"))
368 (modules '((guix build utils)))
370 ;; Delete bundled libraries.
371 (for-each delete-file-recursively
379 (build-system gnu-build-system)
388 ("libmatroska" ,libmatroska)
390 ("libvorbis" ,libvorbis)
394 ("qtmultimedia" ,qtmultimedia)
398 `(("docbook-xsl" ,docbook-xsl)
399 ("gettext" ,gettext-minimal)
400 ("googletest" ,googletest)
402 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
404 ("pkg-config" ,pkg-config)
410 (list (string-append "--with-boost="
411 (assoc-ref %build-inputs "boost"))
412 (string-append "--with-docbook-xsl-root="
413 (assoc-ref %build-inputs "docbook-xsl")
414 "/xml/xsl/docbook-xsl-"
415 ,(package-version docbook-xsl))
416 "--enable-update-check=no"
417 "--enable-precompiled-headers=no")
419 (modify-phases %standard-phases
420 (add-before 'configure 'add-googletest
421 (lambda* (#:key inputs #:allow-other-keys)
423 (string-append (assoc-ref inputs "googletest")
424 "/include/gtest") "lib/gtest")
428 (let ((-j (list "-j" (number->string (parallel-job-count)))))
429 (apply invoke "rake" -j))))
432 (invoke "rake" "tests/unit")))
435 (invoke "rake" "install"))))))
436 (home-page "https://mkvtoolnix.download")
437 (synopsis "Tools to create, alter and inspect Matroska files")
439 "MKVToolNix provides tools for getting information about Matroska files
440 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
441 and creating Matroska files from other media files (@code{mkvmerge}).")
442 (license license:gpl2)))
448 (outputs '("out" "static"))
452 (uri (string-append "https://download.videolan.org/videolan/x265/"
453 "x265_" version ".tar.gz"))
456 "0qh65wdpasrspkm1y0dlfa123myax568yi0sas0lmg5b1hkgrff5"))
457 (patches (search-patches "x265-arm-flags.patch"))
458 (modules '((guix build utils)))
460 (delete-file-recursively "source/compat/getopt")
462 (build-system cmake-build-system)
464 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
466 ;; Ensure position independent code for everyone.
467 (list "-DENABLE_PIC=TRUE"
468 ,@(if (string-prefix? "armhf" (or (%current-system)
469 (%current-target-system)))
470 '("-DENABLE_ASSEMBLY=OFF")
472 (string-append "-DCMAKE_INSTALL_PREFIX="
473 (assoc-ref %outputs "out")))
475 (modify-phases %standard-phases
476 (add-after 'unpack 'prepare-build
478 (delete-file-recursively "build")
480 ;; recognize armv8 in 32-bit mode as ARM
481 (substitute* "CMakeLists.txt"
482 (("armv6l") "armv8l"))
484 (add-before 'configure 'build-12-bit
485 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
486 (mkdir "../build-12bit")
487 (with-directory-excursion "../build-12bit"
490 "-DHIGH_BIT_DEPTH=ON"
495 (substitute* (cons "cmake_install.cmake"
497 (find-files "CMakeFiles/x265-shared.dir" ".")
498 (find-files "CMakeFiles/x265-static.dir" ".")))
499 (("libx265") "libx265_main12"))
501 (add-before 'configure 'build-10-bit
502 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
503 (mkdir "../build-10bit")
504 (with-directory-excursion "../build-10bit"
507 "-DHIGH_BIT_DEPTH=ON"
511 (substitute* (cons "cmake_install.cmake"
513 (find-files "CMakeFiles/x265-shared.dir" ".")
514 (find-files "CMakeFiles/x265-static.dir" ".")))
515 (("libx265") "libx265_main10"))
517 (add-after 'install 'install-more-libs
519 (with-directory-excursion "../build-12bit"
520 (invoke "make" "install"))
521 (with-directory-excursion "../build-10bit"
522 (invoke "make" "install"))))
523 (add-before 'strip 'move-static-libs
524 (lambda* (#:key outputs #:allow-other-keys)
525 (let ((out (assoc-ref outputs "out"))
526 (static (assoc-ref outputs "static")))
527 (mkdir-p (string-append static "/lib"))
528 (with-directory-excursion
529 (string-append out "/lib")
533 (string-append static "/lib/" file)))
534 (find-files "." "\\.a$"))))
536 (home-page "http://x265.org/")
537 (synopsis "Library for encoding h.265/HEVC video streams")
538 (description "x265 is a H.265 / HEVC video encoder application library,
539 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
540 (license license:gpl2+)))
542 (define-public libass
549 "https://github.com/libass/libass/releases/download/"
550 version "/libass-" version ".tar.xz"))
553 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
554 (build-system gnu-build-system)
556 `(("pkg-config" ,pkg-config)
559 `(("freetype" ,freetype)
561 ("fontconfig" ,fontconfig)
562 ("harfbuzz" ,harfbuzz)
564 (home-page "https://github.com/libass/libass")
565 (synopsis "Subtitle rendering library for the ASS/SSA format")
566 (description "libass is a subtitle rendering library for the
567 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
568 (license license:isc)))
570 (define-public libcaca
573 (version "0.99.beta19")
576 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
580 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
581 (build-system gnu-build-system)
582 (native-inputs `(("pkg-config" ,pkg-config)))
584 `(("freeglut" ,freeglut)
591 (home-page "http://caca.zoy.org/wiki/libcaca")
592 (synopsis "Colour ASCII-art library")
593 (description "libcaca is a graphics library that outputs text instead of
594 pixels, so that it can work on older video cards or text terminals. It
595 supports Unicode, 2048 colors, dithering of color images, and advanced text
597 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
599 (define-public libdca
606 "https://download.videolan.org/pub/videolan/libdca/"
607 version "/libdca-" version ".tar.bz2"))
610 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
611 (build-system gnu-build-system)
612 (home-page "https://www.videolan.org/developers/libdca.html")
613 (synopsis "DTS Coherent Acoustics decoder")
614 (description "libdca is a library for decoding DTS Coherent Acoustics
616 (license license:gpl2+)))
625 "mirror://sourceforge/" name "/" name "/"
626 version "/" name "-" version ".tar.gz"))
629 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
630 (build-system gnu-build-system)
631 (native-inputs `(("pkg-config" ,pkg-config)))
632 (inputs `(("libxv" ,libxv)))
633 (home-page "http://libdv.sourceforge.net/")
634 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
635 (description "The Quasar DV codec (libdv) is a software codec for DV
636 video, the encoding format used by most digital camcorders, typically those
637 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
638 developed according to the official standards for DV video: IEC 61834 and
640 (license license:lgpl2.1+)))
642 (define-public libmatroska
649 (uri (string-append "https://dl.matroska.org/downloads/"
650 name "/" name "-" version ".tar.xz"))
653 "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
654 (build-system cmake-build-system)
656 `(("libebml" ,libebml)))
659 (list "-DBUILD_SHARED_LIBS=YES")
660 #:tests? #f)) ; no test suite
661 (home-page "https://www.matroska.org")
662 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
664 "Matroska aims to become the standard of multimedia container formats.
665 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
666 of XML. EBML enables the Matroska Development Team to gain significant
667 advantages in terms of future format extensibility, without breaking file
668 support in old parsers.
669 libebml is a C++ library to read and write EBML files.")
670 (license license:lgpl2.1)))
680 ;; Newer releases are only available on GitHub.
681 (string-append "https://github.com/01org/libva/releases/download/"
682 version "/libva-" version ".tar.bz2")
683 ;; Keep the old URL around for compatibility.
684 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
685 "libva/libva-" version "/libva-" version ".tar.bz2")))
687 (base32 "14ckq67z3pcd7jrnrm3ckss440g6dzp2m0ff5rps54qmq9b309lr"))))
688 (build-system gnu-build-system)
690 `(("pkg-config" ,pkg-config)))
695 ("libxfixes" ,libxfixes)
697 ("wayland" ,wayland)))
700 (modify-phases %standard-phases
702 'build 'fix-dlopen-paths
703 (lambda* (#:key outputs #:allow-other-keys)
704 (let ((out (assoc-ref outputs "out")))
705 (substitute* "va/drm/va_drm_auth_x11.c"
706 (("\"libva-x11\\.so\\.%d\"")
707 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
709 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
710 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
712 (list (string-append "--with-drivers-path="
713 (assoc-ref %build-inputs "mesa") "/lib/dri"))
714 ;; However, we can't write to mesa's store directory, so override the
715 ;; following make variable to install the dummy driver to libva's
716 ;; $prefix/lib/dri directory.
718 (list (string-append "dummy_drv_video_ladir="
719 (assoc-ref %outputs "out") "/lib/dri"))))
720 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
721 (synopsis "Video acceleration library")
722 (description "The main motivation for VA-API (Video Acceleration API) is
723 to enable hardware accelerated video decode/encode at various
724 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
725 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
726 (license license:expat)))
728 (define-public ffmpeg
734 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
738 "11id9pm4azfrhpa4vr2yaw31dzgd55kl1zsxwn24sczx9n14jdrp"))))
739 (build-system gnu-build-system)
741 `(("fontconfig" ,fontconfig)
742 ("freetype" ,freetype)
743 ("frei0r-plugins" ,frei0r-plugins)
750 ("libbluray" ,libbluray)
752 ("libcdio-paranoia" ,libcdio-paranoia)
754 ("libtheora" ,libtheora)
756 ("libvdpau" ,libvdpau)
757 ("libvorbis" ,libvorbis)
763 ("pulseaudio" ,pulseaudio)
775 ("pkg-config" ,pkg-config)
777 ("python" ,python-2) ; scripts use interpreter python2
781 `(#:test-target "fate"
783 ;; possible additional inputs:
784 ;; --enable-avisynth enable reading of AviSynth script
786 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
787 ;; --enable-libcelt enable CELT decoding via libcelt [no]
788 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
789 ;; and libraw1394 [no]
790 ;; --enable-libfaac enable AAC encoding via libfaac [no]
791 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
792 ;; --enable-libflite enable flite (voice synthesis) support via
794 ;; --enable-libgme enable Game Music Emu via libgme [no]
795 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
796 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
797 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
798 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
799 ;; --enable-libnut enable NUT (de)muxing via libnut,
800 ;; native (de)muxer exists [no]
801 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
802 ;; libopencore-amrnb [no]
803 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
804 ;; libopencore-amrwb [no]
805 ;; --enable-libopencv enable video filtering via libopencv [no]
806 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
808 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
809 ;; --enable-libschroedinger enable Dirac de/encoding via
810 ;; libschroedinger [no]
811 ;; --enable-libshine enable fixed-point MP3 encoding via
813 ;; --enable-libssh enable SFTP protocol via libssh [no]
814 ;; (libssh2 does not work)
815 ;; --enable-libstagefright-h264 enable H.264 decoding via
816 ;; libstagefright [no]
817 ;; --enable-libutvideo enable Ut Video encoding and decoding via
819 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
820 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
821 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
822 ;; libvo-amrwbenc [no]
823 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
824 ;; --enable-libxavs enable AVS encoding via xavs [no]
825 ;; --enable-libzmq enable message passing via libzmq [no]
826 ;; --enable-libzvbi enable teletext support via libzvbi [no]
827 ;; --enable-opencl enable OpenCL code
828 '("--enable-avresample"
829 "--enable-gpl" ; enable optional gpl licensed parts
832 "--enable-fontconfig"
840 "--enable-libfreetype"
841 "--enable-libmp3lame"
847 "--enable-libtwolame"
848 "--enable-libvidstab"
858 "--enable-runtime-cpudetect"
860 ;; The HTML pages take 7.2 MiB
861 "--disable-htmlpages"
863 ;; The static libraries are 23 MiB
866 ;; Runtime cpu detection is not implemented on
867 ;; MIPS, so we disable some features.
870 "--disable-mipsdspr2"
873 (modify-phases %standard-phases
876 ;; configure does not work followed by "SHELL=..." and
877 ;; "CONFIG_SHELL=..."; set environment variables instead
878 (lambda* (#:key outputs configure-flags #:allow-other-keys)
879 (let ((out (assoc-ref outputs "out")))
880 (substitute* "configure"
881 (("#! /bin/sh") (string-append "#!" (which "sh"))))
882 (setenv "SHELL" (which "bash"))
883 (setenv "CONFIG_SHELL" (which "bash"))
886 (string-append "--prefix=" out)
887 ;; Add $libdir to the RUNPATH of all the binaries.
888 (string-append "--extra-ldflags=-Wl,-rpath="
892 'check 'set-ld-library-path
894 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
896 (let* ((dso (find-files "." "\\.so$"))
897 (path (string-join (map dirname dso) ":")))
898 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
899 (setenv "LD_LIBRARY_PATH" path)
901 (home-page "https://www.ffmpeg.org/")
902 (synopsis "Audio and video framework")
903 (description "FFmpeg is a complete, cross-platform solution to record,
904 convert and stream audio and video. It includes the libavcodec
905 audio/video codec library.")
906 (license license:gpl2+)))
908 (define-public ffmpeg-3.4
914 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
918 "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))
920 (substitute-keyword-arguments (package-arguments ffmpeg)
921 ((#:configure-flags flags)
922 `(delete "--enable-libaom" ,flags))))
923 (inputs (alist-delete "libaom"
924 (package-inputs ffmpeg)))))
926 (define-public ffmpeg-for-stepmania
935 (url "https://github.com/stepmania/ffmpeg.git")
936 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
938 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
939 (file-name (git-file-name "ffmpeg" version))))
941 (substitute-keyword-arguments (package-arguments ffmpeg)
942 ((#:configure-flags flags)
943 '(list "--disable-programs"
947 "--disable-swresample"
951 "--enable-static"))))
954 (define-public ffmpegthumbnailer
956 (name "ffmpegthumbnailer")
961 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
963 (file-name (git-file-name name version))
966 "0kl8aa547icy9b05njps02a8sw4yn4f8fzs228kig247sn09s4cp"))))
967 (build-system cmake-build-system)
969 `(("pkg-config" ,pkg-config)))
972 ("libjpeg-turbo" ,libjpeg-turbo)
976 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
977 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
978 (synopsis "Create thumbnails from video files")
979 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
980 can be used by file managers to create thumbnails for your video files. The
981 thumbnailer uses ffmpeg to decode frames from the video files, so supported
982 videoformats depend on the configuration flags of ffmpeg.")
983 (license license:gpl2+)))
992 "https://download.videolan.org/pub/videolan/vlc/"
993 (car (string-split version #\-))
994 "/vlc-" version ".tar.xz"))
997 "1lvyyahv6g9zv7m5g5qinyrwmw47zdsd5ysimb862j7kw15nvh8q"))))
998 (build-system gnu-build-system)
1002 ("gettext" ,gettext-minimal)
1003 ("git" ,git) ; needed for a test
1004 ("pkg-config" ,pkg-config)))
1005 ;; FIXME: Add optional inputs once available.
1007 `(("alsa-lib" ,alsa-lib)
1013 ("fontconfig" ,fontconfig)
1014 ("freetype" ,freetype)
1015 ("fribidi" ,fribidi)
1018 ("libarchive" ,libarchive)
1020 ("libavc1394" ,libavc1394)
1021 ("libbluray" ,libbluray)
1022 ("libcaca" ,libcaca)
1023 ("libcddb" ,libcddb)
1025 ("libdvbpsi" ,libdvbpsi)
1026 ("libdvdnav" ,libdvdnav)
1027 ("libdvdread" ,libdvdread)
1028 ("libebml" ,libebml)
1029 ("libgcrypt" ,libgcrypt)
1031 ("libkate" ,libkate)
1033 ("libmatroska" ,libmatroska)
1034 ("libmicrodns" ,libmicrodns)
1035 ("libmodplug" ,libmodplug)
1036 ("libmpeg2" ,libmpeg2)
1039 ("libraw1394" ,libraw1394)
1040 ("librsvg" ,librsvg)
1041 ("libsamplerate" ,libsamplerate)
1042 ("libsecret" ,libsecret)
1043 ("libssh2" ,libssh2)
1044 ("libupnp" ,libupnp)
1046 ("libvdpau" ,libvdpau)
1047 ("libvorbis" ,libvorbis)
1048 ("libvpx" ,libvpx-1.7)
1049 ("libtheora" ,libtheora)
1050 ("libx264" ,libx264)
1051 ("libxext" ,libxext)
1053 ("libxinerama" ,libxinerama)
1054 ("libxml2" ,libxml2)
1056 ("livemedia-utils" ,livemedia-utils)
1061 ("pulseaudio" ,pulseaudio)
1062 ("protobuf" ,protobuf)
1063 ("python" ,python-wrapper)
1066 ("qtx11extras" ,qtx11extras)
1069 ("sdl-image" ,sdl-image)
1071 ("speexdsp" ,speexdsp)
1073 ("twolame" ,twolame)
1075 ("wayland" ,wayland)
1076 ("wayland-protocols" ,wayland-protocols)
1078 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1081 `("CXXFLAGS=-std=gnu++11"
1083 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1084 (assoc-ref %build-inputs "ffmpeg")
1085 "/lib")) ;needed for the tests
1088 (modify-phases %standard-phases
1089 (add-after 'unpack 'patch-source
1090 (lambda* (#:key inputs #:allow-other-keys)
1091 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1092 (substitute* "configure"
1093 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1094 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1095 ;; Some of the tests require using the display to test out VLC,
1096 ;; which fails in our sandboxed build system
1097 (substitute* "test/run_vlc.sh"
1098 (("./vlc --ignore-config") "echo"))
1100 ;; modules/text_renderer/freetype/text_layout.c uses a
1101 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1102 ;; from fribidi.h, so for now we enable the use of deprecated
1103 ;; fribidi interfaces from this file.
1104 ;; FIXME: Try removing this for vlc >= 3.0.3.
1105 (substitute* "modules/text_renderer/freetype/text_layout.c"
1106 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1108 ;; Fix build against Qt 5.11.
1109 (substitute* "modules/gui/qt/actions_manager.cpp"
1110 (("#include <vlc_keys.h>") "#include <vlc_keys.h>
1111 #include <QAction>"))
1112 (substitute* "modules/gui/qt/components/simple_preferences.cpp"
1113 (("#include <QFont>") "#include <QFont>
1114 #include <QButtonGroup>"))
1116 (add-after 'strip 'regenerate-plugin-cache
1117 (lambda* (#:key outputs #:allow-other-keys)
1118 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1119 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1120 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1121 ;; it references. Thus, we first reset the timestamps of all
1122 ;; these files, and then regenerate the cache such that the
1123 ;; mtimes it includes are always zero instead of being dependent
1124 ;; on the build time.
1125 (let* ((out (assoc-ref outputs "out"))
1126 (pkglibdir (string-append out "/lib/vlc"))
1127 (plugindir (string-append pkglibdir "/plugins"))
1128 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1129 ;; TODO: Factorize 'reset-timestamps'.
1130 (for-each (lambda (file)
1131 (let ((s (lstat file)))
1132 (unless (eq? (stat:type s) 'symlink)
1134 (find-files plugindir))
1135 (invoke cachegen plugindir))))
1136 (add-after 'install 'wrap-executable
1137 (lambda* (#:key outputs #:allow-other-keys)
1138 (let ((out (assoc-ref outputs "out"))
1139 (plugin-path (getenv "QT_PLUGIN_PATH")))
1140 (wrap-program (string-append out "/bin/vlc")
1141 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1143 (home-page "https://www.videolan.org/")
1144 (synopsis "Audio and video framework")
1145 (description "VLC is a cross-platform multimedia player and framework
1146 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1147 streaming protocols.")
1148 (license license:gpl2+)))
1150 (define-public mplayer
1157 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1161 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
1162 (build-system gnu-build-system)
1163 ;; FIXME: Add additional inputs once available.
1165 `(("pkg-config" ,pkg-config)))
1167 `(("alsa-lib" ,alsa-lib)
1168 ("cdparanoia" ,cdparanoia)
1169 ("ffmpeg" ,ffmpeg-3.4)
1170 ("fontconfig" ,fontconfig)
1171 ("freetype" ,freetype)
1172 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
1175 ("libdvdcss" ,libdvdcss)
1176 ("libdvdnav" ,libdvdnav)
1177 ("libjpeg" ,libjpeg)
1178 ("libmpeg2" ,libmpeg2)
1179 ("libmpg123" ,mpg123) ; audio codec for MP3
1181 ("libtheora" ,libtheora)
1182 ("libvdpau" ,libvdpau)
1183 ("libvorbis" ,libvorbis)
1185 ("libx264" ,libx264)
1186 ("libxinerama" ,libxinerama)
1188 ("libxxf86dga" ,libxxf86dga)
1192 ("pulseaudio" ,pulseaudio)
1193 ("python" ,python-wrapper)
1199 `(#:tests? #f ; no test target
1201 (modify-phases %standard-phases
1203 ;; configure does not work followed by "SHELL=..." and
1204 ;; "CONFIG_SHELL=..."; set environment variables instead
1205 (lambda* (#:key inputs outputs #:allow-other-keys)
1206 (let ((out (assoc-ref outputs "out"))
1207 (libx11 (assoc-ref inputs "libx11")))
1208 (substitute* "configure"
1209 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1210 (setenv "SHELL" (which "bash"))
1211 (setenv "CONFIG_SHELL" (which "bash"))
1212 (invoke "./configure"
1213 (string-append "--extra-cflags=-I"
1214 libx11 "/include") ; to detect libx11
1215 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1216 (string-append "--prefix=" out)
1217 ;; Enable runtime cpu detection where supported,
1218 ;; and choose a suitable target.
1219 ,@(match (or (%current-target-system)
1222 '("--enable-runtime-cpudetection"
1223 "--target=x86_64-linux"))
1225 '("--enable-runtime-cpudetection"
1226 "--target=i686-linux"))
1228 '("--target=mips3-linux"))
1229 (_ (list (string-append
1231 (or (%current-target-system)
1232 (nix-system->gnu-triplet
1233 (%current-system)))))))
1234 "--disable-iwmmxt")))))))
1235 (home-page "https://www.mplayerhq.hu/design7/news.html")
1236 (synopsis "Audio and video player")
1237 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1238 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1239 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1240 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1241 (license license:gpl2)))
1250 (url "https://github.com/mpv-player/mpv.git")
1251 (commit (string-append "v" version))))
1252 (file-name (git-file-name name version))
1255 "138921kx8g6qprim558xin09xximjhsj9ss8b71ifg2m6kclym8m"))))
1256 (build-system waf-build-system)
1258 `(("perl" ,perl) ; for zsh completion file
1259 ("pkg-config" ,pkg-config)
1260 ("python-docutils" ,python-docutils)))
1261 ;; Missing features: libguess, V4L2
1263 `(("alsa-lib" ,alsa-lib)
1270 ("libbluray" ,libbluray)
1271 ("libcaca" ,libcaca)
1272 ("libbs2b" ,libbs2b)
1273 ("libcdio-paranoia" ,libcdio-paranoia)
1274 ("libdvdread" ,libdvdread)
1275 ("libdvdnav" ,libdvdnav)
1276 ("libjpeg" ,libjpeg)
1278 ("libvdpau" ,libvdpau)
1280 ("libxext" ,libxext)
1281 ("libxinerama" ,libxinerama)
1282 ("libxrandr" ,libxrandr)
1283 ("libxscrnsaver" ,libxscrnsaver)
1285 ;; XXX: lua > 5.2 is not currently supported; see
1286 ;; waftools/checks/custom.py
1290 ("pulseaudio" ,pulseaudio)
1292 ("shaderc" ,shaderc)
1293 ("vulkan-headers" ,vulkan-headers)
1294 ("vulkan-loader" ,vulkan-loader)
1296 ("wayland" ,wayland)
1297 ("wayland-protocols" ,wayland-protocols)
1298 ("libxkbcommon" ,libxkbcommon)
1299 ("youtube-dl" ,youtube-dl)
1303 (modify-phases %standard-phases
1305 'configure 'setup-waf
1306 (lambda* (#:key inputs #:allow-other-keys)
1307 (let ((waf (assoc-ref inputs "waf")))
1308 (copy-file (string-append waf "/bin/waf") "waf"))
1311 #:configure-flags (list "--enable-libmpv-shared"
1316 "--disable-build-date")
1317 ;; No check function defined.
1319 (home-page "https://mpv.io/")
1320 (synopsis "Audio and video player")
1321 (description "mpv is a general-purpose audio and video player. It is a
1322 fork of mplayer2 and MPlayer. It shares some features with the former
1323 projects while introducing many more.")
1324 (license license:gpl2+)))
1326 (define-public gnome-mpv
1333 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1334 "/download/v" version "/gnome-mpv-" version
1338 "0jzdzvhcqp5jp1inwk2466zf7r8iimk3x69066gl8mzaay98mk92"))))
1340 `(("intltool" ,intltool)
1341 ("pkg-config" ,pkg-config)))
1344 ("libepoxy" ,libepoxy)
1346 (build-system glib-or-gtk-build-system)
1347 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1348 (synopsis "GTK+ frontend for the mpv media player")
1349 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1350 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1351 access to mpv's powerful playback capabilities.")
1352 (license license:gpl3+)))
1354 (define-public libvpx
1359 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1362 (url "https://chromium.googlesource.com/webm/libvpx")
1363 (commit (string-append "v" version))))
1364 (file-name (git-file-name name version))
1367 "079pb80am08lj8y5rx99vdr99mdqis9067f172zq12alkz849n93"))
1368 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1369 (build-system gnu-build-system)
1371 `(#:configure-flags (list "--enable-shared"
1373 ;; Limit size to avoid CVE-2015-1258
1374 "--size-limit=16384x16384"
1375 (string-append "--prefix=" (assoc-ref %outputs "out")))
1376 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1377 (assoc-ref %outputs "out") "/lib"))
1378 #:phases (modify-phases %standard-phases
1380 (lambda* (#:key configure-flags #:allow-other-keys)
1381 ;; The configure script does not understand some of the GNU
1382 ;; options, so we only add the flags specified above.
1383 (apply invoke "./configure" configure-flags))))
1384 #:tests? #f)) ; no check target
1388 (synopsis "VP8/VP9 video codec")
1389 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1390 (license license:bsd-3)
1391 (home-page "https://www.webmproject.org/")))
1393 ;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
1394 (define-public libvpx-1.7
1399 (inherit (package-source libvpx))
1401 (url "https://chromium.googlesource.com/webm/libvpx")
1402 (commit (string-append "v" version))))
1403 (file-name (git-file-name "libvpx" version))
1406 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1409 (origin-patches (package-source libvpx))
1410 (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
1412 (define-public youtube-dl
1415 (version "2019.03.01")
1418 (uri (string-append "https://github.com/rg3/youtube-dl/releases/"
1419 "download/" version "/youtube-dl-"
1423 "0bxk6adyppdv50jnp5cika8wc6wfgd6d8zbg1njgmcs1pxskllmf"))))
1424 (build-system python-build-system)
1426 ;; The problem here is that the directory for the man page and completion
1427 ;; files is relative, and for some reason, setup.py uses the
1428 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1429 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1430 ;; completion file is called 'youtube-dl' rather than
1431 ;; 'youtube-dl.bash-completion'.
1432 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1433 #:phases (modify-phases %standard-phases
1434 (add-before 'install 'fix-the-data-directories
1435 (lambda* (#:key outputs #:allow-other-keys)
1436 (let ((prefix (assoc-ref outputs "out")))
1437 (mkdir "bash-completion")
1438 (rename-file "youtube-dl.bash-completion"
1439 "bash-completion/youtube-dl")
1440 (substitute* "setup.py"
1441 (("youtube-dl\\.bash-completion")
1442 "bash-completion/youtube-dl")
1444 (string-append "'" prefix "/etc/"))
1446 (string-append "'" prefix "/share/")))
1448 (synopsis "Download videos from YouTube.com and other sites")
1450 "Youtube-dl is a small command-line program to download videos from
1451 YouTube.com and many more sites.")
1452 (home-page "https://yt-dl.org")
1453 (license license:public-domain)))
1455 (define-public youtube-dl-gui
1457 (name "youtube-dl-gui")
1462 (uri (pypi-uri "Youtube-DLG" version))
1465 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1466 (build-system python-build-system)
1468 ;; In Guix, wxpython has not yet been packaged for Python 3.
1469 `(#:python ,python-2
1470 ;; This package has no tests.
1473 (modify-phases %standard-phases
1474 (add-before 'build 'patch-source
1475 (lambda* (#:key inputs #:allow-other-keys)
1476 ;; The youtube-dl-gui program lets you configure options. Some of
1477 ;; them are problematic, so we change their defaults.
1478 (substitute* "youtube_dl_gui/optionsmanager.py"
1479 ;; When this is true, the builder process will try (and fail) to
1480 ;; write logs to the builder user's home directory.
1481 (("'enable_log': True") "'enable_log': False")
1482 ;; This determines which youtube-dl program youtube-dl-gui will
1483 ;; run. If we don't set this, then youtube-dl-gui might download
1484 ;; an arbitrary copy from the Internet into the user's home
1485 ;; directory and run it, so let's make sure youtube-dl-gui uses
1486 ;; the youtube-dl from the inputs by default.
1487 (("'youtubedl_path': self.config_path")
1488 (string-append "'youtubedl_path': '"
1489 (assoc-ref inputs "youtube-dl")
1491 ;; When this is True, when youtube-dl-gui is finished downloading
1492 ;; a file, it will try (and possibly fail) to open the directory
1493 ;; containing the downloaded file. This can fail because it
1494 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1495 ;; adding xdg-utils to the propagated inputs is not enough to
1496 ;; make this work, so for now we set the default to False.
1497 (("'open_dl_dir': True") "'open_dl_dir': False"))
1498 ;; The youtube-dl program from the inputs is actually a wrapper
1499 ;; script written in bash, so attempting to invoke it as a python
1500 ;; script will fail.
1501 (substitute* "youtube_dl_gui/downloaders.py"
1502 (("cmd = \\['python', self\\.youtubedl_path\\]")
1503 "cmd = [self.youtubedl_path]"))
1504 ;; Use relative paths for installing data files so youtube-dl-gui
1505 ;; installs the files relative to its prefix in the store, rather
1506 ;; than relative to /. Also, instead of installing data files into
1507 ;; $prefix/usr/share, install them into $prefix/share for
1508 ;; consistency (see: (standards) Directory Variables).
1509 (substitute* "setup.py"
1510 (("= '/usr/share") "= 'share"))
1511 ;; Update get_locale_file() so it finds the installed localization
1513 (substitute* "youtube_dl_gui/utils.py"
1514 (("os\\.path\\.join\\('/usr', 'share'")
1515 (string-append "os.path.join('"
1516 (assoc-ref %outputs "out")
1520 `(("python2-wxpython" ,python2-wxpython)
1521 ("youtube-dl" ,youtube-dl)))
1522 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1524 "GUI (Graphical User Interface) for @command{youtube-dl}")
1526 "Youtube-dlG is a GUI (Graphical User Interface) for
1527 @command{youtube-dl}. You can use it to download videos from YouTube and any
1528 other site that youtube-dl supports.")
1529 (license license:unlicense)))
1531 (define-public you-get
1534 (version "0.4.1256")
1538 (url "https://github.com/soimort/you-get.git")
1539 (commit (string-append "v" version))))
1540 (file-name (git-file-name name version))
1543 "1hzr7ha1jvbc0v2bwl7s08ymwdmvb0f2jz4xp1fi6agq5y3ca1iv"))))
1544 (build-system python-build-system)
1546 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1549 (modify-phases %standard-phases
1550 (add-after 'unpack 'qualify-input-references
1551 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1552 ;; happens to be in the user's $PATH at run time.
1553 (lambda* (#:key inputs #:allow-other-keys)
1554 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1556 (substitute* "src/you_get/processor/ffmpeg.py"
1557 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1558 ;; same string is also used when sniffing ffmpeg's output.
1559 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1560 (string-append prefix "'" ffmpeg "'")))
1562 #:tests? #f)) ; XXX some tests need Internet access
1563 (synopsis "Download videos, audio, or images from Web sites")
1565 "You-Get is a command-line utility to download media contents (videos,
1566 audio, images) from the Web. It can use either mpv or vlc for playback.")
1567 (home-page "https://you-get.org/")
1568 (license license:expat)))
1570 (define-public youtube-viewer
1572 (name "youtube-viewer")
1577 (url "https://github.com/trizen/youtube-viewer.git")
1579 (file-name (git-file-name name version))
1582 "1j782m9rximybamd0qsc43hi7hgk333x9gy3ypzb61s0sifs0i6m"))))
1583 (build-system perl-build-system)
1585 `(("perl-module-build" ,perl-module-build)))
1586 ;; FIXME: Add optional dependencies once available:
1587 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1589 `(("perl-data-dump" ,perl-data-dump)
1590 ("perl-file-sharedir" ,perl-file-sharedir)
1591 ("perl-gtk2" ,perl-gtk2)
1592 ("perl-json" ,perl-json)
1593 ("perl-libwww" ,perl-libwww)
1594 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1595 ("perl-mozilla-ca" ,perl-mozilla-ca)
1596 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1598 `(#:modules ((guix build perl-build-system)
1601 #:module-build-flags '("--gtk")
1603 (modify-phases %standard-phases
1604 (add-after 'install 'install-desktop
1605 (lambda* (#:key outputs #:allow-other-keys)
1606 (let* ((out (assoc-ref outputs "out"))
1607 (sharedir (string-append out "/share")))
1608 (install-file "share/gtk-youtube-viewer.desktop"
1609 (string-append sharedir "/applications"))
1610 (install-file "share/icons/gtk-youtube-viewer.png"
1611 (string-append sharedir "/pixmaps"))
1613 (add-after 'install 'wrap-program
1614 (lambda* (#:key outputs #:allow-other-keys)
1615 (let* ((out (assoc-ref outputs "out"))
1616 (bin-dir (string-append out "/bin/"))
1617 (site-dir (string-append out "/lib/perl5/site_perl/"))
1618 (lib-path (getenv "PERL5LIB")))
1619 (for-each (cut wrap-program <>
1620 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1621 (find-files bin-dir))
1624 "Lightweight application for searching and streaming videos from YouTube")
1626 "Youtube-viewer searches and plays YouTube videos in a native player.
1627 It comes with various search options; it can search for videos, playlists
1628 and/or channels. The videos are streamed directly in a selected video player
1629 at the best resolution (customizable) and with closed-captions (if available).
1630 Both command-line and GTK2 interface are available.")
1631 (home-page "https://github.com/trizen/youtube-viewer")
1632 (license license:perl-license)))
1634 (define-public libbluray
1640 (uri (string-append "https://download.videolan.org/videolan/"
1641 name "/" version "/"
1642 name "-" version ".tar.bz2"))
1645 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1646 (build-system gnu-build-system)
1648 `(#:configure-flags '("--disable-bdjava-jar")
1650 (modify-phases %standard-phases
1651 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1652 ;; Avoid the need to propagate libxml2 by referring to it
1653 ;; directly, as is already done for fontconfig & freetype.
1654 (lambda* (#:key inputs #:allow-other-keys)
1655 (let ((libxml2 (assoc-ref inputs "libxml2")))
1656 (substitute* "configure"
1657 ((" libxml-2.0") ""))
1658 (substitute* "src/libbluray.pc.in"
1659 (("^Libs.private:" field)
1660 (string-append field " -L" libxml2 "/lib -lxml2")))
1662 (add-before 'build 'fix-dlopen-paths
1663 (lambda* (#:key inputs #:allow-other-keys)
1664 (let ((libaacs (assoc-ref inputs "libaacs"))
1665 (libbdplus (assoc-ref inputs "libbdplus")))
1666 (substitute* "src/libbluray/disc/aacs.c"
1668 (string-append "\"" libaacs "/lib/libaacs\"")))
1669 (substitute* "src/libbluray/disc/bdplus.c"
1671 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1673 (native-inputs `(("pkg-config" ,pkg-config)))
1675 `(("fontconfig" ,fontconfig)
1676 ("freetype" ,freetype)
1677 ("libaacs" ,libaacs)
1678 ("libbdplus" ,libbdplus)
1679 ("libxml2" ,libxml2)))
1680 (home-page "https://www.videolan.org/developers/libbluray.html")
1681 (synopsis "Blu-Ray Disc playback library")
1683 "libbluray is a library designed for Blu-Ray Disc playback for media
1684 players, like VLC or MPlayer.")
1685 (license license:lgpl2.1+)))
1687 (define-public libdvdread
1693 (uri (string-append "https://download.videolan.org/videolan/"
1694 "libdvdread/" version "/"
1695 "libdvdread-" version ".tar.bz2"))
1698 "1gfmh8ii3s2fw1c8vn57piwxc0smd3va4h7xgp9s8g48cc04zki8"))))
1699 (build-system gnu-build-system)
1701 `(#:configure-flags '("--with-libdvdcss=yes")))
1703 `(("pkg-config" ,pkg-config)))
1705 `(("libdvdcss" ,libdvdcss)))
1706 (home-page "http://dvdnav.mplayerhq.hu/")
1707 (synopsis "Library for reading video DVDs")
1709 "Libdvdread provides a simple foundation for reading DVD video
1710 disks. It provides the functionality that is required to access many
1711 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1712 authentication and descrambling (if an external libdvdcss library is
1714 (license license:gpl2+)))
1716 (define-public dvdauthor
1723 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1727 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1728 (build-system gnu-build-system)
1730 `(("libdvdread" ,libdvdread)
1732 ("imagemagick" ,imagemagick)
1733 ("libxml2" ,libxml2)
1734 ("freetype" ,freetype)))
1736 `(("pkg-config" ,pkg-config)))
1737 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1738 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1739 MPEG-2 stream containing VOB packets.")
1740 (home-page "http://dvdauthor.sourceforge.net")
1741 (license license:gpl3+)))
1743 (define-public libdvdnav
1749 (uri (string-append "https://download.videolan.org/videolan/"
1750 name "/" version "/"
1751 name "-" version ".tar.bz2"))
1754 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1755 (build-system gnu-build-system)
1757 `(("pkg-config" ,pkg-config)))
1759 `(("libdvdread" ,libdvdread)))
1760 (home-page "http://dvdnav.mplayerhq.hu/")
1761 (synopsis "Library for video DVD navigation features")
1763 "Libdvdnav is a library for developers of multimedia
1764 applications. It allows easy use of sophisticated DVD navigation features
1765 such as DVD menus, multiangle playback and even interactive DVD games. All
1766 this functionality is provided through a simple API which provides the DVD
1767 playback as a single logical stream of blocks, intermitted by special
1768 dvdnav events to report certain conditions. The main usage of libdvdnav is
1769 a loop regularly calling a function to get the next block, surrounded by
1770 additional calls to tell the library of user interaction. The whole
1771 DVD virtual machine and internal playback states are completely
1773 (license license:gpl2+)))
1775 (define-public libdvdcss
1781 (uri (string-append "https://download.videolan.org/pub/"
1782 name "/" version "/"
1783 name "-" version ".tar.bz2"))
1786 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1787 (build-system gnu-build-system)
1788 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1789 (synopsis "Library for accessing DVDs as block devices")
1791 "libdvdcss is a simple library designed for accessing DVDs like a block
1792 device without having to bother about the decryption.")
1793 (license license:gpl2+)))
1795 (define-public srt2vtt
1802 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1806 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1807 (build-system gnu-build-system)
1809 `(("guile" ,guile-2.0)))
1810 (synopsis "SubRip to WebVTT subtitle converter")
1811 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1812 for use with HTML5 video.")
1813 (home-page "https://dthompson.us/projects/srt2vtt.html")
1814 (license license:gpl3+)))
1816 (define-public avidemux
1823 "mirror://sourceforge/" name "/" name "/" version "/"
1824 name "_" version ".tar.gz"))
1827 "15g9h791qbnmycabbbl7s2b3n3xpvygm88qrfk35g2cw6957ik9w"))
1828 (patches (search-patches "avidemux-install-to-lib.patch"))))
1829 (build-system cmake-build-system)
1831 `(("pkg-config" ,pkg-config)))
1832 ;; FIXME: Once packaged, add libraries not found during the build.
1834 `(("alsa-lib" ,alsa-lib)
1835 ("fontconfig" ,fontconfig)
1836 ("freetype" ,freetype)
1837 ("fribidi" ,fribidi)
1842 ("libvdpau" ,libvdpau)
1843 ("libvorbis" ,libvorbis)
1847 ("pulseaudio" ,pulseaudio)
1848 ("python" ,python-wrapper)
1850 ("qttools" ,qttools)
1856 `(#:tests? #f ; no check target
1858 ;; Make sure files inside the included ffmpeg tarball are
1860 (modify-phases %standard-phases
1861 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1863 (with-directory-excursion "avidemux_core/ffmpeg_package"
1864 (invoke "tar" "xf" "ffmpeg-3.3.7.tar.bz2")
1865 (delete-file "ffmpeg-3.3.7.tar.bz2"))
1867 (add-after 'patch-source-shebangs 'repack-ffmpeg
1869 (with-directory-excursion "avidemux_core/ffmpeg_package"
1870 (substitute* "ffmpeg-3.3.7/configure"
1871 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1872 (invoke "tar" "cjf" "ffmpeg-3.3.7.tar.bz2" "ffmpeg-3.3.7"
1873 ;; avoid non-determinism in the archive
1874 "--sort=name" "--mtime=@0"
1875 "--owner=root:0" "--group=root:0")
1876 (delete-file-recursively "ffmpeg-3.3.7"))
1880 ;; Copy-paste settings from the cmake build system.
1881 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1882 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
1885 (lambda* (#:key inputs outputs #:allow-other-keys)
1886 (let* ((out (assoc-ref outputs "out"))
1887 (lib (string-append out "/lib"))
1889 (sdl (assoc-ref inputs "sdl"))
1891 (lambda* (component srcdir #:optional (args '()))
1892 (let ((builddir (string-append "build_" component)))
1894 (with-directory-excursion builddir
1895 (apply invoke "cmake"
1896 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1897 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1898 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1899 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1900 "\"-Wl,-rpath=" lib "\"")
1901 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1902 (string-append "-DSDL_INCLUDE_DIR="
1904 (string-append "../" srcdir)
1908 (number->string (parallel-job-count)))
1909 (invoke "make" "install"))))))
1911 (build_component "core" "avidemux_core")
1912 (build_component "cli" "avidemux/cli")
1913 (build_component "qt4" "avidemux/qt4")
1914 (build_component "plugins_common" "avidemux_plugins"
1915 '("-DPLUGIN_UI=COMMON"))
1916 (build_component "plugins_cli" "avidemux_plugins"
1917 '("-DPLUGIN_UI=CLI"))
1918 (build_component "plugins_qt4" "avidemux_plugins"
1919 '("-DPLUGIN_UI=QT4"))
1920 (build_component "plugins_settings" "avidemux_plugins"
1921 '("-DPLUGIN_UI=SETTINGS"))
1922 ;; Remove .exe and .dll file.
1923 (delete-file-recursively
1924 (string-append out "/share/ADM6_addons"))
1926 (delete 'install))))
1927 (home-page "http://fixounet.free.fr/avidemux/")
1928 (synopsis "Video editor")
1929 (description "Avidemux is a video editor designed for simple cutting,
1930 filtering and encoding tasks. It supports many file types, including AVI,
1931 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1932 can be automated using projects, job queue and powerful scripting
1934 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1935 ;; Software with various licenses is included, see License.txt.
1936 (license license:gpl2+)))
1938 (define-public vapoursynth
1940 (name "vapoursynth")
1945 (url "https://github.com/vapoursynth/vapoursynth.git")
1946 (commit (string-append "R" version))))
1947 (file-name (git-file-name name version))
1950 "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
1951 (build-system gnu-build-system)
1953 `(("autoconf" ,autoconf)
1954 ("automake" ,automake)
1955 ("cython" ,python-cython)
1956 ("libtool" ,libtool)
1957 ("pkg-config" ,pkg-config)
1961 `(("ffmpeg" ,ffmpeg)
1963 ("tesseract-ocr" ,tesseract-ocr)
1967 (modify-phases %standard-phases
1968 (add-after 'unpack 'autogen
1970 (invoke "sh" "autogen.sh"))))))
1971 (home-page "http://www.vapoursynth.com/")
1972 (synopsis "Video processing framework")
1973 (description "VapourSynth is a C++ library and Python module for video
1974 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1975 multithreading, generalized colorspaces, per frame properties, and videos with
1977 ;; src/core/cpufeatures only allows x86, ARM or PPC
1978 (supported-systems (fold delete %supported-systems
1979 '("mips64el-linux" "aarch64-linux")))
1980 ;; As seen from the source files.
1981 (license license:lgpl2.1+)))
1990 "http://downloads.xvid.org/downloads/xvidcore-"
1991 version ".tar.bz2"))
1994 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1995 (build-system gnu-build-system)
1996 (native-inputs `(("yasm" ,yasm)))
1999 (modify-phases %standard-phases
2001 'configure 'pre-configure
2003 (chdir "build/generic")
2004 (substitute* "configure"
2005 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2007 ;; No 'check' target.
2009 (home-page "https://www.xvid.com/")
2010 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2011 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2012 codec library. It uses ASP features such as b-frames, global and quarter
2013 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2014 and custom quantization matrices.")
2015 (license license:gpl2+)))
2017 (define-public streamlink
2024 (uri (pypi-uri "streamlink" version))
2027 "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
2028 (patches (search-patches "streamlink-update-test.patch"))))
2029 (build-system python-build-system)
2030 (home-page "https://github.com/streamlink/streamlink")
2032 `(("python-freezegun" ,python-freezegun)
2033 ("python-pytest" ,python-pytest)
2034 ("python-mock" ,python-mock)
2035 ("python-requests-mock" ,python-requests-mock)))
2037 `(("python-pysocks" ,python-pysocks)
2038 ("python-websocket-client" ,python-websocket-client)
2039 ("python-iso3166" ,python-iso3166)
2040 ("python-iso639" ,python-iso639)
2041 ("python-isodate" ,python-isodate)
2042 ("python-pycryptodome" ,python-pycryptodome)
2043 ("python-requests" ,python-requests)
2044 ("python-urllib3" ,python-urllib3)))
2045 (synopsis "Extract streams from various services")
2046 (description "Streamlink is command-line utility that extracts streams
2047 from sites like Twitch.tv and pipes them into a video player of choice.")
2048 (license license:bsd-2)))
2050 (define-public livestreamer
2051 (deprecated-package "livestreamer" streamlink))
2053 (define-public twitchy
2054 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2057 (version (git-version "3.4" "1" commit))
2062 (url "https://github.com/BasioMeusPuga/twitchy.git")
2064 (file-name (git-file-name name version))
2067 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2068 (build-system python-build-system)
2071 (modify-phases %standard-phases
2072 (add-after 'unpack 'patch-paths
2073 (lambda* (#:key inputs #:allow-other-keys)
2074 (substitute* "twitchy/twitchy_play.py"
2076 (string-append "\"" (assoc-ref inputs "streamlink")
2077 "/bin/streamlink ")))
2079 (add-before 'check 'check-setup
2081 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2083 (add-after 'install 'install-rofi-plugin
2084 (lambda* (#:key outputs #:allow-other-keys)
2085 (install-file "plugins/rofi-twitchy"
2086 (string-append (assoc-ref outputs "out")
2090 `(("python-requests" ,python-requests)
2091 ("streamlink" ,streamlink)))
2092 (home-page "https://github.com/BasioMeusPuga/twitchy")
2093 (synopsis "Command-line interface for Twitch.tv")
2095 "This package provides a command-line interface for Twitch.tv")
2096 (license license:gpl3+))))
2105 (url "https://github.com/mltframework/mlt.git")
2106 (commit (string-append "v" version))))
2107 (file-name (git-file-name name version))
2110 "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w"))))
2111 (build-system gnu-build-system)
2113 `(#:tests? #f ; no tests
2114 #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
2116 (list "--enable-gpl3"
2119 (modify-phases %standard-phases
2121 'configure 'override-LDFLAGS
2122 (lambda* (#:key outputs #:allow-other-keys)
2123 (substitute* "config.mak"
2125 (string-append "LDFLAGS+=-Wl,-rpath="
2126 (assoc-ref outputs "out")
2130 `(("alsa-lib" ,alsa-lib)
2131 ("ffmpeg" ,ffmpeg-3.4)
2133 ("frei0r-plugins" ,frei0r-plugins)
2134 ("gdk-pixbuf" ,gdk-pixbuf)
2136 ("libxml2" ,libxml2)
2139 ("libsamplerate" ,libsamplerate)
2140 ("pulseaudio" ,pulseaudio)
2146 `(("pkg-config" ,pkg-config)))
2147 (home-page "https://www.mltframework.org/")
2148 (synopsis "Author, manage, and run multitrack audio/video compositions")
2150 "MLT is a multimedia framework, designed and developed for television
2151 broadcasting. It provides a toolkit for broadcasters, video editors, media
2152 players, transcoders, web streamers and many more types of applications. The
2153 functionality of the system is provided via an assortment of ready to use
2154 tools, XML authoring components, and an extensible plug-in based API.")
2155 (license license:gpl3)))
2157 (define-public v4l-utils
2163 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2164 "/v4l-utils-" version ".tar.bz2"))
2167 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
2168 (build-system gnu-build-system)
2171 (list (string-append "--with-udevdir="
2172 (assoc-ref %outputs "out")
2174 "CXXFLAGS=-std=gnu++11")))
2177 ("pkg-config" ,pkg-config)))
2179 `(("alsa-lib" ,alsa-lib)
2181 ("libjpeg" ,libjpeg)
2185 (synopsis "Realtime video capture utilities for Linux")
2186 (description "The v4l-utils provide a series of libraries and utilities to
2187 be used for realtime video capture via Linux-specific APIs.")
2188 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2189 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2190 (license (list license:lgpl2.1+ license:gpl2))))
2199 (url "https://github.com/obsproject/obs-studio.git")
2201 (file-name (git-file-name name version))
2204 "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i"))))
2205 (build-system cmake-build-system)
2207 `(#:tests? #f)) ; no tests
2209 `(("pkg-config" ,pkg-config)))
2211 `(("alsa-lib" ,alsa-lib)
2215 ("fontconfig" ,fontconfig)
2216 ("freetype" ,freetype)
2218 ("jansson" ,jansson)
2219 ("libx264" ,libx264)
2220 ("libxcomposite" ,libxcomposite)
2222 ("pulseaudio" ,pulseaudio)
2224 ("qtx11extras" ,qtx11extras)
2226 ("v4l-utils" ,v4l-utils)
2228 (synopsis "Live streaming software")
2229 (description "Open Broadcaster Software provides a graphical interface for
2230 video recording and live streaming. OBS supports capturing audio and video
2231 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2233 (home-page "https://obsproject.com")
2234 (supported-systems '("x86_64-linux" "i686-linux"))
2235 (license license:gpl2+)))
2237 (define-public libvdpau
2244 (uri (string-append "https://gitlab.freedesktop.org/vdpau/libvdpau"
2245 "/uploads/14b620084c027d546fa0b3f083b800c6/"
2246 "libvdpau-" version ".tar.bz2"))
2249 "01ps6g6p6q7j2mjm9vn44pmzq3g75mm7mdgmnhb1qkjjdwc9njba"))))
2250 (build-system gnu-build-system)
2252 `(("pkg-config" ,pkg-config)))
2254 `(("libx11" ,libx11 "out")
2255 ("libxext" ,libxext)
2256 ("xorgproto" ,xorgproto)))
2257 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2258 (synopsis "Video Decode and Presentation API")
2259 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2260 provides an interface to video decode acceleration and presentation hardware
2261 present in modern GPUs.")
2262 (license (license:x11-style "file://COPYING"))))
2264 (define-public vdpauinfo
2271 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2272 name "-" version ".tar.gz"))
2275 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2276 (build-system gnu-build-system)
2278 `(("pkg-config" ,pkg-config)
2279 ("libx11" ,libx11)))
2281 `(("libvdpau" ,libvdpau)))
2282 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2283 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2284 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2286 (license (license:x11-style "file://COPYING"))))
2288 (define-public libvdpau-va-gl
2290 (name "libvdpau-va-gl")
2295 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2296 "releases/download/v" version "/libvdpau-va-gl-"
2300 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2301 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2302 (modules '((guix build utils)))
2303 (snippet '(begin (delete-file-recursively "3rdparty")
2305 (build-system cmake-build-system)
2307 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2309 `(("libvdpau" ,libvdpau)
2310 ("pkg-config" ,pkg-config)))
2314 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2315 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2317 "Many applications can use VDPAU to accelerate portions of the video
2318 decoding process and video post-processing to the GPU video hardware. Since
2319 there is no VDPAU available on Intel chips, they fall back to different drawing
2320 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2321 scaling and VA-API (if available) to accelerate video decoding.")
2322 (license license:expat)))
2324 (define-public recordmydesktop
2326 (name "recordmydesktop")
2330 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2331 version "/recordmydesktop-" version ".tar.gz"))
2334 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2335 (build-system gnu-build-system)
2336 (inputs `(("popt" ,popt)
2341 ("libxfixes" ,libxfixes)
2342 ("libxdamage" ,libxdamage)
2343 ("libxext" ,libxext)
2344 ("alsa-lib" ,alsa-lib)
2345 ("libvorbis" ,libvorbis)
2346 ("libtheora" ,libtheora)))
2347 (home-page "http://recordmydesktop.sourceforge.net/")
2348 (synopsis "Desktop session video recorder")
2350 "recordMyDesktop is a command-line tool that captures the activity in
2351 your graphical desktop and encodes it as a video. This is a useful tool for
2352 making @dfn{screencasts}.")
2353 (license license:gpl2+)))
2355 (define-public simplescreenrecorder
2357 (name "simplescreenrecorder")
2363 (url "https://github.com/MaartenBaert/ssr.git")
2365 (file-name (git-file-name name version))
2368 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2369 (build-system cmake-build-system)
2370 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2371 ;; README.md, the program builds and functions properly without them.
2372 ;; As a result, they are omitted. Please add them back if problems appear.
2374 `(("alsa-lib" ,alsa-lib)
2379 ("pulseaudio" ,pulseaudio)
2381 ("qtx11extras" ,qtx11extras)))
2382 (native-inputs `(("pkg-config" ,pkg-config)))
2385 (list "-DWITH_QT5=TRUE")
2386 #:tests? #f)) ; no test suite
2387 ;; Using HTTPS causes part of the page to be displayed improperly.
2388 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2389 (synopsis "Screen recorder")
2390 (description "SimpleScreenRecorder is an easy to use screen recorder with
2391 a graphical user interface. It supports recording the entire screen, or a
2392 part of it, and allows encoding in many different codecs and file formats.
2393 Other features include a live preview and live streaming.")
2394 (license (list license:gpl3+ ; most files
2395 license:zlib ; glinject/elfhacks.*
2396 license:isc ; glinject/*
2397 license:x11)))) ; build-aux/install-sh
2399 (define-public libsmpeg
2402 (version "0.4.5-401")
2406 (url "svn://svn.icculus.org/smpeg/trunk/")
2407 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2408 (file-name (string-append name "-" version "-checkout"))
2411 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2412 (build-system gnu-build-system)
2415 (modify-phases %standard-phases
2416 (add-after 'unpack 'autogen.sh
2418 (invoke "sh" "autogen.sh"))))))
2420 `(("autoconf" ,autoconf)
2421 ("automake" ,automake)))
2424 (home-page "http://icculus.org/smpeg/")
2425 (synopsis "SDL MPEG decoding library")
2427 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2428 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2429 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2430 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2431 and MPEG system streams.")
2432 (license (list license:expat
2438 (define-public libsmpeg-with-sdl1
2439 (package (inherit libsmpeg)
2441 (version "0.4.5-399")
2445 (url "svn://svn.icculus.org/smpeg/trunk/")
2446 (revision 399))) ; tagged release 0.4.5
2447 (file-name (string-append name "-" version "-checkout"))
2450 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2454 (define-public libbdplus
2461 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2462 version "/" name "-" version ".tar.bz2"))
2464 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2466 `(("libgcrypt" ,libgcrypt)))
2467 (build-system gnu-build-system)
2468 (home-page "https://www.videolan.org/developers/libbdplus.html")
2469 (synopsis "Library for decrypting certain Blu-Ray discs")
2470 (description "libbdplus is a library which implements the BD+ System
2472 (license license:lgpl2.1+)))
2474 (define-public libaacs
2481 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2482 version "/" name "-" version ".tar.bz2"))
2484 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2486 `(("libgcrypt" ,libgcrypt)))
2490 (build-system gnu-build-system)
2491 (home-page "https://www.videolan.org/developers/libaacs.html")
2492 (synopsis "Library for decrypting certain Blu-Ray discs")
2493 (description "libaacs is a library which implements the Advanced Access
2494 Content System specification.")
2495 (license license:lgpl2.1+)))
2497 (define-public mps-youtube
2499 (name "mps-youtube")
2505 (url "https://github.com/mps-youtube/mps-youtube.git")
2506 (commit (string-append "v" version))))
2507 (file-name (git-file-name name version))
2510 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2511 (build-system python-build-system)
2513 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2514 ;; test suite results differ depending on the country and also introduce
2515 ;; non-determinism in the tests.
2516 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2519 `(("python-pafy" ,python-pafy)
2520 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2521 (home-page "https://github.com/mps-youtube/mps-youtube")
2522 (synopsis "Terminal based YouTube player and downloader")
2524 "@code{mps-youtube} is based on mps, a terminal based program to
2525 search, stream and download music. This implementation uses YouTube as
2526 a source of content and can play and download video as well as audio.
2527 It can use either mpv or mplayer for playback, and for conversion of
2528 formats ffmpeg or libav is used. Users should install one of the
2529 supported players in addition to this package.")
2530 (license license:gpl3+)))
2532 (define-public handbrake
2538 (uri (string-append "https://download.handbrake.fr/releases/"
2539 version "/HandBrake-" version "-source.tar.bz2"))
2542 "03clkknaq3mz84p85cvr21gsy9b8vv2g4vvyfz44hz8la253jfqi"))
2543 (modules '((guix build utils)))
2545 ;; Remove "contrib" and source not necessary for
2546 ;; building/running under a GNU environment.
2548 (for-each delete-file-recursively
2549 '("contrib" "macosx" "win"))
2550 (substitute* "make/include/main.defs"
2551 ;; Disable unconditional inclusion of "contrib" libraries
2552 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2553 ;; which would lead to fetching and building of these
2554 ;; libraries. Use our own instead.
2555 (("MODULES \\+= contrib") "# MODULES += contrib"))
2557 (patches (search-patches "handbrake-opt-in-nvenc.patch"))))
2558 (build-system glib-or-gtk-build-system)
2560 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2561 ("autoconf" ,autoconf)
2562 ("cmake" ,cmake) ;TODO: could probably strip check from make/configure.py
2563 ("curl" ,curl) ;not actually used, but tested for
2564 ("intltool" ,intltool)
2565 ("libtool" ,libtool)
2566 ("pkg-config" ,pkg-config)
2567 ("python" ,python-2))) ;for configuration
2570 ("dbus-glib" ,dbus-glib)
2572 ("fontconfig" ,fontconfig)
2573 ("freetype" ,freetype)
2575 ("gstreamer" ,gstreamer)
2576 ("gst-plugins-base" ,gst-plugins-base)
2578 ("jansson" ,jansson)
2581 ("libbluray" ,libbluray)
2582 ("libdvdnav" ,libdvdnav)
2583 ("libdvdread" ,libdvdread)
2584 ("libgudev" ,libgudev)
2585 ("libmpeg2" ,libmpeg2)
2586 ("libnotify" ,libnotify)
2589 ("libsamplerate" ,libsamplerate)
2590 ("libtheora" ,libtheora)
2591 ("libvorbis" ,libvorbis)
2593 ("libxml2" ,libxml2)
2594 ("libx264" ,libx264)
2599 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2601 (list "--disable-gtk-update-checks"
2602 (string-append "CPPFLAGS=-I"
2603 (assoc-ref %build-inputs "libxml2")
2607 (modify-phases %standard-phases
2609 ;; Run bootstrap ahead of time so that shebangs get patched.
2611 (setenv "CONFIG_SHELL" (which "sh"))
2612 (setenv "NOCONFIGURE" "1")
2613 ;; Patch the Makefile so that it doesn't bootstrap again.
2614 (substitute* "gtk/module.rules"
2615 ((".*autogen\\.sh.*") ""))
2616 (invoke "sh" "./gtk/autogen.sh")))
2618 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2619 ;; 'configure' is not an autoconf-generated script, and
2620 ;; errors on unrecognized arguments,
2621 ;; e.g. --enable-fast-install
2622 (let ((out (assoc-ref outputs "out")))
2623 (apply invoke "./configure"
2624 (string-append "--prefix=" out)
2625 (or configure-flags '())))))
2626 (add-after 'configure 'chdir-build
2627 (lambda _ (chdir "./build") #t)))))
2628 (home-page "https://handbrake.fr")
2629 (synopsis "Video transcoder")
2631 "HandBrake is a tool for converting video from any format to a selection
2632 of modern, widely supported codecs.")
2633 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2634 ;; Combination under GPLv2. See LICENSE.
2635 (license license:gpl2)))
2637 (define-public openh264
2643 (uri (string-append "https://github.com/cisco/"
2644 name "/releases/download/v"
2645 version "/Source.Code.tar.gz.gz"))
2646 (file-name (string-append name "-" version ".tar.gz"))
2649 "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
2650 (build-system gnu-build-system)
2653 ("python" ,python)))
2655 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2657 #:test-target "test"
2658 #:phases (modify-phases %standard-phases
2659 ;; no configure script
2660 (delete 'configure))))
2661 (home-page "http://www.openh264.org/")
2662 (synopsis "H264 decoder library")
2664 "Openh264 is a library which can decode H264 video streams.")
2665 (license license:bsd-2)))
2667 (define-public libmp4v2
2674 ;; XXX: The new location of upstream is uncertain and will become relevant the
2675 ;; moment when the googlecode archive shuts down. It is past the date it
2676 ;; should've been turned off. I tried to communicate with upstream, but this
2677 ;; wasn't very responsive and not very helpful. The short summary is, it is
2678 ;; chaos when it comes to the amount of forks and only time will tell where
2679 ;; the new upstream location is.
2680 (uri (string-append "https://storage.googleapis.com/google-"
2681 "code-archive-downloads/v2/"
2682 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2683 (file-name (string-append name "-" version ".tar.bz2"))
2686 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2687 (build-system gnu-build-system)
2689 "static")) ; 3.7MiB .a file
2692 (modify-phases %standard-phases
2693 (add-after 'unpack 'remove-dates
2695 ;; Make the build reproducible.
2696 (substitute* "configure"
2697 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2698 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2700 (add-after 'install 'move-static-libraries
2701 (lambda* (#:key outputs #:allow-other-keys)
2702 ;; Move static libraries to the "static" output.
2703 (let* ((out (assoc-ref outputs "out"))
2704 (lib (string-append out "/lib"))
2705 (static (assoc-ref outputs "static"))
2706 (slib (string-append static "/lib")))
2708 (for-each (lambda (file)
2709 (install-file file slib)
2711 (find-files lib "\\.a$"))
2714 `(("help2man" ,help2man)
2715 ("dejagnu" ,dejagnu)))
2716 (home-page "https://code.google.com/archive/p/mp4v2/")
2717 (synopsis "API to create and modify mp4 files")
2719 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2720 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2721 file format that has been used as a multimedia file format in a variety of platforms and
2722 applications. It is a very powerful and extensible format that can accommodate
2723 practically any type of media.")
2724 (license license:mpl1.1)))
2726 (define-public libmediainfo
2728 (name "libmediainfo")
2732 (uri (string-append "https://mediaarea.net/download/source/"
2734 name "_" version ".tar.bz2"))
2737 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2738 ;; TODO add a Big Buck Bunny webm for tests.
2740 `(("autoconf" ,autoconf)
2741 ("automake" ,automake)
2742 ("libtool" ,libtool)
2743 ("pkg-config" ,pkg-config)
2745 ("tinyxml2" ,tinyxml2)
2747 ("libzen" ,libzen)))
2748 (build-system gnu-build-system)
2750 '(#:tests? #f ; see above TODO
2752 ;; build scripts not in root of archive
2753 (modify-phases %standard-phases
2754 (add-after 'unpack 'change-to-build-dir
2756 (chdir "Project/GNU/Library")
2758 (add-after 'change-to-build-dir 'autogen
2760 (invoke "sh" "autogen.sh"))))))
2761 (home-page "https://mediaarea.net/en/MediaInfo")
2762 (synopsis "Library for retrieving media metadata")
2763 (description "MediaInfo is a library used for retrieving technical
2764 information and other metadata about audio or video files. A non-exhaustive
2765 list of the information MediaInfo can retrieve from media files include:
2768 @item General: title, author, director, album, track number, date, duration...
2769 @item Video: codec, aspect, fps, bitrate...
2770 @item Audio: codec, sample rate, channels, language, bitrate...
2771 @item Text: language of subtitle
2772 @item Chapters: number of chapters, list of chapters
2775 MediaInfo supports the following formats:
2778 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2779 MPEG-2, MPEG-4, DVD (VOB)...
2780 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2781 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2782 @item Subtitles: SRT, SSA, ASS, SAMI...
2784 (license license:bsd-2)))
2786 ;; TODO also have a GUI version available
2787 (define-public mediainfo
2793 ;; Warning: This source has proved unreliable 1 time at least.
2794 ;; Consider an alternate source or report upstream if this
2796 (uri (string-append "https://mediaarea.net/download/source/"
2797 name "/" version "/"
2798 name "_" version ".tar.bz2"))
2801 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
2803 `(("autoconf" ,autoconf)
2804 ("automake" ,automake)
2805 ("libtool" ,libtool)
2806 ("pkg-config" ,pkg-config)
2808 ("libmediainfo" ,libmediainfo)
2809 ("libzen" ,libzen)))
2810 (build-system gnu-build-system)
2812 '(#:tests? #f ; lacks tests
2814 ;; build scripts not in root of archive
2815 (modify-phases %standard-phases
2816 (add-after 'unpack 'change-to-build-dir
2818 (chdir "Project/GNU/CLI")
2820 (home-page "https://mediaarea.net/en/MediaInfo")
2821 (synopsis "Utility for reading media metadata")
2822 (description "MediaInfo is a utility used for retrieving technical
2823 information and other metadata about audio or video files. It supports the
2824 many codecs and formats supported by libmediainfo.")
2825 (license license:bsd-2)))
2827 (define-public livemedia-utils
2829 (name "livemedia-utils")
2830 (version "2018.10.17")
2834 "https://download.videolan.org/contrib/live555/live."
2838 "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
2839 (modules '((guix build utils)))
2841 ;; As of glibc 2.26, <xlocale.h> no longer is.
2842 (substitute* "liveMedia/include/Locale.hh"
2843 (("xlocale\\.h") "locale.h"))
2845 (build-system gnu-build-system)
2847 '(#:tests? #f ; no tests
2848 #:make-flags (list "CC=gcc"
2849 (string-append "LDFLAGS=-Wl,-rpath="
2850 (assoc-ref %outputs "out") "/lib")
2851 (string-append "PREFIX="
2852 (assoc-ref %outputs "out")))
2853 #:phases (modify-phases %standard-phases
2854 (add-before 'configure 'fix-makefiles-generation
2856 (substitute* "genMakefiles"
2861 (invoke "./genMakefiles"
2862 "linux-with-shared-libraries"))))))
2863 (home-page "http://www.live555.com/liveMedia/")
2864 (synopsis "Set of C++ libraries for multimedia streaming")
2865 (description "This code forms a set of C++ libraries for multimedia
2866 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2867 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2868 JPEG video, and several audio codecs. They can easily be extended to support
2869 additional (audio and/or video) codecs, and can also be used to build basic
2870 RTSP or SIP clients and servers.")
2871 (license license:lgpl3+)))
2873 (define-public libdvbpsi
2880 "https://download.videolan.org/pub/libdvbpsi/"
2881 version "/libdvbpsi-" version ".tar.bz2"))
2884 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2885 (build-system gnu-build-system)
2886 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2887 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2889 (description "libdvbpsi is a simple library designed for decoding and
2890 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2891 and ITU-T H.222.0.")
2892 (license license:lgpl2.1)))
2894 (define-public ffms2
2898 (home-page "https://github.com/FFMS/ffms2")
2902 (url "https://github.com/FFMS/ffms2.git")
2904 (file-name (git-file-name name version))
2907 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
2908 (build-system gnu-build-system)
2911 (list "--enable-avresample")))
2915 `(("ffmpeg" ,ffmpeg)))
2917 `(("pkg-config" ,pkg-config)))
2918 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2920 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2921 programmers to access a standard API to open and decompress media files.")
2922 ;; sources are distributed under a different license that the binary.
2923 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2924 (license license:gpl2+))); inherits from ffmpeg
2926 (define-public aegisub
2933 "http://ftp.aegisub.org/pub/archives/releases/source/"
2934 name "-" version ".tar.xz"))
2937 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
2938 (patches (search-patches "aegisub-icu59-include-unistr.patch"
2939 "aegisub-boost68.patch"))))
2940 (build-system gnu-build-system)
2943 (list "--disable-update-checker"
2944 "--without-portaudio"
2947 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
2948 ;; tests require busted, a lua package we don't have yet
2951 (modify-phases %standard-phases
2952 (add-before 'configure 'fix-ldflags
2954 (setenv "LDFLAGS" "-pthread")
2956 (add-after 'unpack 'fix-boost-headers
2959 '("src/subtitles_provider_libass.cpp"
2960 "src/colour_button.cpp"
2961 "src/video_provider_dummy.cpp"
2962 "./src/video_frame.cpp")
2963 (("#include <boost/gil/gil_all.hpp>")
2964 "#include <boost/gil.hpp>"))
2968 ("desktop-file-utils" ,desktop-file-utils)
2971 ("hunspell" ,hunspell)
2974 ("alsa-lib" ,alsa-lib)
2975 ("pulseaudio" ,pulseaudio)
2977 ("freetype" ,freetype)
2978 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2980 `(("intltool" ,intltool)
2981 ("pkg-config" ,pkg-config)))
2982 (home-page "http://www.aegisub.org/")
2983 (synopsis "Subtitle engine")
2985 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2986 it quick and easy to time subtitles to audio, and features many powerful
2987 tools for styling them, including a built-in real-time video preview.")
2988 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2989 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2990 license:expat)))) ; and src/gl that is under a license similar
2991 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2992 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2993 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2995 (define-public gst-transcoder
2997 (name "gst-transcoder")
3003 (url "https://github.com/pitivi/gst-transcoder.git")
3005 (file-name (git-file-name name version))
3008 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3009 (build-system meson-build-system)
3011 `(("gobject-introspection" ,gobject-introspection)
3013 ("gstreamer" ,gstreamer)
3014 ("gst-plugins-base" ,gst-plugins-base)))
3016 `(("python" ,python)
3017 ("pkg-config" ,pkg-config)))
3018 (home-page "https://github.com/pitivi/gst-transcoder/")
3019 (synopsis "GStreamer Transcoding API")
3020 (description "GStreamer Transcoding API")
3021 (license license:lgpl2.1)))
3030 (uri (string-append "mirror://sourceforge/gmerlin/"
3031 name "/" version "/"
3032 name "-" version ".tar.gz"))
3033 (file-name (string-append name "-" version ".tar.gz"))
3036 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3037 (build-system gnu-build-system)
3039 '(#:configure-flags '("LIBS=-lm")))
3041 `(("pkg-config" ,pkg-config)
3042 ("doxygen" ,doxygen)))
3043 (home-page "http://gmerlin.sourceforge.net")
3044 (synopsis "Low level library for multimedia API building")
3046 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3047 library, upon which multimedia APIs can be built. Gavl handles all the
3048 details of audio and video formats like colorspaces, sample rates,
3049 multichannel configurations, etc. It provides standardized definitions for
3050 those formats as well as container structures for carrying audio samples or
3051 video images inside an application.
3053 In addition, it handles the sometimes ugly task of converting between all
3054 these formats and provides some elementary operations (copying, scaling,
3055 alpha blending etc).")
3056 (license license:gpl3)))
3058 (define-public frei0r-plugins
3060 (name "frei0r-plugins")
3065 (uri (string-append "https://files.dyne.org/frei0r/"
3066 "frei0r-plugins-" version ".tar.gz"))
3069 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
3070 (build-system gnu-build-system)
3073 (modify-phases %standard-phases
3074 (add-after 'unpack 'autotools
3076 (invoke "sh" "autogen.sh"))))))
3077 ;; TODO: opencv for additional face detection filters.
3082 `(("pkg-config" ,pkg-config)
3083 ("libtool" ,libtool)
3084 ("automake" ,automake)
3085 ("autoconf" ,autoconf)))
3086 (home-page "https://www.dyne.org/software/frei0r/")
3087 (synopsis "Minimalistic plugin API for video effects")
3089 "Frei0r is a minimalistic plugin API for video effects.
3090 The main emphasis is on simplicity for an API that will round up
3091 the most common video effects into simple filters, sources and
3092 mixers that can be controlled by parameters. Frei0r wants to
3093 provide a way to share these simple effects between many
3094 applications, avoiding their reimplementation by different projects.
3095 It counts more than 100 plugins.")
3096 (license (list license:gpl2+
3097 ;; The following files are licensed as LGPL2.1+:
3098 ;; src/generator/ising0r/ising0r.c
3099 ;; src/generator/onecol0r/onecol0r.cpp
3100 ;; src/generator/nois0r/nois0r.cpp
3101 ;; src/generator/lissajous0r/lissajous0r.cpp
3102 ;; src/filter/ndvi/gradientlut.hpp
3103 ;; src/filter/ndvi/ndvi.cpp
3104 ;; src/filter/facedetect/facedetect.cpp
3105 license:lgpl2.1+))))
3107 (define-public motion
3111 (home-page "https://motion-project.github.io/")
3115 (url "https://github.com/Motion-Project/motion.git")
3116 (commit (string-append "release-" version))))
3119 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3120 (file-name (git-file-name name version))))
3121 (build-system gnu-build-system)
3123 `(("autoconf" ,autoconf-wrapper)
3124 ("automake" ,automake)
3125 ("gettext" ,gettext-minimal)
3126 ("pkg-config" ,pkg-config)))
3128 `(("libjpeg" ,libjpeg)
3129 ("ffmpeg" ,ffmpeg-3.4)
3130 ("libmicrohttpd" ,libmicrohttpd)
3131 ("sqlite" ,sqlite)))
3133 '(#:phases (modify-phases %standard-phases
3136 (patch-shebang "version.sh")
3137 (invoke "autoreconf" "-vfi"))))
3138 #:configure-flags '("--sysconfdir=/etc")
3139 #:make-flags (list (string-append "sysconfdir="
3140 (assoc-ref %outputs "out")
3143 #:tests? #f)) ; no 'check' target
3144 (synopsis "Detect motion from video signals")
3146 "Motion is a program that monitors the video signal from one or more
3147 cameras and is able to detect if a significant part of the picture has
3148 changed. Or in other words, it can detect motion.")
3150 ;; Some files say "version 2" and others "version 2 or later".
3151 (license license:gpl2)))
3153 (define-public subdl
3154 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3158 (version (git-version "1.0.3" revision commit))
3162 (url "https://github.com/alexanderwink/subdl.git")
3164 (file-name (git-file-name name version))
3167 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3168 (build-system trivial-build-system)
3170 `(#:modules ((guix build utils))
3172 (use-modules (guix build utils))
3173 (let* ((out (assoc-ref %outputs "out"))
3174 (bin (string-append out "/bin"))
3175 (source (assoc-ref %build-inputs "source"))
3176 (python (assoc-ref %build-inputs "python")))
3177 (install-file (string-append source "/subdl") bin)
3178 (patch-shebang (string-append bin "/subdl")
3179 (list (string-append python "/bin")))))))
3180 (inputs `(("python" ,python)))
3181 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3182 (description "Subdl is a command-line tool for downloading subtitles from
3183 opensubtitles.org. By default, it will search for English subtitles, display
3184 the results, download the highest-rated result in the requested language and
3185 save it to the appropriate filename.")
3186 (license license:gpl3+)
3187 (home-page "https://github.com/alexanderwink/subdl"))))
3189 (define-public l-smash
3196 (url "https://github.com/l-smash/l-smash.git")
3197 (commit (string-append "v" version))))
3198 (file-name (git-file-name name version))
3201 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3202 (build-system gnu-build-system)
3204 `(#:tests? #f ;no tests
3206 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3207 (assoc-ref %outputs "out") "/lib"))
3209 (modify-phases %standard-phases
3210 ;; configure fails if it is followed by CONFIG_SHELL
3212 (lambda* (#:key outputs #:allow-other-keys)
3213 (let ((out (assoc-ref outputs "out")))
3214 (invoke "./configure" (string-append "--prefix=" out)
3215 "--disable-static")))))))
3217 `(("which" ,which)))
3218 (home-page "https://l-smash.github.io/l-smash/")
3219 (synopsis "MP4 multiplexer and demultiplexer library")
3221 "L-SMASH is a cross-platform library that handles the ISO base media file
3222 format and some of its derived file formats, including MP4. It operates as a
3223 multiplexer and demultiplexer, and can mux video and audio in several formats
3224 using standalone executable files.")
3225 (license license:isc)))
3227 (define-public qtfaststart
3229 (name "qtfaststart")
3233 (uri (pypi-uri "qtfaststart" version))
3236 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3237 (build-system python-build-system)
3239 '(#:tests? #f)) ; no test suite
3240 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3241 (description "qtfaststart enables streaming and pseudo-streaming of
3242 QuickTime and MP4 files by moving metadata and offset information to the
3243 beginning of the file. It can also print some useful information about the
3244 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3245 project, which is released into the public domain, as well as ISO 14496-12:2005
3246 (the official spec for MP4), which can be obtained from the ISO or found
3248 (home-page "https://github.com/danielgtaylor/qtfaststart")
3249 (license license:expat)))
3251 (define-public vidstab
3258 (url "https://github.com/georgmartius/vid.stab.git")
3259 (commit (string-append "v" version))))
3260 (file-name (git-file-name name version))
3263 "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
3264 (build-system cmake-build-system)
3266 '(#:tests? #f)) ; tests are not run as part of standard build process
3267 (home-page "http://public.hronopik.de/vid.stab/")
3268 (synopsis "Video stabilization library")
3269 (description "Vidstab is a video stabilization library which can be used
3270 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3271 vehicle typically suffers from undesirable shakes and jitters. Activities such
3272 as surfing, skiing, riding and walking while shooting videos are especially
3273 prone to erratic camera shakes. Vidstab targets these video contents to help
3274 create smoother and stable videos.")
3275 (license license:gpl2+)))
3277 (define-public libopenshot
3279 (name "libopenshot")
3284 (url "https://github.com/OpenShot/libopenshot")
3285 (commit (string-append "v" version))))
3286 (file-name (git-file-name name version))
3289 "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
3290 (modules '((guix build utils)))
3292 ;; Allow overriding of the python installation dir
3293 (substitute* "src/bindings/python/CMakeLists.txt"
3294 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3295 (string-append set " CACHE PATH "
3296 "\"Python bindings directory\")")))
3297 (delete-file-recursively "thirdparty")
3299 (patches (search-patches "libopenshot-fixup-tests.patch"
3300 "libopenshot-tests-with-system-libs.patch"))))
3301 (build-system cmake-build-system)
3303 `(("pkg-config" ,pkg-config)
3306 ("unittest++" ,unittest-cpp)))
3307 (propagated-inputs ;all referenced in installed headers
3308 `(("cppzmq" ,cppzmq)
3310 ("imagemagick" ,imagemagick)
3311 ("jsoncpp" ,jsoncpp)
3312 ("libopenshot-audio" ,libopenshot-audio)
3314 ("qtmultimedia" ,qtmultimedia)
3315 ("zeromq" ,zeromq)))
3318 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3319 ,(version-major+minor (package-version python))
3321 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3323 (modify-phases %standard-phases
3324 (add-before 'configure 'set-vars
3325 (lambda* (#:key inputs #:allow-other-keys)
3326 (setenv "LIBOPENSHOT_AUDIO_DIR"
3327 (assoc-ref inputs "libopenshot-audio"))
3329 (assoc-ref inputs "zeromq"))
3330 (setenv "UNITTEST_DIR"
3331 (string-append (assoc-ref inputs "unittest++")
3332 "/include/UnitTest++"))
3334 (home-page "https://openshot.org")
3335 (synopsis "Video-editing, animation, and playback library")
3336 (description "OpenShot Library (libopenshot) is a powerful C++ video
3337 editing library with a multi-threaded and feature rich video editing
3338 API. It includes bindings for Python, Ruby, and other languages.")
3339 (license license:lgpl3+)))
3341 (define-public openshot
3348 (url "https://github.com/OpenShot/openshot-qt")
3349 (commit (string-append "v" version))))
3350 (file-name (git-file-name name version))
3353 "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
3354 (build-system python-build-system)
3356 `(("ffmpeg" ,ffmpeg)
3357 ("libopenshot" ,libopenshot)
3359 ("python-pyqt" ,python-pyqt)
3360 ("python-pyzmq" ,python-pyzmq)
3361 ("python-requests" ,python-requests)
3364 `(#:tests? #f ;no tests
3365 #:phases (modify-phases %standard-phases
3366 (delete 'build) ;install phase does all the work
3367 (add-before 'install 'set-tmp-home
3369 ;; src/classes/info.py "needs" to create several
3370 ;; directories in $HOME when loaded during build
3371 (setenv "HOME" "/tmp")
3373 (add-after 'install 'wrap-program
3374 (lambda* (#:key inputs outputs #:allow-other-keys)
3375 (wrap-program (string-append (assoc-ref outputs "out")
3377 `("QT_PLUGIN_PATH" prefix
3378 ,(list (string-append (assoc-ref inputs "qtsvg")
3379 "/lib/qt5/plugins/")))))))))
3380 (home-page "https://openshot.org")
3381 (synopsis "Video editor")
3382 (description "OpenShot takes your videos, photos, and music files and
3383 helps you create the film you have always dreamed of. Easily add sub-titles,
3384 transitions, and effects and then export your film to many common formats.")
3385 (license license:gpl3+)))
3387 (define-public dav1d
3394 (uri (list ;; The canonical download site
3395 (string-append "https://downloads.videolan.org/pub/videolan/"
3396 "dav1d/" version "/dav1d-" version ".tar.xz")
3398 ;; Auto-generated tarballs from the Git repo?
3399 (string-append "https://code.videolan.org/videolan/dav1d/-/"
3400 "archive/" version "/dav1d-" version ".tar.bz2")))
3403 "0q0dbbl91syjnkygz268gh4b7mdcgl6hldj300a4cbqidsadpl5p"))))
3404 (build-system meson-build-system)
3405 (native-inputs `(("nasm" ,nasm)))
3406 (home-page "https://code.videolan.org/videolan/dav1d")
3407 (synopsis "AV1 decoder")
3408 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3409 speed and correctness.")
3410 (license license:bsd-2)))
3412 (define-public wlstream
3413 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3417 (version (git-version "0.0" revision commit))
3422 (url "https://github.com/atomnuker/wlstream.git")
3424 (file-name (git-file-name name version))
3427 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3428 (build-system meson-build-system)
3429 (native-inputs `(("libdrm" ,libdrm)
3430 ("pkg-config" ,pkg-config)))
3431 (inputs `(("ffmpeg" ,ffmpeg)
3432 ("pulseaudio" ,pulseaudio)
3433 ("wayland" ,wayland)
3434 ("wayland-protocols" ,wayland-protocols)))
3435 (home-page "https://github.com/atomnuker/wlstream")
3436 (synopsis "Screen capture tool for Wayland sessions")
3437 (description "Wlstream is a screen capture tool for recording audio and
3438 video from a Wayland session.")
3439 (license license:lgpl2.1+))))