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 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>
37 ;;; This file is part of GNU Guix.
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
52 (define-module (gnu packages video)
53 #:use-module (ice-9 match)
54 #:use-module (srfi srfi-1)
55 #:use-module (srfi srfi-26)
56 #:use-module ((guix licenses) #:prefix license:)
57 #:use-module (guix utils)
58 #:use-module (guix packages)
59 #:use-module (guix download)
60 #:use-module (guix git-download)
61 #:use-module (guix svn-download)
62 #:use-module (guix build-system cmake)
63 #:use-module (guix build-system gnu)
64 #:use-module (guix build-system glib-or-gtk)
65 #:use-module (guix build-system meson)
66 #:use-module (guix build-system perl)
67 #:use-module (guix build-system python)
68 #:use-module (guix build-system waf)
69 #:use-module (guix build-system trivial)
70 #:use-module (gnu packages)
71 #:use-module (gnu packages algebra)
72 #:use-module (gnu packages assembly)
73 #:use-module (gnu packages audio)
74 #:use-module (gnu packages autotools)
75 #:use-module (gnu packages avahi)
76 #:use-module (gnu packages backup)
77 #:use-module (gnu packages base)
78 #:use-module (gnu packages bison)
79 #:use-module (gnu packages boost)
80 #:use-module (gnu packages cdrom)
81 #:use-module (gnu packages check)
82 #:use-module (gnu packages cmake)
83 #:use-module (gnu packages compression)
84 #:use-module (gnu packages cpp)
85 #:use-module (gnu packages curl)
86 #:use-module (gnu packages dejagnu)
87 #:use-module (gnu packages dns)
88 #:use-module (gnu packages docbook)
89 #:use-module (gnu packages documentation)
90 #:use-module (gnu packages elf)
91 #:use-module (gnu packages file)
92 #:use-module (gnu packages flex)
93 #:use-module (gnu packages fontutils)
94 #:use-module (gnu packages freedesktop)
95 #:use-module (gnu packages fribidi)
96 #:use-module (gnu packages gettext)
97 #:use-module (gnu packages ghostscript)
98 #:use-module (gnu packages gl)
99 #:use-module (gnu packages glib)
100 #:use-module (gnu packages guile)
101 #:use-module (gnu packages gnome)
102 #:use-module (gnu packages gnunet)
103 #:use-module (gnu packages gnupg)
104 #:use-module (gnu packages gstreamer)
105 #:use-module (gnu packages gtk)
106 #:use-module (gnu packages image)
107 #:use-module (gnu packages imagemagick)
108 #:use-module (gnu packages iso-codes)
109 #:use-module (gnu packages libidn)
110 #:use-module (gnu packages libreoffice)
111 #:use-module (gnu packages linux)
112 #:use-module (gnu packages lua)
113 #:use-module (gnu packages m4)
114 #:use-module (gnu packages man)
115 #:use-module (gnu packages mp3)
116 #:use-module (gnu packages ncurses)
117 #:use-module (gnu packages networking)
118 #:use-module (gnu packages ocr)
119 #:use-module (gnu packages perl)
120 #:use-module (gnu packages pkg-config)
121 #:use-module (gnu packages popt)
122 #:use-module (gnu packages protobuf)
123 #:use-module (gnu packages pulseaudio)
124 #:use-module (gnu packages python)
125 #:use-module (gnu packages python-crypto)
126 #:use-module (gnu packages python-web)
127 #:use-module (gnu packages python-xyz)
128 #:use-module (gnu packages qt)
129 #:use-module (gnu packages rdesktop)
130 #:use-module (gnu packages ruby)
131 #:use-module (gnu packages samba)
132 #:use-module (gnu packages sdl)
133 #:use-module (gnu packages serialization)
134 #:use-module (gnu packages shells)
135 #:use-module (gnu packages sqlite)
136 #:use-module (gnu packages ssh)
137 #:use-module (gnu packages swig)
138 #:use-module (gnu packages texinfo)
139 #:use-module (gnu packages textutils)
140 #:use-module (gnu packages tls)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages upnp)
143 #:use-module (gnu packages version-control)
144 #:use-module (gnu packages vulkan)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages webkit)
147 #:use-module (gnu packages wxwidgets)
148 #:use-module (gnu packages xdisorg)
149 #:use-module (gnu packages xiph)
150 #:use-module (gnu packages xml)
151 #:use-module (gnu packages xorg))
159 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
160 version "/" name "-" version ".tar.gz"))
163 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
164 (build-system gnu-build-system)
166 `(("makeinfo" ,texinfo)))
168 `(("ncurses" ,ncurses)))
171 (modify-phases %standard-phases
173 (lambda* (#:key build inputs outputs #:allow-other-keys)
174 ;; This old `configure' script doesn't support
175 ;; variables passed as arguments.
176 (let ((out (assoc-ref outputs "out"))
177 (ncurses (assoc-ref inputs "ncurses")))
178 (setenv "CONFIG_SHELL" (which "bash"))
179 (invoke "./configure"
180 (string-append "--prefix=" out)
181 (string-append "--build=" build)
182 ;; The ancient config.guess is unable to
183 ;; guess the host triplet on mips64el.
184 ,@(if (string=? "mips64el-linux"
186 '("--host=mips64el-unknown-linux-gnu")
188 ;; The same is also true with aarch64.
189 ,@(if (string=? "aarch64-linux"
191 '("--host=aarch64-unknown-linux-gnu")
193 (string-append "--with-ncurses="
195 (home-page "http://aa-project.sourceforge.net/aalib/")
196 (synopsis "ASCII-art library")
198 "AA-lib is a low level gfx library which does not require graphics device.
199 In fact, there is no graphical output possible. AA-lib replaces those
200 old-fashioned output methods with powerful ascii-art renderer.")
201 (license license:lgpl2.0+)))
203 (define-public liba52
210 ;; A mirror://sourceforge URI doesn't work, presumably
211 ;; because the SourceForge project is misconfigured.
212 "http://liba52.sourceforge.net/files/a52dec-" version
216 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
217 (patches (search-patches "liba52-enable-pic.patch"
218 "liba52-set-soname.patch"
219 "liba52-use-mtune-not-mcpu.patch"
220 "liba52-link-with-libm.patch"))))
221 (build-system gnu-build-system)
222 ;; XXX We need to run ./bootstrap because of the build system fixes above.
224 `(("autoconf" ,autoconf)
225 ("automake" ,automake)
226 ("libtool" ,libtool)))
227 (arguments `(#:configure-flags '("--enable-shared")
229 (modify-phases %standard-phases
230 ;; XXX We need to run ./bootstrap because of the build
231 ;; system fixes above.
233 (lambda _ (invoke "sh" "bootstrap"))))))
234 (home-page "http://liba52.sourceforge.net/")
235 (synopsis "ATSC A/52 stream decoder")
236 (description "liba52 is a library for decoding ATSC A/52 streams. The
237 A/52 standard is used in a variety of applications, including digital
238 television and DVD. It is also known as AC-3.")
239 (license license:gpl2+)))
241 (define-public libmpeg2
247 ;; A mirror://sourceforge URI doesn't work, presumably
248 ;; because the SourceForge project is misconfigured.
249 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
250 name "-" version ".tar.gz"))
253 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
261 (build-system gnu-build-system)
262 (home-page "http://libmpeg2.sourceforge.net/")
263 (synopsis "MPEG1 and MPEG2 video decoder library")
265 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
266 (license license:gpl2+)))
268 (define-public libx264
271 (version "20180810-2245")
274 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
275 "x264-snapshot-" version "-stable.tar.bz2"))
278 "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv"))))
279 (build-system gnu-build-system)
281 `(("pkg-config" ,pkg-config)
283 ;; TODO: Add gpac input
285 `(#:tests? #f ;no check target
286 #:configure-flags '("--enable-shared"
287 ;; Don't build the command-line program. If we
288 ;; want it later, we should do so in a different
289 ;; package to avoid a circular dependency (the x264
290 ;; program depends on ffmpeg and ffmpeg depends on
294 ;; On MIPS, we must pass "--disable-asm" or else
295 ;; configure fails after printing: "You specified a
296 ;; pre-MSA CPU in your CFLAGS. If you really want
297 ;; to run on such a CPU, configure with
299 ,@(if (string-prefix? "mips"
300 (or (%current-target-system)
304 (home-page "https://www.videolan.org/developers/x264.html")
305 (synopsis "H.264 video coding library")
306 (description "libx264 is an advanced encoding library for creating
307 H.264 (MPEG-4 AVC) video streams.")
308 (license (list license:gpl2+ ;most files
309 license:isc ;common/x86/x86inc.asm
310 license:lgpl2.1+ ;extras/getopt.c
311 license:bsd-3 ;extras/inttypes.h
312 (license:non-copyleft ;extras/cl*.h
314 "See extras/cl.h in the distribution.")))))
316 (define-public mkvtoolnix
323 (uri (string-append "https://mkvtoolnix.download/sources/"
324 name "-" version ".tar.xz"))
327 "0d8va2iamzc7y3wi71z8mk2vnqvnkgwb2p7casdfp37400x8r2pr"))
328 (modules '((guix build utils)))
330 ;; Delete bundled libraries.
331 (for-each delete-file-recursively
338 (build-system gnu-build-system)
345 ("libmatroska" ,libmatroska)
347 ("libvorbis" ,libvorbis)
354 `(("docbook-xsl" ,docbook-xsl)
355 ("gettext" ,gettext-minimal)
356 ("googletest" ,googletest)
358 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
360 ("pkg-config" ,pkg-config)
365 (list (string-append "--with-boost="
366 (assoc-ref %build-inputs "boost"))
367 (string-append "--with-docbook-xsl-root="
368 (assoc-ref %build-inputs "docbook-xsl")
369 "/xml/xsl/docbook-xsl-"
370 ,(package-version docbook-xsl))
371 "--enable-update-check=no"
372 "--enable-precompiled-headers=no")
374 (modify-phases %standard-phases
375 (add-before 'configure 'add-googletest
376 (lambda* (#:key inputs #:allow-other-keys)
378 (string-append (assoc-ref inputs "googletest")
379 "/include/gtest") "lib/gtest")
383 (let ((-j (list "-j" (number->string (parallel-job-count)))))
384 (apply invoke "rake" -j))))
387 (invoke "rake" "tests/unit")))
390 (invoke "rake" "install"))))))
391 (home-page "https://mkvtoolnix.download")
392 (synopsis "Tools to create, alter and inspect Matroska files")
394 "MKVToolNix provides tools for getting information about Matroska files
395 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
396 and creating Matroska files from other media files (@code{mkvmerge}).")
397 (license license:gpl2)))
403 (outputs '("out" "static"))
407 (uri (string-append "https://download.videolan.org/videolan/x265/"
408 "x265_" version ".tar.gz"))
411 "0qh65wdpasrspkm1y0dlfa123myax568yi0sas0lmg5b1hkgrff5"))
412 (patches (search-patches "x265-arm-flags.patch"))
413 (modules '((guix build utils)))
415 (delete-file-recursively "source/compat/getopt")
417 (build-system cmake-build-system)
419 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
421 ;; Ensure position independent code for everyone.
422 (list "-DENABLE_PIC=TRUE"
423 ,@(if (string-prefix? "armhf" (or (%current-system)
424 (%current-target-system)))
425 '("-DENABLE_ASSEMBLY=OFF")
427 (string-append "-DCMAKE_INSTALL_PREFIX="
428 (assoc-ref %outputs "out")))
430 (modify-phases %standard-phases
431 (add-after 'unpack 'prepare-build
433 (delete-file-recursively "build")
435 ;; recognize armv8 in 32-bit mode as ARM
436 (substitute* "CMakeLists.txt"
437 (("armv6l") "armv8l"))
439 (add-before 'configure 'build-12-bit
440 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
441 (mkdir "../build-12bit")
442 (with-directory-excursion "../build-12bit"
445 "-DHIGH_BIT_DEPTH=ON"
450 (substitute* (cons "cmake_install.cmake"
452 (find-files "CMakeFiles/x265-shared.dir" ".")
453 (find-files "CMakeFiles/x265-static.dir" ".")))
454 (("libx265") "libx265_main12"))
456 (add-before 'configure 'build-10-bit
457 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
458 (mkdir "../build-10bit")
459 (with-directory-excursion "../build-10bit"
462 "-DHIGH_BIT_DEPTH=ON"
466 (substitute* (cons "cmake_install.cmake"
468 (find-files "CMakeFiles/x265-shared.dir" ".")
469 (find-files "CMakeFiles/x265-static.dir" ".")))
470 (("libx265") "libx265_main10"))
472 (add-after 'install 'install-more-libs
474 (with-directory-excursion "../build-12bit"
475 (invoke "make" "install"))
476 (with-directory-excursion "../build-10bit"
477 (invoke "make" "install"))))
478 (add-before 'strip 'move-static-libs
479 (lambda* (#:key outputs #:allow-other-keys)
480 (let ((out (assoc-ref outputs "out"))
481 (static (assoc-ref outputs "static")))
482 (mkdir-p (string-append static "/lib"))
483 (with-directory-excursion
484 (string-append out "/lib")
488 (string-append static "/lib/" file)))
489 (find-files "." "\\.a$"))))
491 (home-page "http://x265.org/")
492 (synopsis "Library for encoding h.265/HEVC video streams")
493 (description "x265 is a H.265 / HEVC video encoder application library,
494 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
495 (license license:gpl2+)))
497 (define-public libass
504 "https://github.com/libass/libass/releases/download/"
505 version "/libass-" version ".tar.xz"))
508 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
509 (build-system gnu-build-system)
511 `(("pkg-config" ,pkg-config)
514 `(("freetype" ,freetype)
516 ("fontconfig" ,fontconfig)
517 ("harfbuzz" ,harfbuzz)
519 (home-page "https://github.com/libass/libass")
520 (synopsis "Subtitle rendering library for the ASS/SSA format")
521 (description "libass is a subtitle rendering library for the
522 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
523 (license license:isc)))
525 (define-public libcaca
528 (version "0.99.beta19")
531 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
535 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
536 (build-system gnu-build-system)
537 (native-inputs `(("pkg-config" ,pkg-config)))
539 `(("freeglut" ,freeglut)
546 (home-page "http://caca.zoy.org/wiki/libcaca")
547 (synopsis "Colour ASCII-art library")
548 (description "libcaca is a graphics library that outputs text instead of
549 pixels, so that it can work on older video cards or text terminals. It
550 supports Unicode, 2048 colors, dithering of color images, and advanced text
552 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
554 (define-public libdca
561 "https://download.videolan.org/pub/videolan/libdca/"
562 version "/libdca-" version ".tar.bz2"))
565 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
566 (build-system gnu-build-system)
567 (home-page "https://www.videolan.org/developers/libdca.html")
568 (synopsis "DTS Coherent Acoustics decoder")
569 (description "libdca is a library for decoding DTS Coherent Acoustics
571 (license license:gpl2+)))
580 "mirror://sourceforge/" name "/" name "/"
581 version "/" name "-" version ".tar.gz"))
584 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
585 (build-system gnu-build-system)
586 (native-inputs `(("pkg-config" ,pkg-config)))
587 (inputs `(("libxv" ,libxv)))
588 (home-page "http://libdv.sourceforge.net/")
589 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
590 (description "The Quasar DV codec (libdv) is a software codec for DV
591 video, the encoding format used by most digital camcorders, typically those
592 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
593 developed according to the official standards for DV video: IEC 61834 and
595 (license license:lgpl2.1+)))
597 (define-public libmatroska
604 (uri (string-append "https://dl.matroska.org/downloads/"
605 name "/" name "-" version ".tar.xz"))
608 "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
609 (build-system cmake-build-system)
611 `(("libebml" ,libebml)))
614 (list "-DBUILD_SHARED_LIBS=YES")
615 #:tests? #f)) ; no test suite
616 (home-page "https://www.matroska.org")
617 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
619 "Matroska aims to become the standard of multimedia container formats.
620 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
621 of XML. EBML enables the Matroska Development Team to gain significant
622 advantages in terms of future format extensibility, without breaking file
623 support in old parsers.
624 libebml is a C++ library to read and write EBML files.")
625 (license license:lgpl2.1)))
635 ;; Newer releases are only available on GitHub.
636 (string-append "https://github.com/01org/libva/releases/download/"
637 version "/libva-" version ".tar.bz2")
638 ;; Keep the old URL around for compatibility.
639 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
640 "libva/libva-" version "/libva-" version ".tar.bz2")))
642 (base32 "1r6wiw4k044cpb39rfqqdw6qmzw0268whpz124hywck9v980x130"))))
643 (build-system gnu-build-system)
645 `(("pkg-config" ,pkg-config)))
650 ("libxfixes" ,libxfixes)
652 ("wayland" ,wayland)))
655 (modify-phases %standard-phases
657 'build 'fix-dlopen-paths
658 (lambda* (#:key outputs #:allow-other-keys)
659 (let ((out (assoc-ref outputs "out")))
660 (substitute* "va/drm/va_drm_auth_x11.c"
661 (("\"libva-x11\\.so\\.%d\"")
662 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
664 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
665 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
667 (list (string-append "--with-drivers-path="
668 (assoc-ref %build-inputs "mesa") "/lib/dri"))
669 ;; However, we can't write to mesa's store directory, so override the
670 ;; following make variable to install the dummy driver to libva's
671 ;; $prefix/lib/dri directory.
673 (list (string-append "dummy_drv_video_ladir="
674 (assoc-ref %outputs "out") "/lib/dri"))))
675 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
676 (synopsis "Video acceleration library")
677 (description "The main motivation for VA-API (Video Acceleration API) is
678 to enable hardware accelerated video decode/encode at various
679 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
680 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
681 (license license:expat)))
683 (define-public ffmpeg
689 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
693 "11id9pm4azfrhpa4vr2yaw31dzgd55kl1zsxwn24sczx9n14jdrp"))))
694 (build-system gnu-build-system)
696 `(("fontconfig" ,fontconfig)
697 ("freetype" ,freetype)
698 ("frei0r-plugins" ,frei0r-plugins)
704 ("libbluray" ,libbluray)
706 ("libcdio-paranoia" ,libcdio-paranoia)
708 ("libtheora" ,libtheora)
710 ("libvdpau" ,libvdpau)
711 ("libvorbis" ,libvorbis)
717 ("pulseaudio" ,pulseaudio)
729 ("pkg-config" ,pkg-config)
731 ("python" ,python-2) ; scripts use interpreter python2
735 `(#:test-target "fate"
737 ;; possible additional inputs:
738 ;; --enable-avisynth enable reading of AviSynth script
740 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
741 ;; --enable-libcelt enable CELT decoding via libcelt [no]
742 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
743 ;; and libraw1394 [no]
744 ;; --enable-libfaac enable AAC encoding via libfaac [no]
745 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
746 ;; --enable-libflite enable flite (voice synthesis) support via
748 ;; --enable-libgme enable Game Music Emu via libgme [no]
749 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
750 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
751 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
752 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
753 ;; --enable-libnut enable NUT (de)muxing via libnut,
754 ;; native (de)muxer exists [no]
755 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
756 ;; libopencore-amrnb [no]
757 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
758 ;; libopencore-amrwb [no]
759 ;; --enable-libopencv enable video filtering via libopencv [no]
760 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
762 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
763 ;; --enable-libschroedinger enable Dirac de/encoding via
764 ;; libschroedinger [no]
765 ;; --enable-libshine enable fixed-point MP3 encoding via
767 ;; --enable-libssh enable SFTP protocol via libssh [no]
768 ;; (libssh2 does not work)
769 ;; --enable-libstagefright-h264 enable H.264 decoding via
770 ;; libstagefright [no]
771 ;; --enable-libutvideo enable Ut Video encoding and decoding via
773 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
774 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
775 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
776 ;; libvo-amrwbenc [no]
777 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
778 ;; --enable-libxavs enable AVS encoding via xavs [no]
779 ;; --enable-libzmq enable message passing via libzmq [no]
780 ;; --enable-libzvbi enable teletext support via libzvbi [no]
781 ;; --enable-opencl enable OpenCL code
782 '("--enable-avresample"
783 "--enable-gpl" ; enable optional gpl licensed parts
786 "--enable-fontconfig"
793 "--enable-libfreetype"
794 "--enable-libmp3lame"
800 "--enable-libtwolame"
801 "--enable-libvidstab"
811 "--enable-runtime-cpudetect"
813 ;; The HTML pages take 7.2 MiB
814 "--disable-htmlpages"
816 ;; The static libraries are 23 MiB
819 ;; Runtime cpu detection is not implemented on
820 ;; MIPS, so we disable some features.
823 "--disable-mipsdspr2"
826 (modify-phases %standard-phases
829 ;; configure does not work followed by "SHELL=..." and
830 ;; "CONFIG_SHELL=..."; set environment variables instead
831 (lambda* (#:key outputs configure-flags #:allow-other-keys)
832 (let ((out (assoc-ref outputs "out")))
833 (substitute* "configure"
834 (("#! /bin/sh") (string-append "#!" (which "sh"))))
835 (setenv "SHELL" (which "bash"))
836 (setenv "CONFIG_SHELL" (which "bash"))
839 (string-append "--prefix=" out)
840 ;; Add $libdir to the RUNPATH of all the binaries.
841 (string-append "--extra-ldflags=-Wl,-rpath="
845 'check 'set-ld-library-path
847 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
849 (let* ((dso (find-files "." "\\.so$"))
850 (path (string-join (map dirname dso) ":")))
851 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
852 (setenv "LD_LIBRARY_PATH" path)
854 (home-page "https://www.ffmpeg.org/")
855 (synopsis "Audio and video framework")
856 (description "FFmpeg is a complete, cross-platform solution to record,
857 convert and stream audio and video. It includes the libavcodec
858 audio/video codec library.")
859 (license license:gpl2+)))
861 (define-public ffmpeg-3.4
867 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
871 "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))))
873 (define-public ffmpeg-for-stepmania
882 (url "https://github.com/stepmania/ffmpeg.git")
883 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
885 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
886 (file-name (git-file-name "ffmpeg" version))))
888 (substitute-keyword-arguments (package-arguments ffmpeg)
889 ((#:configure-flags flags)
890 '(list "--disable-programs"
894 "--disable-swresample"
898 "--enable-static"))))
901 (define-public ffmpegthumbnailer
903 (name "ffmpegthumbnailer")
908 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
910 (file-name (git-file-name name version))
913 "0kl8aa547icy9b05njps02a8sw4yn4f8fzs228kig247sn09s4cp"))))
914 (build-system cmake-build-system)
916 `(("pkg-config" ,pkg-config)))
919 ("libjpeg-turbo" ,libjpeg-turbo)
923 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
924 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
925 (synopsis "Create thumbnails from video files")
926 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
927 can be used by file managers to create thumbnails for your video files. The
928 thumbnailer uses ffmpeg to decode frames from the video files, so supported
929 videoformats depend on the configuration flags of ffmpeg.")
930 (license license:gpl2+)))
939 "https://download.videolan.org/pub/videolan/vlc/"
940 (car (string-split version #\-))
941 "/vlc-" version ".tar.xz"))
944 "1lvyyahv6g9zv7m5g5qinyrwmw47zdsd5ysimb862j7kw15nvh8q"))))
945 (build-system gnu-build-system)
949 ("gettext" ,gettext-minimal)
950 ("git" ,git) ; needed for a test
951 ("pkg-config" ,pkg-config)))
952 ;; FIXME: Add optional inputs once available.
954 `(("alsa-lib" ,alsa-lib)
960 ("fontconfig" ,fontconfig)
961 ("freetype" ,freetype)
965 ("libarchive" ,libarchive)
967 ("libavc1394" ,libavc1394)
968 ("libbluray" ,libbluray)
972 ("libdvbpsi" ,libdvbpsi)
973 ("libdvdnav" ,libdvdnav)
974 ("libdvdread" ,libdvdread)
976 ("libgcrypt" ,libgcrypt)
980 ("libmatroska" ,libmatroska)
981 ("libmicrodns" ,libmicrodns)
982 ("libmodplug" ,libmodplug)
983 ("libmpeg2" ,libmpeg2)
986 ("libraw1394" ,libraw1394)
988 ("libsamplerate" ,libsamplerate)
989 ("libsecret" ,libsecret)
993 ("libvdpau" ,libvdpau)
994 ("libvorbis" ,libvorbis)
995 ("libvpx" ,libvpx-1.7)
996 ("libtheora" ,libtheora)
1000 ("libxinerama" ,libxinerama)
1001 ("libxml2" ,libxml2)
1003 ("livemedia-utils" ,livemedia-utils)
1008 ("pulseaudio" ,pulseaudio)
1009 ("protobuf" ,protobuf)
1010 ("python" ,python-wrapper)
1013 ("qtx11extras" ,qtx11extras)
1016 ("sdl-image" ,sdl-image)
1018 ("speexdsp" ,speexdsp)
1020 ("twolame" ,twolame)
1022 ("wayland" ,wayland)
1023 ("wayland-protocols" ,wayland-protocols)
1025 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1028 `("CXXFLAGS=-std=gnu++11"
1030 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1031 (assoc-ref %build-inputs "ffmpeg")
1032 "/lib")) ;needed for the tests
1035 (modify-phases %standard-phases
1036 (add-after 'unpack 'patch-source
1037 (lambda* (#:key inputs #:allow-other-keys)
1038 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1039 (substitute* "configure"
1040 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1041 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1042 ;; Some of the tests require using the display to test out VLC,
1043 ;; which fails in our sandboxed build system
1044 (substitute* "test/run_vlc.sh"
1045 (("./vlc --ignore-config") "echo"))
1047 ;; modules/text_renderer/freetype/text_layout.c uses a
1048 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1049 ;; from fribidi.h, so for now we enable the use of deprecated
1050 ;; fribidi interfaces from this file.
1051 ;; FIXME: Try removing this for vlc >= 3.0.3.
1052 (substitute* "modules/text_renderer/freetype/text_layout.c"
1053 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1055 ;; Fix build against Qt 5.11.
1056 (substitute* "modules/gui/qt/actions_manager.cpp"
1057 (("#include <vlc_keys.h>") "#include <vlc_keys.h>
1058 #include <QAction>"))
1059 (substitute* "modules/gui/qt/components/simple_preferences.cpp"
1060 (("#include <QFont>") "#include <QFont>
1061 #include <QButtonGroup>"))
1063 (add-after 'strip 'regenerate-plugin-cache
1064 (lambda* (#:key outputs #:allow-other-keys)
1065 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1066 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1067 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1068 ;; it references. Thus, we first reset the timestamps of all
1069 ;; these files, and then regenerate the cache such that the
1070 ;; mtimes it includes are always zero instead of being dependent
1071 ;; on the build time.
1072 (let* ((out (assoc-ref outputs "out"))
1073 (pkglibdir (string-append out "/lib/vlc"))
1074 (plugindir (string-append pkglibdir "/plugins"))
1075 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1076 ;; TODO: Factorize 'reset-timestamps'.
1077 (for-each (lambda (file)
1078 (let ((s (lstat file)))
1079 (unless (eq? (stat:type s) 'symlink)
1081 (find-files plugindir))
1082 (invoke cachegen plugindir))))
1083 (add-after 'install 'wrap-executable
1084 (lambda* (#:key outputs #:allow-other-keys)
1085 (let ((out (assoc-ref outputs "out"))
1086 (plugin-path (getenv "QT_PLUGIN_PATH")))
1087 (wrap-program (string-append out "/bin/vlc")
1088 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1090 (home-page "https://www.videolan.org/")
1091 (synopsis "Audio and video framework")
1092 (description "VLC is a cross-platform multimedia player and framework
1093 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1094 streaming protocols.")
1095 (license license:gpl2+)))
1097 (define-public mplayer
1104 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1108 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
1109 (build-system gnu-build-system)
1110 ;; FIXME: Add additional inputs once available.
1112 `(("pkg-config" ,pkg-config)))
1114 `(("alsa-lib" ,alsa-lib)
1115 ("cdparanoia" ,cdparanoia)
1116 ("ffmpeg" ,ffmpeg-3.4)
1117 ("fontconfig" ,fontconfig)
1118 ("freetype" ,freetype)
1119 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
1122 ("libdvdcss" ,libdvdcss)
1123 ("libdvdnav" ,libdvdnav)
1124 ("libjpeg" ,libjpeg)
1125 ("libmpeg2" ,libmpeg2)
1126 ("libmpg123" ,mpg123) ; audio codec for MP3
1128 ("libtheora" ,libtheora)
1129 ("libvdpau" ,libvdpau)
1130 ("libvorbis" ,libvorbis)
1132 ("libx264" ,libx264)
1133 ("libxinerama" ,libxinerama)
1135 ("libxxf86dga" ,libxxf86dga)
1139 ("pulseaudio" ,pulseaudio)
1140 ("python" ,python-wrapper)
1146 `(#:tests? #f ; no test target
1148 (modify-phases %standard-phases
1150 ;; configure does not work followed by "SHELL=..." and
1151 ;; "CONFIG_SHELL=..."; set environment variables instead
1152 (lambda* (#:key inputs outputs #:allow-other-keys)
1153 (let ((out (assoc-ref outputs "out"))
1154 (libx11 (assoc-ref inputs "libx11")))
1155 (substitute* "configure"
1156 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1157 (setenv "SHELL" (which "bash"))
1158 (setenv "CONFIG_SHELL" (which "bash"))
1159 (invoke "./configure"
1160 (string-append "--extra-cflags=-I"
1161 libx11 "/include") ; to detect libx11
1162 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1163 (string-append "--prefix=" out)
1164 ;; Enable runtime cpu detection where supported,
1165 ;; and choose a suitable target.
1166 ,@(match (or (%current-target-system)
1169 '("--enable-runtime-cpudetection"
1170 "--target=x86_64-linux"))
1172 '("--enable-runtime-cpudetection"
1173 "--target=i686-linux"))
1175 '("--target=mips3-linux"))
1176 (_ (list (string-append
1178 (or (%current-target-system)
1179 (nix-system->gnu-triplet
1180 (%current-system)))))))
1181 "--disable-iwmmxt")))))))
1182 (home-page "https://www.mplayerhq.hu/design7/news.html")
1183 (synopsis "Audio and video player")
1184 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1185 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1186 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1187 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1188 (license license:gpl2)))
1197 (url "https://github.com/mpv-player/mpv.git")
1198 (commit (string-append "v" version))))
1199 (file-name (git-file-name name version))
1202 "138921kx8g6qprim558xin09xximjhsj9ss8b71ifg2m6kclym8m"))))
1203 (build-system waf-build-system)
1205 `(("perl" ,perl) ; for zsh completion file
1206 ("pkg-config" ,pkg-config)
1207 ("python-docutils" ,python-docutils)))
1208 ;; Missing features: libguess, V4L2
1210 `(("alsa-lib" ,alsa-lib)
1217 ("libbluray" ,libbluray)
1218 ("libcaca" ,libcaca)
1219 ("libbs2b" ,libbs2b)
1220 ("libcdio-paranoia" ,libcdio-paranoia)
1221 ("libdvdread" ,libdvdread)
1222 ("libdvdnav" ,libdvdnav)
1223 ("libjpeg" ,libjpeg)
1225 ("libvdpau" ,libvdpau)
1227 ("libxext" ,libxext)
1228 ("libxinerama" ,libxinerama)
1229 ("libxrandr" ,libxrandr)
1230 ("libxscrnsaver" ,libxscrnsaver)
1232 ;; XXX: lua > 5.2 is not currently supported; see
1233 ;; waftools/checks/custom.py
1237 ("pulseaudio" ,pulseaudio)
1239 ("shaderc" ,shaderc)
1240 ("vulkan-headers" ,vulkan-headers)
1241 ("vulkan-loader" ,vulkan-loader)
1243 ("wayland" ,wayland)
1244 ("wayland-protocols" ,wayland-protocols)
1245 ("libxkbcommon" ,libxkbcommon)
1246 ("youtube-dl" ,youtube-dl)
1250 (modify-phases %standard-phases
1252 'configure 'setup-waf
1253 (lambda* (#:key inputs #:allow-other-keys)
1254 (let ((waf (assoc-ref inputs "waf")))
1255 (copy-file (string-append waf "/bin/waf") "waf"))
1258 #:configure-flags (list "--enable-libmpv-shared"
1263 "--disable-build-date")
1264 ;; No check function defined.
1266 (home-page "https://mpv.io/")
1267 (synopsis "Audio and video player")
1268 (description "mpv is a general-purpose audio and video player. It is a
1269 fork of mplayer2 and MPlayer. It shares some features with the former
1270 projects while introducing many more.")
1271 (license license:gpl2+)))
1273 (define-public gnome-mpv
1280 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1281 "/download/v" version "/gnome-mpv-" version
1285 "0jzdzvhcqp5jp1inwk2466zf7r8iimk3x69066gl8mzaay98mk92"))))
1287 `(("intltool" ,intltool)
1288 ("pkg-config" ,pkg-config)))
1291 ("libepoxy" ,libepoxy)
1293 (build-system glib-or-gtk-build-system)
1294 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1295 (synopsis "GTK+ frontend for the mpv media player")
1296 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1297 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1298 access to mpv's powerful playback capabilities.")
1299 (license license:gpl3+)))
1301 (define-public libvpx
1306 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1309 (url "https://chromium.googlesource.com/webm/libvpx")
1310 (commit (string-append "v" version))))
1311 (file-name (git-file-name name version))
1314 "079pb80am08lj8y5rx99vdr99mdqis9067f172zq12alkz849n93"))
1315 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1316 (build-system gnu-build-system)
1318 `(#:configure-flags (list "--enable-shared"
1320 ;; Limit size to avoid CVE-2015-1258
1321 "--size-limit=16384x16384"
1322 (string-append "--prefix=" (assoc-ref %outputs "out")))
1323 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1324 (assoc-ref %outputs "out") "/lib"))
1325 #:phases (modify-phases %standard-phases
1327 (lambda* (#:key configure-flags #:allow-other-keys)
1328 ;; The configure script does not understand some of the GNU
1329 ;; options, so we only add the flags specified above.
1330 (apply invoke "./configure" configure-flags))))
1331 #:tests? #f)) ; no check target
1335 (synopsis "VP8/VP9 video codec")
1336 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1337 (license license:bsd-3)
1338 (home-page "https://www.webmproject.org/")))
1340 ;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
1341 (define-public libvpx-1.7
1346 (inherit (package-source libvpx))
1348 (url "https://chromium.googlesource.com/webm/libvpx")
1349 (commit (string-append "v" version))))
1350 (file-name (git-file-name "libvpx" version))
1353 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1356 (origin-patches (package-source libvpx))
1357 (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
1359 (define-public youtube-dl
1362 (version "2019.02.18")
1365 (uri (string-append "https://github.com/rg3/youtube-dl/releases/"
1366 "download/" version "/youtube-dl-"
1370 "1sr0f6ixpaqyp3cf29zswx84y3nfabwnk3sljcgvgnmjp73zzfv1"))))
1371 (build-system python-build-system)
1373 ;; The problem here is that the directory for the man page and completion
1374 ;; files is relative, and for some reason, setup.py uses the
1375 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1376 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1377 ;; completion file is called 'youtube-dl' rather than
1378 ;; 'youtube-dl.bash-completion'.
1379 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1380 #:phases (modify-phases %standard-phases
1381 (add-before 'install 'fix-the-data-directories
1382 (lambda* (#:key outputs #:allow-other-keys)
1383 (let ((prefix (assoc-ref outputs "out")))
1384 (mkdir "bash-completion")
1385 (rename-file "youtube-dl.bash-completion"
1386 "bash-completion/youtube-dl")
1387 (substitute* "setup.py"
1388 (("youtube-dl\\.bash-completion")
1389 "bash-completion/youtube-dl")
1391 (string-append "'" prefix "/etc/"))
1393 (string-append "'" prefix "/share/")))
1395 (synopsis "Download videos from YouTube.com and other sites")
1397 "Youtube-dl is a small command-line program to download videos from
1398 YouTube.com and many more sites.")
1399 (home-page "https://yt-dl.org")
1400 (license license:public-domain)))
1402 (define-public youtube-dl-gui
1404 (name "youtube-dl-gui")
1409 (uri (pypi-uri "Youtube-DLG" version))
1412 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1413 (build-system python-build-system)
1415 ;; In Guix, wxpython has not yet been packaged for Python 3.
1416 `(#:python ,python-2
1417 ;; This package has no tests.
1420 (modify-phases %standard-phases
1421 (add-before 'build 'patch-source
1422 (lambda* (#:key inputs #:allow-other-keys)
1423 ;; The youtube-dl-gui program lets you configure options. Some of
1424 ;; them are problematic, so we change their defaults.
1425 (substitute* "youtube_dl_gui/optionsmanager.py"
1426 ;; When this is true, the builder process will try (and fail) to
1427 ;; write logs to the builder user's home directory.
1428 (("'enable_log': True") "'enable_log': False")
1429 ;; This determines which youtube-dl program youtube-dl-gui will
1430 ;; run. If we don't set this, then youtube-dl-gui might download
1431 ;; an arbitrary copy from the Internet into the user's home
1432 ;; directory and run it, so let's make sure youtube-dl-gui uses
1433 ;; the youtube-dl from the inputs by default.
1434 (("'youtubedl_path': self.config_path")
1435 (string-append "'youtubedl_path': '"
1436 (assoc-ref inputs "youtube-dl")
1438 ;; When this is True, when youtube-dl-gui is finished downloading
1439 ;; a file, it will try (and possibly fail) to open the directory
1440 ;; containing the downloaded file. This can fail because it
1441 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1442 ;; adding xdg-utils to the propagated inputs is not enough to
1443 ;; make this work, so for now we set the default to False.
1444 (("'open_dl_dir': True") "'open_dl_dir': False"))
1445 ;; The youtube-dl program from the inputs is actually a wrapper
1446 ;; script written in bash, so attempting to invoke it as a python
1447 ;; script will fail.
1448 (substitute* "youtube_dl_gui/downloaders.py"
1449 (("cmd = \\['python', self\\.youtubedl_path\\]")
1450 "cmd = [self.youtubedl_path]"))
1451 ;; Use relative paths for installing data files so youtube-dl-gui
1452 ;; installs the files relative to its prefix in the store, rather
1453 ;; than relative to /. Also, instead of installing data files into
1454 ;; $prefix/usr/share, install them into $prefix/share for
1455 ;; consistency (see: (standards) Directory Variables).
1456 (substitute* "setup.py"
1457 (("= '/usr/share") "= 'share"))
1458 ;; Update get_locale_file() so it finds the installed localization
1460 (substitute* "youtube_dl_gui/utils.py"
1461 (("os\\.path\\.join\\('/usr', 'share'")
1462 (string-append "os.path.join('"
1463 (assoc-ref %outputs "out")
1467 `(("python2-wxpython" ,python2-wxpython)
1468 ("youtube-dl" ,youtube-dl)))
1469 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1471 "GUI (Graphical User Interface) for @command{youtube-dl}")
1473 "Youtube-dlG is a GUI (Graphical User Interface) for
1474 @command{youtube-dl}. You can use it to download videos from YouTube and any
1475 other site that youtube-dl supports.")
1476 (license license:unlicense)))
1478 (define-public you-get
1481 (version "0.4.1210")
1485 (url "https://github.com/soimort/you-get.git")
1486 (commit (string-append "v" version))))
1487 (file-name (git-file-name name version))
1490 "1plw518hzpzzcr38phlnsbpq7aqnps8iwrgr68f6d41rppl1qb25"))))
1491 (build-system python-build-system)
1493 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1496 (modify-phases %standard-phases
1497 (add-after 'unpack 'qualify-input-references
1498 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1499 ;; happens to be in the user's $PATH at run time.
1500 (lambda* (#:key inputs #:allow-other-keys)
1501 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1503 (substitute* "src/you_get/processor/ffmpeg.py"
1504 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1505 ;; same string is also used when sniffing ffmpeg's output.
1506 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1507 (string-append prefix "'" ffmpeg "'")))
1509 #:tests? #f)) ; XXX some tests need Internet access
1510 (synopsis "Download videos, audio, or images from Web sites")
1512 "You-Get is a command-line utility to download media contents (videos,
1513 audio, images) from the Web. It can use either mpv or vlc for playback.")
1514 (home-page "https://you-get.org/")
1515 (license license:expat)))
1517 (define-public youtube-viewer
1519 (name "youtube-viewer")
1524 (url "https://github.com/trizen/youtube-viewer.git")
1526 (file-name (git-file-name name version))
1529 "0sx0f7jgc41a4anflw02zqk5yivydn02nn78kxkn3fik6xdmv3yd"))))
1530 (build-system perl-build-system)
1532 `(("perl-module-build" ,perl-module-build)))
1533 ;; FIXME: Add optional dependencies once available:
1534 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1536 `(("perl-data-dump" ,perl-data-dump)
1537 ("perl-file-sharedir" ,perl-file-sharedir)
1538 ("perl-gtk2" ,perl-gtk2)
1539 ("perl-json" ,perl-json)
1540 ("perl-libwww" ,perl-libwww)
1541 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1542 ("perl-mozilla-ca" ,perl-mozilla-ca)
1543 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1545 `(#:modules ((guix build perl-build-system)
1548 #:module-build-flags '("--gtk")
1550 (modify-phases %standard-phases
1551 (add-after 'install 'install-desktop
1552 (lambda* (#:key outputs #:allow-other-keys)
1553 (let* ((out (assoc-ref outputs "out"))
1554 (sharedir (string-append out "/share")))
1555 (install-file "share/gtk-youtube-viewer.desktop"
1556 (string-append sharedir "/applications"))
1557 (install-file "share/icons/gtk-youtube-viewer.png"
1558 (string-append sharedir "/pixmaps"))
1560 (add-after 'install 'wrap-program
1561 (lambda* (#:key outputs #:allow-other-keys)
1562 (let* ((out (assoc-ref outputs "out"))
1563 (bin-dir (string-append out "/bin/"))
1564 (site-dir (string-append out "/lib/perl5/site_perl/"))
1565 (lib-path (getenv "PERL5LIB")))
1566 (for-each (cut wrap-program <>
1567 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1568 (find-files bin-dir))
1571 "Lightweight application for searching and streaming videos from YouTube")
1573 "Youtube-viewer searches and plays YouTube videos in a native player.
1574 It comes with various search options; it can search for videos, playlists
1575 and/or channels. The videos are streamed directly in a selected video player
1576 at the best resolution (customizable) and with closed-captions (if available).
1577 Both command-line and GTK2 interface are available.")
1578 (home-page "https://github.com/trizen/youtube-viewer")
1579 (license license:perl-license)))
1581 (define-public libbluray
1587 (uri (string-append "https://download.videolan.org/videolan/"
1588 name "/" version "/"
1589 name "-" version ".tar.bz2"))
1592 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1593 (build-system gnu-build-system)
1595 `(#:configure-flags '("--disable-bdjava-jar")
1597 (modify-phases %standard-phases
1598 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1599 ;; Avoid the need to propagate libxml2 by referring to it
1600 ;; directly, as is already done for fontconfig & freetype.
1601 (lambda* (#:key inputs #:allow-other-keys)
1602 (let ((libxml2 (assoc-ref inputs "libxml2")))
1603 (substitute* "configure"
1604 ((" libxml-2.0") ""))
1605 (substitute* "src/libbluray.pc.in"
1606 (("^Libs.private:" field)
1607 (string-append field " -L" libxml2 "/lib -lxml2")))
1609 (add-before 'build 'fix-dlopen-paths
1610 (lambda* (#:key inputs #:allow-other-keys)
1611 (let ((libaacs (assoc-ref inputs "libaacs"))
1612 (libbdplus (assoc-ref inputs "libbdplus")))
1613 (substitute* "src/libbluray/disc/aacs.c"
1615 (string-append "\"" libaacs "/lib/libaacs\"")))
1616 (substitute* "src/libbluray/disc/bdplus.c"
1618 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1620 (native-inputs `(("pkg-config" ,pkg-config)))
1622 `(("fontconfig" ,fontconfig)
1623 ("freetype" ,freetype)
1624 ("libaacs" ,libaacs)
1625 ("libbdplus" ,libbdplus)
1626 ("libxml2" ,libxml2)))
1627 (home-page "https://www.videolan.org/developers/libbluray.html")
1628 (synopsis "Blu-Ray Disc playback library")
1630 "libbluray is a library designed for Blu-Ray Disc playback for media
1631 players, like VLC or MPlayer.")
1632 (license license:lgpl2.1+)))
1634 (define-public libdvdread
1640 (uri (string-append "https://download.videolan.org/videolan/"
1641 "libdvdread/" version "/"
1642 "libdvdread-" version ".tar.bz2"))
1645 "1gfmh8ii3s2fw1c8vn57piwxc0smd3va4h7xgp9s8g48cc04zki8"))))
1646 (build-system gnu-build-system)
1648 `(#:configure-flags '("--with-libdvdcss=yes")))
1650 `(("pkg-config" ,pkg-config)))
1652 `(("libdvdcss" ,libdvdcss)))
1653 (home-page "http://dvdnav.mplayerhq.hu/")
1654 (synopsis "Library for reading video DVDs")
1656 "Libdvdread provides a simple foundation for reading DVD video
1657 disks. It provides the functionality that is required to access many
1658 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1659 authentication and descrambling (if an external libdvdcss library is
1661 (license license:gpl2+)))
1663 (define-public dvdauthor
1670 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1674 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1675 (build-system gnu-build-system)
1677 `(("libdvdread" ,libdvdread)
1679 ("imagemagick" ,imagemagick)
1680 ("libxml2" ,libxml2)
1681 ("freetype" ,freetype)))
1683 `(("pkg-config" ,pkg-config)))
1684 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1685 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1686 MPEG-2 stream containing VOB packets.")
1687 (home-page "http://dvdauthor.sourceforge.net")
1688 (license license:gpl3+)))
1690 (define-public libdvdnav
1696 (uri (string-append "https://download.videolan.org/videolan/"
1697 name "/" version "/"
1698 name "-" version ".tar.bz2"))
1701 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1702 (build-system gnu-build-system)
1704 `(("pkg-config" ,pkg-config)))
1706 `(("libdvdread" ,libdvdread)))
1707 (home-page "http://dvdnav.mplayerhq.hu/")
1708 (synopsis "Library for video DVD navigation features")
1710 "Libdvdnav is a library for developers of multimedia
1711 applications. It allows easy use of sophisticated DVD navigation features
1712 such as DVD menus, multiangle playback and even interactive DVD games. All
1713 this functionality is provided through a simple API which provides the DVD
1714 playback as a single logical stream of blocks, intermitted by special
1715 dvdnav events to report certain conditions. The main usage of libdvdnav is
1716 a loop regularly calling a function to get the next block, surrounded by
1717 additional calls to tell the library of user interaction. The whole
1718 DVD virtual machine and internal playback states are completely
1720 (license license:gpl2+)))
1722 (define-public libdvdcss
1728 (uri (string-append "https://download.videolan.org/pub/"
1729 name "/" version "/"
1730 name "-" version ".tar.bz2"))
1733 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1734 (build-system gnu-build-system)
1735 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1736 (synopsis "Library for accessing DVDs as block devices")
1738 "libdvdcss is a simple library designed for accessing DVDs like a block
1739 device without having to bother about the decryption.")
1740 (license license:gpl2+)))
1742 (define-public srt2vtt
1749 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1753 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1754 (build-system gnu-build-system)
1756 `(("guile" ,guile-2.0)))
1757 (synopsis "SubRip to WebVTT subtitle converter")
1758 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1759 for use with HTML5 video.")
1760 (home-page "https://dthompson.us/projects/srt2vtt.html")
1761 (license license:gpl3+)))
1763 (define-public avidemux
1770 "mirror://sourceforge/" name "/" name "/" version "/"
1771 name "_" version ".tar.gz"))
1774 "15g9h791qbnmycabbbl7s2b3n3xpvygm88qrfk35g2cw6957ik9w"))
1775 (patches (search-patches "avidemux-install-to-lib.patch"))))
1776 (build-system cmake-build-system)
1778 `(("pkg-config" ,pkg-config)))
1779 ;; FIXME: Once packaged, add libraries not found during the build.
1781 `(("alsa-lib" ,alsa-lib)
1782 ("fontconfig" ,fontconfig)
1783 ("freetype" ,freetype)
1784 ("fribidi" ,fribidi)
1789 ("libvdpau" ,libvdpau)
1790 ("libvorbis" ,libvorbis)
1794 ("pulseaudio" ,pulseaudio)
1795 ("python" ,python-wrapper)
1797 ("qttools" ,qttools)
1803 `(#:tests? #f ; no check target
1805 ;; Make sure files inside the included ffmpeg tarball are
1807 (modify-phases %standard-phases
1808 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1810 (with-directory-excursion "avidemux_core/ffmpeg_package"
1811 (invoke "tar" "xf" "ffmpeg-3.3.7.tar.bz2")
1812 (delete-file "ffmpeg-3.3.7.tar.bz2"))
1814 (add-after 'patch-source-shebangs 'repack-ffmpeg
1816 (with-directory-excursion "avidemux_core/ffmpeg_package"
1817 (substitute* "ffmpeg-3.3.7/configure"
1818 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1819 (invoke "tar" "cjf" "ffmpeg-3.3.7.tar.bz2" "ffmpeg-3.3.7"
1820 ;; avoid non-determinism in the archive
1821 "--sort=name" "--mtime=@0"
1822 "--owner=root:0" "--group=root:0")
1823 (delete-file-recursively "ffmpeg-3.3.7"))
1827 ;; Copy-paste settings from the cmake build system.
1828 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1829 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
1832 (lambda* (#:key inputs outputs #:allow-other-keys)
1833 (let* ((out (assoc-ref outputs "out"))
1834 (lib (string-append out "/lib"))
1836 (sdl (assoc-ref inputs "sdl"))
1838 (lambda* (component srcdir #:optional (args '()))
1839 (let ((builddir (string-append "build_" component)))
1841 (with-directory-excursion builddir
1842 (apply invoke "cmake"
1843 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1844 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1845 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1846 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1847 "\"-Wl,-rpath=" lib "\"")
1848 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1849 (string-append "-DSDL_INCLUDE_DIR="
1851 (string-append "../" srcdir)
1855 (number->string (parallel-job-count)))
1856 (invoke "make" "install"))))))
1858 (build_component "core" "avidemux_core")
1859 (build_component "cli" "avidemux/cli")
1860 (build_component "qt4" "avidemux/qt4")
1861 (build_component "plugins_common" "avidemux_plugins"
1862 '("-DPLUGIN_UI=COMMON"))
1863 (build_component "plugins_cli" "avidemux_plugins"
1864 '("-DPLUGIN_UI=CLI"))
1865 (build_component "plugins_qt4" "avidemux_plugins"
1866 '("-DPLUGIN_UI=QT4"))
1867 (build_component "plugins_settings" "avidemux_plugins"
1868 '("-DPLUGIN_UI=SETTINGS"))
1869 ;; Remove .exe and .dll file.
1870 (delete-file-recursively
1871 (string-append out "/share/ADM6_addons"))
1873 (delete 'install))))
1874 (home-page "http://fixounet.free.fr/avidemux/")
1875 (synopsis "Video editor")
1876 (description "Avidemux is a video editor designed for simple cutting,
1877 filtering and encoding tasks. It supports many file types, including AVI,
1878 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1879 can be automated using projects, job queue and powerful scripting
1881 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1882 ;; Software with various licenses is included, see License.txt.
1883 (license license:gpl2+)))
1885 (define-public vapoursynth
1887 (name "vapoursynth")
1892 (url "https://github.com/vapoursynth/vapoursynth.git")
1893 (commit (string-append "R" version))))
1894 (file-name (git-file-name name version))
1897 "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
1898 (build-system gnu-build-system)
1900 `(("autoconf" ,autoconf)
1901 ("automake" ,automake)
1902 ("cython" ,python-cython)
1903 ("libtool" ,libtool)
1904 ("pkg-config" ,pkg-config)
1908 `(("ffmpeg" ,ffmpeg)
1910 ("tesseract-ocr" ,tesseract-ocr)
1914 (modify-phases %standard-phases
1915 (add-after 'unpack 'autogen
1917 (invoke "sh" "autogen.sh"))))))
1918 (home-page "http://www.vapoursynth.com/")
1919 (synopsis "Video processing framework")
1920 (description "VapourSynth is a C++ library and Python module for video
1921 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1922 multithreading, generalized colorspaces, per frame properties, and videos with
1924 ;; src/core/cpufeatures only allows x86, ARM or PPC
1925 (supported-systems (fold delete %supported-systems
1926 '("mips64el-linux" "aarch64-linux")))
1927 ;; As seen from the source files.
1928 (license license:lgpl2.1+)))
1937 "http://downloads.xvid.org/downloads/xvidcore-"
1938 version ".tar.bz2"))
1941 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1942 (build-system gnu-build-system)
1943 (native-inputs `(("yasm" ,yasm)))
1946 (modify-phases %standard-phases
1948 'configure 'pre-configure
1950 (chdir "build/generic")
1951 (substitute* "configure"
1952 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1954 ;; No 'check' target.
1956 (home-page "https://www.xvid.com/")
1957 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1958 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1959 codec library. It uses ASP features such as b-frames, global and quarter
1960 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1961 and custom quantization matrices.")
1962 (license license:gpl2+)))
1964 (define-public streamlink
1971 (uri (pypi-uri "streamlink" version))
1974 "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
1975 (patches (search-patches "streamlink-update-test.patch"))))
1976 (build-system python-build-system)
1977 (home-page "https://github.com/streamlink/streamlink")
1979 `(("python-freezegun" ,python-freezegun)
1980 ("python-pytest" ,python-pytest)
1981 ("python-mock" ,python-mock)
1982 ("python-requests-mock" ,python-requests-mock)))
1984 `(("python-pysocks" ,python-pysocks)
1985 ("python-websocket-client" ,python-websocket-client)
1986 ("python-iso3166" ,python-iso3166)
1987 ("python-iso639" ,python-iso639)
1988 ("python-isodate" ,python-isodate)
1989 ("python-pycryptodome" ,python-pycryptodome)
1990 ("python-requests" ,python-requests)
1991 ("python-urllib3" ,python-urllib3)))
1992 (synopsis "Extract streams from various services")
1993 (description "Streamlink is command-line utility that extracts streams
1994 from sites like Twitch.tv and pipes them into a video player of choice.")
1995 (license license:bsd-2)))
1997 (define-public livestreamer
1998 (deprecated-package "livestreamer" streamlink))
2000 (define-public twitchy
2001 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2004 (version (git-version "3.4" "1" commit))
2009 (url "https://github.com/BasioMeusPuga/twitchy.git")
2011 (file-name (git-file-name name version))
2014 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2015 (build-system python-build-system)
2018 (modify-phases %standard-phases
2019 (add-after 'unpack 'patch-paths
2020 (lambda* (#:key inputs #:allow-other-keys)
2021 (substitute* "twitchy/twitchy_play.py"
2023 (string-append "\"" (assoc-ref inputs "streamlink")
2024 "/bin/streamlink ")))
2026 (add-before 'check 'check-setup
2028 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2030 (add-after 'install 'install-rofi-plugin
2031 (lambda* (#:key outputs #:allow-other-keys)
2032 (install-file "plugins/rofi-twitchy"
2033 (string-append (assoc-ref outputs "out")
2037 `(("python-requests" ,python-requests)
2038 ("streamlink" ,streamlink)))
2039 (home-page "https://github.com/BasioMeusPuga/twitchy")
2040 (synopsis "Command-line interface for Twitch.tv")
2042 "This package provides a command-line interface for Twitch.tv")
2043 (license license:gpl3+))))
2052 (url "https://github.com/mltframework/mlt.git")
2053 (commit (string-append "v" version))))
2054 (file-name (git-file-name name version))
2057 "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w"))))
2058 (build-system gnu-build-system)
2060 `(#:tests? #f ; no tests
2061 #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
2063 (list "--enable-gpl3"
2066 (modify-phases %standard-phases
2068 'configure 'override-LDFLAGS
2069 (lambda* (#:key outputs #:allow-other-keys)
2070 (substitute* "config.mak"
2072 (string-append "LDFLAGS+=-Wl,-rpath="
2073 (assoc-ref outputs "out")
2077 `(("alsa-lib" ,alsa-lib)
2078 ("ffmpeg" ,ffmpeg-3.4)
2080 ("frei0r-plugins" ,frei0r-plugins)
2081 ("gdk-pixbuf" ,gdk-pixbuf)
2083 ("libxml2" ,libxml2)
2086 ("libsamplerate" ,libsamplerate)
2087 ("pulseaudio" ,pulseaudio)
2093 `(("pkg-config" ,pkg-config)))
2094 (home-page "https://www.mltframework.org/")
2095 (synopsis "Author, manage, and run multitrack audio/video compositions")
2097 "MLT is a multimedia framework, designed and developed for television
2098 broadcasting. It provides a toolkit for broadcasters, video editors, media
2099 players, transcoders, web streamers and many more types of applications. The
2100 functionality of the system is provided via an assortment of ready to use
2101 tools, XML authoring components, and an extensible plug-in based API.")
2102 (license license:gpl3)))
2104 (define-public v4l-utils
2110 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2111 "/v4l-utils-" version ".tar.bz2"))
2114 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
2115 (build-system gnu-build-system)
2118 (list (string-append "--with-udevdir="
2119 (assoc-ref %outputs "out")
2121 "CXXFLAGS=-std=gnu++11")))
2124 ("pkg-config" ,pkg-config)))
2126 `(("alsa-lib" ,alsa-lib)
2128 ("libjpeg" ,libjpeg)
2132 (synopsis "Realtime video capture utilities for Linux")
2133 (description "The v4l-utils provide a series of libraries and utilities to
2134 be used for realtime video capture via Linux-specific APIs.")
2135 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2136 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2137 (license (list license:lgpl2.1+ license:gpl2))))
2146 (url "https://github.com/obsproject/obs-studio.git")
2148 (file-name (git-file-name name version))
2151 "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i"))))
2152 (build-system cmake-build-system)
2154 `(#:tests? #f)) ; no tests
2156 `(("pkg-config" ,pkg-config)))
2158 `(("alsa-lib" ,alsa-lib)
2162 ("fontconfig" ,fontconfig)
2163 ("freetype" ,freetype)
2165 ("jansson" ,jansson)
2166 ("libx264" ,libx264)
2167 ("libxcomposite" ,libxcomposite)
2169 ("pulseaudio" ,pulseaudio)
2171 ("qtx11extras" ,qtx11extras)
2173 ("v4l-utils" ,v4l-utils)
2175 (synopsis "Live streaming software")
2176 (description "Open Broadcaster Software provides a graphical interface for
2177 video recording and live streaming. OBS supports capturing audio and video
2178 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2180 (home-page "https://obsproject.com")
2181 (supported-systems '("x86_64-linux" "i686-linux"))
2182 (license license:gpl2+)))
2184 (define-public libvdpau
2191 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2192 name "-" version ".tar.bz2"))
2195 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
2196 (build-system gnu-build-system)
2198 `(("pkg-config" ,pkg-config)))
2200 `(("libx11" ,libx11 "out")
2201 ("libxext" ,libxext)
2202 ("xorgproto" ,xorgproto)))
2203 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2204 (synopsis "Video Decode and Presentation API")
2205 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2206 provides an interface to video decode acceleration and presentation hardware
2207 present in modern GPUs.")
2208 (license (license:x11-style "file://COPYING"))))
2210 (define-public vdpauinfo
2217 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2218 name "-" version ".tar.gz"))
2221 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2222 (build-system gnu-build-system)
2224 `(("pkg-config" ,pkg-config)
2225 ("libx11" ,libx11)))
2227 `(("libvdpau" ,libvdpau)))
2228 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2229 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2230 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2232 (license (license:x11-style "file://COPYING"))))
2234 (define-public libvdpau-va-gl
2236 (name "libvdpau-va-gl")
2241 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2242 "releases/download/v" version "/libvdpau-va-gl-"
2246 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2247 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2248 (modules '((guix build utils)))
2249 (snippet '(begin (delete-file-recursively "3rdparty")
2251 (build-system cmake-build-system)
2253 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2255 `(("libvdpau" ,libvdpau)
2256 ("pkg-config" ,pkg-config)))
2260 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2261 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2263 "Many applications can use VDPAU to accelerate portions of the video
2264 decoding process and video post-processing to the GPU video hardware. Since
2265 there is no VDPAU available on Intel chips, they fall back to different drawing
2266 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2267 scaling and VA-API (if available) to accelerate video decoding.")
2268 (license license:expat)))
2270 (define-public recordmydesktop
2272 (name "recordmydesktop")
2276 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2277 version "/recordmydesktop-" version ".tar.gz"))
2280 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2281 (build-system gnu-build-system)
2282 (inputs `(("popt" ,popt)
2287 ("libxfixes" ,libxfixes)
2288 ("libxdamage" ,libxdamage)
2289 ("libxext" ,libxext)
2290 ("alsa-lib" ,alsa-lib)
2291 ("libvorbis" ,libvorbis)
2292 ("libtheora" ,libtheora)))
2293 (home-page "http://recordmydesktop.sourceforge.net/")
2294 (synopsis "Desktop session video recorder")
2296 "recordMyDesktop is a command-line tool that captures the activity in
2297 your graphical desktop and encodes it as a video. This is a useful tool for
2298 making @dfn{screencasts}.")
2299 (license license:gpl2+)))
2301 (define-public simplescreenrecorder
2303 (name "simplescreenrecorder")
2309 (url "https://github.com/MaartenBaert/ssr.git")
2311 (file-name (git-file-name name version))
2314 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2315 (build-system cmake-build-system)
2316 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2317 ;; README.md, the program builds and functions properly without them.
2318 ;; As a result, they are omitted. Please add them back if problems appear.
2320 `(("alsa-lib" ,alsa-lib)
2325 ("pulseaudio" ,pulseaudio)
2327 ("qtx11extras" ,qtx11extras)))
2328 (native-inputs `(("pkg-config" ,pkg-config)))
2331 (list "-DWITH_QT5=TRUE")
2332 #:tests? #f)) ; no test suite
2333 ;; Using HTTPS causes part of the page to be displayed improperly.
2334 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2335 (synopsis "Screen recorder")
2336 (description "SimpleScreenRecorder is an easy to use screen recorder with
2337 a graphical user interface. It supports recording the entire screen, or a
2338 part of it, and allows encoding in many different codecs and file formats.
2339 Other features include a live preview and live streaming.")
2340 (license (list license:gpl3+ ; most files
2341 license:zlib ; glinject/elfhacks.*
2342 license:isc ; glinject/*
2343 license:x11)))) ; build-aux/install-sh
2345 (define-public libsmpeg
2352 (url "svn://svn.icculus.org/smpeg/trunk/")
2353 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2354 (file-name (string-append name "-" version "-checkout"))
2357 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2358 (build-system gnu-build-system)
2361 (modify-phases %standard-phases
2362 (add-after 'unpack 'autogen.sh
2364 (invoke "sh" "autogen.sh"))))))
2366 `(("autoconf" ,autoconf)
2367 ("automake" ,automake)))
2370 (home-page "http://icculus.org/smpeg/")
2371 (synopsis "SDL MPEG decoding library")
2373 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2374 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2375 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2376 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2377 and MPEG system streams.")
2378 (license (list license:expat
2383 (define-public libbdplus
2390 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2391 version "/" name "-" version ".tar.bz2"))
2393 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2395 `(("libgcrypt" ,libgcrypt)))
2396 (build-system gnu-build-system)
2397 (home-page "https://www.videolan.org/developers/libbdplus.html")
2398 (synopsis "Library for decrypting certain Blu-Ray discs")
2399 (description "libbdplus is a library which implements the BD+ System
2401 (license license:lgpl2.1+)))
2403 (define-public libaacs
2410 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2411 version "/" name "-" version ".tar.bz2"))
2413 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2415 `(("libgcrypt" ,libgcrypt)))
2419 (build-system gnu-build-system)
2420 (home-page "https://www.videolan.org/developers/libaacs.html")
2421 (synopsis "Library for decrypting certain Blu-Ray discs")
2422 (description "libaacs is a library which implements the Advanced Access
2423 Content System specification.")
2424 (license license:lgpl2.1+)))
2426 (define-public mps-youtube
2428 (name "mps-youtube")
2434 (url "https://github.com/mps-youtube/mps-youtube.git")
2435 (commit (string-append "v" version))))
2436 (file-name (git-file-name name version))
2439 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2440 (build-system python-build-system)
2442 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2443 ;; test suite results differ depending on the country and also introduce
2444 ;; non-determinism in the tests.
2445 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2448 `(("python-pafy" ,python-pafy)
2449 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2450 (home-page "https://github.com/mps-youtube/mps-youtube")
2451 (synopsis "Terminal based YouTube player and downloader")
2453 "@code{mps-youtube} is based on mps, a terminal based program to
2454 search, stream and download music. This implementation uses YouTube as
2455 a source of content and can play and download video as well as audio.
2456 It can use either mpv or mplayer for playback, and for conversion of
2457 formats ffmpeg or libav is used. Users should install one of the
2458 supported players in addition to this package.")
2459 (license license:gpl3+)))
2461 (define-public handbrake
2467 (uri (string-append "https://download.handbrake.fr/releases/"
2468 version "/HandBrake-" version "-source.tar.bz2"))
2471 "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms"))
2472 (modules '((guix build utils)))
2474 ;; Remove "contrib" and source not necessary for
2475 ;; building/running under a GNU environment.
2477 (for-each delete-file-recursively
2478 '("contrib" "macosx" "win"))
2479 (substitute* "make/include/main.defs"
2480 ;; Disable unconditional inclusion of "contrib" libraries
2481 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2482 ;; which would lead to fetching and building of these
2483 ;; libraries. Use our own instead.
2484 (("MODULES \\+= contrib") "# MODULES += contrib"))
2486 (build-system glib-or-gtk-build-system)
2488 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2489 ("autoconf" ,autoconf)
2490 ("curl" ,curl) ;not actually used, but tested for
2491 ("intltool" ,intltool)
2492 ("libtool" ,libtool)
2493 ("pkg-config" ,pkg-config)
2494 ("python" ,python-2))) ;for configuration
2497 ("dbus-glib" ,dbus-glib)
2499 ("fontconfig" ,fontconfig)
2500 ("freetype" ,freetype)
2502 ("gstreamer" ,gstreamer)
2503 ("gst-plugins-base" ,gst-plugins-base)
2505 ("jansson" ,jansson)
2508 ("libbluray" ,libbluray)
2509 ("libdvdnav" ,libdvdnav)
2510 ("libdvdread" ,libdvdread)
2511 ("libgudev" ,libgudev)
2512 ("libmpeg2" ,libmpeg2)
2513 ("libnotify" ,libnotify)
2516 ("libsamplerate" ,libsamplerate)
2517 ("libtheora" ,libtheora)
2518 ("libvorbis" ,libvorbis)
2520 ("libxml2" ,libxml2)
2521 ("libx264" ,libx264)
2525 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2527 (list (string-append "CPPFLAGS=-I"
2528 (assoc-ref %build-inputs "libxml2")
2532 (modify-phases %standard-phases
2534 ;; Run bootstrap ahead of time so that shebangs get patched.
2536 (setenv "CONFIG_SHELL" (which "sh"))
2537 (setenv "NOCONFIGURE" "1")
2538 ;; Patch the Makefile so that it doesn't bootstrap again.
2539 (substitute* "gtk/module.rules"
2540 ((".*autogen\\.sh.*") ""))
2541 (invoke "sh" "./gtk/autogen.sh")))
2543 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2544 ;; 'configure' is not an autoconf-generated script, and
2545 ;; errors on unrecognized arguments,
2546 ;; e.g. --enable-fast-install
2547 (let ((out (assoc-ref outputs "out")))
2548 (apply invoke "./configure"
2549 (string-append "--prefix=" out)
2550 (or configure-flags '())))))
2551 (add-after 'configure 'chdir-build
2552 (lambda _ (chdir "./build") #t)))))
2553 (home-page "https://handbrake.fr")
2554 (synopsis "Video transcoder")
2556 "HandBrake is a tool for converting video from any format to a selection
2557 of modern, widely supported codecs.")
2558 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2559 ;; Combination under GPLv2. See LICENSE.
2560 (license license:gpl2)))
2562 (define-public openh264
2568 (uri (string-append "https://github.com/cisco/"
2569 name "/releases/download/v"
2570 version "/Source.Code.tar.gz.gz"))
2571 (file-name (string-append name "-" version ".tar.gz"))
2574 "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
2575 (build-system gnu-build-system)
2578 ("python" ,python)))
2580 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2582 #:test-target "test"
2583 #:phases (modify-phases %standard-phases
2584 ;; no configure script
2585 (delete 'configure))))
2586 (home-page "http://www.openh264.org/")
2587 (synopsis "H264 decoder library")
2589 "Openh264 is a library which can decode H264 video streams.")
2590 (license license:bsd-2)))
2592 (define-public libmp4v2
2599 ;; XXX: The new location of upstream is uncertain and will become relevant the
2600 ;; moment when the googlecode archive shuts down. It is past the date it
2601 ;; should've been turned off. I tried to communicate with upstream, but this
2602 ;; wasn't very responsive and not very helpful. The short summary is, it is
2603 ;; chaos when it comes to the amount of forks and only time will tell where
2604 ;; the new upstream location is.
2605 (uri (string-append "https://storage.googleapis.com/google-"
2606 "code-archive-downloads/v2/"
2607 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2608 (file-name (string-append name "-" version ".tar.bz2"))
2611 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2612 (build-system gnu-build-system)
2614 "static")) ; 3.7MiB .a file
2617 (modify-phases %standard-phases
2618 (add-after 'unpack 'remove-dates
2620 ;; Make the build reproducible.
2621 (substitute* "configure"
2622 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2623 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2625 (add-after 'install 'move-static-libraries
2626 (lambda* (#:key outputs #:allow-other-keys)
2627 ;; Move static libraries to the "static" output.
2628 (let* ((out (assoc-ref outputs "out"))
2629 (lib (string-append out "/lib"))
2630 (static (assoc-ref outputs "static"))
2631 (slib (string-append static "/lib")))
2633 (for-each (lambda (file)
2634 (install-file file slib)
2636 (find-files lib "\\.a$"))
2639 `(("help2man" ,help2man)
2640 ("dejagnu" ,dejagnu)))
2641 (home-page "https://code.google.com/archive/p/mp4v2/")
2642 (synopsis "API to create and modify mp4 files")
2644 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2645 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2646 file format that has been used as a multimedia file format in a variety of platforms and
2647 applications. It is a very powerful and extensible format that can accommodate
2648 practically any type of media.")
2649 (license license:mpl1.1)))
2651 (define-public libmediainfo
2653 (name "libmediainfo")
2657 (uri (string-append "https://mediaarea.net/download/source/"
2659 name "_" version ".tar.bz2"))
2662 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2663 ;; TODO add a Big Buck Bunny webm for tests.
2665 `(("autoconf" ,autoconf)
2666 ("automake" ,automake)
2667 ("libtool" ,libtool)
2668 ("pkg-config" ,pkg-config)
2670 ("tinyxml2" ,tinyxml2)
2672 ("libzen" ,libzen)))
2673 (build-system gnu-build-system)
2675 '(#:tests? #f ; see above TODO
2677 ;; build scripts not in root of archive
2678 (modify-phases %standard-phases
2679 (add-after 'unpack 'change-to-build-dir
2681 (chdir "Project/GNU/Library")
2683 (add-after 'change-to-build-dir 'autogen
2685 (invoke "sh" "autogen.sh"))))))
2686 (home-page "https://mediaarea.net/en/MediaInfo")
2687 (synopsis "Library for retrieving media metadata")
2688 (description "MediaInfo is a library used for retrieving technical
2689 information and other metadata about audio or video files. A non-exhaustive
2690 list of the information MediaInfo can retrieve from media files include:
2693 @item General: title, author, director, album, track number, date, duration...
2694 @item Video: codec, aspect, fps, bitrate...
2695 @item Audio: codec, sample rate, channels, language, bitrate...
2696 @item Text: language of subtitle
2697 @item Chapters: number of chapters, list of chapters
2700 MediaInfo supports the following formats:
2703 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2704 MPEG-2, MPEG-4, DVD (VOB)...
2705 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2706 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2707 @item Subtitles: SRT, SSA, ASS, SAMI...
2709 (license license:bsd-2)))
2711 ;; TODO also have a GUI version available
2712 (define-public mediainfo
2718 ;; Warning: This source has proved unreliable 1 time at least.
2719 ;; Consider an alternate source or report upstream if this
2721 (uri (string-append "https://mediaarea.net/download/source/"
2722 name "/" version "/"
2723 name "_" version ".tar.bz2"))
2726 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
2728 `(("autoconf" ,autoconf)
2729 ("automake" ,automake)
2730 ("libtool" ,libtool)
2731 ("pkg-config" ,pkg-config)
2733 ("libmediainfo" ,libmediainfo)
2734 ("libzen" ,libzen)))
2735 (build-system gnu-build-system)
2737 '(#:tests? #f ; lacks tests
2739 ;; build scripts not in root of archive
2740 (modify-phases %standard-phases
2741 (add-after 'unpack 'change-to-build-dir
2743 (chdir "Project/GNU/CLI")
2745 (home-page "https://mediaarea.net/en/MediaInfo")
2746 (synopsis "Utility for reading media metadata")
2747 (description "MediaInfo is a utility used for retrieving technical
2748 information and other metadata about audio or video files. It supports the
2749 many codecs and formats supported by libmediainfo.")
2750 (license license:bsd-2)))
2752 (define-public livemedia-utils
2754 (name "livemedia-utils")
2755 (version "2018.10.17")
2759 "https://download.videolan.org/contrib/live555/live."
2763 "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
2764 (modules '((guix build utils)))
2766 ;; As of glibc 2.26, <xlocale.h> no longer is.
2767 (substitute* "liveMedia/include/Locale.hh"
2768 (("xlocale\\.h") "locale.h"))
2770 (build-system gnu-build-system)
2772 '(#:tests? #f ; no tests
2773 #:make-flags (list "CC=gcc"
2774 (string-append "LDFLAGS=-Wl,-rpath="
2775 (assoc-ref %outputs "out") "/lib")
2776 (string-append "PREFIX="
2777 (assoc-ref %outputs "out")))
2778 #:phases (modify-phases %standard-phases
2779 (add-before 'configure 'fix-makefiles-generation
2781 (substitute* "genMakefiles"
2786 (invoke "./genMakefiles"
2787 "linux-with-shared-libraries"))))))
2788 (home-page "http://www.live555.com/liveMedia/")
2789 (synopsis "Set of C++ libraries for multimedia streaming")
2790 (description "This code forms a set of C++ libraries for multimedia
2791 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2792 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2793 JPEG video, and several audio codecs. They can easily be extended to support
2794 additional (audio and/or video) codecs, and can also be used to build basic
2795 RTSP or SIP clients and servers.")
2796 (license license:lgpl3+)))
2798 (define-public libdvbpsi
2805 "https://download.videolan.org/pub/libdvbpsi/"
2806 version "/libdvbpsi-" version ".tar.bz2"))
2809 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2810 (build-system gnu-build-system)
2811 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2812 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2814 (description "libdvbpsi is a simple library designed for decoding and
2815 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2816 and ITU-T H.222.0.")
2817 (license license:lgpl2.1)))
2819 (define-public ffms2
2823 (home-page "https://github.com/FFMS/ffms2")
2827 (url "https://github.com/FFMS/ffms2.git")
2829 (file-name (git-file-name name version))
2832 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
2833 (build-system gnu-build-system)
2836 (list "--enable-avresample")))
2840 `(("ffmpeg" ,ffmpeg)))
2842 `(("pkg-config" ,pkg-config)))
2843 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2845 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2846 programmers to access a standard API to open and decompress media files.")
2847 ;; sources are distributed under a different license that the binary.
2848 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2849 (license license:gpl2+))); inherits from ffmpeg
2851 (define-public aegisub
2858 "http://ftp.aegisub.org/pub/archives/releases/source/"
2859 name "-" version ".tar.xz"))
2862 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
2863 (patches (search-patches "aegisub-icu59-include-unistr.patch"
2864 "aegisub-boost68.patch"))))
2865 (build-system gnu-build-system)
2868 (list "--disable-update-checker"
2869 "--without-portaudio"
2872 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
2873 ;; tests require busted, a lua package we don't have yet
2876 (modify-phases %standard-phases
2877 (add-before 'configure 'fix-ldflags
2879 (setenv "LDFLAGS" "-pthread")
2881 (add-after 'unpack 'fix-boost-headers
2884 '("src/subtitles_provider_libass.cpp"
2885 "src/colour_button.cpp"
2886 "src/video_provider_dummy.cpp"
2887 "./src/video_frame.cpp")
2888 (("#include <boost/gil/gil_all.hpp>")
2889 "#include <boost/gil.hpp>"))
2893 ("desktop-file-utils" ,desktop-file-utils)
2896 ("hunspell" ,hunspell)
2899 ("alsa-lib" ,alsa-lib)
2900 ("pulseaudio" ,pulseaudio)
2902 ("freetype" ,freetype)
2903 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2905 `(("intltool" ,intltool)
2906 ("pkg-config" ,pkg-config)))
2907 (home-page "http://www.aegisub.org/")
2908 (synopsis "Subtitle engine")
2910 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2911 it quick and easy to time subtitles to audio, and features many powerful
2912 tools for styling them, including a built-in real-time video preview.")
2913 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2914 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2915 license:expat)))) ; and src/gl that is under a license similar
2916 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2917 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2918 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2920 (define-public gst-transcoder
2922 (name "gst-transcoder")
2928 (url "https://github.com/pitivi/gst-transcoder.git")
2930 (file-name (git-file-name name version))
2933 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
2934 (build-system meson-build-system)
2936 `(("gobject-introspection" ,gobject-introspection)
2938 ("gstreamer" ,gstreamer)
2939 ("gst-plugins-base" ,gst-plugins-base)))
2941 `(("python" ,python)
2942 ("pkg-config" ,pkg-config)))
2943 (home-page "https://github.com/pitivi/gst-transcoder/")
2944 (synopsis "GStreamer Transcoding API")
2945 (description "GStreamer Transcoding API")
2946 (license license:lgpl2.1)))
2955 (uri (string-append "mirror://sourceforge/gmerlin/"
2956 name "/" version "/"
2957 name "-" version ".tar.gz"))
2958 (file-name (string-append name "-" version ".tar.gz"))
2961 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2962 (build-system gnu-build-system)
2964 '(#:configure-flags '("LIBS=-lm")))
2966 `(("pkg-config" ,pkg-config)
2967 ("doxygen" ,doxygen)))
2968 (home-page "http://gmerlin.sourceforge.net")
2969 (synopsis "Low level library for multimedia API building")
2971 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2972 library, upon which multimedia APIs can be built. Gavl handles all the
2973 details of audio and video formats like colorspaces, sample rates,
2974 multichannel configurations, etc. It provides standardized definitions for
2975 those formats as well as container structures for carrying audio samples or
2976 video images inside an application.
2978 In addition, it handles the sometimes ugly task of converting between all
2979 these formats and provides some elementary operations (copying, scaling,
2980 alpha blending etc).")
2981 (license license:gpl3)))
2983 (define-public frei0r-plugins
2985 (name "frei0r-plugins")
2990 (uri (string-append "https://files.dyne.org/frei0r/"
2991 "frei0r-plugins-" version ".tar.gz"))
2994 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2995 (build-system gnu-build-system)
2998 (modify-phases %standard-phases
2999 (add-after 'unpack 'autotools
3001 (invoke "sh" "autogen.sh"))))))
3002 ;; TODO: opencv for additional face detection filters.
3007 `(("pkg-config" ,pkg-config)
3008 ("libtool" ,libtool)
3009 ("automake" ,automake)
3010 ("autoconf" ,autoconf)))
3011 (home-page "https://www.dyne.org/software/frei0r/")
3012 (synopsis "Minimalistic plugin API for video effects")
3014 "Frei0r is a minimalistic plugin API for video effects.
3015 The main emphasis is on simplicity for an API that will round up
3016 the most common video effects into simple filters, sources and
3017 mixers that can be controlled by parameters. Frei0r wants to
3018 provide a way to share these simple effects between many
3019 applications, avoiding their reimplementation by different projects.
3020 It counts more than 100 plugins.")
3021 (license (list license:gpl2+
3022 ;; The following files are licensed as LGPL2.1+:
3023 ;; src/generator/ising0r/ising0r.c
3024 ;; src/generator/onecol0r/onecol0r.cpp
3025 ;; src/generator/nois0r/nois0r.cpp
3026 ;; src/generator/lissajous0r/lissajous0r.cpp
3027 ;; src/filter/ndvi/gradientlut.hpp
3028 ;; src/filter/ndvi/ndvi.cpp
3029 ;; src/filter/facedetect/facedetect.cpp
3030 license:lgpl2.1+))))
3032 (define-public motion
3036 (home-page "https://motion-project.github.io/")
3040 (url "https://github.com/Motion-Project/motion.git")
3041 (commit (string-append "release-" version))))
3044 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3045 (file-name (git-file-name name version))))
3046 (build-system gnu-build-system)
3048 `(("autoconf" ,autoconf-wrapper)
3049 ("automake" ,automake)
3050 ("gettext" ,gettext-minimal)
3051 ("pkg-config" ,pkg-config)))
3053 `(("libjpeg" ,libjpeg)
3054 ("ffmpeg" ,ffmpeg-3.4)
3055 ("libmicrohttpd" ,libmicrohttpd)
3056 ("sqlite" ,sqlite)))
3058 '(#:phases (modify-phases %standard-phases
3061 (patch-shebang "version.sh")
3062 (invoke "autoreconf" "-vfi"))))
3063 #:configure-flags '("--sysconfdir=/etc")
3064 #:make-flags (list (string-append "sysconfdir="
3065 (assoc-ref %outputs "out")
3068 #:tests? #f)) ; no 'check' target
3069 (synopsis "Detect motion from video signals")
3071 "Motion is a program that monitors the video signal from one or more
3072 cameras and is able to detect if a significant part of the picture has
3073 changed. Or in other words, it can detect motion.")
3075 ;; Some files say "version 2" and others "version 2 or later".
3076 (license license:gpl2)))
3078 (define-public subdl
3079 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3083 (version (git-version "1.0.3" revision commit))
3087 (url "https://github.com/alexanderwink/subdl.git")
3089 (file-name (git-file-name name version))
3092 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3093 (build-system trivial-build-system)
3095 `(#:modules ((guix build utils))
3097 (use-modules (guix build utils))
3098 (let* ((out (assoc-ref %outputs "out"))
3099 (bin (string-append out "/bin"))
3100 (source (assoc-ref %build-inputs "source"))
3101 (python (assoc-ref %build-inputs "python")))
3102 (install-file (string-append source "/subdl") bin)
3103 (patch-shebang (string-append bin "/subdl")
3104 (list (string-append python "/bin")))))))
3105 (inputs `(("python" ,python)))
3106 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3107 (description "Subdl is a command-line tool for downloading subtitles from
3108 opensubtitles.org. By default, it will search for English subtitles, display
3109 the results, download the highest-rated result in the requested language and
3110 save it to the appropriate filename.")
3111 (license license:gpl3+)
3112 (home-page "https://github.com/alexanderwink/subdl"))))
3114 (define-public l-smash
3121 (url "https://github.com/l-smash/l-smash.git")
3122 (commit (string-append "v" version))))
3123 (file-name (git-file-name name version))
3126 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3127 (build-system gnu-build-system)
3129 `(#:tests? #f ;no tests
3131 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3132 (assoc-ref %outputs "out") "/lib"))
3134 (modify-phases %standard-phases
3135 ;; configure fails if it is followed by CONFIG_SHELL
3137 (lambda* (#:key outputs #:allow-other-keys)
3138 (let ((out (assoc-ref outputs "out")))
3139 (invoke "./configure" (string-append "--prefix=" out)
3140 "--disable-static")))))))
3142 `(("which" ,which)))
3143 (home-page "https://l-smash.github.io/l-smash/")
3144 (synopsis "MP4 multiplexer and demultiplexer library")
3146 "L-SMASH is a cross-platform library that handles the ISO base media file
3147 format and some of its derived file formats, including MP4. It operates as a
3148 multiplexer and demultiplexer, and can mux video and audio in several formats
3149 using standalone executable files.")
3150 (license license:isc)))
3152 (define-public qtfaststart
3154 (name "qtfaststart")
3158 (uri (pypi-uri "qtfaststart" version))
3161 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3162 (build-system python-build-system)
3164 '(#:tests? #f)) ; no test suite
3165 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3166 (description "qtfaststart enables streaming and pseudo-streaming of
3167 QuickTime and MP4 files by moving metadata and offset information to the
3168 beginning of the file. It can also print some useful information about the
3169 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3170 project, which is released into the public domain, as well as ISO 14496-12:2005
3171 (the official spec for MP4), which can be obtained from the ISO or found
3173 (home-page "https://github.com/danielgtaylor/qtfaststart")
3174 (license license:expat)))
3176 (define-public vidstab
3183 (url "https://github.com/georgmartius/vid.stab.git")
3184 (commit (string-append "v" version))))
3185 (file-name (git-file-name name version))
3188 "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
3189 (build-system cmake-build-system)
3191 '(#:tests? #f)) ; tests are not run as part of standard build process
3192 (home-page "http://public.hronopik.de/vid.stab/")
3193 (synopsis "Video stabilization library")
3194 (description "Vidstab is a video stabilization library which can be used
3195 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3196 vehicle typically suffers from undesirable shakes and jitters. Activities such
3197 as surfing, skiing, riding and walking while shooting videos are especially
3198 prone to erratic camera shakes. Vidstab targets these video contents to help
3199 create smoother and stable videos.")
3200 (license license:gpl2+)))
3202 (define-public libopenshot
3204 (name "libopenshot")
3209 (url "https://github.com/OpenShot/libopenshot")
3210 (commit (string-append "v" version))))
3211 (file-name (git-file-name name version))
3214 "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
3215 (modules '((guix build utils)))
3217 ;; Allow overriding of the python installation dir
3218 (substitute* "src/bindings/python/CMakeLists.txt"
3219 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3220 (string-append set " CACHE PATH "
3221 "\"Python bindings directory\")")))
3222 (delete-file-recursively "thirdparty")
3224 (patches (search-patches "libopenshot-fixup-tests.patch"
3225 "libopenshot-tests-with-system-libs.patch"))))
3226 (build-system cmake-build-system)
3228 `(("pkg-config" ,pkg-config)
3231 ("unittest++" ,unittest-cpp)))
3232 (propagated-inputs ;all referenced in installed headers
3233 `(("cppzmq" ,cppzmq)
3235 ("imagemagick" ,imagemagick)
3236 ("jsoncpp" ,jsoncpp)
3237 ("libopenshot-audio" ,libopenshot-audio)
3239 ("qtmultimedia" ,qtmultimedia)
3240 ("zeromq" ,zeromq)))
3243 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3244 ,(version-major+minor (package-version python))
3246 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3248 (modify-phases %standard-phases
3249 (add-before 'configure 'set-vars
3250 (lambda* (#:key inputs #:allow-other-keys)
3251 (setenv "LIBOPENSHOT_AUDIO_DIR"
3252 (assoc-ref inputs "libopenshot-audio"))
3254 (assoc-ref inputs "zeromq"))
3255 (setenv "UNITTEST_DIR"
3256 (string-append (assoc-ref inputs "unittest++")
3257 "/include/UnitTest++"))
3259 (home-page "https://openshot.org")
3260 (synopsis "Video-editing, animation, and playback library")
3261 (description "OpenShot Library (libopenshot) is a powerful C++ video
3262 editing library with a multi-threaded and feature rich video editing
3263 API. It includes bindings for Python, Ruby, and other languages.")
3264 (license license:lgpl3+)))
3266 (define-public openshot
3273 (url "https://github.com/OpenShot/openshot-qt")
3274 (commit (string-append "v" version))))
3275 (file-name (git-file-name name version))
3278 "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
3279 (build-system python-build-system)
3281 `(("ffmpeg" ,ffmpeg)
3282 ("libopenshot" ,libopenshot)
3284 ("python-pyqt" ,python-pyqt)
3285 ("python-pyzmq" ,python-pyzmq)
3286 ("python-requests" ,python-requests)
3289 `(#:tests? #f ;no tests
3290 #:phases (modify-phases %standard-phases
3291 (delete 'build) ;install phase does all the work
3292 (add-before 'install 'set-tmp-home
3294 ;; src/classes/info.py "needs" to create several
3295 ;; directories in $HOME when loaded during build
3296 (setenv "HOME" "/tmp")
3298 (add-after 'install 'wrap-program
3299 (lambda* (#:key inputs outputs #:allow-other-keys)
3300 (wrap-program (string-append (assoc-ref outputs "out")
3302 `("QT_PLUGIN_PATH" prefix
3303 ,(list (string-append (assoc-ref inputs "qtsvg")
3304 "/lib/qt5/plugins/")))))))))
3305 (home-page "https://openshot.org")
3306 (synopsis "Video editor")
3307 (description "OpenShot takes your videos, photos, and music files and
3308 helps you create the film you have always dreamed of. Easily add sub-titles,
3309 transitions, and effects and then export your film to many common formats.")
3310 (license license:gpl3+)))
3312 (define-public dav1d
3319 (uri (string-append "https://downloads.videolan.org/pub/videolan/"
3320 "dav1d/" version "/dav1d-" version ".tar.xz"))
3323 "0dw0liday8cbyrirhm6bgzhxg4cdy66nspfkdlq338gdsfqcvrsc"))))
3324 (build-system meson-build-system)
3325 (native-inputs `(("nasm" ,nasm)))
3326 (home-page "https://code.videolan.org/videolan/dav1d")
3327 (synopsis "AV1 decoder")
3328 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3329 speed and correctness.")
3330 (license license:bsd-2)))
3332 (define-public wlstream
3333 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3337 (version (git-version "0.0" revision commit))
3342 (url "https://github.com/atomnuker/wlstream.git")
3344 (file-name (git-file-name name version))
3347 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3348 (build-system meson-build-system)
3349 (native-inputs `(("libdrm" ,libdrm)
3350 ("pkg-config" ,pkg-config)))
3351 (inputs `(("ffmpeg" ,ffmpeg)
3352 ("pulseaudio" ,pulseaudio)
3353 ("wayland" ,wayland)
3354 ("wayland-protocols" ,wayland-protocols)))
3355 (home-page "https://github.com/atomnuker/wlstream")
3356 (synopsis "Screen capture tool for Wayland sessions")
3357 (description "Wlstream is a screen capture tool for recording audio and
3358 video from a Wayland session.")
3359 (license license:lgpl2.1+))))