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 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>
26 ;;; This file is part of GNU Guix.
28 ;;; GNU Guix is free software; you can redistribute it and/or modify it
29 ;;; under the terms of the GNU General Public License as published by
30 ;;; the Free Software Foundation; either version 3 of the License, or (at
31 ;;; your option) any later version.
33 ;;; GNU Guix is distributed in the hope that it will be useful, but
34 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
35 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 ;;; GNU General Public License for more details.
38 ;;; You should have received a copy of the GNU General Public License
39 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41 (define-module (gnu packages video)
42 #:use-module (ice-9 match)
43 #:use-module (srfi srfi-1)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix utils)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix svn-download)
50 #:use-module (guix build-system cmake)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system glib-or-gtk)
53 #:use-module (guix build-system meson)
54 #:use-module (guix build-system python)
55 #:use-module (guix build-system waf)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages algebra)
58 #:use-module (gnu packages audio)
59 #:use-module (gnu packages autotools)
60 #:use-module (gnu packages avahi)
61 #:use-module (gnu packages base)
62 #:use-module (gnu packages bison)
63 #:use-module (gnu packages boost)
64 #:use-module (gnu packages cdrom)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages cmake)
67 #:use-module (gnu packages compression)
68 #:use-module (gnu packages cpp)
69 #:use-module (gnu packages curl)
70 #:use-module (gnu packages databases)
71 #:use-module (gnu packages dejagnu)
72 #:use-module (gnu packages docbook)
73 #:use-module (gnu packages documentation)
74 #:use-module (gnu packages elf)
75 #:use-module (gnu packages file)
76 #:use-module (gnu packages flex)
77 #:use-module (gnu packages fontutils)
78 #:use-module (gnu packages freedesktop)
79 #:use-module (gnu packages fribidi)
80 #:use-module (gnu packages gettext)
81 #:use-module (gnu packages ghostscript)
82 #:use-module (gnu packages gl)
83 #:use-module (gnu packages glib)
84 #:use-module (gnu packages guile)
85 #:use-module (gnu packages gnome)
86 #:use-module (gnu packages gnupg)
87 #:use-module (gnu packages gstreamer)
88 #:use-module (gnu packages gtk)
89 #:use-module (gnu packages image)
90 #:use-module (gnu packages imagemagick)
91 #:use-module (gnu packages libreoffice)
92 #:use-module (gnu packages linux)
93 #:use-module (gnu packages lua)
94 #:use-module (gnu packages m4)
95 #:use-module (gnu packages man)
96 #:use-module (gnu packages mp3)
97 #:use-module (gnu packages ncurses)
98 #:use-module (gnu packages ocr)
99 #:use-module (gnu packages perl)
100 #:use-module (gnu packages pkg-config)
101 #:use-module (gnu packages popt)
102 #:use-module (gnu packages pulseaudio)
103 #:use-module (gnu packages python)
104 #:use-module (gnu packages python-web)
105 #:use-module (gnu packages qt)
106 #:use-module (gnu packages ruby)
107 #:use-module (gnu packages sdl)
108 #:use-module (gnu packages serialization)
109 #:use-module (gnu packages shells)
110 #:use-module (gnu packages ssh)
111 #:use-module (gnu packages texinfo)
112 #:use-module (gnu packages textutils)
113 #:use-module (gnu packages tls)
114 #:use-module (gnu packages version-control)
115 #:use-module (gnu packages web)
116 #:use-module (gnu packages webkit)
117 #:use-module (gnu packages wxwidgets)
118 #:use-module (gnu packages xdisorg)
119 #:use-module (gnu packages xiph)
120 #:use-module (gnu packages xml)
121 #:use-module (gnu packages xorg)
122 #:use-module (gnu packages assembly))
130 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
131 version "/" name "-" version ".tar.gz"))
134 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
135 (build-system gnu-build-system)
137 `(("makeinfo" ,texinfo)))
139 `(("ncurses" ,ncurses)))
142 (modify-phases %standard-phases
144 (lambda* (#:key build inputs outputs #:allow-other-keys)
145 ;; This old `configure' script doesn't support
146 ;; variables passed as arguments.
147 (let ((out (assoc-ref outputs "out"))
148 (ncurses (assoc-ref inputs "ncurses")))
149 (setenv "CONFIG_SHELL" (which "bash"))
150 (zero? (system* "./configure"
151 (string-append "--prefix=" out)
152 (string-append "--build=" build)
153 ;; The ancient config.guess is unable to
154 ;; guess the host triplet on mips64el.
155 ,@(if (string=? "mips64el-linux"
157 '("--host=mips64el-unknown-linux-gnu")
159 ;; The same is also true with aarch64.
160 ,@(if (string=? "aarch64-linux"
162 '("--host=aarch64-unknown-linux-gnu")
164 (string-append "--with-ncurses="
166 (home-page "http://aa-project.sourceforge.net/aalib/")
167 (synopsis "ASCII-art library")
169 "AA-lib is a low level gfx library which does not require graphics device.
170 In fact, there is no graphical output possible. AA-lib replaces those
171 old-fashioned output methods with powerful ascii-art renderer.")
172 (license license:lgpl2.0+)))
174 (define-public liba52
181 ;; A mirror://sourceforge URI doesn't work, presumably
182 ;; because the SourceForge project is misconfigured.
183 "http://liba52.sourceforge.net/files/a52dec-" version
187 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
188 (patches (search-patches "liba52-enable-pic.patch"
189 "liba52-set-soname.patch"
190 "liba52-use-mtune-not-mcpu.patch"
191 "liba52-link-with-libm.patch"))))
192 (build-system gnu-build-system)
193 ;; XXX We need to run ./bootstrap because of the build system fixes above.
195 `(("autoconf" ,autoconf)
196 ("automake" ,automake)
197 ("libtool" ,libtool)))
198 (arguments `(#:configure-flags '("--enable-shared")
200 (modify-phases %standard-phases
201 ;; XXX We need to run ./bootstrap because of the build
202 ;; system fixes above.
205 (lambda _ (zero? (system* "sh" "bootstrap")))))))
206 (home-page "http://liba52.sourceforge.net/")
207 (synopsis "ATSC A/52 stream decoder")
208 (description "liba52 is a library for decoding ATSC A/52 streams. The
209 A/52 standard is used in a variety of applications, including digital
210 television and DVD. It is also known as AC-3.")
211 (license license:gpl2+)))
213 (define-public libmpeg2
219 ;; A mirror://sourceforge URI doesn't work, presumably
220 ;; because the SourceForge project is misconfigured.
221 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
222 name "-" version ".tar.gz"))
225 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
233 (build-system gnu-build-system)
234 (home-page "http://libmpeg2.sourceforge.net/")
235 (synopsis "MPEG1 and MPEG2 video decoder library")
237 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
238 (license license:gpl2+)))
240 (define-public libx264
243 (version "20170316-2245")
246 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
247 "x264-snapshot-" version ".tar.bz2"))
250 "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
251 (build-system gnu-build-system)
253 `(("pkg-config" ,pkg-config)
255 ;; TODO: Add gpac input
257 `(#:tests? #f ;no check target
258 #:configure-flags '("--enable-shared"
259 ;; Don't build the command-line program. If we
260 ;; want it later, we should do so in a different
261 ;; package to avoid a circular dependency (the x264
262 ;; program depends on ffmpeg and ffmpeg depends on
266 ;; On MIPS, we must pass "--disable-asm" or else
267 ;; configure fails after printing: "You specified a
268 ;; pre-MSA CPU in your CFLAGS. If you really want
269 ;; to run on such a CPU, configure with
271 ,@(if (string-prefix? "mips"
272 (or (%current-target-system)
276 (home-page "https://www.videolan.org/developers/x264.html")
277 (synopsis "H.264 video coding library")
278 (description "libx264 is an advanced encoding library for creating
279 H.264 (MPEG-4 AVC) video streams.")
280 (license (list license:gpl2+ ;most files
281 license:isc ;common/x86/x86inc.asm
282 license:lgpl2.1+ ;extras/getopt.c
283 license:bsd-3 ;extras/inttypes.h
284 (license:non-copyleft ;extras/cl*.h
286 "See extras/cl.h in the distribution.")))))
288 (define-public mkvtoolnix
295 (uri (string-append "https://mkvtoolnix.download/sources/"
296 name "-" version ".tar.xz"))
299 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
300 (modules '((guix build utils)))
303 ;; Delete bundled libraries.
304 (for-each delete-file-recursively
310 (build-system gnu-build-system)
317 ("libmatroska" ,libmatroska)
319 ("libvorbis" ,libvorbis)
326 `(("docbook-xsl" ,docbook-xsl)
327 ("gettext" ,gettext-minimal)
328 ("googletest" ,googletest)
330 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
332 ("pkg-config" ,pkg-config)
337 (list (string-append "--with-boost="
338 (assoc-ref %build-inputs "boost"))
339 (string-append "--with-docbook-xsl-root="
340 (assoc-ref %build-inputs "docbook-xsl")
341 "/xml/xsl/docbook-xsl-"
342 ,(package-version docbook-xsl))
343 (string-append "--with-extra-includes="
344 (assoc-ref %build-inputs "nlohmann-json-cpp")
345 "/include/nlohmann"))
347 (modify-phases %standard-phases
348 (add-before 'configure 'add-googletest
351 (string-append (assoc-ref %build-inputs "googletest")
352 "/include/gtest") "lib/gtest")
356 (let ((-j (list "-j" (number->string (parallel-job-count)))))
357 (zero? (apply system* "rake" -j)))))
360 (zero? (system* "rake" "tests/unit"))))
363 (zero? (system* "rake" "install")))))))
364 (home-page "https://mkvtoolnix.download")
365 (synopsis "Tools to create, alter and inspect Matroska files")
367 "MKVToolNix provides tools for getting information about Matroska files
368 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
369 and creating Matroska files from other media files (@code{mkvmerge}).")
370 (license license:gpl2)))
379 (uri (string-append "https://download.videolan.org/videolan/x265/"
380 "x265_" version ".tar.gz"))
383 "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
384 (modules '((guix build utils)))
386 '(delete-file-recursively "source/compat/getopt"))))
387 (build-system cmake-build-system)
389 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
390 ;; Currently the source code doesn't check for aarch64
391 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
392 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
395 (modify-phases %standard-phases
396 (add-before 'configure 'prepare-build
398 (delete-file-recursively "build")
401 (home-page "http://x265.org/")
402 (synopsis "Library for encoding h.265/HEVC video streams")
403 (description "x265 is a H.265 / HEVC video encoder application library,
404 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
405 (license license:gpl2+)))
407 (define-public libass
414 "https://github.com/libass/libass/releases/download/"
415 version "/libass-" version ".tar.xz"))
418 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
419 (build-system gnu-build-system)
421 `(("pkg-config" ,pkg-config)
424 `(("freetype" ,freetype)
426 ("fontconfig" ,fontconfig)
427 ("harfbuzz" ,harfbuzz)
429 (home-page "https://github.com/libass/libass")
430 (synopsis "Subtitle rendering library for the ASS/SSA format")
431 (description "libass is a subtitle rendering library for the
432 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
433 (license license:isc)))
435 (define-public libcaca
438 (version "0.99.beta19")
441 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
445 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
446 (build-system gnu-build-system)
447 (native-inputs `(("pkg-config" ,pkg-config)))
449 `(("freeglut" ,freeglut)
456 (home-page "http://caca.zoy.org/wiki/libcaca")
457 (synopsis "Colour ASCII-art library")
458 (description "libcaca is a graphics library that outputs text instead of
459 pixels, so that it can work on older video cards or text terminals. It
460 supports Unicode, 2048 colors, dithering of color images, and advanced text
462 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
464 (define-public libdca
471 "https://download.videolan.org/pub/videolan/libdca/"
472 version "/libdca-" version ".tar.bz2"))
475 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
476 (build-system gnu-build-system)
477 (home-page "https://www.videolan.org/developers/libdca.html")
478 (synopsis "DTS Coherent Acoustics decoder")
479 (description "libdca is a library for decoding DTS Coherent Acoustics
481 (license license:gpl2+)))
490 "mirror://sourceforge/" name "/" name "/"
491 version "/" name "-" version ".tar.gz"))
494 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
495 (build-system gnu-build-system)
496 (native-inputs `(("pkg-config" ,pkg-config)))
497 (inputs `(("libxv" ,libxv)))
498 (home-page "http://libdv.sourceforge.net/")
499 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
500 (description "The Quasar DV codec (libdv) is a software codec for DV
501 video, the encoding format used by most digital camcorders, typically those
502 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
503 developed according to the official standards for DV video: IEC 61834 and
505 (license license:lgpl2.1+)))
507 (define-public libmatroska
514 (uri (string-append "https://dl.matroska.org/downloads/"
515 name "/" name "-" version ".tar.bz2"))
518 "1yi5cnv13nhl27xyqayd5l3sf0j3swfj3apzibv71yg9pariwi26"))))
519 (build-system gnu-build-system)
521 `(("pkg-config" ,pkg-config)))
523 `(("libebml" ,libebml)))
524 (home-page "https://www.matroska.org")
525 (synopsis "C++ libary to parse Matroska files (.mkv and .mka)")
527 "Matroska aims to become the standard of multimedia container formats.
528 It is based on EBML (Extensible Binary Meta Language), a binary derivative
529 of XML. EBML enables the Matroska Development Team to gain significant
530 advantages in terms of future format extensibility, without breaking file
531 support in old parsers.
532 libebml is a C++ library to read and write EBML files.")
533 (license license:lgpl2.1)))
543 ;; Newer releases are only available on GitHub.
544 (string-append "https://github.com/01org/libva/releases/download/"
545 version "/libva-" version ".tar.bz2")
546 ;; Keep the old URL around for compatibility.
547 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
548 "libva/libva-" version "/libva-" version ".tar.bz2")))
550 (base32 "16xbk0awl7wp0vy0nyjvxk11spbw25mp8kwd9bmhd6x9xffi5vjn"))))
551 (build-system gnu-build-system)
553 `(("pkg-config" ,pkg-config)))
558 ("libxfixes" ,libxfixes)
562 (modify-phases %standard-phases
564 'build 'fix-dlopen-paths
565 (lambda* (#:key outputs #:allow-other-keys)
566 (let ((out (assoc-ref outputs "out")))
567 (substitute* "va/drm/va_drm_auth_x11.c"
568 (("\"libva-x11\\.so\\.%d\"")
569 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
570 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
571 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
573 (list (string-append "--with-drivers-path="
574 (assoc-ref %build-inputs "mesa") "/lib/dri"))
575 ;; However, we can't write to mesa's store directory, so override the
576 ;; following make variable to install the dummy driver to libva's
577 ;; $prefix/lib/dri directory.
579 (list (string-append "dummy_drv_video_ladir="
580 (assoc-ref %outputs "out") "/lib/dri"))))
581 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
582 (synopsis "Video acceleration library")
583 (description "The main motivation for VA-API (Video Acceleration API) is
584 to enable hardware accelerated video decode/encode at various
585 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
586 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
587 (license license:expat)))
589 (define-public ffmpeg
595 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
599 "1vzvpx8ixy8m44f8qwp833hv253hpghybgzbc4n8b3div3j0dvmf"))))
600 (build-system gnu-build-system)
602 `(("fontconfig" ,fontconfig)
603 ("freetype" ,freetype)
604 ("frei0r-plugins" ,frei0r-plugins)
610 ("libbluray" ,libbluray)
612 ("libcdio-paranoia" ,libcdio-paranoia)
613 ("libtheora" ,libtheora)
615 ("libvdpau" ,libvdpau)
616 ("libvorbis" ,libvorbis)
622 ("pulseaudio" ,pulseaudio)
633 ("pkg-config" ,pkg-config)
635 ("python" ,python-2) ; scripts use interpreter python2
639 `(#:test-target "fate"
641 ;; possible additional inputs:
642 ;; --enable-avisynth enable reading of AviSynth script
644 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
645 ;; --enable-libcelt enable CELT decoding via libcelt [no]
646 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
647 ;; and libraw1394 [no]
648 ;; --enable-libfaac enable AAC encoding via libfaac [no]
649 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
650 ;; --enable-libflite enable flite (voice synthesis) support via
652 ;; --enable-libgme enable Game Music Emu via libgme [no]
653 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
654 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
655 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
656 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
657 ;; --enable-libnut enable NUT (de)muxing via libnut,
658 ;; native (de)muxer exists [no]
659 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
660 ;; libopencore-amrnb [no]
661 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
662 ;; libopencore-amrwb [no]
663 ;; --enable-libopencv enable video filtering via libopencv [no]
664 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
666 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
667 ;; --enable-libschroedinger enable Dirac de/encoding via
668 ;; libschroedinger [no]
669 ;; --enable-libshine enable fixed-point MP3 encoding via
671 ;; --enable-libssh enable SFTP protocol via libssh [no]
672 ;; (libssh2 does not work)
673 ;; --enable-libstagefright-h264 enable H.264 decoding via
674 ;; libstagefright [no]
675 ;; --enable-libutvideo enable Ut Video encoding and decoding via
677 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
678 ;; --enable-libvidstab enable video stabilization using
680 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
681 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
682 ;; libvo-amrwbenc [no]
683 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
684 ;; --enable-libxavs enable AVS encoding via xavs [no]
685 ;; --enable-libzmq enable message passing via libzmq [no]
686 ;; --enable-libzvbi enable teletext support via libzvbi [no]
687 ;; --enable-opencl enable OpenCL code
688 '("--enable-avresample"
689 "--enable-gpl" ; enable optional gpl licensed parts
692 "--enable-fontconfig"
699 "--enable-libfreetype"
700 "--enable-libmp3lame"
706 "--enable-libtwolame"
715 "--enable-runtime-cpudetect"
717 ;; The HTML pages take 7.2 MiB
718 "--disable-htmlpages"
720 ;; The static libraries are 23 MiB
723 ;; Runtime cpu detection is not implemented on
724 ;; MIPS, so we disable some features.
727 "--disable-mipsdspr2"
730 (modify-phases %standard-phases
733 ;; configure does not work followed by "SHELL=..." and
734 ;; "CONFIG_SHELL=..."; set environment variables instead
735 (lambda* (#:key outputs configure-flags #:allow-other-keys)
736 (let ((out (assoc-ref outputs "out")))
737 (substitute* "configure"
738 (("#! /bin/sh") (string-append "#!" (which "sh"))))
739 (setenv "SHELL" (which "bash"))
740 (setenv "CONFIG_SHELL" (which "bash"))
741 (zero? (apply system*
743 (string-append "--prefix=" out)
744 ;; Add $libdir to the RUNPATH of all the binaries.
745 (string-append "--extra-ldflags=-Wl,-rpath="
749 'check 'set-ld-library-path
751 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
753 (let* ((dso (find-files "." "\\.so$"))
754 (path (string-join (map dirname dso) ":")))
755 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
756 (setenv "LD_LIBRARY_PATH" path)
758 (home-page "https://www.ffmpeg.org/")
759 (synopsis "Audio and video framework")
760 (description "FFmpeg is a complete, cross-platform solution to record,
761 convert and stream audio and video. It includes the libavcodec
762 audio/video codec library.")
763 (license license:gpl2+)))
765 ;; XXX: Remove this when gst-libav and qtox supports 3.4.
766 (define-public ffmpeg-3.3
772 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
776 "00nq8ng2p16yb48acargaz1hlp9kq24vfwvkqjlslz4a7864k4x8"))))))
778 (define-public ffmpeg-2.8
784 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
788 "0hyqr391pika4vgynv90bacz11wdpqcqfgj5h7g5jrmgvz6hgj68"))))
790 (substitute-keyword-arguments (package-arguments ffmpeg)
791 ((#:configure-flags flags)
793 (if (string=? flag "--disable-mipsdsp")
794 "--disable-mipsdspr1"
805 "https://download.videolan.org/pub/videolan/vlc/"
806 version "/vlc-" version ".tar.xz"))
809 "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4"))))
810 (build-system gnu-build-system)
812 `(("git" ,git) ; needed for a test
813 ("pkg-config" ,pkg-config)))
814 ;; FIXME: Add optional inputs once available.
816 `(("alsa-lib" ,alsa-lib)
820 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
821 ("fontconfig" ,fontconfig)
822 ("freetype" ,freetype)
826 ("libdvbpsi" ,libdvbpsi)
827 ("libgcrypt" ,libgcrypt)
832 ("libsamplerate" ,libsamplerate)
834 ("libvorbis" ,libvorbis)
835 ("libtheora" ,libtheora)
838 ("libxinerama" ,libxinerama)
841 ("livemedia-utils" ,livemedia-utils)
846 ("pulseaudio" ,pulseaudio)
847 ("python" ,python-wrapper)
849 ("qtx11extras" ,qtx11extras)
851 ("sdl-image" ,sdl-image)
854 ("xcb-util-keysyms" ,xcb-util-keysyms)))
857 `("CXXFLAGS=-std=gnu++11"
858 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
859 (assoc-ref %build-inputs "ffmpeg")
860 "/lib")) ;needed for the tests
863 (modify-phases %standard-phases
864 (add-after 'unpack 'patch-source
865 (lambda* (#:key inputs #:allow-other-keys)
866 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
867 (substitute* "configure"
868 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
869 (string-append "LIVE555_PREFIX=" livemedia-utils)))
870 ;; Some of the tests require using the display to test out VLC,
871 ;; which fails in our sandboxed build system
872 (substitute* "test/run_vlc.sh"
873 (("./vlc --ignore-config") "echo"))
874 ;; XXX Likely not needed for >2.2.6.
875 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
876 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
878 (add-after 'install 'regenerate-plugin-cache
879 (lambda* (#:key outputs #:allow-other-keys)
880 ;; The 'install-exec-hook' rule in the top-level Makefile.am
881 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
882 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
883 ;; it references. Thus, we first reset the timestamps of all
884 ;; these files, and then regenerate the cache such that the
885 ;; mtimes it includes are always zero instead of being dependent
886 ;; on the build time.
887 (let* ((out (assoc-ref outputs "out"))
888 (pkglibdir (string-append out "/lib/vlc"))
889 (plugindir (string-append pkglibdir "/plugins"))
890 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
891 ;; TODO: Factorize 'reset-timestamps'.
892 (for-each (lambda (file)
893 (let ((s (lstat file)))
894 (unless (eq? (stat:type s) 'symlink)
895 (utime file 0 0 0 0))))
896 (find-files plugindir))
897 (zero? (system* cachegen plugindir))))))))
898 (home-page "https://www.videolan.org/")
899 (synopsis "Audio and video framework")
900 (description "VLC is a cross-platform multimedia player and framework
901 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
902 treaming protocols.")
903 (license license:gpl2+)))
905 (define-public mplayer
912 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
916 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
917 (build-system gnu-build-system)
918 ;; FIXME: Add additional inputs once available.
920 `(("pkg-config" ,pkg-config)))
922 `(("alsa-lib" ,alsa-lib)
923 ("cdparanoia" ,cdparanoia)
925 ("fontconfig" ,fontconfig)
926 ("freetype" ,freetype)
927 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
930 ("libdvdcss" ,libdvdcss)
931 ("libdvdnav" ,libdvdnav)
933 ("libmpeg2" ,libmpeg2)
934 ("libmpg123" ,mpg123) ; audio codec for MP3
936 ("libtheora" ,libtheora)
937 ("libvdpau" ,libvdpau)
938 ("libvorbis" ,libvorbis)
941 ("libxinerama" ,libxinerama)
943 ("libxxf86dga" ,libxxf86dga)
947 ("pulseaudio" ,pulseaudio)
948 ("python" ,python-wrapper)
954 `(#:tests? #f ; no test target
956 (modify-phases %standard-phases
958 ;; configure does not work followed by "SHELL=..." and
959 ;; "CONFIG_SHELL=..."; set environment variables instead
960 (lambda* (#:key inputs outputs #:allow-other-keys)
961 (let ((out (assoc-ref outputs "out"))
962 (libx11 (assoc-ref inputs "libx11")))
963 (substitute* "configure"
964 (("#! /bin/sh") (string-append "#!" (which "sh"))))
965 (setenv "SHELL" (which "bash"))
966 (setenv "CONFIG_SHELL" (which "bash"))
969 (string-append "--extra-cflags=-I"
970 libx11 "/include") ; to detect libx11
971 "--disable-ffmpeg_a" ; disables bundled ffmpeg
972 (string-append "--prefix=" out)
973 ;; Enable runtime cpu detection where supported,
974 ;; and choose a suitable target.
975 ,@(match (or (%current-target-system)
978 '("--enable-runtime-cpudetection"
979 "--target=x86_64-linux"))
981 '("--enable-runtime-cpudetection"
982 "--target=i686-linux"))
984 '("--target=mips3-linux"))
985 (_ (list (string-append
987 (or (%current-target-system)
988 (nix-system->gnu-triplet
989 (%current-system)))))))
990 "--disable-iwmmxt"))))))))
991 (home-page "https://www.mplayerhq.hu/design7/news.html")
992 (synopsis "Audio and video player")
993 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
994 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
995 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
996 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
997 (license license:gpl2)))
1006 "https://github.com/mpv-player/mpv/archive/v" version
1010 "1754371fkva8aqxgbm50jxyvij7mnysq0538bf6zghbmigqqn79l"))
1011 (file-name (string-append name "-" version ".tar.gz"))))
1012 (build-system waf-build-system)
1014 `(("perl" ,perl) ; for zsh completion file
1015 ("pkg-config" ,pkg-config)
1016 ("python-docutils" ,python-docutils)))
1017 ;; Missing features: libguess, V4L2
1019 `(("alsa-lib" ,alsa-lib)
1026 ("libbluray" ,libbluray)
1027 ("libcaca" ,libcaca)
1028 ("libbs2b" ,libbs2b)
1029 ("libcdio-paranoia" ,libcdio-paranoia)
1030 ("libdvdread" ,libdvdread)
1031 ("libdvdnav" ,libdvdnav)
1032 ("libjpeg" ,libjpeg)
1034 ("libvdpau" ,libvdpau)
1036 ("libxext" ,libxext)
1037 ("libxinerama" ,libxinerama)
1038 ("libxrandr" ,libxrandr)
1039 ("libxscrnsaver" ,libxscrnsaver)
1041 ;; XXX: lua > 5.2 is not currently supported; see
1042 ;; waftools/checks/custom.py
1046 ("pulseaudio" ,pulseaudio)
1049 ("wayland" ,wayland)
1050 ("libxkbcommon", libxkbcommon)
1051 ("youtube-dl" ,youtube-dl)
1055 (modify-phases %standard-phases
1057 'configure 'setup-waf
1058 (lambda* (#:key inputs #:allow-other-keys)
1059 (copy-file (assoc-ref inputs "waf") "waf")
1060 (setenv "CC" "gcc"))))
1061 #:configure-flags (list "--enable-libmpv-shared"
1066 "--disable-build-date")
1067 ;; No check function defined.
1069 (home-page "https://mpv.io/")
1070 (synopsis "Audio and video player")
1071 (description "mpv is a general-purpose audio and video player. It is a
1072 fork of mplayer2 and MPlayer. It shares some features with the former
1073 projects while introducing many more.")
1074 (license license:gpl2+)))
1076 (define-public gnome-mpv
1083 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1084 "/download/v" version "/gnome-mpv-" version
1088 "1w944ymyssgfcjiczrq4saig90crw9b9hhdsnchfbjsw173qi8n5"))))
1090 `(("intltool" ,intltool)
1091 ("pkg-config" ,pkg-config)))
1094 ("libepoxy" ,libepoxy)
1096 (build-system glib-or-gtk-build-system)
1097 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1098 (synopsis "GTK+ frontend for the mpv media player")
1099 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1100 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1101 access to mpv's powerful playback capabilities.")
1102 (license license:gpl3+)))
1104 (define-public libvpx
1110 (uri (string-append "http://storage.googleapis.com/"
1111 "downloads.webmproject.org/releases/webm/"
1112 name "-" version ".tar.bz2"))
1115 "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
1116 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1117 (build-system gnu-build-system)
1120 (modify-phases %standard-phases
1122 (lambda* (#:key outputs #:allow-other-keys)
1123 (setenv "CONFIG_SHELL" (which "bash"))
1124 (let ((out (assoc-ref outputs "out")))
1126 (string-append "-Wl,-rpath=" out "/lib"))
1127 (zero? (system* "./configure"
1130 ;; Limit size to avoid CVE-2015-1258
1131 "--size-limit=16384x16384"
1132 (string-append "--prefix=" out)))))))
1133 #:tests? #f)) ; no check target
1137 (synopsis "VP8/VP9 video codec")
1138 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1139 (license license:bsd-3)
1140 (home-page "http://www.webmproject.org/")))
1142 (define-public youtube-dl
1145 (version "2017.11.15")
1148 (uri (string-append "https://yt-dl.org/downloads/"
1149 version "/youtube-dl-"
1153 "1s0c0jnil4rnymj2nzjjv75p4lmk4h67kvxvjv2azknhmax7gcc8"))))
1154 (build-system python-build-system)
1156 ;; The problem here is that the directory for the man page and completion
1157 ;; files is relative, and for some reason, setup.py uses the
1158 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1159 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1160 ;; completion file is called 'youtube-dl' rather than
1161 ;; 'youtube-dl.bash-completion'.
1162 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1163 #:phases (modify-phases %standard-phases
1164 (add-before 'install 'fix-the-data-directories
1165 (lambda* (#:key outputs #:allow-other-keys)
1166 (let ((prefix (assoc-ref outputs "out")))
1167 (mkdir "bash-completion")
1168 (rename-file "youtube-dl.bash-completion"
1169 "bash-completion/youtube-dl")
1170 (substitute* "setup.py"
1171 (("youtube-dl\\.bash-completion")
1172 "bash-completion/youtube-dl")
1174 (string-append "'" prefix "/etc/"))
1176 (string-append "'" prefix "/share/")))))))))
1177 (synopsis "Download videos from YouTube.com and other sites")
1179 "Youtube-dl is a small command-line program to download videos from
1180 YouTube.com and a few more sites.")
1181 (home-page "https://yt-dl.org")
1182 (license license:public-domain)))
1184 (define-public youtube-dl-gui
1186 (name "youtube-dl-gui")
1191 (uri (pypi-uri "Youtube-DLG" version))
1194 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1195 (build-system python-build-system)
1197 ;; In Guix, wxpython has not yet been packaged for Python 3.
1198 `(#:python ,python-2
1199 ;; This package has no tests.
1202 (modify-phases %standard-phases
1203 (add-before 'build 'patch-source
1204 (lambda* (#:key inputs #:allow-other-keys)
1205 ;; The youtube-dl-gui program lets you configure options. Some of
1206 ;; them are problematic, so we change their defaults.
1207 (substitute* "youtube_dl_gui/optionsmanager.py"
1208 ;; When this is true, the builder process will try (and fail) to
1209 ;; write logs to the builder user's home directory.
1210 (("'enable_log': True") "'enable_log': False")
1211 ;; This determines which youtube-dl program youtube-dl-gui will
1212 ;; run. If we don't set this, then youtube-dl-gui might download
1213 ;; an arbitrary copy from the Internet into the user's home
1214 ;; directory and run it, so let's make sure youtube-dl-gui uses
1215 ;; the youtube-dl from the inputs by default.
1216 (("'youtubedl_path': self.config_path")
1217 (string-append "'youtubedl_path': '"
1218 (assoc-ref inputs "youtube-dl")
1220 ;; When this is True, when youtube-dl-gui is finished downloading
1221 ;; a file, it will try (and possibly fail) to open the directory
1222 ;; containing the downloaded file. This can fail because it
1223 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1224 ;; adding xdg-utils to the propagated inputs is not enough to
1225 ;; make this work, so for now we set the default to False.
1226 (("'open_dl_dir': True") "'open_dl_dir': False"))
1227 ;; The youtube-dl program from the inputs is actually a wrapper
1228 ;; script written in bash, so attempting to invoke it as a python
1229 ;; script will fail.
1230 (substitute* "youtube_dl_gui/downloaders.py"
1231 (("cmd = \\['python', self\\.youtubedl_path\\]")
1232 "cmd = [self.youtubedl_path]"))
1233 ;; Use relative paths for installing data files so youtube-dl-gui
1234 ;; installs the files relative to its prefix in the store, rather
1235 ;; than relative to /. Also, instead of installing data files into
1236 ;; $prefix/usr/share, install them into $prefix/share for
1237 ;; consistency (see: (standards) Directory Variables).
1238 (substitute* "setup.py"
1239 (("= '/usr/share") "= 'share"))
1240 ;; Update get_locale_file() so it finds the installed localization
1242 (substitute* "youtube_dl_gui/utils.py"
1243 (("os\\.path\\.join\\('/usr', 'share'")
1244 (string-append "os.path.join('"
1245 (assoc-ref %outputs "out")
1246 "', 'share'"))))))))
1248 `(("python2-wxpython" ,python2-wxpython)
1249 ("youtube-dl" ,youtube-dl)))
1250 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1252 "GUI (Graphical User Interface) for @command{youtube-dl}")
1254 "Youtube-dlG is a GUI (Graphical User Interface) for
1255 @command{youtube-dl}. You can use it to download videos from YouTube and any
1256 other site that youtube-dl supports.")
1257 (license license:unlicense)))
1259 (define-public you-get
1266 "https://github.com/soimort/you-get/archive/v"
1268 (file-name (string-append name "-" version ".tar.gz"))
1271 "1amkdfnjn2j4k7jlr7qw9mg5whd7dy6z1flh5cd0n9v3d4m7k0c5"))))
1272 (build-system python-build-system)
1277 `(("ffmpeg" ,ffmpeg)))
1278 (synopsis "Download videos, audios, or images from Web sites")
1280 "You-Get is a command-line utility to download media contents (videos,
1281 audio, images) from the Web. It can use either mpv or vlc for playback.")
1282 (home-page "https://you-get.org/")
1283 (license license:expat)))
1285 (define-public libbluray
1291 (uri (string-append "https://download.videolan.org/videolan/"
1292 name "/" version "/"
1293 name "-" version ".tar.bz2"))
1296 "0fl5cxfj870rwqmmz3s04wh7wnabb7rnynfj1v3sz37ln8frm7qg"))))
1297 (build-system gnu-build-system)
1299 `(#:configure-flags '("--disable-bdjava-jar")
1301 (modify-phases %standard-phases
1302 (add-before 'build 'fix-dlopen-paths
1303 (lambda* (#:key inputs #:allow-other-keys)
1304 (let ((libaacs (assoc-ref inputs "libaacs"))
1305 (libbdplus (assoc-ref inputs "libbdplus")))
1306 (substitute* "src/libbluray/disc/aacs.c"
1308 (string-append "\"" libaacs "/lib/libaacs\"")))
1309 (substitute* "src/libbluray/disc/bdplus.c"
1311 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1313 (native-inputs `(("pkg-config" ,pkg-config)))
1315 `(("fontconfig" ,fontconfig)
1316 ("freetype" ,freetype)
1317 ("libaacs" ,libaacs)
1318 ("libbdplus" ,libbdplus)
1319 ("libxml2" ,libxml2)))
1320 (home-page "https://www.videolan.org/developers/libbluray.html")
1321 (synopsis "Blu-Ray Disc playback library")
1323 "libbluray is a library designed for Blu-Ray Disc playback for media
1324 players, like VLC or MPlayer.")
1325 (license license:lgpl2.1+)))
1327 (define-public libdvdread
1333 (uri (string-append "https://download.videolan.org/videolan/"
1334 name "/" version "/"
1335 name "-" version ".tar.bz2"))
1338 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1339 (build-system gnu-build-system)
1340 (home-page "http://dvdnav.mplayerhq.hu/")
1341 (synopsis "Library for reading video DVDs")
1343 "Libdvdread provides a simple foundation for reading DVD video
1344 disks. It provides the functionality that is required to access many
1345 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1346 authentication and descrambling (if an external libdvdcss library is
1348 (license license:gpl2+)))
1350 (define-public dvdauthor
1357 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1361 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1362 (build-system gnu-build-system)
1364 `(("libdvdread" ,libdvdread)
1366 ("imagemagick" ,imagemagick)
1367 ("libxml2" ,libxml2)
1368 ("freetype" ,freetype)))
1370 `(("pkg-config" ,pkg-config)))
1371 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1372 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1373 MPEG-2 stream containing VOB packets.")
1374 (home-page "http://dvdauthor.sourceforge.net")
1375 (license license:gpl3+)))
1377 (define-public libdvdnav
1383 (uri (string-append "https://download.videolan.org/videolan/"
1384 name "/" version "/"
1385 name "-" version ".tar.bz2"))
1388 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1389 (build-system gnu-build-system)
1391 `(("pkg-config" ,pkg-config)))
1393 `(("libdvdread" ,libdvdread)))
1394 (home-page "http://dvdnav.mplayerhq.hu/")
1395 (synopsis "Library for video DVD navigation features")
1397 "Libdvdnav is a library for developers of multimedia
1398 applications. It allows easy use of sophisticated DVD navigation features
1399 such as DVD menus, multiangle playback and even interactive DVD games. All
1400 this functionality is provided through a simple API which provides the DVD
1401 playback as a single logical stream of blocks, intermitted by special
1402 dvdnav events to report certain conditions. The main usage of libdvdnav is
1403 a loop regularly calling a function to get the next block, surrounded by
1404 additional calls to tell the library of user interaction. The whole
1405 DVD virtual machine and internal playback states are completely
1407 (license license:gpl2+)))
1409 (define-public libdvdnav-4
1417 "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1421 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1423 `(("pkg-config" ,pkg-config)
1424 ("autoconf" ,autoconf)
1425 ("automake" ,automake)
1426 ("libtool" ,libtool)))
1429 (modify-phases %standard-phases
1430 (add-after 'unpack 'autoreconf
1432 (zero? (system* "autoreconf" "-vif")))))))))
1434 (define-public libdvdcss
1440 (uri (string-append "https://download.videolan.org/pub/"
1441 name "/" version "/"
1442 name "-" version ".tar.bz2"))
1445 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1446 (build-system gnu-build-system)
1447 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1448 (synopsis "Library for accessing DVDs as block devices")
1450 "libdvdcss is a simple library designed for accessing DVDs like a block
1451 device without having to bother about the decryption.")
1452 (license license:gpl2+)))
1454 (define-public srt2vtt
1461 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1465 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1466 (build-system gnu-build-system)
1468 `(("guile" ,guile-2.0)))
1469 (synopsis "SubRip to WebVTT subtitle converter")
1470 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1471 for use with HTML5 video.")
1472 (home-page "http://dthompson.us/pages/software/srt2vtt")
1473 (license license:gpl3+)))
1475 (define-public avidemux
1482 "mirror://sourceforge/" name "/" name "/" version "/"
1483 name "_" version ".tar.gz"))
1486 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1487 (patches (search-patches "avidemux-install-to-lib.patch"))))
1488 (build-system cmake-build-system)
1490 `(("pkg-config" ,pkg-config)))
1491 ;; FIXME: Once packaged, add libraries not found during the build.
1493 `(("alsa-lib" ,alsa-lib)
1494 ("fontconfig" ,fontconfig)
1495 ("freetype" ,freetype)
1496 ("fribidi" ,fribidi)
1501 ("libvdpau" ,libvdpau)
1502 ("libvorbis" ,libvorbis)
1506 ("pulseaudio" ,pulseaudio)
1507 ("python" ,python-wrapper)
1508 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1509 ;("qtbase" ,qtbase) with -std=gnu++11.
1510 ;("qttools" ,qttools)
1516 `(#:tests? #f ; no check target
1518 ;; Make sure files inside the included ffmpeg tarball are
1520 (modify-phases %standard-phases
1521 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1523 (with-directory-excursion "avidemux_core/ffmpeg_package"
1524 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1525 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1526 (add-after 'patch-source-shebangs 'repack-ffmpeg
1528 (with-directory-excursion "avidemux_core/ffmpeg_package"
1529 (substitute* "ffmpeg-2.7.6/configure"
1530 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1531 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1532 ;; avoid non-determinism in the archive
1533 "--sort=name" "--mtime=@0"
1534 "--owner=root:0" "--group=root:0")
1535 (delete-file-recursively "ffmpeg-2.7.6"))))
1538 ;; Copy-paste settings from the cmake build system.
1539 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1540 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1542 (lambda* (#:key inputs outputs #:allow-other-keys)
1544 ((out (assoc-ref outputs "out"))
1545 (lib (string-append out "/lib"))
1547 (sdl (assoc-ref inputs "sdl"))
1549 (lambda* (component srcdir #:optional (args '()))
1550 (let ((builddir (string-append "build_" component)))
1552 (with-directory-excursion builddir
1555 (apply system* "cmake"
1556 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1557 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1558 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1559 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1560 "\"-Wl,-rpath=" lib "\"")
1561 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1562 (string-append "-DSDL_INCLUDE_DIR="
1564 (string-append "../" srcdir)
1567 (system* "make" "-j"
1568 (number->string (parallel-job-count)))
1569 (system* "make" "install"))))))))
1571 (and (build_component "core" "avidemux_core")
1572 (build_component "cli" "avidemux/cli")
1573 (build_component "qt4" "avidemux/qt4")
1574 (build_component "plugins_common" "avidemux_plugins"
1575 '("-DPLUGIN_UI=COMMON"))
1576 (build_component "plugins_cli" "avidemux_plugins"
1577 '("-DPLUGIN_UI=CLI"))
1578 (build_component "plugins_qt4" "avidemux_plugins"
1579 '("-DPLUGIN_UI=QT4"))
1580 (build_component "plugins_settings" "avidemux_plugins"
1581 '("-DPLUGIN_UI=SETTINGS")))
1582 ;; Remove .exe and .dll file.
1583 (delete-file-recursively
1584 (string-append out "/share/ADM6_addons")))))
1585 (delete 'install))))
1586 (home-page "http://fixounet.free.fr/avidemux/")
1587 (synopsis "Video editor")
1588 (description "Avidemux is a video editor designed for simple cutting,
1589 filtering and encoding tasks. It supports many file types, including AVI,
1590 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1591 can be automated using projects, job queue and powerful scripting
1593 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1594 ;; Software with various licenses is included, see License.txt.
1595 (license license:gpl2+)))
1597 (define-public vapoursynth
1599 (name "vapoursynth")
1604 "https://github.com/vapoursynth/vapoursynth/archive/R"
1606 (file-name (string-append name "-" version ".tar.gz"))
1609 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1610 (build-system gnu-build-system)
1612 `(("autoconf" ,autoconf)
1613 ("automake" ,automake)
1614 ("cython" ,python-cython)
1615 ("libtool" ,libtool)
1616 ("pkg-config" ,pkg-config)
1620 `(("ffmpeg" ,ffmpeg)
1622 ("tesseract-ocr" ,tesseract-ocr)
1626 (modify-phases %standard-phases
1630 (zero? (system* "sh" "autogen.sh")))))))
1631 (home-page "http://www.vapoursynth.com/")
1632 (synopsis "Video processing framework")
1633 (description "VapourSynth is a C++ library and Python module for video
1634 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1635 multithreading, generalized colorspaces, per frame properties, and videos with
1637 ;; src/core/cpufeatures only allows x86, ARM or PPC
1638 (supported-systems (fold delete %supported-systems
1639 '("mips64el-linux" "aarch64-linux")))
1640 ;; As seen from the source files.
1641 (license license:lgpl2.1+)))
1650 "http://downloads.xvid.org/downloads/xvidcore-"
1651 version ".tar.bz2"))
1654 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1655 (build-system gnu-build-system)
1656 (native-inputs `(("yasm" ,yasm)))
1659 (modify-phases %standard-phases
1661 'configure 'pre-configure
1663 (chdir "build/generic")
1664 (substitute* "configure"
1665 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1666 ;; No 'check' target.
1668 (home-page "https://www.xvid.com/")
1669 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1670 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1671 codec library. It uses ASP features such as b-frames, global and quarter
1672 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1673 and custom quantization matrices.")
1674 (license license:gpl2+)))
1676 (define-public livestreamer
1678 (name "livestreamer")
1683 "https://github.com/chrippa/livestreamer/archive/v"
1685 (file-name (string-append "livestreamer-" version ".tar.gz"))
1688 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1689 (build-system python-build-system)
1691 '(#:tests? #f)) ; tests rely on external web servers
1693 `(("python-requests" ,python-requests)))
1694 (synopsis "Internet video stream viewer")
1695 (description "Livestreamer is a command-line utility that extracts streams
1696 from various services and pipes them into a video playing application.")
1697 (home-page "http://livestreamer.io/")
1698 (license license:bsd-2)))
1706 (uri (string-append "https://github.com/mltframework/mlt/"
1707 "archive/v" version ".tar.gz"))
1708 (file-name (string-append name "-" version ".tar.gz"))
1711 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1712 (build-system gnu-build-system)
1714 `(#:tests? #f ; no tests
1715 #:make-flags '("CC=gcc")
1717 (list "--enable-gpl3"
1720 (modify-phases %standard-phases
1722 'configure 'override-LDFLAGS
1723 (lambda* (#:key outputs #:allow-other-keys)
1724 (substitute* "config.mak"
1726 (string-append "LDFLAGS+=-Wl,-rpath="
1727 (assoc-ref outputs "out")
1731 `(("alsa-lib" ,alsa-lib)
1733 ("libxml2" ,libxml2)
1736 ("libsamplerate" ,libsamplerate)
1737 ("pulseaudio" ,pulseaudio)
1741 `(("pkg-config" ,pkg-config)))
1742 (home-page "https://www.mltframework.org/")
1743 (synopsis "Author, manage, and run multitrack audio/video compositions")
1745 "MLT is a multimedia framework, designed and developed for television
1746 broadcasting. It provides a toolkit for broadcasters, video editors, media
1747 players, transcoders, web streamers and many more types of applications. The
1748 functionality of the system is provided via an assortment of ready to use
1749 tools, XML authoring components, and an extensible plug-in based API.")
1750 (license license:lgpl2.1+)))
1752 (define-public v4l-utils
1758 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1759 "/v4l-utils-" version ".tar.bz2"))
1762 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1763 (build-system gnu-build-system)
1766 (list (string-append "--with-udevdir="
1767 (assoc-ref %outputs "out")
1769 "CXXFLAGS=-std=gnu++11")))
1772 ("pkg-config" ,pkg-config)))
1774 `(("alsa-lib" ,alsa-lib)
1776 ("libjpeg" ,libjpeg)
1780 (synopsis "Realtime video capture utilities for Linux")
1781 (description "The v4l-utils provide a series of libraries and utilities to
1782 be used for realtime video capture via Linux-specific APIs.")
1783 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1784 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1785 (license (list license:lgpl2.1+ license:gpl2))))
1793 (uri (string-append "https://github.com/jp9000/obs-studio"
1794 "/archive/" version ".tar.gz"))
1795 (file-name (string-append name "-" version ".tar.gz"))
1798 "02pbiyvf5x0zh448h5rpmyn33qnsqk694xxlyns83mdi74savyqw"))))
1799 (build-system cmake-build-system)
1801 `(#:tests? #f)) ; no tests
1803 `(("pkg-config" ,pkg-config)))
1805 `(("alsa-lib" ,alsa-lib)
1809 ("fontconfig" ,fontconfig)
1810 ("freetype" ,freetype)
1812 ("jansson" ,jansson)
1813 ("libx264" ,libx264)
1814 ("libxcomposite" ,libxcomposite)
1816 ("pulseaudio" ,pulseaudio)
1818 ("qtx11extras" ,qtx11extras)
1820 ("v4l-utils" ,v4l-utils)
1822 (synopsis "Live streaming software")
1823 (description "Open Broadcaster Software provides a graphical interface for
1824 video recording and live streaming. OBS supports capturing audio and video
1825 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1827 (home-page "https://obsproject.com")
1828 (supported-systems '("x86_64-linux" "i686-linux"))
1829 (license license:gpl2+)))
1831 (define-public libvdpau
1838 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1839 name "-" version ".tar.bz2"))
1842 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1843 (build-system gnu-build-system)
1845 `(("pkg-config" ,pkg-config)))
1847 `(("dri2proto" ,dri2proto)
1848 ("libx11" ,libx11 "out")
1849 ("libxext" ,libxext)))
1850 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1851 (synopsis "Video Decode and Presentation API")
1852 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1853 provides an interface to video decode acceleration and presentation hardware
1854 present in modern GPUs.")
1855 (license (license:x11-style "file://COPYING"))))
1857 (define-public vdpauinfo
1864 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1865 name "-" version ".tar.gz"))
1868 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1869 (build-system gnu-build-system)
1871 `(("pkg-config" ,pkg-config)
1872 ("libx11" ,libx11)))
1874 `(("libvdpau" ,libvdpau)))
1875 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1876 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1877 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1879 (license (license:x11-style "file://COPYING"))))
1881 (define-public recordmydesktop
1883 (name "recordmydesktop")
1887 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1888 version "/recordmydesktop-" version ".tar.gz"))
1891 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1892 (build-system gnu-build-system)
1893 (inputs `(("popt" ,popt)
1898 ("libxfixes" ,libxfixes)
1899 ("libxdamage" ,libxdamage)
1900 ("libxext" ,libxext)
1901 ("alsa-lib" ,alsa-lib)
1902 ("libvorbis" ,libvorbis)
1903 ("libtheora" ,libtheora)))
1904 (home-page "http://recordmydesktop.sourceforge.net/")
1905 (synopsis "Desktop session video recorder")
1907 "recordMyDesktop is a command-line tool that captures the activity in
1908 your graphical desktop and encodes it as a video. This is a useful tool for
1909 making @dfn{screencasts}.")
1910 (license license:gpl2+)))
1912 (define-public simplescreenrecorder
1914 (name "simplescreenrecorder")
1919 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
1921 (file-name (string-append name "-" version ".tar.gz"))
1924 "0v8w35n8w772s08w7k0icynqdsdakbrcanbgx6j847bfqfsg21gg"))))
1925 (build-system gnu-build-system)
1926 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
1927 ;; README.md, the program builds and functions properly without them.
1928 ;; As a result, they are omitted. Please add them back if problems appear.
1930 `(("alsa-lib" ,alsa-lib)
1935 ("pulseaudio" ,pulseaudio)
1936 ("qt" ,qt-4))) ; README.md: using Qt 5 causes some stability issues
1937 (native-inputs `(("pkg-config" ,pkg-config)))
1938 ;; Using HTTPS causes part of the page to be displayed improperly.
1939 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
1940 (synopsis "Screen recorder")
1941 (description "SimpleScreenRecorder is an easy to use screen recorder with
1942 a graphical user interface. It supports recording the entire screen, or a
1943 part of it, and allows encoding in many different codecs and file formats.
1944 Other features include a live preview and live streaming.")
1945 (license (list license:gpl3+ ; most files
1946 license:zlib ; glinject/elfhacks.*
1947 license:isc ; glinject/*
1948 license:x11)))) ; build-aux/install-sh
1950 (define-public libsmpeg
1957 (url "svn://svn.icculus.org/smpeg/trunk/")
1958 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1959 (file-name (string-append name "-" version "-checkout"))
1962 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1963 (build-system gnu-build-system)
1965 `(#:phases (modify-phases %standard-phases
1966 (add-after 'unpack 'autogen.sh
1968 (zero? (system* "sh" "autogen.sh")))))))
1970 `(("autoconf" ,autoconf)
1971 ("automake" ,automake)))
1974 (home-page "http://icculus.org/smpeg/")
1975 (synopsis "SDL MPEG decoding library")
1977 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1978 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1979 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1980 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1981 and MPEG system streams.")
1982 (license (list license:expat
1987 (define-public libbdplus
1994 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
1995 version "/" name "-" version ".tar.bz2"))
1997 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1999 `(("libgcrypt" ,libgcrypt)))
2000 (build-system gnu-build-system)
2001 (home-page "https://www.videolan.org/developers/libbdplus.html")
2002 (synopsis "Library for decrypting certain Blu-Ray discs")
2003 (description "libbdplus is a library which implements the BD+ System
2005 (license license:lgpl2.1+)))
2007 (define-public libaacs
2014 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2015 version "/" name "-" version ".tar.bz2"))
2017 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2019 `(("libgcrypt" ,libgcrypt)))
2023 (build-system gnu-build-system)
2024 (home-page "https://www.videolan.org/developers/libaacs.html")
2025 (synopsis "Library for decrypting certain Blu-Ray discs")
2026 (description "libaacs is a library which implements the Advanced Access
2027 Content System specification.")
2028 (license license:lgpl2.1+)))
2030 (define-public mps-youtube
2032 (name "mps-youtube")
2037 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2038 "archive/v" version ".tar.gz"))
2039 (file-name (string-append name "-" version ".tar.gz"))
2042 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2043 (build-system python-build-system)
2045 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2046 ;; test suite results differ depending on the country and also introduce
2047 ;; non-determinism in the tests.
2048 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2051 `(("python-pafy" ,python-pafy)
2052 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2053 (home-page "https://github.com/mps-youtube/mps-youtube")
2054 (synopsis "Terminal based YouTube player and downloader")
2056 "@code{mps-youtube} is based on mps, a terminal based program to
2057 search, stream and download music. This implementation uses YouTube as
2058 a source of content and can play and download video as well as audio.
2059 It can use either mpv or mplayer for playback, and for conversion of
2060 formats ffmpeg or libav is used. Users should install one of the
2061 supported players in addition to this package.")
2062 (license license:gpl3+)))
2064 (define-public handbrake
2070 (uri (string-append "https://handbrake.fr/rotation.php?file="
2071 "HandBrake-" version ".tar.bz2"))
2072 (file-name (string-append "handbrake-" version ".tar.bz2"))
2075 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2076 (patches (search-patches "handbrake-pkg-config-path.patch"))
2077 (modules '((guix build utils)))
2079 ;; Remove bundled libraries and source not necessary for
2080 ;; running under a GNU environment.
2082 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2084 (build-system glib-or-gtk-build-system)
2086 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2087 ("autoconf" ,autoconf)
2088 ("curl" ,curl) ;not actually used, but tested for
2089 ("intltool" ,intltool)
2090 ("libtool" ,libtool)
2091 ("pkg-config" ,pkg-config)
2092 ("python" ,python-2))) ;for configuration
2095 ("dbus-glib" ,dbus-glib)
2097 ("fontconfig" ,fontconfig)
2098 ("freetype" ,freetype)
2100 ("gstreamer" ,gstreamer)
2101 ("gst-plugins-base" ,gst-plugins-base)
2105 ("libbluray" ,libbluray)
2106 ("libdvdnav" ,libdvdnav)
2107 ("libdvdread" ,libdvdread)
2108 ("libgudev" ,libgudev)
2109 ("libmpeg2" ,libmpeg2)
2110 ("libnotify" ,libnotify)
2112 ("libsamplerate" ,libsamplerate)
2113 ("libtheora" ,libtheora)
2114 ("libvorbis" ,libvorbis)
2116 ("libxml2" ,libxml2)
2117 ("libx264" ,libx264)
2121 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2123 (modify-phases %standard-phases
2124 (add-before 'patch-source-shebangs 'bootstrap-gtk
2125 ;; Run bootstrap ahead of time so that shebangs get patched.
2127 (setenv "CONFIG_SHELL" (which "sh"))
2128 (setenv "NOCONFIGURE" "1")
2129 ;; Patch the Makefile so that it doesn't bootstrap again.
2130 (substitute* "gtk/module.rules"
2131 ((".*autogen\\.sh.*") ""))
2132 (zero? (system* "sh" "./gtk/autogen.sh"))))
2133 (add-before 'configure 'disable-contrib
2135 (substitute* "make/include/main.defs"
2136 ;; Disable unconditional inclusion of some "contrib"
2137 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2138 ;; and libbluray), which would lead to fetching and
2139 ;; building of these libraries. Use our own instead.
2140 (("MODULES \\+= contrib") "# MODULES += contrib"))
2142 (add-before 'configure 'fix-x265-linking
2144 (substitute* "test/module.defs"
2145 ;; Fix missing library during linking error
2146 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2149 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2150 ;; 'configure' is not an autoconf-generated script, and
2151 ;; errors on unrecognized arguments,
2152 ;; e.g. --enable-fast-install
2153 (let ((out (assoc-ref outputs "out")))
2154 (zero? (apply system* "./configure"
2155 (string-append "--prefix=" out)
2156 (or configure-flags '()))))))
2157 (add-after 'configure 'chdir-build
2158 (lambda _ (chdir "./build") #t)))))
2159 (home-page "https://handbrake.fr")
2160 (synopsis "Video transcoder")
2162 "HandBrake is a tool for converting video from any format to a selection
2163 of modern, widely supported codecs.")
2164 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2165 (license (list license:gpl2+ license:bsd-3))))
2167 (define-public openh264
2173 (uri (string-append "https://github.com/cisco/"
2174 name "/archive/v" version ".tar.gz"))
2175 (file-name (string-append name "-" version ".tar.gz"))
2178 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2179 (build-system gnu-build-system)
2182 ("python" ,python)))
2184 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2186 #:test-target "test"
2187 #:phases (modify-phases %standard-phases
2188 ;; no configure script
2189 (delete 'configure))))
2190 (home-page "http://www.openh264.org/")
2191 (synopsis "H264 decoder library")
2193 "Openh264 is a library which can decode H264 video streams.")
2194 (license license:bsd-2)))
2196 (define-public libmp4v2
2203 ;; XXX: The new location of upstream is uncertain and will become relevant the
2204 ;; moment when the googlecode archive shuts down. It is past the date it
2205 ;; should've been turned off. I tried to communicate with upstream, but this
2206 ;; wasn't very responsive and not very helpful. The short summary is, it is
2207 ;; chaos when it comes to the amount of forks and only time will tell where
2208 ;; the new upstream location is.
2209 (uri (string-append "https://storage.googleapis.com/google-"
2210 "code-archive-downloads/v2/"
2211 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2212 (file-name (string-append name "-" version ".tar.bz2"))
2215 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2216 (build-system gnu-build-system)
2218 "static")) ; 3.7MiB .a file
2221 (modify-phases %standard-phases
2222 (add-after 'unpack 'remove-dates
2224 ;; Make the build reproducible.
2225 (substitute* "configure"
2226 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2227 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2229 (add-after 'install 'move-static-libraries
2230 (lambda* (#:key outputs #:allow-other-keys)
2231 ;; Move static libraries to the "static" output.
2232 (let* ((out (assoc-ref outputs "out"))
2233 (lib (string-append out "/lib"))
2234 (static (assoc-ref outputs "static"))
2235 (slib (string-append static "/lib")))
2237 (for-each (lambda (file)
2238 (install-file file slib)
2240 (find-files lib "\\.a$"))
2243 `(("help2man" ,help2man)
2244 ("dejagnu" ,dejagnu)))
2245 (home-page "https://code.google.com/archive/p/mp4v2/")
2246 (synopsis "API to create and modify mp4 files")
2248 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2249 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2250 file format that has been used as a multimedia file format in a variety of platforms and
2251 applications. It is a very powerful and extensible format that can accommodate
2252 practically any type of media.")
2253 (license license:mpl1.1)))
2255 (define-public libmediainfo
2257 (name "libmediainfo")
2261 (uri (string-append "https://mediaarea.net/download/source/"
2263 name "_" version ".tar.bz2"))
2266 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2267 ;; TODO add a Big Buck Bunny webm for tests.
2269 `(("autoconf" ,autoconf)
2270 ("automake" ,automake)
2271 ("libtool" ,libtool)
2272 ("pkg-config" ,pkg-config)
2274 ("tinyxml2" ,tinyxml2)
2276 ("libzen" ,libzen)))
2277 (build-system gnu-build-system)
2279 '(#:tests? #f ; see above TODO
2281 ;; build scripts not in root of archive
2282 (modify-phases %standard-phases
2283 (add-after 'unpack 'change-to-build-dir
2285 (chdir "Project/GNU/Library")
2287 (add-after 'change-to-build-dir 'autogen
2289 (zero? (system* "sh" "autogen.sh")))))))
2290 (home-page "https://mediaarea.net/en/MediaInfo")
2291 (synopsis "Library for retrieving media metadata")
2292 (description "MediaInfo is a library used for retrieving technical
2293 information and other metadata about audio or video files. A non-exhaustive
2294 list of the information MediaInfo can retrieve from media files include:
2297 @item General: title, author, director, album, track number, date, duration...
2298 @item Video: codec, aspect, fps, bitrate...
2299 @item Audio: codec, sample rate, channels, language, bitrate...
2300 @item Text: language of subtitle
2301 @item Chapters: number of chapters, list of chapters
2304 MediaInfo supports the following formats:
2307 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2308 MPEG-2, MPEG-4, DVD (VOB)...
2309 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2310 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2311 @item Subtitles: SRT, SSA, ASS, SAMI...
2313 (license license:bsd-2)))
2315 ;; TODO also have a GUI version available
2316 (define-public mediainfo
2322 (uri (string-append "https://mediaarea.net/download/source/"
2323 name "/" version "/"
2324 name "_" version ".tar.bz2"))
2327 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2329 `(("autoconf" ,autoconf)
2330 ("automake" ,automake)
2331 ("libtool" ,libtool)
2332 ("pkg-config" ,pkg-config)
2334 ("libmediainfo", libmediainfo)
2335 ("libzen" ,libzen)))
2336 (build-system gnu-build-system)
2338 '(#:tests? #f ; lacks tests
2340 ;; build scripts not in root of archive
2341 (modify-phases %standard-phases
2342 (add-after 'unpack 'change-to-build-dir
2344 (chdir "Project/GNU/CLI")
2346 (add-after 'change-to-build-dir 'autogen
2348 (zero? (system* "sh" "autogen.sh")))))))
2349 (home-page "https://mediaarea.net/en/MediaInfo")
2350 (synopsis "Utility for reading media metadata")
2351 (description "MediaInfo is a utility used for retrieving technical
2352 information and other metadata about audio or video files. It supports the
2353 many codecs and formats supported by libmediainfo.")
2354 (license license:bsd-2)))
2356 (define-public livemedia-utils
2358 (name "livemedia-utils")
2359 (version "2017.06.04")
2363 "https://download.videolan.org/contrib/live555/live."
2367 "0xf3vynxqpxpd762zni0jkblnjlgbqxjx99m83m7gqx6zriph271"))))
2368 (build-system gnu-build-system)
2370 '(#:tests? #f ; no tests
2371 #:make-flags (list "CC=gcc"
2372 (string-append "LDFLAGS=-Wl,-rpath="
2373 (assoc-ref %outputs "out") "/lib")
2374 (string-append "PREFIX="
2375 (assoc-ref %outputs "out")))
2376 #:phases (modify-phases %standard-phases
2377 (add-before 'configure 'fix-makefiles-generation
2379 (substitute* "genMakefiles"
2384 (zero? (system* "./genMakefiles"
2385 "linux-with-shared-libraries")))))))
2386 (home-page "http://www.live555.com/liveMedia/")
2387 (synopsis "Set of C++ libraries for multimedia streaming")
2388 (description "This code forms a set of C++ libraries for multimedia
2389 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2390 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2391 JPEG video, and several audio codecs. They can easily be extended to support
2392 additional (audio and/or video) codecs, and can also be used to build basic
2393 RTSP or SIP clients and servers.")
2394 (license license:lgpl3+)))
2396 (define-public libdvbpsi
2403 "https://download.videolan.org/pub/libdvbpsi/"
2404 version "/libdvbpsi-" version ".tar.bz2"))
2407 "0824r08kaspbrrg2dd5d46s475zb7j59brqkm2y6x3mdsnpng0yn"))))
2408 (build-system gnu-build-system)
2409 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2410 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2412 (description "libdvbpsi is a simple library designed for decoding and
2413 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2414 and ITU-T H.222.0.")
2415 (license license:lgpl2.1)))
2417 (define-public ffms2
2421 (home-page "https://github.com/FFMS/ffms2/")
2424 (uri (string-append home-page "archive/" version ".tar.gz"))
2425 (file-name (string-append name "-" version ".tar.gz"))
2428 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2429 (build-system gnu-build-system)
2432 (list "--enable-avresample")))
2436 `(("ffmpeg" ,ffmpeg)))
2438 `(("pkg-config" ,pkg-config)))
2439 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2441 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2442 programmers to access a standard API to open and decompress media files.")
2443 ;; sources are distributed under a different license that the binary.
2444 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2445 (license license:gpl2+))); inherits from ffmpeg
2447 (define-public aegisub
2454 "http://ftp.aegisub.org/pub/archives/releases/source/"
2455 name "-" version ".tar.xz"))
2458 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2459 (build-system gnu-build-system)
2462 (list "--disable-update-checker"
2463 "--without-portaudio"
2466 ;; tests require busted, a lua package we don't have yet
2469 (modify-phases %standard-phases
2470 (add-before 'configure 'fix-ldflags
2472 (setenv "LDFLAGS" "-pthread"))))))
2475 ("desktop-file-utils" ,desktop-file-utils)
2478 ("hunspell" ,hunspell)
2481 ("alsa-lib" ,alsa-lib)
2482 ("pulseaudio" ,pulseaudio)
2484 ("freetype" ,freetype)
2485 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2487 `(("intltool" ,intltool)
2488 ("pkg-config" ,pkg-config)))
2489 (home-page "http://www.aegisub.org/")
2490 (synopsis "Subtitle engine")
2492 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2493 it quick and easy to time subtitles to audio, and features many powerful
2494 tools for styling them, including a built-in real-time video preview.")
2495 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2496 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2497 license:expat)))) ; and src/gl that is under a license similar
2498 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2499 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2500 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2502 (define-public gst-transcoder
2504 (name "gst-transcoder")
2509 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2510 "archive/" version ".tar.gz"))
2511 (file-name (string-append name "-" version ".tar.gz"))
2514 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2515 (build-system meson-build-system)
2517 `(("gobject-introspection" ,gobject-introspection)
2519 ("gstreamer" ,gstreamer)
2520 ("gst-plugins-base" ,gst-plugins-base)))
2522 `(("python" ,python)
2523 ("pkg-config" ,pkg-config)))
2524 (home-page "https://github.com/pitivi/gst-transcoder/")
2525 (synopsis "GStreamer Transcoding API")
2526 (description "GStreamer Transcoding API")
2527 (license license:lgpl2.1)))
2536 (uri (string-append "mirror://sourceforge/gmerlin/"
2537 name "/" version "/"
2538 name "-" version ".tar.gz"))
2539 (file-name (string-append name "-" version ".tar.gz"))
2542 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2543 (build-system gnu-build-system)
2545 '(#:configure-flags '("LIBS=-lm")))
2547 `(("pkg-config" ,pkg-config)
2548 ("doxygen" ,doxygen)))
2549 (home-page "http://gmerlin.sourceforge.net")
2550 (synopsis "Low level library for multimedia API building")
2552 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2553 library, upon which multimedia APIs can be built. Gavl handles all the
2554 details of audio and video formats like colorspaces, sample rates,
2555 multichannel configurations, etc. It provides standardized definitions for
2556 those formats as well as container structures for carrying audio samples or
2557 video images inside an application.
2559 In addition, it handles the sometimes ugly task of converting between all
2560 these formats and provides some elementary operations (copying, scaling,
2561 alpha blending etc).")
2562 (license license:gpl3)))
2564 (define-public frei0r-plugins
2566 (name "frei0r-plugins")
2571 (uri (string-append "https://files.dyne.org/frei0r/"
2572 "frei0r-plugins-" version ".tar.gz"))
2575 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2576 (build-system gnu-build-system)
2579 (modify-phases %standard-phases
2580 (add-after 'unpack 'autotools
2582 (zero? (system* "sh" "autogen.sh")))))))
2583 ;; TODO: opencv for additional face detection filters
2588 `(("pkg-config" ,pkg-config)
2589 ("libtool" ,libtool)
2590 ("automake" ,automake)
2591 ("autoconf" ,autoconf)))
2592 (home-page "https://www.dyne.org/software/frei0r/")
2593 (synopsis "Minimalistic plugin API for video effects")
2595 "Frei0r is a minimalistic plugin API for video effects.
2596 The main emphasis is on simplicity for an API that will round up
2597 the most common video effects into simple filters, sources and
2598 mixers that can be controlled by parameters. Frei0r wants to
2599 provide a way to share these simple effects between many
2600 applications, avoiding their reimplementation by different projects.
2601 It counts more than 100 plugins.")
2602 (license (list license:gpl2+
2603 ;; The following files are licensed as LGPL2.1+:
2604 ;; src/generator/ising0r/ising0r.c
2605 ;; src/generator/onecol0r/onecol0r.cpp
2606 ;; src/generator/nois0r/nois0r.cpp
2607 ;; src/generator/lissajous0r/lissajous0r.cpp
2608 ;; src/filter/ndvi/gradientlut.hpp
2609 ;; src/filter/ndvi/ndvi.cpp
2610 ;; src/filter/facedetect/facedetect.cpp
2611 license:lgpl2.1+))))