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 (invoke "./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.
212 (lambda _ (invoke "sh" "bootstrap"))))))
213 (home-page "http://liba52.sourceforge.net/")
214 (synopsis "ATSC A/52 stream decoder")
215 (description "liba52 is a library for decoding ATSC A/52 streams. The
216 A/52 standard is used in a variety of applications, including digital
217 television and DVD. It is also known as AC-3.")
218 (license license:gpl2+)))
220 (define-public libmpeg2
226 ;; A mirror://sourceforge URI doesn't work, presumably
227 ;; because the SourceForge project is misconfigured.
228 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
229 name "-" version ".tar.gz"))
232 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
240 (build-system gnu-build-system)
241 (home-page "http://libmpeg2.sourceforge.net/")
242 (synopsis "MPEG1 and MPEG2 video decoder library")
244 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
245 (license license:gpl2+)))
247 (define-public libx264
250 (version "20180219-2245")
253 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
254 "x264-snapshot-" version "-stable.tar.bz2"))
257 "1x0cg8l30wp84mr7q0ddp06jclm0kjrszazrx87d4k7js3qxjy8m"))))
258 (build-system gnu-build-system)
260 `(("pkg-config" ,pkg-config)
262 ;; TODO: Add gpac input
264 `(#:tests? #f ;no check target
265 #:configure-flags '("--enable-shared"
266 ;; Don't build the command-line program. If we
267 ;; want it later, we should do so in a different
268 ;; package to avoid a circular dependency (the x264
269 ;; program depends on ffmpeg and ffmpeg depends on
273 ;; On MIPS, we must pass "--disable-asm" or else
274 ;; configure fails after printing: "You specified a
275 ;; pre-MSA CPU in your CFLAGS. If you really want
276 ;; to run on such a CPU, configure with
278 ,@(if (string-prefix? "mips"
279 (or (%current-target-system)
283 (home-page "https://www.videolan.org/developers/x264.html")
284 (synopsis "H.264 video coding library")
285 (description "libx264 is an advanced encoding library for creating
286 H.264 (MPEG-4 AVC) video streams.")
287 (license (list license:gpl2+ ;most files
288 license:isc ;common/x86/x86inc.asm
289 license:lgpl2.1+ ;extras/getopt.c
290 license:bsd-3 ;extras/inttypes.h
291 (license:non-copyleft ;extras/cl*.h
293 "See extras/cl.h in the distribution.")))))
295 (define-public mkvtoolnix
302 (uri (string-append "https://mkvtoolnix.download/sources/"
303 name "-" version ".tar.xz"))
306 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
307 (modules '((guix build utils)))
309 ;; Delete bundled libraries.
310 (for-each delete-file-recursively
317 (build-system gnu-build-system)
324 ("libmatroska" ,libmatroska)
326 ("libvorbis" ,libvorbis)
333 `(("docbook-xsl" ,docbook-xsl)
334 ("gettext" ,gettext-minimal)
335 ("googletest" ,googletest)
337 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
339 ("pkg-config" ,pkg-config)
344 (list (string-append "--with-boost="
345 (assoc-ref %build-inputs "boost"))
346 (string-append "--with-docbook-xsl-root="
347 (assoc-ref %build-inputs "docbook-xsl")
348 "/xml/xsl/docbook-xsl-"
349 ,(package-version docbook-xsl))
350 (string-append "--with-extra-includes="
351 (assoc-ref %build-inputs "nlohmann-json-cpp")
352 "/include/nlohmann"))
354 (modify-phases %standard-phases
355 (add-before 'configure 'add-googletest
358 (string-append (assoc-ref %build-inputs "googletest")
359 "/include/gtest") "lib/gtest")
363 (let ((-j (list "-j" (number->string (parallel-job-count)))))
364 (zero? (apply system* "rake" -j)))))
367 (zero? (system* "rake" "tests/unit"))))
370 (zero? (system* "rake" "install")))))))
371 (home-page "https://mkvtoolnix.download")
372 (synopsis "Tools to create, alter and inspect Matroska files")
374 "MKVToolNix provides tools for getting information about Matroska files
375 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
376 and creating Matroska files from other media files (@code{mkvmerge}).")
377 (license license:gpl2)))
386 (uri (string-append "https://download.videolan.org/videolan/x265/"
387 "x265_" version ".tar.gz"))
390 "1gyd94jkwdii9308m07nymsbxrmrcl81c0j8i10zhslr2mj07w0v"))
391 (modules '((guix build utils)))
393 (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\"")))
579 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
580 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
582 (list (string-append "--with-drivers-path="
583 (assoc-ref %build-inputs "mesa") "/lib/dri"))
584 ;; However, we can't write to mesa's store directory, so override the
585 ;; following make variable to install the dummy driver to libva's
586 ;; $prefix/lib/dri directory.
588 (list (string-append "dummy_drv_video_ladir="
589 (assoc-ref %outputs "out") "/lib/dri"))))
590 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
591 (synopsis "Video acceleration library")
592 (description "The main motivation for VA-API (Video Acceleration API) is
593 to enable hardware accelerated video decode/encode at various
594 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
595 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
596 (license license:expat)))
598 (define-public ffmpeg
604 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
608 "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"))))
609 (build-system gnu-build-system)
611 `(("fontconfig" ,fontconfig)
612 ("freetype" ,freetype)
613 ("frei0r-plugins" ,frei0r-plugins)
619 ("libbluray" ,libbluray)
621 ("libcdio-paranoia" ,libcdio-paranoia)
622 ("libtheora" ,libtheora)
624 ("libvdpau" ,libvdpau)
625 ("libvorbis" ,libvorbis)
631 ("pulseaudio" ,pulseaudio)
642 ("pkg-config" ,pkg-config)
644 ("python" ,python-2) ; scripts use interpreter python2
648 `(#:test-target "fate"
650 ;; possible additional inputs:
651 ;; --enable-avisynth enable reading of AviSynth script
653 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
654 ;; --enable-libcelt enable CELT decoding via libcelt [no]
655 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
656 ;; and libraw1394 [no]
657 ;; --enable-libfaac enable AAC encoding via libfaac [no]
658 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
659 ;; --enable-libflite enable flite (voice synthesis) support via
661 ;; --enable-libgme enable Game Music Emu via libgme [no]
662 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
663 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
664 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
665 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
666 ;; --enable-libnut enable NUT (de)muxing via libnut,
667 ;; native (de)muxer exists [no]
668 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
669 ;; libopencore-amrnb [no]
670 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
671 ;; libopencore-amrwb [no]
672 ;; --enable-libopencv enable video filtering via libopencv [no]
673 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
675 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
676 ;; --enable-libschroedinger enable Dirac de/encoding via
677 ;; libschroedinger [no]
678 ;; --enable-libshine enable fixed-point MP3 encoding via
680 ;; --enable-libssh enable SFTP protocol via libssh [no]
681 ;; (libssh2 does not work)
682 ;; --enable-libstagefright-h264 enable H.264 decoding via
683 ;; libstagefright [no]
684 ;; --enable-libutvideo enable Ut Video encoding and decoding via
686 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
687 ;; --enable-libvidstab enable video stabilization using
689 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
690 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
691 ;; libvo-amrwbenc [no]
692 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
693 ;; --enable-libxavs enable AVS encoding via xavs [no]
694 ;; --enable-libzmq enable message passing via libzmq [no]
695 ;; --enable-libzvbi enable teletext support via libzvbi [no]
696 ;; --enable-opencl enable OpenCL code
697 '("--enable-avresample"
698 "--enable-gpl" ; enable optional gpl licensed parts
701 "--enable-fontconfig"
708 "--enable-libfreetype"
709 "--enable-libmp3lame"
715 "--enable-libtwolame"
724 "--enable-runtime-cpudetect"
726 ;; The HTML pages take 7.2 MiB
727 "--disable-htmlpages"
729 ;; The static libraries are 23 MiB
732 ;; Runtime cpu detection is not implemented on
733 ;; MIPS, so we disable some features.
736 "--disable-mipsdspr2"
739 (modify-phases %standard-phases
742 ;; configure does not work followed by "SHELL=..." and
743 ;; "CONFIG_SHELL=..."; set environment variables instead
744 (lambda* (#:key outputs configure-flags #:allow-other-keys)
745 (let ((out (assoc-ref outputs "out")))
746 (substitute* "configure"
747 (("#! /bin/sh") (string-append "#!" (which "sh"))))
748 (setenv "SHELL" (which "bash"))
749 (setenv "CONFIG_SHELL" (which "bash"))
752 (string-append "--prefix=" out)
753 ;; Add $libdir to the RUNPATH of all the binaries.
754 (string-append "--extra-ldflags=-Wl,-rpath="
758 'check 'set-ld-library-path
760 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
762 (let* ((dso (find-files "." "\\.so$"))
763 (path (string-join (map dirname dso) ":")))
764 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
765 (setenv "LD_LIBRARY_PATH" path)
767 (home-page "https://www.ffmpeg.org/")
768 (synopsis "Audio and video framework")
769 (description "FFmpeg is a complete, cross-platform solution to record,
770 convert and stream audio and video. It includes the libavcodec
771 audio/video codec library.")
772 (license license:gpl2+)))
774 (define-public ffmpeg-2.8
780 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
784 "05m1272r5qa2r0ym5vq4figdfnpvcys1fgb1026n5s6xdjd1s1pg"))))
786 (substitute-keyword-arguments (package-arguments ffmpeg)
787 ((#:configure-flags flags)
789 (if (string=? flag "--disable-mipsdsp")
790 "--disable-mipsdspr1"
794 ;; Annoyingly enough, the latest mpv release does not build with the stable
795 ;; release of ffmpeg. Use a git commit until the situation is fixed.
796 (define-public ffmpeg-git
797 (let ((commit "3f887440677328c9cfed97ad81d14051ffa32aae")
802 (version (string-append "3.4-" revision "." (string-take commit 9)))
806 (url "https://github.com/FFmpeg/FFmpeg.git")
808 (file-name (string-append name "-" version "-checkout"))
811 "1b7n3g4m2rbvrwsgbfl8wl91z42g1ld42clwxs8qpl9ny5rwz6sq")))))))
820 "https://download.videolan.org/pub/videolan/vlc/"
821 version "/vlc-" version ".tar.xz"))
824 "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
825 (build-system gnu-build-system)
827 `(("git" ,git) ; needed for a test
828 ("pkg-config" ,pkg-config)))
829 ;; FIXME: Add optional inputs once available.
831 `(("alsa-lib" ,alsa-lib)
835 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
836 ("fontconfig" ,fontconfig)
837 ("freetype" ,freetype)
841 ("libdvbpsi" ,libdvbpsi)
842 ("libgcrypt" ,libgcrypt)
847 ("libsamplerate" ,libsamplerate)
849 ("libvorbis" ,libvorbis)
850 ("libtheora" ,libtheora)
853 ("libxinerama" ,libxinerama)
856 ("livemedia-utils" ,livemedia-utils)
861 ("pulseaudio" ,pulseaudio)
862 ("python" ,python-wrapper)
864 ("qtx11extras" ,qtx11extras)
866 ("sdl-image" ,sdl-image)
869 ("xcb-util-keysyms" ,xcb-util-keysyms)))
872 `("CXXFLAGS=-std=gnu++11"
873 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
874 (assoc-ref %build-inputs "ffmpeg")
875 "/lib")) ;needed for the tests
878 (modify-phases %standard-phases
879 (add-after 'unpack 'patch-source
880 (lambda* (#:key inputs #:allow-other-keys)
881 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
882 (substitute* "configure"
883 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
884 (string-append "LIVE555_PREFIX=" livemedia-utils)))
885 ;; Some of the tests require using the display to test out VLC,
886 ;; which fails in our sandboxed build system
887 (substitute* "test/run_vlc.sh"
888 (("./vlc --ignore-config") "echo"))
889 ;; XXX Likely not needed for >2.2.6.
890 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
891 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
893 (add-after 'install 'regenerate-plugin-cache
894 (lambda* (#:key outputs #:allow-other-keys)
895 ;; The 'install-exec-hook' rule in the top-level Makefile.am
896 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
897 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
898 ;; it references. Thus, we first reset the timestamps of all
899 ;; these files, and then regenerate the cache such that the
900 ;; mtimes it includes are always zero instead of being dependent
901 ;; on the build time.
902 (let* ((out (assoc-ref outputs "out"))
903 (pkglibdir (string-append out "/lib/vlc"))
904 (plugindir (string-append pkglibdir "/plugins"))
905 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
906 ;; TODO: Factorize 'reset-timestamps'.
907 (for-each (lambda (file)
908 (let ((s (lstat file)))
909 (unless (eq? (stat:type s) 'symlink)
910 (utime file 0 0 0 0))))
911 (find-files plugindir))
912 (zero? (system* cachegen plugindir))))))))
913 (home-page "https://www.videolan.org/")
914 (synopsis "Audio and video framework")
915 (description "VLC is a cross-platform multimedia player and framework
916 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
917 treaming protocols.")
918 (license license:gpl2+)))
920 (define-public mplayer
927 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
931 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
932 (build-system gnu-build-system)
933 ;; FIXME: Add additional inputs once available.
935 `(("pkg-config" ,pkg-config)))
937 `(("alsa-lib" ,alsa-lib)
938 ("cdparanoia" ,cdparanoia)
940 ("fontconfig" ,fontconfig)
941 ("freetype" ,freetype)
942 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
945 ("libdvdcss" ,libdvdcss)
946 ("libdvdnav" ,libdvdnav)
948 ("libmpeg2" ,libmpeg2)
949 ("libmpg123" ,mpg123) ; audio codec for MP3
951 ("libtheora" ,libtheora)
952 ("libvdpau" ,libvdpau)
953 ("libvorbis" ,libvorbis)
956 ("libxinerama" ,libxinerama)
958 ("libxxf86dga" ,libxxf86dga)
962 ("pulseaudio" ,pulseaudio)
963 ("python" ,python-wrapper)
969 `(#:tests? #f ; no test target
971 (modify-phases %standard-phases
973 ;; configure does not work followed by "SHELL=..." and
974 ;; "CONFIG_SHELL=..."; set environment variables instead
975 (lambda* (#:key inputs outputs #:allow-other-keys)
976 (let ((out (assoc-ref outputs "out"))
977 (libx11 (assoc-ref inputs "libx11")))
978 (substitute* "configure"
979 (("#! /bin/sh") (string-append "#!" (which "sh"))))
980 (setenv "SHELL" (which "bash"))
981 (setenv "CONFIG_SHELL" (which "bash"))
984 (string-append "--extra-cflags=-I"
985 libx11 "/include") ; to detect libx11
986 "--disable-ffmpeg_a" ; disables bundled ffmpeg
987 (string-append "--prefix=" out)
988 ;; Enable runtime cpu detection where supported,
989 ;; and choose a suitable target.
990 ,@(match (or (%current-target-system)
993 '("--enable-runtime-cpudetection"
994 "--target=x86_64-linux"))
996 '("--enable-runtime-cpudetection"
997 "--target=i686-linux"))
999 '("--target=mips3-linux"))
1000 (_ (list (string-append
1002 (or (%current-target-system)
1003 (nix-system->gnu-triplet
1004 (%current-system)))))))
1005 "--disable-iwmmxt"))))))))
1006 (home-page "https://www.mplayerhq.hu/design7/news.html")
1007 (synopsis "Audio and video player")
1008 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1009 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1010 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1011 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1012 (license license:gpl2)))
1021 "https://github.com/mpv-player/mpv/archive/v" version
1025 "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
1026 (file-name (string-append name "-" version ".tar.gz"))))
1027 (build-system waf-build-system)
1029 `(("perl" ,perl) ; for zsh completion file
1030 ("pkg-config" ,pkg-config)
1031 ("python-docutils" ,python-docutils)))
1032 ;; Missing features: libguess, V4L2
1034 `(("alsa-lib" ,alsa-lib)
1036 ("ffmpeg" ,ffmpeg-git)
1041 ("libbluray" ,libbluray)
1042 ("libcaca" ,libcaca)
1043 ("libbs2b" ,libbs2b)
1044 ("libcdio-paranoia" ,libcdio-paranoia)
1045 ("libdvdread" ,libdvdread)
1046 ("libdvdnav" ,libdvdnav)
1047 ("libjpeg" ,libjpeg)
1049 ("libvdpau" ,libvdpau)
1051 ("libxext" ,libxext)
1052 ("libxinerama" ,libxinerama)
1053 ("libxrandr" ,libxrandr)
1054 ("libxscrnsaver" ,libxscrnsaver)
1056 ;; XXX: lua > 5.2 is not currently supported; see
1057 ;; waftools/checks/custom.py
1061 ("pulseaudio" ,pulseaudio)
1063 ("shaderc" ,shaderc)
1064 ("vulkan-icd-loader" ,vulkan-icd-loader)
1066 ("wayland" ,wayland)
1067 ("wayland-protocols" ,wayland-protocols)
1068 ("libxkbcommon" ,libxkbcommon)
1069 ("youtube-dl" ,youtube-dl)
1073 (modify-phases %standard-phases
1075 'configure 'setup-waf
1076 (lambda* (#:key inputs #:allow-other-keys)
1077 (copy-file (assoc-ref inputs "waf") "waf")
1080 #:configure-flags (list "--enable-libmpv-shared"
1085 "--disable-build-date")
1086 ;; No check function defined.
1088 (home-page "https://mpv.io/")
1089 (synopsis "Audio and video player")
1090 (description "mpv is a general-purpose audio and video player. It is a
1091 fork of mplayer2 and MPlayer. It shares some features with the former
1092 projects while introducing many more.")
1093 (license license:gpl2+)))
1095 (define-public gnome-mpv
1102 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1103 "/download/v" version "/gnome-mpv-" version
1107 "03kjwd5jq0i5ajnvhjwf5019bjjaa16xkdrhdkiz1k58ipjvvj93"))))
1109 `(("intltool" ,intltool)
1110 ("pkg-config" ,pkg-config)))
1113 ("libepoxy" ,libepoxy)
1115 (build-system glib-or-gtk-build-system)
1116 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1117 (synopsis "GTK+ frontend for the mpv media player")
1118 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1119 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1120 access to mpv's powerful playback capabilities.")
1121 (license license:gpl3+)))
1123 (define-public libvpx
1128 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1131 (url "https://chromium.googlesource.com/webm/libvpx")
1132 (commit (string-append "v" version))))
1133 (file-name (git-file-name name version))
1136 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1137 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1138 (build-system gnu-build-system)
1140 `(#:configure-flags (list "--enable-shared"
1142 ;; Limit size to avoid CVE-2015-1258
1143 "--size-limit=16384x16384"
1144 (string-append "--prefix=" (assoc-ref %outputs "out")))
1145 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1146 (assoc-ref %outputs "out") "/lib"))
1147 #:phases (modify-phases %standard-phases
1149 (lambda* (#:key configure-flags #:allow-other-keys)
1150 ;; The configure script does not understand some of the GNU
1151 ;; options, so we only add the flags specified above.
1152 (apply invoke "./configure" configure-flags))))
1153 #:tests? #f)) ; no check target
1157 (synopsis "VP8/VP9 video codec")
1158 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1159 (license license:bsd-3)
1160 (home-page "https://www.webmproject.org/")))
1162 (define-public youtube-dl
1165 (version "2018.04.16")
1168 (uri (string-append "https://yt-dl.org/downloads/"
1169 version "/youtube-dl-"
1173 "046zg8pww2xg1yibh7c1a8jcg8f1znr4hsz1l1da03djcp6na99d"))))
1174 (build-system python-build-system)
1176 ;; The problem here is that the directory for the man page and completion
1177 ;; files is relative, and for some reason, setup.py uses the
1178 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1179 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1180 ;; completion file is called 'youtube-dl' rather than
1181 ;; 'youtube-dl.bash-completion'.
1182 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1183 #:phases (modify-phases %standard-phases
1184 (add-before 'install 'fix-the-data-directories
1185 (lambda* (#:key outputs #:allow-other-keys)
1186 (let ((prefix (assoc-ref outputs "out")))
1187 (mkdir "bash-completion")
1188 (rename-file "youtube-dl.bash-completion"
1189 "bash-completion/youtube-dl")
1190 (substitute* "setup.py"
1191 (("youtube-dl\\.bash-completion")
1192 "bash-completion/youtube-dl")
1194 (string-append "'" prefix "/etc/"))
1196 (string-append "'" prefix "/share/")))
1198 (synopsis "Download videos from YouTube.com and other sites")
1200 "Youtube-dl is a small command-line program to download videos from
1201 YouTube.com and many more sites.")
1202 (home-page "https://yt-dl.org")
1203 (license license:public-domain)))
1205 (define-public youtube-dl-gui
1207 (name "youtube-dl-gui")
1212 (uri (pypi-uri "Youtube-DLG" version))
1215 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1216 (build-system python-build-system)
1218 ;; In Guix, wxpython has not yet been packaged for Python 3.
1219 `(#:python ,python-2
1220 ;; This package has no tests.
1223 (modify-phases %standard-phases
1224 (add-before 'build 'patch-source
1225 (lambda* (#:key inputs #:allow-other-keys)
1226 ;; The youtube-dl-gui program lets you configure options. Some of
1227 ;; them are problematic, so we change their defaults.
1228 (substitute* "youtube_dl_gui/optionsmanager.py"
1229 ;; When this is true, the builder process will try (and fail) to
1230 ;; write logs to the builder user's home directory.
1231 (("'enable_log': True") "'enable_log': False")
1232 ;; This determines which youtube-dl program youtube-dl-gui will
1233 ;; run. If we don't set this, then youtube-dl-gui might download
1234 ;; an arbitrary copy from the Internet into the user's home
1235 ;; directory and run it, so let's make sure youtube-dl-gui uses
1236 ;; the youtube-dl from the inputs by default.
1237 (("'youtubedl_path': self.config_path")
1238 (string-append "'youtubedl_path': '"
1239 (assoc-ref inputs "youtube-dl")
1241 ;; When this is True, when youtube-dl-gui is finished downloading
1242 ;; a file, it will try (and possibly fail) to open the directory
1243 ;; containing the downloaded file. This can fail because it
1244 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1245 ;; adding xdg-utils to the propagated inputs is not enough to
1246 ;; make this work, so for now we set the default to False.
1247 (("'open_dl_dir': True") "'open_dl_dir': False"))
1248 ;; The youtube-dl program from the inputs is actually a wrapper
1249 ;; script written in bash, so attempting to invoke it as a python
1250 ;; script will fail.
1251 (substitute* "youtube_dl_gui/downloaders.py"
1252 (("cmd = \\['python', self\\.youtubedl_path\\]")
1253 "cmd = [self.youtubedl_path]"))
1254 ;; Use relative paths for installing data files so youtube-dl-gui
1255 ;; installs the files relative to its prefix in the store, rather
1256 ;; than relative to /. Also, instead of installing data files into
1257 ;; $prefix/usr/share, install them into $prefix/share for
1258 ;; consistency (see: (standards) Directory Variables).
1259 (substitute* "setup.py"
1260 (("= '/usr/share") "= 'share"))
1261 ;; Update get_locale_file() so it finds the installed localization
1263 (substitute* "youtube_dl_gui/utils.py"
1264 (("os\\.path\\.join\\('/usr', 'share'")
1265 (string-append "os.path.join('"
1266 (assoc-ref %outputs "out")
1267 "', 'share'"))))))))
1269 `(("python2-wxpython" ,python2-wxpython)
1270 ("youtube-dl" ,youtube-dl)))
1271 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1273 "GUI (Graphical User Interface) for @command{youtube-dl}")
1275 "Youtube-dlG is a GUI (Graphical User Interface) for
1276 @command{youtube-dl}. You can use it to download videos from YouTube and any
1277 other site that youtube-dl supports.")
1278 (license license:unlicense)))
1280 (define-public you-get
1283 (version "0.4.1060")
1287 "https://github.com/soimort/you-get/archive/v"
1289 (file-name (string-append name "-" version ".tar.gz"))
1292 "1pq7c2ay42aan7ykpmddzh6ylq0qsq8a27pk68m5imaxi6abbwsz"))))
1293 (build-system python-build-system)
1295 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1298 (modify-phases %standard-phases
1299 (add-after 'unpack 'qualify-input-references
1300 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1301 ;; happens to be in the user's $PATH at run time.
1302 (lambda* (#:key inputs #:allow-other-keys)
1303 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1305 (substitute* "src/you_get/processor/ffmpeg.py"
1306 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1307 ;; same string is also used when sniffing ffmpeg's output.
1308 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1309 (string-append prefix "'" ffmpeg "'")))
1311 #:tests? #f)) ; XXX some tests need Internet access
1312 (synopsis "Download videos, audio, or images from Web sites")
1314 "You-Get is a command-line utility to download media contents (videos,
1315 audio, images) from the Web. It can use either mpv or vlc for playback.")
1316 (home-page "https://you-get.org/")
1317 (license license:expat)))
1319 (define-public youtube-viewer
1321 (name "youtube-viewer")
1326 "https://github.com/trizen/youtube-viewer/archive/"
1328 (file-name (string-append name "-" version ".tar.gz"))
1331 "1j572his6qmazlmyrbnfq62s9bqml875ay7wy26byy9hfc7m0vgk"))))
1332 (build-system perl-build-system)
1334 `(("perl-module-build" ,perl-module-build)))
1335 ;; FIXME: Add optional dependencies once available:
1336 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1338 `(("perl-data-dump" ,perl-data-dump)
1339 ("perl-file-sharedir" ,perl-file-sharedir)
1340 ("perl-gtk2" ,perl-gtk2)
1341 ("perl-json" ,perl-json)
1342 ("perl-libwww" ,perl-libwww)
1343 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1344 ("perl-mozilla-ca" ,perl-mozilla-ca)
1345 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1347 `(#:modules ((guix build perl-build-system)
1350 #:module-build-flags '("--gtk")
1352 (modify-phases %standard-phases
1353 (add-after 'install 'wrap-program
1354 (lambda* (#:key outputs #:allow-other-keys)
1355 (let* ((out (assoc-ref outputs "out"))
1356 (bin-dir (string-append out "/bin/"))
1357 (site-dir (string-append out "/lib/perl5/site_perl/"))
1358 (lib-path (getenv "PERL5LIB")))
1359 (for-each (cut wrap-program <>
1360 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1361 (find-files bin-dir))
1364 "Lightweight application for searching and streaming videos from YouTube")
1366 "Youtube-viewer searches and plays YouTube videos in a native player.
1367 It comes with various search options; it can search for videos, playlists
1368 and/or channels. The videos are streamed directly in a selected video player
1369 at the best resolution (customizable) and with closed-captions (if available).
1370 Both command-line and GTK2 interface are available.")
1371 (home-page "https://github.com/trizen/youtube-viewer")
1372 (license license:perl-license)))
1374 (define-public libbluray
1380 (uri (string-append "https://download.videolan.org/videolan/"
1381 name "/" version "/"
1382 name "-" version ".tar.bz2"))
1385 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1386 (build-system gnu-build-system)
1388 `(#:configure-flags '("--disable-bdjava-jar")
1390 (modify-phases %standard-phases
1391 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1392 ;; Avoid the need to propagate libxml2 by referring to it
1393 ;; directly, as is already done for fontconfig & freetype.
1394 (lambda* (#:key inputs #:allow-other-keys)
1395 (let ((libxml2 (assoc-ref inputs "libxml2")))
1396 (substitute* "configure"
1397 ((" libxml-2.0") ""))
1398 (substitute* "src/libbluray.pc.in"
1399 (("^Libs.private:" field)
1400 (string-append field " -L" libxml2 "/lib -lxml2")))
1402 (add-before 'build 'fix-dlopen-paths
1403 (lambda* (#:key inputs #:allow-other-keys)
1404 (let ((libaacs (assoc-ref inputs "libaacs"))
1405 (libbdplus (assoc-ref inputs "libbdplus")))
1406 (substitute* "src/libbluray/disc/aacs.c"
1408 (string-append "\"" libaacs "/lib/libaacs\"")))
1409 (substitute* "src/libbluray/disc/bdplus.c"
1411 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1413 (native-inputs `(("pkg-config" ,pkg-config)))
1415 `(("fontconfig" ,fontconfig)
1416 ("freetype" ,freetype)
1417 ("libaacs" ,libaacs)
1418 ("libbdplus" ,libbdplus)
1419 ("libxml2" ,libxml2)))
1420 (home-page "https://www.videolan.org/developers/libbluray.html")
1421 (synopsis "Blu-Ray Disc playback library")
1423 "libbluray is a library designed for Blu-Ray Disc playback for media
1424 players, like VLC or MPlayer.")
1425 (license license:lgpl2.1+)))
1427 (define-public libdvdread
1433 (uri (string-append "https://download.videolan.org/videolan/"
1434 name "/" version "/"
1435 name "-" version ".tar.bz2"))
1438 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1439 (build-system gnu-build-system)
1441 `(#:configure-flags '("--with-libdvdcss=yes")))
1443 `(("pkg-config" ,pkg-config)))
1445 `(("libdvdcss" ,libdvdcss)))
1446 (home-page "http://dvdnav.mplayerhq.hu/")
1447 (synopsis "Library for reading video DVDs")
1449 "Libdvdread provides a simple foundation for reading DVD video
1450 disks. It provides the functionality that is required to access many
1451 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1452 authentication and descrambling (if an external libdvdcss library is
1454 (license license:gpl2+)))
1456 (define-public dvdauthor
1463 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1467 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1468 (build-system gnu-build-system)
1470 `(("libdvdread" ,libdvdread)
1472 ("imagemagick" ,imagemagick)
1473 ("libxml2" ,libxml2)
1474 ("freetype" ,freetype)))
1476 `(("pkg-config" ,pkg-config)))
1477 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1478 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1479 MPEG-2 stream containing VOB packets.")
1480 (home-page "http://dvdauthor.sourceforge.net")
1481 (license license:gpl3+)))
1483 (define-public libdvdnav
1489 (uri (string-append "https://download.videolan.org/videolan/"
1490 name "/" version "/"
1491 name "-" version ".tar.bz2"))
1494 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1495 (build-system gnu-build-system)
1497 `(("pkg-config" ,pkg-config)))
1499 `(("libdvdread" ,libdvdread)))
1500 (home-page "http://dvdnav.mplayerhq.hu/")
1501 (synopsis "Library for video DVD navigation features")
1503 "Libdvdnav is a library for developers of multimedia
1504 applications. It allows easy use of sophisticated DVD navigation features
1505 such as DVD menus, multiangle playback and even interactive DVD games. All
1506 this functionality is provided through a simple API which provides the DVD
1507 playback as a single logical stream of blocks, intermitted by special
1508 dvdnav events to report certain conditions. The main usage of libdvdnav is
1509 a loop regularly calling a function to get the next block, surrounded by
1510 additional calls to tell the library of user interaction. The whole
1511 DVD virtual machine and internal playback states are completely
1513 (license license:gpl2+)))
1515 (define-public libdvdcss
1521 (uri (string-append "https://download.videolan.org/pub/"
1522 name "/" version "/"
1523 name "-" version ".tar.bz2"))
1526 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1527 (build-system gnu-build-system)
1528 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1529 (synopsis "Library for accessing DVDs as block devices")
1531 "libdvdcss is a simple library designed for accessing DVDs like a block
1532 device without having to bother about the decryption.")
1533 (license license:gpl2+)))
1535 (define-public srt2vtt
1542 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1546 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1547 (build-system gnu-build-system)
1549 `(("guile" ,guile-2.0)))
1550 (synopsis "SubRip to WebVTT subtitle converter")
1551 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1552 for use with HTML5 video.")
1553 (home-page "http://dthompson.us/pages/software/srt2vtt")
1554 (license license:gpl3+)))
1556 (define-public avidemux
1563 "mirror://sourceforge/" name "/" name "/" version "/"
1564 name "_" version ".tar.gz"))
1567 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1568 (patches (search-patches "avidemux-install-to-lib.patch"))))
1569 (build-system cmake-build-system)
1571 `(("pkg-config" ,pkg-config)))
1572 ;; FIXME: Once packaged, add libraries not found during the build.
1574 `(("alsa-lib" ,alsa-lib)
1575 ("fontconfig" ,fontconfig)
1576 ("freetype" ,freetype)
1577 ("fribidi" ,fribidi)
1582 ("libvdpau" ,libvdpau)
1583 ("libvorbis" ,libvorbis)
1587 ("pulseaudio" ,pulseaudio)
1588 ("python" ,python-wrapper)
1589 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1590 ;("qtbase" ,qtbase) with -std=gnu++11.
1591 ;("qttools" ,qttools)
1597 `(#:tests? #f ; no check target
1599 ;; Make sure files inside the included ffmpeg tarball are
1601 (modify-phases %standard-phases
1602 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1604 (with-directory-excursion "avidemux_core/ffmpeg_package"
1605 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1606 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1607 (add-after 'patch-source-shebangs 'repack-ffmpeg
1609 (with-directory-excursion "avidemux_core/ffmpeg_package"
1610 (substitute* "ffmpeg-2.7.6/configure"
1611 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1612 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1613 ;; avoid non-determinism in the archive
1614 "--sort=name" "--mtime=@0"
1615 "--owner=root:0" "--group=root:0")
1616 (delete-file-recursively "ffmpeg-2.7.6"))))
1619 ;; Copy-paste settings from the cmake build system.
1620 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1621 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1623 (lambda* (#:key inputs outputs #:allow-other-keys)
1625 ((out (assoc-ref outputs "out"))
1626 (lib (string-append out "/lib"))
1628 (sdl (assoc-ref inputs "sdl"))
1630 (lambda* (component srcdir #:optional (args '()))
1631 (let ((builddir (string-append "build_" component)))
1633 (with-directory-excursion builddir
1636 (apply system* "cmake"
1637 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1638 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1639 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1640 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1641 "\"-Wl,-rpath=" lib "\"")
1642 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1643 (string-append "-DSDL_INCLUDE_DIR="
1645 (string-append "../" srcdir)
1648 (system* "make" "-j"
1649 (number->string (parallel-job-count)))
1650 (system* "make" "install"))))))))
1652 (and (build_component "core" "avidemux_core")
1653 (build_component "cli" "avidemux/cli")
1654 (build_component "qt4" "avidemux/qt4")
1655 (build_component "plugins_common" "avidemux_plugins"
1656 '("-DPLUGIN_UI=COMMON"))
1657 (build_component "plugins_cli" "avidemux_plugins"
1658 '("-DPLUGIN_UI=CLI"))
1659 (build_component "plugins_qt4" "avidemux_plugins"
1660 '("-DPLUGIN_UI=QT4"))
1661 (build_component "plugins_settings" "avidemux_plugins"
1662 '("-DPLUGIN_UI=SETTINGS")))
1663 ;; Remove .exe and .dll file.
1664 (delete-file-recursively
1665 (string-append out "/share/ADM6_addons")))))
1666 (delete 'install))))
1667 (home-page "http://fixounet.free.fr/avidemux/")
1668 (synopsis "Video editor")
1669 (description "Avidemux is a video editor designed for simple cutting,
1670 filtering and encoding tasks. It supports many file types, including AVI,
1671 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1672 can be automated using projects, job queue and powerful scripting
1674 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1675 ;; Software with various licenses is included, see License.txt.
1676 (license license:gpl2+)))
1678 (define-public vapoursynth
1680 (name "vapoursynth")
1685 "https://github.com/vapoursynth/vapoursynth/archive/R"
1687 (file-name (string-append name "-" version ".tar.gz"))
1690 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1691 (build-system gnu-build-system)
1693 `(("autoconf" ,autoconf)
1694 ("automake" ,automake)
1695 ("cython" ,python-cython)
1696 ("libtool" ,libtool)
1697 ("pkg-config" ,pkg-config)
1701 `(("ffmpeg" ,ffmpeg)
1703 ("tesseract-ocr" ,tesseract-ocr)
1707 (modify-phases %standard-phases
1711 (zero? (system* "sh" "autogen.sh")))))))
1712 (home-page "http://www.vapoursynth.com/")
1713 (synopsis "Video processing framework")
1714 (description "VapourSynth is a C++ library and Python module for video
1715 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1716 multithreading, generalized colorspaces, per frame properties, and videos with
1718 ;; src/core/cpufeatures only allows x86, ARM or PPC
1719 (supported-systems (fold delete %supported-systems
1720 '("mips64el-linux" "aarch64-linux")))
1721 ;; As seen from the source files.
1722 (license license:lgpl2.1+)))
1731 "http://downloads.xvid.org/downloads/xvidcore-"
1732 version ".tar.bz2"))
1735 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1736 (build-system gnu-build-system)
1737 (native-inputs `(("yasm" ,yasm)))
1740 (modify-phases %standard-phases
1742 'configure 'pre-configure
1744 (chdir "build/generic")
1745 (substitute* "configure"
1746 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1747 ;; No 'check' target.
1749 (home-page "https://www.xvid.com/")
1750 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1751 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1752 codec library. It uses ASP features such as b-frames, global and quarter
1753 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1754 and custom quantization matrices.")
1755 (license license:gpl2+)))
1757 (define-public streamlink
1764 (uri (pypi-uri "streamlink" version))
1767 "02h8b3k8l5zz4vjm0nhxvl1pm924jms8y7sjl40fbybrzvsa4mg2"))))
1768 (build-system python-build-system)
1769 (home-page "https://github.com/streamlink/streamlink")
1771 `(("python-pytest" ,python-pytest)
1772 ("python-mock" ,python-mock)
1773 ("python-requests-mock" ,python-requests-mock)))
1775 `(("python-pysocks" ,python-pysocks)
1776 ("python-websocket-client" ,python-websocket-client)
1777 ("python-iso3166" ,python-iso3166)
1778 ("python-iso639" ,python-iso639)
1779 ("python-pycryptodome" ,python-pycryptodome)
1780 ("python-requests" ,python-requests)
1781 ("python-urllib3" ,python-urllib3)))
1782 (synopsis "Extract streams from various services")
1783 (description "Streamlink is command-line utility that extracts streams
1784 from sites like Twitch.tv and pipes them into a video player of choice.")
1785 (license license:bsd-2)))
1787 (define-public livestreamer
1788 (deprecated-package "livestreamer" streamlink))
1790 (define-public twitchy
1791 (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
1794 (version (git-version "3.2" "1" commit))
1799 (url "https://github.com/BasioMeusPuga/twitchy.git")
1801 (file-name (git-file-name name version))
1804 "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
1805 (build-system python-build-system)
1808 (modify-phases %standard-phases
1809 (add-before 'check 'check-setup
1811 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
1814 `(("python-requests" ,python-requests)
1815 ("streamlink" ,streamlink)))
1816 (home-page "https://github.com/BasioMeusPuga/twitchy")
1817 (synopsis "Command-line interface for Twitch.tv")
1819 "This package provides a command-line interface for Twitch.tv")
1820 (license license:gpl3+))))
1828 (uri (string-append "https://github.com/mltframework/mlt/"
1829 "archive/v" version ".tar.gz"))
1830 (file-name (string-append name "-" version ".tar.gz"))
1833 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
1834 (modules '((guix build utils)))
1836 ;; As of glibc 2.26, <xlocale.h> no longer is.
1837 (substitute* "src/framework/mlt_property.h"
1838 (("xlocale\\.h") "locale.h"))
1840 (build-system gnu-build-system)
1842 `(#:tests? #f ; no tests
1843 #:make-flags '("CC=gcc")
1845 (list "--enable-gpl3"
1848 (modify-phases %standard-phases
1850 'configure 'override-LDFLAGS
1851 (lambda* (#:key outputs #:allow-other-keys)
1852 (substitute* "config.mak"
1854 (string-append "LDFLAGS+=-Wl,-rpath="
1855 (assoc-ref outputs "out")
1859 `(("alsa-lib" ,alsa-lib)
1862 ("libxml2" ,libxml2)
1865 ("libsamplerate" ,libsamplerate)
1866 ("pulseaudio" ,pulseaudio)
1870 `(("pkg-config" ,pkg-config)))
1871 (home-page "https://www.mltframework.org/")
1872 (synopsis "Author, manage, and run multitrack audio/video compositions")
1874 "MLT is a multimedia framework, designed and developed for television
1875 broadcasting. It provides a toolkit for broadcasters, video editors, media
1876 players, transcoders, web streamers and many more types of applications. The
1877 functionality of the system is provided via an assortment of ready to use
1878 tools, XML authoring components, and an extensible plug-in based API.")
1879 (license license:gpl3)))
1881 (define-public v4l-utils
1887 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1888 "/v4l-utils-" version ".tar.bz2"))
1891 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1892 (build-system gnu-build-system)
1895 (list (string-append "--with-udevdir="
1896 (assoc-ref %outputs "out")
1898 "CXXFLAGS=-std=gnu++11")))
1901 ("pkg-config" ,pkg-config)))
1903 `(("alsa-lib" ,alsa-lib)
1905 ("libjpeg" ,libjpeg)
1909 (synopsis "Realtime video capture utilities for Linux")
1910 (description "The v4l-utils provide a series of libraries and utilities to
1911 be used for realtime video capture via Linux-specific APIs.")
1912 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1913 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1914 (license (list license:lgpl2.1+ license:gpl2))))
1922 (uri (string-append "https://github.com/jp9000/obs-studio"
1923 "/archive/" version ".tar.gz"))
1924 (file-name (string-append name "-" version ".tar.gz"))
1927 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1928 (build-system cmake-build-system)
1930 `(#:tests? #f)) ; no tests
1932 `(("pkg-config" ,pkg-config)))
1934 `(("alsa-lib" ,alsa-lib)
1938 ("fontconfig" ,fontconfig)
1939 ("freetype" ,freetype)
1941 ("jansson" ,jansson)
1942 ("libx264" ,libx264)
1943 ("libxcomposite" ,libxcomposite)
1945 ("pulseaudio" ,pulseaudio)
1947 ("qtx11extras" ,qtx11extras)
1949 ("v4l-utils" ,v4l-utils)
1951 (synopsis "Live streaming software")
1952 (description "Open Broadcaster Software provides a graphical interface for
1953 video recording and live streaming. OBS supports capturing audio and video
1954 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1956 (home-page "https://obsproject.com")
1957 (supported-systems '("x86_64-linux" "i686-linux"))
1958 (license license:gpl2+)))
1960 (define-public libvdpau
1967 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1968 name "-" version ".tar.bz2"))
1971 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1972 (build-system gnu-build-system)
1974 `(("pkg-config" ,pkg-config)))
1976 `(("libx11" ,libx11 "out")
1977 ("libxext" ,libxext)
1978 ("xorgproto" ,xorgproto)))
1979 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1980 (synopsis "Video Decode and Presentation API")
1981 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1982 provides an interface to video decode acceleration and presentation hardware
1983 present in modern GPUs.")
1984 (license (license:x11-style "file://COPYING"))))
1986 (define-public vdpauinfo
1993 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1994 name "-" version ".tar.gz"))
1997 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1998 (build-system gnu-build-system)
2000 `(("pkg-config" ,pkg-config)
2001 ("libx11" ,libx11)))
2003 `(("libvdpau" ,libvdpau)))
2004 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2005 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2006 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2008 (license (license:x11-style "file://COPYING"))))
2010 (define-public libvdpau-va-gl
2012 (name "libvdpau-va-gl")
2017 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2018 "releases/download/v" version "/libvdpau-va-gl-"
2022 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2023 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2024 (modules '((guix build utils)))
2025 (snippet '(begin (delete-file-recursively "3rdparty")
2027 (build-system cmake-build-system)
2029 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2031 `(("libvdpau" ,libvdpau)
2032 ("pkg-config" ,pkg-config)))
2036 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2037 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2039 "Many applications can use VDPAU to accelerate portions of the video
2040 decoding process and video post-processing to the GPU video hardware. Since
2041 there is no VDPAU available on Intel chips, they fall back to different drawing
2042 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2043 scaling and VA-API (if available) to accelerate video decoding.")
2044 (license license:expat)))
2046 (define-public recordmydesktop
2048 (name "recordmydesktop")
2052 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2053 version "/recordmydesktop-" version ".tar.gz"))
2056 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2057 (build-system gnu-build-system)
2058 (inputs `(("popt" ,popt)
2063 ("libxfixes" ,libxfixes)
2064 ("libxdamage" ,libxdamage)
2065 ("libxext" ,libxext)
2066 ("alsa-lib" ,alsa-lib)
2067 ("libvorbis" ,libvorbis)
2068 ("libtheora" ,libtheora)))
2069 (home-page "http://recordmydesktop.sourceforge.net/")
2070 (synopsis "Desktop session video recorder")
2072 "recordMyDesktop is a command-line tool that captures the activity in
2073 your graphical desktop and encodes it as a video. This is a useful tool for
2074 making @dfn{screencasts}.")
2075 (license license:gpl2+)))
2077 (define-public simplescreenrecorder
2079 (name "simplescreenrecorder")
2084 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2086 (file-name (string-append name "-" version ".tar.gz"))
2089 "02rl9yyx3hlz9fqvgzv7ipmvx2qahj7ws5wx2m7zs3lssq3qag3g"))))
2090 (build-system cmake-build-system)
2091 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2092 ;; README.md, the program builds and functions properly without them.
2093 ;; As a result, they are omitted. Please add them back if problems appear.
2095 `(("alsa-lib" ,alsa-lib)
2100 ("pulseaudio" ,pulseaudio)
2102 (native-inputs `(("pkg-config" ,pkg-config)))
2105 (list "-DWITH_QT5=TRUE")
2106 #:tests? #f)) ; no test suite
2107 ;; Using HTTPS causes part of the page to be displayed improperly.
2108 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2109 (synopsis "Screen recorder")
2110 (description "SimpleScreenRecorder is an easy to use screen recorder with
2111 a graphical user interface. It supports recording the entire screen, or a
2112 part of it, and allows encoding in many different codecs and file formats.
2113 Other features include a live preview and live streaming.")
2114 (license (list license:gpl3+ ; most files
2115 license:zlib ; glinject/elfhacks.*
2116 license:isc ; glinject/*
2117 license:x11)))) ; build-aux/install-sh
2119 (define-public libsmpeg
2126 (url "svn://svn.icculus.org/smpeg/trunk/")
2127 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2128 (file-name (string-append name "-" version "-checkout"))
2131 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2132 (build-system gnu-build-system)
2134 `(#:phases (modify-phases %standard-phases
2135 (add-after 'unpack 'autogen.sh
2137 (zero? (system* "sh" "autogen.sh")))))))
2139 `(("autoconf" ,autoconf)
2140 ("automake" ,automake)))
2143 (home-page "http://icculus.org/smpeg/")
2144 (synopsis "SDL MPEG decoding library")
2146 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2147 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2148 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2149 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2150 and MPEG system streams.")
2151 (license (list license:expat
2156 (define-public libbdplus
2163 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2164 version "/" name "-" version ".tar.bz2"))
2166 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2168 `(("libgcrypt" ,libgcrypt)))
2169 (build-system gnu-build-system)
2170 (home-page "https://www.videolan.org/developers/libbdplus.html")
2171 (synopsis "Library for decrypting certain Blu-Ray discs")
2172 (description "libbdplus is a library which implements the BD+ System
2174 (license license:lgpl2.1+)))
2176 (define-public libaacs
2183 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2184 version "/" name "-" version ".tar.bz2"))
2186 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2188 `(("libgcrypt" ,libgcrypt)))
2192 (build-system gnu-build-system)
2193 (home-page "https://www.videolan.org/developers/libaacs.html")
2194 (synopsis "Library for decrypting certain Blu-Ray discs")
2195 (description "libaacs is a library which implements the Advanced Access
2196 Content System specification.")
2197 (license license:lgpl2.1+)))
2199 (define-public mps-youtube
2201 (name "mps-youtube")
2206 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2207 "archive/v" version ".tar.gz"))
2208 (file-name (string-append name "-" version ".tar.gz"))
2211 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2212 (build-system python-build-system)
2214 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2215 ;; test suite results differ depending on the country and also introduce
2216 ;; non-determinism in the tests.
2217 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2220 `(("python-pafy" ,python-pafy)
2221 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2222 (home-page "https://github.com/mps-youtube/mps-youtube")
2223 (synopsis "Terminal based YouTube player and downloader")
2225 "@code{mps-youtube} is based on mps, a terminal based program to
2226 search, stream and download music. This implementation uses YouTube as
2227 a source of content and can play and download video as well as audio.
2228 It can use either mpv or mplayer for playback, and for conversion of
2229 formats ffmpeg or libav is used. Users should install one of the
2230 supported players in addition to this package.")
2231 (license license:gpl3+)))
2233 (define-public handbrake
2239 (uri (string-append "https://handbrake.fr/rotation.php?file="
2240 "HandBrake-" version ".tar.bz2"))
2241 (file-name (string-append "handbrake-" version ".tar.bz2"))
2244 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2245 (patches (search-patches "handbrake-pkg-config-path.patch"))
2246 (modules '((guix build utils)))
2248 ;; Remove bundled libraries and source not necessary for
2249 ;; running under a GNU environment.
2251 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2253 (build-system glib-or-gtk-build-system)
2255 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2256 ("autoconf" ,autoconf)
2257 ("curl" ,curl) ;not actually used, but tested for
2258 ("intltool" ,intltool)
2259 ("libtool" ,libtool)
2260 ("pkg-config" ,pkg-config)
2261 ("python" ,python-2))) ;for configuration
2264 ("dbus-glib" ,dbus-glib)
2266 ("fontconfig" ,fontconfig)
2267 ("freetype" ,freetype)
2269 ("gstreamer" ,gstreamer)
2270 ("gst-plugins-base" ,gst-plugins-base)
2274 ("libbluray" ,libbluray)
2275 ("libdvdnav" ,libdvdnav)
2276 ("libdvdread" ,libdvdread)
2277 ("libgudev" ,libgudev)
2278 ("libmpeg2" ,libmpeg2)
2279 ("libnotify" ,libnotify)
2281 ("libsamplerate" ,libsamplerate)
2282 ("libtheora" ,libtheora)
2283 ("libvorbis" ,libvorbis)
2285 ("libxml2" ,libxml2)
2286 ("libx264" ,libx264)
2290 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2292 (modify-phases %standard-phases
2294 ;; Run bootstrap ahead of time so that shebangs get patched.
2296 (setenv "CONFIG_SHELL" (which "sh"))
2297 (setenv "NOCONFIGURE" "1")
2298 ;; Patch the Makefile so that it doesn't bootstrap again.
2299 (substitute* "gtk/module.rules"
2300 ((".*autogen\\.sh.*") ""))
2301 (zero? (system* "sh" "./gtk/autogen.sh"))))
2302 (add-before 'configure 'disable-contrib
2304 (substitute* "make/include/main.defs"
2305 ;; Disable unconditional inclusion of some "contrib"
2306 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2307 ;; and libbluray), which would lead to fetching and
2308 ;; building of these libraries. Use our own instead.
2309 (("MODULES \\+= contrib") "# MODULES += contrib"))
2311 (add-before 'configure 'fix-x265-linking
2313 (substitute* "test/module.defs"
2314 ;; Fix missing library during linking error
2315 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2318 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2319 ;; 'configure' is not an autoconf-generated script, and
2320 ;; errors on unrecognized arguments,
2321 ;; e.g. --enable-fast-install
2322 (let ((out (assoc-ref outputs "out")))
2323 (zero? (apply system* "./configure"
2324 (string-append "--prefix=" out)
2325 (or configure-flags '()))))))
2326 (add-after 'configure 'chdir-build
2327 (lambda _ (chdir "./build") #t)))))
2328 (home-page "https://handbrake.fr")
2329 (synopsis "Video transcoder")
2331 "HandBrake is a tool for converting video from any format to a selection
2332 of modern, widely supported codecs.")
2333 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2334 (license (list license:gpl2+ license:bsd-3))))
2336 (define-public openh264
2342 (uri (string-append "https://github.com/cisco/"
2343 name "/archive/v" version ".tar.gz"))
2344 (file-name (string-append name "-" version ".tar.gz"))
2347 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2348 (build-system gnu-build-system)
2351 ("python" ,python)))
2353 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2355 #:test-target "test"
2356 #:phases (modify-phases %standard-phases
2357 ;; no configure script
2358 (delete 'configure))))
2359 (home-page "http://www.openh264.org/")
2360 (synopsis "H264 decoder library")
2362 "Openh264 is a library which can decode H264 video streams.")
2363 (license license:bsd-2)))
2365 (define-public libmp4v2
2372 ;; XXX: The new location of upstream is uncertain and will become relevant the
2373 ;; moment when the googlecode archive shuts down. It is past the date it
2374 ;; should've been turned off. I tried to communicate with upstream, but this
2375 ;; wasn't very responsive and not very helpful. The short summary is, it is
2376 ;; chaos when it comes to the amount of forks and only time will tell where
2377 ;; the new upstream location is.
2378 (uri (string-append "https://storage.googleapis.com/google-"
2379 "code-archive-downloads/v2/"
2380 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2381 (file-name (string-append name "-" version ".tar.bz2"))
2384 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2385 (build-system gnu-build-system)
2387 "static")) ; 3.7MiB .a file
2390 (modify-phases %standard-phases
2391 (add-after 'unpack 'remove-dates
2393 ;; Make the build reproducible.
2394 (substitute* "configure"
2395 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2396 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2398 (add-after 'install 'move-static-libraries
2399 (lambda* (#:key outputs #:allow-other-keys)
2400 ;; Move static libraries to the "static" output.
2401 (let* ((out (assoc-ref outputs "out"))
2402 (lib (string-append out "/lib"))
2403 (static (assoc-ref outputs "static"))
2404 (slib (string-append static "/lib")))
2406 (for-each (lambda (file)
2407 (install-file file slib)
2409 (find-files lib "\\.a$"))
2412 `(("help2man" ,help2man)
2413 ("dejagnu" ,dejagnu)))
2414 (home-page "https://code.google.com/archive/p/mp4v2/")
2415 (synopsis "API to create and modify mp4 files")
2417 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2418 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2419 file format that has been used as a multimedia file format in a variety of platforms and
2420 applications. It is a very powerful and extensible format that can accommodate
2421 practically any type of media.")
2422 (license license:mpl1.1)))
2424 (define-public libmediainfo
2426 (name "libmediainfo")
2430 (uri (string-append "https://mediaarea.net/download/source/"
2432 name "_" version ".tar.bz2"))
2435 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2436 ;; TODO add a Big Buck Bunny webm for tests.
2438 `(("autoconf" ,autoconf)
2439 ("automake" ,automake)
2440 ("libtool" ,libtool)
2441 ("pkg-config" ,pkg-config)
2443 ("tinyxml2" ,tinyxml2)
2445 ("libzen" ,libzen)))
2446 (build-system gnu-build-system)
2448 '(#:tests? #f ; see above TODO
2450 ;; build scripts not in root of archive
2451 (modify-phases %standard-phases
2452 (add-after 'unpack 'change-to-build-dir
2454 (chdir "Project/GNU/Library")
2456 (add-after 'change-to-build-dir 'autogen
2458 (zero? (system* "sh" "autogen.sh")))))))
2459 (home-page "https://mediaarea.net/en/MediaInfo")
2460 (synopsis "Library for retrieving media metadata")
2461 (description "MediaInfo is a library used for retrieving technical
2462 information and other metadata about audio or video files. A non-exhaustive
2463 list of the information MediaInfo can retrieve from media files include:
2466 @item General: title, author, director, album, track number, date, duration...
2467 @item Video: codec, aspect, fps, bitrate...
2468 @item Audio: codec, sample rate, channels, language, bitrate...
2469 @item Text: language of subtitle
2470 @item Chapters: number of chapters, list of chapters
2473 MediaInfo supports the following formats:
2476 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2477 MPEG-2, MPEG-4, DVD (VOB)...
2478 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2479 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2480 @item Subtitles: SRT, SSA, ASS, SAMI...
2482 (license license:bsd-2)))
2484 ;; TODO also have a GUI version available
2485 (define-public mediainfo
2491 (uri (string-append "https://mediaarea.net/download/source/"
2492 name "/" version "/"
2493 name "_" version ".tar.bz2"))
2496 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2498 `(("autoconf" ,autoconf)
2499 ("automake" ,automake)
2500 ("libtool" ,libtool)
2501 ("pkg-config" ,pkg-config)
2503 ("libmediainfo" ,libmediainfo)
2504 ("libzen" ,libzen)))
2505 (build-system gnu-build-system)
2507 '(#:tests? #f ; lacks tests
2509 ;; build scripts not in root of archive
2510 (modify-phases %standard-phases
2511 (add-after 'unpack 'change-to-build-dir
2513 (chdir "Project/GNU/CLI")
2515 (add-after 'change-to-build-dir 'autogen
2517 (zero? (system* "sh" "autogen.sh")))))))
2518 (home-page "https://mediaarea.net/en/MediaInfo")
2519 (synopsis "Utility for reading media metadata")
2520 (description "MediaInfo is a utility used for retrieving technical
2521 information and other metadata about audio or video files. It supports the
2522 many codecs and formats supported by libmediainfo.")
2523 (license license:bsd-2)))
2525 (define-public livemedia-utils
2527 (name "livemedia-utils")
2528 (version "2017.10.28")
2532 "https://download.videolan.org/contrib/live555/live."
2536 "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
2537 (modules '((guix build utils)))
2539 ;; As of glibc 2.26, <xlocale.h> no longer is.
2540 (substitute* "liveMedia/include/Locale.hh"
2541 (("xlocale\\.h") "locale.h"))
2543 (build-system gnu-build-system)
2545 '(#:tests? #f ; no tests
2546 #:make-flags (list "CC=gcc"
2547 (string-append "LDFLAGS=-Wl,-rpath="
2548 (assoc-ref %outputs "out") "/lib")
2549 (string-append "PREFIX="
2550 (assoc-ref %outputs "out")))
2551 #:phases (modify-phases %standard-phases
2552 (add-before 'configure 'fix-makefiles-generation
2554 (substitute* "genMakefiles"
2559 (zero? (system* "./genMakefiles"
2560 "linux-with-shared-libraries")))))))
2561 (home-page "http://www.live555.com/liveMedia/")
2562 (synopsis "Set of C++ libraries for multimedia streaming")
2563 (description "This code forms a set of C++ libraries for multimedia
2564 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2565 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2566 JPEG video, and several audio codecs. They can easily be extended to support
2567 additional (audio and/or video) codecs, and can also be used to build basic
2568 RTSP or SIP clients and servers.")
2569 (license license:lgpl3+)))
2571 (define-public libdvbpsi
2578 "https://download.videolan.org/pub/libdvbpsi/"
2579 version "/libdvbpsi-" version ".tar.bz2"))
2582 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2583 (build-system gnu-build-system)
2584 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2585 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2587 (description "libdvbpsi is a simple library designed for decoding and
2588 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2589 and ITU-T H.222.0.")
2590 (license license:lgpl2.1)))
2592 (define-public ffms2
2596 (home-page "https://github.com/FFMS/ffms2")
2599 (uri (string-append home-page "/archive/" version ".tar.gz"))
2600 (file-name (string-append name "-" version ".tar.gz"))
2603 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2604 (build-system gnu-build-system)
2607 (list "--enable-avresample")))
2611 `(("ffmpeg" ,ffmpeg)))
2613 `(("pkg-config" ,pkg-config)))
2614 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2616 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2617 programmers to access a standard API to open and decompress media files.")
2618 ;; sources are distributed under a different license that the binary.
2619 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2620 (license license:gpl2+))); inherits from ffmpeg
2622 (define-public aegisub
2629 "http://ftp.aegisub.org/pub/archives/releases/source/"
2630 name "-" version ".tar.xz"))
2633 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2634 (build-system gnu-build-system)
2637 (list "--disable-update-checker"
2638 "--without-portaudio"
2641 ;; tests require busted, a lua package we don't have yet
2644 (modify-phases %standard-phases
2645 (add-before 'configure 'fix-ldflags
2647 (setenv "LDFLAGS" "-pthread"))))))
2650 ("desktop-file-utils" ,desktop-file-utils)
2653 ("hunspell" ,hunspell)
2656 ("alsa-lib" ,alsa-lib)
2657 ("pulseaudio" ,pulseaudio)
2659 ("freetype" ,freetype)
2660 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2662 `(("intltool" ,intltool)
2663 ("pkg-config" ,pkg-config)))
2664 (home-page "http://www.aegisub.org/")
2665 (synopsis "Subtitle engine")
2667 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2668 it quick and easy to time subtitles to audio, and features many powerful
2669 tools for styling them, including a built-in real-time video preview.")
2670 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2671 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2672 license:expat)))) ; and src/gl that is under a license similar
2673 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2674 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2675 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2677 (define-public gst-transcoder
2679 (name "gst-transcoder")
2684 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2685 "archive/" version ".tar.gz"))
2686 (file-name (string-append name "-" version ".tar.gz"))
2689 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2690 (build-system meson-build-system)
2692 `(("gobject-introspection" ,gobject-introspection)
2694 ("gstreamer" ,gstreamer)
2695 ("gst-plugins-base" ,gst-plugins-base)))
2697 `(("python" ,python)
2698 ("pkg-config" ,pkg-config)))
2699 (home-page "https://github.com/pitivi/gst-transcoder/")
2700 (synopsis "GStreamer Transcoding API")
2701 (description "GStreamer Transcoding API")
2702 (license license:lgpl2.1)))
2711 (uri (string-append "mirror://sourceforge/gmerlin/"
2712 name "/" version "/"
2713 name "-" version ".tar.gz"))
2714 (file-name (string-append name "-" version ".tar.gz"))
2717 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2718 (build-system gnu-build-system)
2720 '(#:configure-flags '("LIBS=-lm")))
2722 `(("pkg-config" ,pkg-config)
2723 ("doxygen" ,doxygen)))
2724 (home-page "http://gmerlin.sourceforge.net")
2725 (synopsis "Low level library for multimedia API building")
2727 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2728 library, upon which multimedia APIs can be built. Gavl handles all the
2729 details of audio and video formats like colorspaces, sample rates,
2730 multichannel configurations, etc. It provides standardized definitions for
2731 those formats as well as container structures for carrying audio samples or
2732 video images inside an application.
2734 In addition, it handles the sometimes ugly task of converting between all
2735 these formats and provides some elementary operations (copying, scaling,
2736 alpha blending etc).")
2737 (license license:gpl3)))
2739 (define-public frei0r-plugins
2741 (name "frei0r-plugins")
2746 (uri (string-append "https://files.dyne.org/frei0r/"
2747 "frei0r-plugins-" version ".tar.gz"))
2750 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2751 (build-system gnu-build-system)
2754 (modify-phases %standard-phases
2755 (add-after 'unpack 'autotools
2757 (zero? (system* "sh" "autogen.sh")))))))
2758 ;; TODO: opencv for additional face detection filters
2763 `(("pkg-config" ,pkg-config)
2764 ("libtool" ,libtool)
2765 ("automake" ,automake)
2766 ("autoconf" ,autoconf)))
2767 (home-page "https://www.dyne.org/software/frei0r/")
2768 (synopsis "Minimalistic plugin API for video effects")
2770 "Frei0r is a minimalistic plugin API for video effects.
2771 The main emphasis is on simplicity for an API that will round up
2772 the most common video effects into simple filters, sources and
2773 mixers that can be controlled by parameters. Frei0r wants to
2774 provide a way to share these simple effects between many
2775 applications, avoiding their reimplementation by different projects.
2776 It counts more than 100 plugins.")
2777 (license (list license:gpl2+
2778 ;; The following files are licensed as LGPL2.1+:
2779 ;; src/generator/ising0r/ising0r.c
2780 ;; src/generator/onecol0r/onecol0r.cpp
2781 ;; src/generator/nois0r/nois0r.cpp
2782 ;; src/generator/lissajous0r/lissajous0r.cpp
2783 ;; src/filter/ndvi/gradientlut.hpp
2784 ;; src/filter/ndvi/ndvi.cpp
2785 ;; src/filter/facedetect/facedetect.cpp
2786 license:lgpl2.1+))))
2788 (define-public motion
2792 (home-page "https://motion-project.github.io/")
2796 "https://github.com/Motion-Project/motion/archive/"
2797 "release-" version ".tar.gz"))
2800 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2801 (file-name (string-append name "-" version ".tar.gz"))))
2802 (build-system gnu-build-system)
2804 `(("autoconf" ,autoconf-wrapper)
2805 ("automake" ,automake)
2806 ("pkg-config" ,pkg-config)))
2808 `(("libjpeg" ,libjpeg)
2810 ("sqlite" ,sqlite)))
2812 '(#:phases (modify-phases %standard-phases
2815 (patch-shebang "version.sh")
2816 (invoke "autoreconf" "-vfi"))))
2817 #:configure-flags '("--sysconfdir=/etc")
2818 #:make-flags (list (string-append "sysconfdir="
2819 (assoc-ref %outputs "out")
2822 #:tests? #f)) ;no 'check' target
2823 (synopsis "Detect motion from video signals")
2825 "Motion is a program that monitors the video signal from one or more
2826 cameras and is able to detect if a significant part of the picture has
2827 changed. Or in other words, it can detect motion.")
2829 ;; Some files say "version 2" and others "version 2 or later".
2830 (license license:gpl2)))
2832 (define-public subdl
2833 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
2837 (version (git-version "1.0.3" revision commit))
2841 (url "https://github.com/alexanderwink/subdl.git")
2843 (file-name (git-file-name name version))
2846 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
2847 (build-system trivial-build-system)
2849 `(#:modules ((guix build utils))
2851 (use-modules (guix build utils))
2852 (let* ((out (assoc-ref %outputs "out"))
2853 (bin (string-append out "/bin"))
2854 (source (assoc-ref %build-inputs "source"))
2855 (python (assoc-ref %build-inputs "python")))
2856 (install-file (string-append source "/subdl") bin)
2857 (patch-shebang (string-append bin "/subdl")
2858 (list (string-append python "/bin")))))))
2859 (inputs `(("python" ,python)))
2860 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
2861 (description "Subdl is a command-line tool for downloading subtitles from
2862 opensubtitles.org. By default, it will search for English subtitles, display
2863 the results, download the highest-rated result in the requested language and
2864 save it to the appropriate filename.")
2865 (license license:gpl3+)
2866 (home-page "https://github.com/alexanderwink/subdl"))))