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 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018 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 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 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 Clément Lassieur <clement@lassieur.org>
23 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
24 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages video)
45 #:use-module (ice-9 match)
46 #:use-module (srfi srfi-1)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix utils)
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix git-download)
52 #:use-module (guix svn-download)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system glib-or-gtk)
56 #:use-module (guix build-system meson)
57 #:use-module (guix build-system perl)
58 #:use-module (guix build-system python)
59 #:use-module (guix build-system waf)
60 #:use-module (guix build-system trivial)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages audio)
64 #:use-module (gnu packages autotools)
65 #:use-module (gnu packages avahi)
66 #:use-module (gnu packages base)
67 #:use-module (gnu packages bison)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages cdrom)
70 #:use-module (gnu packages check)
71 #:use-module (gnu packages cmake)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages cpp)
74 #:use-module (gnu packages curl)
75 #:use-module (gnu packages databases)
76 #:use-module (gnu packages dejagnu)
77 #:use-module (gnu packages docbook)
78 #:use-module (gnu packages documentation)
79 #:use-module (gnu packages elf)
80 #:use-module (gnu packages file)
81 #:use-module (gnu packages flex)
82 #:use-module (gnu packages fontutils)
83 #:use-module (gnu packages freedesktop)
84 #:use-module (gnu packages fribidi)
85 #:use-module (gnu packages gettext)
86 #:use-module (gnu packages ghostscript)
87 #:use-module (gnu packages gl)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages guile)
90 #:use-module (gnu packages gnome)
91 #:use-module (gnu packages gnupg)
92 #:use-module (gnu packages gstreamer)
93 #:use-module (gnu packages gtk)
94 #:use-module (gnu packages image)
95 #:use-module (gnu packages imagemagick)
96 #:use-module (gnu packages iso-codes)
97 #:use-module (gnu packages libreoffice)
98 #:use-module (gnu packages linux)
99 #:use-module (gnu packages lua)
100 #:use-module (gnu packages m4)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages mp3)
103 #:use-module (gnu packages ncurses)
104 #:use-module (gnu packages ocr)
105 #:use-module (gnu packages perl)
106 #:use-module (gnu packages pkg-config)
107 #:use-module (gnu packages popt)
108 #:use-module (gnu packages pulseaudio)
109 #:use-module (gnu packages python)
110 #:use-module (gnu packages python-crypto)
111 #:use-module (gnu packages python-web)
112 #:use-module (gnu packages qt)
113 #:use-module (gnu packages ruby)
114 #:use-module (gnu packages sdl)
115 #:use-module (gnu packages serialization)
116 #:use-module (gnu packages shells)
117 #:use-module (gnu packages ssh)
118 #:use-module (gnu packages texinfo)
119 #:use-module (gnu packages textutils)
120 #:use-module (gnu packages tls)
121 #:use-module (gnu packages version-control)
122 #:use-module (gnu packages vulkan)
123 #:use-module (gnu packages web)
124 #:use-module (gnu packages webkit)
125 #:use-module (gnu packages wxwidgets)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages xiph)
128 #:use-module (gnu packages xml)
129 #:use-module (gnu packages xorg)
130 #:use-module (gnu packages assembly))
138 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
139 version "/" name "-" version ".tar.gz"))
142 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
143 (build-system gnu-build-system)
145 `(("makeinfo" ,texinfo)))
147 `(("ncurses" ,ncurses)))
150 (modify-phases %standard-phases
152 (lambda* (#:key build inputs outputs #:allow-other-keys)
153 ;; This old `configure' script doesn't support
154 ;; variables passed as arguments.
155 (let ((out (assoc-ref outputs "out"))
156 (ncurses (assoc-ref inputs "ncurses")))
157 (setenv "CONFIG_SHELL" (which "bash"))
158 (zero? (system* "./configure"
159 (string-append "--prefix=" out)
160 (string-append "--build=" build)
161 ;; The ancient config.guess is unable to
162 ;; guess the host triplet on mips64el.
163 ,@(if (string=? "mips64el-linux"
165 '("--host=mips64el-unknown-linux-gnu")
167 ;; The same is also true with aarch64.
168 ,@(if (string=? "aarch64-linux"
170 '("--host=aarch64-unknown-linux-gnu")
172 (string-append "--with-ncurses="
174 (home-page "http://aa-project.sourceforge.net/aalib/")
175 (synopsis "ASCII-art library")
177 "AA-lib is a low level gfx library which does not require graphics device.
178 In fact, there is no graphical output possible. AA-lib replaces those
179 old-fashioned output methods with powerful ascii-art renderer.")
180 (license license:lgpl2.0+)))
182 (define-public liba52
189 ;; A mirror://sourceforge URI doesn't work, presumably
190 ;; because the SourceForge project is misconfigured.
191 "http://liba52.sourceforge.net/files/a52dec-" version
195 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
196 (patches (search-patches "liba52-enable-pic.patch"
197 "liba52-set-soname.patch"
198 "liba52-use-mtune-not-mcpu.patch"
199 "liba52-link-with-libm.patch"))))
200 (build-system gnu-build-system)
201 ;; XXX We need to run ./bootstrap because of the build system fixes above.
203 `(("autoconf" ,autoconf)
204 ("automake" ,automake)
205 ("libtool" ,libtool)))
206 (arguments `(#:configure-flags '("--enable-shared")
208 (modify-phases %standard-phases
209 ;; XXX We need to run ./bootstrap because of the build
210 ;; system fixes above.
213 (lambda _ (zero? (system* "sh" "bootstrap")))))))
214 (home-page "http://liba52.sourceforge.net/")
215 (synopsis "ATSC A/52 stream decoder")
216 (description "liba52 is a library for decoding ATSC A/52 streams. The
217 A/52 standard is used in a variety of applications, including digital
218 television and DVD. It is also known as AC-3.")
219 (license license:gpl2+)))
221 (define-public libmpeg2
227 ;; A mirror://sourceforge URI doesn't work, presumably
228 ;; because the SourceForge project is misconfigured.
229 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
230 name "-" version ".tar.gz"))
233 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
241 (build-system gnu-build-system)
242 (home-page "http://libmpeg2.sourceforge.net/")
243 (synopsis "MPEG1 and MPEG2 video decoder library")
245 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
246 (license license:gpl2+)))
248 (define-public libx264
251 (version "20180219-2245")
254 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
255 "x264-snapshot-" version "-stable.tar.bz2"))
258 "1x0cg8l30wp84mr7q0ddp06jclm0kjrszazrx87d4k7js3qxjy8m"))))
259 (build-system gnu-build-system)
261 `(("pkg-config" ,pkg-config)
263 ;; TODO: Add gpac input
265 `(#:tests? #f ;no check target
266 #:configure-flags '("--enable-shared"
267 ;; Don't build the command-line program. If we
268 ;; want it later, we should do so in a different
269 ;; package to avoid a circular dependency (the x264
270 ;; program depends on ffmpeg and ffmpeg depends on
274 ;; On MIPS, we must pass "--disable-asm" or else
275 ;; configure fails after printing: "You specified a
276 ;; pre-MSA CPU in your CFLAGS. If you really want
277 ;; to run on such a CPU, configure with
279 ,@(if (string-prefix? "mips"
280 (or (%current-target-system)
284 (home-page "https://www.videolan.org/developers/x264.html")
285 (synopsis "H.264 video coding library")
286 (description "libx264 is an advanced encoding library for creating
287 H.264 (MPEG-4 AVC) video streams.")
288 (license (list license:gpl2+ ;most files
289 license:isc ;common/x86/x86inc.asm
290 license:lgpl2.1+ ;extras/getopt.c
291 license:bsd-3 ;extras/inttypes.h
292 (license:non-copyleft ;extras/cl*.h
294 "See extras/cl.h in the distribution.")))))
296 (define-public mkvtoolnix
303 (uri (string-append "https://mkvtoolnix.download/sources/"
304 name "-" version ".tar.xz"))
307 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
308 (modules '((guix build utils)))
311 ;; Delete bundled libraries.
312 (for-each delete-file-recursively
318 (build-system gnu-build-system)
325 ("libmatroska" ,libmatroska)
327 ("libvorbis" ,libvorbis)
334 `(("docbook-xsl" ,docbook-xsl)
335 ("gettext" ,gettext-minimal)
336 ("googletest" ,googletest)
338 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
340 ("pkg-config" ,pkg-config)
345 (list (string-append "--with-boost="
346 (assoc-ref %build-inputs "boost"))
347 (string-append "--with-docbook-xsl-root="
348 (assoc-ref %build-inputs "docbook-xsl")
349 "/xml/xsl/docbook-xsl-"
350 ,(package-version docbook-xsl))
351 (string-append "--with-extra-includes="
352 (assoc-ref %build-inputs "nlohmann-json-cpp")
353 "/include/nlohmann"))
355 (modify-phases %standard-phases
356 (add-before 'configure 'add-googletest
359 (string-append (assoc-ref %build-inputs "googletest")
360 "/include/gtest") "lib/gtest")
364 (let ((-j (list "-j" (number->string (parallel-job-count)))))
365 (zero? (apply system* "rake" -j)))))
368 (zero? (system* "rake" "tests/unit"))))
371 (zero? (system* "rake" "install")))))))
372 (home-page "https://mkvtoolnix.download")
373 (synopsis "Tools to create, alter and inspect Matroska files")
375 "MKVToolNix provides tools for getting information about Matroska files
376 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
377 and creating Matroska files from other media files (@code{mkvmerge}).")
378 (license license:gpl2)))
387 (uri (string-append "https://download.videolan.org/videolan/x265/"
388 "x265_" version ".tar.gz"))
391 "1gyd94jkwdii9308m07nymsbxrmrcl81c0j8i10zhslr2mj07w0v"))
392 (modules '((guix build utils)))
394 '(delete-file-recursively "source/compat/getopt"))))
395 (build-system cmake-build-system)
397 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
398 ;; Currently the source code doesn't check for aarch64
399 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
400 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
403 (modify-phases %standard-phases
404 (add-before 'configure 'prepare-build
406 (delete-file-recursively "build")
409 (home-page "http://x265.org/")
410 (synopsis "Library for encoding h.265/HEVC video streams")
411 (description "x265 is a H.265 / HEVC video encoder application library,
412 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
413 (license license:gpl2+)))
415 (define-public libass
422 "https://github.com/libass/libass/releases/download/"
423 version "/libass-" version ".tar.xz"))
426 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
427 (build-system gnu-build-system)
429 `(("pkg-config" ,pkg-config)
432 `(("freetype" ,freetype)
434 ("fontconfig" ,fontconfig)
435 ("harfbuzz" ,harfbuzz)
437 (home-page "https://github.com/libass/libass")
438 (synopsis "Subtitle rendering library for the ASS/SSA format")
439 (description "libass is a subtitle rendering library for the
440 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
441 (license license:isc)))
443 (define-public libcaca
446 (version "0.99.beta19")
449 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
453 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
454 (build-system gnu-build-system)
455 (native-inputs `(("pkg-config" ,pkg-config)))
457 `(("freeglut" ,freeglut)
464 (home-page "http://caca.zoy.org/wiki/libcaca")
465 (synopsis "Colour ASCII-art library")
466 (description "libcaca is a graphics library that outputs text instead of
467 pixels, so that it can work on older video cards or text terminals. It
468 supports Unicode, 2048 colors, dithering of color images, and advanced text
470 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
472 (define-public libdca
479 "https://download.videolan.org/pub/videolan/libdca/"
480 version "/libdca-" version ".tar.bz2"))
483 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
484 (build-system gnu-build-system)
485 (home-page "https://www.videolan.org/developers/libdca.html")
486 (synopsis "DTS Coherent Acoustics decoder")
487 (description "libdca is a library for decoding DTS Coherent Acoustics
489 (license license:gpl2+)))
498 "mirror://sourceforge/" name "/" name "/"
499 version "/" name "-" version ".tar.gz"))
502 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
503 (build-system gnu-build-system)
504 (native-inputs `(("pkg-config" ,pkg-config)))
505 (inputs `(("libxv" ,libxv)))
506 (home-page "http://libdv.sourceforge.net/")
507 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
508 (description "The Quasar DV codec (libdv) is a software codec for DV
509 video, the encoding format used by most digital camcorders, typically those
510 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
511 developed according to the official standards for DV video: IEC 61834 and
513 (license license:lgpl2.1+)))
515 (define-public libmatroska
522 (uri (string-append "https://dl.matroska.org/downloads/"
523 name "/" name "-" version ".tar.xz"))
526 "14n9sw974prr3yp4yjb7aadi6x2yz5a0hjw8fs3qigy5shh2piyq"))))
527 (build-system gnu-build-system)
529 `(("pkg-config" ,pkg-config)))
531 `(("libebml" ,libebml)))
532 (home-page "https://www.matroska.org")
533 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
535 "Matroska aims to become the standard of multimedia container formats.
536 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
537 of XML. EBML enables the Matroska Development Team to gain significant
538 advantages in terms of future format extensibility, without breaking file
539 support in old parsers.
540 libebml is a C++ library to read and write EBML files.")
541 (license license:lgpl2.1)))
551 ;; Newer releases are only available on GitHub.
552 (string-append "https://github.com/01org/libva/releases/download/"
553 version "/libva-" version ".tar.bz2")
554 ;; Keep the old URL around for compatibility.
555 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
556 "libva/libva-" version "/libva-" version ".tar.bz2")))
558 (base32 "03sb1b3fxw8myf9kz6rxw5f3v1p0vfmk34779qx0q8fk24x9bypk"))))
559 (build-system gnu-build-system)
561 `(("pkg-config" ,pkg-config)))
566 ("libxfixes" ,libxfixes)
570 (modify-phases %standard-phases
572 'build 'fix-dlopen-paths
573 (lambda* (#:key outputs #:allow-other-keys)
574 (let ((out (assoc-ref outputs "out")))
575 (substitute* "va/drm/va_drm_auth_x11.c"
576 (("\"libva-x11\\.so\\.%d\"")
577 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
578 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
579 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
581 (list (string-append "--with-drivers-path="
582 (assoc-ref %build-inputs "mesa") "/lib/dri"))
583 ;; However, we can't write to mesa's store directory, so override the
584 ;; following make variable to install the dummy driver to libva's
585 ;; $prefix/lib/dri directory.
587 (list (string-append "dummy_drv_video_ladir="
588 (assoc-ref %outputs "out") "/lib/dri"))))
589 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
590 (synopsis "Video acceleration library")
591 (description "The main motivation for VA-API (Video Acceleration API) is
592 to enable hardware accelerated video decode/encode at various
593 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
594 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
595 (license license:expat)))
597 (define-public ffmpeg
603 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
607 "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"))))
608 (build-system gnu-build-system)
610 `(("fontconfig" ,fontconfig)
611 ("freetype" ,freetype)
612 ("frei0r-plugins" ,frei0r-plugins)
618 ("libbluray" ,libbluray)
620 ("libcdio-paranoia" ,libcdio-paranoia)
621 ("libtheora" ,libtheora)
623 ("libvdpau" ,libvdpau)
624 ("libvorbis" ,libvorbis)
630 ("pulseaudio" ,pulseaudio)
641 ("pkg-config" ,pkg-config)
643 ("python" ,python-2) ; scripts use interpreter python2
647 `(#:test-target "fate"
649 ;; possible additional inputs:
650 ;; --enable-avisynth enable reading of AviSynth script
652 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
653 ;; --enable-libcelt enable CELT decoding via libcelt [no]
654 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
655 ;; and libraw1394 [no]
656 ;; --enable-libfaac enable AAC encoding via libfaac [no]
657 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
658 ;; --enable-libflite enable flite (voice synthesis) support via
660 ;; --enable-libgme enable Game Music Emu via libgme [no]
661 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
662 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
663 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
664 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
665 ;; --enable-libnut enable NUT (de)muxing via libnut,
666 ;; native (de)muxer exists [no]
667 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
668 ;; libopencore-amrnb [no]
669 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
670 ;; libopencore-amrwb [no]
671 ;; --enable-libopencv enable video filtering via libopencv [no]
672 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
674 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
675 ;; --enable-libschroedinger enable Dirac de/encoding via
676 ;; libschroedinger [no]
677 ;; --enable-libshine enable fixed-point MP3 encoding via
679 ;; --enable-libssh enable SFTP protocol via libssh [no]
680 ;; (libssh2 does not work)
681 ;; --enable-libstagefright-h264 enable H.264 decoding via
682 ;; libstagefright [no]
683 ;; --enable-libutvideo enable Ut Video encoding and decoding via
685 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
686 ;; --enable-libvidstab enable video stabilization using
688 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
689 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
690 ;; libvo-amrwbenc [no]
691 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
692 ;; --enable-libxavs enable AVS encoding via xavs [no]
693 ;; --enable-libzmq enable message passing via libzmq [no]
694 ;; --enable-libzvbi enable teletext support via libzvbi [no]
695 ;; --enable-opencl enable OpenCL code
696 '("--enable-avresample"
697 "--enable-gpl" ; enable optional gpl licensed parts
700 "--enable-fontconfig"
707 "--enable-libfreetype"
708 "--enable-libmp3lame"
714 "--enable-libtwolame"
723 "--enable-runtime-cpudetect"
725 ;; The HTML pages take 7.2 MiB
726 "--disable-htmlpages"
728 ;; The static libraries are 23 MiB
731 ;; Runtime cpu detection is not implemented on
732 ;; MIPS, so we disable some features.
735 "--disable-mipsdspr2"
738 (modify-phases %standard-phases
741 ;; configure does not work followed by "SHELL=..." and
742 ;; "CONFIG_SHELL=..."; set environment variables instead
743 (lambda* (#:key outputs configure-flags #:allow-other-keys)
744 (let ((out (assoc-ref outputs "out")))
745 (substitute* "configure"
746 (("#! /bin/sh") (string-append "#!" (which "sh"))))
747 (setenv "SHELL" (which "bash"))
748 (setenv "CONFIG_SHELL" (which "bash"))
749 (zero? (apply system*
751 (string-append "--prefix=" out)
752 ;; Add $libdir to the RUNPATH of all the binaries.
753 (string-append "--extra-ldflags=-Wl,-rpath="
757 'check 'set-ld-library-path
759 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
761 (let* ((dso (find-files "." "\\.so$"))
762 (path (string-join (map dirname dso) ":")))
763 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
764 (setenv "LD_LIBRARY_PATH" path)
766 (home-page "https://www.ffmpeg.org/")
767 (synopsis "Audio and video framework")
768 (description "FFmpeg is a complete, cross-platform solution to record,
769 convert and stream audio and video. It includes the libavcodec
770 audio/video codec library.")
771 (license license:gpl2+)))
773 (define-public ffmpeg-2.8
779 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
783 "05m1272r5qa2r0ym5vq4figdfnpvcys1fgb1026n5s6xdjd1s1pg"))))
785 (substitute-keyword-arguments (package-arguments ffmpeg)
786 ((#:configure-flags flags)
788 (if (string=? flag "--disable-mipsdsp")
789 "--disable-mipsdspr1"
793 ;; Annoyingly enough, the latest mpv release does not build with the stable
794 ;; release of ffmpeg. Use a git commit until the situation is fixed.
795 (define-public ffmpeg-git
796 (let ((commit "3f887440677328c9cfed97ad81d14051ffa32aae")
801 (version (string-append "3.4-" revision "." (string-take commit 9)))
805 (url "https://github.com/FFmpeg/FFmpeg.git")
807 (file-name (string-append name "-" version "-checkout"))
810 "1b7n3g4m2rbvrwsgbfl8wl91z42g1ld42clwxs8qpl9ny5rwz6sq")))))))
819 "https://download.videolan.org/pub/videolan/vlc/"
820 version "/vlc-" version ".tar.xz"))
823 "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
824 (build-system gnu-build-system)
826 `(("git" ,git) ; needed for a test
827 ("pkg-config" ,pkg-config)))
828 ;; FIXME: Add optional inputs once available.
830 `(("alsa-lib" ,alsa-lib)
834 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
835 ("fontconfig" ,fontconfig)
836 ("freetype" ,freetype)
840 ("libdvbpsi" ,libdvbpsi)
841 ("libgcrypt" ,libgcrypt)
846 ("libsamplerate" ,libsamplerate)
848 ("libvorbis" ,libvorbis)
849 ("libtheora" ,libtheora)
852 ("libxinerama" ,libxinerama)
855 ("livemedia-utils" ,livemedia-utils)
860 ("pulseaudio" ,pulseaudio)
861 ("python" ,python-wrapper)
863 ("qtx11extras" ,qtx11extras)
865 ("sdl-image" ,sdl-image)
868 ("xcb-util-keysyms" ,xcb-util-keysyms)))
871 `("CXXFLAGS=-std=gnu++11"
872 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
873 (assoc-ref %build-inputs "ffmpeg")
874 "/lib")) ;needed for the tests
877 (modify-phases %standard-phases
878 (add-after 'unpack 'patch-source
879 (lambda* (#:key inputs #:allow-other-keys)
880 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
881 (substitute* "configure"
882 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
883 (string-append "LIVE555_PREFIX=" livemedia-utils)))
884 ;; Some of the tests require using the display to test out VLC,
885 ;; which fails in our sandboxed build system
886 (substitute* "test/run_vlc.sh"
887 (("./vlc --ignore-config") "echo"))
888 ;; XXX Likely not needed for >2.2.6.
889 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
890 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
892 (add-after 'install 'regenerate-plugin-cache
893 (lambda* (#:key outputs #:allow-other-keys)
894 ;; The 'install-exec-hook' rule in the top-level Makefile.am
895 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
896 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
897 ;; it references. Thus, we first reset the timestamps of all
898 ;; these files, and then regenerate the cache such that the
899 ;; mtimes it includes are always zero instead of being dependent
900 ;; on the build time.
901 (let* ((out (assoc-ref outputs "out"))
902 (pkglibdir (string-append out "/lib/vlc"))
903 (plugindir (string-append pkglibdir "/plugins"))
904 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
905 ;; TODO: Factorize 'reset-timestamps'.
906 (for-each (lambda (file)
907 (let ((s (lstat file)))
908 (unless (eq? (stat:type s) 'symlink)
909 (utime file 0 0 0 0))))
910 (find-files plugindir))
911 (zero? (system* cachegen plugindir))))))))
912 (home-page "https://www.videolan.org/")
913 (synopsis "Audio and video framework")
914 (description "VLC is a cross-platform multimedia player and framework
915 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
916 treaming protocols.")
917 (license license:gpl2+)))
919 (define-public mplayer
926 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
930 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
931 (build-system gnu-build-system)
932 ;; FIXME: Add additional inputs once available.
934 `(("pkg-config" ,pkg-config)))
936 `(("alsa-lib" ,alsa-lib)
937 ("cdparanoia" ,cdparanoia)
939 ("fontconfig" ,fontconfig)
940 ("freetype" ,freetype)
941 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
944 ("libdvdcss" ,libdvdcss)
945 ("libdvdnav" ,libdvdnav)
947 ("libmpeg2" ,libmpeg2)
948 ("libmpg123" ,mpg123) ; audio codec for MP3
950 ("libtheora" ,libtheora)
951 ("libvdpau" ,libvdpau)
952 ("libvorbis" ,libvorbis)
955 ("libxinerama" ,libxinerama)
957 ("libxxf86dga" ,libxxf86dga)
961 ("pulseaudio" ,pulseaudio)
962 ("python" ,python-wrapper)
968 `(#:tests? #f ; no test target
970 (modify-phases %standard-phases
972 ;; configure does not work followed by "SHELL=..." and
973 ;; "CONFIG_SHELL=..."; set environment variables instead
974 (lambda* (#:key inputs outputs #:allow-other-keys)
975 (let ((out (assoc-ref outputs "out"))
976 (libx11 (assoc-ref inputs "libx11")))
977 (substitute* "configure"
978 (("#! /bin/sh") (string-append "#!" (which "sh"))))
979 (setenv "SHELL" (which "bash"))
980 (setenv "CONFIG_SHELL" (which "bash"))
983 (string-append "--extra-cflags=-I"
984 libx11 "/include") ; to detect libx11
985 "--disable-ffmpeg_a" ; disables bundled ffmpeg
986 (string-append "--prefix=" out)
987 ;; Enable runtime cpu detection where supported,
988 ;; and choose a suitable target.
989 ,@(match (or (%current-target-system)
992 '("--enable-runtime-cpudetection"
993 "--target=x86_64-linux"))
995 '("--enable-runtime-cpudetection"
996 "--target=i686-linux"))
998 '("--target=mips3-linux"))
999 (_ (list (string-append
1001 (or (%current-target-system)
1002 (nix-system->gnu-triplet
1003 (%current-system)))))))
1004 "--disable-iwmmxt"))))))))
1005 (home-page "https://www.mplayerhq.hu/design7/news.html")
1006 (synopsis "Audio and video player")
1007 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1008 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1009 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1010 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1011 (license license:gpl2)))
1020 "https://github.com/mpv-player/mpv/archive/v" version
1024 "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
1025 (file-name (string-append name "-" version ".tar.gz"))))
1026 (build-system waf-build-system)
1028 `(("perl" ,perl) ; for zsh completion file
1029 ("pkg-config" ,pkg-config)
1030 ("python-docutils" ,python-docutils)))
1031 ;; Missing features: libguess, V4L2
1033 `(("alsa-lib" ,alsa-lib)
1035 ("ffmpeg" ,ffmpeg-git)
1040 ("libbluray" ,libbluray)
1041 ("libcaca" ,libcaca)
1042 ("libbs2b" ,libbs2b)
1043 ("libcdio-paranoia" ,libcdio-paranoia)
1044 ("libdvdread" ,libdvdread)
1045 ("libdvdnav" ,libdvdnav)
1046 ("libjpeg" ,libjpeg)
1048 ("libvdpau" ,libvdpau)
1050 ("libxext" ,libxext)
1051 ("libxinerama" ,libxinerama)
1052 ("libxrandr" ,libxrandr)
1053 ("libxscrnsaver" ,libxscrnsaver)
1055 ;; XXX: lua > 5.2 is not currently supported; see
1056 ;; waftools/checks/custom.py
1060 ("pulseaudio" ,pulseaudio)
1062 ("shaderc" ,shaderc)
1063 ("vulkan-icd-loader" ,vulkan-icd-loader)
1065 ("wayland" ,wayland)
1066 ("wayland-protocols" ,wayland-protocols)
1067 ("libxkbcommon" ,libxkbcommon)
1068 ("youtube-dl" ,youtube-dl)
1072 (modify-phases %standard-phases
1074 'configure 'setup-waf
1075 (lambda* (#:key inputs #:allow-other-keys)
1076 (copy-file (assoc-ref inputs "waf") "waf")
1077 (setenv "CC" "gcc"))))
1078 #:configure-flags (list "--enable-libmpv-shared"
1083 "--disable-build-date")
1084 ;; No check function defined.
1086 (home-page "https://mpv.io/")
1087 (synopsis "Audio and video player")
1088 (description "mpv is a general-purpose audio and video player. It is a
1089 fork of mplayer2 and MPlayer. It shares some features with the former
1090 projects while introducing many more.")
1091 (license license:gpl2+)))
1093 (define-public gnome-mpv
1100 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1101 "/download/v" version "/gnome-mpv-" version
1105 "03kjwd5jq0i5ajnvhjwf5019bjjaa16xkdrhdkiz1k58ipjvvj93"))))
1107 `(("intltool" ,intltool)
1108 ("pkg-config" ,pkg-config)))
1111 ("libepoxy" ,libepoxy)
1113 (build-system glib-or-gtk-build-system)
1114 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1115 (synopsis "GTK+ frontend for the mpv media player")
1116 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1117 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1118 access to mpv's powerful playback capabilities.")
1119 (license license:gpl3+)))
1121 (define-public libvpx
1126 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1129 (url "https://chromium.googlesource.com/webm/libvpx")
1130 (commit (string-append "v" version))))
1131 (file-name (git-file-name name version))
1134 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1135 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1136 (build-system gnu-build-system)
1138 `(#:configure-flags (list "--enable-shared"
1140 ;; Limit size to avoid CVE-2015-1258
1141 "--size-limit=16384x16384"
1142 (string-append "--prefix=" (assoc-ref %outputs "out")))
1143 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1144 (assoc-ref %outputs "out") "/lib"))
1145 #:phases (modify-phases %standard-phases
1147 (lambda* (#:key configure-flags #:allow-other-keys)
1148 ;; The configure script does not understand some of the GNU
1149 ;; options, so we only add the flags specified above.
1150 (apply invoke "./configure" configure-flags))))
1151 #:tests? #f)) ; no check target
1155 (synopsis "VP8/VP9 video codec")
1156 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1157 (license license:bsd-3)
1158 (home-page "https://www.webmproject.org/")))
1160 (define-public youtube-dl
1163 (version "2018.03.14")
1166 (uri (string-append "https://yt-dl.org/downloads/"
1167 version "/youtube-dl-"
1171 "0j8j797gqc29fd5ra3cjvwkp8dgvigdydsj0zzjs05zccfqrj9lh"))))
1172 (build-system python-build-system)
1174 ;; The problem here is that the directory for the man page and completion
1175 ;; files is relative, and for some reason, setup.py uses the
1176 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1177 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1178 ;; completion file is called 'youtube-dl' rather than
1179 ;; 'youtube-dl.bash-completion'.
1180 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1181 #:phases (modify-phases %standard-phases
1182 (add-before 'install 'fix-the-data-directories
1183 (lambda* (#:key outputs #:allow-other-keys)
1184 (let ((prefix (assoc-ref outputs "out")))
1185 (mkdir "bash-completion")
1186 (rename-file "youtube-dl.bash-completion"
1187 "bash-completion/youtube-dl")
1188 (substitute* "setup.py"
1189 (("youtube-dl\\.bash-completion")
1190 "bash-completion/youtube-dl")
1192 (string-append "'" prefix "/etc/"))
1194 (string-append "'" prefix "/share/")))
1196 (synopsis "Download videos from YouTube.com and other sites")
1198 "Youtube-dl is a small command-line program to download videos from
1199 YouTube.com and many more sites.")
1200 (home-page "https://yt-dl.org")
1201 (license license:public-domain)))
1203 (define-public youtube-dl-gui
1205 (name "youtube-dl-gui")
1210 (uri (pypi-uri "Youtube-DLG" version))
1213 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1214 (build-system python-build-system)
1216 ;; In Guix, wxpython has not yet been packaged for Python 3.
1217 `(#:python ,python-2
1218 ;; This package has no tests.
1221 (modify-phases %standard-phases
1222 (add-before 'build 'patch-source
1223 (lambda* (#:key inputs #:allow-other-keys)
1224 ;; The youtube-dl-gui program lets you configure options. Some of
1225 ;; them are problematic, so we change their defaults.
1226 (substitute* "youtube_dl_gui/optionsmanager.py"
1227 ;; When this is true, the builder process will try (and fail) to
1228 ;; write logs to the builder user's home directory.
1229 (("'enable_log': True") "'enable_log': False")
1230 ;; This determines which youtube-dl program youtube-dl-gui will
1231 ;; run. If we don't set this, then youtube-dl-gui might download
1232 ;; an arbitrary copy from the Internet into the user's home
1233 ;; directory and run it, so let's make sure youtube-dl-gui uses
1234 ;; the youtube-dl from the inputs by default.
1235 (("'youtubedl_path': self.config_path")
1236 (string-append "'youtubedl_path': '"
1237 (assoc-ref inputs "youtube-dl")
1239 ;; When this is True, when youtube-dl-gui is finished downloading
1240 ;; a file, it will try (and possibly fail) to open the directory
1241 ;; containing the downloaded file. This can fail because it
1242 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1243 ;; adding xdg-utils to the propagated inputs is not enough to
1244 ;; make this work, so for now we set the default to False.
1245 (("'open_dl_dir': True") "'open_dl_dir': False"))
1246 ;; The youtube-dl program from the inputs is actually a wrapper
1247 ;; script written in bash, so attempting to invoke it as a python
1248 ;; script will fail.
1249 (substitute* "youtube_dl_gui/downloaders.py"
1250 (("cmd = \\['python', self\\.youtubedl_path\\]")
1251 "cmd = [self.youtubedl_path]"))
1252 ;; Use relative paths for installing data files so youtube-dl-gui
1253 ;; installs the files relative to its prefix in the store, rather
1254 ;; than relative to /. Also, instead of installing data files into
1255 ;; $prefix/usr/share, install them into $prefix/share for
1256 ;; consistency (see: (standards) Directory Variables).
1257 (substitute* "setup.py"
1258 (("= '/usr/share") "= 'share"))
1259 ;; Update get_locale_file() so it finds the installed localization
1261 (substitute* "youtube_dl_gui/utils.py"
1262 (("os\\.path\\.join\\('/usr', 'share'")
1263 (string-append "os.path.join('"
1264 (assoc-ref %outputs "out")
1265 "', 'share'"))))))))
1267 `(("python2-wxpython" ,python2-wxpython)
1268 ("youtube-dl" ,youtube-dl)))
1269 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1271 "GUI (Graphical User Interface) for @command{youtube-dl}")
1273 "Youtube-dlG is a GUI (Graphical User Interface) for
1274 @command{youtube-dl}. You can use it to download videos from YouTube and any
1275 other site that youtube-dl supports.")
1276 (license license:unlicense)))
1278 (define-public you-get
1281 (version "0.4.1040")
1285 "https://github.com/soimort/you-get/archive/v"
1287 (file-name (string-append name "-" version ".tar.gz"))
1290 "0257p9bn426rv0cjk2j5hsx6cg7dz5gpjwlqq0sy1axa47phis46"))))
1291 (build-system python-build-system)
1293 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1296 (modify-phases %standard-phases
1297 (add-after 'unpack 'qualify-input-references
1298 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1299 ;; happens to be in the user's $PATH at run time.
1300 (lambda* (#:key inputs #:allow-other-keys)
1301 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1303 (substitute* "src/you_get/processor/ffmpeg.py"
1304 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1305 ;; same string is also used when sniffing ffmpeg's output.
1306 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1307 (string-append prefix "'" ffmpeg "'")))
1309 #:tests? #f)) ; XXX some tests need Internet access
1310 (synopsis "Download videos, audio, or images from Web sites")
1312 "You-Get is a command-line utility to download media contents (videos,
1313 audio, images) from the Web. It can use either mpv or vlc for playback.")
1314 (home-page "https://you-get.org/")
1315 (license license:expat)))
1317 (define-public youtube-viewer
1319 (name "youtube-viewer")
1324 "https://github.com/trizen/youtube-viewer/archive/"
1326 (file-name (string-append name "-" version ".tar.gz"))
1329 "1j572his6qmazlmyrbnfq62s9bqml875ay7wy26byy9hfc7m0vgk"))))
1330 (build-system perl-build-system)
1332 `(("perl-module-build" ,perl-module-build)))
1333 ;; FIXME: Add optional dependencies once available:
1334 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1336 `(("perl-data-dump" ,perl-data-dump)
1337 ("perl-file-sharedir" ,perl-file-sharedir)
1338 ("perl-gtk2" ,perl-gtk2)
1339 ("perl-json" ,perl-json)
1340 ("perl-libwww" ,perl-libwww)
1341 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1342 ("perl-mozilla-ca" ,perl-mozilla-ca)
1343 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1345 `(#:modules ((guix build perl-build-system)
1348 #:module-build-flags '("--gtk")
1350 (modify-phases %standard-phases
1351 (add-after 'install 'wrap-program
1352 (lambda* (#:key outputs #:allow-other-keys)
1353 (let* ((out (assoc-ref outputs "out"))
1354 (bin-dir (string-append out "/bin/"))
1355 (site-dir (string-append out "/lib/perl5/site_perl/"))
1356 (lib-path (getenv "PERL5LIB")))
1357 (for-each (cut wrap-program <>
1358 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1359 (find-files bin-dir))
1362 "Lightweight application for searching and streaming videos from YouTube")
1364 "Youtube-viewer searches and plays YouTube videos in a native player.
1365 It comes with various search options; it can search for videos, playlists
1366 and/or channels. The videos are streamed directly in a selected video player
1367 at the best resolution (customizable) and with closed-captions (if available).
1368 Both command-line and GTK2 interface are available.")
1369 (home-page "https://github.com/trizen/youtube-viewer")
1370 (license license:perl-license)))
1372 (define-public libbluray
1378 (uri (string-append "https://download.videolan.org/videolan/"
1379 name "/" version "/"
1380 name "-" version ".tar.bz2"))
1383 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1384 (build-system gnu-build-system)
1386 `(#:configure-flags '("--disable-bdjava-jar")
1388 (modify-phases %standard-phases
1389 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1390 ;; Avoid the need to propagate libxml2 by referring to it
1391 ;; directly, as is already done for fontconfig & freetype.
1392 (lambda* (#:key inputs #:allow-other-keys)
1393 (let ((libxml2 (assoc-ref inputs "libxml2")))
1394 (substitute* "configure"
1395 ((" libxml-2.0") ""))
1396 (substitute* "src/libbluray.pc.in"
1397 (("^Libs.private:" field)
1398 (string-append field " -L" libxml2 "/lib -lxml2")))
1400 (add-before 'build 'fix-dlopen-paths
1401 (lambda* (#:key inputs #:allow-other-keys)
1402 (let ((libaacs (assoc-ref inputs "libaacs"))
1403 (libbdplus (assoc-ref inputs "libbdplus")))
1404 (substitute* "src/libbluray/disc/aacs.c"
1406 (string-append "\"" libaacs "/lib/libaacs\"")))
1407 (substitute* "src/libbluray/disc/bdplus.c"
1409 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1411 (native-inputs `(("pkg-config" ,pkg-config)))
1413 `(("fontconfig" ,fontconfig)
1414 ("freetype" ,freetype)
1415 ("libaacs" ,libaacs)
1416 ("libbdplus" ,libbdplus)
1417 ("libxml2" ,libxml2)))
1418 (home-page "https://www.videolan.org/developers/libbluray.html")
1419 (synopsis "Blu-Ray Disc playback library")
1421 "libbluray is a library designed for Blu-Ray Disc playback for media
1422 players, like VLC or MPlayer.")
1423 (license license:lgpl2.1+)))
1425 (define-public libdvdread
1431 (uri (string-append "https://download.videolan.org/videolan/"
1432 name "/" version "/"
1433 name "-" version ".tar.bz2"))
1436 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1437 (build-system gnu-build-system)
1439 `(#:configure-flags '("--with-libdvdcss=yes")))
1441 `(("pkg-config" ,pkg-config)))
1443 `(("libdvdcss" ,libdvdcss)))
1444 (home-page "http://dvdnav.mplayerhq.hu/")
1445 (synopsis "Library for reading video DVDs")
1447 "Libdvdread provides a simple foundation for reading DVD video
1448 disks. It provides the functionality that is required to access many
1449 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1450 authentication and descrambling (if an external libdvdcss library is
1452 (license license:gpl2+)))
1454 (define-public dvdauthor
1461 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1465 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1466 (build-system gnu-build-system)
1468 `(("libdvdread" ,libdvdread)
1470 ("imagemagick" ,imagemagick)
1471 ("libxml2" ,libxml2)
1472 ("freetype" ,freetype)))
1474 `(("pkg-config" ,pkg-config)))
1475 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1476 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1477 MPEG-2 stream containing VOB packets.")
1478 (home-page "http://dvdauthor.sourceforge.net")
1479 (license license:gpl3+)))
1481 (define-public libdvdnav
1487 (uri (string-append "https://download.videolan.org/videolan/"
1488 name "/" version "/"
1489 name "-" version ".tar.bz2"))
1492 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1493 (build-system gnu-build-system)
1495 `(("pkg-config" ,pkg-config)))
1497 `(("libdvdread" ,libdvdread)))
1498 (home-page "http://dvdnav.mplayerhq.hu/")
1499 (synopsis "Library for video DVD navigation features")
1501 "Libdvdnav is a library for developers of multimedia
1502 applications. It allows easy use of sophisticated DVD navigation features
1503 such as DVD menus, multiangle playback and even interactive DVD games. All
1504 this functionality is provided through a simple API which provides the DVD
1505 playback as a single logical stream of blocks, intermitted by special
1506 dvdnav events to report certain conditions. The main usage of libdvdnav is
1507 a loop regularly calling a function to get the next block, surrounded by
1508 additional calls to tell the library of user interaction. The whole
1509 DVD virtual machine and internal playback states are completely
1511 (license license:gpl2+)))
1513 (define-public libdvdcss
1519 (uri (string-append "https://download.videolan.org/pub/"
1520 name "/" version "/"
1521 name "-" version ".tar.bz2"))
1524 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1525 (build-system gnu-build-system)
1526 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1527 (synopsis "Library for accessing DVDs as block devices")
1529 "libdvdcss is a simple library designed for accessing DVDs like a block
1530 device without having to bother about the decryption.")
1531 (license license:gpl2+)))
1533 (define-public srt2vtt
1540 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1544 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1545 (build-system gnu-build-system)
1547 `(("guile" ,guile-2.0)))
1548 (synopsis "SubRip to WebVTT subtitle converter")
1549 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1550 for use with HTML5 video.")
1551 (home-page "http://dthompson.us/pages/software/srt2vtt")
1552 (license license:gpl3+)))
1554 (define-public avidemux
1561 "mirror://sourceforge/" name "/" name "/" version "/"
1562 name "_" version ".tar.gz"))
1565 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1566 (patches (search-patches "avidemux-install-to-lib.patch"))))
1567 (build-system cmake-build-system)
1569 `(("pkg-config" ,pkg-config)))
1570 ;; FIXME: Once packaged, add libraries not found during the build.
1572 `(("alsa-lib" ,alsa-lib)
1573 ("fontconfig" ,fontconfig)
1574 ("freetype" ,freetype)
1575 ("fribidi" ,fribidi)
1580 ("libvdpau" ,libvdpau)
1581 ("libvorbis" ,libvorbis)
1585 ("pulseaudio" ,pulseaudio)
1586 ("python" ,python-wrapper)
1587 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1588 ;("qtbase" ,qtbase) with -std=gnu++11.
1589 ;("qttools" ,qttools)
1595 `(#:tests? #f ; no check target
1597 ;; Make sure files inside the included ffmpeg tarball are
1599 (modify-phases %standard-phases
1600 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1602 (with-directory-excursion "avidemux_core/ffmpeg_package"
1603 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1604 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1605 (add-after 'patch-source-shebangs 'repack-ffmpeg
1607 (with-directory-excursion "avidemux_core/ffmpeg_package"
1608 (substitute* "ffmpeg-2.7.6/configure"
1609 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1610 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1611 ;; avoid non-determinism in the archive
1612 "--sort=name" "--mtime=@0"
1613 "--owner=root:0" "--group=root:0")
1614 (delete-file-recursively "ffmpeg-2.7.6"))))
1617 ;; Copy-paste settings from the cmake build system.
1618 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1619 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1621 (lambda* (#:key inputs outputs #:allow-other-keys)
1623 ((out (assoc-ref outputs "out"))
1624 (lib (string-append out "/lib"))
1626 (sdl (assoc-ref inputs "sdl"))
1628 (lambda* (component srcdir #:optional (args '()))
1629 (let ((builddir (string-append "build_" component)))
1631 (with-directory-excursion builddir
1634 (apply system* "cmake"
1635 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1636 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1637 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1638 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1639 "\"-Wl,-rpath=" lib "\"")
1640 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1641 (string-append "-DSDL_INCLUDE_DIR="
1643 (string-append "../" srcdir)
1646 (system* "make" "-j"
1647 (number->string (parallel-job-count)))
1648 (system* "make" "install"))))))))
1650 (and (build_component "core" "avidemux_core")
1651 (build_component "cli" "avidemux/cli")
1652 (build_component "qt4" "avidemux/qt4")
1653 (build_component "plugins_common" "avidemux_plugins"
1654 '("-DPLUGIN_UI=COMMON"))
1655 (build_component "plugins_cli" "avidemux_plugins"
1656 '("-DPLUGIN_UI=CLI"))
1657 (build_component "plugins_qt4" "avidemux_plugins"
1658 '("-DPLUGIN_UI=QT4"))
1659 (build_component "plugins_settings" "avidemux_plugins"
1660 '("-DPLUGIN_UI=SETTINGS")))
1661 ;; Remove .exe and .dll file.
1662 (delete-file-recursively
1663 (string-append out "/share/ADM6_addons")))))
1664 (delete 'install))))
1665 (home-page "http://fixounet.free.fr/avidemux/")
1666 (synopsis "Video editor")
1667 (description "Avidemux is a video editor designed for simple cutting,
1668 filtering and encoding tasks. It supports many file types, including AVI,
1669 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1670 can be automated using projects, job queue and powerful scripting
1672 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1673 ;; Software with various licenses is included, see License.txt.
1674 (license license:gpl2+)))
1676 (define-public vapoursynth
1678 (name "vapoursynth")
1683 "https://github.com/vapoursynth/vapoursynth/archive/R"
1685 (file-name (string-append name "-" version ".tar.gz"))
1688 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1689 (build-system gnu-build-system)
1691 `(("autoconf" ,autoconf)
1692 ("automake" ,automake)
1693 ("cython" ,python-cython)
1694 ("libtool" ,libtool)
1695 ("pkg-config" ,pkg-config)
1699 `(("ffmpeg" ,ffmpeg)
1701 ("tesseract-ocr" ,tesseract-ocr)
1705 (modify-phases %standard-phases
1709 (zero? (system* "sh" "autogen.sh")))))))
1710 (home-page "http://www.vapoursynth.com/")
1711 (synopsis "Video processing framework")
1712 (description "VapourSynth is a C++ library and Python module for video
1713 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1714 multithreading, generalized colorspaces, per frame properties, and videos with
1716 ;; src/core/cpufeatures only allows x86, ARM or PPC
1717 (supported-systems (fold delete %supported-systems
1718 '("mips64el-linux" "aarch64-linux")))
1719 ;; As seen from the source files.
1720 (license license:lgpl2.1+)))
1729 "http://downloads.xvid.org/downloads/xvidcore-"
1730 version ".tar.bz2"))
1733 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1734 (build-system gnu-build-system)
1735 (native-inputs `(("yasm" ,yasm)))
1738 (modify-phases %standard-phases
1740 'configure 'pre-configure
1742 (chdir "build/generic")
1743 (substitute* "configure"
1744 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1745 ;; No 'check' target.
1747 (home-page "https://www.xvid.com/")
1748 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1749 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1750 codec library. It uses ASP features such as b-frames, global and quarter
1751 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1752 and custom quantization matrices.")
1753 (license license:gpl2+)))
1755 (define-public streamlink
1762 (uri (pypi-uri "streamlink" version))
1765 "02h8b3k8l5zz4vjm0nhxvl1pm924jms8y7sjl40fbybrzvsa4mg2"))))
1766 (build-system python-build-system)
1767 (home-page "https://github.com/streamlink/streamlink")
1769 `(("python-pytest" ,python-pytest)
1770 ("python-mock" ,python-mock)
1771 ("python-requests-mock" ,python-requests-mock)))
1773 `(("python-pysocks" ,python-pysocks)
1774 ("python-websocket-client" ,python-websocket-client)
1775 ("python-iso3166" ,python-iso3166)
1776 ("python-iso639" ,python-iso639)
1777 ("python-pycryptodome" ,python-pycryptodome)
1778 ("python-requests" ,python-requests)
1779 ("python-urllib3" ,python-urllib3)))
1780 (synopsis "Extract streams from various services")
1781 (description "Streamlink is command-line utility that extracts streams
1782 from sites like Twitch.tv and pipes them into a video player of choice.")
1783 (license license:bsd-2)))
1785 (define-public livestreamer
1786 (deprecated-package "livestreamer" streamlink))
1788 (define-public twitchy
1789 (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
1792 (version (git-version "3.2" "1" commit))
1797 (url "https://github.com/BasioMeusPuga/twitchy.git")
1799 (file-name (git-file-name name version))
1802 "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
1803 (build-system python-build-system)
1806 (modify-phases %standard-phases
1807 (add-before 'check 'check-setup
1809 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
1812 `(("python-requests" ,python-requests)
1813 ("streamlink" ,streamlink)))
1814 (home-page "https://github.com/BasioMeusPuga/twitchy")
1815 (synopsis "Command-line interface for Twitch.tv")
1817 "This package provides a command-line interface for Twitch.tv")
1818 (license license:gpl3+))))
1826 (uri (string-append "https://github.com/mltframework/mlt/"
1827 "archive/v" version ".tar.gz"))
1828 (file-name (string-append name "-" version ".tar.gz"))
1831 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
1832 (modules '((guix build utils)))
1834 ;; As of glibc 2.26, <xlocale.h> no longer is.
1835 '(substitute* "src/framework/mlt_property.h"
1836 (("xlocale\\.h") "locale.h")))))
1837 (build-system gnu-build-system)
1839 `(#:tests? #f ; no tests
1840 #:make-flags '("CC=gcc")
1842 (list "--enable-gpl3"
1845 (modify-phases %standard-phases
1847 'configure 'override-LDFLAGS
1848 (lambda* (#:key outputs #:allow-other-keys)
1849 (substitute* "config.mak"
1851 (string-append "LDFLAGS+=-Wl,-rpath="
1852 (assoc-ref outputs "out")
1856 `(("alsa-lib" ,alsa-lib)
1859 ("libxml2" ,libxml2)
1862 ("libsamplerate" ,libsamplerate)
1863 ("pulseaudio" ,pulseaudio)
1867 `(("pkg-config" ,pkg-config)))
1868 (home-page "https://www.mltframework.org/")
1869 (synopsis "Author, manage, and run multitrack audio/video compositions")
1871 "MLT is a multimedia framework, designed and developed for television
1872 broadcasting. It provides a toolkit for broadcasters, video editors, media
1873 players, transcoders, web streamers and many more types of applications. The
1874 functionality of the system is provided via an assortment of ready to use
1875 tools, XML authoring components, and an extensible plug-in based API.")
1876 (license license:gpl3)))
1878 (define-public v4l-utils
1884 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1885 "/v4l-utils-" version ".tar.bz2"))
1888 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1889 (build-system gnu-build-system)
1892 (list (string-append "--with-udevdir="
1893 (assoc-ref %outputs "out")
1895 "CXXFLAGS=-std=gnu++11")))
1898 ("pkg-config" ,pkg-config)))
1900 `(("alsa-lib" ,alsa-lib)
1902 ("libjpeg" ,libjpeg)
1906 (synopsis "Realtime video capture utilities for Linux")
1907 (description "The v4l-utils provide a series of libraries and utilities to
1908 be used for realtime video capture via Linux-specific APIs.")
1909 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1910 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1911 (license (list license:lgpl2.1+ license:gpl2))))
1919 (uri (string-append "https://github.com/jp9000/obs-studio"
1920 "/archive/" version ".tar.gz"))
1921 (file-name (string-append name "-" version ".tar.gz"))
1924 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1925 (build-system cmake-build-system)
1927 `(#:tests? #f)) ; no tests
1929 `(("pkg-config" ,pkg-config)))
1931 `(("alsa-lib" ,alsa-lib)
1935 ("fontconfig" ,fontconfig)
1936 ("freetype" ,freetype)
1938 ("jansson" ,jansson)
1939 ("libx264" ,libx264)
1940 ("libxcomposite" ,libxcomposite)
1942 ("pulseaudio" ,pulseaudio)
1944 ("qtx11extras" ,qtx11extras)
1946 ("v4l-utils" ,v4l-utils)
1948 (synopsis "Live streaming software")
1949 (description "Open Broadcaster Software provides a graphical interface for
1950 video recording and live streaming. OBS supports capturing audio and video
1951 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1953 (home-page "https://obsproject.com")
1954 (supported-systems '("x86_64-linux" "i686-linux"))
1955 (license license:gpl2+)))
1957 (define-public libvdpau
1964 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1965 name "-" version ".tar.bz2"))
1968 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1969 (build-system gnu-build-system)
1971 `(("pkg-config" ,pkg-config)))
1973 `(("dri2proto" ,dri2proto)
1974 ("libx11" ,libx11 "out")
1975 ("libxext" ,libxext)))
1976 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1977 (synopsis "Video Decode and Presentation API")
1978 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1979 provides an interface to video decode acceleration and presentation hardware
1980 present in modern GPUs.")
1981 (license (license:x11-style "file://COPYING"))))
1983 (define-public vdpauinfo
1990 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1991 name "-" version ".tar.gz"))
1994 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1995 (build-system gnu-build-system)
1997 `(("pkg-config" ,pkg-config)
1998 ("libx11" ,libx11)))
2000 `(("libvdpau" ,libvdpau)))
2001 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2002 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2003 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2005 (license (license:x11-style "file://COPYING"))))
2007 (define-public libvdpau-va-gl
2009 (name "libvdpau-va-gl")
2014 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2015 "releases/download/v" version "/libvdpau-va-gl-"
2019 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2020 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2021 (modules '((guix build utils)))
2022 (snippet '(delete-file-recursively "3rdparty"))))
2023 (build-system cmake-build-system)
2025 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2027 `(("libvdpau" ,libvdpau)
2028 ("pkg-config" ,pkg-config)))
2032 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2033 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2035 "Many applications can use VDPAU to accelerate portions of the video
2036 decoding process and video post-processing to the GPU video hardware. Since
2037 there is no VDPAU available on Intel chips, they fall back to different drawing
2038 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2039 scaling and VA-API (if available) to accelerate video decoding.")
2040 (license license:expat)))
2042 (define-public recordmydesktop
2044 (name "recordmydesktop")
2048 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2049 version "/recordmydesktop-" version ".tar.gz"))
2052 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2053 (build-system gnu-build-system)
2054 (inputs `(("popt" ,popt)
2059 ("libxfixes" ,libxfixes)
2060 ("libxdamage" ,libxdamage)
2061 ("libxext" ,libxext)
2062 ("alsa-lib" ,alsa-lib)
2063 ("libvorbis" ,libvorbis)
2064 ("libtheora" ,libtheora)))
2065 (home-page "http://recordmydesktop.sourceforge.net/")
2066 (synopsis "Desktop session video recorder")
2068 "recordMyDesktop is a command-line tool that captures the activity in
2069 your graphical desktop and encodes it as a video. This is a useful tool for
2070 making @dfn{screencasts}.")
2071 (license license:gpl2+)))
2073 (define-public simplescreenrecorder
2075 (name "simplescreenrecorder")
2080 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2082 (file-name (string-append name "-" version ".tar.gz"))
2085 "02rl9yyx3hlz9fqvgzv7ipmvx2qahj7ws5wx2m7zs3lssq3qag3g"))))
2086 (build-system cmake-build-system)
2087 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2088 ;; README.md, the program builds and functions properly without them.
2089 ;; As a result, they are omitted. Please add them back if problems appear.
2091 `(("alsa-lib" ,alsa-lib)
2096 ("pulseaudio" ,pulseaudio)
2098 (native-inputs `(("pkg-config" ,pkg-config)))
2101 (list "-DWITH_QT5=TRUE")
2102 #:tests? #f)) ; no test suite
2103 ;; Using HTTPS causes part of the page to be displayed improperly.
2104 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2105 (synopsis "Screen recorder")
2106 (description "SimpleScreenRecorder is an easy to use screen recorder with
2107 a graphical user interface. It supports recording the entire screen, or a
2108 part of it, and allows encoding in many different codecs and file formats.
2109 Other features include a live preview and live streaming.")
2110 (license (list license:gpl3+ ; most files
2111 license:zlib ; glinject/elfhacks.*
2112 license:isc ; glinject/*
2113 license:x11)))) ; build-aux/install-sh
2115 (define-public libsmpeg
2122 (url "svn://svn.icculus.org/smpeg/trunk/")
2123 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2124 (file-name (string-append name "-" version "-checkout"))
2127 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2128 (build-system gnu-build-system)
2130 `(#:phases (modify-phases %standard-phases
2131 (add-after 'unpack 'autogen.sh
2133 (zero? (system* "sh" "autogen.sh")))))))
2135 `(("autoconf" ,autoconf)
2136 ("automake" ,automake)))
2139 (home-page "http://icculus.org/smpeg/")
2140 (synopsis "SDL MPEG decoding library")
2142 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2143 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2144 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2145 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2146 and MPEG system streams.")
2147 (license (list license:expat
2152 (define-public libbdplus
2159 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2160 version "/" name "-" version ".tar.bz2"))
2162 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2164 `(("libgcrypt" ,libgcrypt)))
2165 (build-system gnu-build-system)
2166 (home-page "https://www.videolan.org/developers/libbdplus.html")
2167 (synopsis "Library for decrypting certain Blu-Ray discs")
2168 (description "libbdplus is a library which implements the BD+ System
2170 (license license:lgpl2.1+)))
2172 (define-public libaacs
2179 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2180 version "/" name "-" version ".tar.bz2"))
2182 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2184 `(("libgcrypt" ,libgcrypt)))
2188 (build-system gnu-build-system)
2189 (home-page "https://www.videolan.org/developers/libaacs.html")
2190 (synopsis "Library for decrypting certain Blu-Ray discs")
2191 (description "libaacs is a library which implements the Advanced Access
2192 Content System specification.")
2193 (license license:lgpl2.1+)))
2195 (define-public mps-youtube
2197 (name "mps-youtube")
2202 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2203 "archive/v" version ".tar.gz"))
2204 (file-name (string-append name "-" version ".tar.gz"))
2207 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2208 (build-system python-build-system)
2210 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2211 ;; test suite results differ depending on the country and also introduce
2212 ;; non-determinism in the tests.
2213 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2216 `(("python-pafy" ,python-pafy)
2217 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2218 (home-page "https://github.com/mps-youtube/mps-youtube")
2219 (synopsis "Terminal based YouTube player and downloader")
2221 "@code{mps-youtube} is based on mps, a terminal based program to
2222 search, stream and download music. This implementation uses YouTube as
2223 a source of content and can play and download video as well as audio.
2224 It can use either mpv or mplayer for playback, and for conversion of
2225 formats ffmpeg or libav is used. Users should install one of the
2226 supported players in addition to this package.")
2227 (license license:gpl3+)))
2229 (define-public handbrake
2235 (uri (string-append "https://handbrake.fr/rotation.php?file="
2236 "HandBrake-" version ".tar.bz2"))
2237 (file-name (string-append "handbrake-" version ".tar.bz2"))
2240 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2241 (patches (search-patches "handbrake-pkg-config-path.patch"))
2242 (modules '((guix build utils)))
2244 ;; Remove bundled libraries and source not necessary for
2245 ;; running under a GNU environment.
2247 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2249 (build-system glib-or-gtk-build-system)
2251 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2252 ("autoconf" ,autoconf)
2253 ("curl" ,curl) ;not actually used, but tested for
2254 ("intltool" ,intltool)
2255 ("libtool" ,libtool)
2256 ("pkg-config" ,pkg-config)
2257 ("python" ,python-2))) ;for configuration
2260 ("dbus-glib" ,dbus-glib)
2262 ("fontconfig" ,fontconfig)
2263 ("freetype" ,freetype)
2265 ("gstreamer" ,gstreamer)
2266 ("gst-plugins-base" ,gst-plugins-base)
2270 ("libbluray" ,libbluray)
2271 ("libdvdnav" ,libdvdnav)
2272 ("libdvdread" ,libdvdread)
2273 ("libgudev" ,libgudev)
2274 ("libmpeg2" ,libmpeg2)
2275 ("libnotify" ,libnotify)
2277 ("libsamplerate" ,libsamplerate)
2278 ("libtheora" ,libtheora)
2279 ("libvorbis" ,libvorbis)
2281 ("libxml2" ,libxml2)
2282 ("libx264" ,libx264)
2286 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2288 (modify-phases %standard-phases
2289 (add-before 'patch-source-shebangs 'bootstrap-gtk
2290 ;; Run bootstrap ahead of time so that shebangs get patched.
2292 (setenv "CONFIG_SHELL" (which "sh"))
2293 (setenv "NOCONFIGURE" "1")
2294 ;; Patch the Makefile so that it doesn't bootstrap again.
2295 (substitute* "gtk/module.rules"
2296 ((".*autogen\\.sh.*") ""))
2297 (zero? (system* "sh" "./gtk/autogen.sh"))))
2298 (add-before 'configure 'disable-contrib
2300 (substitute* "make/include/main.defs"
2301 ;; Disable unconditional inclusion of some "contrib"
2302 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2303 ;; and libbluray), which would lead to fetching and
2304 ;; building of these libraries. Use our own instead.
2305 (("MODULES \\+= contrib") "# MODULES += contrib"))
2307 (add-before 'configure 'fix-x265-linking
2309 (substitute* "test/module.defs"
2310 ;; Fix missing library during linking error
2311 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2314 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2315 ;; 'configure' is not an autoconf-generated script, and
2316 ;; errors on unrecognized arguments,
2317 ;; e.g. --enable-fast-install
2318 (let ((out (assoc-ref outputs "out")))
2319 (zero? (apply system* "./configure"
2320 (string-append "--prefix=" out)
2321 (or configure-flags '()))))))
2322 (add-after 'configure 'chdir-build
2323 (lambda _ (chdir "./build") #t)))))
2324 (home-page "https://handbrake.fr")
2325 (synopsis "Video transcoder")
2327 "HandBrake is a tool for converting video from any format to a selection
2328 of modern, widely supported codecs.")
2329 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2330 (license (list license:gpl2+ license:bsd-3))))
2332 (define-public openh264
2338 (uri (string-append "https://github.com/cisco/"
2339 name "/archive/v" version ".tar.gz"))
2340 (file-name (string-append name "-" version ".tar.gz"))
2343 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2344 (build-system gnu-build-system)
2347 ("python" ,python)))
2349 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2351 #:test-target "test"
2352 #:phases (modify-phases %standard-phases
2353 ;; no configure script
2354 (delete 'configure))))
2355 (home-page "http://www.openh264.org/")
2356 (synopsis "H264 decoder library")
2358 "Openh264 is a library which can decode H264 video streams.")
2359 (license license:bsd-2)))
2361 (define-public libmp4v2
2368 ;; XXX: The new location of upstream is uncertain and will become relevant the
2369 ;; moment when the googlecode archive shuts down. It is past the date it
2370 ;; should've been turned off. I tried to communicate with upstream, but this
2371 ;; wasn't very responsive and not very helpful. The short summary is, it is
2372 ;; chaos when it comes to the amount of forks and only time will tell where
2373 ;; the new upstream location is.
2374 (uri (string-append "https://storage.googleapis.com/google-"
2375 "code-archive-downloads/v2/"
2376 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2377 (file-name (string-append name "-" version ".tar.bz2"))
2380 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2381 (build-system gnu-build-system)
2383 "static")) ; 3.7MiB .a file
2386 (modify-phases %standard-phases
2387 (add-after 'unpack 'remove-dates
2389 ;; Make the build reproducible.
2390 (substitute* "configure"
2391 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2392 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2394 (add-after 'install 'move-static-libraries
2395 (lambda* (#:key outputs #:allow-other-keys)
2396 ;; Move static libraries to the "static" output.
2397 (let* ((out (assoc-ref outputs "out"))
2398 (lib (string-append out "/lib"))
2399 (static (assoc-ref outputs "static"))
2400 (slib (string-append static "/lib")))
2402 (for-each (lambda (file)
2403 (install-file file slib)
2405 (find-files lib "\\.a$"))
2408 `(("help2man" ,help2man)
2409 ("dejagnu" ,dejagnu)))
2410 (home-page "https://code.google.com/archive/p/mp4v2/")
2411 (synopsis "API to create and modify mp4 files")
2413 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2414 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2415 file format that has been used as a multimedia file format in a variety of platforms and
2416 applications. It is a very powerful and extensible format that can accommodate
2417 practically any type of media.")
2418 (license license:mpl1.1)))
2420 (define-public libmediainfo
2422 (name "libmediainfo")
2426 (uri (string-append "https://mediaarea.net/download/source/"
2428 name "_" version ".tar.bz2"))
2431 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2432 ;; TODO add a Big Buck Bunny webm for tests.
2434 `(("autoconf" ,autoconf)
2435 ("automake" ,automake)
2436 ("libtool" ,libtool)
2437 ("pkg-config" ,pkg-config)
2439 ("tinyxml2" ,tinyxml2)
2441 ("libzen" ,libzen)))
2442 (build-system gnu-build-system)
2444 '(#:tests? #f ; see above TODO
2446 ;; build scripts not in root of archive
2447 (modify-phases %standard-phases
2448 (add-after 'unpack 'change-to-build-dir
2450 (chdir "Project/GNU/Library")
2452 (add-after 'change-to-build-dir 'autogen
2454 (zero? (system* "sh" "autogen.sh")))))))
2455 (home-page "https://mediaarea.net/en/MediaInfo")
2456 (synopsis "Library for retrieving media metadata")
2457 (description "MediaInfo is a library used for retrieving technical
2458 information and other metadata about audio or video files. A non-exhaustive
2459 list of the information MediaInfo can retrieve from media files include:
2462 @item General: title, author, director, album, track number, date, duration...
2463 @item Video: codec, aspect, fps, bitrate...
2464 @item Audio: codec, sample rate, channels, language, bitrate...
2465 @item Text: language of subtitle
2466 @item Chapters: number of chapters, list of chapters
2469 MediaInfo supports the following formats:
2472 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2473 MPEG-2, MPEG-4, DVD (VOB)...
2474 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2475 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2476 @item Subtitles: SRT, SSA, ASS, SAMI...
2478 (license license:bsd-2)))
2480 ;; TODO also have a GUI version available
2481 (define-public mediainfo
2487 (uri (string-append "https://mediaarea.net/download/source/"
2488 name "/" version "/"
2489 name "_" version ".tar.bz2"))
2492 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2494 `(("autoconf" ,autoconf)
2495 ("automake" ,automake)
2496 ("libtool" ,libtool)
2497 ("pkg-config" ,pkg-config)
2499 ("libmediainfo" ,libmediainfo)
2500 ("libzen" ,libzen)))
2501 (build-system gnu-build-system)
2503 '(#:tests? #f ; lacks tests
2505 ;; build scripts not in root of archive
2506 (modify-phases %standard-phases
2507 (add-after 'unpack 'change-to-build-dir
2509 (chdir "Project/GNU/CLI")
2511 (add-after 'change-to-build-dir 'autogen
2513 (zero? (system* "sh" "autogen.sh")))))))
2514 (home-page "https://mediaarea.net/en/MediaInfo")
2515 (synopsis "Utility for reading media metadata")
2516 (description "MediaInfo is a utility used for retrieving technical
2517 information and other metadata about audio or video files. It supports the
2518 many codecs and formats supported by libmediainfo.")
2519 (license license:bsd-2)))
2521 (define-public livemedia-utils
2523 (name "livemedia-utils")
2524 (version "2017.10.28")
2528 "https://download.videolan.org/contrib/live555/live."
2532 "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
2533 (modules '((guix build utils)))
2535 ;; As of glibc 2.26, <xlocale.h> no longer is.
2536 '(substitute* "liveMedia/include/Locale.hh"
2537 (("xlocale\\.h") "locale.h")))))
2538 (build-system gnu-build-system)
2540 '(#:tests? #f ; no tests
2541 #:make-flags (list "CC=gcc"
2542 (string-append "LDFLAGS=-Wl,-rpath="
2543 (assoc-ref %outputs "out") "/lib")
2544 (string-append "PREFIX="
2545 (assoc-ref %outputs "out")))
2546 #:phases (modify-phases %standard-phases
2547 (add-before 'configure 'fix-makefiles-generation
2549 (substitute* "genMakefiles"
2554 (zero? (system* "./genMakefiles"
2555 "linux-with-shared-libraries")))))))
2556 (home-page "http://www.live555.com/liveMedia/")
2557 (synopsis "Set of C++ libraries for multimedia streaming")
2558 (description "This code forms a set of C++ libraries for multimedia
2559 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2560 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2561 JPEG video, and several audio codecs. They can easily be extended to support
2562 additional (audio and/or video) codecs, and can also be used to build basic
2563 RTSP or SIP clients and servers.")
2564 (license license:lgpl3+)))
2566 (define-public libdvbpsi
2573 "https://download.videolan.org/pub/libdvbpsi/"
2574 version "/libdvbpsi-" version ".tar.bz2"))
2577 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2578 (build-system gnu-build-system)
2579 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2580 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2582 (description "libdvbpsi is a simple library designed for decoding and
2583 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2584 and ITU-T H.222.0.")
2585 (license license:lgpl2.1)))
2587 (define-public ffms2
2591 (home-page "https://github.com/FFMS/ffms2")
2594 (uri (string-append home-page "/archive/" version ".tar.gz"))
2595 (file-name (string-append name "-" version ".tar.gz"))
2598 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2599 (build-system gnu-build-system)
2602 (list "--enable-avresample")))
2606 `(("ffmpeg" ,ffmpeg)))
2608 `(("pkg-config" ,pkg-config)))
2609 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2611 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2612 programmers to access a standard API to open and decompress media files.")
2613 ;; sources are distributed under a different license that the binary.
2614 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2615 (license license:gpl2+))); inherits from ffmpeg
2617 (define-public aegisub
2624 "http://ftp.aegisub.org/pub/archives/releases/source/"
2625 name "-" version ".tar.xz"))
2628 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2629 (build-system gnu-build-system)
2632 (list "--disable-update-checker"
2633 "--without-portaudio"
2636 ;; tests require busted, a lua package we don't have yet
2639 (modify-phases %standard-phases
2640 (add-before 'configure 'fix-ldflags
2642 (setenv "LDFLAGS" "-pthread"))))))
2645 ("desktop-file-utils" ,desktop-file-utils)
2648 ("hunspell" ,hunspell)
2651 ("alsa-lib" ,alsa-lib)
2652 ("pulseaudio" ,pulseaudio)
2654 ("freetype" ,freetype)
2655 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2657 `(("intltool" ,intltool)
2658 ("pkg-config" ,pkg-config)))
2659 (home-page "http://www.aegisub.org/")
2660 (synopsis "Subtitle engine")
2662 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2663 it quick and easy to time subtitles to audio, and features many powerful
2664 tools for styling them, including a built-in real-time video preview.")
2665 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2666 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2667 license:expat)))) ; and src/gl that is under a license similar
2668 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2669 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2670 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2672 (define-public gst-transcoder
2674 (name "gst-transcoder")
2679 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2680 "archive/" version ".tar.gz"))
2681 (file-name (string-append name "-" version ".tar.gz"))
2684 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2685 (build-system meson-build-system)
2687 `(("gobject-introspection" ,gobject-introspection)
2689 ("gstreamer" ,gstreamer)
2690 ("gst-plugins-base" ,gst-plugins-base)))
2692 `(("python" ,python)
2693 ("pkg-config" ,pkg-config)))
2694 (home-page "https://github.com/pitivi/gst-transcoder/")
2695 (synopsis "GStreamer Transcoding API")
2696 (description "GStreamer Transcoding API")
2697 (license license:lgpl2.1)))
2706 (uri (string-append "mirror://sourceforge/gmerlin/"
2707 name "/" version "/"
2708 name "-" version ".tar.gz"))
2709 (file-name (string-append name "-" version ".tar.gz"))
2712 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2713 (build-system gnu-build-system)
2715 '(#:configure-flags '("LIBS=-lm")))
2717 `(("pkg-config" ,pkg-config)
2718 ("doxygen" ,doxygen)))
2719 (home-page "http://gmerlin.sourceforge.net")
2720 (synopsis "Low level library for multimedia API building")
2722 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2723 library, upon which multimedia APIs can be built. Gavl handles all the
2724 details of audio and video formats like colorspaces, sample rates,
2725 multichannel configurations, etc. It provides standardized definitions for
2726 those formats as well as container structures for carrying audio samples or
2727 video images inside an application.
2729 In addition, it handles the sometimes ugly task of converting between all
2730 these formats and provides some elementary operations (copying, scaling,
2731 alpha blending etc).")
2732 (license license:gpl3)))
2734 (define-public frei0r-plugins
2736 (name "frei0r-plugins")
2741 (uri (string-append "https://files.dyne.org/frei0r/"
2742 "frei0r-plugins-" version ".tar.gz"))
2745 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2746 (build-system gnu-build-system)
2749 (modify-phases %standard-phases
2750 (add-after 'unpack 'autotools
2752 (zero? (system* "sh" "autogen.sh")))))))
2753 ;; TODO: opencv for additional face detection filters
2758 `(("pkg-config" ,pkg-config)
2759 ("libtool" ,libtool)
2760 ("automake" ,automake)
2761 ("autoconf" ,autoconf)))
2762 (home-page "https://www.dyne.org/software/frei0r/")
2763 (synopsis "Minimalistic plugin API for video effects")
2765 "Frei0r is a minimalistic plugin API for video effects.
2766 The main emphasis is on simplicity for an API that will round up
2767 the most common video effects into simple filters, sources and
2768 mixers that can be controlled by parameters. Frei0r wants to
2769 provide a way to share these simple effects between many
2770 applications, avoiding their reimplementation by different projects.
2771 It counts more than 100 plugins.")
2772 (license (list license:gpl2+
2773 ;; The following files are licensed as LGPL2.1+:
2774 ;; src/generator/ising0r/ising0r.c
2775 ;; src/generator/onecol0r/onecol0r.cpp
2776 ;; src/generator/nois0r/nois0r.cpp
2777 ;; src/generator/lissajous0r/lissajous0r.cpp
2778 ;; src/filter/ndvi/gradientlut.hpp
2779 ;; src/filter/ndvi/ndvi.cpp
2780 ;; src/filter/facedetect/facedetect.cpp
2781 license:lgpl2.1+))))
2783 (define-public motion
2787 (home-page "https://motion-project.github.io/")
2791 "https://github.com/Motion-Project/motion/archive/"
2792 "release-" version ".tar.gz"))
2795 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2796 (file-name (string-append name "-" version ".tar.gz"))))
2797 (build-system gnu-build-system)
2799 `(("autoconf" ,autoconf-wrapper)
2800 ("automake" ,automake)
2801 ("pkg-config" ,pkg-config)))
2803 `(("libjpeg" ,libjpeg)
2805 ("sqlite" ,sqlite)))
2807 '(#:phases (modify-phases %standard-phases
2808 (add-after 'unpack 'bootstrap
2810 (patch-shebang "version.sh")
2811 (invoke "autoreconf" "-vfi"))))
2812 #:configure-flags '("--sysconfdir=/etc")
2813 #:make-flags (list (string-append "sysconfdir="
2814 (assoc-ref %outputs "out")
2817 #:tests? #f)) ;no 'check' target
2818 (synopsis "Detect motion from video signals")
2820 "Motion is a program that monitors the video signal from one or more
2821 cameras and is able to detect if a significant part of the picture has
2822 changed. Or in other words, it can detect motion.")
2824 ;; Some files say "version 2" and others "version 2 or later".
2825 (license license:gpl2)))
2827 (define-public subdl
2828 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
2832 (version (git-version "1.0.3" revision commit))
2836 (url "https://github.com/alexanderwink/subdl.git")
2838 (file-name (git-file-name name version))
2841 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
2842 (build-system trivial-build-system)
2844 `(#:modules ((guix build utils))
2846 (use-modules (guix build utils))
2847 (let* ((out (assoc-ref %outputs "out"))
2848 (bin (string-append out "/bin"))
2849 (source (assoc-ref %build-inputs "source"))
2850 (python (assoc-ref %build-inputs "python")))
2851 (install-file (string-append source "/subdl") bin)
2852 (patch-shebang (string-append bin "/subdl")
2853 (list (string-append python "/bin")))))))
2854 (inputs `(("python" ,python)))
2855 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
2856 (description "Subdl is a command-line tool for downloading subtitles from
2857 opensubtitles.org. By default, it will search for English subtitles, display
2858 the results, download the highest-rated result in the requested language and
2859 save it to the appropriate filename.")
2860 (license license:gpl3+)
2861 (home-page "https://github.com/alexanderwink/subdl"))))