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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages video)
34 #:use-module (ice-9 match)
35 #:use-module (srfi srfi-1)
36 #:use-module (srfi srfi-26)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix utils)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module (guix svn-download)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system glib-or-gtk)
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system waf)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages algebra)
50 #:use-module (gnu packages audio)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages avahi)
53 #:use-module (gnu packages base)
54 #:use-module (gnu packages bison)
55 #:use-module (gnu packages cdrom)
56 #:use-module (gnu packages cmake)
57 #:use-module (gnu packages compression)
58 #:use-module (gnu packages curl)
59 #:use-module (gnu packages databases)
60 #:use-module (gnu packages dejagnu)
61 #:use-module (gnu packages elf)
62 #:use-module (gnu packages flex)
63 #:use-module (gnu packages fontutils)
64 #:use-module (gnu packages freedesktop)
65 #:use-module (gnu packages fribidi)
66 #:use-module (gnu packages gettext)
67 #:use-module (gnu packages ghostscript)
68 #:use-module (gnu packages gl)
69 #:use-module (gnu packages glib)
70 #:use-module (gnu packages guile)
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages gnupg)
73 #:use-module (gnu packages gstreamer)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages linux)
77 #:use-module (gnu packages lua)
78 #:use-module (gnu packages m4)
79 #:use-module (gnu packages man)
80 #:use-module (gnu packages mp3)
81 #:use-module (gnu packages ncurses)
82 #:use-module (gnu packages ocr)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages pkg-config)
85 #:use-module (gnu packages popt)
86 #:use-module (gnu packages pulseaudio)
87 #:use-module (gnu packages python)
88 #:use-module (gnu packages qt)
89 #:use-module (gnu packages sdl)
90 #:use-module (gnu packages ssh)
91 #:use-module (gnu packages texinfo)
92 #:use-module (gnu packages textutils)
93 #:use-module (gnu packages tls)
94 #:use-module (gnu packages version-control)
95 #:use-module (gnu packages web)
96 #:use-module (gnu packages webkit)
97 #:use-module (gnu packages xdisorg)
98 #:use-module (gnu packages xiph)
99 #:use-module (gnu packages xml)
100 #:use-module (gnu packages xorg)
101 #:use-module (gnu packages assembly)
102 #:use-module (gnu packages zip))
110 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
111 version "/" name "-" version ".tar.gz"))
114 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
115 (build-system gnu-build-system)
117 `(("makeinfo" ,texinfo)))
119 `(("ncurses" ,ncurses)))
122 (modify-phases %standard-phases
124 (lambda* (#:key build inputs outputs #:allow-other-keys)
125 ;; This old `configure' script doesn't support
126 ;; variables passed as arguments.
127 (let ((out (assoc-ref outputs "out"))
128 (ncurses (assoc-ref inputs "ncurses")))
129 (setenv "CONFIG_SHELL" (which "bash"))
130 (zero? (system* "./configure"
131 (string-append "--prefix=" out)
132 (string-append "--build=" build)
133 ;; The ancient config.guess is unable to
134 ;; guess the host triplet on mips64el.
135 ,@(if (string=? "mips64el-linux"
137 '("--host=mips64el-unknown-linux-gnu")
139 (string-append "--with-ncurses="
141 (home-page "http://aa-project.sourceforge.net/aalib/")
142 (synopsis "ASCII-art library")
144 "AA-lib is a low level gfx library which does not require graphics device.
145 In fact, there is no graphical output possible. AA-lib replaces those
146 old-fashioned output methods with powerful ascii-art renderer.")
147 (license license:lgpl2.0+)))
149 (define-public liba52
156 ;; A mirror://sourceforge URI doesn't work, presumably
157 ;; because the SourceForge project is misconfigured.
158 "http://liba52.sourceforge.net/files/a52dec-" version
162 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
163 (patches (search-patches "liba52-enable-pic.patch"
164 "liba52-set-soname.patch"
165 "liba52-use-mtune-not-mcpu.patch"
166 "liba52-link-with-libm.patch"))))
167 (build-system gnu-build-system)
168 ;; XXX We need to run ./bootstrap because of the build system fixes above.
170 `(("autoconf" ,autoconf)
171 ("automake" ,automake)
172 ("libtool" ,libtool)))
173 (arguments `(#:configure-flags '("--enable-shared")
175 (modify-phases %standard-phases
176 ;; XXX We need to run ./bootstrap because of the build
177 ;; system fixes above.
180 (lambda _ (zero? (system* "sh" "bootstrap")))))))
181 (home-page "http://liba52.sourceforge.net/")
182 (synopsis "ATSC A/52 stream decoder")
183 (description "liba52 is a library for decoding ATSC A/52 streams. The
184 A/52 standard is used in a variety of applications, including digital
185 television and DVD. It is also known as AC-3.")
186 (license license:gpl2+)))
188 (define-public libmpeg2
194 ;; A mirror://sourceforge URI doesn't work, presumably
195 ;; because the SourceForge project is misconfigured.
196 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
197 name "-" version ".tar.gz"))
200 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
208 (build-system gnu-build-system)
209 (home-page "http://libmpeg2.sourceforge.net/")
210 (synopsis "MPEG1 and MPEG2 video decoder library")
212 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
213 (license license:gpl2+)))
215 (define-public libx264
218 (version "20170224-2245")
221 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
222 "x264-snapshot-" version ".tar.bz2"))
225 "0paw8vzsy2qh5jf6xg2i1risjwyvmxgfnivly4gh0bib62cp4vib"))))
226 (build-system gnu-build-system)
228 `(("pkg-config" ,pkg-config)
230 ;; TODO: Add gpac input
232 `(#:tests? #f ;no check target
233 #:configure-flags '("--enable-shared"
234 ;; Don't build the command-line program. If we
235 ;; want it later, we should do so in a different
236 ;; package to avoid a circular dependency (the x264
237 ;; program depends on ffmpeg and ffmpeg depends on
241 ;; On MIPS, we must pass "--disable-asm" or else
242 ;; configure fails after printing: "You specified a
243 ;; pre-MSA CPU in your CFLAGS. If you really want
244 ;; to run on such a CPU, configure with
246 ,@(if (string-prefix? "mips"
247 (or (%current-target-system)
251 (home-page "https://www.videolan.org/developers/x264.html")
252 (synopsis "H.264 video coding library")
253 (description "libx264 is an advanced encoding library for creating
254 H.264 (MPEG-4 AVC) video streams.")
255 (license (list license:gpl2+ ;most files
256 license:isc ;common/x86/x86inc.asm
257 license:lgpl2.1+ ;extras/getopt.c
258 license:bsd-3 ;extras/inttypes.h
259 (license:non-copyleft ;extras/cl*.h
261 "See extras/cl.h in the distribution.")))))
270 (uri (string-append "https://download.videolan.org/videolan/x265/"
271 "x265_" version ".tar.gz"))
274 "07z4ydxg0lk6j43h0wlh2xddb91cy4y4mny2ln71d4278b1hllj7"))
275 (modules '((guix build utils)))
277 '(delete-file-recursively "source/compat/getopt"))))
278 (build-system cmake-build-system)
280 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
282 (modify-phases %standard-phases
283 (add-before 'configure 'prepare-build
285 (delete-file-recursively "build")
288 (home-page "http://x265.org/")
289 (synopsis "Library for encoding h.265/HEVC video streams")
290 (description "x265 is a H.265 / HEVC video encoder application library,
291 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
292 (license license:gpl2+)))
294 (define-public libass
301 "https://github.com/libass/libass/releases/download/"
302 version "/libass-" version ".tar.xz"))
305 "0b9cj5xfsa7zwlk5m146fhv102v51iqs3rapq0n2xrz30k8p9a7q"))))
306 (build-system gnu-build-system)
308 `(("pkg-config" ,pkg-config)
311 `(("freetype" ,freetype)
313 ("fontconfig" ,fontconfig)
314 ("harfbuzz" ,harfbuzz)
316 (home-page "https://github.com/libass/libass")
317 (synopsis "Subtitle rendering library for the ASS/SSA format")
318 (description "libass is a subtitle rendering library for the
319 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
320 (license license:isc)))
322 (define-public libcaca
325 (version "0.99.beta19")
328 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
332 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
333 (build-system gnu-build-system)
334 (native-inputs `(("pkg-config" ,pkg-config)))
336 `(("freeglut" ,freeglut)
343 (home-page "http://caca.zoy.org/wiki/libcaca")
344 (synopsis "Colour ASCII-art library")
345 (description "libcaca is a graphics library that outputs text instead of
346 pixels, so that it can work on older video cards or text terminals. It
347 supports Unicode, 2048 colors, dithering of color images, and advanced text
349 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
351 (define-public libdca
358 "http://download.videolan.org/pub/videolan/libdca/"
359 version "/libdca-" version ".tar.bz2"))
362 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
363 (build-system gnu-build-system)
364 (home-page "http://www.videolan.org/developers/libdca.html")
365 (synopsis "DTS Coherent Acoustics decoder")
366 (description "libdca is a library for decoding DTS Coherent Acoustics
368 (license license:gpl2+)))
377 "mirror://sourceforge/" name "/" name "/"
378 version "/" name "-" version ".tar.gz"))
381 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
382 (build-system gnu-build-system)
383 (native-inputs `(("pkg-config" ,pkg-config)))
384 (inputs `(("libxv" ,libxv)))
385 (home-page "http://libdv.sourceforge.net/")
386 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
387 (description "The Quasar DV codec (libdv) is a software codec for DV
388 video, the encoding format used by most digital camcorders, typically those
389 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
390 developed according to the official standards for DV video: IEC 61834 and
392 (license license:lgpl2.1+)))
402 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
405 (base32 "1j8mb3p9kafhp30r3kmndnrklvzycc2ym0w6xdqz6m7jap626028"))))
406 (build-system gnu-build-system)
408 `(("pkg-config" ,pkg-config)))
413 ("libxfixes" ,libxfixes)
417 (modify-phases %standard-phases
419 'build 'fix-dlopen-paths
420 (lambda* (#:key outputs #:allow-other-keys)
421 (let ((out (assoc-ref outputs "out")))
422 (substitute* "va/drm/va_drm_auth_x11.c"
423 (("\"libva-x11\\.so\\.%d\"")
424 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
425 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
426 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
428 (list (string-append "--with-drivers-path="
429 (assoc-ref %build-inputs "mesa") "/lib/dri"))
430 ;; However, we can't write to mesa's store directory, so override the
431 ;; following make variable to install the dummy driver to libva's
432 ;; $prefix/lib/dri directory.
434 (list (string-append "dummy_drv_video_ladir="
435 (assoc-ref %outputs "out") "/lib/dri"))))
436 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
437 (synopsis "Video acceleration library")
438 (description "The main motivation for VA-API (Video Acceleration API) is
439 to enable hardware accelerated video decode/encode at various
440 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
441 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
442 (license license:expat)))
444 (define-public ffmpeg
450 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
454 "0ymg1mkg1n0770gmjfqp79p5ijxq04smfrsrrxc8pjc0y0agyf3f"))))
455 (build-system gnu-build-system)
457 `(("fontconfig" ,fontconfig)
458 ("freetype" ,freetype)
464 ("libbluray" ,libbluray)
466 ("libcdio-paranoia" ,libcdio-paranoia)
467 ("libtheora" ,libtheora)
468 ("libvdpau" ,libvdpau)
469 ("libvorbis" ,libvorbis)
475 ("pulseaudio" ,pulseaudio)
486 ("pkg-config" ,pkg-config)
488 ("python" ,python-2) ; scripts use interpreter python2
492 `(#:test-target "fate"
494 ;; possible additional inputs:
495 ;; --enable-avisynth enable reading of AviSynth script
497 ;; --enable-frei0r enable frei0r video filtering
498 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
499 ;; --enable-libcelt enable CELT decoding via libcelt [no]
500 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
501 ;; and libraw1394 [no]
502 ;; --enable-libfaac enable AAC encoding via libfaac [no]
503 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
504 ;; --enable-libflite enable flite (voice synthesis) support via
506 ;; --enable-libgme enable Game Music Emu via libgme [no]
507 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
508 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
509 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
510 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
511 ;; --enable-libnut enable NUT (de)muxing via libnut,
512 ;; native (de)muxer exists [no]
513 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
514 ;; libopencore-amrnb [no]
515 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
516 ;; libopencore-amrwb [no]
517 ;; --enable-libopencv enable video filtering via libopencv [no]
518 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
520 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
521 ;; --enable-libschroedinger enable Dirac de/encoding via
522 ;; libschroedinger [no]
523 ;; --enable-libshine enable fixed-point MP3 encoding via
525 ;; --enable-libssh enable SFTP protocol via libssh [no]
526 ;; (libssh2 does not work)
527 ;; --enable-libstagefright-h264 enable H.264 decoding via
528 ;; libstagefright [no]
529 ;; --enable-libutvideo enable Ut Video encoding and decoding via
531 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
532 ;; --enable-libvidstab enable video stabilization using
534 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
535 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
536 ;; libvo-amrwbenc [no]
537 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
538 ;; --enable-libxavs enable AVS encoding via xavs [no]
539 ;; --enable-libzmq enable message passing via libzmq [no]
540 ;; --enable-libzvbi enable teletext support via libzvbi [no]
541 ;; --enable-opencl enable OpenCL code
542 '("--enable-avresample"
543 "--enable-gpl" ; enable optional gpl licensed parts
545 "--enable-fontconfig"
552 "--enable-libfreetype"
553 "--enable-libmp3lame"
559 "--enable-libtwolame"
569 "--enable-runtime-cpudetect"
571 ;; Runtime cpu detection is not implemented on
572 ;; MIPS, so we disable some features.
575 "--disable-mipsdspr2"
578 (modify-phases %standard-phases
581 ;; configure does not work followed by "SHELL=..." and
582 ;; "CONFIG_SHELL=..."; set environment variables instead
583 (lambda* (#:key outputs configure-flags #:allow-other-keys)
584 (let ((out (assoc-ref outputs "out")))
585 (substitute* "configure"
586 (("#! /bin/sh") (string-append "#!" (which "sh"))))
587 (setenv "SHELL" (which "bash"))
588 (setenv "CONFIG_SHELL" (which "bash"))
589 (zero? (apply system*
591 (string-append "--prefix=" out)
592 ;; Add $libdir to the RUNPATH of all the binaries.
593 (string-append "--extra-ldflags=-Wl,-rpath="
597 'check 'set-ld-library-path
599 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
601 (let* ((dso (find-files "." "\\.so$"))
602 (path (string-join (map dirname dso) ":")))
603 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
604 (setenv "LD_LIBRARY_PATH" path)
606 (home-page "https://www.ffmpeg.org/")
607 (synopsis "Audio and video framework")
608 (description "FFmpeg is a complete, cross-platform solution to record,
609 convert and stream audio and video. It includes the libavcodec
610 audio/video codec library.")
611 (license license:gpl2+)))
613 (define-public ffmpeg-2.8
619 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
623 "1rhz7rhmhhh8bjcj3dc82haisn3qjbzqlr7k6d6v7064jgn3maiq"))))
625 (substitute-keyword-arguments (package-arguments ffmpeg)
626 ((#:configure-flags flags)
628 (if (string=? flag "--disable-mipsdsp")
629 "--disable-mipsdspr1"
640 "https://download.videolan.org/pub/videolan/vlc/"
641 version "/vlc-" version ".tar.xz"))
644 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
645 (modules '((guix build utils)))
647 ;; There are two occurrences where __DATE__ and __TIME__ are
648 ;; used to capture the build time and show it to the user.
649 '(substitute* (find-files "." "help\\.c(pp)?$")
650 (("__DATE__") "\"2016\"")
651 (("__TIME__") "\"00:00\"")))))
652 (build-system gnu-build-system)
654 `(("git" ,git) ; needed for a test
655 ("pkg-config" ,pkg-config)))
656 ;; FIXME: Add optional inputs once available.
658 `(("alsa-lib" ,alsa-lib)
662 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
663 ("fontconfig" ,fontconfig)
664 ("freetype" ,freetype)
668 ("libgcrypt" ,libgcrypt)
673 ("libsamplerate" ,libsamplerate)
675 ("libvorbis" ,libvorbis)
676 ("libtheora" ,libtheora)
679 ("libxinerama" ,libxinerama)
686 ("pulseaudio" ,pulseaudio)
687 ("python" ,python-wrapper)
688 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
689 ;("qtbase" ,qtbase) with -std=gnu++11.
690 ;("qtx11extras" ,qtx11extras)
692 ("sdl-image" ,sdl-image)
695 ("xcb-util-keysyms" ,xcb-util-keysyms)))
698 `(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
699 ;; In our case, this led to a test failure:
700 ;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
701 "ac_cv_c_fast_math=no"
703 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
704 (assoc-ref %build-inputs "ffmpeg")
705 "/lib")) ;needed for the tests
708 (modify-phases %standard-phases
709 (add-before 'configure 'remove-visual-tests
710 ;; Some of the tests require using the display to test out VLC,
711 ;; which fails in our sandboxed build system
713 (substitute* "test/run_vlc.sh"
714 (("./vlc --ignore-config") "echo"))
716 (add-after 'install 'regenerate-plugin-cache
717 (lambda* (#:key outputs #:allow-other-keys)
718 ;; The 'install-exec-hook' rule in the top-level Makefile.am
719 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
720 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
721 ;; it references. Thus, we first reset the timestamps of all
722 ;; these files, and then regenerate the cache such that the
723 ;; mtimes it includes are always zero instead of being dependent
724 ;; on the build time.
725 (let* ((out (assoc-ref outputs "out"))
726 (pkglibdir (string-append out "/lib/vlc"))
727 (plugindir (string-append pkglibdir "/plugins"))
728 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
729 ;; TODO: Factorize 'reset-timestamps'.
730 (for-each (lambda (file)
731 (let ((s (lstat file)))
732 (unless (eq? (stat:type s) 'symlink)
733 (utime file 0 0 0 0))))
734 (find-files plugindir))
735 (zero? (system* cachegen plugindir))))))))
736 (home-page "https://www.videolan.org/")
737 (synopsis "Audio and video framework")
738 (description "VLC is a cross-platform multimedia player and framework
739 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
740 treaming protocols.")
741 (license license:gpl2+)))
743 (define-public mplayer
750 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
754 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
755 (build-system gnu-build-system)
756 ;; FIXME: Add additional inputs once available.
758 `(("pkg-config" ,pkg-config)))
760 `(("alsa-lib" ,alsa-lib)
761 ("cdparanoia" ,cdparanoia)
763 ("fontconfig" ,fontconfig)
764 ("freetype" ,freetype)
765 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
768 ("libdvdcss" ,libdvdcss)
769 ("libdvdnav" ,libdvdnav)
771 ("libmpeg2" ,libmpeg2)
772 ("libmpg123" ,mpg123) ; audio codec for MP3
774 ("libtheora" ,libtheora)
775 ("libvdpau" ,libvdpau)
776 ("libvorbis" ,libvorbis)
779 ("libxinerama" ,libxinerama)
781 ("libxxf86dga" ,libxxf86dga)
785 ("pulseaudio" ,pulseaudio)
786 ("python" ,python-wrapper)
792 `(#:tests? #f ; no test target
794 (modify-phases %standard-phases
796 ;; configure does not work followed by "SHELL=..." and
797 ;; "CONFIG_SHELL=..."; set environment variables instead
798 (lambda* (#:key inputs outputs #:allow-other-keys)
799 (let ((out (assoc-ref outputs "out"))
800 (libx11 (assoc-ref inputs "libx11")))
801 (substitute* "configure"
802 (("#! /bin/sh") (string-append "#!" (which "sh"))))
803 (setenv "SHELL" (which "bash"))
804 (setenv "CONFIG_SHELL" (which "bash"))
807 (string-append "--extra-cflags=-I"
808 libx11 "/include") ; to detect libx11
809 "--disable-ffmpeg_a" ; disables bundled ffmpeg
810 (string-append "--prefix=" out)
811 ;; Enable runtime cpu detection where supported,
812 ;; and choose a suitable target.
813 ,@(match (or (%current-target-system)
816 '("--enable-runtime-cpudetection"
817 "--target=x86_64-linux"))
819 '("--enable-runtime-cpudetection"
820 "--target=i686-linux"))
822 '("--target=mips3-linux"))
823 (_ (list (string-append
825 (or (%current-target-system)
826 (nix-system->gnu-triplet
827 (%current-system)))))))
828 "--disable-iwmmxt"))))))))
829 (home-page "https://www.mplayerhq.hu/design7/news.html")
830 (synopsis "Audio and video player")
831 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
832 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
833 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
834 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
835 (license license:gpl2)))
844 "https://github.com/mpv-player/mpv/archive/v" version
848 "059zblcj98fhrns1rwa66mf4km68czpam4nnk8q9qny31bx58654"))
849 (file-name (string-append name "-" version ".tar.gz"))))
850 (build-system waf-build-system)
852 `(("perl" ,perl) ; for zsh completion file
853 ("pkg-config" ,pkg-config)
854 ("python-docutils" ,python-docutils)))
855 ;; Missing features: libguess, Wayland, V4L2
857 `(("alsa-lib" ,alsa-lib)
864 ("libbluray" ,libbluray)
867 ("libcdio-paranoia" ,libcdio-paranoia)
868 ("libdvdread" ,libdvdread)
869 ("libdvdnav" ,libdvdnav)
872 ("libvdpau" ,libvdpau)
875 ("libxinerama" ,libxinerama)
876 ("libxrandr" ,libxrandr)
877 ("libxscrnsaver" ,libxscrnsaver)
879 ;; XXX: lua > 5.2 is not currently supported; see
880 ;; waftools/checks/custom.py
884 ("pulseaudio" ,pulseaudio)
887 ("youtube-dl" ,youtube-dl)
891 (modify-phases %standard-phases
893 'configure 'setup-waf
894 (lambda* (#:key inputs #:allow-other-keys)
895 (copy-file (assoc-ref inputs "waf") "waf")
896 (setenv "CC" "gcc"))))
897 #:configure-flags (list "--enable-libmpv-shared"
899 "--disable-build-date")
900 ;; No check function defined.
902 (home-page "https://mpv.io/")
903 (synopsis "Audio and video player")
904 (description "mpv is a general-purpose audio and video player. It is a
905 fork of mplayer2 and MPlayer. It shares some features with the former
906 projects while introducing many more.")
907 (license license:gpl2+)))
909 (define-public gnome-mpv
916 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
917 "/download/v" version "/gnome-mpv-" version
921 "1hn3mpsxbrwf2m0nz4vzji4i6i896y8kqjb9kijqpk04cnrs3fgz"))))
923 `(("intltool" ,intltool)
924 ("pkg-config" ,pkg-config)))
927 ("libepoxy" ,libepoxy)
929 (build-system glib-or-gtk-build-system)
930 (home-page "https://github.com/gnome-mpv/gnome-mpv")
931 (synopsis "GTK+ frontend for the mpv media player")
932 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
933 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
934 access to mpv's powerful playback capabilities.")
935 (license license:gpl3+)))
937 (define-public libvpx
943 (uri (string-append "http://storage.googleapis.com/"
944 "downloads.webmproject.org/releases/webm/"
945 name "-" version ".tar.bz2"))
948 "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
949 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
950 (build-system gnu-build-system)
953 (modify-phases %standard-phases
955 (lambda* (#:key outputs #:allow-other-keys)
956 (setenv "CONFIG_SHELL" (which "bash"))
957 (let ((out (assoc-ref outputs "out")))
959 (string-append "-Wl,-rpath=" out "/lib"))
960 (zero? (system* "./configure"
963 ;; Limit size to avoid CVE-2015-1258
964 "--size-limit=16384x16384"
965 (string-append "--prefix=" out)))))))
966 #:tests? #f)) ; no check target
970 (synopsis "VP8/VP9 video codec")
971 (description "libvpx is a codec for the VP8/VP9 video compression format.")
972 (license license:bsd-3)
973 (home-page "http://www.webmproject.org/")))
975 (define-public youtube-dl
978 (version "2017.03.02")
981 (uri (string-append "https://yt-dl.org/downloads/"
982 version "/youtube-dl-"
986 "0f86qnppxnbh2c8bmpf0c1xhwk5vqjdzz7pqh9sydhscv8r0209g"))))
987 (build-system python-build-system)
989 ;; The problem here is that the directory for the man page and completion
990 ;; files is relative, and for some reason, setup.py uses the
991 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
992 ;; So, we need pass the prefix directly. In addition, make sure the Bash
993 ;; completion file is called 'youtube-dl' rather than
994 ;; 'youtube-dl.bash-completion'.
995 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
996 #:phases (modify-phases %standard-phases
997 (add-before 'install 'fix-the-data-directories
998 (lambda* (#:key outputs #:allow-other-keys)
999 (let ((prefix (assoc-ref outputs "out")))
1000 (mkdir "bash-completion")
1001 (rename-file "youtube-dl.bash-completion"
1002 "bash-completion/youtube-dl")
1003 (substitute* "setup.py"
1004 (("youtube-dl\\.bash-completion")
1005 "bash-completion/youtube-dl")
1007 (string-append "'" prefix "/etc/"))
1009 (string-append "'" prefix "/share/")))))))))
1010 (synopsis "Download videos from YouTube.com and other sites")
1012 "Youtube-dl is a small command-line program to download videos from
1013 YouTube.com and a few more sites.")
1014 (home-page "https://yt-dl.org")
1015 (license license:public-domain)))
1017 (define-public libbluray
1023 (uri (string-append "https://download.videolan.org/videolan/"
1024 name "/" version "/"
1025 name "-" version ".tar.bz2"))
1028 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
1029 (build-system gnu-build-system)
1031 `(#:configure-flags '("--disable-bdjava")
1033 (modify-phases %standard-phases
1034 (add-before 'build 'fix-dlopen-paths
1035 (lambda* (#:key inputs #:allow-other-keys)
1036 (let ((libaacs (assoc-ref inputs "libaacs"))
1037 (libbdplus (assoc-ref inputs "libbdplus")))
1038 (substitute* "src/libbluray/disc/aacs.c"
1040 (string-append "\"" libaacs "/lib/libaacs\"")))
1041 (substitute* "src/libbluray/disc/bdplus.c"
1043 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1045 (native-inputs `(("pkg-config" ,pkg-config)))
1047 `(("fontconfig" ,fontconfig)
1048 ("freetype" ,freetype)
1049 ("libaacs" ,libaacs)
1050 ("libbdplus" ,libbdplus)
1051 ("libxml2" ,libxml2)))
1052 (home-page "https://www.videolan.org/developers/libbluray.html")
1053 (synopsis "Blu-Ray Disc playback library")
1055 "libbluray is a library designed for Blu-Ray Disc playback for media
1056 players, like VLC or MPlayer.")
1057 (license license:lgpl2.1+)))
1059 (define-public libdvdread
1065 (uri (string-append "http://download.videolan.org/videolan/"
1066 name "/" version "/"
1067 name "-" version ".tar.bz2"))
1070 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1071 (build-system gnu-build-system)
1072 (home-page "http://dvdnav.mplayerhq.hu/")
1073 (synopsis "Library for reading video DVDs")
1075 "Libdvdread provides a simple foundation for reading DVD video
1076 disks. It provides the functionality that is required to access many
1077 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1078 authentication and descrambling (if an external libdvdcss library is
1080 (license license:gpl2+)))
1082 (define-public libdvdnav
1088 (uri (string-append "http://download.videolan.org/videolan/"
1089 name "/" version "/"
1090 name "-" version ".tar.bz2"))
1093 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1094 (build-system gnu-build-system)
1096 `(("pkg-config" ,pkg-config)))
1098 `(("libdvdread" ,libdvdread)))
1099 (home-page "http://dvdnav.mplayerhq.hu/")
1100 (synopsis "Library for video DVD navigation features")
1102 "Libdvdnav is a library for developers of multimedia
1103 applications. It allows easy use of sophisticated DVD navigation features
1104 such as DVD menus, multiangle playback and even interactive DVD games. All
1105 this functionality is provided through a simple API which provides the DVD
1106 playback as a single logical stream of blocks, intermitted by special
1107 dvdnav events to report certain conditions. The main usage of libdvdnav is
1108 a loop regularly calling a function to get the next block, surrounded by
1109 additional calls to tell the library of user interaction. The whole
1110 DVD virtual machine and internal playback states are completely
1112 (license license:gpl2+)))
1114 (define-public libdvdnav-4
1122 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1126 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1128 `(("pkg-config" ,pkg-config)
1129 ("autoconf" ,autoconf)
1130 ("automake" ,automake)
1131 ("libtool" ,libtool)))
1137 (zero? (system* "autoreconf" "-vif")))
1138 %standard-phases)))))
1140 (define-public libdvdcss
1146 (uri (string-append "http://download.videolan.org/pub/"
1147 name "/" version "/"
1148 name "-" version ".tar.bz2"))
1151 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1152 (build-system gnu-build-system)
1153 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1154 (synopsis "Library for accessing DVDs as block devices")
1156 "libdvdcss is a simple library designed for accessing DVDs like a block
1157 device without having to bother about the decryption.")
1158 (license license:gpl2+)))
1160 (define-public srt2vtt
1167 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1171 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1172 (build-system gnu-build-system)
1174 `(("guile" ,guile-2.0)))
1175 (synopsis "SubRip to WebVTT subtitle converter")
1176 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1177 for use with HTML5 video.")
1178 (home-page "http://dthompson.us/pages/software/srt2vtt")
1179 (license license:gpl3+)))
1181 (define-public avidemux
1188 "mirror://sourceforge/" name "/" name "/" version "/"
1189 name "_" version ".tar.gz"))
1192 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1193 (patches (search-patches "avidemux-install-to-lib.patch"))))
1194 (build-system cmake-build-system)
1196 `(("pkg-config" ,pkg-config)))
1197 ;; FIXME: Once packaged, add libraries not found during the build.
1199 `(("alsa-lib" ,alsa-lib)
1200 ("fontconfig" ,fontconfig)
1201 ("freetype" ,freetype)
1202 ("fribidi" ,fribidi)
1207 ("libvdpau" ,libvdpau)
1208 ("libvorbis" ,libvorbis)
1212 ("pulseaudio" ,pulseaudio)
1213 ("python" ,python-wrapper)
1214 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1215 ;("qtbase" ,qtbase) with -std=gnu++11.
1216 ;("qttools" ,qttools)
1222 `(#:tests? #f ; no check target
1224 ;; Make sure files inside the included ffmpeg tarball are
1226 (modify-phases %standard-phases
1227 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1229 (with-directory-excursion "avidemux_core/ffmpeg_package"
1230 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1231 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1232 (add-after 'patch-source-shebangs 'repack-ffmpeg
1234 (with-directory-excursion "avidemux_core/ffmpeg_package"
1235 (substitute* "ffmpeg-2.7.6/configure"
1236 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1237 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1238 ;; avoid non-determinism in the archive
1239 "--sort=name" "--mtime=@0"
1240 "--owner=root:0" "--group=root:0")
1241 (delete-file-recursively "ffmpeg-2.7.6"))))
1244 ;; Copy-paste settings from the cmake build system.
1245 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1246 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1248 (lambda* (#:key inputs outputs #:allow-other-keys)
1250 ((out (assoc-ref outputs "out"))
1251 (lib (string-append out "/lib"))
1253 (sdl (assoc-ref inputs "sdl"))
1255 (lambda* (component srcdir #:optional (args '()))
1256 (let ((builddir (string-append "build_" component)))
1258 (with-directory-excursion builddir
1261 (apply system* "cmake"
1262 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1263 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1264 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1265 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1266 "\"-Wl,-rpath=" lib "\"")
1267 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1268 (string-append "-DSDL_INCLUDE_DIR="
1270 (string-append "../" srcdir)
1273 (system* "make" "-j"
1274 (number->string (parallel-job-count)))
1275 (system* "make" "install"))))))))
1277 (and (build_component "core" "avidemux_core")
1278 (build_component "cli" "avidemux/cli")
1279 (build_component "qt4" "avidemux/qt4")
1280 (build_component "plugins_common" "avidemux_plugins"
1281 '("-DPLUGIN_UI=COMMON"))
1282 (build_component "plugins_cli" "avidemux_plugins"
1283 '("-DPLUGIN_UI=CLI"))
1284 (build_component "plugins_qt4" "avidemux_plugins"
1285 '("-DPLUGIN_UI=QT4"))
1286 (build_component "plugins_settings" "avidemux_plugins"
1287 '("-DPLUGIN_UI=SETTINGS")))
1288 ;; Remove .exe and .dll file.
1289 (delete-file-recursively
1290 (string-append out "/share/ADM6_addons")))))
1291 (delete 'install))))
1292 (home-page "http://fixounet.free.fr/avidemux/")
1293 (synopsis "Video editor")
1294 (description "Avidemux is a video editor designed for simple cutting,
1295 filtering and encoding tasks. It supports many file types, including AVI,
1296 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1297 can be automated using projects, job queue and powerful scripting
1299 ;; Software with various licenses is included, see License.txt.
1300 (license license:gpl2+)))
1302 (define-public vapoursynth
1304 (name "vapoursynth")
1309 "https://github.com/vapoursynth/vapoursynth/archive/R"
1311 (file-name (string-append name "-" version ".tar.gz"))
1314 "0629ys2lf618n9cc644xlvx0vx52v2fp3sx14p4mx5rg9nlasb3n"))))
1315 (build-system gnu-build-system)
1317 `(("autoconf" ,autoconf)
1318 ("automake" ,automake)
1319 ("cython" ,python-cython)
1320 ("libtool" ,libtool)
1321 ("pkg-config" ,pkg-config)
1325 `(("ffmpeg" ,ffmpeg)
1327 ("tesseract-ocr" ,tesseract-ocr)
1331 (modify-phases %standard-phases
1335 (zero? (system* "sh" "autogen.sh")))))))
1336 (home-page "http://www.vapoursynth.com/")
1337 (synopsis "Video processing framework")
1338 (description "VapourSynth is a C++ library and Python module for video
1339 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1340 multithreading, generalized colorspaces, per frame properties, and videos with
1342 ;; src/core/cpufeatures only allows x86, ARM or PPC
1343 (supported-systems (delete "mips64el-linux" %supported-systems))
1344 ;; As seen from the source files.
1345 (license license:lgpl2.1+)))
1354 "http://downloads.xvid.org/downloads/xvidcore-"
1355 version ".tar.bz2"))
1358 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1359 (build-system gnu-build-system)
1360 (native-inputs `(("yasm" ,yasm)))
1363 (modify-phases %standard-phases
1365 'configure 'pre-configure
1367 (chdir "build/generic")
1368 (substitute* "configure"
1369 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1370 ;; No 'check' target.
1372 (home-page "https://www.xvid.com/")
1373 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1374 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1375 codec library. It uses ASP features such as b-frames, global and quarter
1376 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1377 and custom quantization matrices.")
1378 (license license:gpl2+)))
1380 (define-public livestreamer
1382 (name "livestreamer")
1387 "https://github.com/chrippa/livestreamer/archive/v"
1389 (file-name (string-append "livestreamer-" version ".tar.gz"))
1392 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1393 (build-system python-build-system)
1395 '(#:tests? #f)) ; tests rely on external web servers
1397 `(("python-requests" ,python-requests)))
1398 (synopsis "Internet video stream viewer")
1399 (description "Livestreamer is a command-line utility that extracts streams
1400 from various services and pipes them into a video playing application.")
1401 (home-page "http://livestreamer.io/")
1402 (license license:bsd-2)))
1410 (uri (string-append "https://github.com/mltframework/mlt/"
1411 "archive/v" version ".tar.gz"))
1412 (file-name (string-append name "-" version ".tar.gz"))
1415 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1416 (build-system gnu-build-system)
1418 `(#:tests? #f ; no tests
1419 #:make-flags '("CC=gcc")
1421 (list "--enable-gpl3"
1424 (modify-phases %standard-phases
1426 'configure 'override-LDFLAGS
1427 (lambda* (#:key outputs #:allow-other-keys)
1428 (substitute* "config.mak"
1430 (string-append "LDFLAGS+=-Wl,-rpath="
1431 (assoc-ref outputs "out")
1435 `(("alsa-lib" ,alsa-lib)
1437 ("libxml2" ,libxml2)
1440 ("libsamplerate" ,libsamplerate)
1441 ("pulseaudio" ,pulseaudio)
1445 `(("pkg-config" ,pkg-config)))
1446 (home-page "https://www.mltframework.org/")
1447 (synopsis "Author, manage, and run multitrack audio/video compositions")
1449 "MLT is a multimedia framework, designed and developed for television
1450 broadcasting. It provides a toolkit for broadcasters, video editors, media
1451 players, transcoders, web streamers and many more types of applications. The
1452 functionality of the system is provided via an assortment of ready to use
1453 tools, XML authoring components, and an extensible plug-in based API.")
1454 (license license:lgpl2.1+)))
1456 (define-public v4l-utils
1462 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1463 "/v4l-utils-" version ".tar.bz2"))
1466 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
1467 (build-system gnu-build-system)
1470 (list (string-append "--with-udevdir="
1471 (assoc-ref %outputs "out")
1473 "CXXFLAGS=-std=gnu++11")))
1475 `(("pkg-config" ,pkg-config)))
1477 `(("alsa-lib" ,alsa-lib)
1479 ("libjpeg" ,libjpeg)
1483 (synopsis "Realtime video capture utilities for Linux")
1484 (description "The v4l-utils provide a series of libraries and utilities to
1485 be used for realtime video capture via Linux-specific APIs.")
1486 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1487 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1488 (license (list license:lgpl2.1+ license:gpl2))))
1496 (uri (string-append "https://github.com/jp9000/obs-studio"
1497 "/archive/" version ".tar.gz"))
1498 (file-name (string-append name "-" version ".tar.gz"))
1501 "0pxrzzp8z7kmwfdp49rwrk0j3lpya6garvbbzzfvldwhyam9az5d"))))
1502 (build-system cmake-build-system)
1504 `(#:tests? #f ; no tests
1505 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1509 (modify-phases %standard-phases
1510 (add-after 'unpack 'remove-architecture-specific-instructions
1511 ;; non-Intel platforms fail to build with the architecture
1512 ;; specific compiler flags included by default.
1514 (substitute* "libobs/CMakeLists.txt"
1515 (("if\\(NOT MSVC\\)") "if(MSVC)"))
1519 `(("pkg-config" ,pkg-config)))
1521 `(("alsa-lib" ,alsa-lib)
1525 ("fontconfig" ,fontconfig)
1526 ("freetype" ,freetype)
1528 ("jansson" ,jansson)
1529 ("libx264" ,libx264)
1530 ("libxcomposite" ,libxcomposite)
1532 ("pulseaudio" ,pulseaudio)
1534 ("qtx11extras" ,qtx11extras)
1536 ("v4l-utils" ,v4l-utils)
1538 (synopsis "Live streaming software")
1539 (description "Open Broadcaster Software provides a graphical interface for
1540 video recording and live streaming. OBS supports capturing audio and video
1541 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1543 (home-page "https://obsproject.com")
1544 (license license:gpl2+)))
1546 (define-public libvdpau
1553 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1554 name "-" version ".tar.bz2"))
1557 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1558 (build-system gnu-build-system)
1560 `(("pkg-config" ,pkg-config)))
1562 `(("dri2proto" ,dri2proto)
1563 ("libx11" ,libx11 "out")
1564 ("libxext" ,libxext)))
1565 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1566 (synopsis "Video Decode and Presentation API")
1567 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1568 provides an interface to video decode acceleration and presentation hardware
1569 present in modern GPUs.")
1570 (license (license:x11-style "file://COPYING"))))
1572 (define-public vdpauinfo
1579 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1580 name "-" version ".tar.gz"))
1583 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1584 (build-system gnu-build-system)
1586 `(("pkg-config" ,pkg-config)
1587 ("libx11" ,libx11)))
1589 `(("libvdpau" ,libvdpau)))
1590 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1591 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1592 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1594 (license (license:x11-style "file://COPYING"))))
1596 (define-public recordmydesktop
1598 (name "recordmydesktop")
1602 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1603 version "/recordmydesktop-" version ".tar.gz"))
1606 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1607 (build-system gnu-build-system)
1608 (inputs `(("popt" ,popt)
1613 ("libxfixes" ,libxfixes)
1614 ("libxdamage" ,libxdamage)
1615 ("libxext" ,libxext)
1616 ("alsa-lib" ,alsa-lib)
1617 ("libvorbis" ,libvorbis)
1618 ("libtheora" ,libtheora)))
1619 (home-page "http://recordmydesktop.sourceforge.net/")
1620 (synopsis "Desktop session video recorder")
1622 "recordMyDesktop is a command-line tool that captures the activity in
1623 your graphical desktop and encodes it as a video. This is a useful tool for
1624 making @dfn{screencasts}.")
1625 (license license:gpl2+)))
1627 (define-public libsmpeg
1634 (url "svn://svn.icculus.org/smpeg/trunk/")
1635 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1638 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1639 (build-system gnu-build-system)
1641 `(#:phases (modify-phases %standard-phases
1642 (add-after 'unpack 'autogen.sh
1644 (zero? (system* "sh" "autogen.sh")))))))
1646 `(("autoconf" ,autoconf)
1647 ("automake" ,automake)))
1650 (home-page "http://icculus.org/smpeg/")
1651 (synopsis "SDL MPEG decoding library")
1653 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1654 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1655 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1656 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1657 and MPEG system streams.")
1658 (license (list license:expat
1663 (define-public libbdplus
1670 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1671 version "/" name "-" version ".tar.bz2"))
1673 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1675 `(("libgcrypt" ,libgcrypt)))
1676 (build-system gnu-build-system)
1677 (home-page "http://www.videolan.org/developers/libbdplus.html")
1678 (synopsis "Library for decrypting certain Blu-Ray discs")
1679 (description "libbdplus is a library which implements the BD+ System
1681 (license license:lgpl2.1+)))
1683 (define-public libaacs
1690 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1691 version "/" name "-" version ".tar.bz2"))
1693 (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm"))))
1695 `(("libgcrypt" ,libgcrypt)))
1699 (build-system gnu-build-system)
1700 (home-page "http://www.videolan.org/developers/libaacs.html")
1701 (synopsis "Library for decrypting certain Blu-Ray discs")
1702 (description "libaacs is a library which implements the Advanced Access
1703 Content System specification.")
1704 (license license:lgpl2.1+)))
1706 (define-public mps-youtube
1708 (name "mps-youtube")
1713 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
1714 "archive/v" version ".tar.gz"))
1715 (file-name (string-append name "-" version ".tar.gz"))
1718 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
1719 (build-system python-build-system)
1721 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
1722 ;; test suite results differ depending on the country and also introduce
1723 ;; non-determinism in the tests.
1724 ;; https://github.com/mps-youtube/mps-youtube/issues/556
1727 `(("python-pafy" ,python-pafy)
1728 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
1729 (home-page "https://github.com/mps-youtube/mps-youtube")
1730 (synopsis "Terminal based YouTube player and downloader")
1732 "@code{mps-youtube} is based on mps, a terminal based program to
1733 search, stream and download music. This implementation uses YouTube as
1734 a source of content and can play and download video as well as audio.
1735 It can use either mpv or mplayer for playback, and for conversion of
1736 formats ffmpeg or libav is used. Users should install one of the
1737 supported players in addition to this package.")
1738 (license license:gpl3+)))
1740 (define-public handbrake
1746 (uri (string-append "https://handbrake.fr/rotation.php?file="
1747 "HandBrake-" version ".tar.bz2"))
1748 (file-name (string-append "handbrake-" version ".tar.bz2"))
1751 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
1752 (patches (search-patches "handbrake-pkg-config-path.patch"))
1753 (modules '((guix build utils)))
1755 ;; Remove bundled libraries and source not necessary for
1756 ;; running under a GNU environment.
1758 (for-each delete-file-recursively '("contrib" "macosx" "win"))
1760 (build-system glib-or-gtk-build-system)
1762 `(("automake" ,automake) ;gui subpackage must be bootstrapped
1763 ("autoconf" ,autoconf)
1764 ("curl" ,curl) ;not actually used, but tested for
1765 ("intltool" ,intltool)
1766 ("libtool" ,libtool)
1767 ("pkg-config" ,pkg-config)
1768 ("python" ,python-2))) ;for configuration
1771 ("dbus-glib" ,dbus-glib)
1773 ("fontconfig" ,fontconfig)
1774 ("freetype" ,freetype)
1776 ("gstreamer" ,gstreamer)
1777 ("gst-plugins-base" ,gst-plugins-base)
1781 ("libbluray" ,libbluray)
1782 ("libdvdnav" ,libdvdnav)
1783 ("libdvdread" ,libdvdread)
1784 ("libgudev" ,libgudev)
1785 ("libmpeg2" ,libmpeg2)
1786 ("libnotify" ,libnotify)
1788 ("libsamplerate" ,libsamplerate)
1789 ("libtheora" ,libtheora)
1790 ("libvorbis" ,libvorbis)
1792 ("libxml2" ,libxml2)
1793 ("libx264" ,libx264)
1797 `(#:tests? #f ;tests require Ruby and claim to be unsupported
1799 (modify-phases %standard-phases
1800 (add-before 'patch-source-shebangs 'bootstrap-gtk
1801 ;; Run bootstrap ahead of time so that shebangs get patched.
1803 (setenv "CONFIG_SHELL" (which "sh"))
1804 (setenv "NOCONFIGURE" "1")
1805 ;; Patch the Makefile so that it doesn't bootstrap again.
1806 (substitute* "gtk/module.rules"
1807 ((".*autogen\\.sh.*") ""))
1808 (zero? (system* "sh" "./gtk/autogen.sh"))))
1809 (add-before 'configure 'disable-contrib
1811 (substitute* "make/include/main.defs"
1812 ;; Disable unconditional inclusion of some "contrib"
1813 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
1814 ;; and libbluray), which would lead to fetching and
1815 ;; building of these libraries. Use our own instead.
1816 (("MODULES \\+= contrib") "# MODULES += contrib"))
1818 (add-before 'configure 'fix-x265-linking
1820 (substitute* "test/module.defs"
1821 ;; Fix missing library during linking error
1822 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
1825 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1826 ;; 'configure' is not an autoconf-generated script, and
1827 ;; errors on unrecognized arguments,
1828 ;; e.g. --enable-fast-install
1829 (let ((out (assoc-ref outputs "out")))
1830 (zero? (apply system* "./configure"
1831 (string-append "--prefix=" out)
1832 (or configure-flags '()))))))
1833 (add-after 'configure 'chdir-build
1834 (lambda _ (chdir "./build") #t)))))
1835 (home-page "https://handbrake.fr")
1836 (synopsis "Video transcoder")
1838 "HandBrake is a tool for converting video from any format to a selection
1839 of modern, widely supported codecs.")
1840 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
1841 (license (list license:gpl2+ license:bsd-3))))
1843 (define-public openh264
1849 (uri (string-append "https://github.com/cisco/"
1850 name "/archive/v" version ".tar.gz"))
1851 (file-name (string-append name "-" version ".tar.gz"))
1854 "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
1855 (build-system gnu-build-system)
1858 ("python" ,python)))
1860 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1861 #:test-target "test"
1862 #:phases (modify-phases %standard-phases
1863 ;; no configure script
1864 (delete 'configure))))
1865 (home-page "http://www.openh264.org/")
1866 (synopsis "H264 decoder library")
1868 "Openh264 is a library which can decode H264 video streams.")
1869 (license license:bsd-2)))
1871 (define-public libmp4v2
1878 ;; XXX: The new location of upstream is uncertain and will become relevant the
1879 ;; moment when the googlecode archive shuts down. It is past the date it
1880 ;; should've been turned off. I tried to communicate with upstream, but this
1881 ;; wasn't very responsive and not very helpful. The short summary is, it is
1882 ;; chaos when it comes to the amount of forks and only time will tell where
1883 ;; the new upstream location is.
1884 (uri (string-append "https://storage.googleapis.com/google-"
1885 "code-archive-downloads/v2/"
1886 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
1887 (file-name (string-append name "-" version ".tar.bz2"))
1890 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
1891 (build-system gnu-build-system)
1893 "static")) ; 3.7MiB .a file
1896 (modify-phases %standard-phases
1897 (add-after 'unpack 'remove-dates
1899 ;; Make the build reproducible.
1900 (substitute* "configure"
1901 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
1902 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
1904 (add-after 'install 'move-static-libraries
1905 (lambda* (#:key outputs #:allow-other-keys)
1906 ;; Move static libraries to the "static" output.
1907 (let* ((out (assoc-ref outputs "out"))
1908 (lib (string-append out "/lib"))
1909 (static (assoc-ref outputs "static"))
1910 (slib (string-append static "/lib")))
1912 (for-each (lambda (file)
1913 (install-file file slib)
1915 (find-files lib "\\.a$"))
1918 `(("help2man" ,help2man)
1919 ("dejagnu" ,dejagnu)))
1920 (home-page "https://code.google.com/archive/p/mp4v2/")
1921 (synopsis "API to create and modify mp4 files")
1923 "The MP4v2 library provides an API to create and modify mp4 files as defined by
1924 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
1925 file format that has been used as a multimedia file format in a variety of platforms and
1926 applications. It is a very powerful and extensible format that can accommodate
1927 practically any type of media.")
1928 (license license:mpl1.1)))