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 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 Alex Vong <alexvong1995@gmail.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages video)
27 #:use-module (ice-9 match)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix utils)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (guix build-system waf)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages algebra)
39 #:use-module (gnu packages audio)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages avahi)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages cdrom)
44 #:use-module (gnu packages compression)
45 #:use-module (gnu packages curl)
46 #:use-module (gnu packages databases)
47 #:use-module (gnu packages elf)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages fribidi)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages ghostscript)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages gnupg)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages lua)
60 #:use-module (gnu packages mp3)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages ocr)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages popt)
66 #:use-module (gnu packages pulseaudio)
67 #:use-module (gnu packages python)
68 #:use-module (gnu packages qt)
69 #:use-module (gnu packages sdl)
70 #:use-module (gnu packages ssh)
71 #:use-module (gnu packages texinfo)
72 #:use-module (gnu packages textutils)
73 #:use-module (gnu packages tls)
74 #:use-module (gnu packages version-control)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages xdisorg)
77 #:use-module (gnu packages xiph)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (gnu packages yasm)
81 #:use-module (gnu packages zip))
89 (uri (string-append "mirror://sourceforge/aa-project/"
90 name "-" version ".tar.gz"))
93 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
94 (build-system gnu-build-system)
96 `(("makeinfo" ,texinfo)))
98 `(("ncurses" ,ncurses)))
101 (modify-phases %standard-phases
103 (lambda* (#:key build inputs outputs #:allow-other-keys)
104 ;; This old `configure' script doesn't support
105 ;; variables passed as arguments.
106 (let ((out (assoc-ref outputs "out"))
107 (ncurses (assoc-ref inputs "ncurses")))
108 (setenv "CONFIG_SHELL" (which "bash"))
109 (zero? (system* "./configure"
110 (string-append "--prefix=" out)
111 (string-append "--build=" build)
112 (string-append "--with-ncurses="
114 (home-page "http://aa-project.sourceforge.net/aalib/")
115 (synopsis "ASCII-art library")
117 "AA-lib is a low level gfx library which does not require graphics device.
118 In fact, there is no graphical output possible. AA-lib replaces those
119 old-fashioned output methods with powerful ascii-art renderer.")
120 (license license:lgpl2.0+)))
122 (define-public liba52
129 ;; A mirror://sourceforge URI doesn't work, presumably
130 ;; because the SourceForge project is misconfigured.
131 "http://liba52.sourceforge.net/files/a52dec-" version
135 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
136 (patches (search-patches "liba52-enable-pic.patch"
137 "liba52-set-soname.patch"
138 "liba52-use-mtune-not-mcpu.patch"
139 "liba52-link-with-libm.patch"))))
140 (build-system gnu-build-system)
141 ;; XXX We need to run ./bootstrap because of the build system fixes above.
143 `(("autoconf" ,autoconf)
144 ("automake" ,automake)
145 ("libtool" ,libtool)))
146 (arguments `(#:configure-flags '("--enable-shared")
148 (modify-phases %standard-phases
149 ;; XXX We need to run ./bootstrap because of the build
150 ;; system fixes above.
153 (lambda _ (zero? (system* "sh" "bootstrap")))))))
154 (home-page "http://liba52.sourceforge.net/")
155 (synopsis "ATSC A/52 stream decoder")
156 (description "liba52 is a library for decoding ATSC A/52 streams. The
157 A/52 standard is used in a variety of applications, including digital
158 television and DVD. It is also known as AC-3.")
159 (license license:gpl2+)))
161 (define-public libmpeg2
167 ;; A mirror://sourceforge URI doesn't work, presumably
168 ;; because the SourceForge project is misconfigured.
169 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
170 name "-" version ".tar.gz"))
173 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
181 (build-system gnu-build-system)
182 (home-page "http://libmpeg2.sourceforge.net/")
183 (synopsis "MPEG1 and MPEG2 video decoder library")
185 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
186 (license license:gpl2+)))
188 (define-public libx264
191 (version "20160220-2245")
194 (uri (string-append "http://download.videolan.org/pub/x264/snapshots/"
195 "x264-snapshot-" version ".tar.bz2"))
198 "12zyzbiihfhamf7yi4qqaj6k0nisnrydvfr36kxadvmsm7dg4sj3"))))
199 (build-system gnu-build-system)
201 `(("pkg-config" ,pkg-config)
203 ;; TODO: Add gpac input
205 `(#:tests? #f ;no check target
206 #:configure-flags '("--enable-shared"
207 ;; Don't build the command-line program. If we
208 ;; want it later, we should do so in a different
209 ;; package to avoid a circular dependency (the x264
210 ;; program depends on ffmpeg and ffmpeg depends on
213 (home-page "http://www.videolan.org/developers/x264.html")
214 (synopsis "H.264 video coding library")
215 (description "libx264 is an advanced encoding library for creating
216 H.264 (MPEG-4 AVC) video streams.")
217 (license (list license:gpl2+ ;most files
218 license:isc ;common/x86/x86inc.asm
219 license:lgpl2.1+ ;extras/getopt.c
220 license:bsd-3 ;extras/inttypes.h
221 (license:non-copyleft ;extras/cl*.h
223 "See extras/cl.h in the distribution.")))))
225 (define-public libass
232 "https://github.com/libass/libass/releases/download/"
233 version "/libass-" version ".tar.xz"))
236 "1kpsw4zw95v4cjvild9wpk73dzavn1khsm3bm32kcz6amnkd166n"))))
237 (build-system gnu-build-system)
239 `(("pkg-config" ,pkg-config)
242 `(("freetype" ,freetype)
244 ("fontconfig" ,fontconfig)
245 ("harfbuzz" ,harfbuzz)
247 (home-page "https://github.com/libass/libass")
248 (synopsis "Subtitle rendering library for the ASS/SSA format")
249 (description "libass is a subtitle rendering library for the
250 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
251 (license license:isc)))
253 (define-public libcaca
256 (version "0.99.beta19")
259 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
263 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
264 (build-system gnu-build-system)
265 (native-inputs `(("pkg-config" ,pkg-config)))
267 `(("freeglut" ,freeglut)
273 (home-page "http://caca.zoy.org/wiki/libcaca")
274 (synopsis "Colour ASCII-art library")
275 (description "libcaca is a graphics library that outputs text instead of
276 pixels, so that it can work on older video cards or text terminals. It
277 supports Unicode, 2048 colors, dithering of color images, and advanced text
279 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
281 (define-public libdca
288 "http://download.videolan.org/pub/videolan/libdca/"
289 version "/libdca-" version ".tar.bz2"))
292 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
293 (build-system gnu-build-system)
294 (home-page "http://www.videolan.org/developers/libdca.html")
295 (synopsis "DTS Coherent Acoustics decoder")
296 (description "libdca is a library for decoding DTS Coherent Acoustics
298 (license license:gpl2+)))
307 "mirror://sourceforge/libdv/libdv-" version ".tar.gz"))
310 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
311 (build-system gnu-build-system)
312 (native-inputs `(("pkg-config" ,pkg-config)))
313 (inputs `(("libxv" ,libxv)))
314 (home-page "http://libdv.sourceforge.net/")
315 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
316 (description "The Quasar DV codec (libdv) is a software codec for DV
317 video, the encoding format used by most digital camcorders, typically those
318 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
319 developed according to the official standards for DV video: IEC 61834 and
321 (license license:lgpl2.1+)))
331 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
334 (base32 "0bjfb5s8dk3lql843l91ffxzlq47isqks5sj19cxh7j3nhzw58kz"))))
335 (build-system gnu-build-system)
337 `(("pkg-config" ,pkg-config)))
342 ("libxfixes" ,libxfixes)
346 (modify-phases %standard-phases
348 'build 'fix-dlopen-paths
349 (lambda* (#:key outputs #:allow-other-keys)
350 (let ((out (assoc-ref outputs "out")))
351 (substitute* "va/drm/va_drm_auth_x11.c"
352 (("\"libva-x11\\.so\\.%d\"")
353 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
354 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
355 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
357 (list (string-append "--with-drivers-path="
358 (assoc-ref %build-inputs "mesa") "/lib/dri"))
359 ;; However, we can't write to mesa's store directory, so override the
360 ;; following make variable to install the dummy driver to libva's
361 ;; $prefix/lib/dri directory.
363 (list (string-append "dummy_drv_video_ladir="
364 (assoc-ref %outputs "out") "/lib/dri"))))
365 (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
366 (synopsis "Video acceleration library")
367 (description "The main motivation for VA-API (Video Acceleration API) is
368 to enable hardware accelerated video decode/encode at various
369 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
370 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
371 (license license:expat)))
373 (define-public ffmpeg
379 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
383 "08sjp4dxgcinmv9ly7nm24swmn2cnbbhvph44ihlplf4n33kr542"))))
384 (build-system gnu-build-system)
386 `(("fontconfig" ,fontconfig)
387 ("freetype" ,freetype)
393 ("libbluray" ,libbluray)
395 ("libcdio-paranoia" ,libcdio-paranoia)
396 ("libtheora" ,libtheora)
397 ("libvdpau" ,libvdpau)
398 ("libvorbis" ,libvorbis)
404 ("pulseaudio" ,pulseaudio)
413 ("pkg-config" ,pkg-config)
415 ("python" ,python-2) ; scripts use interpreter python2
419 `(#:test-target "fate"
421 ;; possible additional inputs:
422 ;; --enable-avisynth enable reading of AviSynth script
424 ;; --enable-frei0r enable frei0r video filtering
425 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
426 ;; --enable-libcelt enable CELT decoding via libcelt [no]
427 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
428 ;; and libraw1394 [no]
429 ;; --enable-libfaac enable AAC encoding via libfaac [no]
430 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
431 ;; --enable-libflite enable flite (voice synthesis) support via
433 ;; --enable-libgme enable Game Music Emu via libgme [no]
434 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
435 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
436 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
437 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
438 ;; --enable-libnut enable NUT (de)muxing via libnut,
439 ;; native (de)muxer exists [no]
440 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
441 ;; libopencore-amrnb [no]
442 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
443 ;; libopencore-amrwb [no]
444 ;; --enable-libopencv enable video filtering via libopencv [no]
445 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
447 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
448 ;; --enable-libschroedinger enable Dirac de/encoding via
449 ;; libschroedinger [no]
450 ;; --enable-libshine enable fixed-point MP3 encoding via
452 ;; --enable-libssh enable SFTP protocol via libssh [no]
453 ;; (libssh2 does not work)
454 ;; --enable-libstagefright-h264 enable H.264 decoding via
455 ;; libstagefright [no]
456 ;; --enable-libutvideo enable Ut Video encoding and decoding via
458 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
459 ;; --enable-libvidstab enable video stabilization using
461 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
462 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
463 ;; libvo-amrwbenc [no]
464 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
465 ;; --enable-libxavs enable AVS encoding via xavs [no]
466 ;; --enable-libzmq enable message passing via libzmq [no]
467 ;; --enable-libzvbi enable teletext support via libzvbi [no]
468 ;; --enable-opencl enable OpenCL code
469 '("--enable-avresample"
470 "--enable-gpl" ; enable optional gpl licensed parts
472 "--enable-fontconfig"
479 "--enable-libfreetype"
480 "--enable-libmp3lame"
486 "--enable-libtwolame"
495 "--enable-runtime-cpudetect"
497 ;; Runtime cpu detection is not implemented on
498 ;; MIPS, so we disable some features.
501 "--disable-mipsdspr2"
504 (modify-phases %standard-phases
507 ;; configure does not work followed by "SHELL=..." and
508 ;; "CONFIG_SHELL=..."; set environment variables instead
509 (lambda* (#:key outputs configure-flags #:allow-other-keys)
510 (let ((out (assoc-ref outputs "out")))
511 (substitute* "configure"
512 (("#! /bin/sh") (string-append "#!" (which "bash"))))
513 (setenv "SHELL" (which "bash"))
514 (setenv "CONFIG_SHELL" (which "bash"))
515 (zero? (apply system*
517 (string-append "--prefix=" out)
518 ;; Add $libdir to the RUNPATH of all the binaries.
519 (string-append "--extra-ldflags=-Wl,-rpath="
523 'check 'set-ld-library-path
525 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
527 (let* ((dso (find-files "." "\\.so$"))
528 (path (string-join (map dirname dso) ":")))
529 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
530 (setenv "LD_LIBRARY_PATH" path)
532 (home-page "https://www.ffmpeg.org/")
533 (synopsis "Audio and video framework")
534 (description "FFmpeg is a complete, cross-platform solution to record,
535 convert and stream audio and video. It includes the libavcodec
536 audio/video codec library.")
537 (license license:gpl2+)))
539 (define-public ffmpeg-2.8
545 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
549 "1yh7dvm7zwdlsspdaq524s5qaggma5md9h95qc4kvb5dmyyyvg15"))))
551 (substitute-keyword-arguments (package-arguments ffmpeg)
552 ((#:configure-flags flags)
554 (if (string=? flag "--disable-mipsdsp")
555 "--disable-mipsdspr1"
566 "http://download.videolan.org/pub/videolan/vlc/"
567 version "/vlc-" version ".tar.xz"))
570 "1jqzrzrpw6932lbkf863xk8cfmn4z2ngbxz7w8ggmh4f6xz9sgal"))
571 (modules '((guix build utils)))
573 ;; There are two occurrences where __DATE__ and __TIME__ are
574 ;; used to capture the build time and show it to the user.
575 '(substitute* (find-files "." "help\\.c(pp)?$")
576 (("__DATE__") "\"2016\"")
577 (("__TIME__") "\"00:00\"")))))
578 (build-system gnu-build-system)
580 `(("git" ,git) ; needed for a test
581 ("pkg-config" ,pkg-config)))
582 ;; FIXME: Add optional inputs once available.
584 `(("alsa-lib" ,alsa-lib)
588 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
589 ("fontconfig" ,fontconfig)
590 ("freetype" ,freetype)
593 ("libgcrypt" ,libgcrypt)
598 ("libsamplerate" ,libsamplerate)
600 ("libvorbis" ,libvorbis)
601 ("libtheora" ,libtheora)
603 ("libxinerama" ,libxinerama)
610 ("pulseaudio" ,pulseaudio)
611 ("python" ,python-wrapper)
614 ("sdl-image" ,sdl-image)
616 ("xcb-util-keysyms" ,xcb-util-keysyms)))
619 `("--disable-a52" ; FIXME: reenable once available
620 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
621 (assoc-ref %build-inputs "ffmpeg")
622 "/lib")) ;needed for the tests
625 (modify-phases %standard-phases
626 (add-after 'install 'regenerate-plugin-cache
627 (lambda* (#:key outputs #:allow-other-keys)
628 ;; The 'install-exec-hook' rule in the top-level Makefile.am
629 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
630 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
631 ;; it references. Thus, we first reset the timestamps of all
632 ;; these files, and then regenerate the cache such that the
633 ;; mtimes it includes are always zero instead of being dependent
634 ;; on the build time.
635 (let* ((out (assoc-ref outputs "out"))
636 (pkglibdir (string-append out "/lib/vlc"))
637 (plugindir (string-append pkglibdir "/plugins"))
638 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
639 ;; TODO: Factorize 'reset-timestamps'.
640 (for-each (lambda (file)
641 (let ((s (lstat file)))
642 (unless (eq? (stat:type s) 'symlink)
643 (utime file 0 0 0 0))))
644 (find-files plugindir))
645 (zero? (system* cachegen plugindir))))))))
646 (home-page "https://www.videolan.org/")
647 (synopsis "Audio and video framework")
648 (description "VLC is a cross-platform multimedia player and framework
649 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
650 treaming protocols.")
651 (license license:gpl2+)))
653 (define-public mplayer
660 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
664 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
665 (build-system gnu-build-system)
666 ;; FIXME: Add additional inputs once available.
668 `(("pkg-config" ,pkg-config)))
670 `(("alsa-lib" ,alsa-lib)
671 ("cdparanoia" ,cdparanoia)
673 ("fontconfig" ,fontconfig)
674 ("freetype" ,freetype)
675 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
678 ("libdvdcss" ,libdvdcss)
679 ("libdvdnav" ,libdvdnav)
681 ("libmpeg2" ,libmpeg2)
682 ("libmpg123" ,mpg123) ; audio codec for MP3
684 ("libtheora" ,libtheora)
685 ("libvdpau" ,libvdpau)
686 ("libvorbis" ,libvorbis)
689 ("libxinerama" ,libxinerama)
691 ("libxxf86dga" ,libxxf86dga)
695 ("pulseaudio" ,pulseaudio)
696 ("python" ,python-wrapper)
702 `(#:tests? #f ; no test target
704 (modify-phases %standard-phases
706 ;; configure does not work followed by "SHELL=..." and
707 ;; "CONFIG_SHELL=..."; set environment variables instead
708 (lambda* (#:key inputs outputs #:allow-other-keys)
709 (let ((out (assoc-ref outputs "out"))
710 (libx11 (assoc-ref inputs "libx11")))
711 (substitute* "configure"
712 (("#! /bin/sh") (string-append "#!" (which "bash"))))
713 (setenv "SHELL" (which "bash"))
714 (setenv "CONFIG_SHELL" (which "bash"))
717 (string-append "--extra-cflags=-I"
718 libx11 "/include") ; to detect libx11
719 "--disable-ffmpeg_a" ; disables bundled ffmpeg
720 (string-append "--prefix=" out)
721 ;; Enable runtime cpu detection where supported,
722 ;; and choose a suitable target.
723 ,@(match (or (%current-target-system)
726 '("--enable-runtime-cpudetection"
727 "--target=x86_64-linux"))
729 '("--enable-runtime-cpudetection"
730 "--target=i686-linux"))
732 '("--target=mips3-linux"))
733 (_ (list (string-append
735 (or (%current-target-system)
736 (nix-system->gnu-triplet
737 (%current-system)))))))
738 "--disable-iwmmxt"))))))))
739 (home-page "https://www.mplayerhq.hu/design7/news.html")
740 (synopsis "Audio and video player")
741 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
742 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
743 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
744 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
745 (license license:gpl2)))
754 "https://github.com/mpv-player/mpv/archive/v" version
758 "0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30"))
759 (file-name (string-append name "-" version ".tar.gz"))))
760 (build-system waf-build-system)
763 ("pkg-config" ,pkg-config)
764 ("python-docutils" ,python-docutils)))
765 ;; Missing features: libguess, Wayland, V4L2
767 `(("alsa-lib" ,alsa-lib)
774 ("libbluray" ,libbluray)
777 ("libcdio-paranoia" ,libcdio-paranoia)
778 ("libdvdread" ,libdvdread)
779 ("libdvdnav" ,libdvdnav)
782 ("libvdpau" ,libvdpau)
785 ("libxinerama" ,libxinerama)
786 ("libxrandr" ,libxrandr)
787 ("libxscrnsaver" ,libxscrnsaver)
792 ("pulseaudio" ,pulseaudio)
794 ("vapoursynth" ,vapoursynth)
797 ;; Keep this in sync with the version in the bootstrap.py
798 ;; script of the source tarball.
799 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.12")
802 "12y9c352zwliw0zk9jm2lhynsjcf5jy0k1qch1c1av8hnbm2pgq1"))))
803 ("youtube-dl" ,youtube-dl)
807 (modify-phases %standard-phases
809 'configure 'setup-waf
810 (lambda* (#:key inputs #:allow-other-keys)
811 (copy-file (assoc-ref inputs "waf") "waf")
812 (setenv "CC" "gcc"))))
813 #:configure-flags (list "--enable-gpl3" "--enable-zsh-comp")
814 ;; No check function defined.
816 (home-page "https://mpv.io/")
817 (synopsis "Audio and video player")
818 (description "mpv is a general-purpose audio and video player. It is a
819 fork of mplayer2 and MPlayer. It shares some features with the former
820 projects while introducing many more.")
821 (license license:gpl2+)))
823 (define-public libvpx
829 (uri (string-append "http://storage.googleapis.com/"
830 "downloads.webmproject.org/releases/webm/"
831 name "-" version ".tar.bz2"))
834 "15v7qw0ydyxn08ksb6lxn1l51pxgpwgshdwd3275yrr5hs86fv9h"))))
835 (build-system gnu-build-system)
838 (modify-phases %standard-phases
840 (lambda* (#:key outputs #:allow-other-keys)
841 (setenv "CONFIG_SHELL" (which "bash"))
842 (let ((out (assoc-ref outputs "out")))
844 (string-append "-Wl,-rpath=" out "/lib"))
845 (zero? (system* "./configure"
848 ;; Limit size to avoid CVE-2015-1258
849 "--size-limit=16384x16384"
850 (string-append "--prefix=" out)))))))
851 #:tests? #f)) ; no check target
855 (synopsis "VP8/VP9 video codec")
856 (description "libvpx is a codec for the VP8/VP9 video compression format.")
857 (license license:bsd-3)
858 (home-page "http://www.webmproject.org/")))
860 (define-public youtube-dl
863 (version "2016.05.01")
866 (uri (string-append "http://youtube-dl.org/downloads/"
867 version "/youtube-dl-"
871 "1w04afmwq5pjvp3nl2k59q0cigqrj9n8fwkydcfldwpq83l15j5d"))))
872 (build-system python-build-system)
873 (home-page "http://youtube-dl.org")
875 ;; The problem here is that the directory for the man page and completion
876 ;; files is relative, and for some reason, setup.py uses the
877 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
878 ;; So, we need pass the prefix directly. In addition, make sure the Bash
879 ;; completion file is called 'youtube-dl' rather than
880 ;; 'youtube-dl.bash-completion'.
881 `(#:phases (modify-phases %standard-phases
882 (add-before 'install 'fix-the-data-directories
883 (lambda* (#:key outputs #:allow-other-keys)
884 (let ((prefix (assoc-ref outputs "out")))
885 (mkdir "bash-completion")
886 (rename-file "youtube-dl.bash-completion"
887 "bash-completion/youtube-dl")
888 (substitute* "setup.py"
889 (("youtube-dl\\.bash-completion")
890 "bash-completion/youtube-dl")
892 (string-append "'" prefix "/etc/"))
894 (string-append "'" prefix "/share/")))))))))
895 (synopsis "Download videos from YouTube.com and other sites")
897 "Youtube-dl is a small command-line program to download videos from
898 YouTube.com and a few more sites.")
899 (license license:public-domain)))
901 (define-public libbluray
907 (uri (string-append "http://download.videolan.org/videolan/"
909 name "-" version ".tar.bz2"))
912 "1sp71j4agcsg17g6b85cqz78pn5vknl5pl39rvr6mkib5ps99jgg"))))
913 (build-system gnu-build-system)
914 (arguments `(#:configure-flags '("--disable-bdjava")))
915 (native-inputs `(("pkg-config" ,pkg-config)))
917 `(("fontconfig" ,fontconfig)
918 ("freetype" ,freetype)
919 ("libxml2" ,libxml2)))
920 (home-page "http://www.videolan.org/developers/libbluray.html")
921 (synopsis "Blu-Ray Disc playback library")
923 "libbluray is a library designed for Blu-Ray Disc playback for media
924 players, like VLC or MPlayer.")
925 (license license:lgpl2.1+)))
927 (define-public libdvdread
933 (uri (string-append "http://download.videolan.org/videolan/"
935 name "-" version ".tar.bz2"))
938 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
939 (build-system gnu-build-system)
940 (home-page "http://dvdnav.mplayerhq.hu/")
941 (synopsis "Library for reading video DVDs")
943 "Libdvdread provides a simple foundation for reading DVD video
944 disks. It provides the functionality that is required to access many
945 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
946 authentication and descrambling (if an external libdvdcss library is
948 (license license:gpl2+)))
950 (define-public libdvdnav
956 (uri (string-append "http://download.videolan.org/videolan/"
958 name "-" version ".tar.bz2"))
961 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
962 (build-system gnu-build-system)
964 `(("pkg-config" ,pkg-config)))
966 `(("libdvdread" ,libdvdread)))
967 (home-page "http://dvdnav.mplayerhq.hu/")
968 (synopsis "Library for video DVD navigation features")
970 "Libdvdnav is a library for developers of multimedia
971 applications. It allows easy use of sophisticated DVD navigation features
972 such as DVD menus, multiangle playback and even interactive DVD games. All
973 this functionality is provided through a simple API which provides the DVD
974 playback as a single logical stream of blocks, intermitted by special
975 dvdnav events to report certain conditions. The main usage of libdvdnav is
976 a loop regularly calling a function to get the next block, surrounded by
977 additional calls to tell the library of user interaction. The whole
978 DVD virtual machine and internal playback states are completely
980 (license license:gpl2+)))
982 (define-public libdvdnav-4
990 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
994 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
996 `(("pkg-config" ,pkg-config)
997 ("autoconf" ,autoconf)
998 ("automake" ,automake)
999 ("libtool" ,libtool)))
1005 (zero? (system* "autoreconf" "-vif")))
1006 %standard-phases)))))
1008 (define-public libdvdcss
1014 (uri (string-append "http://download.videolan.org/pub/"
1015 name "/" version "/"
1016 name "-" version ".tar.bz2"))
1019 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1020 (build-system gnu-build-system)
1021 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1022 (synopsis "Library for accessing DVDs as block devices")
1024 "libdvdcss is a simple library designed for accessing DVDs like a block
1025 device without having to bother about the decryption.")
1026 (license license:gpl2+)))
1028 (define-public srt2vtt
1035 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1039 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1040 (build-system gnu-build-system)
1042 `(("guile" ,guile-2.0)))
1043 (synopsis "SubRip to WebVTT subtitle converter")
1044 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1045 for use with HTML5 video.")
1046 (home-page "http://dthompson.us/pages/software/srt2vtt")
1047 (license license:gpl3+)))
1049 (define-public avidemux
1056 "mirror://sourceforge/avidemux/avidemux_"
1060 "1vas43bwb15q2wv3dpp7fgp8dc6szinmwl7i0ziq2vv5l2128v0p"))
1061 (patches (search-patches "avidemux-install-to-lib.patch"))))
1062 (build-system cmake-build-system)
1064 `(("pkg-config" ,pkg-config)))
1065 ;; FIXME: Once packaged, add libraries not found during the build.
1067 `(("alsa-lib" ,alsa-lib)
1068 ("fontconfig" ,fontconfig)
1069 ("freetype" ,freetype)
1070 ("fribidi" ,fribidi)
1074 ("libvorbis" ,libvorbis)
1078 ("pulseaudio" ,pulseaudio)
1079 ("python" ,python-wrapper)
1086 `(#:tests? #f ; no check target
1088 ;; Make sure files inside the included ffmpeg tarball are
1091 'patch-source-shebangs 'unpack-ffmpeg
1093 (with-directory-excursion "avidemux_core/ffmpeg_package"
1094 (system* "tar" "xf" "ffmpeg-2.6.1.tar.bz2")
1095 (delete-file "ffmpeg-2.6.1.tar.bz2")))
1097 'patch-source-shebangs 'repack-ffmpeg
1099 (with-directory-excursion "avidemux_core/ffmpeg_package"
1100 (substitute* "ffmpeg-2.6.1/configure"
1101 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1102 (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1"
1103 ;; avoid non-determinism in the archive
1104 "--sort=name" "--mtime=@0"
1105 "--owner=root:0" "--group=root:0")
1106 (delete-file-recursively "ffmpeg-2.6.1")))
1107 (alist-replace 'configure
1109 ;; Copy-paste settings from the cmake build system.
1110 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1111 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")))
1112 (alist-replace 'build
1113 (lambda* (#:key inputs outputs #:allow-other-keys)
1115 ((out (assoc-ref outputs "out"))
1116 (lib (string-append out "/lib"))
1118 (sdl (assoc-ref inputs "sdl"))
1120 (lambda* (component srcdir #:optional (args '()))
1121 (let ((builddir (string-append "build_" component)))
1123 (with-directory-excursion builddir
1125 (apply system* "cmake"
1126 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1127 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1128 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1129 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1130 "\"-Wl,-rpath=" lib "\"")
1131 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1132 (string-append "-DSDL_INCLUDE_DIR="
1134 (string-append "../" srcdir)
1137 (system* "make" "-j"
1138 (number->string (parallel-job-count)))
1139 (system* "make" "install"))))))))
1141 (and (build_component "core" "avidemux_core")
1142 (build_component "cli" "avidemux/cli")
1143 (build_component "qt4" "avidemux/qt4")
1144 (build_component "plugins_common" "avidemux_plugins"
1145 '("-DPLUGIN_UI=COMMON"))
1146 (build_component "plugins_cli" "avidemux_plugins"
1147 '("-DPLUGIN_UI=CLI"))
1148 (build_component "plugins_qt4" "avidemux_plugins"
1149 '("-DPLUGIN_UI=QT4"))
1150 (build_component "plugins_settings" "avidemux_plugins"
1151 '("-DPLUGIN_UI=SETTINGS")))
1152 ;; Remove .exe and .dll file.
1153 (delete-file-recursively
1154 (string-append out "/share/ADM6_addons"))))
1155 (alist-delete 'install
1156 %standard-phases)))))))
1157 (home-page "http://fixounet.free.fr/avidemux/")
1158 (synopsis "Video editor")
1159 (description "Avidemux is a video editor designed for simple cutting,
1160 filtering and encoding tasks. It supports many file types, including AVI,
1161 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1162 can be automated using projects, job queue and powerful scripting
1164 ;; Software with various licenses is included, see License.txt.
1165 (license license:gpl2+)))
1167 (define-public vapoursynth
1169 (name "vapoursynth")
1174 "https://github.com/vapoursynth/vapoursynth/archive/R"
1176 (file-name (string-append name "-" version))
1179 "0pnrawcg1j65i46yim0z447lglq1af5zgx0lkqf1x5xl1bfwc0v7"))))
1180 (build-system gnu-build-system)
1182 `(("autoconf" ,autoconf)
1183 ("automake" ,automake)
1184 ("cython" ,python-cython)
1185 ("libtool" ,libtool)
1186 ("pkg-config" ,pkg-config)
1190 `(("ffmpeg" ,ffmpeg)
1192 ("tesseract-ocr" ,tesseract-ocr)))
1195 (modify-phases %standard-phases
1199 (zero? (system* "sh" "autogen.sh")))))))
1200 (home-page "http://www.vapoursynth.com/")
1201 (synopsis "Video processing framework")
1202 (description "VapourSynth is a C++ library and Python module for video
1203 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1204 multithreading, generalized colorspaces, per frame properties, and videos with
1206 ;; As seen from the source files.
1207 (license license:lgpl2.1+)))
1216 "http://downloads.xvid.org/downloads/xvidcore-"
1217 version ".tar.bz2"))
1220 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1221 (build-system gnu-build-system)
1222 (native-inputs `(("yasm" ,yasm)))
1225 (modify-phases %standard-phases
1227 'configure 'pre-configure
1229 (chdir "build/generic")
1230 (substitute* "configure"
1231 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1232 ;; No 'check' target.
1234 (home-page "https://www.xvid.com/")
1235 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1236 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1237 codec library. It uses ASP features such as b-frames, global and quarter
1238 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1239 and custom quantization matrices.")
1240 (license license:gpl2+)))
1242 (define-public livestreamer
1244 (name "livestreamer")
1249 "https://github.com/chrippa/livestreamer/archive/v"
1251 (file-name (string-append "livestreamer-" version ".tar.gz"))
1254 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1255 (build-system python-build-system)
1257 '(#:tests? #f)) ; tests rely on external web servers
1259 `(("python-requests" ,python-requests)))
1260 (synopsis "Internet video stream viewer")
1261 (description "Livestreamer is a command-line utility that extracts streams
1262 from various services and pipes them into a video playing application.")
1263 (home-page "http://livestreamer.io/")
1264 (license license:bsd-2)))
1272 (uri (string-append "https://github.com/mltframework/mlt/"
1273 "archive/v" version ".tar.gz"))
1274 (file-name (string-append name "-" version ".tar.gz"))
1277 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
1278 (build-system gnu-build-system)
1280 `(#:tests? #f ; no tests
1281 #:make-flags '("CC=gcc")
1283 (list "--enable-gpl3"
1286 (modify-phases %standard-phases
1288 'configure 'override-LDFLAGS
1289 (lambda* (#:key outputs #:allow-other-keys)
1290 (substitute* "config.mak"
1292 (string-append "LDFLAGS+=-Wl,-rpath="
1293 (assoc-ref outputs "out")
1297 `(("alsa-lib" ,alsa-lib)
1299 ("libxml2" ,libxml2)
1302 ("libsamplerate" ,libsamplerate)
1303 ("pulseaudio" ,pulseaudio)
1307 `(("pkg-config" ,pkg-config)))
1308 (home-page "https://www.mltframework.org/")
1309 (synopsis "Author, manage, and run multitrack audio/video compositions")
1311 "MLT is a multimedia framework, designed and developed for television
1312 broadcasting. It provides a toolkit for broadcasters, video editors, media
1313 players, transcoders, web streamers and many more types of applications. The
1314 functionality of the system is provided via an assortment of ready to use
1315 tools, XML authoring components, and an extensible plug-in based API.")
1316 (license license:lgpl2.1+)))
1318 (define-public v4l-utils
1324 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1325 "/v4l-utils-" version ".tar.bz2"))
1328 "0srkwh3r6f0bkb4kp0d7i0mlmp8babs3qc22cdy1sw4awmzd5skq"))))
1329 (build-system gnu-build-system)
1332 (list (string-append "--with-udevdir="
1333 (assoc-ref %outputs "out")
1336 `(("pkg-config" ,pkg-config)))
1338 `(("alsa-lib" ,alsa-lib)
1340 ("libjpeg" ,libjpeg)
1344 (synopsis "Realtime video capture utilities for Linux")
1345 (description "The v4l-utils provide a series of libraries and utilities to
1346 be used for realtime video capture via Linux-specific APIs.")
1347 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1348 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1349 (license (list license:lgpl2.1+ license:gpl2))))
1357 (uri (string-append "https://github.com/jp9000/obs-studio"
1358 "/archive/" version ".tar.gz"))
1359 (file-name (string-append name "-" version ".tar.gz"))
1362 "1w07ign2swfigmsjd2jyaqqdnj2zpzs8hzsjzzk5l377jbx3ml5g"))))
1363 (build-system cmake-build-system)
1364 (arguments '(#:tests? #f)) ; no tests
1366 `(("pkg-config" ,pkg-config)))
1371 ("freetype" ,freetype)
1373 ("jansson" ,jansson)
1374 ("libx264" ,libx264)
1375 ("libxcomposite" ,libxcomposite)
1377 ("pulseaudio" ,pulseaudio)
1379 ("v4l-utils" ,v4l-utils)
1381 (synopsis "Live streaming software")
1382 (description "Open Broadcaster Software provides a graphical interface for
1383 video recording and live streaming. OBS supports capturing audio and video
1384 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1386 (home-page "https://obsproject.com")
1387 (license license:gpl2+)))
1389 (define-public libvdpau
1396 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1397 name "-" version ".tar.bz2"))
1400 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1401 (build-system gnu-build-system)
1403 `(("pkg-config" ,pkg-config)))
1405 `(("dri2proto" ,dri2proto)
1406 ("libx11" ,libx11 "out")
1407 ("libxext" ,libxext)))
1408 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1409 (synopsis "Video Decode and Presentation API")
1410 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1411 provides an interface to video decode acceleration and presentation hardware
1412 present in modern GPUs.")
1413 (license (license:x11-style "file://COPYING"))))
1415 (define-public vdpauinfo
1422 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1423 name "-" version ".tar.gz"))
1426 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1427 (build-system gnu-build-system)
1429 `(("pkg-config" ,pkg-config)
1430 ("libx11" ,libx11)))
1432 `(("libvdpau" ,libvdpau)))
1433 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1434 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1435 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1437 (license (license:x11-style "file://COPYING"))))
1439 (define-public recordmydesktop
1441 (name "recordmydesktop")
1445 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1446 version "/recordmydesktop-" version ".tar.gz"))
1449 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1450 (build-system gnu-build-system)
1451 (inputs `(("popt" ,popt)
1456 ("libxfixes" ,libxfixes)
1457 ("libxdamage" ,libxdamage)
1458 ("libxext" ,libxext)
1459 ("libvorbis" ,libvorbis)
1460 ("libtheora" ,libtheora)))
1461 (home-page "http://recordmydesktop.sourceforge.net/")
1462 (synopsis "Desktop session video recorder")
1464 "recordMyDesktop is a command-line tool that captures the activity in
1465 your graphical desktop and encodes it as a video. This is a useful tool for
1466 making @dfn{screencasts}.")
1467 (license license:gpl2+)))