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 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
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>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages video)
37 #:use-module (ice-9 match)
38 #:use-module (srfi srfi-1)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix utils)
41 #:use-module (guix packages)
42 #:use-module (guix download)
43 #:use-module (guix git-download)
44 #:use-module (guix svn-download)
45 #:use-module (guix build-system cmake)
46 #:use-module (guix build-system gnu)
47 #:use-module (guix build-system glib-or-gtk)
48 #:use-module (guix build-system python)
49 #:use-module (guix build-system waf)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages algebra)
52 #:use-module (gnu packages audio)
53 #:use-module (gnu packages autotools)
54 #:use-module (gnu packages avahi)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages cdrom)
58 #:use-module (gnu packages cmake)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages curl)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages dejagnu)
63 #:use-module (gnu packages elf)
64 #:use-module (gnu packages flex)
65 #:use-module (gnu packages fontutils)
66 #:use-module (gnu packages freedesktop)
67 #:use-module (gnu packages fribidi)
68 #:use-module (gnu packages gettext)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages guile)
73 #:use-module (gnu packages gnome)
74 #:use-module (gnu packages gnupg)
75 #:use-module (gnu packages gstreamer)
76 #:use-module (gnu packages gtk)
77 #:use-module (gnu packages image)
78 #:use-module (gnu packages linux)
79 #:use-module (gnu packages lua)
80 #:use-module (gnu packages m4)
81 #:use-module (gnu packages man)
82 #:use-module (gnu packages mp3)
83 #:use-module (gnu packages ncurses)
84 #:use-module (gnu packages ocr)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages pkg-config)
87 #:use-module (gnu packages popt)
88 #:use-module (gnu packages pulseaudio)
89 #:use-module (gnu packages python)
90 #:use-module (gnu packages qt)
91 #:use-module (gnu packages sdl)
92 #:use-module (gnu packages ssh)
93 #:use-module (gnu packages texinfo)
94 #:use-module (gnu packages textutils)
95 #:use-module (gnu packages tls)
96 #:use-module (gnu packages version-control)
97 #:use-module (gnu packages web)
98 #:use-module (gnu packages webkit)
99 #:use-module (gnu packages wxwidgets)
100 #:use-module (gnu packages xdisorg)
101 #:use-module (gnu packages xiph)
102 #:use-module (gnu packages xml)
103 #:use-module (gnu packages xorg)
104 #:use-module (gnu packages assembly)
105 #:use-module (gnu packages zip))
113 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
114 version "/" name "-" version ".tar.gz"))
117 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
118 (build-system gnu-build-system)
120 `(("makeinfo" ,texinfo)))
122 `(("ncurses" ,ncurses)))
125 (modify-phases %standard-phases
127 (lambda* (#:key build inputs outputs #:allow-other-keys)
128 ;; This old `configure' script doesn't support
129 ;; variables passed as arguments.
130 (let ((out (assoc-ref outputs "out"))
131 (ncurses (assoc-ref inputs "ncurses")))
132 (setenv "CONFIG_SHELL" (which "bash"))
133 (zero? (system* "./configure"
134 (string-append "--prefix=" out)
135 (string-append "--build=" build)
136 ;; The ancient config.guess is unable to
137 ;; guess the host triplet on mips64el.
138 ,@(if (string=? "mips64el-linux"
140 '("--host=mips64el-unknown-linux-gnu")
142 ;; The same is also true with aarch64.
143 ,@(if (string=? "aarch64-linux"
145 '("--host=aarch64-unknown-linux-gnu")
147 (string-append "--with-ncurses="
149 (home-page "http://aa-project.sourceforge.net/aalib/")
150 (synopsis "ASCII-art library")
152 "AA-lib is a low level gfx library which does not require graphics device.
153 In fact, there is no graphical output possible. AA-lib replaces those
154 old-fashioned output methods with powerful ascii-art renderer.")
155 (license license:lgpl2.0+)))
157 (define-public liba52
164 ;; A mirror://sourceforge URI doesn't work, presumably
165 ;; because the SourceForge project is misconfigured.
166 "http://liba52.sourceforge.net/files/a52dec-" version
170 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
171 (patches (search-patches "liba52-enable-pic.patch"
172 "liba52-set-soname.patch"
173 "liba52-use-mtune-not-mcpu.patch"
174 "liba52-link-with-libm.patch"))))
175 (build-system gnu-build-system)
176 ;; XXX We need to run ./bootstrap because of the build system fixes above.
178 `(("autoconf" ,autoconf)
179 ("automake" ,automake)
180 ("libtool" ,libtool)))
181 (arguments `(#:configure-flags '("--enable-shared")
183 (modify-phases %standard-phases
184 ;; XXX We need to run ./bootstrap because of the build
185 ;; system fixes above.
188 (lambda _ (zero? (system* "sh" "bootstrap")))))))
189 (home-page "http://liba52.sourceforge.net/")
190 (synopsis "ATSC A/52 stream decoder")
191 (description "liba52 is a library for decoding ATSC A/52 streams. The
192 A/52 standard is used in a variety of applications, including digital
193 television and DVD. It is also known as AC-3.")
194 (license license:gpl2+)))
196 (define-public libmpeg2
202 ;; A mirror://sourceforge URI doesn't work, presumably
203 ;; because the SourceForge project is misconfigured.
204 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
205 name "-" version ".tar.gz"))
208 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
216 (build-system gnu-build-system)
217 (home-page "http://libmpeg2.sourceforge.net/")
218 (synopsis "MPEG1 and MPEG2 video decoder library")
220 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
221 (license license:gpl2+)))
223 (define-public libx264
226 (version "20170316-2245")
229 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
230 "x264-snapshot-" version ".tar.bz2"))
233 "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
234 (build-system gnu-build-system)
236 `(("pkg-config" ,pkg-config)
238 ;; TODO: Add gpac input
240 `(#:tests? #f ;no check target
241 #:configure-flags '("--enable-shared"
242 ;; Don't build the command-line program. If we
243 ;; want it later, we should do so in a different
244 ;; package to avoid a circular dependency (the x264
245 ;; program depends on ffmpeg and ffmpeg depends on
249 ;; On MIPS, we must pass "--disable-asm" or else
250 ;; configure fails after printing: "You specified a
251 ;; pre-MSA CPU in your CFLAGS. If you really want
252 ;; to run on such a CPU, configure with
254 ,@(if (string-prefix? "mips"
255 (or (%current-target-system)
259 (home-page "https://www.videolan.org/developers/x264.html")
260 (synopsis "H.264 video coding library")
261 (description "libx264 is an advanced encoding library for creating
262 H.264 (MPEG-4 AVC) video streams.")
263 (license (list license:gpl2+ ;most files
264 license:isc ;common/x86/x86inc.asm
265 license:lgpl2.1+ ;extras/getopt.c
266 license:bsd-3 ;extras/inttypes.h
267 (license:non-copyleft ;extras/cl*.h
269 "See extras/cl.h in the distribution.")))))
278 (uri (string-append "https://download.videolan.org/videolan/x265/"
279 "x265_" version ".tar.gz"))
282 "07z4ydxg0lk6j43h0wlh2xddb91cy4y4mny2ln71d4278b1hllj7"))
283 (modules '((guix build utils)))
285 '(delete-file-recursively "source/compat/getopt"))))
286 (build-system cmake-build-system)
288 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
289 ;; Currently the source code doesn't check for aarch64
290 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
291 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
294 (modify-phases %standard-phases
295 (add-before 'configure 'prepare-build
297 (delete-file-recursively "build")
300 (home-page "http://x265.org/")
301 (synopsis "Library for encoding h.265/HEVC video streams")
302 (description "x265 is a H.265 / HEVC video encoder application library,
303 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
304 (license license:gpl2+)))
306 (define-public libass
313 "https://github.com/libass/libass/releases/download/"
314 version "/libass-" version ".tar.xz"))
317 "0b9cj5xfsa7zwlk5m146fhv102v51iqs3rapq0n2xrz30k8p9a7q"))))
318 (build-system gnu-build-system)
320 `(("pkg-config" ,pkg-config)
323 `(("freetype" ,freetype)
325 ("fontconfig" ,fontconfig)
326 ("harfbuzz" ,harfbuzz)
328 (home-page "https://github.com/libass/libass")
329 (synopsis "Subtitle rendering library for the ASS/SSA format")
330 (description "libass is a subtitle rendering library for the
331 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
332 (license license:isc)))
334 (define-public libcaca
337 (version "0.99.beta19")
340 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
344 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
345 (build-system gnu-build-system)
346 (native-inputs `(("pkg-config" ,pkg-config)))
348 `(("freeglut" ,freeglut)
355 (home-page "http://caca.zoy.org/wiki/libcaca")
356 (synopsis "Colour ASCII-art library")
357 (description "libcaca is a graphics library that outputs text instead of
358 pixels, so that it can work on older video cards or text terminals. It
359 supports Unicode, 2048 colors, dithering of color images, and advanced text
361 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
363 (define-public libdca
370 "https://download.videolan.org/pub/videolan/libdca/"
371 version "/libdca-" version ".tar.bz2"))
374 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
375 (build-system gnu-build-system)
376 (home-page "https://www.videolan.org/developers/libdca.html")
377 (synopsis "DTS Coherent Acoustics decoder")
378 (description "libdca is a library for decoding DTS Coherent Acoustics
380 (license license:gpl2+)))
389 "mirror://sourceforge/" name "/" name "/"
390 version "/" name "-" version ".tar.gz"))
393 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
394 (build-system gnu-build-system)
395 (native-inputs `(("pkg-config" ,pkg-config)))
396 (inputs `(("libxv" ,libxv)))
397 (home-page "http://libdv.sourceforge.net/")
398 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
399 (description "The Quasar DV codec (libdv) is a software codec for DV
400 video, the encoding format used by most digital camcorders, typically those
401 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
402 developed according to the official standards for DV video: IEC 61834 and
404 (license license:lgpl2.1+)))
414 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
417 (base32 "0wswfznj93jpnxhc3jwdk5j3pmyki0rs6k9vk4vnzds0dddximf1"))))
418 (build-system gnu-build-system)
420 `(("pkg-config" ,pkg-config)))
425 ("libxfixes" ,libxfixes)
429 (modify-phases %standard-phases
431 'build 'fix-dlopen-paths
432 (lambda* (#:key outputs #:allow-other-keys)
433 (let ((out (assoc-ref outputs "out")))
434 (substitute* "va/drm/va_drm_auth_x11.c"
435 (("\"libva-x11\\.so\\.%d\"")
436 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
437 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
438 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
440 (list (string-append "--with-drivers-path="
441 (assoc-ref %build-inputs "mesa") "/lib/dri"))
442 ;; However, we can't write to mesa's store directory, so override the
443 ;; following make variable to install the dummy driver to libva's
444 ;; $prefix/lib/dri directory.
446 (list (string-append "dummy_drv_video_ladir="
447 (assoc-ref %outputs "out") "/lib/dri"))))
448 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
449 (synopsis "Video acceleration library")
450 (description "The main motivation for VA-API (Video Acceleration API) is
451 to enable hardware accelerated video decode/encode at various
452 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
453 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
454 (license license:expat)))
456 (define-public ffmpeg
462 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
466 "17anx7rnbi63if1ndr61836lf76dpn47n0y424hc48bj05y7z7jr"))))
467 (build-system gnu-build-system)
469 `(("fontconfig" ,fontconfig)
470 ("freetype" ,freetype)
476 ("libbluray" ,libbluray)
478 ("libcdio-paranoia" ,libcdio-paranoia)
479 ("libtheora" ,libtheora)
480 ("libvdpau" ,libvdpau)
481 ("libvorbis" ,libvorbis)
487 ("pulseaudio" ,pulseaudio)
498 ("pkg-config" ,pkg-config)
500 ("python" ,python-2) ; scripts use interpreter python2
504 `(#:test-target "fate"
506 ;; possible additional inputs:
507 ;; --enable-avisynth enable reading of AviSynth script
509 ;; --enable-frei0r enable frei0r video filtering
510 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
511 ;; --enable-libcelt enable CELT decoding via libcelt [no]
512 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
513 ;; and libraw1394 [no]
514 ;; --enable-libfaac enable AAC encoding via libfaac [no]
515 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
516 ;; --enable-libflite enable flite (voice synthesis) support via
518 ;; --enable-libgme enable Game Music Emu via libgme [no]
519 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
520 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
521 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
522 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
523 ;; --enable-libnut enable NUT (de)muxing via libnut,
524 ;; native (de)muxer exists [no]
525 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
526 ;; libopencore-amrnb [no]
527 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
528 ;; libopencore-amrwb [no]
529 ;; --enable-libopencv enable video filtering via libopencv [no]
530 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
532 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
533 ;; --enable-libschroedinger enable Dirac de/encoding via
534 ;; libschroedinger [no]
535 ;; --enable-libshine enable fixed-point MP3 encoding via
537 ;; --enable-libssh enable SFTP protocol via libssh [no]
538 ;; (libssh2 does not work)
539 ;; --enable-libstagefright-h264 enable H.264 decoding via
540 ;; libstagefright [no]
541 ;; --enable-libutvideo enable Ut Video encoding and decoding via
543 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
544 ;; --enable-libvidstab enable video stabilization using
546 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
547 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
548 ;; libvo-amrwbenc [no]
549 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
550 ;; --enable-libxavs enable AVS encoding via xavs [no]
551 ;; --enable-libzmq enable message passing via libzmq [no]
552 ;; --enable-libzvbi enable teletext support via libzvbi [no]
553 ;; --enable-opencl enable OpenCL code
554 '("--enable-avresample"
555 "--enable-gpl" ; enable optional gpl licensed parts
557 "--enable-fontconfig"
564 "--enable-libfreetype"
565 "--enable-libmp3lame"
571 "--enable-libtwolame"
580 "--enable-runtime-cpudetect"
582 ;; Runtime cpu detection is not implemented on
583 ;; MIPS, so we disable some features.
586 "--disable-mipsdspr2"
589 (modify-phases %standard-phases
592 ;; configure does not work followed by "SHELL=..." and
593 ;; "CONFIG_SHELL=..."; set environment variables instead
594 (lambda* (#:key outputs configure-flags #:allow-other-keys)
595 (let ((out (assoc-ref outputs "out")))
596 (substitute* "configure"
597 (("#! /bin/sh") (string-append "#!" (which "sh"))))
598 (setenv "SHELL" (which "bash"))
599 (setenv "CONFIG_SHELL" (which "bash"))
600 (zero? (apply system*
602 (string-append "--prefix=" out)
603 ;; Add $libdir to the RUNPATH of all the binaries.
604 (string-append "--extra-ldflags=-Wl,-rpath="
608 'check 'set-ld-library-path
610 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
612 (let* ((dso (find-files "." "\\.so$"))
613 (path (string-join (map dirname dso) ":")))
614 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
615 (setenv "LD_LIBRARY_PATH" path)
617 (home-page "https://www.ffmpeg.org/")
618 (synopsis "Audio and video framework")
619 (description "FFmpeg is a complete, cross-platform solution to record,
620 convert and stream audio and video. It includes the libavcodec
621 audio/video codec library.")
622 (license license:gpl2+)))
624 (define-public ffmpeg-2.8
630 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
634 "1rhz7rhmhhh8bjcj3dc82haisn3qjbzqlr7k6d6v7064jgn3maiq"))))
636 (substitute-keyword-arguments (package-arguments ffmpeg)
637 ((#:configure-flags flags)
639 (if (string=? flag "--disable-mipsdsp")
640 "--disable-mipsdspr1"
651 "https://download.videolan.org/pub/videolan/vlc/"
652 version "/vlc-" version ".tar.xz"))
655 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
656 (modules '((guix build utils)))
658 ;; There are two occurrences where __DATE__ and __TIME__ are
659 ;; used to capture the build time and show it to the user.
660 '(substitute* (find-files "." "help\\.c(pp)?$")
661 (("__DATE__") "\"2016\"")
662 (("__TIME__") "\"00:00\"")))))
663 (build-system gnu-build-system)
665 `(("git" ,git) ; needed for a test
666 ("pkg-config" ,pkg-config)))
667 ;; FIXME: Add optional inputs once available.
669 `(("alsa-lib" ,alsa-lib)
673 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
674 ("fontconfig" ,fontconfig)
675 ("freetype" ,freetype)
679 ("libgcrypt" ,libgcrypt)
684 ("libsamplerate" ,libsamplerate)
686 ("libvorbis" ,libvorbis)
687 ("libtheora" ,libtheora)
690 ("libxinerama" ,libxinerama)
697 ("pulseaudio" ,pulseaudio)
698 ("python" ,python-wrapper)
699 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
700 ;("qtbase" ,qtbase) with -std=gnu++11.
701 ;("qtx11extras" ,qtx11extras)
703 ("sdl-image" ,sdl-image)
706 ("xcb-util-keysyms" ,xcb-util-keysyms)))
709 `(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
710 ;; In our case, this led to a test failure:
711 ;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
712 "ac_cv_c_fast_math=no"
714 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
715 (assoc-ref %build-inputs "ffmpeg")
716 "/lib")) ;needed for the tests
719 (modify-phases %standard-phases
720 (add-before 'configure 'remove-visual-tests
721 ;; Some of the tests require using the display to test out VLC,
722 ;; which fails in our sandboxed build system
724 (substitute* "test/run_vlc.sh"
725 (("./vlc --ignore-config") "echo"))
727 (add-after 'install 'regenerate-plugin-cache
728 (lambda* (#:key outputs #:allow-other-keys)
729 ;; The 'install-exec-hook' rule in the top-level Makefile.am
730 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
731 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
732 ;; it references. Thus, we first reset the timestamps of all
733 ;; these files, and then regenerate the cache such that the
734 ;; mtimes it includes are always zero instead of being dependent
735 ;; on the build time.
736 (let* ((out (assoc-ref outputs "out"))
737 (pkglibdir (string-append out "/lib/vlc"))
738 (plugindir (string-append pkglibdir "/plugins"))
739 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
740 ;; TODO: Factorize 'reset-timestamps'.
741 (for-each (lambda (file)
742 (let ((s (lstat file)))
743 (unless (eq? (stat:type s) 'symlink)
744 (utime file 0 0 0 0))))
745 (find-files plugindir))
746 (zero? (system* cachegen plugindir))))))))
747 (home-page "https://www.videolan.org/")
748 (synopsis "Audio and video framework")
749 (description "VLC is a cross-platform multimedia player and framework
750 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
751 treaming protocols.")
752 (license license:gpl2+)))
754 (define-public mplayer
761 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
765 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
766 (build-system gnu-build-system)
767 ;; FIXME: Add additional inputs once available.
769 `(("pkg-config" ,pkg-config)))
771 `(("alsa-lib" ,alsa-lib)
772 ("cdparanoia" ,cdparanoia)
774 ("fontconfig" ,fontconfig)
775 ("freetype" ,freetype)
776 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
779 ("libdvdcss" ,libdvdcss)
780 ("libdvdnav" ,libdvdnav)
782 ("libmpeg2" ,libmpeg2)
783 ("libmpg123" ,mpg123) ; audio codec for MP3
785 ("libtheora" ,libtheora)
786 ("libvdpau" ,libvdpau)
787 ("libvorbis" ,libvorbis)
790 ("libxinerama" ,libxinerama)
792 ("libxxf86dga" ,libxxf86dga)
796 ("pulseaudio" ,pulseaudio)
797 ("python" ,python-wrapper)
803 `(#:tests? #f ; no test target
805 (modify-phases %standard-phases
807 ;; configure does not work followed by "SHELL=..." and
808 ;; "CONFIG_SHELL=..."; set environment variables instead
809 (lambda* (#:key inputs outputs #:allow-other-keys)
810 (let ((out (assoc-ref outputs "out"))
811 (libx11 (assoc-ref inputs "libx11")))
812 (substitute* "configure"
813 (("#! /bin/sh") (string-append "#!" (which "sh"))))
814 (setenv "SHELL" (which "bash"))
815 (setenv "CONFIG_SHELL" (which "bash"))
818 (string-append "--extra-cflags=-I"
819 libx11 "/include") ; to detect libx11
820 "--disable-ffmpeg_a" ; disables bundled ffmpeg
821 (string-append "--prefix=" out)
822 ;; Enable runtime cpu detection where supported,
823 ;; and choose a suitable target.
824 ,@(match (or (%current-target-system)
827 '("--enable-runtime-cpudetection"
828 "--target=x86_64-linux"))
830 '("--enable-runtime-cpudetection"
831 "--target=i686-linux"))
833 '("--target=mips3-linux"))
834 (_ (list (string-append
836 (or (%current-target-system)
837 (nix-system->gnu-triplet
838 (%current-system)))))))
839 "--disable-iwmmxt"))))))))
840 (home-page "https://www.mplayerhq.hu/design7/news.html")
841 (synopsis "Audio and video player")
842 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
843 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
844 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
845 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
846 (license license:gpl2)))
855 "https://github.com/mpv-player/mpv/archive/v" version
859 "1khb7c4fdj1aak46lwyb3lq14w5jpxzws0zp6bdc87ljsvx3yhh7"))
860 (file-name (string-append name "-" version ".tar.gz"))))
861 (build-system waf-build-system)
863 `(("perl" ,perl) ; for zsh completion file
864 ("pkg-config" ,pkg-config)
865 ("python-docutils" ,python-docutils)))
866 ;; Missing features: libguess, Wayland, V4L2
868 `(("alsa-lib" ,alsa-lib)
875 ("libbluray" ,libbluray)
878 ("libcdio-paranoia" ,libcdio-paranoia)
879 ("libdvdread" ,libdvdread)
880 ("libdvdnav" ,libdvdnav)
883 ("libvdpau" ,libvdpau)
886 ("libxinerama" ,libxinerama)
887 ("libxrandr" ,libxrandr)
888 ("libxscrnsaver" ,libxscrnsaver)
890 ;; XXX: lua > 5.2 is not currently supported; see
891 ;; waftools/checks/custom.py
895 ("pulseaudio" ,pulseaudio)
898 ("youtube-dl" ,youtube-dl)
902 (modify-phases %standard-phases
904 'configure 'setup-waf
905 (lambda* (#:key inputs #:allow-other-keys)
906 (copy-file (assoc-ref inputs "waf") "waf")
907 (setenv "CC" "gcc"))))
908 #:configure-flags (list "--enable-libmpv-shared"
913 "--disable-build-date")
914 ;; No check function defined.
916 (home-page "https://mpv.io/")
917 (synopsis "Audio and video player")
918 (description "mpv is a general-purpose audio and video player. It is a
919 fork of mplayer2 and MPlayer. It shares some features with the former
920 projects while introducing many more.")
921 (license license:gpl2+)))
923 (define-public gnome-mpv
930 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
931 "/download/v" version "/gnome-mpv-" version
935 "1hn3mpsxbrwf2m0nz4vzji4i6i896y8kqjb9kijqpk04cnrs3fgz"))))
937 `(("intltool" ,intltool)
938 ("pkg-config" ,pkg-config)))
941 ("libepoxy" ,libepoxy)
943 (build-system glib-or-gtk-build-system)
944 (home-page "https://github.com/gnome-mpv/gnome-mpv")
945 (synopsis "GTK+ frontend for the mpv media player")
946 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
947 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
948 access to mpv's powerful playback capabilities.")
949 (license license:gpl3+)))
951 (define-public libvpx
957 (uri (string-append "http://storage.googleapis.com/"
958 "downloads.webmproject.org/releases/webm/"
959 name "-" version ".tar.bz2"))
962 "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
963 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
964 (build-system gnu-build-system)
967 (modify-phases %standard-phases
969 (lambda* (#:key outputs #:allow-other-keys)
970 (setenv "CONFIG_SHELL" (which "bash"))
971 (let ((out (assoc-ref outputs "out")))
973 (string-append "-Wl,-rpath=" out "/lib"))
974 (zero? (system* "./configure"
977 ;; Limit size to avoid CVE-2015-1258
978 "--size-limit=16384x16384"
979 (string-append "--prefix=" out)))))))
980 #:tests? #f)) ; no check target
984 (synopsis "VP8/VP9 video codec")
985 (description "libvpx is a codec for the VP8/VP9 video compression format.")
986 (license license:bsd-3)
987 (home-page "http://www.webmproject.org/")))
989 (define-public youtube-dl
992 (version "2017.04.16")
995 (uri (string-append "https://yt-dl.org/downloads/"
996 version "/youtube-dl-"
1000 "1pgdfspzv15772q7kakfq5qx1r70lcviwzk6sz9z1cddxzffxgdd"))))
1001 (build-system python-build-system)
1003 ;; The problem here is that the directory for the man page and completion
1004 ;; files is relative, and for some reason, setup.py uses the
1005 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1006 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1007 ;; completion file is called 'youtube-dl' rather than
1008 ;; 'youtube-dl.bash-completion'.
1009 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1010 #:phases (modify-phases %standard-phases
1011 (add-before 'install 'fix-the-data-directories
1012 (lambda* (#:key outputs #:allow-other-keys)
1013 (let ((prefix (assoc-ref outputs "out")))
1014 (mkdir "bash-completion")
1015 (rename-file "youtube-dl.bash-completion"
1016 "bash-completion/youtube-dl")
1017 (substitute* "setup.py"
1018 (("youtube-dl\\.bash-completion")
1019 "bash-completion/youtube-dl")
1021 (string-append "'" prefix "/etc/"))
1023 (string-append "'" prefix "/share/")))))))))
1024 (synopsis "Download videos from YouTube.com and other sites")
1026 "Youtube-dl is a small command-line program to download videos from
1027 YouTube.com and a few more sites.")
1028 (home-page "https://yt-dl.org")
1029 (license license:public-domain)))
1031 (define-public youtube-dl-gui
1033 (name "youtube-dl-gui")
1038 (uri (pypi-uri "Youtube-DLG" version))
1041 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1042 (build-system python-build-system)
1044 ;; In Guix, wxpython has not yet been packaged for Python 3.
1045 `(#:python ,python-2
1046 ;; This package has no tests.
1049 (modify-phases %standard-phases
1050 (add-before 'build 'patch-source
1051 (lambda* (#:key inputs #:allow-other-keys)
1052 ;; The youtube-dl-gui program lets you configure options. Some of
1053 ;; them are problematic, so we change their defaults.
1054 (substitute* "youtube_dl_gui/optionsmanager.py"
1055 ;; When this is true, the builder process will try (and fail) to
1056 ;; write logs to the builder user's home directory.
1057 (("'enable_log': True") "'enable_log': False")
1058 ;; This determines which youtube-dl program youtube-dl-gui will
1059 ;; run. If we don't set this, then youtube-dl-gui might download
1060 ;; an arbitrary copy from the Internet into the user's home
1061 ;; directory and run it, so let's make sure youtube-dl-gui uses
1062 ;; the youtube-dl from the inputs by default.
1063 (("'youtubedl_path': self.config_path")
1064 (string-append "'youtubedl_path': '"
1065 (assoc-ref inputs "youtube-dl")
1067 ;; When this is True, when youtube-dl-gui is finished downloading
1068 ;; a file, it will try (and possibly fail) to open the directory
1069 ;; containing the downloaded file. This can fail because it
1070 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1071 ;; adding xdg-utils to the propagated inputs is not enough to
1072 ;; make this work, so for now we set the default to False.
1073 (("'open_dl_dir': True") "'open_dl_dir': False"))
1074 ;; The youtube-dl program from the inputs is actually a wrapper
1075 ;; script written in bash, so attempting to invoke it as a python
1076 ;; script will fail.
1077 (substitute* "youtube_dl_gui/downloaders.py"
1078 (("cmd = \\['python', self\\.youtubedl_path\\]")
1079 "cmd = [self.youtubedl_path]"))
1080 ;; Use relative paths for installing data files so youtube-dl-gui
1081 ;; installs the files relative to its prefix in the store, rather
1082 ;; than relative to /. Also, instead of installing data files into
1083 ;; $prefix/usr/share, install them into $prefix/share for
1084 ;; consistency (see: (standards) Directory Variables).
1085 (substitute* "setup.py"
1086 (("= '/usr/share") "= 'share"))
1087 ;; Update get_locale_file() so it finds the installed localization
1089 (substitute* "youtube_dl_gui/utils.py"
1090 (("os\\.path\\.join\\('/usr', 'share'")
1091 (string-append "os.path.join('"
1092 (assoc-ref %outputs "out")
1093 "', 'share'"))))))))
1095 `(("python2-wxpython" ,python2-wxpython)
1096 ("youtube-dl" ,youtube-dl)))
1097 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1099 "GUI (Graphical User Interface) for @command{youtube-dl}")
1101 "Youtube-dlG is a GUI (Graphical User Interface) for
1102 @command{youtube-dl}. You can use it to download videos from YouTube and any
1103 other site that youtube-dl supports.")
1104 (license license:unlicense)))
1106 (define-public you-get
1113 "https://github.com/soimort/you-get/releases/download/v"
1114 version "/you-get-" version ".tar.gz"))
1117 "043122hfh56fbbszp1kwd1f65asgyn60j1ijday93hf2dkhvbrnh"))))
1118 (build-system python-build-system)
1123 `(("ffmpeg" ,ffmpeg)))
1124 (synopsis "Download videos, audios, or images from Web sites")
1126 "You-Get is a command-line utility to download media contents (videos,
1127 audio, images) from the Web. It can use either mpv or vlc for playback.")
1128 (home-page "https://you-get.org/")
1129 (license license:expat)))
1131 (define-public libbluray
1137 (uri (string-append "https://download.videolan.org/videolan/"
1138 name "/" version "/"
1139 name "-" version ".tar.bz2"))
1142 "1k3lag4lxi2jjd3zh4wcb5l3hadzm54j5kagh92yzfy76p9svqzp"))))
1143 (build-system gnu-build-system)
1145 `(#:configure-flags '("--disable-bdjava")
1147 (modify-phases %standard-phases
1148 (add-before 'build 'fix-dlopen-paths
1149 (lambda* (#:key inputs #:allow-other-keys)
1150 (let ((libaacs (assoc-ref inputs "libaacs"))
1151 (libbdplus (assoc-ref inputs "libbdplus")))
1152 (substitute* "src/libbluray/disc/aacs.c"
1154 (string-append "\"" libaacs "/lib/libaacs\"")))
1155 (substitute* "src/libbluray/disc/bdplus.c"
1157 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1159 (native-inputs `(("pkg-config" ,pkg-config)))
1161 `(("fontconfig" ,fontconfig)
1162 ("freetype" ,freetype)
1163 ("libaacs" ,libaacs)
1164 ("libbdplus" ,libbdplus)
1165 ("libxml2" ,libxml2)))
1166 (home-page "https://www.videolan.org/developers/libbluray.html")
1167 (synopsis "Blu-Ray Disc playback library")
1169 "libbluray is a library designed for Blu-Ray Disc playback for media
1170 players, like VLC or MPlayer.")
1171 (license license:lgpl2.1+)))
1173 (define-public libdvdread
1179 (uri (string-append "https://download.videolan.org/videolan/"
1180 name "/" version "/"
1181 name "-" version ".tar.bz2"))
1184 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1185 (build-system gnu-build-system)
1186 (home-page "http://dvdnav.mplayerhq.hu/")
1187 (synopsis "Library for reading video DVDs")
1189 "Libdvdread provides a simple foundation for reading DVD video
1190 disks. It provides the functionality that is required to access many
1191 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1192 authentication and descrambling (if an external libdvdcss library is
1194 (license license:gpl2+)))
1196 (define-public libdvdnav
1202 (uri (string-append "https://download.videolan.org/videolan/"
1203 name "/" version "/"
1204 name "-" version ".tar.bz2"))
1207 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1208 (build-system gnu-build-system)
1210 `(("pkg-config" ,pkg-config)))
1212 `(("libdvdread" ,libdvdread)))
1213 (home-page "http://dvdnav.mplayerhq.hu/")
1214 (synopsis "Library for video DVD navigation features")
1216 "Libdvdnav is a library for developers of multimedia
1217 applications. It allows easy use of sophisticated DVD navigation features
1218 such as DVD menus, multiangle playback and even interactive DVD games. All
1219 this functionality is provided through a simple API which provides the DVD
1220 playback as a single logical stream of blocks, intermitted by special
1221 dvdnav events to report certain conditions. The main usage of libdvdnav is
1222 a loop regularly calling a function to get the next block, surrounded by
1223 additional calls to tell the library of user interaction. The whole
1224 DVD virtual machine and internal playback states are completely
1226 (license license:gpl2+)))
1228 (define-public libdvdnav-4
1236 "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1240 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1242 `(("pkg-config" ,pkg-config)
1243 ("autoconf" ,autoconf)
1244 ("automake" ,automake)
1245 ("libtool" ,libtool)))
1251 (zero? (system* "autoreconf" "-vif")))
1252 %standard-phases)))))
1254 (define-public libdvdcss
1260 (uri (string-append "https://download.videolan.org/pub/"
1261 name "/" version "/"
1262 name "-" version ".tar.bz2"))
1265 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1266 (build-system gnu-build-system)
1267 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1268 (synopsis "Library for accessing DVDs as block devices")
1270 "libdvdcss is a simple library designed for accessing DVDs like a block
1271 device without having to bother about the decryption.")
1272 (license license:gpl2+)))
1274 (define-public srt2vtt
1281 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1285 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1286 (build-system gnu-build-system)
1288 `(("guile" ,guile-2.0)))
1289 (synopsis "SubRip to WebVTT subtitle converter")
1290 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1291 for use with HTML5 video.")
1292 (home-page "http://dthompson.us/pages/software/srt2vtt")
1293 (license license:gpl3+)))
1295 (define-public avidemux
1302 "mirror://sourceforge/" name "/" name "/" version "/"
1303 name "_" version ".tar.gz"))
1306 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1307 (patches (search-patches "avidemux-install-to-lib.patch"))))
1308 (build-system cmake-build-system)
1310 `(("pkg-config" ,pkg-config)))
1311 ;; FIXME: Once packaged, add libraries not found during the build.
1313 `(("alsa-lib" ,alsa-lib)
1314 ("fontconfig" ,fontconfig)
1315 ("freetype" ,freetype)
1316 ("fribidi" ,fribidi)
1321 ("libvdpau" ,libvdpau)
1322 ("libvorbis" ,libvorbis)
1326 ("pulseaudio" ,pulseaudio)
1327 ("python" ,python-wrapper)
1328 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1329 ;("qtbase" ,qtbase) with -std=gnu++11.
1330 ;("qttools" ,qttools)
1336 `(#:tests? #f ; no check target
1338 ;; Make sure files inside the included ffmpeg tarball are
1340 (modify-phases %standard-phases
1341 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1343 (with-directory-excursion "avidemux_core/ffmpeg_package"
1344 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1345 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1346 (add-after 'patch-source-shebangs 'repack-ffmpeg
1348 (with-directory-excursion "avidemux_core/ffmpeg_package"
1349 (substitute* "ffmpeg-2.7.6/configure"
1350 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1351 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1352 ;; avoid non-determinism in the archive
1353 "--sort=name" "--mtime=@0"
1354 "--owner=root:0" "--group=root:0")
1355 (delete-file-recursively "ffmpeg-2.7.6"))))
1358 ;; Copy-paste settings from the cmake build system.
1359 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1360 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1362 (lambda* (#:key inputs outputs #:allow-other-keys)
1364 ((out (assoc-ref outputs "out"))
1365 (lib (string-append out "/lib"))
1367 (sdl (assoc-ref inputs "sdl"))
1369 (lambda* (component srcdir #:optional (args '()))
1370 (let ((builddir (string-append "build_" component)))
1372 (with-directory-excursion builddir
1375 (apply system* "cmake"
1376 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1377 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1378 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1379 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1380 "\"-Wl,-rpath=" lib "\"")
1381 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1382 (string-append "-DSDL_INCLUDE_DIR="
1384 (string-append "../" srcdir)
1387 (system* "make" "-j"
1388 (number->string (parallel-job-count)))
1389 (system* "make" "install"))))))))
1391 (and (build_component "core" "avidemux_core")
1392 (build_component "cli" "avidemux/cli")
1393 (build_component "qt4" "avidemux/qt4")
1394 (build_component "plugins_common" "avidemux_plugins"
1395 '("-DPLUGIN_UI=COMMON"))
1396 (build_component "plugins_cli" "avidemux_plugins"
1397 '("-DPLUGIN_UI=CLI"))
1398 (build_component "plugins_qt4" "avidemux_plugins"
1399 '("-DPLUGIN_UI=QT4"))
1400 (build_component "plugins_settings" "avidemux_plugins"
1401 '("-DPLUGIN_UI=SETTINGS")))
1402 ;; Remove .exe and .dll file.
1403 (delete-file-recursively
1404 (string-append out "/share/ADM6_addons")))))
1405 (delete 'install))))
1406 (home-page "http://fixounet.free.fr/avidemux/")
1407 (synopsis "Video editor")
1408 (description "Avidemux is a video editor designed for simple cutting,
1409 filtering and encoding tasks. It supports many file types, including AVI,
1410 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1411 can be automated using projects, job queue and powerful scripting
1413 ;; Software with various licenses is included, see License.txt.
1414 (license license:gpl2+)))
1416 (define-public vapoursynth
1418 (name "vapoursynth")
1423 "https://github.com/vapoursynth/vapoursynth/archive/R"
1425 (file-name (string-append name "-" version ".tar.gz"))
1428 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1429 (build-system gnu-build-system)
1431 `(("autoconf" ,autoconf)
1432 ("automake" ,automake)
1433 ("cython" ,python-cython)
1434 ("libtool" ,libtool)
1435 ("pkg-config" ,pkg-config)
1439 `(("ffmpeg" ,ffmpeg)
1441 ("tesseract-ocr" ,tesseract-ocr)
1445 (modify-phases %standard-phases
1449 (zero? (system* "sh" "autogen.sh")))))))
1450 (home-page "http://www.vapoursynth.com/")
1451 (synopsis "Video processing framework")
1452 (description "VapourSynth is a C++ library and Python module for video
1453 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1454 multithreading, generalized colorspaces, per frame properties, and videos with
1456 ;; src/core/cpufeatures only allows x86, ARM or PPC
1457 (supported-systems (delete "mips64el-linux" %supported-systems))
1458 ;; As seen from the source files.
1459 (license license:lgpl2.1+)))
1468 "http://downloads.xvid.org/downloads/xvidcore-"
1469 version ".tar.bz2"))
1472 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1473 (build-system gnu-build-system)
1474 (native-inputs `(("yasm" ,yasm)))
1477 (modify-phases %standard-phases
1479 'configure 'pre-configure
1481 (chdir "build/generic")
1482 (substitute* "configure"
1483 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1484 ;; No 'check' target.
1486 (home-page "https://www.xvid.com/")
1487 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1488 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1489 codec library. It uses ASP features such as b-frames, global and quarter
1490 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1491 and custom quantization matrices.")
1492 (license license:gpl2+)))
1494 (define-public livestreamer
1496 (name "livestreamer")
1501 "https://github.com/chrippa/livestreamer/archive/v"
1503 (file-name (string-append "livestreamer-" version ".tar.gz"))
1506 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1507 (build-system python-build-system)
1509 '(#:tests? #f)) ; tests rely on external web servers
1511 `(("python-requests" ,python-requests)))
1512 (synopsis "Internet video stream viewer")
1513 (description "Livestreamer is a command-line utility that extracts streams
1514 from various services and pipes them into a video playing application.")
1515 (home-page "http://livestreamer.io/")
1516 (license license:bsd-2)))
1524 (uri (string-append "https://github.com/mltframework/mlt/"
1525 "archive/v" version ".tar.gz"))
1526 (file-name (string-append name "-" version ".tar.gz"))
1529 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1530 (build-system gnu-build-system)
1532 `(#:tests? #f ; no tests
1533 #:make-flags '("CC=gcc")
1535 (list "--enable-gpl3"
1538 (modify-phases %standard-phases
1540 'configure 'override-LDFLAGS
1541 (lambda* (#:key outputs #:allow-other-keys)
1542 (substitute* "config.mak"
1544 (string-append "LDFLAGS+=-Wl,-rpath="
1545 (assoc-ref outputs "out")
1549 `(("alsa-lib" ,alsa-lib)
1551 ("libxml2" ,libxml2)
1554 ("libsamplerate" ,libsamplerate)
1555 ("pulseaudio" ,pulseaudio)
1559 `(("pkg-config" ,pkg-config)))
1560 (home-page "https://www.mltframework.org/")
1561 (synopsis "Author, manage, and run multitrack audio/video compositions")
1563 "MLT is a multimedia framework, designed and developed for television
1564 broadcasting. It provides a toolkit for broadcasters, video editors, media
1565 players, transcoders, web streamers and many more types of applications. The
1566 functionality of the system is provided via an assortment of ready to use
1567 tools, XML authoring components, and an extensible plug-in based API.")
1568 (license license:lgpl2.1+)))
1570 (define-public v4l-utils
1576 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1577 "/v4l-utils-" version ".tar.bz2"))
1580 "0vpl3jl0x441y7b5cn7zhdsyi954hp9h2p30jhnr1zkx1rpxsiss"))))
1581 (build-system gnu-build-system)
1584 (list (string-append "--with-udevdir="
1585 (assoc-ref %outputs "out")
1587 "CXXFLAGS=-std=gnu++11")))
1590 ("pkg-config" ,pkg-config)))
1592 `(("alsa-lib" ,alsa-lib)
1594 ("libjpeg" ,libjpeg)
1598 (synopsis "Realtime video capture utilities for Linux")
1599 (description "The v4l-utils provide a series of libraries and utilities to
1600 be used for realtime video capture via Linux-specific APIs.")
1601 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1602 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1603 (license (list license:lgpl2.1+ license:gpl2))))
1611 (uri (string-append "https://github.com/jp9000/obs-studio"
1612 "/archive/" version ".tar.gz"))
1613 (file-name (string-append name "-" version ".tar.gz"))
1616 "043f8mfdh4ll0hpivpyg3iniirckwsgri0gzamyrba1yhf2c2ibr"))))
1617 (build-system cmake-build-system)
1619 `(#:tests? #f)) ; no tests
1621 `(("pkg-config" ,pkg-config)))
1623 `(("alsa-lib" ,alsa-lib)
1627 ("fontconfig" ,fontconfig)
1628 ("freetype" ,freetype)
1630 ("jansson" ,jansson)
1631 ("libx264" ,libx264)
1632 ("libxcomposite" ,libxcomposite)
1634 ("pulseaudio" ,pulseaudio)
1636 ("qtx11extras" ,qtx11extras)
1638 ("v4l-utils" ,v4l-utils)
1640 (synopsis "Live streaming software")
1641 (description "Open Broadcaster Software provides a graphical interface for
1642 video recording and live streaming. OBS supports capturing audio and video
1643 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1645 (home-page "https://obsproject.com")
1646 (supported-systems '("x86_64-linux" "i686-linux"))
1647 (license license:gpl2+)))
1649 (define-public libvdpau
1656 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1657 name "-" version ".tar.bz2"))
1660 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1661 (build-system gnu-build-system)
1663 `(("pkg-config" ,pkg-config)))
1665 `(("dri2proto" ,dri2proto)
1666 ("libx11" ,libx11 "out")
1667 ("libxext" ,libxext)))
1668 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1669 (synopsis "Video Decode and Presentation API")
1670 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1671 provides an interface to video decode acceleration and presentation hardware
1672 present in modern GPUs.")
1673 (license (license:x11-style "file://COPYING"))))
1675 (define-public vdpauinfo
1682 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1683 name "-" version ".tar.gz"))
1686 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1687 (build-system gnu-build-system)
1689 `(("pkg-config" ,pkg-config)
1690 ("libx11" ,libx11)))
1692 `(("libvdpau" ,libvdpau)))
1693 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1694 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1695 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1697 (license (license:x11-style "file://COPYING"))))
1699 (define-public recordmydesktop
1701 (name "recordmydesktop")
1705 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1706 version "/recordmydesktop-" version ".tar.gz"))
1709 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1710 (build-system gnu-build-system)
1711 (inputs `(("popt" ,popt)
1716 ("libxfixes" ,libxfixes)
1717 ("libxdamage" ,libxdamage)
1718 ("libxext" ,libxext)
1719 ("alsa-lib" ,alsa-lib)
1720 ("libvorbis" ,libvorbis)
1721 ("libtheora" ,libtheora)))
1722 (home-page "http://recordmydesktop.sourceforge.net/")
1723 (synopsis "Desktop session video recorder")
1725 "recordMyDesktop is a command-line tool that captures the activity in
1726 your graphical desktop and encodes it as a video. This is a useful tool for
1727 making @dfn{screencasts}.")
1728 (license license:gpl2+)))
1730 (define-public libsmpeg
1737 (url "svn://svn.icculus.org/smpeg/trunk/")
1738 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1739 (file-name (string-append name "-" version "-checkout"))
1742 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1743 (build-system gnu-build-system)
1745 `(#:phases (modify-phases %standard-phases
1746 (add-after 'unpack 'autogen.sh
1748 (zero? (system* "sh" "autogen.sh")))))))
1750 `(("autoconf" ,autoconf)
1751 ("automake" ,automake)))
1754 (home-page "http://icculus.org/smpeg/")
1755 (synopsis "SDL MPEG decoding library")
1757 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1758 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1759 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1760 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1761 and MPEG system streams.")
1762 (license (list license:expat
1767 (define-public libbdplus
1774 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1775 version "/" name "-" version ".tar.bz2"))
1777 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1779 `(("libgcrypt" ,libgcrypt)))
1780 (build-system gnu-build-system)
1781 (home-page "https://www.videolan.org/developers/libbdplus.html")
1782 (synopsis "Library for decrypting certain Blu-Ray discs")
1783 (description "libbdplus is a library which implements the BD+ System
1785 (license license:lgpl2.1+)))
1787 (define-public libaacs
1794 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1795 version "/" name "-" version ".tar.bz2"))
1797 (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm"))))
1799 `(("libgcrypt" ,libgcrypt)))
1803 (build-system gnu-build-system)
1804 (home-page "https://www.videolan.org/developers/libaacs.html")
1805 (synopsis "Library for decrypting certain Blu-Ray discs")
1806 (description "libaacs is a library which implements the Advanced Access
1807 Content System specification.")
1808 (license license:lgpl2.1+)))
1810 (define-public mps-youtube
1812 (name "mps-youtube")
1817 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
1818 "archive/v" version ".tar.gz"))
1819 (file-name (string-append name "-" version ".tar.gz"))
1822 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
1823 (build-system python-build-system)
1825 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
1826 ;; test suite results differ depending on the country and also introduce
1827 ;; non-determinism in the tests.
1828 ;; https://github.com/mps-youtube/mps-youtube/issues/556
1831 `(("python-pafy" ,python-pafy)
1832 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
1833 (home-page "https://github.com/mps-youtube/mps-youtube")
1834 (synopsis "Terminal based YouTube player and downloader")
1836 "@code{mps-youtube} is based on mps, a terminal based program to
1837 search, stream and download music. This implementation uses YouTube as
1838 a source of content and can play and download video as well as audio.
1839 It can use either mpv or mplayer for playback, and for conversion of
1840 formats ffmpeg or libav is used. Users should install one of the
1841 supported players in addition to this package.")
1842 (license license:gpl3+)))
1844 (define-public handbrake
1850 (uri (string-append "https://handbrake.fr/rotation.php?file="
1851 "HandBrake-" version ".tar.bz2"))
1852 (file-name (string-append "handbrake-" version ".tar.bz2"))
1855 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
1856 (patches (search-patches "handbrake-pkg-config-path.patch"))
1857 (modules '((guix build utils)))
1859 ;; Remove bundled libraries and source not necessary for
1860 ;; running under a GNU environment.
1862 (for-each delete-file-recursively '("contrib" "macosx" "win"))
1864 (build-system glib-or-gtk-build-system)
1866 `(("automake" ,automake) ;gui subpackage must be bootstrapped
1867 ("autoconf" ,autoconf)
1868 ("curl" ,curl) ;not actually used, but tested for
1869 ("intltool" ,intltool)
1870 ("libtool" ,libtool)
1871 ("pkg-config" ,pkg-config)
1872 ("python" ,python-2))) ;for configuration
1875 ("dbus-glib" ,dbus-glib)
1877 ("fontconfig" ,fontconfig)
1878 ("freetype" ,freetype)
1880 ("gstreamer" ,gstreamer)
1881 ("gst-plugins-base" ,gst-plugins-base)
1885 ("libbluray" ,libbluray)
1886 ("libdvdnav" ,libdvdnav)
1887 ("libdvdread" ,libdvdread)
1888 ("libgudev" ,libgudev)
1889 ("libmpeg2" ,libmpeg2)
1890 ("libnotify" ,libnotify)
1892 ("libsamplerate" ,libsamplerate)
1893 ("libtheora" ,libtheora)
1894 ("libvorbis" ,libvorbis)
1896 ("libxml2" ,libxml2)
1897 ("libx264" ,libx264)
1901 `(#:tests? #f ;tests require Ruby and claim to be unsupported
1903 (modify-phases %standard-phases
1904 (add-before 'patch-source-shebangs 'bootstrap-gtk
1905 ;; Run bootstrap ahead of time so that shebangs get patched.
1907 (setenv "CONFIG_SHELL" (which "sh"))
1908 (setenv "NOCONFIGURE" "1")
1909 ;; Patch the Makefile so that it doesn't bootstrap again.
1910 (substitute* "gtk/module.rules"
1911 ((".*autogen\\.sh.*") ""))
1912 (zero? (system* "sh" "./gtk/autogen.sh"))))
1913 (add-before 'configure 'disable-contrib
1915 (substitute* "make/include/main.defs"
1916 ;; Disable unconditional inclusion of some "contrib"
1917 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
1918 ;; and libbluray), which would lead to fetching and
1919 ;; building of these libraries. Use our own instead.
1920 (("MODULES \\+= contrib") "# MODULES += contrib"))
1922 (add-before 'configure 'fix-x265-linking
1924 (substitute* "test/module.defs"
1925 ;; Fix missing library during linking error
1926 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
1929 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1930 ;; 'configure' is not an autoconf-generated script, and
1931 ;; errors on unrecognized arguments,
1932 ;; e.g. --enable-fast-install
1933 (let ((out (assoc-ref outputs "out")))
1934 (zero? (apply system* "./configure"
1935 (string-append "--prefix=" out)
1936 (or configure-flags '()))))))
1937 (add-after 'configure 'chdir-build
1938 (lambda _ (chdir "./build") #t)))))
1939 (home-page "https://handbrake.fr")
1940 (synopsis "Video transcoder")
1942 "HandBrake is a tool for converting video from any format to a selection
1943 of modern, widely supported codecs.")
1944 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
1945 (license (list license:gpl2+ license:bsd-3))))
1947 (define-public openh264
1953 (uri (string-append "https://github.com/cisco/"
1954 name "/archive/v" version ".tar.gz"))
1955 (file-name (string-append name "-" version ".tar.gz"))
1958 "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
1959 (build-system gnu-build-system)
1962 ("python" ,python)))
1964 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1965 #:test-target "test"
1966 #:phases (modify-phases %standard-phases
1967 ;; no configure script
1968 (delete 'configure))))
1969 (home-page "http://www.openh264.org/")
1970 (synopsis "H264 decoder library")
1972 "Openh264 is a library which can decode H264 video streams.")
1973 (license license:bsd-2)))
1975 (define-public libmp4v2
1982 ;; XXX: The new location of upstream is uncertain and will become relevant the
1983 ;; moment when the googlecode archive shuts down. It is past the date it
1984 ;; should've been turned off. I tried to communicate with upstream, but this
1985 ;; wasn't very responsive and not very helpful. The short summary is, it is
1986 ;; chaos when it comes to the amount of forks and only time will tell where
1987 ;; the new upstream location is.
1988 (uri (string-append "https://storage.googleapis.com/google-"
1989 "code-archive-downloads/v2/"
1990 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
1991 (file-name (string-append name "-" version ".tar.bz2"))
1994 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
1995 (build-system gnu-build-system)
1997 "static")) ; 3.7MiB .a file
2000 (modify-phases %standard-phases
2001 (add-after 'unpack 'remove-dates
2003 ;; Make the build reproducible.
2004 (substitute* "configure"
2005 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2006 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2008 (add-after 'install 'move-static-libraries
2009 (lambda* (#:key outputs #:allow-other-keys)
2010 ;; Move static libraries to the "static" output.
2011 (let* ((out (assoc-ref outputs "out"))
2012 (lib (string-append out "/lib"))
2013 (static (assoc-ref outputs "static"))
2014 (slib (string-append static "/lib")))
2016 (for-each (lambda (file)
2017 (install-file file slib)
2019 (find-files lib "\\.a$"))
2022 `(("help2man" ,help2man)
2023 ("dejagnu" ,dejagnu)))
2024 (home-page "https://code.google.com/archive/p/mp4v2/")
2025 (synopsis "API to create and modify mp4 files")
2027 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2028 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2029 file format that has been used as a multimedia file format in a variety of platforms and
2030 applications. It is a very powerful and extensible format that can accommodate
2031 practically any type of media.")
2032 (license license:mpl1.1)))