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 ng0 <ng0@we.make.ritual.n0.is>
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 elf)
61 #:use-module (gnu packages flex)
62 #:use-module (gnu packages fontutils)
63 #:use-module (gnu packages freedesktop)
64 #:use-module (gnu packages fribidi)
65 #:use-module (gnu packages gettext)
66 #:use-module (gnu packages ghostscript)
67 #:use-module (gnu packages gl)
68 #:use-module (gnu packages glib)
69 #:use-module (gnu packages guile)
70 #:use-module (gnu packages gnome)
71 #:use-module (gnu packages gnupg)
72 #:use-module (gnu packages gstreamer)
73 #:use-module (gnu packages gtk)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages linux)
76 #:use-module (gnu packages lua)
77 #:use-module (gnu packages m4)
78 #:use-module (gnu packages mp3)
79 #:use-module (gnu packages ncurses)
80 #:use-module (gnu packages ocr)
81 #:use-module (gnu packages perl)
82 #:use-module (gnu packages pkg-config)
83 #:use-module (gnu packages popt)
84 #:use-module (gnu packages pulseaudio)
85 #:use-module (gnu packages python)
86 #:use-module (gnu packages qt)
87 #:use-module (gnu packages sdl)
88 #:use-module (gnu packages ssh)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages textutils)
91 #:use-module (gnu packages tls)
92 #:use-module (gnu packages version-control)
93 #:use-module (gnu packages web)
94 #:use-module (gnu packages webkit)
95 #:use-module (gnu packages xdisorg)
96 #:use-module (gnu packages xiph)
97 #:use-module (gnu packages xml)
98 #:use-module (gnu packages xorg)
99 #:use-module (gnu packages assembly)
100 #:use-module (gnu packages zip))
108 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
109 version "/" name "-" version ".tar.gz"))
112 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
113 (build-system gnu-build-system)
115 `(("makeinfo" ,texinfo)))
117 `(("ncurses" ,ncurses)))
120 (modify-phases %standard-phases
122 (lambda* (#:key build inputs outputs #:allow-other-keys)
123 ;; This old `configure' script doesn't support
124 ;; variables passed as arguments.
125 (let ((out (assoc-ref outputs "out"))
126 (ncurses (assoc-ref inputs "ncurses")))
127 (setenv "CONFIG_SHELL" (which "bash"))
128 (zero? (system* "./configure"
129 (string-append "--prefix=" out)
130 (string-append "--build=" build)
131 ;; The ancient config.guess is unable to
132 ;; guess the host triplet on mips64el.
133 ,@(if (string=? "mips64el-linux"
135 '("--host=mips64el-unknown-linux-gnu")
137 (string-append "--with-ncurses="
139 (home-page "http://aa-project.sourceforge.net/aalib/")
140 (synopsis "ASCII-art library")
142 "AA-lib is a low level gfx library which does not require graphics device.
143 In fact, there is no graphical output possible. AA-lib replaces those
144 old-fashioned output methods with powerful ascii-art renderer.")
145 (license license:lgpl2.0+)))
147 (define-public liba52
154 ;; A mirror://sourceforge URI doesn't work, presumably
155 ;; because the SourceForge project is misconfigured.
156 "http://liba52.sourceforge.net/files/a52dec-" version
160 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
161 (patches (search-patches "liba52-enable-pic.patch"
162 "liba52-set-soname.patch"
163 "liba52-use-mtune-not-mcpu.patch"
164 "liba52-link-with-libm.patch"))))
165 (build-system gnu-build-system)
166 ;; XXX We need to run ./bootstrap because of the build system fixes above.
168 `(("autoconf" ,autoconf)
169 ("automake" ,automake)
170 ("libtool" ,libtool)))
171 (arguments `(#:configure-flags '("--enable-shared")
173 (modify-phases %standard-phases
174 ;; XXX We need to run ./bootstrap because of the build
175 ;; system fixes above.
178 (lambda _ (zero? (system* "sh" "bootstrap")))))))
179 (home-page "http://liba52.sourceforge.net/")
180 (synopsis "ATSC A/52 stream decoder")
181 (description "liba52 is a library for decoding ATSC A/52 streams. The
182 A/52 standard is used in a variety of applications, including digital
183 television and DVD. It is also known as AC-3.")
184 (license license:gpl2+)))
186 (define-public libmpeg2
192 ;; A mirror://sourceforge URI doesn't work, presumably
193 ;; because the SourceForge project is misconfigured.
194 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
195 name "-" version ".tar.gz"))
198 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
206 (build-system gnu-build-system)
207 (home-page "http://libmpeg2.sourceforge.net/")
208 (synopsis "MPEG1 and MPEG2 video decoder library")
210 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
211 (license license:gpl2+)))
213 (define-public libx264
216 (version "20161205-2245")
219 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
220 "x264-snapshot-" version ".tar.bz2"))
223 "0jjzdwag59kqlk09bb2pykm1ss8bw3p9q7bsks2kjgdwbj121a44"))))
224 (build-system gnu-build-system)
226 `(("pkg-config" ,pkg-config)
228 ;; TODO: Add gpac input
230 `(#:tests? #f ;no check target
231 #:configure-flags '("--enable-shared"
232 ;; Don't build the command-line program. If we
233 ;; want it later, we should do so in a different
234 ;; package to avoid a circular dependency (the x264
235 ;; program depends on ffmpeg and ffmpeg depends on
239 ;; On MIPS, we must pass "--disable-asm" or else
240 ;; configure fails after printing: "You specified a
241 ;; pre-MSA CPU in your CFLAGS. If you really want
242 ;; to run on such a CPU, configure with
244 ,@(if (string-prefix? "mips"
245 (or (%current-target-system)
249 (home-page "https://www.videolan.org/developers/x264.html")
250 (synopsis "H.264 video coding library")
251 (description "libx264 is an advanced encoding library for creating
252 H.264 (MPEG-4 AVC) video streams.")
253 (license (list license:gpl2+ ;most files
254 license:isc ;common/x86/x86inc.asm
255 license:lgpl2.1+ ;extras/getopt.c
256 license:bsd-3 ;extras/inttypes.h
257 (license:non-copyleft ;extras/cl*.h
259 "See extras/cl.h in the distribution.")))))
268 (uri (string-append "https://download.videolan.org/videolan/x265/"
269 "x265_" version ".tar.gz"))
272 "0hx6sr9l7586gs4qds2sj0i1m5brxkaqq3cwmibhfb559fpvkz48"))
273 (modules '((guix build utils)))
275 '(delete-file-recursively "source/compat/getopt"))))
276 (build-system cmake-build-system)
278 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
280 (modify-phases %standard-phases
281 (add-before 'configure 'prepare-build
283 (delete-file-recursively "build")
286 (home-page "http://x265.org/")
287 (synopsis "Library for encoding h.265/HEVC video streams")
288 (description "x265 is a H.265 / HEVC video encoder application library,
289 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
290 (license license:gpl2+)))
292 (define-public libass
299 "https://github.com/libass/libass/releases/download/"
300 version "/libass-" version ".tar.xz"))
303 "1dlzkjybnpl2fkvyjq0qblb7qw12cs893bs7zj3rvf8ij342yjnq"))))
304 (build-system gnu-build-system)
306 `(("pkg-config" ,pkg-config)
309 `(("freetype" ,freetype)
311 ("fontconfig" ,fontconfig)
312 ("harfbuzz" ,harfbuzz)
314 (home-page "https://github.com/libass/libass")
315 (synopsis "Subtitle rendering library for the ASS/SSA format")
316 (description "libass is a subtitle rendering library for the
317 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
318 (license license:isc)))
320 (define-public libcaca
323 (version "0.99.beta19")
326 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
330 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
331 (build-system gnu-build-system)
332 (native-inputs `(("pkg-config" ,pkg-config)))
334 `(("freeglut" ,freeglut)
341 (home-page "http://caca.zoy.org/wiki/libcaca")
342 (synopsis "Colour ASCII-art library")
343 (description "libcaca is a graphics library that outputs text instead of
344 pixels, so that it can work on older video cards or text terminals. It
345 supports Unicode, 2048 colors, dithering of color images, and advanced text
347 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
349 (define-public libdca
356 "http://download.videolan.org/pub/videolan/libdca/"
357 version "/libdca-" version ".tar.bz2"))
360 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
361 (build-system gnu-build-system)
362 (home-page "http://www.videolan.org/developers/libdca.html")
363 (synopsis "DTS Coherent Acoustics decoder")
364 (description "libdca is a library for decoding DTS Coherent Acoustics
366 (license license:gpl2+)))
375 "mirror://sourceforge/" name "/" name "/"
376 version "/" name "-" version ".tar.gz"))
379 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
380 (build-system gnu-build-system)
381 (native-inputs `(("pkg-config" ,pkg-config)))
382 (inputs `(("libxv" ,libxv)))
383 (home-page "http://libdv.sourceforge.net/")
384 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
385 (description "The Quasar DV codec (libdv) is a software codec for DV
386 video, the encoding format used by most digital camcorders, typically those
387 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
388 developed according to the official standards for DV video: IEC 61834 and
390 (license license:lgpl2.1+)))
400 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
403 (base32 "1j8mb3p9kafhp30r3kmndnrklvzycc2ym0w6xdqz6m7jap626028"))))
404 (build-system gnu-build-system)
406 `(("pkg-config" ,pkg-config)))
411 ("libxfixes" ,libxfixes)
415 (modify-phases %standard-phases
417 'build 'fix-dlopen-paths
418 (lambda* (#:key outputs #:allow-other-keys)
419 (let ((out (assoc-ref outputs "out")))
420 (substitute* "va/drm/va_drm_auth_x11.c"
421 (("\"libva-x11\\.so\\.%d\"")
422 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
423 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
424 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
426 (list (string-append "--with-drivers-path="
427 (assoc-ref %build-inputs "mesa") "/lib/dri"))
428 ;; However, we can't write to mesa's store directory, so override the
429 ;; following make variable to install the dummy driver to libva's
430 ;; $prefix/lib/dri directory.
432 (list (string-append "dummy_drv_video_ladir="
433 (assoc-ref %outputs "out") "/lib/dri"))))
434 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
435 (synopsis "Video acceleration library")
436 (description "The main motivation for VA-API (Video Acceleration API) is
437 to enable hardware accelerated video decode/encode at various
438 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
439 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
440 (license license:expat)))
442 (define-public ffmpeg
448 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
452 "1z7d5y5crhsl5fm74236rdwbkd4jj5frx1l4iizjfym1w4gvs09z"))))
453 (build-system gnu-build-system)
455 `(("fontconfig" ,fontconfig)
456 ("freetype" ,freetype)
462 ("libbluray" ,libbluray)
464 ("libcdio-paranoia" ,libcdio-paranoia)
465 ("libtheora" ,libtheora)
466 ("libvdpau" ,libvdpau)
467 ("libvorbis" ,libvorbis)
473 ("pulseaudio" ,pulseaudio)
483 ("pkg-config" ,pkg-config)
485 ("python" ,python-2) ; scripts use interpreter python2
489 `(#:test-target "fate"
491 ;; possible additional inputs:
492 ;; --enable-avisynth enable reading of AviSynth script
494 ;; --enable-frei0r enable frei0r video filtering
495 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
496 ;; --enable-libcelt enable CELT decoding via libcelt [no]
497 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
498 ;; and libraw1394 [no]
499 ;; --enable-libfaac enable AAC encoding via libfaac [no]
500 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
501 ;; --enable-libflite enable flite (voice synthesis) support via
503 ;; --enable-libgme enable Game Music Emu via libgme [no]
504 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
505 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
506 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
507 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
508 ;; --enable-libnut enable NUT (de)muxing via libnut,
509 ;; native (de)muxer exists [no]
510 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
511 ;; libopencore-amrnb [no]
512 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
513 ;; libopencore-amrwb [no]
514 ;; --enable-libopencv enable video filtering via libopencv [no]
515 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
517 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
518 ;; --enable-libschroedinger enable Dirac de/encoding via
519 ;; libschroedinger [no]
520 ;; --enable-libshine enable fixed-point MP3 encoding via
522 ;; --enable-libssh enable SFTP protocol via libssh [no]
523 ;; (libssh2 does not work)
524 ;; --enable-libstagefright-h264 enable H.264 decoding via
525 ;; libstagefright [no]
526 ;; --enable-libutvideo enable Ut Video encoding and decoding via
528 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
529 ;; --enable-libvidstab enable video stabilization using
531 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
532 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
533 ;; libvo-amrwbenc [no]
534 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
535 ;; --enable-libxavs enable AVS encoding via xavs [no]
536 ;; --enable-libzmq enable message passing via libzmq [no]
537 ;; --enable-libzvbi enable teletext support via libzvbi [no]
538 ;; --enable-opencl enable OpenCL code
539 '("--enable-avresample"
540 "--enable-gpl" ; enable optional gpl licensed parts
542 "--enable-fontconfig"
549 "--enable-libfreetype"
550 "--enable-libmp3lame"
556 "--enable-libtwolame"
566 "--enable-runtime-cpudetect"
568 ;; Runtime cpu detection is not implemented on
569 ;; MIPS, so we disable some features.
572 "--disable-mipsdspr2"
575 (modify-phases %standard-phases
578 ;; configure does not work followed by "SHELL=..." and
579 ;; "CONFIG_SHELL=..."; set environment variables instead
580 (lambda* (#:key outputs configure-flags #:allow-other-keys)
581 (let ((out (assoc-ref outputs "out")))
582 (substitute* "configure"
583 (("#! /bin/sh") (string-append "#!" (which "bash"))))
584 (setenv "SHELL" (which "bash"))
585 (setenv "CONFIG_SHELL" (which "bash"))
586 (zero? (apply system*
588 (string-append "--prefix=" out)
589 ;; Add $libdir to the RUNPATH of all the binaries.
590 (string-append "--extra-ldflags=-Wl,-rpath="
594 'check 'set-ld-library-path
596 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
598 (let* ((dso (find-files "." "\\.so$"))
599 (path (string-join (map dirname dso) ":")))
600 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
601 (setenv "LD_LIBRARY_PATH" path)
603 (home-page "https://www.ffmpeg.org/")
604 (synopsis "Audio and video framework")
605 (description "FFmpeg is a complete, cross-platform solution to record,
606 convert and stream audio and video. It includes the libavcodec
607 audio/video codec library.")
608 (license license:gpl2+)))
610 (define-public ffmpeg-2.8
616 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
620 "1ca84kc715xm7wmbnj1z4jfhxj8c7rxhy4cqwrd8cnih0l196j1c"))))
622 (substitute-keyword-arguments (package-arguments ffmpeg)
623 ((#:configure-flags flags)
625 (if (string=? flag "--disable-mipsdsp")
626 "--disable-mipsdspr1"
637 "https://download.videolan.org/pub/videolan/vlc/"
638 version "/vlc-" version ".tar.xz"))
641 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
642 (modules '((guix build utils)))
644 ;; There are two occurrences where __DATE__ and __TIME__ are
645 ;; used to capture the build time and show it to the user.
646 '(substitute* (find-files "." "help\\.c(pp)?$")
647 (("__DATE__") "\"2016\"")
648 (("__TIME__") "\"00:00\"")))))
649 (build-system gnu-build-system)
651 `(("git" ,git) ; needed for a test
652 ("pkg-config" ,pkg-config)))
653 ;; FIXME: Add optional inputs once available.
655 `(("alsa-lib" ,alsa-lib)
659 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
660 ("fontconfig" ,fontconfig)
661 ("freetype" ,freetype)
665 ("libgcrypt" ,libgcrypt)
670 ("libsamplerate" ,libsamplerate)
672 ("libvorbis" ,libvorbis)
673 ("libtheora" ,libtheora)
676 ("libxinerama" ,libxinerama)
683 ("pulseaudio" ,pulseaudio)
684 ("python" ,python-wrapper)
685 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
686 ;("qtbase" ,qtbase) with -std=gnu++11.
687 ;("qtx11extras" ,qtx11extras)
689 ("sdl-image" ,sdl-image)
692 ("xcb-util-keysyms" ,xcb-util-keysyms)))
695 `(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
696 ;; In our case, this led to a test failure:
697 ;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
698 "ac_cv_c_fast_math=no"
700 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
701 (assoc-ref %build-inputs "ffmpeg")
702 "/lib")) ;needed for the tests
705 (modify-phases %standard-phases
706 (add-before 'configure 'remove-visual-tests
707 ;; Some of the tests require using the display to test out VLC,
708 ;; which fails in our sandboxed build system
710 (substitute* "test/run_vlc.sh"
711 (("./vlc --ignore-config") "echo"))
713 (add-after 'install 'regenerate-plugin-cache
714 (lambda* (#:key outputs #:allow-other-keys)
715 ;; The 'install-exec-hook' rule in the top-level Makefile.am
716 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
717 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
718 ;; it references. Thus, we first reset the timestamps of all
719 ;; these files, and then regenerate the cache such that the
720 ;; mtimes it includes are always zero instead of being dependent
721 ;; on the build time.
722 (let* ((out (assoc-ref outputs "out"))
723 (pkglibdir (string-append out "/lib/vlc"))
724 (plugindir (string-append pkglibdir "/plugins"))
725 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
726 ;; TODO: Factorize 'reset-timestamps'.
727 (for-each (lambda (file)
728 (let ((s (lstat file)))
729 (unless (eq? (stat:type s) 'symlink)
730 (utime file 0 0 0 0))))
731 (find-files plugindir))
732 (zero? (system* cachegen plugindir))))))))
733 (home-page "https://www.videolan.org/")
734 (synopsis "Audio and video framework")
735 (description "VLC is a cross-platform multimedia player and framework
736 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
737 treaming protocols.")
738 (license license:gpl2+)))
740 (define-public mplayer
747 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
751 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
752 (build-system gnu-build-system)
753 ;; FIXME: Add additional inputs once available.
755 `(("pkg-config" ,pkg-config)))
757 `(("alsa-lib" ,alsa-lib)
758 ("cdparanoia" ,cdparanoia)
760 ("fontconfig" ,fontconfig)
761 ("freetype" ,freetype)
762 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
765 ("libdvdcss" ,libdvdcss)
766 ("libdvdnav" ,libdvdnav)
768 ("libmpeg2" ,libmpeg2)
769 ("libmpg123" ,mpg123) ; audio codec for MP3
771 ("libtheora" ,libtheora)
772 ("libvdpau" ,libvdpau)
773 ("libvorbis" ,libvorbis)
776 ("libxinerama" ,libxinerama)
778 ("libxxf86dga" ,libxxf86dga)
782 ("pulseaudio" ,pulseaudio)
783 ("python" ,python-wrapper)
789 `(#:tests? #f ; no test target
791 (modify-phases %standard-phases
793 ;; configure does not work followed by "SHELL=..." and
794 ;; "CONFIG_SHELL=..."; set environment variables instead
795 (lambda* (#:key inputs outputs #:allow-other-keys)
796 (let ((out (assoc-ref outputs "out"))
797 (libx11 (assoc-ref inputs "libx11")))
798 (substitute* "configure"
799 (("#! /bin/sh") (string-append "#!" (which "bash"))))
800 (setenv "SHELL" (which "bash"))
801 (setenv "CONFIG_SHELL" (which "bash"))
804 (string-append "--extra-cflags=-I"
805 libx11 "/include") ; to detect libx11
806 "--disable-ffmpeg_a" ; disables bundled ffmpeg
807 (string-append "--prefix=" out)
808 ;; Enable runtime cpu detection where supported,
809 ;; and choose a suitable target.
810 ,@(match (or (%current-target-system)
813 '("--enable-runtime-cpudetection"
814 "--target=x86_64-linux"))
816 '("--enable-runtime-cpudetection"
817 "--target=i686-linux"))
819 '("--target=mips3-linux"))
820 (_ (list (string-append
822 (or (%current-target-system)
823 (nix-system->gnu-triplet
824 (%current-system)))))))
825 "--disable-iwmmxt"))))))))
826 (home-page "https://www.mplayerhq.hu/design7/news.html")
827 (synopsis "Audio and video player")
828 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
829 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
830 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
831 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
832 (license license:gpl2)))
841 "https://github.com/mpv-player/mpv/archive/v" version
845 "1629v5l0rmphxra7chmfm7bnn59zc1mp529b9m2zqzaqf1czxvla"))
846 (file-name (string-append name "-" version ".tar.gz"))))
847 (build-system waf-build-system)
849 `(("perl" ,perl) ; for zsh completion file
850 ("pkg-config" ,pkg-config)
851 ("python-docutils" ,python-docutils)))
852 ;; Missing features: libguess, Wayland, V4L2
854 `(("alsa-lib" ,alsa-lib)
861 ("libbluray" ,libbluray)
864 ("libcdio-paranoia" ,libcdio-paranoia)
865 ("libdvdread" ,libdvdread)
866 ("libdvdnav" ,libdvdnav)
869 ("libvdpau" ,libvdpau)
872 ("libxinerama" ,libxinerama)
873 ("libxrandr" ,libxrandr)
874 ("libxscrnsaver" ,libxscrnsaver)
876 ;; XXX: lua > 5.2 is not currently supported; see
877 ;; waftools/checks/custom.py
881 ("pulseaudio" ,pulseaudio)
884 ("youtube-dl" ,youtube-dl)
888 (modify-phases %standard-phases
890 'configure 'setup-waf
891 (lambda* (#:key inputs #:allow-other-keys)
892 (copy-file (assoc-ref inputs "waf") "waf")
893 (setenv "CC" "gcc"))))
894 #:configure-flags (list "--enable-libmpv-shared" "--enable-zsh-comp")
895 ;; No check function defined.
897 (home-page "https://mpv.io/")
898 (synopsis "Audio and video player")
899 (description "mpv is a general-purpose audio and video player. It is a
900 fork of mplayer2 and MPlayer. It shares some features with the former
901 projects while introducing many more.")
902 (license license:gpl2+)))
904 (define-public gnome-mpv
911 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
912 "/download/v" version "/gnome-mpv-" version
916 "1hn3mpsxbrwf2m0nz4vzji4i6i896y8kqjb9kijqpk04cnrs3fgz"))))
918 `(("intltool" ,intltool)
919 ("pkg-config" ,pkg-config)))
922 ("libepoxy" ,libepoxy)
924 (build-system glib-or-gtk-build-system)
925 (home-page "https://github.com/gnome-mpv/gnome-mpv")
926 (synopsis "GTK+ frontend for the mpv media player")
927 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
928 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
929 access to mpv's powerful playback capabilities.")
930 (license license:gpl3+)))
932 (define-public libvpx
938 (uri (string-append "http://storage.googleapis.com/"
939 "downloads.webmproject.org/releases/webm/"
940 name "-" version ".tar.bz2"))
943 "1basd6dda5di9p7jhc0f4f52wzm9c3hsravqspw6ibpcn5gbpbyh"))
944 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
945 (build-system gnu-build-system)
948 (modify-phases %standard-phases
950 (lambda* (#:key outputs #:allow-other-keys)
951 (setenv "CONFIG_SHELL" (which "bash"))
952 (let ((out (assoc-ref outputs "out")))
954 (string-append "-Wl,-rpath=" out "/lib"))
955 (zero? (system* "./configure"
958 ;; Limit size to avoid CVE-2015-1258
959 "--size-limit=16384x16384"
960 (string-append "--prefix=" out)))))))
961 #:tests? #f)) ; no check target
965 (synopsis "VP8/VP9 video codec")
966 (description "libvpx is a codec for the VP8/VP9 video compression format.")
967 (license license:bsd-3)
968 (home-page "http://www.webmproject.org/")))
970 (define-public youtube-dl
973 (version "2017.01.14")
976 (uri (string-append "https://yt-dl.org/downloads/"
977 version "/youtube-dl-"
981 "1jlwz6p7ryj9ygmwqm4r3pykd9qw21rsiqpifbx0p0kcvdvvvj3n"))))
982 (build-system python-build-system)
984 ;; The problem here is that the directory for the man page and completion
985 ;; files is relative, and for some reason, setup.py uses the
986 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
987 ;; So, we need pass the prefix directly. In addition, make sure the Bash
988 ;; completion file is called 'youtube-dl' rather than
989 ;; 'youtube-dl.bash-completion'.
990 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
991 #:phases (modify-phases %standard-phases
992 (add-before 'install 'fix-the-data-directories
993 (lambda* (#:key outputs #:allow-other-keys)
994 (let ((prefix (assoc-ref outputs "out")))
995 (mkdir "bash-completion")
996 (rename-file "youtube-dl.bash-completion"
997 "bash-completion/youtube-dl")
998 (substitute* "setup.py"
999 (("youtube-dl\\.bash-completion")
1000 "bash-completion/youtube-dl")
1002 (string-append "'" prefix "/etc/"))
1004 (string-append "'" prefix "/share/")))))))))
1005 (synopsis "Download videos from YouTube.com and other sites")
1007 "Youtube-dl is a small command-line program to download videos from
1008 YouTube.com and a few more sites.")
1009 (home-page "https://yt-dl.org")
1010 (license license:public-domain)))
1012 (define-public libbluray
1018 (uri (string-append "https://download.videolan.org/videolan/"
1019 name "/" version "/"
1020 name "-" version ".tar.bz2"))
1023 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
1024 (build-system gnu-build-system)
1026 `(#:configure-flags '("--disable-bdjava")
1028 (modify-phases %standard-phases
1029 (add-before 'build 'fix-dlopen-paths
1030 (lambda* (#:key inputs #:allow-other-keys)
1031 (let ((libaacs (assoc-ref inputs "libaacs"))
1032 (libbdplus (assoc-ref inputs "libbdplus")))
1033 (substitute* "src/libbluray/disc/aacs.c"
1035 (string-append "\"" libaacs "/lib/libaacs\"")))
1036 (substitute* "src/libbluray/disc/bdplus.c"
1038 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1040 (native-inputs `(("pkg-config" ,pkg-config)))
1042 `(("fontconfig" ,fontconfig)
1043 ("freetype" ,freetype)
1044 ("libaacs" ,libaacs)
1045 ("libbdplus" ,libbdplus)
1046 ("libxml2" ,libxml2)))
1047 (home-page "https://www.videolan.org/developers/libbluray.html")
1048 (synopsis "Blu-Ray Disc playback library")
1050 "libbluray is a library designed for Blu-Ray Disc playback for media
1051 players, like VLC or MPlayer.")
1052 (license license:lgpl2.1+)))
1054 (define-public libdvdread
1060 (uri (string-append "http://download.videolan.org/videolan/"
1061 name "/" version "/"
1062 name "-" version ".tar.bz2"))
1065 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1066 (build-system gnu-build-system)
1067 (home-page "http://dvdnav.mplayerhq.hu/")
1068 (synopsis "Library for reading video DVDs")
1070 "Libdvdread provides a simple foundation for reading DVD video
1071 disks. It provides the functionality that is required to access many
1072 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1073 authentication and descrambling (if an external libdvdcss library is
1075 (license license:gpl2+)))
1077 (define-public libdvdnav
1083 (uri (string-append "http://download.videolan.org/videolan/"
1084 name "/" version "/"
1085 name "-" version ".tar.bz2"))
1088 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1089 (build-system gnu-build-system)
1091 `(("pkg-config" ,pkg-config)))
1093 `(("libdvdread" ,libdvdread)))
1094 (home-page "http://dvdnav.mplayerhq.hu/")
1095 (synopsis "Library for video DVD navigation features")
1097 "Libdvdnav is a library for developers of multimedia
1098 applications. It allows easy use of sophisticated DVD navigation features
1099 such as DVD menus, multiangle playback and even interactive DVD games. All
1100 this functionality is provided through a simple API which provides the DVD
1101 playback as a single logical stream of blocks, intermitted by special
1102 dvdnav events to report certain conditions. The main usage of libdvdnav is
1103 a loop regularly calling a function to get the next block, surrounded by
1104 additional calls to tell the library of user interaction. The whole
1105 DVD virtual machine and internal playback states are completely
1107 (license license:gpl2+)))
1109 (define-public libdvdnav-4
1117 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1121 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1123 `(("pkg-config" ,pkg-config)
1124 ("autoconf" ,autoconf)
1125 ("automake" ,automake)
1126 ("libtool" ,libtool)))
1132 (zero? (system* "autoreconf" "-vif")))
1133 %standard-phases)))))
1135 (define-public libdvdcss
1141 (uri (string-append "http://download.videolan.org/pub/"
1142 name "/" version "/"
1143 name "-" version ".tar.bz2"))
1146 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1147 (build-system gnu-build-system)
1148 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1149 (synopsis "Library for accessing DVDs as block devices")
1151 "libdvdcss is a simple library designed for accessing DVDs like a block
1152 device without having to bother about the decryption.")
1153 (license license:gpl2+)))
1155 (define-public srt2vtt
1162 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1166 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1167 (build-system gnu-build-system)
1169 `(("guile" ,guile-2.0)))
1170 (synopsis "SubRip to WebVTT subtitle converter")
1171 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1172 for use with HTML5 video.")
1173 (home-page "http://dthompson.us/pages/software/srt2vtt")
1174 (license license:gpl3+)))
1176 (define-public avidemux
1183 "mirror://sourceforge/" name "/" name "/" version "/"
1184 name "_" version ".tar.gz"))
1187 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1188 (patches (search-patches "avidemux-install-to-lib.patch"))))
1189 (build-system cmake-build-system)
1191 `(("pkg-config" ,pkg-config)))
1192 ;; FIXME: Once packaged, add libraries not found during the build.
1194 `(("alsa-lib" ,alsa-lib)
1195 ("fontconfig" ,fontconfig)
1196 ("freetype" ,freetype)
1197 ("fribidi" ,fribidi)
1202 ("libvdpau" ,libvdpau)
1203 ("libvorbis" ,libvorbis)
1207 ("pulseaudio" ,pulseaudio)
1208 ("python" ,python-wrapper)
1209 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1210 ;("qtbase" ,qtbase) with -std=gnu++11.
1211 ;("qttools" ,qttools)
1217 `(#:tests? #f ; no check target
1219 ;; Make sure files inside the included ffmpeg tarball are
1221 (modify-phases %standard-phases
1222 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1224 (with-directory-excursion "avidemux_core/ffmpeg_package"
1225 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1226 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1227 (add-after 'patch-source-shebangs 'repack-ffmpeg
1229 (with-directory-excursion "avidemux_core/ffmpeg_package"
1230 (substitute* "ffmpeg-2.7.6/configure"
1231 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1232 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1233 ;; avoid non-determinism in the archive
1234 "--sort=name" "--mtime=@0"
1235 "--owner=root:0" "--group=root:0")
1236 (delete-file-recursively "ffmpeg-2.7.6"))))
1239 ;; Copy-paste settings from the cmake build system.
1240 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1241 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1243 (lambda* (#:key inputs outputs #:allow-other-keys)
1245 ((out (assoc-ref outputs "out"))
1246 (lib (string-append out "/lib"))
1248 (sdl (assoc-ref inputs "sdl"))
1250 (lambda* (component srcdir #:optional (args '()))
1251 (let ((builddir (string-append "build_" component)))
1253 (with-directory-excursion builddir
1256 (apply system* "cmake"
1257 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1258 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1259 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1260 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1261 "\"-Wl,-rpath=" lib "\"")
1262 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1263 (string-append "-DSDL_INCLUDE_DIR="
1265 (string-append "../" srcdir)
1268 (system* "make" "-j"
1269 (number->string (parallel-job-count)))
1270 (system* "make" "install"))))))))
1272 (and (build_component "core" "avidemux_core")
1273 (build_component "cli" "avidemux/cli")
1274 (build_component "qt4" "avidemux/qt4")
1275 (build_component "plugins_common" "avidemux_plugins"
1276 '("-DPLUGIN_UI=COMMON"))
1277 (build_component "plugins_cli" "avidemux_plugins"
1278 '("-DPLUGIN_UI=CLI"))
1279 (build_component "plugins_qt4" "avidemux_plugins"
1280 '("-DPLUGIN_UI=QT4"))
1281 (build_component "plugins_settings" "avidemux_plugins"
1282 '("-DPLUGIN_UI=SETTINGS")))
1283 ;; Remove .exe and .dll file.
1284 (delete-file-recursively
1285 (string-append out "/share/ADM6_addons")))))
1286 (delete 'install))))
1287 (home-page "http://fixounet.free.fr/avidemux/")
1288 (synopsis "Video editor")
1289 (description "Avidemux is a video editor designed for simple cutting,
1290 filtering and encoding tasks. It supports many file types, including AVI,
1291 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1292 can be automated using projects, job queue and powerful scripting
1294 ;; Software with various licenses is included, see License.txt.
1295 (license license:gpl2+)))
1297 (define-public vapoursynth
1299 (name "vapoursynth")
1304 "https://github.com/vapoursynth/vapoursynth/archive/R"
1306 (file-name (string-append name "-" version ".tar.gz"))
1309 "0629ys2lf618n9cc644xlvx0vx52v2fp3sx14p4mx5rg9nlasb3n"))))
1310 (build-system gnu-build-system)
1312 `(("autoconf" ,autoconf)
1313 ("automake" ,automake)
1314 ("cython" ,python-cython)
1315 ("libtool" ,libtool)
1316 ("pkg-config" ,pkg-config)
1320 `(("ffmpeg" ,ffmpeg)
1322 ("tesseract-ocr" ,tesseract-ocr)
1326 (modify-phases %standard-phases
1330 (zero? (system* "sh" "autogen.sh")))))))
1331 (home-page "http://www.vapoursynth.com/")
1332 (synopsis "Video processing framework")
1333 (description "VapourSynth is a C++ library and Python module for video
1334 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1335 multithreading, generalized colorspaces, per frame properties, and videos with
1337 ;; src/core/cpufeatures only allows x86, ARM or PPC
1338 (supported-systems (delete "mips64el-linux" %supported-systems))
1339 ;; As seen from the source files.
1340 (license license:lgpl2.1+)))
1349 "http://downloads.xvid.org/downloads/xvidcore-"
1350 version ".tar.bz2"))
1353 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1354 (build-system gnu-build-system)
1355 (native-inputs `(("yasm" ,yasm)))
1358 (modify-phases %standard-phases
1360 'configure 'pre-configure
1362 (chdir "build/generic")
1363 (substitute* "configure"
1364 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1365 ;; No 'check' target.
1367 (home-page "https://www.xvid.com/")
1368 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1369 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1370 codec library. It uses ASP features such as b-frames, global and quarter
1371 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1372 and custom quantization matrices.")
1373 (license license:gpl2+)))
1375 (define-public livestreamer
1377 (name "livestreamer")
1382 "https://github.com/chrippa/livestreamer/archive/v"
1384 (file-name (string-append "livestreamer-" version ".tar.gz"))
1387 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1388 (build-system python-build-system)
1390 '(#:tests? #f)) ; tests rely on external web servers
1392 `(("python-requests" ,python-requests)))
1393 (synopsis "Internet video stream viewer")
1394 (description "Livestreamer is a command-line utility that extracts streams
1395 from various services and pipes them into a video playing application.")
1396 (home-page "http://livestreamer.io/")
1397 (license license:bsd-2)))
1405 (uri (string-append "https://github.com/mltframework/mlt/"
1406 "archive/v" version ".tar.gz"))
1407 (file-name (string-append name "-" version ".tar.gz"))
1410 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1411 (build-system gnu-build-system)
1413 `(#:tests? #f ; no tests
1414 #:make-flags '("CC=gcc")
1416 (list "--enable-gpl3"
1419 (modify-phases %standard-phases
1421 'configure 'override-LDFLAGS
1422 (lambda* (#:key outputs #:allow-other-keys)
1423 (substitute* "config.mak"
1425 (string-append "LDFLAGS+=-Wl,-rpath="
1426 (assoc-ref outputs "out")
1430 `(("alsa-lib" ,alsa-lib)
1432 ("libxml2" ,libxml2)
1435 ("libsamplerate" ,libsamplerate)
1436 ("pulseaudio" ,pulseaudio)
1440 `(("pkg-config" ,pkg-config)))
1441 (home-page "https://www.mltframework.org/")
1442 (synopsis "Author, manage, and run multitrack audio/video compositions")
1444 "MLT is a multimedia framework, designed and developed for television
1445 broadcasting. It provides a toolkit for broadcasters, video editors, media
1446 players, transcoders, web streamers and many more types of applications. The
1447 functionality of the system is provided via an assortment of ready to use
1448 tools, XML authoring components, and an extensible plug-in based API.")
1449 (license license:lgpl2.1+)))
1451 (define-public v4l-utils
1457 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1458 "/v4l-utils-" version ".tar.bz2"))
1461 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
1462 (build-system gnu-build-system)
1465 (list (string-append "--with-udevdir="
1466 (assoc-ref %outputs "out")
1468 "CXXFLAGS=-std=gnu++11")))
1470 `(("pkg-config" ,pkg-config)))
1472 `(("alsa-lib" ,alsa-lib)
1474 ("libjpeg" ,libjpeg)
1478 (synopsis "Realtime video capture utilities for Linux")
1479 (description "The v4l-utils provide a series of libraries and utilities to
1480 be used for realtime video capture via Linux-specific APIs.")
1481 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1482 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1483 (license (list license:lgpl2.1+ license:gpl2))))
1491 (uri (string-append "https://github.com/jp9000/obs-studio"
1492 "/archive/" version ".tar.gz"))
1493 (file-name (string-append name "-" version ".tar.gz"))
1496 "02cfhpkcsq718zwhwwsm48gjggf95qr38hqpi0kwrvsy18ll0msm"))))
1497 (build-system cmake-build-system)
1499 `(#:tests? #f ; no tests
1500 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1504 (modify-phases %standard-phases
1505 (add-after 'unpack 'remove-architecture-specific-instructions
1506 ;; non-Intel platforms fail to build with the architecture
1507 ;; specific compiler flags included by default.
1509 (substitute* "libobs/CMakeLists.txt"
1510 (("if\\(NOT MSVC\\)") "if(MSVC)"))
1514 `(("pkg-config" ,pkg-config)))
1516 `(("alsa-lib" ,alsa-lib)
1520 ("fontconfig" ,fontconfig)
1521 ("freetype" ,freetype)
1523 ("jansson" ,jansson)
1524 ("libx264" ,libx264)
1525 ("libxcomposite" ,libxcomposite)
1527 ("pulseaudio" ,pulseaudio)
1529 ("qtx11extras" ,qtx11extras)
1531 ("v4l-utils" ,v4l-utils)
1533 (synopsis "Live streaming software")
1534 (description "Open Broadcaster Software provides a graphical interface for
1535 video recording and live streaming. OBS supports capturing audio and video
1536 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1538 (home-page "https://obsproject.com")
1539 (license license:gpl2+)))
1541 (define-public libvdpau
1548 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1549 name "-" version ".tar.bz2"))
1552 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1553 (build-system gnu-build-system)
1555 `(("pkg-config" ,pkg-config)))
1557 `(("dri2proto" ,dri2proto)
1558 ("libx11" ,libx11 "out")
1559 ("libxext" ,libxext)))
1560 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1561 (synopsis "Video Decode and Presentation API")
1562 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1563 provides an interface to video decode acceleration and presentation hardware
1564 present in modern GPUs.")
1565 (license (license:x11-style "file://COPYING"))))
1567 (define-public vdpauinfo
1574 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1575 name "-" version ".tar.gz"))
1578 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1579 (build-system gnu-build-system)
1581 `(("pkg-config" ,pkg-config)
1582 ("libx11" ,libx11)))
1584 `(("libvdpau" ,libvdpau)))
1585 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1586 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1587 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1589 (license (license:x11-style "file://COPYING"))))
1591 (define-public recordmydesktop
1593 (name "recordmydesktop")
1597 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1598 version "/recordmydesktop-" version ".tar.gz"))
1601 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1602 (build-system gnu-build-system)
1603 (inputs `(("popt" ,popt)
1608 ("libxfixes" ,libxfixes)
1609 ("libxdamage" ,libxdamage)
1610 ("libxext" ,libxext)
1611 ("alsa-lib" ,alsa-lib)
1612 ("libvorbis" ,libvorbis)
1613 ("libtheora" ,libtheora)))
1614 (home-page "http://recordmydesktop.sourceforge.net/")
1615 (synopsis "Desktop session video recorder")
1617 "recordMyDesktop is a command-line tool that captures the activity in
1618 your graphical desktop and encodes it as a video. This is a useful tool for
1619 making @dfn{screencasts}.")
1620 (license license:gpl2+)))
1622 (define-public libsmpeg
1629 (url "svn://svn.icculus.org/smpeg/trunk/")
1630 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1633 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1634 (build-system gnu-build-system)
1636 `(#:phases (modify-phases %standard-phases
1637 (add-after 'unpack 'autogen.sh
1639 (zero? (system* "sh" "autogen.sh")))))))
1641 `(("autoconf" ,autoconf)
1642 ("automake" ,automake)))
1645 (home-page "http://icculus.org/smpeg/")
1646 (synopsis "SDL MPEG decoding library")
1648 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1649 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1650 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1651 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1652 and MPEG system streams.")
1653 (license (list license:expat
1658 (define-public libbdplus
1665 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1666 version "/" name "-" version ".tar.bz2"))
1668 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1670 `(("libgcrypt" ,libgcrypt)))
1671 (build-system gnu-build-system)
1672 (home-page "http://www.videolan.org/developers/libbdplus.html")
1673 (synopsis "Library for decrypting certain Blu-Ray discs")
1674 (description "libbdplus is a library which implements the BD+ System
1676 (license license:lgpl2.1+)))
1678 (define-public libaacs
1685 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1686 version "/" name "-" version ".tar.bz2"))
1688 (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm"))))
1690 `(("libgcrypt" ,libgcrypt)))
1694 (build-system gnu-build-system)
1695 (home-page "http://www.videolan.org/developers/libaacs.html")
1696 (synopsis "Library for decrypting certain Blu-Ray discs")
1697 (description "libaacs is a library which implements the Advanced Access
1698 Content System specification.")
1699 (license license:lgpl2.1+)))
1701 (define-public mps-youtube
1703 (name "mps-youtube")
1708 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
1709 "archive/v" version ".tar.gz"))
1710 (file-name (string-append name "-" version ".tar.gz"))
1713 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
1714 (build-system python-build-system)
1716 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
1717 ;; test suite results differ depending on the country and also introduce
1718 ;; non-determinism in the tests.
1719 ;; https://github.com/mps-youtube/mps-youtube/issues/556
1722 `(("python-pafy" ,python-pafy)
1723 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
1724 (home-page "https://github.com/mps-youtube/mps-youtube")
1725 (synopsis "Terminal based YouTube player and downloader")
1727 "@code{mps-youtube} is based on mps, a terminal based program to
1728 search, stream and download music. This implementation uses YouTube as
1729 a source of content and can play and download video as well as audio.
1730 It can use either mpv or mplayer for playback, and for conversion of
1731 formats ffmpeg or libav is used. Users should install one of the
1732 supported players in addition to this package.")
1733 (license license:gpl3+)))
1735 (define-public handbrake
1741 (uri (string-append "https://handbrake.fr/rotation.php?file="
1742 "HandBrake-" version ".tar.bz2"))
1743 (file-name (string-append "handbrake-" version ".tar.bz2"))
1746 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
1747 (patches (search-patches "handbrake-pkg-config-path.patch"))
1748 (modules '((guix build utils)))
1750 ;; Remove bundled libraries and source not necessary for
1751 ;; running under a GNU environment.
1753 (for-each delete-file-recursively '("contrib" "macosx" "win"))
1755 (build-system glib-or-gtk-build-system)
1757 `(("automake" ,automake) ;gui subpackage must be bootstrapped
1758 ("autoconf" ,autoconf)
1759 ("curl" ,curl) ;not actually used, but tested for
1760 ("intltool" ,intltool)
1761 ("libtool" ,libtool)
1762 ("pkg-config" ,pkg-config)
1763 ("python" ,python-2))) ;for configuration
1766 ("dbus-glib" ,dbus-glib)
1768 ("fontconfig" ,fontconfig)
1769 ("freetype" ,freetype)
1771 ("gstreamer" ,gstreamer)
1772 ("gst-plugins-base" ,gst-plugins-base)
1776 ("libbluray" ,libbluray)
1777 ("libdvdnav" ,libdvdnav)
1778 ("libdvdread" ,libdvdread)
1779 ("libgudev" ,libgudev)
1780 ("libmpeg2" ,libmpeg2)
1781 ("libnotify" ,libnotify)
1783 ("libsamplerate" ,libsamplerate)
1784 ("libtheora" ,libtheora)
1785 ("libvorbis" ,libvorbis)
1787 ("libxml2" ,libxml2)
1788 ("libx264" ,libx264)
1792 `(#:tests? #f ;tests require Ruby and claim to be unsupported
1794 (modify-phases %standard-phases
1795 (add-before 'patch-source-shebangs 'bootstrap-gtk
1796 ;; Run bootstrap ahead of time so that shebangs get patched.
1798 (setenv "CONFIG_SHELL" (which "sh"))
1799 (setenv "NOCONFIGURE" "1")
1800 ;; Patch the Makefile so that it doesn't bootstrap again.
1801 (substitute* "gtk/module.rules"
1802 ((".*autogen\\.sh.*") ""))
1803 (zero? (system* "sh" "./gtk/autogen.sh"))))
1804 (add-before 'configure 'disable-contrib
1806 (substitute* "make/include/main.defs"
1807 ;; Disable unconditional inclusion of some "contrib"
1808 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
1809 ;; and libbluray), which would lead to fetching and
1810 ;; building of these libraries. Use our own instead.
1811 (("MODULES \\+= contrib") "# MODULES += contrib"))
1813 (add-before 'configure 'fix-x265-linking
1815 (substitute* "test/module.defs"
1816 ;; Fix missing library during linking error
1817 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
1820 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1821 ;; 'configure' is not an autoconf-generated script, and
1822 ;; errors on unrecognized arguments,
1823 ;; e.g. --enable-fast-install
1824 (let ((out (assoc-ref outputs "out")))
1825 (zero? (apply system* "./configure"
1826 (string-append "--prefix=" out)
1827 (or configure-flags '()))))))
1828 (add-after 'configure 'chdir-build
1829 (lambda _ (chdir "./build") #t)))))
1830 (home-page "https://handbrake.fr")
1831 (synopsis "Video transcoder")
1833 "HandBrake is a tool for converting video from any format to a selection
1834 of modern, widely supported codecs.")
1835 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
1836 (license (list license:gpl2+ license:bsd-3))))
1838 (define-public openh264
1844 (uri (string-append "https://github.com/cisco/"
1845 name "/archive/v" version ".tar.gz"))
1846 (file-name (string-append name "-" version ".tar.gz"))
1849 "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
1850 (build-system gnu-build-system)
1853 ("python" ,python)))
1855 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1856 #:test-target "test"
1857 #:phases (modify-phases %standard-phases
1858 ;; no configure script
1859 (delete 'configure))))
1860 (home-page "http://www.openh264.org/")
1861 (synopsis "H264 decoder library")
1863 "Openh264 is a library which can decode H264 video streams.")
1864 (license license:bsd-2)))