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 ng0 <ng0@infotropique.org>
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>
28 ;;; This file is part of GNU Guix.
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43 (define-module (gnu packages video)
44 #:use-module (ice-9 match)
45 #:use-module (srfi srfi-1)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (guix utils)
48 #:use-module (guix packages)
49 #:use-module (guix download)
50 #:use-module (guix git-download)
51 #:use-module (guix svn-download)
52 #:use-module (guix build-system cmake)
53 #:use-module (guix build-system gnu)
54 #:use-module (guix build-system glib-or-gtk)
55 #:use-module (guix build-system meson)
56 #:use-module (guix build-system python)
57 #:use-module (guix build-system waf)
58 #:use-module (gnu packages)
59 #:use-module (gnu packages algebra)
60 #:use-module (gnu packages audio)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages avahi)
63 #:use-module (gnu packages base)
64 #:use-module (gnu packages bison)
65 #:use-module (gnu packages boost)
66 #:use-module (gnu packages cdrom)
67 #:use-module (gnu packages check)
68 #:use-module (gnu packages cmake)
69 #:use-module (gnu packages compression)
70 #:use-module (gnu packages cpp)
71 #:use-module (gnu packages curl)
72 #:use-module (gnu packages databases)
73 #:use-module (gnu packages dejagnu)
74 #:use-module (gnu packages docbook)
75 #:use-module (gnu packages documentation)
76 #:use-module (gnu packages elf)
77 #:use-module (gnu packages file)
78 #:use-module (gnu packages flex)
79 #:use-module (gnu packages fontutils)
80 #:use-module (gnu packages freedesktop)
81 #:use-module (gnu packages fribidi)
82 #:use-module (gnu packages gettext)
83 #:use-module (gnu packages ghostscript)
84 #:use-module (gnu packages gl)
85 #:use-module (gnu packages glib)
86 #:use-module (gnu packages guile)
87 #:use-module (gnu packages gnome)
88 #:use-module (gnu packages gnupg)
89 #:use-module (gnu packages gstreamer)
90 #:use-module (gnu packages gtk)
91 #:use-module (gnu packages image)
92 #:use-module (gnu packages imagemagick)
93 #:use-module (gnu packages iso-codes)
94 #:use-module (gnu packages libreoffice)
95 #:use-module (gnu packages linux)
96 #:use-module (gnu packages lua)
97 #:use-module (gnu packages m4)
98 #:use-module (gnu packages man)
99 #:use-module (gnu packages mp3)
100 #:use-module (gnu packages ncurses)
101 #:use-module (gnu packages ocr)
102 #:use-module (gnu packages perl)
103 #:use-module (gnu packages pkg-config)
104 #:use-module (gnu packages popt)
105 #:use-module (gnu packages pulseaudio)
106 #:use-module (gnu packages python)
107 #:use-module (gnu packages python-crypto)
108 #:use-module (gnu packages python-web)
109 #:use-module (gnu packages qt)
110 #:use-module (gnu packages ruby)
111 #:use-module (gnu packages sdl)
112 #:use-module (gnu packages serialization)
113 #:use-module (gnu packages shells)
114 #:use-module (gnu packages ssh)
115 #:use-module (gnu packages texinfo)
116 #:use-module (gnu packages textutils)
117 #:use-module (gnu packages tls)
118 #:use-module (gnu packages version-control)
119 #:use-module (gnu packages vulkan)
120 #:use-module (gnu packages web)
121 #:use-module (gnu packages webkit)
122 #:use-module (gnu packages wxwidgets)
123 #:use-module (gnu packages xdisorg)
124 #:use-module (gnu packages xiph)
125 #:use-module (gnu packages xml)
126 #:use-module (gnu packages xorg)
127 #:use-module (gnu packages assembly))
135 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
136 version "/" name "-" version ".tar.gz"))
139 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
140 (build-system gnu-build-system)
142 `(("makeinfo" ,texinfo)))
144 `(("ncurses" ,ncurses)))
147 (modify-phases %standard-phases
149 (lambda* (#:key build inputs outputs #:allow-other-keys)
150 ;; This old `configure' script doesn't support
151 ;; variables passed as arguments.
152 (let ((out (assoc-ref outputs "out"))
153 (ncurses (assoc-ref inputs "ncurses")))
154 (setenv "CONFIG_SHELL" (which "bash"))
155 (zero? (system* "./configure"
156 (string-append "--prefix=" out)
157 (string-append "--build=" build)
158 ;; The ancient config.guess is unable to
159 ;; guess the host triplet on mips64el.
160 ,@(if (string=? "mips64el-linux"
162 '("--host=mips64el-unknown-linux-gnu")
164 ;; The same is also true with aarch64.
165 ,@(if (string=? "aarch64-linux"
167 '("--host=aarch64-unknown-linux-gnu")
169 (string-append "--with-ncurses="
171 (home-page "http://aa-project.sourceforge.net/aalib/")
172 (synopsis "ASCII-art library")
174 "AA-lib is a low level gfx library which does not require graphics device.
175 In fact, there is no graphical output possible. AA-lib replaces those
176 old-fashioned output methods with powerful ascii-art renderer.")
177 (license license:lgpl2.0+)))
179 (define-public liba52
186 ;; A mirror://sourceforge URI doesn't work, presumably
187 ;; because the SourceForge project is misconfigured.
188 "http://liba52.sourceforge.net/files/a52dec-" version
192 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
193 (patches (search-patches "liba52-enable-pic.patch"
194 "liba52-set-soname.patch"
195 "liba52-use-mtune-not-mcpu.patch"
196 "liba52-link-with-libm.patch"))))
197 (build-system gnu-build-system)
198 ;; XXX We need to run ./bootstrap because of the build system fixes above.
200 `(("autoconf" ,autoconf)
201 ("automake" ,automake)
202 ("libtool" ,libtool)))
203 (arguments `(#:configure-flags '("--enable-shared")
205 (modify-phases %standard-phases
206 ;; XXX We need to run ./bootstrap because of the build
207 ;; system fixes above.
210 (lambda _ (zero? (system* "sh" "bootstrap")))))))
211 (home-page "http://liba52.sourceforge.net/")
212 (synopsis "ATSC A/52 stream decoder")
213 (description "liba52 is a library for decoding ATSC A/52 streams. The
214 A/52 standard is used in a variety of applications, including digital
215 television and DVD. It is also known as AC-3.")
216 (license license:gpl2+)))
218 (define-public libmpeg2
224 ;; A mirror://sourceforge URI doesn't work, presumably
225 ;; because the SourceForge project is misconfigured.
226 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
227 name "-" version ".tar.gz"))
230 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
238 (build-system gnu-build-system)
239 (home-page "http://libmpeg2.sourceforge.net/")
240 (synopsis "MPEG1 and MPEG2 video decoder library")
242 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
243 (license license:gpl2+)))
245 (define-public libx264
248 (version "20180219-2245")
251 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
252 "x264-snapshot-" version "-stable.tar.bz2"))
255 "1x0cg8l30wp84mr7q0ddp06jclm0kjrszazrx87d4k7js3qxjy8m"))))
256 (build-system gnu-build-system)
258 `(("pkg-config" ,pkg-config)
260 ;; TODO: Add gpac input
262 `(#:tests? #f ;no check target
263 #:configure-flags '("--enable-shared"
264 ;; Don't build the command-line program. If we
265 ;; want it later, we should do so in a different
266 ;; package to avoid a circular dependency (the x264
267 ;; program depends on ffmpeg and ffmpeg depends on
271 ;; On MIPS, we must pass "--disable-asm" or else
272 ;; configure fails after printing: "You specified a
273 ;; pre-MSA CPU in your CFLAGS. If you really want
274 ;; to run on such a CPU, configure with
276 ,@(if (string-prefix? "mips"
277 (or (%current-target-system)
281 (home-page "https://www.videolan.org/developers/x264.html")
282 (synopsis "H.264 video coding library")
283 (description "libx264 is an advanced encoding library for creating
284 H.264 (MPEG-4 AVC) video streams.")
285 (license (list license:gpl2+ ;most files
286 license:isc ;common/x86/x86inc.asm
287 license:lgpl2.1+ ;extras/getopt.c
288 license:bsd-3 ;extras/inttypes.h
289 (license:non-copyleft ;extras/cl*.h
291 "See extras/cl.h in the distribution.")))))
293 (define-public mkvtoolnix
300 (uri (string-append "https://mkvtoolnix.download/sources/"
301 name "-" version ".tar.xz"))
304 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
305 (modules '((guix build utils)))
308 ;; Delete bundled libraries.
309 (for-each delete-file-recursively
315 (build-system gnu-build-system)
322 ("libmatroska" ,libmatroska)
324 ("libvorbis" ,libvorbis)
331 `(("docbook-xsl" ,docbook-xsl)
332 ("gettext" ,gettext-minimal)
333 ("googletest" ,googletest)
335 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
337 ("pkg-config" ,pkg-config)
342 (list (string-append "--with-boost="
343 (assoc-ref %build-inputs "boost"))
344 (string-append "--with-docbook-xsl-root="
345 (assoc-ref %build-inputs "docbook-xsl")
346 "/xml/xsl/docbook-xsl-"
347 ,(package-version docbook-xsl))
348 (string-append "--with-extra-includes="
349 (assoc-ref %build-inputs "nlohmann-json-cpp")
350 "/include/nlohmann"))
352 (modify-phases %standard-phases
353 (add-before 'configure 'add-googletest
356 (string-append (assoc-ref %build-inputs "googletest")
357 "/include/gtest") "lib/gtest")
361 (let ((-j (list "-j" (number->string (parallel-job-count)))))
362 (zero? (apply system* "rake" -j)))))
365 (zero? (system* "rake" "tests/unit"))))
368 (zero? (system* "rake" "install")))))))
369 (home-page "https://mkvtoolnix.download")
370 (synopsis "Tools to create, alter and inspect Matroska files")
372 "MKVToolNix provides tools for getting information about Matroska files
373 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
374 and creating Matroska files from other media files (@code{mkvmerge}).")
375 (license license:gpl2)))
384 (uri (string-append "https://download.videolan.org/videolan/x265/"
385 "x265_" version ".tar.gz"))
388 "1gyd94jkwdii9308m07nymsbxrmrcl81c0j8i10zhslr2mj07w0v"))
389 (modules '((guix build utils)))
391 '(delete-file-recursively "source/compat/getopt"))))
392 (build-system cmake-build-system)
394 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
395 ;; Currently the source code doesn't check for aarch64
396 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
397 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
400 (modify-phases %standard-phases
401 (add-before 'configure 'prepare-build
403 (delete-file-recursively "build")
406 (home-page "http://x265.org/")
407 (synopsis "Library for encoding h.265/HEVC video streams")
408 (description "x265 is a H.265 / HEVC video encoder application library,
409 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
410 (license license:gpl2+)))
412 (define-public libass
419 "https://github.com/libass/libass/releases/download/"
420 version "/libass-" version ".tar.xz"))
423 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
424 (build-system gnu-build-system)
426 `(("pkg-config" ,pkg-config)
429 `(("freetype" ,freetype)
431 ("fontconfig" ,fontconfig)
432 ("harfbuzz" ,harfbuzz)
434 (home-page "https://github.com/libass/libass")
435 (synopsis "Subtitle rendering library for the ASS/SSA format")
436 (description "libass is a subtitle rendering library for the
437 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
438 (license license:isc)))
440 (define-public libcaca
443 (version "0.99.beta19")
446 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
450 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
451 (build-system gnu-build-system)
452 (native-inputs `(("pkg-config" ,pkg-config)))
454 `(("freeglut" ,freeglut)
461 (home-page "http://caca.zoy.org/wiki/libcaca")
462 (synopsis "Colour ASCII-art library")
463 (description "libcaca is a graphics library that outputs text instead of
464 pixels, so that it can work on older video cards or text terminals. It
465 supports Unicode, 2048 colors, dithering of color images, and advanced text
467 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
469 (define-public libdca
476 "https://download.videolan.org/pub/videolan/libdca/"
477 version "/libdca-" version ".tar.bz2"))
480 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
481 (build-system gnu-build-system)
482 (home-page "https://www.videolan.org/developers/libdca.html")
483 (synopsis "DTS Coherent Acoustics decoder")
484 (description "libdca is a library for decoding DTS Coherent Acoustics
486 (license license:gpl2+)))
495 "mirror://sourceforge/" name "/" name "/"
496 version "/" name "-" version ".tar.gz"))
499 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
500 (build-system gnu-build-system)
501 (native-inputs `(("pkg-config" ,pkg-config)))
502 (inputs `(("libxv" ,libxv)))
503 (home-page "http://libdv.sourceforge.net/")
504 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
505 (description "The Quasar DV codec (libdv) is a software codec for DV
506 video, the encoding format used by most digital camcorders, typically those
507 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
508 developed according to the official standards for DV video: IEC 61834 and
510 (license license:lgpl2.1+)))
512 (define-public libmatroska
519 (uri (string-append "https://dl.matroska.org/downloads/"
520 name "/" name "-" version ".tar.xz"))
523 "14n9sw974prr3yp4yjb7aadi6x2yz5a0hjw8fs3qigy5shh2piyq"))))
524 (build-system gnu-build-system)
526 `(("pkg-config" ,pkg-config)))
528 `(("libebml" ,libebml)))
529 (home-page "https://www.matroska.org")
530 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
532 "Matroska aims to become the standard of multimedia container formats.
533 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
534 of XML. EBML enables the Matroska Development Team to gain significant
535 advantages in terms of future format extensibility, without breaking file
536 support in old parsers.
537 libebml is a C++ library to read and write EBML files.")
538 (license license:lgpl2.1)))
548 ;; Newer releases are only available on GitHub.
549 (string-append "https://github.com/01org/libva/releases/download/"
550 version "/libva-" version ".tar.bz2")
551 ;; Keep the old URL around for compatibility.
552 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
553 "libva/libva-" version "/libva-" version ".tar.bz2")))
555 (base32 "0cz5i62jnibmnx0i80i9yipq39v16qr6fw461f6hvrh9lbwh21mv"))))
556 (build-system gnu-build-system)
558 `(("pkg-config" ,pkg-config)))
563 ("libxfixes" ,libxfixes)
567 (modify-phases %standard-phases
569 'build 'fix-dlopen-paths
570 (lambda* (#:key outputs #:allow-other-keys)
571 (let ((out (assoc-ref outputs "out")))
572 (substitute* "va/drm/va_drm_auth_x11.c"
573 (("\"libva-x11\\.so\\.%d\"")
574 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
575 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
576 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
578 (list (string-append "--with-drivers-path="
579 (assoc-ref %build-inputs "mesa") "/lib/dri"))
580 ;; However, we can't write to mesa's store directory, so override the
581 ;; following make variable to install the dummy driver to libva's
582 ;; $prefix/lib/dri directory.
584 (list (string-append "dummy_drv_video_ladir="
585 (assoc-ref %outputs "out") "/lib/dri"))))
586 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
587 (synopsis "Video acceleration library")
588 (description "The main motivation for VA-API (Video Acceleration API) is
589 to enable hardware accelerated video decode/encode at various
590 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
591 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
592 (license license:expat)))
594 (define-public ffmpeg
600 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
604 "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"))))
605 (build-system gnu-build-system)
607 `(("fontconfig" ,fontconfig)
608 ("freetype" ,freetype)
609 ("frei0r-plugins" ,frei0r-plugins)
615 ("libbluray" ,libbluray)
617 ("libcdio-paranoia" ,libcdio-paranoia)
618 ("libtheora" ,libtheora)
620 ("libvdpau" ,libvdpau)
621 ("libvorbis" ,libvorbis)
627 ("pulseaudio" ,pulseaudio)
638 ("pkg-config" ,pkg-config)
640 ("python" ,python-2) ; scripts use interpreter python2
644 `(#:test-target "fate"
646 ;; possible additional inputs:
647 ;; --enable-avisynth enable reading of AviSynth script
649 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
650 ;; --enable-libcelt enable CELT decoding via libcelt [no]
651 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
652 ;; and libraw1394 [no]
653 ;; --enable-libfaac enable AAC encoding via libfaac [no]
654 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
655 ;; --enable-libflite enable flite (voice synthesis) support via
657 ;; --enable-libgme enable Game Music Emu via libgme [no]
658 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
659 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
660 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
661 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
662 ;; --enable-libnut enable NUT (de)muxing via libnut,
663 ;; native (de)muxer exists [no]
664 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
665 ;; libopencore-amrnb [no]
666 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
667 ;; libopencore-amrwb [no]
668 ;; --enable-libopencv enable video filtering via libopencv [no]
669 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
671 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
672 ;; --enable-libschroedinger enable Dirac de/encoding via
673 ;; libschroedinger [no]
674 ;; --enable-libshine enable fixed-point MP3 encoding via
676 ;; --enable-libssh enable SFTP protocol via libssh [no]
677 ;; (libssh2 does not work)
678 ;; --enable-libstagefright-h264 enable H.264 decoding via
679 ;; libstagefright [no]
680 ;; --enable-libutvideo enable Ut Video encoding and decoding via
682 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
683 ;; --enable-libvidstab enable video stabilization using
685 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
686 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
687 ;; libvo-amrwbenc [no]
688 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
689 ;; --enable-libxavs enable AVS encoding via xavs [no]
690 ;; --enable-libzmq enable message passing via libzmq [no]
691 ;; --enable-libzvbi enable teletext support via libzvbi [no]
692 ;; --enable-opencl enable OpenCL code
693 '("--enable-avresample"
694 "--enable-gpl" ; enable optional gpl licensed parts
697 "--enable-fontconfig"
704 "--enable-libfreetype"
705 "--enable-libmp3lame"
711 "--enable-libtwolame"
720 "--enable-runtime-cpudetect"
722 ;; The HTML pages take 7.2 MiB
723 "--disable-htmlpages"
725 ;; The static libraries are 23 MiB
728 ;; Runtime cpu detection is not implemented on
729 ;; MIPS, so we disable some features.
732 "--disable-mipsdspr2"
735 (modify-phases %standard-phases
738 ;; configure does not work followed by "SHELL=..." and
739 ;; "CONFIG_SHELL=..."; set environment variables instead
740 (lambda* (#:key outputs configure-flags #:allow-other-keys)
741 (let ((out (assoc-ref outputs "out")))
742 (substitute* "configure"
743 (("#! /bin/sh") (string-append "#!" (which "sh"))))
744 (setenv "SHELL" (which "bash"))
745 (setenv "CONFIG_SHELL" (which "bash"))
746 (zero? (apply system*
748 (string-append "--prefix=" out)
749 ;; Add $libdir to the RUNPATH of all the binaries.
750 (string-append "--extra-ldflags=-Wl,-rpath="
754 'check 'set-ld-library-path
756 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
758 (let* ((dso (find-files "." "\\.so$"))
759 (path (string-join (map dirname dso) ":")))
760 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
761 (setenv "LD_LIBRARY_PATH" path)
763 (home-page "https://www.ffmpeg.org/")
764 (synopsis "Audio and video framework")
765 (description "FFmpeg is a complete, cross-platform solution to record,
766 convert and stream audio and video. It includes the libavcodec
767 audio/video codec library.")
768 (license license:gpl2+)))
770 (define-public ffmpeg-2.8
776 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
780 "05m1272r5qa2r0ym5vq4figdfnpvcys1fgb1026n5s6xdjd1s1pg"))))
782 (substitute-keyword-arguments (package-arguments ffmpeg)
783 ((#:configure-flags flags)
785 (if (string=? flag "--disable-mipsdsp")
786 "--disable-mipsdspr1"
790 ;; Annoyingly enough, the latest mpv release does not build with the stable
791 ;; release of ffmpeg. Use a git commit until the situation is fixed.
792 (define-public ffmpeg-git
793 (let ((commit "3f887440677328c9cfed97ad81d14051ffa32aae")
798 (version (string-append "3.4-" revision "." (string-take commit 9)))
802 (url "https://github.com/FFmpeg/FFmpeg.git")
804 (file-name (string-append name "-" version "-checkout"))
807 "1b7n3g4m2rbvrwsgbfl8wl91z42g1ld42clwxs8qpl9ny5rwz6sq")))))))
816 "https://download.videolan.org/pub/videolan/vlc/"
817 version "/vlc-" version ".tar.xz"))
820 "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
821 (build-system gnu-build-system)
823 `(("git" ,git) ; needed for a test
824 ("pkg-config" ,pkg-config)))
825 ;; FIXME: Add optional inputs once available.
827 `(("alsa-lib" ,alsa-lib)
831 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
832 ("fontconfig" ,fontconfig)
833 ("freetype" ,freetype)
837 ("libdvbpsi" ,libdvbpsi)
838 ("libgcrypt" ,libgcrypt)
843 ("libsamplerate" ,libsamplerate)
845 ("libvorbis" ,libvorbis)
846 ("libtheora" ,libtheora)
849 ("libxinerama" ,libxinerama)
852 ("livemedia-utils" ,livemedia-utils)
857 ("pulseaudio" ,pulseaudio)
858 ("python" ,python-wrapper)
860 ("qtx11extras" ,qtx11extras)
862 ("sdl-image" ,sdl-image)
865 ("xcb-util-keysyms" ,xcb-util-keysyms)))
868 `("CXXFLAGS=-std=gnu++11"
869 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
870 (assoc-ref %build-inputs "ffmpeg")
871 "/lib")) ;needed for the tests
874 (modify-phases %standard-phases
875 (add-after 'unpack 'patch-source
876 (lambda* (#:key inputs #:allow-other-keys)
877 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
878 (substitute* "configure"
879 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
880 (string-append "LIVE555_PREFIX=" livemedia-utils)))
881 ;; Some of the tests require using the display to test out VLC,
882 ;; which fails in our sandboxed build system
883 (substitute* "test/run_vlc.sh"
884 (("./vlc --ignore-config") "echo"))
885 ;; XXX Likely not needed for >2.2.6.
886 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
887 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
889 (add-after 'install 'regenerate-plugin-cache
890 (lambda* (#:key outputs #:allow-other-keys)
891 ;; The 'install-exec-hook' rule in the top-level Makefile.am
892 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
893 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
894 ;; it references. Thus, we first reset the timestamps of all
895 ;; these files, and then regenerate the cache such that the
896 ;; mtimes it includes are always zero instead of being dependent
897 ;; on the build time.
898 (let* ((out (assoc-ref outputs "out"))
899 (pkglibdir (string-append out "/lib/vlc"))
900 (plugindir (string-append pkglibdir "/plugins"))
901 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
902 ;; TODO: Factorize 'reset-timestamps'.
903 (for-each (lambda (file)
904 (let ((s (lstat file)))
905 (unless (eq? (stat:type s) 'symlink)
906 (utime file 0 0 0 0))))
907 (find-files plugindir))
908 (zero? (system* cachegen plugindir))))))))
909 (home-page "https://www.videolan.org/")
910 (synopsis "Audio and video framework")
911 (description "VLC is a cross-platform multimedia player and framework
912 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
913 treaming protocols.")
914 (license license:gpl2+)))
916 (define-public mplayer
923 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
927 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
928 (build-system gnu-build-system)
929 ;; FIXME: Add additional inputs once available.
931 `(("pkg-config" ,pkg-config)))
933 `(("alsa-lib" ,alsa-lib)
934 ("cdparanoia" ,cdparanoia)
936 ("fontconfig" ,fontconfig)
937 ("freetype" ,freetype)
938 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
941 ("libdvdcss" ,libdvdcss)
942 ("libdvdnav" ,libdvdnav)
944 ("libmpeg2" ,libmpeg2)
945 ("libmpg123" ,mpg123) ; audio codec for MP3
947 ("libtheora" ,libtheora)
948 ("libvdpau" ,libvdpau)
949 ("libvorbis" ,libvorbis)
952 ("libxinerama" ,libxinerama)
954 ("libxxf86dga" ,libxxf86dga)
958 ("pulseaudio" ,pulseaudio)
959 ("python" ,python-wrapper)
965 `(#:tests? #f ; no test target
967 (modify-phases %standard-phases
969 ;; configure does not work followed by "SHELL=..." and
970 ;; "CONFIG_SHELL=..."; set environment variables instead
971 (lambda* (#:key inputs outputs #:allow-other-keys)
972 (let ((out (assoc-ref outputs "out"))
973 (libx11 (assoc-ref inputs "libx11")))
974 (substitute* "configure"
975 (("#! /bin/sh") (string-append "#!" (which "sh"))))
976 (setenv "SHELL" (which "bash"))
977 (setenv "CONFIG_SHELL" (which "bash"))
980 (string-append "--extra-cflags=-I"
981 libx11 "/include") ; to detect libx11
982 "--disable-ffmpeg_a" ; disables bundled ffmpeg
983 (string-append "--prefix=" out)
984 ;; Enable runtime cpu detection where supported,
985 ;; and choose a suitable target.
986 ,@(match (or (%current-target-system)
989 '("--enable-runtime-cpudetection"
990 "--target=x86_64-linux"))
992 '("--enable-runtime-cpudetection"
993 "--target=i686-linux"))
995 '("--target=mips3-linux"))
996 (_ (list (string-append
998 (or (%current-target-system)
999 (nix-system->gnu-triplet
1000 (%current-system)))))))
1001 "--disable-iwmmxt"))))))))
1002 (home-page "https://www.mplayerhq.hu/design7/news.html")
1003 (synopsis "Audio and video player")
1004 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1005 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1006 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1007 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1008 (license license:gpl2)))
1017 "https://github.com/mpv-player/mpv/archive/v" version
1021 "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
1022 (file-name (string-append name "-" version ".tar.gz"))))
1023 (build-system waf-build-system)
1025 `(("perl" ,perl) ; for zsh completion file
1026 ("pkg-config" ,pkg-config)
1027 ("python-docutils" ,python-docutils)))
1028 ;; Missing features: libguess, V4L2
1030 `(("alsa-lib" ,alsa-lib)
1032 ("ffmpeg" ,ffmpeg-git)
1037 ("libbluray" ,libbluray)
1038 ("libcaca" ,libcaca)
1039 ("libbs2b" ,libbs2b)
1040 ("libcdio-paranoia" ,libcdio-paranoia)
1041 ("libdvdread" ,libdvdread)
1042 ("libdvdnav" ,libdvdnav)
1043 ("libjpeg" ,libjpeg)
1045 ("libvdpau" ,libvdpau)
1047 ("libxext" ,libxext)
1048 ("libxinerama" ,libxinerama)
1049 ("libxrandr" ,libxrandr)
1050 ("libxscrnsaver" ,libxscrnsaver)
1052 ;; XXX: lua > 5.2 is not currently supported; see
1053 ;; waftools/checks/custom.py
1057 ("pulseaudio" ,pulseaudio)
1059 ("shaderc" ,shaderc)
1060 ("vulkan-icd-loader" ,vulkan-icd-loader)
1062 ("wayland" ,wayland)
1063 ("wayland-protocols" ,wayland-protocols)
1064 ("libxkbcommon", libxkbcommon)
1065 ("youtube-dl" ,youtube-dl)
1069 (modify-phases %standard-phases
1071 'configure 'setup-waf
1072 (lambda* (#:key inputs #:allow-other-keys)
1073 (copy-file (assoc-ref inputs "waf") "waf")
1074 (setenv "CC" "gcc"))))
1075 #:configure-flags (list "--enable-libmpv-shared"
1080 "--disable-build-date")
1081 ;; No check function defined.
1083 (home-page "https://mpv.io/")
1084 (synopsis "Audio and video player")
1085 (description "mpv is a general-purpose audio and video player. It is a
1086 fork of mplayer2 and MPlayer. It shares some features with the former
1087 projects while introducing many more.")
1088 (license license:gpl2+)))
1090 (define-public gnome-mpv
1097 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1098 "/download/v" version "/gnome-mpv-" version
1102 "1w944ymyssgfcjiczrq4saig90crw9b9hhdsnchfbjsw173qi8n5"))))
1104 `(("intltool" ,intltool)
1105 ("pkg-config" ,pkg-config)))
1108 ("libepoxy" ,libepoxy)
1110 (build-system glib-or-gtk-build-system)
1111 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1112 (synopsis "GTK+ frontend for the mpv media player")
1113 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1114 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1115 access to mpv's powerful playback capabilities.")
1116 (license license:gpl3+)))
1118 (define-public libvpx
1123 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1126 (url "https://chromium.googlesource.com/webm/libvpx")
1127 (commit (string-append "v" version))))
1128 (file-name (git-file-name name version))
1131 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1132 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1133 (build-system gnu-build-system)
1135 `(#:configure-flags (list "--enable-shared"
1137 ;; Limit size to avoid CVE-2015-1258
1138 "--size-limit=16384x16384"
1139 (string-append "--prefix=" (assoc-ref %outputs "out")))
1140 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1141 (assoc-ref %outputs "out") "/lib"))
1142 #:phases (modify-phases %standard-phases
1144 (lambda* (#:key configure-flags #:allow-other-keys)
1145 ;; The configure script does not understand some of the GNU
1146 ;; options, so we only add the flags specified above.
1147 (apply invoke "./configure" configure-flags))))
1148 #:tests? #f)) ; no check target
1152 (synopsis "VP8/VP9 video codec")
1153 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1154 (license license:bsd-3)
1155 (home-page "https://www.webmproject.org/")))
1157 (define-public youtube-dl
1160 (version "2018.02.22")
1163 (uri (string-append "https://yt-dl.org/downloads/"
1164 version "/youtube-dl-"
1168 "112qmwrkd0cpyx2h20k6y07lw7iixvj8yya7r97h3k1y1py9vbz8"))))
1169 (build-system python-build-system)
1171 ;; The problem here is that the directory for the man page and completion
1172 ;; files is relative, and for some reason, setup.py uses the
1173 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1174 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1175 ;; completion file is called 'youtube-dl' rather than
1176 ;; 'youtube-dl.bash-completion'.
1177 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1178 #:phases (modify-phases %standard-phases
1179 (add-before 'install 'fix-the-data-directories
1180 (lambda* (#:key outputs #:allow-other-keys)
1181 (let ((prefix (assoc-ref outputs "out")))
1182 (mkdir "bash-completion")
1183 (rename-file "youtube-dl.bash-completion"
1184 "bash-completion/youtube-dl")
1185 (substitute* "setup.py"
1186 (("youtube-dl\\.bash-completion")
1187 "bash-completion/youtube-dl")
1189 (string-append "'" prefix "/etc/"))
1191 (string-append "'" prefix "/share/")))
1193 (synopsis "Download videos from YouTube.com and other sites")
1195 "Youtube-dl is a small command-line program to download videos from
1196 YouTube.com and many more sites.")
1197 (home-page "https://yt-dl.org")
1198 (license license:public-domain)))
1200 (define-public youtube-dl-gui
1202 (name "youtube-dl-gui")
1207 (uri (pypi-uri "Youtube-DLG" version))
1210 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1211 (build-system python-build-system)
1213 ;; In Guix, wxpython has not yet been packaged for Python 3.
1214 `(#:python ,python-2
1215 ;; This package has no tests.
1218 (modify-phases %standard-phases
1219 (add-before 'build 'patch-source
1220 (lambda* (#:key inputs #:allow-other-keys)
1221 ;; The youtube-dl-gui program lets you configure options. Some of
1222 ;; them are problematic, so we change their defaults.
1223 (substitute* "youtube_dl_gui/optionsmanager.py"
1224 ;; When this is true, the builder process will try (and fail) to
1225 ;; write logs to the builder user's home directory.
1226 (("'enable_log': True") "'enable_log': False")
1227 ;; This determines which youtube-dl program youtube-dl-gui will
1228 ;; run. If we don't set this, then youtube-dl-gui might download
1229 ;; an arbitrary copy from the Internet into the user's home
1230 ;; directory and run it, so let's make sure youtube-dl-gui uses
1231 ;; the youtube-dl from the inputs by default.
1232 (("'youtubedl_path': self.config_path")
1233 (string-append "'youtubedl_path': '"
1234 (assoc-ref inputs "youtube-dl")
1236 ;; When this is True, when youtube-dl-gui is finished downloading
1237 ;; a file, it will try (and possibly fail) to open the directory
1238 ;; containing the downloaded file. This can fail because it
1239 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1240 ;; adding xdg-utils to the propagated inputs is not enough to
1241 ;; make this work, so for now we set the default to False.
1242 (("'open_dl_dir': True") "'open_dl_dir': False"))
1243 ;; The youtube-dl program from the inputs is actually a wrapper
1244 ;; script written in bash, so attempting to invoke it as a python
1245 ;; script will fail.
1246 (substitute* "youtube_dl_gui/downloaders.py"
1247 (("cmd = \\['python', self\\.youtubedl_path\\]")
1248 "cmd = [self.youtubedl_path]"))
1249 ;; Use relative paths for installing data files so youtube-dl-gui
1250 ;; installs the files relative to its prefix in the store, rather
1251 ;; than relative to /. Also, instead of installing data files into
1252 ;; $prefix/usr/share, install them into $prefix/share for
1253 ;; consistency (see: (standards) Directory Variables).
1254 (substitute* "setup.py"
1255 (("= '/usr/share") "= 'share"))
1256 ;; Update get_locale_file() so it finds the installed localization
1258 (substitute* "youtube_dl_gui/utils.py"
1259 (("os\\.path\\.join\\('/usr', 'share'")
1260 (string-append "os.path.join('"
1261 (assoc-ref %outputs "out")
1262 "', 'share'"))))))))
1264 `(("python2-wxpython" ,python2-wxpython)
1265 ("youtube-dl" ,youtube-dl)))
1266 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1268 "GUI (Graphical User Interface) for @command{youtube-dl}")
1270 "Youtube-dlG is a GUI (Graphical User Interface) for
1271 @command{youtube-dl}. You can use it to download videos from YouTube and any
1272 other site that youtube-dl supports.")
1273 (license license:unlicense)))
1275 (define-public you-get
1278 (version "0.4.1025")
1282 "https://github.com/soimort/you-get/archive/v"
1284 (file-name (string-append name "-" version ".tar.gz"))
1287 "10103jw1gzar85jlajzl9wslk08vw21n26hkhfcz5bvkm9lxxs2c"))))
1288 (build-system python-build-system)
1290 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1293 (modify-phases %standard-phases
1294 (add-after 'unpack 'qualify-input-references
1295 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1296 ;; happens to be in the user's $PATH at run time.
1297 (lambda* (#:key inputs #:allow-other-keys)
1298 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1300 (substitute* "src/you_get/processor/ffmpeg.py"
1301 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1302 ;; same string is also used when sniffing ffmpeg's output.
1303 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1304 (string-append prefix "'" ffmpeg "'")))
1306 #:tests? #f)) ; XXX some tests need Internet access
1307 (synopsis "Download videos, audio, or images from Web sites")
1309 "You-Get is a command-line utility to download media contents (videos,
1310 audio, images) from the Web. It can use either mpv or vlc for playback.")
1311 (home-page "https://you-get.org/")
1312 (license license:expat)))
1314 (define-public libbluray
1320 (uri (string-append "https://download.videolan.org/videolan/"
1321 name "/" version "/"
1322 name "-" version ".tar.bz2"))
1325 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1326 (build-system gnu-build-system)
1328 `(#:configure-flags '("--disable-bdjava-jar")
1330 (modify-phases %standard-phases
1331 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1332 ;; Avoid the need to propagate libxml2 by referring to it
1333 ;; directly, as is already done for fontconfig & freetype.
1334 (lambda* (#:key inputs #:allow-other-keys)
1335 (let ((libxml2 (assoc-ref inputs "libxml2")))
1336 (substitute* "configure"
1337 ((" libxml-2.0") ""))
1338 (substitute* "src/libbluray.pc.in"
1339 (("^Libs.private:" field)
1340 (string-append field " -L" libxml2 "/lib -lxml2")))
1342 (add-before 'build 'fix-dlopen-paths
1343 (lambda* (#:key inputs #:allow-other-keys)
1344 (let ((libaacs (assoc-ref inputs "libaacs"))
1345 (libbdplus (assoc-ref inputs "libbdplus")))
1346 (substitute* "src/libbluray/disc/aacs.c"
1348 (string-append "\"" libaacs "/lib/libaacs\"")))
1349 (substitute* "src/libbluray/disc/bdplus.c"
1351 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1353 (native-inputs `(("pkg-config" ,pkg-config)))
1355 `(("fontconfig" ,fontconfig)
1356 ("freetype" ,freetype)
1357 ("libaacs" ,libaacs)
1358 ("libbdplus" ,libbdplus)
1359 ("libxml2" ,libxml2)))
1360 (home-page "https://www.videolan.org/developers/libbluray.html")
1361 (synopsis "Blu-Ray Disc playback library")
1363 "libbluray is a library designed for Blu-Ray Disc playback for media
1364 players, like VLC or MPlayer.")
1365 (license license:lgpl2.1+)))
1367 (define-public libdvdread
1373 (uri (string-append "https://download.videolan.org/videolan/"
1374 name "/" version "/"
1375 name "-" version ".tar.bz2"))
1378 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1379 (build-system gnu-build-system)
1381 `(#:configure-flags '("--with-libdvdcss=yes")))
1383 `(("pkg-config" ,pkg-config)))
1385 `(("libdvdcss" ,libdvdcss)))
1386 (home-page "http://dvdnav.mplayerhq.hu/")
1387 (synopsis "Library for reading video DVDs")
1389 "Libdvdread provides a simple foundation for reading DVD video
1390 disks. It provides the functionality that is required to access many
1391 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1392 authentication and descrambling (if an external libdvdcss library is
1394 (license license:gpl2+)))
1396 (define-public dvdauthor
1403 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1407 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1408 (build-system gnu-build-system)
1410 `(("libdvdread" ,libdvdread)
1412 ("imagemagick" ,imagemagick)
1413 ("libxml2" ,libxml2)
1414 ("freetype" ,freetype)))
1416 `(("pkg-config" ,pkg-config)))
1417 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1418 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1419 MPEG-2 stream containing VOB packets.")
1420 (home-page "http://dvdauthor.sourceforge.net")
1421 (license license:gpl3+)))
1423 (define-public libdvdnav
1429 (uri (string-append "https://download.videolan.org/videolan/"
1430 name "/" version "/"
1431 name "-" version ".tar.bz2"))
1434 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1435 (build-system gnu-build-system)
1437 `(("pkg-config" ,pkg-config)))
1439 `(("libdvdread" ,libdvdread)))
1440 (home-page "http://dvdnav.mplayerhq.hu/")
1441 (synopsis "Library for video DVD navigation features")
1443 "Libdvdnav is a library for developers of multimedia
1444 applications. It allows easy use of sophisticated DVD navigation features
1445 such as DVD menus, multiangle playback and even interactive DVD games. All
1446 this functionality is provided through a simple API which provides the DVD
1447 playback as a single logical stream of blocks, intermitted by special
1448 dvdnav events to report certain conditions. The main usage of libdvdnav is
1449 a loop regularly calling a function to get the next block, surrounded by
1450 additional calls to tell the library of user interaction. The whole
1451 DVD virtual machine and internal playback states are completely
1453 (license license:gpl2+)))
1455 (define-public libdvdcss
1461 (uri (string-append "https://download.videolan.org/pub/"
1462 name "/" version "/"
1463 name "-" version ".tar.bz2"))
1466 "1b7awvyahivglp7qmgx2g5005kc5npv257gw7wxdprjsnx93f1zb"))))
1467 (build-system gnu-build-system)
1468 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1469 (synopsis "Library for accessing DVDs as block devices")
1471 "libdvdcss is a simple library designed for accessing DVDs like a block
1472 device without having to bother about the decryption.")
1473 (license license:gpl2+)))
1475 (define-public srt2vtt
1482 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1486 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1487 (build-system gnu-build-system)
1489 `(("guile" ,guile-2.0)))
1490 (synopsis "SubRip to WebVTT subtitle converter")
1491 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1492 for use with HTML5 video.")
1493 (home-page "http://dthompson.us/pages/software/srt2vtt")
1494 (license license:gpl3+)))
1496 (define-public avidemux
1503 "mirror://sourceforge/" name "/" name "/" version "/"
1504 name "_" version ".tar.gz"))
1507 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1508 (patches (search-patches "avidemux-install-to-lib.patch"))))
1509 (build-system cmake-build-system)
1511 `(("pkg-config" ,pkg-config)))
1512 ;; FIXME: Once packaged, add libraries not found during the build.
1514 `(("alsa-lib" ,alsa-lib)
1515 ("fontconfig" ,fontconfig)
1516 ("freetype" ,freetype)
1517 ("fribidi" ,fribidi)
1522 ("libvdpau" ,libvdpau)
1523 ("libvorbis" ,libvorbis)
1527 ("pulseaudio" ,pulseaudio)
1528 ("python" ,python-wrapper)
1529 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1530 ;("qtbase" ,qtbase) with -std=gnu++11.
1531 ;("qttools" ,qttools)
1537 `(#:tests? #f ; no check target
1539 ;; Make sure files inside the included ffmpeg tarball are
1541 (modify-phases %standard-phases
1542 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1544 (with-directory-excursion "avidemux_core/ffmpeg_package"
1545 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1546 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1547 (add-after 'patch-source-shebangs 'repack-ffmpeg
1549 (with-directory-excursion "avidemux_core/ffmpeg_package"
1550 (substitute* "ffmpeg-2.7.6/configure"
1551 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1552 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1553 ;; avoid non-determinism in the archive
1554 "--sort=name" "--mtime=@0"
1555 "--owner=root:0" "--group=root:0")
1556 (delete-file-recursively "ffmpeg-2.7.6"))))
1559 ;; Copy-paste settings from the cmake build system.
1560 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1561 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1563 (lambda* (#:key inputs outputs #:allow-other-keys)
1565 ((out (assoc-ref outputs "out"))
1566 (lib (string-append out "/lib"))
1568 (sdl (assoc-ref inputs "sdl"))
1570 (lambda* (component srcdir #:optional (args '()))
1571 (let ((builddir (string-append "build_" component)))
1573 (with-directory-excursion builddir
1576 (apply system* "cmake"
1577 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1578 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1579 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1580 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1581 "\"-Wl,-rpath=" lib "\"")
1582 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1583 (string-append "-DSDL_INCLUDE_DIR="
1585 (string-append "../" srcdir)
1588 (system* "make" "-j"
1589 (number->string (parallel-job-count)))
1590 (system* "make" "install"))))))))
1592 (and (build_component "core" "avidemux_core")
1593 (build_component "cli" "avidemux/cli")
1594 (build_component "qt4" "avidemux/qt4")
1595 (build_component "plugins_common" "avidemux_plugins"
1596 '("-DPLUGIN_UI=COMMON"))
1597 (build_component "plugins_cli" "avidemux_plugins"
1598 '("-DPLUGIN_UI=CLI"))
1599 (build_component "plugins_qt4" "avidemux_plugins"
1600 '("-DPLUGIN_UI=QT4"))
1601 (build_component "plugins_settings" "avidemux_plugins"
1602 '("-DPLUGIN_UI=SETTINGS")))
1603 ;; Remove .exe and .dll file.
1604 (delete-file-recursively
1605 (string-append out "/share/ADM6_addons")))))
1606 (delete 'install))))
1607 (home-page "http://fixounet.free.fr/avidemux/")
1608 (synopsis "Video editor")
1609 (description "Avidemux is a video editor designed for simple cutting,
1610 filtering and encoding tasks. It supports many file types, including AVI,
1611 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1612 can be automated using projects, job queue and powerful scripting
1614 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1615 ;; Software with various licenses is included, see License.txt.
1616 (license license:gpl2+)))
1618 (define-public vapoursynth
1620 (name "vapoursynth")
1625 "https://github.com/vapoursynth/vapoursynth/archive/R"
1627 (file-name (string-append name "-" version ".tar.gz"))
1630 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1631 (build-system gnu-build-system)
1633 `(("autoconf" ,autoconf)
1634 ("automake" ,automake)
1635 ("cython" ,python-cython)
1636 ("libtool" ,libtool)
1637 ("pkg-config" ,pkg-config)
1641 `(("ffmpeg" ,ffmpeg)
1643 ("tesseract-ocr" ,tesseract-ocr)
1647 (modify-phases %standard-phases
1651 (zero? (system* "sh" "autogen.sh")))))))
1652 (home-page "http://www.vapoursynth.com/")
1653 (synopsis "Video processing framework")
1654 (description "VapourSynth is a C++ library and Python module for video
1655 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1656 multithreading, generalized colorspaces, per frame properties, and videos with
1658 ;; src/core/cpufeatures only allows x86, ARM or PPC
1659 (supported-systems (fold delete %supported-systems
1660 '("mips64el-linux" "aarch64-linux")))
1661 ;; As seen from the source files.
1662 (license license:lgpl2.1+)))
1671 "http://downloads.xvid.org/downloads/xvidcore-"
1672 version ".tar.bz2"))
1675 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1676 (build-system gnu-build-system)
1677 (native-inputs `(("yasm" ,yasm)))
1680 (modify-phases %standard-phases
1682 'configure 'pre-configure
1684 (chdir "build/generic")
1685 (substitute* "configure"
1686 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1687 ;; No 'check' target.
1689 (home-page "https://www.xvid.com/")
1690 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1691 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1692 codec library. It uses ASP features such as b-frames, global and quarter
1693 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1694 and custom quantization matrices.")
1695 (license license:gpl2+)))
1697 (define-public streamlink
1704 (uri (pypi-uri "streamlink" version))
1707 "17299xnd9jzi7m1d2rr4xdlj47q64bzj2957nlsrhw0hskds1s6h"))))
1708 (build-system python-build-system)
1709 (home-page "https://github.com/streamlink/streamlink")
1711 `(("python-pytest" ,python-pytest)
1712 ("python-mock" ,python-mock)
1713 ("python-requests-mock" ,python-requests-mock)))
1715 `(("python-pysocks" ,python-pysocks)
1716 ("python-websocket-client" ,python-websocket-client)
1717 ("python-iso3166" ,python-iso3166)
1718 ("python-iso639" ,python-iso639)
1719 ("python-pycryptodome" ,python-pycryptodome)
1720 ("python-requests" ,python-requests)))
1721 (synopsis "Extract streams from various services")
1722 (description "Streamlink is command-line utility that extracts streams
1723 from sites like Twitch.tv and pipes them into a video player of choice.")
1724 (license license:bsd-2)))
1726 (define-public livestreamer
1727 (deprecated-package "livestreamer" streamlink))
1735 (uri (string-append "https://github.com/mltframework/mlt/"
1736 "archive/v" version ".tar.gz"))
1737 (file-name (string-append name "-" version ".tar.gz"))
1740 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
1741 (modules '((guix build utils)))
1743 ;; As of glibc 2.26, <xlocale.h> no longer is.
1744 '(substitute* "src/framework/mlt_property.h"
1745 (("xlocale\\.h") "locale.h")))))
1746 (build-system gnu-build-system)
1748 `(#:tests? #f ; no tests
1749 #:make-flags '("CC=gcc")
1751 (list "--enable-gpl3"
1754 (modify-phases %standard-phases
1756 'configure 'override-LDFLAGS
1757 (lambda* (#:key outputs #:allow-other-keys)
1758 (substitute* "config.mak"
1760 (string-append "LDFLAGS+=-Wl,-rpath="
1761 (assoc-ref outputs "out")
1765 `(("alsa-lib" ,alsa-lib)
1768 ("libxml2" ,libxml2)
1771 ("libsamplerate" ,libsamplerate)
1772 ("pulseaudio" ,pulseaudio)
1776 `(("pkg-config" ,pkg-config)))
1777 (home-page "https://www.mltframework.org/")
1778 (synopsis "Author, manage, and run multitrack audio/video compositions")
1780 "MLT is a multimedia framework, designed and developed for television
1781 broadcasting. It provides a toolkit for broadcasters, video editors, media
1782 players, transcoders, web streamers and many more types of applications. The
1783 functionality of the system is provided via an assortment of ready to use
1784 tools, XML authoring components, and an extensible plug-in based API.")
1785 (license license:gpl3)))
1787 (define-public v4l-utils
1793 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1794 "/v4l-utils-" version ".tar.bz2"))
1797 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1798 (build-system gnu-build-system)
1801 (list (string-append "--with-udevdir="
1802 (assoc-ref %outputs "out")
1804 "CXXFLAGS=-std=gnu++11")))
1807 ("pkg-config" ,pkg-config)))
1809 `(("alsa-lib" ,alsa-lib)
1811 ("libjpeg" ,libjpeg)
1815 (synopsis "Realtime video capture utilities for Linux")
1816 (description "The v4l-utils provide a series of libraries and utilities to
1817 be used for realtime video capture via Linux-specific APIs.")
1818 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1819 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1820 (license (list license:lgpl2.1+ license:gpl2))))
1828 (uri (string-append "https://github.com/jp9000/obs-studio"
1829 "/archive/" version ".tar.gz"))
1830 (file-name (string-append name "-" version ".tar.gz"))
1833 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1834 (build-system cmake-build-system)
1836 `(#:tests? #f)) ; no tests
1838 `(("pkg-config" ,pkg-config)))
1840 `(("alsa-lib" ,alsa-lib)
1844 ("fontconfig" ,fontconfig)
1845 ("freetype" ,freetype)
1847 ("jansson" ,jansson)
1848 ("libx264" ,libx264)
1849 ("libxcomposite" ,libxcomposite)
1851 ("pulseaudio" ,pulseaudio)
1853 ("qtx11extras" ,qtx11extras)
1855 ("v4l-utils" ,v4l-utils)
1857 (synopsis "Live streaming software")
1858 (description "Open Broadcaster Software provides a graphical interface for
1859 video recording and live streaming. OBS supports capturing audio and video
1860 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1862 (home-page "https://obsproject.com")
1863 (supported-systems '("x86_64-linux" "i686-linux"))
1864 (license license:gpl2+)))
1866 (define-public libvdpau
1873 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1874 name "-" version ".tar.bz2"))
1877 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1878 (build-system gnu-build-system)
1880 `(("pkg-config" ,pkg-config)))
1882 `(("dri2proto" ,dri2proto)
1883 ("libx11" ,libx11 "out")
1884 ("libxext" ,libxext)))
1885 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1886 (synopsis "Video Decode and Presentation API")
1887 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1888 provides an interface to video decode acceleration and presentation hardware
1889 present in modern GPUs.")
1890 (license (license:x11-style "file://COPYING"))))
1892 (define-public vdpauinfo
1899 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1900 name "-" version ".tar.gz"))
1903 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1904 (build-system gnu-build-system)
1906 `(("pkg-config" ,pkg-config)
1907 ("libx11" ,libx11)))
1909 `(("libvdpau" ,libvdpau)))
1910 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1911 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1912 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1914 (license (license:x11-style "file://COPYING"))))
1916 (define-public libvdpau-va-gl
1918 (name "libvdpau-va-gl")
1923 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
1924 "releases/download/v" version "/libvdpau-va-gl-"
1928 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
1929 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
1930 (modules '((guix build utils)))
1931 (snippet '(delete-file-recursively "3rdparty"))))
1932 (build-system cmake-build-system)
1934 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
1936 `(("libvdpau" ,libvdpau)
1937 ("pkg-config" ,pkg-config)))
1941 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
1942 (synopsis "VDPAU driver with VA-API/OpenGL backend")
1944 "Many applications can use VDPAU to accelerate portions of the video
1945 decoding process and video post-processing to the GPU video hardware. Since
1946 there is no VDPAU available on Intel chips, they fall back to different drawing
1947 techniques. This driver uses OpenGL under the hood to accelerate drawing and
1948 scaling and VA-API (if available) to accelerate video decoding.")
1949 (license license:expat)))
1951 (define-public recordmydesktop
1953 (name "recordmydesktop")
1957 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1958 version "/recordmydesktop-" version ".tar.gz"))
1961 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1962 (build-system gnu-build-system)
1963 (inputs `(("popt" ,popt)
1968 ("libxfixes" ,libxfixes)
1969 ("libxdamage" ,libxdamage)
1970 ("libxext" ,libxext)
1971 ("alsa-lib" ,alsa-lib)
1972 ("libvorbis" ,libvorbis)
1973 ("libtheora" ,libtheora)))
1974 (home-page "http://recordmydesktop.sourceforge.net/")
1975 (synopsis "Desktop session video recorder")
1977 "recordMyDesktop is a command-line tool that captures the activity in
1978 your graphical desktop and encodes it as a video. This is a useful tool for
1979 making @dfn{screencasts}.")
1980 (license license:gpl2+)))
1982 (define-public simplescreenrecorder
1984 (name "simplescreenrecorder")
1989 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
1991 (file-name (string-append name "-" version ".tar.gz"))
1994 "1gnf9wbiq2fcbqcn1a5nfmp8r0nxrrlgh2wly2mfkkwymynhx0pk"))))
1995 (build-system cmake-build-system)
1996 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
1997 ;; README.md, the program builds and functions properly without them.
1998 ;; As a result, they are omitted. Please add them back if problems appear.
2000 `(("alsa-lib" ,alsa-lib)
2005 ("pulseaudio" ,pulseaudio)
2007 (native-inputs `(("pkg-config" ,pkg-config)))
2010 (list "-DWITH_QT5=TRUE")
2011 #:tests? #f)) ; no test suite
2012 ;; Using HTTPS causes part of the page to be displayed improperly.
2013 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2014 (synopsis "Screen recorder")
2015 (description "SimpleScreenRecorder is an easy to use screen recorder with
2016 a graphical user interface. It supports recording the entire screen, or a
2017 part of it, and allows encoding in many different codecs and file formats.
2018 Other features include a live preview and live streaming.")
2019 (license (list license:gpl3+ ; most files
2020 license:zlib ; glinject/elfhacks.*
2021 license:isc ; glinject/*
2022 license:x11)))) ; build-aux/install-sh
2024 (define-public libsmpeg
2031 (url "svn://svn.icculus.org/smpeg/trunk/")
2032 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2033 (file-name (string-append name "-" version "-checkout"))
2036 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2037 (build-system gnu-build-system)
2039 `(#:phases (modify-phases %standard-phases
2040 (add-after 'unpack 'autogen.sh
2042 (zero? (system* "sh" "autogen.sh")))))))
2044 `(("autoconf" ,autoconf)
2045 ("automake" ,automake)))
2048 (home-page "http://icculus.org/smpeg/")
2049 (synopsis "SDL MPEG decoding library")
2051 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2052 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2053 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2054 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2055 and MPEG system streams.")
2056 (license (list license:expat
2061 (define-public libbdplus
2068 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2069 version "/" name "-" version ".tar.bz2"))
2071 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2073 `(("libgcrypt" ,libgcrypt)))
2074 (build-system gnu-build-system)
2075 (home-page "https://www.videolan.org/developers/libbdplus.html")
2076 (synopsis "Library for decrypting certain Blu-Ray discs")
2077 (description "libbdplus is a library which implements the BD+ System
2079 (license license:lgpl2.1+)))
2081 (define-public libaacs
2088 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2089 version "/" name "-" version ".tar.bz2"))
2091 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2093 `(("libgcrypt" ,libgcrypt)))
2097 (build-system gnu-build-system)
2098 (home-page "https://www.videolan.org/developers/libaacs.html")
2099 (synopsis "Library for decrypting certain Blu-Ray discs")
2100 (description "libaacs is a library which implements the Advanced Access
2101 Content System specification.")
2102 (license license:lgpl2.1+)))
2104 (define-public mps-youtube
2106 (name "mps-youtube")
2111 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2112 "archive/v" version ".tar.gz"))
2113 (file-name (string-append name "-" version ".tar.gz"))
2116 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2117 (build-system python-build-system)
2119 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2120 ;; test suite results differ depending on the country and also introduce
2121 ;; non-determinism in the tests.
2122 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2125 `(("python-pafy" ,python-pafy)
2126 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2127 (home-page "https://github.com/mps-youtube/mps-youtube")
2128 (synopsis "Terminal based YouTube player and downloader")
2130 "@code{mps-youtube} is based on mps, a terminal based program to
2131 search, stream and download music. This implementation uses YouTube as
2132 a source of content and can play and download video as well as audio.
2133 It can use either mpv or mplayer for playback, and for conversion of
2134 formats ffmpeg or libav is used. Users should install one of the
2135 supported players in addition to this package.")
2136 (license license:gpl3+)))
2138 (define-public handbrake
2144 (uri (string-append "https://handbrake.fr/rotation.php?file="
2145 "HandBrake-" version ".tar.bz2"))
2146 (file-name (string-append "handbrake-" version ".tar.bz2"))
2149 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2150 (patches (search-patches "handbrake-pkg-config-path.patch"))
2151 (modules '((guix build utils)))
2153 ;; Remove bundled libraries and source not necessary for
2154 ;; running under a GNU environment.
2156 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2158 (build-system glib-or-gtk-build-system)
2160 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2161 ("autoconf" ,autoconf)
2162 ("curl" ,curl) ;not actually used, but tested for
2163 ("intltool" ,intltool)
2164 ("libtool" ,libtool)
2165 ("pkg-config" ,pkg-config)
2166 ("python" ,python-2))) ;for configuration
2169 ("dbus-glib" ,dbus-glib)
2171 ("fontconfig" ,fontconfig)
2172 ("freetype" ,freetype)
2174 ("gstreamer" ,gstreamer)
2175 ("gst-plugins-base" ,gst-plugins-base)
2179 ("libbluray" ,libbluray)
2180 ("libdvdnav" ,libdvdnav)
2181 ("libdvdread" ,libdvdread)
2182 ("libgudev" ,libgudev)
2183 ("libmpeg2" ,libmpeg2)
2184 ("libnotify" ,libnotify)
2186 ("libsamplerate" ,libsamplerate)
2187 ("libtheora" ,libtheora)
2188 ("libvorbis" ,libvorbis)
2190 ("libxml2" ,libxml2)
2191 ("libx264" ,libx264)
2195 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2197 (modify-phases %standard-phases
2198 (add-before 'patch-source-shebangs 'bootstrap-gtk
2199 ;; Run bootstrap ahead of time so that shebangs get patched.
2201 (setenv "CONFIG_SHELL" (which "sh"))
2202 (setenv "NOCONFIGURE" "1")
2203 ;; Patch the Makefile so that it doesn't bootstrap again.
2204 (substitute* "gtk/module.rules"
2205 ((".*autogen\\.sh.*") ""))
2206 (zero? (system* "sh" "./gtk/autogen.sh"))))
2207 (add-before 'configure 'disable-contrib
2209 (substitute* "make/include/main.defs"
2210 ;; Disable unconditional inclusion of some "contrib"
2211 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2212 ;; and libbluray), which would lead to fetching and
2213 ;; building of these libraries. Use our own instead.
2214 (("MODULES \\+= contrib") "# MODULES += contrib"))
2216 (add-before 'configure 'fix-x265-linking
2218 (substitute* "test/module.defs"
2219 ;; Fix missing library during linking error
2220 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2223 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2224 ;; 'configure' is not an autoconf-generated script, and
2225 ;; errors on unrecognized arguments,
2226 ;; e.g. --enable-fast-install
2227 (let ((out (assoc-ref outputs "out")))
2228 (zero? (apply system* "./configure"
2229 (string-append "--prefix=" out)
2230 (or configure-flags '()))))))
2231 (add-after 'configure 'chdir-build
2232 (lambda _ (chdir "./build") #t)))))
2233 (home-page "https://handbrake.fr")
2234 (synopsis "Video transcoder")
2236 "HandBrake is a tool for converting video from any format to a selection
2237 of modern, widely supported codecs.")
2238 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2239 (license (list license:gpl2+ license:bsd-3))))
2241 (define-public openh264
2247 (uri (string-append "https://github.com/cisco/"
2248 name "/archive/v" version ".tar.gz"))
2249 (file-name (string-append name "-" version ".tar.gz"))
2252 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2253 (build-system gnu-build-system)
2256 ("python" ,python)))
2258 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2260 #:test-target "test"
2261 #:phases (modify-phases %standard-phases
2262 ;; no configure script
2263 (delete 'configure))))
2264 (home-page "http://www.openh264.org/")
2265 (synopsis "H264 decoder library")
2267 "Openh264 is a library which can decode H264 video streams.")
2268 (license license:bsd-2)))
2270 (define-public libmp4v2
2277 ;; XXX: The new location of upstream is uncertain and will become relevant the
2278 ;; moment when the googlecode archive shuts down. It is past the date it
2279 ;; should've been turned off. I tried to communicate with upstream, but this
2280 ;; wasn't very responsive and not very helpful. The short summary is, it is
2281 ;; chaos when it comes to the amount of forks and only time will tell where
2282 ;; the new upstream location is.
2283 (uri (string-append "https://storage.googleapis.com/google-"
2284 "code-archive-downloads/v2/"
2285 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2286 (file-name (string-append name "-" version ".tar.bz2"))
2289 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2290 (build-system gnu-build-system)
2292 "static")) ; 3.7MiB .a file
2295 (modify-phases %standard-phases
2296 (add-after 'unpack 'remove-dates
2298 ;; Make the build reproducible.
2299 (substitute* "configure"
2300 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2301 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2303 (add-after 'install 'move-static-libraries
2304 (lambda* (#:key outputs #:allow-other-keys)
2305 ;; Move static libraries to the "static" output.
2306 (let* ((out (assoc-ref outputs "out"))
2307 (lib (string-append out "/lib"))
2308 (static (assoc-ref outputs "static"))
2309 (slib (string-append static "/lib")))
2311 (for-each (lambda (file)
2312 (install-file file slib)
2314 (find-files lib "\\.a$"))
2317 `(("help2man" ,help2man)
2318 ("dejagnu" ,dejagnu)))
2319 (home-page "https://code.google.com/archive/p/mp4v2/")
2320 (synopsis "API to create and modify mp4 files")
2322 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2323 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2324 file format that has been used as a multimedia file format in a variety of platforms and
2325 applications. It is a very powerful and extensible format that can accommodate
2326 practically any type of media.")
2327 (license license:mpl1.1)))
2329 (define-public libmediainfo
2331 (name "libmediainfo")
2335 (uri (string-append "https://mediaarea.net/download/source/"
2337 name "_" version ".tar.bz2"))
2340 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2341 ;; TODO add a Big Buck Bunny webm for tests.
2343 `(("autoconf" ,autoconf)
2344 ("automake" ,automake)
2345 ("libtool" ,libtool)
2346 ("pkg-config" ,pkg-config)
2348 ("tinyxml2" ,tinyxml2)
2350 ("libzen" ,libzen)))
2351 (build-system gnu-build-system)
2353 '(#:tests? #f ; see above TODO
2355 ;; build scripts not in root of archive
2356 (modify-phases %standard-phases
2357 (add-after 'unpack 'change-to-build-dir
2359 (chdir "Project/GNU/Library")
2361 (add-after 'change-to-build-dir 'autogen
2363 (zero? (system* "sh" "autogen.sh")))))))
2364 (home-page "https://mediaarea.net/en/MediaInfo")
2365 (synopsis "Library for retrieving media metadata")
2366 (description "MediaInfo is a library used for retrieving technical
2367 information and other metadata about audio or video files. A non-exhaustive
2368 list of the information MediaInfo can retrieve from media files include:
2371 @item General: title, author, director, album, track number, date, duration...
2372 @item Video: codec, aspect, fps, bitrate...
2373 @item Audio: codec, sample rate, channels, language, bitrate...
2374 @item Text: language of subtitle
2375 @item Chapters: number of chapters, list of chapters
2378 MediaInfo supports the following formats:
2381 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2382 MPEG-2, MPEG-4, DVD (VOB)...
2383 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2384 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2385 @item Subtitles: SRT, SSA, ASS, SAMI...
2387 (license license:bsd-2)))
2389 ;; TODO also have a GUI version available
2390 (define-public mediainfo
2396 (uri (string-append "https://mediaarea.net/download/source/"
2397 name "/" version "/"
2398 name "_" version ".tar.bz2"))
2401 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2403 `(("autoconf" ,autoconf)
2404 ("automake" ,automake)
2405 ("libtool" ,libtool)
2406 ("pkg-config" ,pkg-config)
2408 ("libmediainfo", libmediainfo)
2409 ("libzen" ,libzen)))
2410 (build-system gnu-build-system)
2412 '(#:tests? #f ; lacks tests
2414 ;; build scripts not in root of archive
2415 (modify-phases %standard-phases
2416 (add-after 'unpack 'change-to-build-dir
2418 (chdir "Project/GNU/CLI")
2420 (add-after 'change-to-build-dir 'autogen
2422 (zero? (system* "sh" "autogen.sh")))))))
2423 (home-page "https://mediaarea.net/en/MediaInfo")
2424 (synopsis "Utility for reading media metadata")
2425 (description "MediaInfo is a utility used for retrieving technical
2426 information and other metadata about audio or video files. It supports the
2427 many codecs and formats supported by libmediainfo.")
2428 (license license:bsd-2)))
2430 (define-public livemedia-utils
2432 (name "livemedia-utils")
2433 (version "2017.10.28")
2437 "https://download.videolan.org/contrib/live555/live."
2441 "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
2442 (modules '((guix build utils)))
2444 ;; As of glibc 2.26, <xlocale.h> no longer is.
2445 '(substitute* "liveMedia/include/Locale.hh"
2446 (("xlocale\\.h") "locale.h")))))
2447 (build-system gnu-build-system)
2449 '(#:tests? #f ; no tests
2450 #:make-flags (list "CC=gcc"
2451 (string-append "LDFLAGS=-Wl,-rpath="
2452 (assoc-ref %outputs "out") "/lib")
2453 (string-append "PREFIX="
2454 (assoc-ref %outputs "out")))
2455 #:phases (modify-phases %standard-phases
2456 (add-before 'configure 'fix-makefiles-generation
2458 (substitute* "genMakefiles"
2463 (zero? (system* "./genMakefiles"
2464 "linux-with-shared-libraries")))))))
2465 (home-page "http://www.live555.com/liveMedia/")
2466 (synopsis "Set of C++ libraries for multimedia streaming")
2467 (description "This code forms a set of C++ libraries for multimedia
2468 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2469 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2470 JPEG video, and several audio codecs. They can easily be extended to support
2471 additional (audio and/or video) codecs, and can also be used to build basic
2472 RTSP or SIP clients and servers.")
2473 (license license:lgpl3+)))
2475 (define-public libdvbpsi
2482 "https://download.videolan.org/pub/libdvbpsi/"
2483 version "/libdvbpsi-" version ".tar.bz2"))
2486 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2487 (build-system gnu-build-system)
2488 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2489 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2491 (description "libdvbpsi is a simple library designed for decoding and
2492 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2493 and ITU-T H.222.0.")
2494 (license license:lgpl2.1)))
2496 (define-public ffms2
2500 (home-page "https://github.com/FFMS/ffms2")
2503 (uri (string-append home-page "/archive/" version ".tar.gz"))
2504 (file-name (string-append name "-" version ".tar.gz"))
2507 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2508 (build-system gnu-build-system)
2511 (list "--enable-avresample")))
2515 `(("ffmpeg" ,ffmpeg)))
2517 `(("pkg-config" ,pkg-config)))
2518 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2520 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2521 programmers to access a standard API to open and decompress media files.")
2522 ;; sources are distributed under a different license that the binary.
2523 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2524 (license license:gpl2+))); inherits from ffmpeg
2526 (define-public aegisub
2533 "http://ftp.aegisub.org/pub/archives/releases/source/"
2534 name "-" version ".tar.xz"))
2537 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2538 (build-system gnu-build-system)
2541 (list "--disable-update-checker"
2542 "--without-portaudio"
2545 ;; tests require busted, a lua package we don't have yet
2548 (modify-phases %standard-phases
2549 (add-before 'configure 'fix-ldflags
2551 (setenv "LDFLAGS" "-pthread"))))))
2554 ("desktop-file-utils" ,desktop-file-utils)
2557 ("hunspell" ,hunspell)
2560 ("alsa-lib" ,alsa-lib)
2561 ("pulseaudio" ,pulseaudio)
2563 ("freetype" ,freetype)
2564 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2566 `(("intltool" ,intltool)
2567 ("pkg-config" ,pkg-config)))
2568 (home-page "http://www.aegisub.org/")
2569 (synopsis "Subtitle engine")
2571 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2572 it quick and easy to time subtitles to audio, and features many powerful
2573 tools for styling them, including a built-in real-time video preview.")
2574 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2575 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2576 license:expat)))) ; and src/gl that is under a license similar
2577 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2578 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2579 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2581 (define-public gst-transcoder
2583 (name "gst-transcoder")
2588 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2589 "archive/" version ".tar.gz"))
2590 (file-name (string-append name "-" version ".tar.gz"))
2593 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2594 (build-system meson-build-system)
2596 `(("gobject-introspection" ,gobject-introspection)
2598 ("gstreamer" ,gstreamer)
2599 ("gst-plugins-base" ,gst-plugins-base)))
2601 `(("python" ,python)
2602 ("pkg-config" ,pkg-config)))
2603 (home-page "https://github.com/pitivi/gst-transcoder/")
2604 (synopsis "GStreamer Transcoding API")
2605 (description "GStreamer Transcoding API")
2606 (license license:lgpl2.1)))
2615 (uri (string-append "mirror://sourceforge/gmerlin/"
2616 name "/" version "/"
2617 name "-" version ".tar.gz"))
2618 (file-name (string-append name "-" version ".tar.gz"))
2621 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2622 (build-system gnu-build-system)
2624 '(#:configure-flags '("LIBS=-lm")))
2626 `(("pkg-config" ,pkg-config)
2627 ("doxygen" ,doxygen)))
2628 (home-page "http://gmerlin.sourceforge.net")
2629 (synopsis "Low level library for multimedia API building")
2631 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2632 library, upon which multimedia APIs can be built. Gavl handles all the
2633 details of audio and video formats like colorspaces, sample rates,
2634 multichannel configurations, etc. It provides standardized definitions for
2635 those formats as well as container structures for carrying audio samples or
2636 video images inside an application.
2638 In addition, it handles the sometimes ugly task of converting between all
2639 these formats and provides some elementary operations (copying, scaling,
2640 alpha blending etc).")
2641 (license license:gpl3)))
2643 (define-public frei0r-plugins
2645 (name "frei0r-plugins")
2650 (uri (string-append "https://files.dyne.org/frei0r/"
2651 "frei0r-plugins-" version ".tar.gz"))
2654 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2655 (build-system gnu-build-system)
2658 (modify-phases %standard-phases
2659 (add-after 'unpack 'autotools
2661 (zero? (system* "sh" "autogen.sh")))))))
2662 ;; TODO: opencv for additional face detection filters
2667 `(("pkg-config" ,pkg-config)
2668 ("libtool" ,libtool)
2669 ("automake" ,automake)
2670 ("autoconf" ,autoconf)))
2671 (home-page "https://www.dyne.org/software/frei0r/")
2672 (synopsis "Minimalistic plugin API for video effects")
2674 "Frei0r is a minimalistic plugin API for video effects.
2675 The main emphasis is on simplicity for an API that will round up
2676 the most common video effects into simple filters, sources and
2677 mixers that can be controlled by parameters. Frei0r wants to
2678 provide a way to share these simple effects between many
2679 applications, avoiding their reimplementation by different projects.
2680 It counts more than 100 plugins.")
2681 (license (list license:gpl2+
2682 ;; The following files are licensed as LGPL2.1+:
2683 ;; src/generator/ising0r/ising0r.c
2684 ;; src/generator/onecol0r/onecol0r.cpp
2685 ;; src/generator/nois0r/nois0r.cpp
2686 ;; src/generator/lissajous0r/lissajous0r.cpp
2687 ;; src/filter/ndvi/gradientlut.hpp
2688 ;; src/filter/ndvi/ndvi.cpp
2689 ;; src/filter/facedetect/facedetect.cpp
2690 license:lgpl2.1+))))
2692 (define-public motion
2696 (home-page "https://motion-project.github.io/")
2700 "https://github.com/Motion-Project/motion/archive/"
2701 "release-" version ".tar.gz"))
2704 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2705 (file-name (string-append name "-" version ".tar.gz"))))
2706 (build-system gnu-build-system)
2708 `(("autoconf" ,(autoconf-wrapper))
2709 ("automake" ,automake)
2710 ("pkg-config" ,pkg-config)))
2712 `(("libjpeg" ,libjpeg)
2714 ("sqlite" ,sqlite)))
2716 '(#:phases (modify-phases %standard-phases
2717 (add-after 'unpack 'bootstrap
2719 (patch-shebang "version.sh")
2720 (invoke "autoreconf" "-vfi"))))
2721 #:configure-flags '("--sysconfdir=/etc")
2722 #:make-flags (list (string-append "sysconfdir="
2723 (assoc-ref %outputs "out")
2726 #:tests? #f)) ;no 'check' target
2727 (synopsis "Detect motion from video signals")
2729 "Motion is a program that monitors the video signal from one or more
2730 cameras and is able to detect if a significant part of the picture has
2731 changed. Or in other words, it can detect motion.")
2733 ;; Some files say "version 2" and others "version 2 or later".
2734 (license license:gpl2)))