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 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 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 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 web)
120 #:use-module (gnu packages webkit)
121 #:use-module (gnu packages wxwidgets)
122 #:use-module (gnu packages xdisorg)
123 #:use-module (gnu packages xiph)
124 #:use-module (gnu packages xml)
125 #:use-module (gnu packages xorg)
126 #:use-module (gnu packages assembly))
134 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
135 version "/" name "-" version ".tar.gz"))
138 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
139 (build-system gnu-build-system)
141 `(("makeinfo" ,texinfo)))
143 `(("ncurses" ,ncurses)))
146 (modify-phases %standard-phases
148 (lambda* (#:key build inputs outputs #:allow-other-keys)
149 ;; This old `configure' script doesn't support
150 ;; variables passed as arguments.
151 (let ((out (assoc-ref outputs "out"))
152 (ncurses (assoc-ref inputs "ncurses")))
153 (setenv "CONFIG_SHELL" (which "bash"))
154 (zero? (system* "./configure"
155 (string-append "--prefix=" out)
156 (string-append "--build=" build)
157 ;; The ancient config.guess is unable to
158 ;; guess the host triplet on mips64el.
159 ,@(if (string=? "mips64el-linux"
161 '("--host=mips64el-unknown-linux-gnu")
163 ;; The same is also true with aarch64.
164 ,@(if (string=? "aarch64-linux"
166 '("--host=aarch64-unknown-linux-gnu")
168 (string-append "--with-ncurses="
170 (home-page "http://aa-project.sourceforge.net/aalib/")
171 (synopsis "ASCII-art library")
173 "AA-lib is a low level gfx library which does not require graphics device.
174 In fact, there is no graphical output possible. AA-lib replaces those
175 old-fashioned output methods with powerful ascii-art renderer.")
176 (license license:lgpl2.0+)))
178 (define-public liba52
185 ;; A mirror://sourceforge URI doesn't work, presumably
186 ;; because the SourceForge project is misconfigured.
187 "http://liba52.sourceforge.net/files/a52dec-" version
191 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
192 (patches (search-patches "liba52-enable-pic.patch"
193 "liba52-set-soname.patch"
194 "liba52-use-mtune-not-mcpu.patch"
195 "liba52-link-with-libm.patch"))))
196 (build-system gnu-build-system)
197 ;; XXX We need to run ./bootstrap because of the build system fixes above.
199 `(("autoconf" ,autoconf)
200 ("automake" ,automake)
201 ("libtool" ,libtool)))
202 (arguments `(#:configure-flags '("--enable-shared")
204 (modify-phases %standard-phases
205 ;; XXX We need to run ./bootstrap because of the build
206 ;; system fixes above.
209 (lambda _ (zero? (system* "sh" "bootstrap")))))))
210 (home-page "http://liba52.sourceforge.net/")
211 (synopsis "ATSC A/52 stream decoder")
212 (description "liba52 is a library for decoding ATSC A/52 streams. The
213 A/52 standard is used in a variety of applications, including digital
214 television and DVD. It is also known as AC-3.")
215 (license license:gpl2+)))
217 (define-public libmpeg2
223 ;; A mirror://sourceforge URI doesn't work, presumably
224 ;; because the SourceForge project is misconfigured.
225 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
226 name "-" version ".tar.gz"))
229 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
237 (build-system gnu-build-system)
238 (home-page "http://libmpeg2.sourceforge.net/")
239 (synopsis "MPEG1 and MPEG2 video decoder library")
241 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
242 (license license:gpl2+)))
244 (define-public libx264
247 (version "20170316-2245")
250 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
251 "x264-snapshot-" version ".tar.bz2"))
254 "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
255 (build-system gnu-build-system)
257 `(("pkg-config" ,pkg-config)
259 ;; TODO: Add gpac input
261 `(#:tests? #f ;no check target
262 #:configure-flags '("--enable-shared"
263 ;; Don't build the command-line program. If we
264 ;; want it later, we should do so in a different
265 ;; package to avoid a circular dependency (the x264
266 ;; program depends on ffmpeg and ffmpeg depends on
270 ;; On MIPS, we must pass "--disable-asm" or else
271 ;; configure fails after printing: "You specified a
272 ;; pre-MSA CPU in your CFLAGS. If you really want
273 ;; to run on such a CPU, configure with
275 ,@(if (string-prefix? "mips"
276 (or (%current-target-system)
280 (home-page "https://www.videolan.org/developers/x264.html")
281 (synopsis "H.264 video coding library")
282 (description "libx264 is an advanced encoding library for creating
283 H.264 (MPEG-4 AVC) video streams.")
284 (license (list license:gpl2+ ;most files
285 license:isc ;common/x86/x86inc.asm
286 license:lgpl2.1+ ;extras/getopt.c
287 license:bsd-3 ;extras/inttypes.h
288 (license:non-copyleft ;extras/cl*.h
290 "See extras/cl.h in the distribution.")))))
292 (define-public mkvtoolnix
299 (uri (string-append "https://mkvtoolnix.download/sources/"
300 name "-" version ".tar.xz"))
303 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
304 (modules '((guix build utils)))
307 ;; Delete bundled libraries.
308 (for-each delete-file-recursively
314 (build-system gnu-build-system)
321 ("libmatroska" ,libmatroska)
323 ("libvorbis" ,libvorbis)
330 `(("docbook-xsl" ,docbook-xsl)
331 ("gettext" ,gettext-minimal)
332 ("googletest" ,googletest)
334 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
336 ("pkg-config" ,pkg-config)
341 (list (string-append "--with-boost="
342 (assoc-ref %build-inputs "boost"))
343 (string-append "--with-docbook-xsl-root="
344 (assoc-ref %build-inputs "docbook-xsl")
345 "/xml/xsl/docbook-xsl-"
346 ,(package-version docbook-xsl))
347 (string-append "--with-extra-includes="
348 (assoc-ref %build-inputs "nlohmann-json-cpp")
349 "/include/nlohmann"))
351 (modify-phases %standard-phases
352 (add-before 'configure 'add-googletest
355 (string-append (assoc-ref %build-inputs "googletest")
356 "/include/gtest") "lib/gtest")
360 (let ((-j (list "-j" (number->string (parallel-job-count)))))
361 (zero? (apply system* "rake" -j)))))
364 (zero? (system* "rake" "tests/unit"))))
367 (zero? (system* "rake" "install")))))))
368 (home-page "https://mkvtoolnix.download")
369 (synopsis "Tools to create, alter and inspect Matroska files")
371 "MKVToolNix provides tools for getting information about Matroska files
372 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
373 and creating Matroska files from other media files (@code{mkvmerge}).")
374 (license license:gpl2)))
383 (uri (string-append "https://download.videolan.org/videolan/x265/"
384 "x265_" version ".tar.gz"))
387 "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
388 (modules '((guix build utils)))
390 '(delete-file-recursively "source/compat/getopt"))))
391 (build-system cmake-build-system)
393 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
394 ;; Currently the source code doesn't check for aarch64
395 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
396 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
399 (modify-phases %standard-phases
400 (add-before 'configure 'prepare-build
402 (delete-file-recursively "build")
405 (home-page "http://x265.org/")
406 (synopsis "Library for encoding h.265/HEVC video streams")
407 (description "x265 is a H.265 / HEVC video encoder application library,
408 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
409 (license license:gpl2+)))
411 (define-public libass
418 "https://github.com/libass/libass/releases/download/"
419 version "/libass-" version ".tar.xz"))
422 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
423 (build-system gnu-build-system)
425 `(("pkg-config" ,pkg-config)
428 `(("freetype" ,freetype)
430 ("fontconfig" ,fontconfig)
431 ("harfbuzz" ,harfbuzz)
433 (home-page "https://github.com/libass/libass")
434 (synopsis "Subtitle rendering library for the ASS/SSA format")
435 (description "libass is a subtitle rendering library for the
436 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
437 (license license:isc)))
439 (define-public libcaca
442 (version "0.99.beta19")
445 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
449 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
450 (build-system gnu-build-system)
451 (native-inputs `(("pkg-config" ,pkg-config)))
453 `(("freeglut" ,freeglut)
460 (home-page "http://caca.zoy.org/wiki/libcaca")
461 (synopsis "Colour ASCII-art library")
462 (description "libcaca is a graphics library that outputs text instead of
463 pixels, so that it can work on older video cards or text terminals. It
464 supports Unicode, 2048 colors, dithering of color images, and advanced text
466 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
468 (define-public libdca
475 "https://download.videolan.org/pub/videolan/libdca/"
476 version "/libdca-" version ".tar.bz2"))
479 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
480 (build-system gnu-build-system)
481 (home-page "https://www.videolan.org/developers/libdca.html")
482 (synopsis "DTS Coherent Acoustics decoder")
483 (description "libdca is a library for decoding DTS Coherent Acoustics
485 (license license:gpl2+)))
494 "mirror://sourceforge/" name "/" name "/"
495 version "/" name "-" version ".tar.gz"))
498 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
499 (build-system gnu-build-system)
500 (native-inputs `(("pkg-config" ,pkg-config)))
501 (inputs `(("libxv" ,libxv)))
502 (home-page "http://libdv.sourceforge.net/")
503 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
504 (description "The Quasar DV codec (libdv) is a software codec for DV
505 video, the encoding format used by most digital camcorders, typically those
506 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
507 developed according to the official standards for DV video: IEC 61834 and
509 (license license:lgpl2.1+)))
511 (define-public libmatroska
518 (uri (string-append "https://dl.matroska.org/downloads/"
519 name "/" name "-" version ".tar.xz"))
522 "14n9sw974prr3yp4yjb7aadi6x2yz5a0hjw8fs3qigy5shh2piyq"))))
523 (build-system gnu-build-system)
525 `(("pkg-config" ,pkg-config)))
527 `(("libebml" ,libebml)))
528 (home-page "https://www.matroska.org")
529 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
531 "Matroska aims to become the standard of multimedia container formats.
532 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
533 of XML. EBML enables the Matroska Development Team to gain significant
534 advantages in terms of future format extensibility, without breaking file
535 support in old parsers.
536 libebml is a C++ library to read and write EBML files.")
537 (license license:lgpl2.1)))
547 ;; Newer releases are only available on GitHub.
548 (string-append "https://github.com/01org/libva/releases/download/"
549 version "/libva-" version ".tar.bz2")
550 ;; Keep the old URL around for compatibility.
551 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
552 "libva/libva-" version "/libva-" version ".tar.bz2")))
554 (base32 "16xbk0awl7wp0vy0nyjvxk11spbw25mp8kwd9bmhd6x9xffi5vjn"))))
555 (build-system gnu-build-system)
557 `(("pkg-config" ,pkg-config)))
562 ("libxfixes" ,libxfixes)
566 (modify-phases %standard-phases
568 'build 'fix-dlopen-paths
569 (lambda* (#:key outputs #:allow-other-keys)
570 (let ((out (assoc-ref outputs "out")))
571 (substitute* "va/drm/va_drm_auth_x11.c"
572 (("\"libva-x11\\.so\\.%d\"")
573 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
574 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
575 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
577 (list (string-append "--with-drivers-path="
578 (assoc-ref %build-inputs "mesa") "/lib/dri"))
579 ;; However, we can't write to mesa's store directory, so override the
580 ;; following make variable to install the dummy driver to libva's
581 ;; $prefix/lib/dri directory.
583 (list (string-append "dummy_drv_video_ladir="
584 (assoc-ref %outputs "out") "/lib/dri"))))
585 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
586 (synopsis "Video acceleration library")
587 (description "The main motivation for VA-API (Video Acceleration API) is
588 to enable hardware accelerated video decode/encode at various
589 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
590 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
591 (license license:expat)))
593 (define-public ffmpeg
599 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
603 "1h4iz7q10wj04awr2wvmp60n7b09pfwrgwbbw9sgl7klcf52fxss"))))
604 (build-system gnu-build-system)
606 `(("fontconfig" ,fontconfig)
607 ("freetype" ,freetype)
608 ("frei0r-plugins" ,frei0r-plugins)
614 ("libbluray" ,libbluray)
616 ("libcdio-paranoia" ,libcdio-paranoia)
617 ("libtheora" ,libtheora)
619 ("libvdpau" ,libvdpau)
620 ("libvorbis" ,libvorbis)
626 ("pulseaudio" ,pulseaudio)
637 ("pkg-config" ,pkg-config)
639 ("python" ,python-2) ; scripts use interpreter python2
643 `(#:test-target "fate"
645 ;; possible additional inputs:
646 ;; --enable-avisynth enable reading of AviSynth script
648 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
649 ;; --enable-libcelt enable CELT decoding via libcelt [no]
650 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
651 ;; and libraw1394 [no]
652 ;; --enable-libfaac enable AAC encoding via libfaac [no]
653 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
654 ;; --enable-libflite enable flite (voice synthesis) support via
656 ;; --enable-libgme enable Game Music Emu via libgme [no]
657 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
658 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
659 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
660 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
661 ;; --enable-libnut enable NUT (de)muxing via libnut,
662 ;; native (de)muxer exists [no]
663 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
664 ;; libopencore-amrnb [no]
665 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
666 ;; libopencore-amrwb [no]
667 ;; --enable-libopencv enable video filtering via libopencv [no]
668 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
670 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
671 ;; --enable-libschroedinger enable Dirac de/encoding via
672 ;; libschroedinger [no]
673 ;; --enable-libshine enable fixed-point MP3 encoding via
675 ;; --enable-libssh enable SFTP protocol via libssh [no]
676 ;; (libssh2 does not work)
677 ;; --enable-libstagefright-h264 enable H.264 decoding via
678 ;; libstagefright [no]
679 ;; --enable-libutvideo enable Ut Video encoding and decoding via
681 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
682 ;; --enable-libvidstab enable video stabilization using
684 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
685 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
686 ;; libvo-amrwbenc [no]
687 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
688 ;; --enable-libxavs enable AVS encoding via xavs [no]
689 ;; --enable-libzmq enable message passing via libzmq [no]
690 ;; --enable-libzvbi enable teletext support via libzvbi [no]
691 ;; --enable-opencl enable OpenCL code
692 '("--enable-avresample"
693 "--enable-gpl" ; enable optional gpl licensed parts
696 "--enable-fontconfig"
703 "--enable-libfreetype"
704 "--enable-libmp3lame"
710 "--enable-libtwolame"
719 "--enable-runtime-cpudetect"
721 ;; The HTML pages take 7.2 MiB
722 "--disable-htmlpages"
724 ;; The static libraries are 23 MiB
727 ;; Runtime cpu detection is not implemented on
728 ;; MIPS, so we disable some features.
731 "--disable-mipsdspr2"
734 (modify-phases %standard-phases
737 ;; configure does not work followed by "SHELL=..." and
738 ;; "CONFIG_SHELL=..."; set environment variables instead
739 (lambda* (#:key outputs configure-flags #:allow-other-keys)
740 (let ((out (assoc-ref outputs "out")))
741 (substitute* "configure"
742 (("#! /bin/sh") (string-append "#!" (which "sh"))))
743 (setenv "SHELL" (which "bash"))
744 (setenv "CONFIG_SHELL" (which "bash"))
745 (zero? (apply system*
747 (string-append "--prefix=" out)
748 ;; Add $libdir to the RUNPATH of all the binaries.
749 (string-append "--extra-ldflags=-Wl,-rpath="
753 'check 'set-ld-library-path
755 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
757 (let* ((dso (find-files "." "\\.so$"))
758 (path (string-join (map dirname dso) ":")))
759 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
760 (setenv "LD_LIBRARY_PATH" path)
762 (home-page "https://www.ffmpeg.org/")
763 (synopsis "Audio and video framework")
764 (description "FFmpeg is a complete, cross-platform solution to record,
765 convert and stream audio and video. It includes the libavcodec
766 audio/video codec library.")
767 (license license:gpl2+)))
769 (define-public ffmpeg-2.8
775 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
779 "0hyqr391pika4vgynv90bacz11wdpqcqfgj5h7g5jrmgvz6hgj68"))))
781 (substitute-keyword-arguments (package-arguments ffmpeg)
782 ((#:configure-flags flags)
784 (if (string=? flag "--disable-mipsdsp")
785 "--disable-mipsdspr1"
789 ;; Annoyingly enough, the latest mpv release does not build with the stable
790 ;; release of ffmpeg. Use a git commit until the situation is fixed.
791 (define-public ffmpeg-git
792 (let ((commit "3f887440677328c9cfed97ad81d14051ffa32aae")
797 (version (string-append "3.4-" revision "." (string-take commit 9)))
801 (url "https://github.com/FFmpeg/FFmpeg.git")
803 (file-name (string-append name "-" version "-checkout"))
806 "1b7n3g4m2rbvrwsgbfl8wl91z42g1ld42clwxs8qpl9ny5rwz6sq")))))))
815 "https://download.videolan.org/pub/videolan/vlc/"
816 version "/vlc-" version ".tar.xz"))
819 "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
820 (build-system gnu-build-system)
822 `(("git" ,git) ; needed for a test
823 ("pkg-config" ,pkg-config)))
824 ;; FIXME: Add optional inputs once available.
826 `(("alsa-lib" ,alsa-lib)
830 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
831 ("fontconfig" ,fontconfig)
832 ("freetype" ,freetype)
836 ("libdvbpsi" ,libdvbpsi)
837 ("libgcrypt" ,libgcrypt)
842 ("libsamplerate" ,libsamplerate)
844 ("libvorbis" ,libvorbis)
845 ("libtheora" ,libtheora)
848 ("libxinerama" ,libxinerama)
851 ("livemedia-utils" ,livemedia-utils)
856 ("pulseaudio" ,pulseaudio)
857 ("python" ,python-wrapper)
859 ("qtx11extras" ,qtx11extras)
861 ("sdl-image" ,sdl-image)
864 ("xcb-util-keysyms" ,xcb-util-keysyms)))
867 `("CXXFLAGS=-std=gnu++11"
868 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
869 (assoc-ref %build-inputs "ffmpeg")
870 "/lib")) ;needed for the tests
873 (modify-phases %standard-phases
874 (add-after 'unpack 'patch-source
875 (lambda* (#:key inputs #:allow-other-keys)
876 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
877 (substitute* "configure"
878 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
879 (string-append "LIVE555_PREFIX=" livemedia-utils)))
880 ;; Some of the tests require using the display to test out VLC,
881 ;; which fails in our sandboxed build system
882 (substitute* "test/run_vlc.sh"
883 (("./vlc --ignore-config") "echo"))
884 ;; XXX Likely not needed for >2.2.6.
885 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
886 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
888 (add-after 'install 'regenerate-plugin-cache
889 (lambda* (#:key outputs #:allow-other-keys)
890 ;; The 'install-exec-hook' rule in the top-level Makefile.am
891 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
892 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
893 ;; it references. Thus, we first reset the timestamps of all
894 ;; these files, and then regenerate the cache such that the
895 ;; mtimes it includes are always zero instead of being dependent
896 ;; on the build time.
897 (let* ((out (assoc-ref outputs "out"))
898 (pkglibdir (string-append out "/lib/vlc"))
899 (plugindir (string-append pkglibdir "/plugins"))
900 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
901 ;; TODO: Factorize 'reset-timestamps'.
902 (for-each (lambda (file)
903 (let ((s (lstat file)))
904 (unless (eq? (stat:type s) 'symlink)
905 (utime file 0 0 0 0))))
906 (find-files plugindir))
907 (zero? (system* cachegen plugindir))))))))
908 (home-page "https://www.videolan.org/")
909 (synopsis "Audio and video framework")
910 (description "VLC is a cross-platform multimedia player and framework
911 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
912 treaming protocols.")
913 (license license:gpl2+)))
915 (define-public mplayer
922 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
926 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
927 (build-system gnu-build-system)
928 ;; FIXME: Add additional inputs once available.
930 `(("pkg-config" ,pkg-config)))
932 `(("alsa-lib" ,alsa-lib)
933 ("cdparanoia" ,cdparanoia)
935 ("fontconfig" ,fontconfig)
936 ("freetype" ,freetype)
937 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
940 ("libdvdcss" ,libdvdcss)
941 ("libdvdnav" ,libdvdnav)
943 ("libmpeg2" ,libmpeg2)
944 ("libmpg123" ,mpg123) ; audio codec for MP3
946 ("libtheora" ,libtheora)
947 ("libvdpau" ,libvdpau)
948 ("libvorbis" ,libvorbis)
951 ("libxinerama" ,libxinerama)
953 ("libxxf86dga" ,libxxf86dga)
957 ("pulseaudio" ,pulseaudio)
958 ("python" ,python-wrapper)
964 `(#:tests? #f ; no test target
966 (modify-phases %standard-phases
968 ;; configure does not work followed by "SHELL=..." and
969 ;; "CONFIG_SHELL=..."; set environment variables instead
970 (lambda* (#:key inputs outputs #:allow-other-keys)
971 (let ((out (assoc-ref outputs "out"))
972 (libx11 (assoc-ref inputs "libx11")))
973 (substitute* "configure"
974 (("#! /bin/sh") (string-append "#!" (which "sh"))))
975 (setenv "SHELL" (which "bash"))
976 (setenv "CONFIG_SHELL" (which "bash"))
979 (string-append "--extra-cflags=-I"
980 libx11 "/include") ; to detect libx11
981 "--disable-ffmpeg_a" ; disables bundled ffmpeg
982 (string-append "--prefix=" out)
983 ;; Enable runtime cpu detection where supported,
984 ;; and choose a suitable target.
985 ,@(match (or (%current-target-system)
988 '("--enable-runtime-cpudetection"
989 "--target=x86_64-linux"))
991 '("--enable-runtime-cpudetection"
992 "--target=i686-linux"))
994 '("--target=mips3-linux"))
995 (_ (list (string-append
997 (or (%current-target-system)
998 (nix-system->gnu-triplet
999 (%current-system)))))))
1000 "--disable-iwmmxt"))))))))
1001 (home-page "https://www.mplayerhq.hu/design7/news.html")
1002 (synopsis "Audio and video player")
1003 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1004 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1005 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1006 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1007 (license license:gpl2)))
1016 "https://github.com/mpv-player/mpv/archive/v" version
1020 "1d2p6k3y9lqx8bpdal4grrj8ljy7pvd8qgdq8004fmr38afmbb7f"))
1021 (file-name (string-append name "-" version ".tar.gz"))))
1022 (build-system waf-build-system)
1024 `(("perl" ,perl) ; for zsh completion file
1025 ("pkg-config" ,pkg-config)
1026 ("python-docutils" ,python-docutils)))
1027 ;; Missing features: libguess, V4L2
1029 `(("alsa-lib" ,alsa-lib)
1031 ("ffmpeg" ,ffmpeg-git)
1036 ("libbluray" ,libbluray)
1037 ("libcaca" ,libcaca)
1038 ("libbs2b" ,libbs2b)
1039 ("libcdio-paranoia" ,libcdio-paranoia)
1040 ("libdvdread" ,libdvdread)
1041 ("libdvdnav" ,libdvdnav)
1042 ("libjpeg" ,libjpeg)
1044 ("libvdpau" ,libvdpau)
1046 ("libxext" ,libxext)
1047 ("libxinerama" ,libxinerama)
1048 ("libxrandr" ,libxrandr)
1049 ("libxscrnsaver" ,libxscrnsaver)
1051 ;; XXX: lua > 5.2 is not currently supported; see
1052 ;; waftools/checks/custom.py
1056 ("pulseaudio" ,pulseaudio)
1059 ("wayland" ,wayland)
1060 ("wayland-protocols" ,wayland-protocols)
1061 ("libxkbcommon", libxkbcommon)
1062 ("youtube-dl" ,youtube-dl)
1066 (modify-phases %standard-phases
1068 'configure 'setup-waf
1069 (lambda* (#:key inputs #:allow-other-keys)
1070 (copy-file (assoc-ref inputs "waf") "waf")
1071 (setenv "CC" "gcc"))))
1072 #:configure-flags (list "--enable-libmpv-shared"
1077 "--disable-build-date")
1078 ;; No check function defined.
1080 (home-page "https://mpv.io/")
1081 (synopsis "Audio and video player")
1082 (description "mpv is a general-purpose audio and video player. It is a
1083 fork of mplayer2 and MPlayer. It shares some features with the former
1084 projects while introducing many more.")
1085 (license license:gpl2+)))
1087 (define-public gnome-mpv
1094 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1095 "/download/v" version "/gnome-mpv-" version
1099 "1w944ymyssgfcjiczrq4saig90crw9b9hhdsnchfbjsw173qi8n5"))))
1101 `(("intltool" ,intltool)
1102 ("pkg-config" ,pkg-config)))
1105 ("libepoxy" ,libepoxy)
1107 (build-system glib-or-gtk-build-system)
1108 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1109 (synopsis "GTK+ frontend for the mpv media player")
1110 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1111 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1112 access to mpv's powerful playback capabilities.")
1113 (license license:gpl3+)))
1115 (define-public libvpx
1120 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1123 (url "https://chromium.googlesource.com/webm/libvpx")
1124 (commit (string-append "v" version))))
1125 (file-name (git-file-name name version))
1128 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1129 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1130 (build-system gnu-build-system)
1132 `(#:configure-flags (list "--enable-shared"
1134 ;; Limit size to avoid CVE-2015-1258
1135 "--size-limit=16384x16384"
1136 (string-append "--prefix=" (assoc-ref %outputs "out")))
1137 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1138 (assoc-ref %outputs "out") "/lib"))
1139 #:phases (modify-phases %standard-phases
1141 (lambda* (#:key configure-flags #:allow-other-keys)
1142 ;; The configure script does not understand some of the GNU
1143 ;; options, so we only add the flags specified above.
1144 (apply invoke "./configure" configure-flags))))
1145 #:tests? #f)) ; no check target
1149 (synopsis "VP8/VP9 video codec")
1150 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1151 (license license:bsd-3)
1152 (home-page "https://www.webmproject.org/")))
1154 (define-public youtube-dl
1157 (version "2018.01.27")
1160 (uri (string-append "https://yt-dl.org/downloads/"
1161 version "/youtube-dl-"
1165 "14vbm8pr6xdrdbk8j9k4v82rnalbdpk2lcm7n9wj6z6d441ymji9"))))
1166 (build-system python-build-system)
1168 ;; The problem here is that the directory for the man page and completion
1169 ;; files is relative, and for some reason, setup.py uses the
1170 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1171 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1172 ;; completion file is called 'youtube-dl' rather than
1173 ;; 'youtube-dl.bash-completion'.
1174 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1175 #:phases (modify-phases %standard-phases
1176 (add-before 'install 'fix-the-data-directories
1177 (lambda* (#:key outputs #:allow-other-keys)
1178 (let ((prefix (assoc-ref outputs "out")))
1179 (mkdir "bash-completion")
1180 (rename-file "youtube-dl.bash-completion"
1181 "bash-completion/youtube-dl")
1182 (substitute* "setup.py"
1183 (("youtube-dl\\.bash-completion")
1184 "bash-completion/youtube-dl")
1186 (string-append "'" prefix "/etc/"))
1188 (string-append "'" prefix "/share/")))
1190 (synopsis "Download videos from YouTube.com and other sites")
1192 "Youtube-dl is a small command-line program to download videos from
1193 YouTube.com and many more sites.")
1194 (home-page "https://yt-dl.org")
1195 (license license:public-domain)))
1197 (define-public youtube-dl-gui
1199 (name "youtube-dl-gui")
1204 (uri (pypi-uri "Youtube-DLG" version))
1207 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1208 (build-system python-build-system)
1210 ;; In Guix, wxpython has not yet been packaged for Python 3.
1211 `(#:python ,python-2
1212 ;; This package has no tests.
1215 (modify-phases %standard-phases
1216 (add-before 'build 'patch-source
1217 (lambda* (#:key inputs #:allow-other-keys)
1218 ;; The youtube-dl-gui program lets you configure options. Some of
1219 ;; them are problematic, so we change their defaults.
1220 (substitute* "youtube_dl_gui/optionsmanager.py"
1221 ;; When this is true, the builder process will try (and fail) to
1222 ;; write logs to the builder user's home directory.
1223 (("'enable_log': True") "'enable_log': False")
1224 ;; This determines which youtube-dl program youtube-dl-gui will
1225 ;; run. If we don't set this, then youtube-dl-gui might download
1226 ;; an arbitrary copy from the Internet into the user's home
1227 ;; directory and run it, so let's make sure youtube-dl-gui uses
1228 ;; the youtube-dl from the inputs by default.
1229 (("'youtubedl_path': self.config_path")
1230 (string-append "'youtubedl_path': '"
1231 (assoc-ref inputs "youtube-dl")
1233 ;; When this is True, when youtube-dl-gui is finished downloading
1234 ;; a file, it will try (and possibly fail) to open the directory
1235 ;; containing the downloaded file. This can fail because it
1236 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1237 ;; adding xdg-utils to the propagated inputs is not enough to
1238 ;; make this work, so for now we set the default to False.
1239 (("'open_dl_dir': True") "'open_dl_dir': False"))
1240 ;; The youtube-dl program from the inputs is actually a wrapper
1241 ;; script written in bash, so attempting to invoke it as a python
1242 ;; script will fail.
1243 (substitute* "youtube_dl_gui/downloaders.py"
1244 (("cmd = \\['python', self\\.youtubedl_path\\]")
1245 "cmd = [self.youtubedl_path]"))
1246 ;; Use relative paths for installing data files so youtube-dl-gui
1247 ;; installs the files relative to its prefix in the store, rather
1248 ;; than relative to /. Also, instead of installing data files into
1249 ;; $prefix/usr/share, install them into $prefix/share for
1250 ;; consistency (see: (standards) Directory Variables).
1251 (substitute* "setup.py"
1252 (("= '/usr/share") "= 'share"))
1253 ;; Update get_locale_file() so it finds the installed localization
1255 (substitute* "youtube_dl_gui/utils.py"
1256 (("os\\.path\\.join\\('/usr', 'share'")
1257 (string-append "os.path.join('"
1258 (assoc-ref %outputs "out")
1259 "', 'share'"))))))))
1261 `(("python2-wxpython" ,python2-wxpython)
1262 ("youtube-dl" ,youtube-dl)))
1263 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1265 "GUI (Graphical User Interface) for @command{youtube-dl}")
1267 "Youtube-dlG is a GUI (Graphical User Interface) for
1268 @command{youtube-dl}. You can use it to download videos from YouTube and any
1269 other site that youtube-dl supports.")
1270 (license license:unlicense)))
1272 (define-public you-get
1275 (version "0.4.1011")
1279 "https://github.com/soimort/you-get/archive/v"
1281 (file-name (string-append name "-" version ".tar.gz"))
1284 "0cdbh5w0chw3dlrwizm91l6sgkkzy7p6h0072dai4xbw5zgld31k"))))
1285 (build-system python-build-system)
1287 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1290 (modify-phases %standard-phases
1291 (add-after 'unpack 'qualify-input-references
1292 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1293 ;; happens to be in the user's $PATH at run time.
1294 (lambda* (#:key inputs #:allow-other-keys)
1295 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1297 (substitute* "src/you_get/processor/ffmpeg.py"
1298 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1299 ;; same string is also used when sniffing ffmpeg's output.
1300 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1301 (string-append prefix "'" ffmpeg "'")))
1303 #:tests? #f)) ; XXX some tests need Internet access
1304 (synopsis "Download videos, audio, or images from Web sites")
1306 "You-Get is a command-line utility to download media contents (videos,
1307 audio, images) from the Web. It can use either mpv or vlc for playback.")
1308 (home-page "https://you-get.org/")
1309 (license license:expat)))
1311 (define-public libbluray
1317 (uri (string-append "https://download.videolan.org/videolan/"
1318 name "/" version "/"
1319 name "-" version ".tar.bz2"))
1322 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1323 (build-system gnu-build-system)
1325 `(#:configure-flags '("--disable-bdjava-jar")
1327 (modify-phases %standard-phases
1328 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1329 ;; Avoid the need to propagate libxml2 by referring to it
1330 ;; directly, as is already done for fontconfig & freetype.
1331 (lambda* (#:key inputs #:allow-other-keys)
1332 (let ((libxml2 (assoc-ref inputs "libxml2")))
1333 (substitute* "configure"
1334 ((" libxml-2.0") ""))
1335 (substitute* "src/libbluray.pc.in"
1336 (("^Libs.private:" field)
1337 (string-append field " -L" libxml2 "/lib -lxml2")))
1339 (add-before 'build 'fix-dlopen-paths
1340 (lambda* (#:key inputs #:allow-other-keys)
1341 (let ((libaacs (assoc-ref inputs "libaacs"))
1342 (libbdplus (assoc-ref inputs "libbdplus")))
1343 (substitute* "src/libbluray/disc/aacs.c"
1345 (string-append "\"" libaacs "/lib/libaacs\"")))
1346 (substitute* "src/libbluray/disc/bdplus.c"
1348 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1350 (native-inputs `(("pkg-config" ,pkg-config)))
1352 `(("fontconfig" ,fontconfig)
1353 ("freetype" ,freetype)
1354 ("libaacs" ,libaacs)
1355 ("libbdplus" ,libbdplus)
1356 ("libxml2" ,libxml2)))
1357 (home-page "https://www.videolan.org/developers/libbluray.html")
1358 (synopsis "Blu-Ray Disc playback library")
1360 "libbluray is a library designed for Blu-Ray Disc playback for media
1361 players, like VLC or MPlayer.")
1362 (license license:lgpl2.1+)))
1364 (define-public libdvdread
1370 (uri (string-append "https://download.videolan.org/videolan/"
1371 name "/" version "/"
1372 name "-" version ".tar.bz2"))
1375 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1376 (build-system gnu-build-system)
1378 `(#:configure-flags '("--with-libdvdcss=yes")))
1380 `(("pkg-config" ,pkg-config)))
1382 `(("libdvdcss" ,libdvdcss)))
1383 (home-page "http://dvdnav.mplayerhq.hu/")
1384 (synopsis "Library for reading video DVDs")
1386 "Libdvdread provides a simple foundation for reading DVD video
1387 disks. It provides the functionality that is required to access many
1388 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1389 authentication and descrambling (if an external libdvdcss library is
1391 (license license:gpl2+)))
1393 (define-public dvdauthor
1400 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1404 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1405 (build-system gnu-build-system)
1407 `(("libdvdread" ,libdvdread)
1409 ("imagemagick" ,imagemagick)
1410 ("libxml2" ,libxml2)
1411 ("freetype" ,freetype)))
1413 `(("pkg-config" ,pkg-config)))
1414 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1415 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1416 MPEG-2 stream containing VOB packets.")
1417 (home-page "http://dvdauthor.sourceforge.net")
1418 (license license:gpl3+)))
1420 (define-public libdvdnav
1426 (uri (string-append "https://download.videolan.org/videolan/"
1427 name "/" version "/"
1428 name "-" version ".tar.bz2"))
1431 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1432 (build-system gnu-build-system)
1434 `(("pkg-config" ,pkg-config)))
1436 `(("libdvdread" ,libdvdread)))
1437 (home-page "http://dvdnav.mplayerhq.hu/")
1438 (synopsis "Library for video DVD navigation features")
1440 "Libdvdnav is a library for developers of multimedia
1441 applications. It allows easy use of sophisticated DVD navigation features
1442 such as DVD menus, multiangle playback and even interactive DVD games. All
1443 this functionality is provided through a simple API which provides the DVD
1444 playback as a single logical stream of blocks, intermitted by special
1445 dvdnav events to report certain conditions. The main usage of libdvdnav is
1446 a loop regularly calling a function to get the next block, surrounded by
1447 additional calls to tell the library of user interaction. The whole
1448 DVD virtual machine and internal playback states are completely
1450 (license license:gpl2+)))
1452 (define-public libdvdnav-4
1460 "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1464 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1466 `(("pkg-config" ,pkg-config)
1467 ("autoconf" ,autoconf)
1468 ("automake" ,automake)
1469 ("libtool" ,libtool)))
1472 (modify-phases %standard-phases
1473 (add-after 'unpack 'autoreconf
1475 (zero? (system* "autoreconf" "-vif")))))))))
1477 (define-public libdvdcss
1483 (uri (string-append "https://download.videolan.org/pub/"
1484 name "/" version "/"
1485 name "-" version ".tar.bz2"))
1488 "1b7awvyahivglp7qmgx2g5005kc5npv257gw7wxdprjsnx93f1zb"))))
1489 (build-system gnu-build-system)
1490 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1491 (synopsis "Library for accessing DVDs as block devices")
1493 "libdvdcss is a simple library designed for accessing DVDs like a block
1494 device without having to bother about the decryption.")
1495 (license license:gpl2+)))
1497 (define-public srt2vtt
1504 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1508 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1509 (build-system gnu-build-system)
1511 `(("guile" ,guile-2.0)))
1512 (synopsis "SubRip to WebVTT subtitle converter")
1513 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1514 for use with HTML5 video.")
1515 (home-page "http://dthompson.us/pages/software/srt2vtt")
1516 (license license:gpl3+)))
1518 (define-public avidemux
1525 "mirror://sourceforge/" name "/" name "/" version "/"
1526 name "_" version ".tar.gz"))
1529 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1530 (patches (search-patches "avidemux-install-to-lib.patch"))))
1531 (build-system cmake-build-system)
1533 `(("pkg-config" ,pkg-config)))
1534 ;; FIXME: Once packaged, add libraries not found during the build.
1536 `(("alsa-lib" ,alsa-lib)
1537 ("fontconfig" ,fontconfig)
1538 ("freetype" ,freetype)
1539 ("fribidi" ,fribidi)
1544 ("libvdpau" ,libvdpau)
1545 ("libvorbis" ,libvorbis)
1549 ("pulseaudio" ,pulseaudio)
1550 ("python" ,python-wrapper)
1551 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1552 ;("qtbase" ,qtbase) with -std=gnu++11.
1553 ;("qttools" ,qttools)
1559 `(#:tests? #f ; no check target
1561 ;; Make sure files inside the included ffmpeg tarball are
1563 (modify-phases %standard-phases
1564 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1566 (with-directory-excursion "avidemux_core/ffmpeg_package"
1567 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1568 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1569 (add-after 'patch-source-shebangs 'repack-ffmpeg
1571 (with-directory-excursion "avidemux_core/ffmpeg_package"
1572 (substitute* "ffmpeg-2.7.6/configure"
1573 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1574 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1575 ;; avoid non-determinism in the archive
1576 "--sort=name" "--mtime=@0"
1577 "--owner=root:0" "--group=root:0")
1578 (delete-file-recursively "ffmpeg-2.7.6"))))
1581 ;; Copy-paste settings from the cmake build system.
1582 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1583 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1585 (lambda* (#:key inputs outputs #:allow-other-keys)
1587 ((out (assoc-ref outputs "out"))
1588 (lib (string-append out "/lib"))
1590 (sdl (assoc-ref inputs "sdl"))
1592 (lambda* (component srcdir #:optional (args '()))
1593 (let ((builddir (string-append "build_" component)))
1595 (with-directory-excursion builddir
1598 (apply system* "cmake"
1599 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1600 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1601 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1602 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1603 "\"-Wl,-rpath=" lib "\"")
1604 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1605 (string-append "-DSDL_INCLUDE_DIR="
1607 (string-append "../" srcdir)
1610 (system* "make" "-j"
1611 (number->string (parallel-job-count)))
1612 (system* "make" "install"))))))))
1614 (and (build_component "core" "avidemux_core")
1615 (build_component "cli" "avidemux/cli")
1616 (build_component "qt4" "avidemux/qt4")
1617 (build_component "plugins_common" "avidemux_plugins"
1618 '("-DPLUGIN_UI=COMMON"))
1619 (build_component "plugins_cli" "avidemux_plugins"
1620 '("-DPLUGIN_UI=CLI"))
1621 (build_component "plugins_qt4" "avidemux_plugins"
1622 '("-DPLUGIN_UI=QT4"))
1623 (build_component "plugins_settings" "avidemux_plugins"
1624 '("-DPLUGIN_UI=SETTINGS")))
1625 ;; Remove .exe and .dll file.
1626 (delete-file-recursively
1627 (string-append out "/share/ADM6_addons")))))
1628 (delete 'install))))
1629 (home-page "http://fixounet.free.fr/avidemux/")
1630 (synopsis "Video editor")
1631 (description "Avidemux is a video editor designed for simple cutting,
1632 filtering and encoding tasks. It supports many file types, including AVI,
1633 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1634 can be automated using projects, job queue and powerful scripting
1636 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1637 ;; Software with various licenses is included, see License.txt.
1638 (license license:gpl2+)))
1640 (define-public vapoursynth
1642 (name "vapoursynth")
1647 "https://github.com/vapoursynth/vapoursynth/archive/R"
1649 (file-name (string-append name "-" version ".tar.gz"))
1652 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1653 (build-system gnu-build-system)
1655 `(("autoconf" ,autoconf)
1656 ("automake" ,automake)
1657 ("cython" ,python-cython)
1658 ("libtool" ,libtool)
1659 ("pkg-config" ,pkg-config)
1663 `(("ffmpeg" ,ffmpeg)
1665 ("tesseract-ocr" ,tesseract-ocr)
1669 (modify-phases %standard-phases
1673 (zero? (system* "sh" "autogen.sh")))))))
1674 (home-page "http://www.vapoursynth.com/")
1675 (synopsis "Video processing framework")
1676 (description "VapourSynth is a C++ library and Python module for video
1677 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1678 multithreading, generalized colorspaces, per frame properties, and videos with
1680 ;; src/core/cpufeatures only allows x86, ARM or PPC
1681 (supported-systems (fold delete %supported-systems
1682 '("mips64el-linux" "aarch64-linux")))
1683 ;; As seen from the source files.
1684 (license license:lgpl2.1+)))
1693 "http://downloads.xvid.org/downloads/xvidcore-"
1694 version ".tar.bz2"))
1697 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1698 (build-system gnu-build-system)
1699 (native-inputs `(("yasm" ,yasm)))
1702 (modify-phases %standard-phases
1704 'configure 'pre-configure
1706 (chdir "build/generic")
1707 (substitute* "configure"
1708 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1709 ;; No 'check' target.
1711 (home-page "https://www.xvid.com/")
1712 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1713 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1714 codec library. It uses ASP features such as b-frames, global and quarter
1715 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1716 and custom quantization matrices.")
1717 (license license:gpl2+)))
1719 (define-public streamlink
1726 (uri (pypi-uri "streamlink" version))
1729 "17299xnd9jzi7m1d2rr4xdlj47q64bzj2957nlsrhw0hskds1s6h"))))
1730 (build-system python-build-system)
1731 (home-page "https://github.com/streamlink/streamlink")
1733 `(("python-pytest" ,python-pytest)
1734 ("python-mock" ,python-mock)
1735 ("python-requests-mock" ,python-requests-mock)))
1737 `(("python-pysocks" ,python-pysocks)
1738 ("python-websocket-client" ,python-websocket-client)
1739 ("python-iso3166" ,python-iso3166)
1740 ("python-iso639" ,python-iso639)
1741 ("python-pycryptodome" ,python-pycryptodome)
1742 ("python-requests" ,python-requests)))
1743 (synopsis "Extract streams from various services")
1744 (description "Streamlink is command-line utility that extracts streams
1745 from sites like Twitch.tv and pipes them into a video player of choice.")
1746 (license license:bsd-2)))
1748 (define-public livestreamer
1749 (deprecated-package "livestreamer" streamlink))
1757 (uri (string-append "https://github.com/mltframework/mlt/"
1758 "archive/v" version ".tar.gz"))
1759 (file-name (string-append name "-" version ".tar.gz"))
1762 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1763 (build-system gnu-build-system)
1765 `(#:tests? #f ; no tests
1766 #:make-flags '("CC=gcc")
1768 (list "--enable-gpl3"
1771 (modify-phases %standard-phases
1773 'configure 'override-LDFLAGS
1774 (lambda* (#:key outputs #:allow-other-keys)
1775 (substitute* "config.mak"
1777 (string-append "LDFLAGS+=-Wl,-rpath="
1778 (assoc-ref outputs "out")
1782 `(("alsa-lib" ,alsa-lib)
1785 ("libxml2" ,libxml2)
1788 ("libsamplerate" ,libsamplerate)
1789 ("pulseaudio" ,pulseaudio)
1793 `(("pkg-config" ,pkg-config)))
1794 (home-page "https://www.mltframework.org/")
1795 (synopsis "Author, manage, and run multitrack audio/video compositions")
1797 "MLT is a multimedia framework, designed and developed for television
1798 broadcasting. It provides a toolkit for broadcasters, video editors, media
1799 players, transcoders, web streamers and many more types of applications. The
1800 functionality of the system is provided via an assortment of ready to use
1801 tools, XML authoring components, and an extensible plug-in based API.")
1802 (license license:gpl3)))
1804 (define-public v4l-utils
1810 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1811 "/v4l-utils-" version ".tar.bz2"))
1814 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1815 (build-system gnu-build-system)
1818 (list (string-append "--with-udevdir="
1819 (assoc-ref %outputs "out")
1821 "CXXFLAGS=-std=gnu++11")))
1824 ("pkg-config" ,pkg-config)))
1826 `(("alsa-lib" ,alsa-lib)
1828 ("libjpeg" ,libjpeg)
1832 (synopsis "Realtime video capture utilities for Linux")
1833 (description "The v4l-utils provide a series of libraries and utilities to
1834 be used for realtime video capture via Linux-specific APIs.")
1835 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1836 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1837 (license (list license:lgpl2.1+ license:gpl2))))
1845 (uri (string-append "https://github.com/jp9000/obs-studio"
1846 "/archive/" version ".tar.gz"))
1847 (file-name (string-append name "-" version ".tar.gz"))
1850 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1851 (build-system cmake-build-system)
1853 `(#:tests? #f)) ; no tests
1855 `(("pkg-config" ,pkg-config)))
1857 `(("alsa-lib" ,alsa-lib)
1861 ("fontconfig" ,fontconfig)
1862 ("freetype" ,freetype)
1864 ("jansson" ,jansson)
1865 ("libx264" ,libx264)
1866 ("libxcomposite" ,libxcomposite)
1868 ("pulseaudio" ,pulseaudio)
1870 ("qtx11extras" ,qtx11extras)
1872 ("v4l-utils" ,v4l-utils)
1874 (synopsis "Live streaming software")
1875 (description "Open Broadcaster Software provides a graphical interface for
1876 video recording and live streaming. OBS supports capturing audio and video
1877 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1879 (home-page "https://obsproject.com")
1880 (supported-systems '("x86_64-linux" "i686-linux"))
1881 (license license:gpl2+)))
1883 (define-public libvdpau
1890 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1891 name "-" version ".tar.bz2"))
1894 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1895 (build-system gnu-build-system)
1897 `(("pkg-config" ,pkg-config)))
1899 `(("dri2proto" ,dri2proto)
1900 ("libx11" ,libx11 "out")
1901 ("libxext" ,libxext)))
1902 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1903 (synopsis "Video Decode and Presentation API")
1904 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1905 provides an interface to video decode acceleration and presentation hardware
1906 present in modern GPUs.")
1907 (license (license:x11-style "file://COPYING"))))
1909 (define-public vdpauinfo
1916 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1917 name "-" version ".tar.gz"))
1920 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1921 (build-system gnu-build-system)
1923 `(("pkg-config" ,pkg-config)
1924 ("libx11" ,libx11)))
1926 `(("libvdpau" ,libvdpau)))
1927 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1928 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1929 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1931 (license (license:x11-style "file://COPYING"))))
1933 (define-public libvdpau-va-gl
1935 (name "libvdpau-va-gl")
1940 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
1941 "releases/download/v" version "/libvdpau-va-gl-"
1945 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
1946 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
1947 (modules '((guix build utils)))
1948 (snippet '(delete-file-recursively "3rdparty"))))
1949 (build-system cmake-build-system)
1951 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
1953 `(("libvdpau" ,libvdpau)
1954 ("pkg-config" ,pkg-config)))
1958 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
1959 (synopsis "VDPAU driver with VA-API/OpenGL backend")
1961 "Many applications can use VDPAU to accelerate portions of the video
1962 decoding process and video post-processing to the GPU video hardware. Since
1963 there is no VDPAU available on Intel chips, they fall back to different drawing
1964 techniques. This driver uses OpenGL under the hood to accelerate drawing and
1965 scaling and VA-API (if available) to accelerate video decoding.")
1966 (license license:expat)))
1968 (define-public recordmydesktop
1970 (name "recordmydesktop")
1974 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1975 version "/recordmydesktop-" version ".tar.gz"))
1978 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1979 (build-system gnu-build-system)
1980 (inputs `(("popt" ,popt)
1985 ("libxfixes" ,libxfixes)
1986 ("libxdamage" ,libxdamage)
1987 ("libxext" ,libxext)
1988 ("alsa-lib" ,alsa-lib)
1989 ("libvorbis" ,libvorbis)
1990 ("libtheora" ,libtheora)))
1991 (home-page "http://recordmydesktop.sourceforge.net/")
1992 (synopsis "Desktop session video recorder")
1994 "recordMyDesktop is a command-line tool that captures the activity in
1995 your graphical desktop and encodes it as a video. This is a useful tool for
1996 making @dfn{screencasts}.")
1997 (license license:gpl2+)))
1999 (define-public simplescreenrecorder
2001 (name "simplescreenrecorder")
2006 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2008 (file-name (string-append name "-" version ".tar.gz"))
2011 "1gnf9wbiq2fcbqcn1a5nfmp8r0nxrrlgh2wly2mfkkwymynhx0pk"))))
2012 (build-system cmake-build-system)
2013 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2014 ;; README.md, the program builds and functions properly without them.
2015 ;; As a result, they are omitted. Please add them back if problems appear.
2017 `(("alsa-lib" ,alsa-lib)
2022 ("pulseaudio" ,pulseaudio)
2024 (native-inputs `(("pkg-config" ,pkg-config)))
2027 (list "-DWITH_QT5=TRUE")
2028 #:tests? #f)) ; no test suite
2029 ;; Using HTTPS causes part of the page to be displayed improperly.
2030 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2031 (synopsis "Screen recorder")
2032 (description "SimpleScreenRecorder is an easy to use screen recorder with
2033 a graphical user interface. It supports recording the entire screen, or a
2034 part of it, and allows encoding in many different codecs and file formats.
2035 Other features include a live preview and live streaming.")
2036 (license (list license:gpl3+ ; most files
2037 license:zlib ; glinject/elfhacks.*
2038 license:isc ; glinject/*
2039 license:x11)))) ; build-aux/install-sh
2041 (define-public libsmpeg
2048 (url "svn://svn.icculus.org/smpeg/trunk/")
2049 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2050 (file-name (string-append name "-" version "-checkout"))
2053 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2054 (build-system gnu-build-system)
2056 `(#:phases (modify-phases %standard-phases
2057 (add-after 'unpack 'autogen.sh
2059 (zero? (system* "sh" "autogen.sh")))))))
2061 `(("autoconf" ,autoconf)
2062 ("automake" ,automake)))
2065 (home-page "http://icculus.org/smpeg/")
2066 (synopsis "SDL MPEG decoding library")
2068 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2069 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2070 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2071 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2072 and MPEG system streams.")
2073 (license (list license:expat
2078 (define-public libbdplus
2085 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2086 version "/" name "-" version ".tar.bz2"))
2088 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2090 `(("libgcrypt" ,libgcrypt)))
2091 (build-system gnu-build-system)
2092 (home-page "https://www.videolan.org/developers/libbdplus.html")
2093 (synopsis "Library for decrypting certain Blu-Ray discs")
2094 (description "libbdplus is a library which implements the BD+ System
2096 (license license:lgpl2.1+)))
2098 (define-public libaacs
2105 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2106 version "/" name "-" version ".tar.bz2"))
2108 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2110 `(("libgcrypt" ,libgcrypt)))
2114 (build-system gnu-build-system)
2115 (home-page "https://www.videolan.org/developers/libaacs.html")
2116 (synopsis "Library for decrypting certain Blu-Ray discs")
2117 (description "libaacs is a library which implements the Advanced Access
2118 Content System specification.")
2119 (license license:lgpl2.1+)))
2121 (define-public mps-youtube
2123 (name "mps-youtube")
2128 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2129 "archive/v" version ".tar.gz"))
2130 (file-name (string-append name "-" version ".tar.gz"))
2133 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2134 (build-system python-build-system)
2136 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2137 ;; test suite results differ depending on the country and also introduce
2138 ;; non-determinism in the tests.
2139 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2142 `(("python-pafy" ,python-pafy)
2143 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2144 (home-page "https://github.com/mps-youtube/mps-youtube")
2145 (synopsis "Terminal based YouTube player and downloader")
2147 "@code{mps-youtube} is based on mps, a terminal based program to
2148 search, stream and download music. This implementation uses YouTube as
2149 a source of content and can play and download video as well as audio.
2150 It can use either mpv or mplayer for playback, and for conversion of
2151 formats ffmpeg or libav is used. Users should install one of the
2152 supported players in addition to this package.")
2153 (license license:gpl3+)))
2155 (define-public handbrake
2161 (uri (string-append "https://handbrake.fr/rotation.php?file="
2162 "HandBrake-" version ".tar.bz2"))
2163 (file-name (string-append "handbrake-" version ".tar.bz2"))
2166 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2167 (patches (search-patches "handbrake-pkg-config-path.patch"))
2168 (modules '((guix build utils)))
2170 ;; Remove bundled libraries and source not necessary for
2171 ;; running under a GNU environment.
2173 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2175 (build-system glib-or-gtk-build-system)
2177 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2178 ("autoconf" ,autoconf)
2179 ("curl" ,curl) ;not actually used, but tested for
2180 ("intltool" ,intltool)
2181 ("libtool" ,libtool)
2182 ("pkg-config" ,pkg-config)
2183 ("python" ,python-2))) ;for configuration
2186 ("dbus-glib" ,dbus-glib)
2188 ("fontconfig" ,fontconfig)
2189 ("freetype" ,freetype)
2191 ("gstreamer" ,gstreamer)
2192 ("gst-plugins-base" ,gst-plugins-base)
2196 ("libbluray" ,libbluray)
2197 ("libdvdnav" ,libdvdnav)
2198 ("libdvdread" ,libdvdread)
2199 ("libgudev" ,libgudev)
2200 ("libmpeg2" ,libmpeg2)
2201 ("libnotify" ,libnotify)
2203 ("libsamplerate" ,libsamplerate)
2204 ("libtheora" ,libtheora)
2205 ("libvorbis" ,libvorbis)
2207 ("libxml2" ,libxml2)
2208 ("libx264" ,libx264)
2212 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2214 (modify-phases %standard-phases
2215 (add-before 'patch-source-shebangs 'bootstrap-gtk
2216 ;; Run bootstrap ahead of time so that shebangs get patched.
2218 (setenv "CONFIG_SHELL" (which "sh"))
2219 (setenv "NOCONFIGURE" "1")
2220 ;; Patch the Makefile so that it doesn't bootstrap again.
2221 (substitute* "gtk/module.rules"
2222 ((".*autogen\\.sh.*") ""))
2223 (zero? (system* "sh" "./gtk/autogen.sh"))))
2224 (add-before 'configure 'disable-contrib
2226 (substitute* "make/include/main.defs"
2227 ;; Disable unconditional inclusion of some "contrib"
2228 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2229 ;; and libbluray), which would lead to fetching and
2230 ;; building of these libraries. Use our own instead.
2231 (("MODULES \\+= contrib") "# MODULES += contrib"))
2233 (add-before 'configure 'fix-x265-linking
2235 (substitute* "test/module.defs"
2236 ;; Fix missing library during linking error
2237 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2240 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2241 ;; 'configure' is not an autoconf-generated script, and
2242 ;; errors on unrecognized arguments,
2243 ;; e.g. --enable-fast-install
2244 (let ((out (assoc-ref outputs "out")))
2245 (zero? (apply system* "./configure"
2246 (string-append "--prefix=" out)
2247 (or configure-flags '()))))))
2248 (add-after 'configure 'chdir-build
2249 (lambda _ (chdir "./build") #t)))))
2250 (home-page "https://handbrake.fr")
2251 (synopsis "Video transcoder")
2253 "HandBrake is a tool for converting video from any format to a selection
2254 of modern, widely supported codecs.")
2255 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2256 (license (list license:gpl2+ license:bsd-3))))
2258 (define-public openh264
2264 (uri (string-append "https://github.com/cisco/"
2265 name "/archive/v" version ".tar.gz"))
2266 (file-name (string-append name "-" version ".tar.gz"))
2269 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2270 (build-system gnu-build-system)
2273 ("python" ,python)))
2275 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2277 #:test-target "test"
2278 #:phases (modify-phases %standard-phases
2279 ;; no configure script
2280 (delete 'configure))))
2281 (home-page "http://www.openh264.org/")
2282 (synopsis "H264 decoder library")
2284 "Openh264 is a library which can decode H264 video streams.")
2285 (license license:bsd-2)))
2287 (define-public libmp4v2
2294 ;; XXX: The new location of upstream is uncertain and will become relevant the
2295 ;; moment when the googlecode archive shuts down. It is past the date it
2296 ;; should've been turned off. I tried to communicate with upstream, but this
2297 ;; wasn't very responsive and not very helpful. The short summary is, it is
2298 ;; chaos when it comes to the amount of forks and only time will tell where
2299 ;; the new upstream location is.
2300 (uri (string-append "https://storage.googleapis.com/google-"
2301 "code-archive-downloads/v2/"
2302 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2303 (file-name (string-append name "-" version ".tar.bz2"))
2306 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2307 (build-system gnu-build-system)
2309 "static")) ; 3.7MiB .a file
2312 (modify-phases %standard-phases
2313 (add-after 'unpack 'remove-dates
2315 ;; Make the build reproducible.
2316 (substitute* "configure"
2317 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2318 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2320 (add-after 'install 'move-static-libraries
2321 (lambda* (#:key outputs #:allow-other-keys)
2322 ;; Move static libraries to the "static" output.
2323 (let* ((out (assoc-ref outputs "out"))
2324 (lib (string-append out "/lib"))
2325 (static (assoc-ref outputs "static"))
2326 (slib (string-append static "/lib")))
2328 (for-each (lambda (file)
2329 (install-file file slib)
2331 (find-files lib "\\.a$"))
2334 `(("help2man" ,help2man)
2335 ("dejagnu" ,dejagnu)))
2336 (home-page "https://code.google.com/archive/p/mp4v2/")
2337 (synopsis "API to create and modify mp4 files")
2339 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2340 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2341 file format that has been used as a multimedia file format in a variety of platforms and
2342 applications. It is a very powerful and extensible format that can accommodate
2343 practically any type of media.")
2344 (license license:mpl1.1)))
2346 (define-public libmediainfo
2348 (name "libmediainfo")
2352 (uri (string-append "https://mediaarea.net/download/source/"
2354 name "_" version ".tar.bz2"))
2357 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2358 ;; TODO add a Big Buck Bunny webm for tests.
2360 `(("autoconf" ,autoconf)
2361 ("automake" ,automake)
2362 ("libtool" ,libtool)
2363 ("pkg-config" ,pkg-config)
2365 ("tinyxml2" ,tinyxml2)
2367 ("libzen" ,libzen)))
2368 (build-system gnu-build-system)
2370 '(#:tests? #f ; see above TODO
2372 ;; build scripts not in root of archive
2373 (modify-phases %standard-phases
2374 (add-after 'unpack 'change-to-build-dir
2376 (chdir "Project/GNU/Library")
2378 (add-after 'change-to-build-dir 'autogen
2380 (zero? (system* "sh" "autogen.sh")))))))
2381 (home-page "https://mediaarea.net/en/MediaInfo")
2382 (synopsis "Library for retrieving media metadata")
2383 (description "MediaInfo is a library used for retrieving technical
2384 information and other metadata about audio or video files. A non-exhaustive
2385 list of the information MediaInfo can retrieve from media files include:
2388 @item General: title, author, director, album, track number, date, duration...
2389 @item Video: codec, aspect, fps, bitrate...
2390 @item Audio: codec, sample rate, channels, language, bitrate...
2391 @item Text: language of subtitle
2392 @item Chapters: number of chapters, list of chapters
2395 MediaInfo supports the following formats:
2398 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2399 MPEG-2, MPEG-4, DVD (VOB)...
2400 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2401 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2402 @item Subtitles: SRT, SSA, ASS, SAMI...
2404 (license license:bsd-2)))
2406 ;; TODO also have a GUI version available
2407 (define-public mediainfo
2413 (uri (string-append "https://mediaarea.net/download/source/"
2414 name "/" version "/"
2415 name "_" version ".tar.bz2"))
2418 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2420 `(("autoconf" ,autoconf)
2421 ("automake" ,automake)
2422 ("libtool" ,libtool)
2423 ("pkg-config" ,pkg-config)
2425 ("libmediainfo", libmediainfo)
2426 ("libzen" ,libzen)))
2427 (build-system gnu-build-system)
2429 '(#:tests? #f ; lacks tests
2431 ;; build scripts not in root of archive
2432 (modify-phases %standard-phases
2433 (add-after 'unpack 'change-to-build-dir
2435 (chdir "Project/GNU/CLI")
2437 (add-after 'change-to-build-dir 'autogen
2439 (zero? (system* "sh" "autogen.sh")))))))
2440 (home-page "https://mediaarea.net/en/MediaInfo")
2441 (synopsis "Utility for reading media metadata")
2442 (description "MediaInfo is a utility used for retrieving technical
2443 information and other metadata about audio or video files. It supports the
2444 many codecs and formats supported by libmediainfo.")
2445 (license license:bsd-2)))
2447 (define-public livemedia-utils
2449 (name "livemedia-utils")
2450 (version "2017.06.04")
2454 "https://download.videolan.org/contrib/live555/live."
2458 "0xf3vynxqpxpd762zni0jkblnjlgbqxjx99m83m7gqx6zriph271"))))
2459 (build-system gnu-build-system)
2461 '(#:tests? #f ; no tests
2462 #:make-flags (list "CC=gcc"
2463 (string-append "LDFLAGS=-Wl,-rpath="
2464 (assoc-ref %outputs "out") "/lib")
2465 (string-append "PREFIX="
2466 (assoc-ref %outputs "out")))
2467 #:phases (modify-phases %standard-phases
2468 (add-before 'configure 'fix-makefiles-generation
2470 (substitute* "genMakefiles"
2475 (zero? (system* "./genMakefiles"
2476 "linux-with-shared-libraries")))))))
2477 (home-page "http://www.live555.com/liveMedia/")
2478 (synopsis "Set of C++ libraries for multimedia streaming")
2479 (description "This code forms a set of C++ libraries for multimedia
2480 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2481 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2482 JPEG video, and several audio codecs. They can easily be extended to support
2483 additional (audio and/or video) codecs, and can also be used to build basic
2484 RTSP or SIP clients and servers.")
2485 (license license:lgpl3+)))
2487 (define-public libdvbpsi
2494 "https://download.videolan.org/pub/libdvbpsi/"
2495 version "/libdvbpsi-" version ".tar.bz2"))
2498 "0824r08kaspbrrg2dd5d46s475zb7j59brqkm2y6x3mdsnpng0yn"))))
2499 (build-system gnu-build-system)
2500 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2501 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2503 (description "libdvbpsi is a simple library designed for decoding and
2504 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2505 and ITU-T H.222.0.")
2506 (license license:lgpl2.1)))
2508 (define-public ffms2
2512 (home-page "https://github.com/FFMS/ffms2")
2515 (uri (string-append home-page "/archive/" version ".tar.gz"))
2516 (file-name (string-append name "-" version ".tar.gz"))
2519 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2520 (build-system gnu-build-system)
2523 (list "--enable-avresample")))
2527 `(("ffmpeg" ,ffmpeg)))
2529 `(("pkg-config" ,pkg-config)))
2530 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2532 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2533 programmers to access a standard API to open and decompress media files.")
2534 ;; sources are distributed under a different license that the binary.
2535 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2536 (license license:gpl2+))); inherits from ffmpeg
2538 (define-public aegisub
2545 "http://ftp.aegisub.org/pub/archives/releases/source/"
2546 name "-" version ".tar.xz"))
2549 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2550 (build-system gnu-build-system)
2553 (list "--disable-update-checker"
2554 "--without-portaudio"
2557 ;; tests require busted, a lua package we don't have yet
2560 (modify-phases %standard-phases
2561 (add-before 'configure 'fix-ldflags
2563 (setenv "LDFLAGS" "-pthread"))))))
2566 ("desktop-file-utils" ,desktop-file-utils)
2569 ("hunspell" ,hunspell)
2572 ("alsa-lib" ,alsa-lib)
2573 ("pulseaudio" ,pulseaudio)
2575 ("freetype" ,freetype)
2576 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2578 `(("intltool" ,intltool)
2579 ("pkg-config" ,pkg-config)))
2580 (home-page "http://www.aegisub.org/")
2581 (synopsis "Subtitle engine")
2583 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2584 it quick and easy to time subtitles to audio, and features many powerful
2585 tools for styling them, including a built-in real-time video preview.")
2586 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2587 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2588 license:expat)))) ; and src/gl that is under a license similar
2589 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2590 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2591 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2593 (define-public gst-transcoder
2595 (name "gst-transcoder")
2600 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2601 "archive/" version ".tar.gz"))
2602 (file-name (string-append name "-" version ".tar.gz"))
2605 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2606 (build-system meson-build-system)
2608 `(("gobject-introspection" ,gobject-introspection)
2610 ("gstreamer" ,gstreamer)
2611 ("gst-plugins-base" ,gst-plugins-base)))
2613 `(("python" ,python)
2614 ("pkg-config" ,pkg-config)))
2615 (home-page "https://github.com/pitivi/gst-transcoder/")
2616 (synopsis "GStreamer Transcoding API")
2617 (description "GStreamer Transcoding API")
2618 (license license:lgpl2.1)))
2627 (uri (string-append "mirror://sourceforge/gmerlin/"
2628 name "/" version "/"
2629 name "-" version ".tar.gz"))
2630 (file-name (string-append name "-" version ".tar.gz"))
2633 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2634 (build-system gnu-build-system)
2636 '(#:configure-flags '("LIBS=-lm")))
2638 `(("pkg-config" ,pkg-config)
2639 ("doxygen" ,doxygen)))
2640 (home-page "http://gmerlin.sourceforge.net")
2641 (synopsis "Low level library for multimedia API building")
2643 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2644 library, upon which multimedia APIs can be built. Gavl handles all the
2645 details of audio and video formats like colorspaces, sample rates,
2646 multichannel configurations, etc. It provides standardized definitions for
2647 those formats as well as container structures for carrying audio samples or
2648 video images inside an application.
2650 In addition, it handles the sometimes ugly task of converting between all
2651 these formats and provides some elementary operations (copying, scaling,
2652 alpha blending etc).")
2653 (license license:gpl3)))
2655 (define-public frei0r-plugins
2657 (name "frei0r-plugins")
2662 (uri (string-append "https://files.dyne.org/frei0r/"
2663 "frei0r-plugins-" version ".tar.gz"))
2666 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2667 (build-system gnu-build-system)
2670 (modify-phases %standard-phases
2671 (add-after 'unpack 'autotools
2673 (zero? (system* "sh" "autogen.sh")))))))
2674 ;; TODO: opencv for additional face detection filters
2679 `(("pkg-config" ,pkg-config)
2680 ("libtool" ,libtool)
2681 ("automake" ,automake)
2682 ("autoconf" ,autoconf)))
2683 (home-page "https://www.dyne.org/software/frei0r/")
2684 (synopsis "Minimalistic plugin API for video effects")
2686 "Frei0r is a minimalistic plugin API for video effects.
2687 The main emphasis is on simplicity for an API that will round up
2688 the most common video effects into simple filters, sources and
2689 mixers that can be controlled by parameters. Frei0r wants to
2690 provide a way to share these simple effects between many
2691 applications, avoiding their reimplementation by different projects.
2692 It counts more than 100 plugins.")
2693 (license (list license:gpl2+
2694 ;; The following files are licensed as LGPL2.1+:
2695 ;; src/generator/ising0r/ising0r.c
2696 ;; src/generator/onecol0r/onecol0r.cpp
2697 ;; src/generator/nois0r/nois0r.cpp
2698 ;; src/generator/lissajous0r/lissajous0r.cpp
2699 ;; src/filter/ndvi/gradientlut.hpp
2700 ;; src/filter/ndvi/ndvi.cpp
2701 ;; src/filter/facedetect/facedetect.cpp
2702 license:lgpl2.1+))))
2704 (define-public motion
2708 (home-page "https://motion-project.github.io/")
2712 "https://github.com/Motion-Project/motion/archive/"
2713 "release-" version ".tar.gz"))
2716 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2717 (file-name (string-append name "-" version ".tar.gz"))))
2718 (build-system gnu-build-system)
2720 `(("autoconf" ,(autoconf-wrapper))
2721 ("automake" ,automake)
2722 ("pkg-config" ,pkg-config)))
2724 `(("libjpeg" ,libjpeg)
2726 ("sqlite" ,sqlite)))
2728 '(#:phases (modify-phases %standard-phases
2729 (add-after 'unpack 'bootstrap
2731 (patch-shebang "version.sh")
2732 (invoke "autoreconf" "-vfi"))))
2733 #:configure-flags '("--sysconfdir=/etc")
2734 #:make-flags (list (string-append "sysconfdir="
2735 (assoc-ref %outputs "out")
2738 #:tests? #f)) ;no 'check' target
2739 (synopsis "Detect motion from video signals")
2741 "Motion is a program that monitors the video signal from one or more
2742 cameras and is able to detect if a significant part of the picture has
2743 changed. Or in other words, it can detect motion.")
2745 ;; Some files say "version 2" and others "version 2 or later".
2746 (license license:gpl2)))