1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages video)
23 #:use-module (ice-9 match)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (guix utils)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python)
32 #:use-module (guix build-system waf)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages algebra)
35 #:use-module (gnu packages audio)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages avahi)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages cdrom)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages databases)
42 #:use-module (gnu packages doxygen)
43 #:use-module (gnu packages elf)
44 #:use-module (gnu packages fontutils)
45 #:use-module (gnu packages fribidi)
46 #:use-module (gnu packages gettext)
47 #:use-module (gnu packages ghostscript)
48 #:use-module (gnu packages gl)
49 #:use-module (gnu packages glib)
50 #:use-module (gnu packages guile)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages gnutls)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages image)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages lua)
57 #:use-module (gnu packages mp3)
58 #:use-module (gnu packages ncurses)
59 #:use-module (gnu packages ocr)
60 #:use-module (gnu packages openssl)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages pkg-config)
63 #:use-module (gnu packages pulseaudio)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages qt)
66 #:use-module (gnu packages samba)
67 #:use-module (gnu packages sdl)
68 #:use-module (gnu packages ssh)
69 #:use-module (gnu packages texinfo)
70 #:use-module (gnu packages texlive)
71 #:use-module (gnu packages textutils)
72 #:use-module (gnu packages version-control)
73 #:use-module (gnu packages web)
74 #:use-module (gnu packages xdisorg)
75 #:use-module (gnu packages xiph)
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages xorg)
78 #:use-module (gnu packages yasm)
79 #:use-module (gnu packages zip))
87 (uri (string-append "mirror://sourceforge/aa-project/"
88 name "-" version ".tar.gz"))
91 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
92 (build-system gnu-build-system)
94 `(("makeinfo" ,texinfo)))
96 `(("ncurses" ,ncurses)))
99 (modify-phases %standard-phases
101 (lambda* (#:key inputs outputs #:allow-other-keys)
102 ;; This old `configure' script doesn't support
103 ;; variables passed as arguments.
104 (let ((out (assoc-ref outputs "out"))
105 (ncurses (assoc-ref inputs "ncurses")))
106 (setenv "CONFIG_SHELL" (which "bash"))
107 (zero? (system* "./configure"
108 (string-append "--prefix=" out)
109 (string-append "--with-ncurses="
111 (home-page "http://aa-project.sourceforge.net/aalib/")
112 (synopsis "ASCII-art library")
114 "AA-lib is a low level gfx library which does not require graphics device.
115 In fact, there is no graphical output possible. AA-lib replaces those
116 old-fashioned output methods with powerful ascii-art renderer.")
117 (license license:lgpl2.0+)))
119 (define-public liba52
126 ;; A mirror://sourceforge URI doesn't work, presumably
127 ;; because the SourceForge project is misconfigured.
128 "http://liba52.sourceforge.net/files/a52dec-" version
132 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))))
133 (build-system gnu-build-system)
134 (arguments `(#:configure-flags
135 '(;; FIXME: liba52-0.7.4's config.guess fails on mips64el.
136 ,@(if (%current-target-system)
139 (nix-system->gnu-triplet (%current-system))))
140 (list (string-append "--build=" triplet)))))))
141 (home-page "http://liba52.sourceforge.net/")
142 (synopsis "ATSC A/52 stream decoder")
143 (description "liba52 is a library for decoding ATSC A/52 streams. The
144 A/52 standard is used in a variety of applications, including digital
145 television and DVD. It is also known as AC-3.")
146 (license license:gpl2+)))
148 (define-public libass
155 "https://github.com/libass/libass/releases/download/"
156 version "/libass-" version ".tar.xz"))
159 "1mwj2nk9g6cq6f8m1hf0ijg1299rghhy9naahqq43sc2whblb1l7"))))
160 (build-system gnu-build-system)
162 `(("pkg-config" ,pkg-config)
165 `(("freetype" ,freetype)
167 ("fontconfig" ,fontconfig)
168 ("harfbuzz" ,harfbuzz)
170 (home-page "https://github.com/libass/libass")
171 (synopsis "Subtitle rendering library for the ASS/SSA format")
172 (description "libass is a subtitle rendering library for the
173 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
174 (license license:isc)))
176 (define-public libcaca
179 (version "0.99.beta19")
182 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
186 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
187 (build-system gnu-build-system)
188 (native-inputs `(("pkg-config" ,pkg-config)))
190 `(("freeglut" ,freeglut)
196 (home-page "http://caca.zoy.org/wiki/libcaca")
197 (synopsis "Colour ASCII-art library")
198 (description "libcaca is a graphics library that outputs text instead of
199 pixels, so that it can work on older video cards or text terminals. It
200 supports Unicode, 2048 colors, dithering of color images, and advanced text
202 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
204 (define-public libdca
211 "http://download.videolan.org/pub/videolan/libdca/"
212 version "/libdca-" version ".tar.bz2"))
215 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
216 (build-system gnu-build-system)
217 (home-page "http://www.videolan.org/developers/libdca.html")
218 (synopsis "DTS Coherent Acoustics decoder")
219 (description "libdca is a library for decoding DTS Coherent Acoustics
221 (license license:gpl2+)))
230 "mirror://sourceforge/libdv/libdv-" version ".tar.gz"))
233 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
234 (build-system gnu-build-system)
235 (native-inputs `(("pkg-config" ,pkg-config)))
236 (inputs `(("libxv" ,libxv)))
237 (home-page "http://libdv.sourceforge.net/")
238 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
239 (description "The Quasar DV codec (libdv) is a software codec for DV
240 video, the encoding format used by most digital camcorders, typically those
241 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
242 developed according to the official standards for DV video: IEC 61834 and
244 (license license:lgpl2.1+)))
254 "http://www.freedesktop.org/software/vaapi/releases/libva/libva-"
257 (base32 "01d01mm9fgpwzqycmjjcj3in3vvzcibi3f64icsw2sksmmgb4495"))))
258 (build-system gnu-build-system)
260 `(("pkg-config" ,pkg-config)))
265 ("libxfixes" ,libxfixes)
269 (modify-phases %standard-phases
271 'build 'fix-dlopen-paths
272 (lambda* (#:key outputs #:allow-other-keys)
273 (let ((out (assoc-ref outputs "out")))
274 (substitute* "va/drm/va_drm_auth_x11.c"
275 (("\"libva-x11\\.so\\.%d\"")
276 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
277 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
278 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
280 (list (string-append "--with-drivers-path="
281 (assoc-ref %build-inputs "mesa") "/lib/dri"))
282 ;; However, we can't write to mesa's store directory, so override the
283 ;; following make variable to install the dummy driver to libva's
284 ;; $prefix/lib/dri directory.
286 (list (string-append "dummy_drv_video_ladir="
287 (assoc-ref %outputs "out") "/lib/dri"))))
288 (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
289 (synopsis "Video acceleration library")
290 (description "The main motivation for VA-API (Video Acceleration API) is
291 to enable hardware accelerated video decode/encode at various
292 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
293 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
294 (license license:expat)))
296 (define-public ffmpeg
302 (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
306 "0jl43b63b20db3yia5xxp0hh8zwdbirk5k9p1d7416nq1b5ckfx8"))))
307 (build-system gnu-build-system)
309 `(("fontconfig" ,fontconfig)
310 ("freetype" ,freetype)
315 ("libbluray" ,libbluray)
317 ("libcdio-paranoia" ,libcdio-paranoia)
319 ("libtheora" ,libtheora)
320 ("libvorbis" ,libvorbis)
323 ("pulseaudio" ,pulseaudio)
333 ("pkg-config" ,pkg-config)
335 ("python" ,python-2) ; scripts use interpreter python2
339 `(#:test-target "fate"
341 (modify-phases %standard-phases
344 ;; configure does not work followed by "SHELL=..." and
345 ;; "CONFIG_SHELL=..."; set environment variables instead
346 (lambda* (#:key outputs configure-flags #:allow-other-keys)
347 (let ((out (assoc-ref outputs "out")))
348 (substitute* "configure"
349 (("#! /bin/sh") (string-append "#!" (which "bash"))))
350 (setenv "SHELL" (which "bash"))
351 (setenv "CONFIG_SHELL" (which "bash"))
352 ;; possible additional inputs:
353 ;; --enable-avisynth enable reading of AviSynth script files [no]
354 ;; --enable-frei0r enable frei0r video filtering
355 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
356 ;; --enable-libcelt enable CELT decoding via libcelt [no]
357 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
358 ;; and libraw1394 [no]
359 ;; --enable-libfaac enable AAC encoding via libfaac [no]
360 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
361 ;; --enable-libflite enable flite (voice synthesis) support via libflite [no]
362 ;; --enable-libgme enable Game Music Emu via libgme [no]
363 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
364 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
365 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
366 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
367 ;; --enable-libnut enable NUT (de)muxing via libnut,
368 ;; native (de)muxer exists [no]
369 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
370 ;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
371 ;; --enable-libopencv enable video filtering via libopencv [no]
372 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
373 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
374 ;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
375 ;; --enable-libshine enable fixed-point MP3 encoding via libshine [no]
376 ;; --enable-libssh enable SFTP protocol via libssh [no]
377 ;; (libssh2 does not work)
378 ;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
379 ;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
380 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
381 ;; --enable-libvidstab enable video stabilization using vid.stab [no]
382 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
383 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
384 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
385 ;; --enable-libx264 enable H.264 encoding via x264 [no]
386 ;; --enable-libxavs enable AVS encoding via xavs [no]
387 ;; --enable-libzmq enable message passing via libzmq [no]
388 ;; --enable-libzvbi enable teletext support via libzvbi [no]
389 ;; --enable-opencl enable OpenCL code
390 ;; --enable-x11grab enable X11 grabbing [no]
393 (string-append "--prefix=" out)
394 ;; Add $libdir to the RUNPATH of all the binaries.
395 (string-append "--extra-ldflags=-Wl,-rpath="
397 "--enable-avresample"
398 "--enable-gpl" ; enable optional gpl licensed parts
400 "--enable-fontconfig"
401 ;; "--enable-gnutls" ; causes test failures
407 "--enable-libfreetype"
408 "--enable-libmp3lame"
415 "--enable-libtwolame"
421 "--enable-runtime-cpudetect"
423 ;; Runtime cpu detection is not implemented on
424 ;; MIPS, so we disable some features.
426 "--disable-mipsdspr1"
427 "--disable-mipsdspr2"
428 "--disable-mipsfpu")))))
430 'check 'set-ld-library-path
432 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
434 (let* ((dso (find-files "." "\\.so$"))
435 (path (string-join (map dirname dso) ":")))
436 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
437 (setenv "LD_LIBRARY_PATH" path)
439 (home-page "http://www.ffmpeg.org/")
440 (synopsis "Audio and video framework")
441 (description "FFmpeg is a complete, cross-platform solution to record,
442 convert and stream audio and video. It includes the libavcodec
443 audio/video codec library.")
444 (license license:gpl2+)))
453 "http://download.videolan.org/pub/videolan/vlc/"
454 version "/vlc-" version ".tar.xz"))
457 "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy"))))
458 (build-system gnu-build-system)
460 `(("git" ,git) ; needed for a test
461 ("pkg-config" ,pkg-config)))
462 ;; FIXME: Add optional inputs once available.
464 `(("alsa-lib" ,alsa-lib)
469 ("fontconfig" ,fontconfig)
470 ("freetype" ,freetype)
473 ("libgcrypt" ,libgcrypt)
478 ("libsamplerate" ,libsamplerate)
480 ("libvorbis" ,libvorbis)
481 ("libtheora" ,libtheora)
483 ("libxinerama" ,libxinerama)
490 ("pulseaudio" ,pulseaudio)
491 ("python" ,python-wrapper)
494 ("sdl-image" ,sdl-image)
496 ("xcb-util-keysyms" ,xcb-util-keysyms)))
499 `("--disable-a52" ; FIXME: reenable once available
500 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
501 (assoc-ref %build-inputs "ffmpeg")
502 "/lib")))) ; needed for the tests
503 (home-page "https://www.videolan.org/")
504 (synopsis "Audio and video framework")
505 (description "VLC is a cross-platform multimedia player and framework
506 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
507 treaming protocols.")
508 (license license:gpl2+)))
510 (define-public mplayer
517 "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
521 "0xlcg7rszrwmw29wqr0plsw5d1rq0hb7vjsq7bmmfsly2z1wg3yf"))))
522 (build-system gnu-build-system)
523 ;; FIXME: Add additional inputs once available.
525 `(("pkg-config" ,pkg-config)))
527 `(("alsa-lib" ,alsa-lib)
528 ("cdparanoia" ,cdparanoia)
529 ("fontconfig" ,fontconfig)
530 ("freetype" ,freetype)
532 ("libmpg123" ,mpg123) ; audio codec for MP3
533 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
536 ("libtheora" ,libtheora)
537 ("libvorbis" ,libvorbis)
539 ("libxxf86dga" ,libxxf86dga)
540 ("libxinerama" ,libxinerama)
544 ("pulseaudio" ,pulseaudio)
545 ("python" ,python-wrapper)
551 `(#:tests? #f ; no test target
555 ;; configure does not work followed by "SHELL=..." and
556 ;; "CONFIG_SHELL=..."; set environment variables instead
557 (lambda* (#:key inputs outputs #:allow-other-keys)
558 (let ((out (assoc-ref outputs "out"))
559 (libx11 (assoc-ref inputs "libx11")))
560 (substitute* "configure"
561 (("#! /bin/sh") (string-append "#!" (which "bash"))))
562 (setenv "SHELL" (which "bash"))
563 (setenv "CONFIG_SHELL" (which "bash"))
566 (string-append "--extra-cflags=-I"
567 libx11 "/include") ; to detect libx11
568 "--disable-tremor-internal" ; forces external libvorbis
569 (string-append "--prefix=" out)
570 ;; Enable runtime cpu detection where supported,
571 ;; and choose a suitable target.
572 ,@(match (or (%current-target-system)
575 '("--enable-runtime-cpudetection"
576 "--target=x86_64-linux"))
578 '("--enable-runtime-cpudetection"
579 "--target=i686-linux"))
581 '("--target=mips3-linux"))
582 (_ (list (string-append
584 (or (%current-target-system)
585 (nix-system->gnu-triplet
586 (%current-system)))))))
588 "--disable-iwmmxt"))))
590 (home-page "http://www.mplayerhq.hu/design7/news.html")
591 (synopsis "Audio and video player")
592 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
593 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
594 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
595 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
596 (license license:gpl2)))
598 ;;; This is not version 2; it's a fork literally named "mplayer2".
599 (define-public mplayer2
602 ;; There are no tarballs. The 2.0 git tag, which is actually the first
603 ;; release is from 2011. The latest commit is from 2013 October, so we
609 ;; XXX Change this if mplayer2.org goes up again.
610 (url "http://repo.or.cz/mplayer2.git")
611 (commit "2c378c71a4d9b1df382db9aa787b646628b4e3f9")))
614 "0s8554sanj6cvnf0h148nsmjgy5v0568nmcza7grpv6fnmddpfam"))
615 (file-name (string-append name "-" version "-checkout"))
616 ;; Warning: after using this patch, one must pass the -ltheora
617 ;; linker flag manually to configure; see below.
618 (patches (list (search-patch "mplayer2-theora-fix.patch")))))
619 (build-system gnu-build-system)
621 `(("pkg-config" ,pkg-config)
624 ("python-2" ,python-2)
625 ("python-docutils" ,python-docutils)
626 ;; ./configure uses which(1) to find rst2man.py.
628 ;; Missing features: DirectFB, Xss screensaver extensions, VDPAU, MNG,
629 ;; libnut, DirectShow TV interface, Radio interfaces of all kinds, vstream
630 ;; client, XMSS inputplugin support, joystick, lirc/lircc, and openal.
631 ;; OpenAL support is experimental and causes compilation to fail with
634 `(("alsa-lib" ,alsa-lib)
637 ("gettext" ,gnu-gettext)
643 ("libbluray" ,libbluray)
646 ("libcdio-paranoia" ,libcdio-paranoia)
649 ("libdvdread" ,libdvdread)
650 ("libdvdnav" ,libdvdnav-4)
655 ("libtheora" ,libtheora)
656 ("libungif" ,libungif)
657 ("libvorbis" ,libvorbis)
659 ("libxinerama" ,libxinerama)
664 ("portaudio" ,portaudio)
665 ("pulseaudio" ,pulseaudio)
675 ;; ./configure does not work followed by "SHELL=..." and
676 ;; "CONFIG_SHELL=..."; set environment variables instead.
677 (lambda* (#:key inputs outputs #:allow-other-keys)
678 (setenv "SHELL" (which "bash"))
679 (setenv "CONFIG_SHELL" (which "bash"))
680 (substitute* "configure"
681 (("/usr/X11") (assoc-ref inputs "libx11")))
683 (system* "./configure"
684 (string-append "--prefix=" (assoc-ref outputs "out"))
685 "--enable-translation"
686 "--enable-runtime-cpudetection"
687 ;; This is needed in accordance with the theora patch.
688 "--extra-libs=-ltheoradec")))
690 'build 'fix-TOOLS-shebangs
692 (substitute* (find-files "TOOLS" "\\.(sh|pl|py)$")
693 (("/usr/bin/env") (which "env"))
694 (("/usr/bin/perl") (which "perl"))
695 (("/usr/bin/python3") (which "python3"))
696 (("/usr/bin/python") (which "python"))))
698 'build 'fix-input-buffer-padding-size
700 (substitute* "libmpdemux/demuxer.h"
701 ;; This has to match with FFmpeg's FF_INPUT_BUFFER_PADDING_SIZE,
702 ;; which has changed at some point.
703 (("(#define MP_INPUT_BUFFER_PADDING_SIZE )[0-9]*" all)
704 (string-append all "32"))))
706 ;; No 'check' target.
708 ;; XXX Change this if mplayer2.org goes up again.
709 (home-page "http://repo.or.cz/w/mplayer2.git")
710 (synopsis "Audio and video player")
711 (description "mplayer2 is a general-purpose audio and video player. It's
712 a fork of the original MPlayer project, and contains further development in
714 ;; See file Copyright. Most files are gpl2+ or compatible, but talloc.c
715 ;; is under lgpl3+, thus the whole project becomes gpl3+.
716 (license license:gpl3+)))
725 "https://github.com/mpv-player/mpv/archive/v" version
729 "08nx0g6ji2d90f5w62g327szhkb7id7jzwgf3x069rc5id1x3bx7"))
730 (file-name (string-append name "-" version ".tar.gz"))))
731 (build-system waf-build-system)
734 ("pkg-config" ,pkg-config)
735 ("python-docutils" ,python-docutils)))
736 ;; Missing features: libguess, Wayland, VDPAU, V4L2
738 `(("alsa-lib" ,alsa-lib)
745 ("libbluray" ,libbluray)
748 ("libcdio-paranoia" ,libcdio-paranoia)
749 ("libdvdread" ,libdvdread)
750 ("libdvdnav" ,libdvdnav)
755 ("libxinerama" ,libxinerama)
756 ("libxrandr" ,libxrandr)
757 ("libxscrnsaver" ,libxscrnsaver)
762 ("pulseaudio" ,pulseaudio)
765 ("vapoursynth" ,vapoursynth)
768 ;; Keep this in sync with the version in the bootstrap.py
769 ;; script of the source tarball.
770 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.4")
773 "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h"))))
774 ("youtube-dl" ,youtube-dl)
778 (modify-phases %standard-phases
780 'configure 'setup-waf
781 (lambda* (#:key inputs #:allow-other-keys)
782 (copy-file (assoc-ref inputs "waf") "waf")
783 (setenv "CC" "gcc")))
785 'configure 'patch-wscript
786 (lambda* (#:key inputs #:allow-other-keys)
787 (substitute* "wscript"
788 ;; XXX Remove this when our Samba package provides a .pc file.
789 (("check_pkg_config\\('smbclient'\\)")
790 "check_cc(lib='smbclient')")
791 ;; XXX Remove this when our Lua package provides a .pc file.
793 "check_cc(lib='lua')")))))
794 ;; No check function defined.
796 (home-page "http://mpv.io/")
797 (synopsis "Audio and video player")
798 (description "mpv is a general-purpose audio and video player. It is a
799 fork of mplayer2 and MPlayer. It shares some features with the former
800 projects while introducing many more.")
801 (license license:gpl2+)))
803 (define-public libvpx
809 (uri (string-append "http://webm.googlecode.com/files/libvpx-v"
813 "1aai0h0z1bhp89pxmg4fkrwpmqq24k39fhr15cw6q77m9bccip6k"))
815 (list (search-patch "libvpx-vp9-out-of-bounds-access.patch")
816 (search-patch "libvpx-fix-ssse3-quantize.patch")
817 (search-patch "libvpx-fix-armhf-link.patch")))))
818 (build-system gnu-build-system)
820 `(#:phases (alist-replace
822 (lambda* (#:key outputs #:allow-other-keys)
823 (setenv "CONFIG_SHELL" (which "bash"))
824 (let ((out (assoc-ref outputs "out")))
826 (string-append "-Wl,-rpath=" out "/lib"))
827 (zero? (system* "./configure"
830 ,@(if (and (not (%current-target-system))
834 ;; When building on ARMv7, libvpx
835 ;; assumes that NEON will be
836 ;; available. On Guix, armhf
837 ;; does not require NEON, so we
838 ;; build for ARMv6 and -marm (since
839 ;; no thumb2 on ARMv6) to ensure
840 ;; compatibility with all ARMv7
841 ;; cores we support. Based on
842 ;; the Debian libvpx package.
843 '("--target=armv6-linux-gcc"
844 "--extra-cflags=-marm"
847 (string-append "--prefix=" out)))))
849 #:tests? #f)) ; no check target
853 (synopsis "VP8/VP9 video codec")
854 (description "libvpx is a codec for the VP8/VP9 video compression format.")
855 (license license:bsd-3)
856 (home-page "http://www.webmproject.org/")))
858 (define-public youtube-dl
861 (version "2015.06.04.1")
864 (uri (string-append "http://youtube-dl.org/downloads/"
865 version "/youtube-dl-"
869 "0rk5c2m19x119bly38yjbizkr99ayn265lm15rm2x5ipjvdixyyg"))))
870 (build-system python-build-system)
871 (inputs `(("setuptools" ,python-setuptools)))
872 (home-page "http://youtube-dl.org")
873 (synopsis "Download videos from YouTube.com and other sites")
875 "youtube-dl is a small command-line program to download videos from
876 YouTube.com and a few more sites.")
877 (license license:public-domain)))
879 (define-public libbluray
885 (uri (string-append "http://download.videolan.org/videolan/"
887 name "-" version ".tar.bz2"))
890 "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp"))))
891 (build-system gnu-build-system)
892 (native-inputs `(("pkg-config" ,pkg-config)))
894 `(("doxygen" ,doxygen)
895 ("fontconfig" ,fontconfig)
896 ("freetype" ,freetype)
898 ("perl" ,perl) ;for doxygen
899 ("texlive" ,texlive)))
900 (home-page "http://www.videolan.org/developers/libbluray.html")
901 (synopsis "Blu-Ray Disc playback library")
903 "libbluray is a library designed for Blu-Ray Disc playback for media
904 players, like VLC or MPlayer.")
905 (license license:lgpl2.1+)))
907 (define-public libdvdread
913 (uri (string-append "http://download.videolan.org/videolan/"
915 name "-" version ".tar.bz2"))
918 "052z62l3x8ka5jpf5bi1mzp5p323n1z9rxj74nq5c35a88x1myv6"))))
919 (build-system gnu-build-system)
920 (home-page "http://dvdnav.mplayerhq.hu/")
921 (synopsis "Library for reading video DVDs")
923 "Libdvdread provides a simple foundation for reading DVD video
924 disks. It provides the functionality that is required to access many
925 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
926 authentication and descrambling (if an external libdvdcss library is
928 (license license:gpl2+)))
930 (define-public libdvdnav
936 (uri (string-append "http://download.videolan.org/videolan/"
938 name "-" version ".tar.bz2"))
941 "1ad2lkkiydgwiyqfysra9lkwjv9yqnvcg4hv92hx8qzics1cpcbj"))))
942 (build-system gnu-build-system)
944 `(("pkg-config" ,pkg-config)))
946 `(("libdvdread" ,libdvdread)))
947 (home-page "http://dvdnav.mplayerhq.hu/")
948 (synopsis "Library for video DVD navigation features")
950 "Libdvdnav is a library for developers of multimedia
951 applications. It allows easy use of sophisticated DVD navigation features
952 such as DVD menus, multiangle playback and even interactive DVD games. All
953 this functionality is provided through a simple API which provides the DVD
954 playback as a single logical stream of blocks, intermitted by special
955 dvdnav events to report certain conditions. The main usage of libdvdnav is
956 a loop regularly calling a function to get the next block, surrounded by
957 additional calls to tell the library of user interaction. The whole
958 DVD virtual machine and internal playback states are completely
960 (license license:gpl2+)))
962 (define-public libdvdnav-4
970 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
974 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
976 `(("pkg-config" ,pkg-config)
977 ("autoconf" ,autoconf)
978 ("automake" ,automake)
979 ("libtool" ,libtool)))
985 (zero? (system* "autoreconf" "-vif")))
986 %standard-phases)))))
988 (define-public libdvdcss
994 (uri (string-append "http://download.videolan.org/videolan/"
996 name "-" version ".tar.bz2"))
999 "158k9zagmbk5bkbz96l6lwhh7xcgfcnzflkr4vblskhcab6llhbw"))))
1000 (build-system gnu-build-system)
1001 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1002 (synopsis "Library for accessing DVDs as block devices")
1004 "libdvdcss is a simple library designed for accessing DVDs like a block
1005 device without having to bother about the decryption.")
1006 (license license:gpl2+)))
1008 (define-public srt2vtt
1015 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1019 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1020 (build-system gnu-build-system)
1022 `(("guile" ,guile-2.0)))
1023 (synopsis "SubRip to WebVTT subtitle converter")
1024 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1025 for use with HTML5 video.")
1026 (home-page "http://dthompson.us/pages/software/srt2vtt")
1027 (license license:gpl3+)))
1029 (define-public avidemux
1036 "mirror://sourceforge/avidemux/avidemux_"
1040 "10p60wjkzf1bxqcb6i7bx4hbqy3vqg598p3l9lc4v2c9b8iqr682"))))
1041 (build-system cmake-build-system)
1043 `(("pkg-config" ,pkg-config)))
1044 ;; FIXME: Once packaged, add libraries not found during the build.
1046 `(("alsa-lib" ,alsa-lib)
1047 ("fontconfig" ,fontconfig)
1048 ("freetype" ,freetype)
1049 ("fribidi" ,fribidi)
1054 ("libvorbis" ,libvorbis)
1058 ("pulseaudio" ,pulseaudio)
1059 ("python" ,python-wrapper)
1066 `(#:tests? #f ; no check target
1068 ;; Make sure files inside the included ffmpeg tarball are
1071 'patch-source-shebangs 'unpack-ffmpeg
1073 (with-directory-excursion "avidemux_core/ffmpeg_package"
1074 (system* "tar" "xf" "ffmpeg-1.2.1.tar.bz2")
1075 (delete-file "ffmpeg-1.2.1.tar.bz2")))
1077 'patch-source-shebangs 'repack-ffmpeg
1079 (with-directory-excursion "avidemux_core/ffmpeg_package"
1080 (substitute* "ffmpeg-1.2.1/configure"
1081 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1082 (system* "tar" "cjf" "ffmpeg-1.2.1.tar.bz2" "ffmpeg-1.2.1")
1083 (delete-file-recursively "ffmpeg-1.2.1")))
1084 (alist-replace 'configure
1086 ;; Copy-paste settings from the cmake build system.
1087 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1088 (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
1089 (alist-replace 'build
1090 (lambda* (#:key inputs outputs #:allow-other-keys)
1092 ((out (assoc-ref outputs "out"))
1093 (lib (string-append out "/lib64"))
1095 (sdl (assoc-ref inputs "sdl"))
1097 (lambda* (component srcdir #:optional (args '()))
1098 (let ((builddir (string-append "build_" component)))
1100 (with-directory-excursion builddir
1102 (apply system* "cmake"
1103 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1104 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1105 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1106 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1107 "\"-Wl,-rpath=" lib "\"")
1108 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1109 (string-append "-DSDL_INCLUDE_DIR="
1111 (string-append "../" srcdir)
1113 (system* "make" "-j"
1114 (number->string (parallel-job-count)))
1115 (system* "make" "install"))))))))
1117 (and (build_component "core" "avidemux_core")
1118 (build_component "cli" "avidemux/cli")
1119 (build_component "qt4" "avidemux/qt4")
1120 (build_component "gtk" "avidemux/gtk")
1121 (build_component "plugins_common" "avidemux_plugins"
1122 '("-DPLUGIN_UI=COMMON"))
1123 (build_component "plugins_cli" "avidemux_plugins"
1124 '("-DPLUGIN_UI=CLI"))
1125 (build_component "plugins_qt4" "avidemux_plugins"
1126 '("-DPLUGIN_UI=QT4"))
1127 (build_component "plugins_gtk" "avidemux_plugins"
1128 '("-DPLUGIN_UI=GTK"))
1129 (build_component "plugins_settings" "avidemux_plugins"
1130 '("-DPLUGIN_UI=SETTINGS")))
1131 ;; Remove .exe and .dll file.
1132 (delete-file-recursively
1133 (string-append out "/share/ADM6_addons"))))
1134 (alist-delete 'install
1135 %standard-phases)))))))
1136 (home-page "http://fixounet.free.fr/avidemux/")
1137 (synopsis "Video editor")
1138 (description "Avidemux is a video editor designed for simple cutting,
1139 filtering and encoding tasks. It supports many file types, including AVI,
1140 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1141 can be automated using projects, job queue and powerful scripting
1143 ;; Software with various licenses is included, see License.txt.
1144 (license license:gpl2+)))
1146 (define-public avidemux-2.5
1147 (package (inherit avidemux)
1152 "mirror://sourceforge/avidemux/avidemux_"
1156 "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn"))))
1158 `(("pkg-config" ,pkg-config)))
1160 `(("alsa-lib" ,alsa-lib)
1161 ("gettext" ,gnu-gettext)
1165 ("libvorbis" ,libvorbis)
1167 ("libxml2" ,libxml2)
1168 ("libxslt" ,libxslt)
1171 ("pulseaudio" ,pulseaudio)
1180 'patch-source-shebangs 'unpack-ffmpeg
1182 (with-directory-excursion "avidemux/ADM_libraries"
1183 (system* "tar" "xf" "ffmpeg-0.9.tar.bz2")
1184 (delete-file "ffmpeg-0.9.tar.bz2")))
1186 'patch-source-shebangs 'repack-ffmpeg
1188 (with-directory-excursion "avidemux/ADM_libraries"
1189 (substitute* "ffmpeg-0.9/configure"
1190 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1191 (system* "tar" "cjf" "ffmpeg-0.9.tar.bz2" "ffmpeg-0.9")
1192 (delete-file-recursively "ffmpeg-0.9")))
1193 (alist-replace 'configure
1195 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1196 (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
1197 (alist-replace 'build
1198 (lambda* (#:key inputs outputs #:allow-other-keys)
1200 ((out (assoc-ref outputs "out"))
1201 (lib (string-append out "/lib"))
1203 (sdl (assoc-ref inputs "sdl"))
1205 (lambda* (component srcdir)
1206 (let ((builddir (string-append "build_" component)))
1208 (with-directory-excursion builddir
1211 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1212 (string-append "-DCMAKE_INSTALL_PREFIX="
1214 (string-append "-DCMAKE_INSTALL_RPATH="
1216 (string-append "-DAVIDEMUX_SOURCE_DIR="
1218 (string-append "-DAVIDEMUX_CORECONFIG_DIR="
1219 top "/build_main/config")
1220 (string-append "-DAVIDEMUX_INSTALL_PREFIX="
1222 (string-append "-DSDL_INCLUDE_DIR="
1224 (string-append "../" srcdir))
1225 (system* "make" "-j"
1226 (number->string (parallel-job-count)))
1227 (system* "make" "install"))))))))
1229 (and (build_component "main" ".")
1230 (build_component "plugins" "plugins"))
1231 (delete-file-recursively
1232 (string-append out "/share/ADM_addons"))))
1233 (alist-delete 'install
1234 %standard-phases)))))))))
1236 (define-public vapoursynth
1238 (name "vapoursynth")
1243 "https://github.com/vapoursynth/vapoursynth/archive/R"
1247 "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k"))))
1248 (build-system gnu-build-system)
1250 `(("autoconf" ,autoconf)
1251 ("automake" ,automake)
1252 ("cython" ,python-cython)
1253 ("libtool" ,libtool)
1254 ("pkg-config" ,pkg-config)
1258 `(("ffmpeg" ,ffmpeg)
1260 ("tesseract-ocr" ,tesseract-ocr)))
1263 (modify-phases %standard-phases
1267 (zero? (system* "sh" "autogen.sh")))))))
1268 (home-page "http://www.vapoursynth.com/")
1269 (synopsis "Video processing framework")
1270 (description "VapourSynth is a C++ library and Python module for video
1271 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1272 multithreading, generalized colorspaces, per frame properties, and videos with
1274 ;; As seen from the source files.
1275 (license license:lgpl2.1+)))
1284 "http://downloads.xvid.org/downloads/xvidcore-"
1285 version ".tar.bz2"))
1288 "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh"))))
1289 (build-system gnu-build-system)
1290 (native-inputs `(("yasm" ,yasm)))
1294 'configure 'pre-configure
1296 (chdir "build/generic")
1297 (substitute* "configure"
1298 (("#! /bin/sh") (string-append "#!" (which "sh")))))
1300 ;; No 'check' target.
1302 (home-page "https://www.xvid.com/")
1303 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1304 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1305 codec library. It uses ASP features such as b-frames, global and quarter
1306 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1307 and custom quantization matrices.")
1308 (license license:gpl2+)))
1310 (define-public livestreamer
1312 (name "livestreamer")
1317 "https://github.com/chrippa/livestreamer/archive/v"
1319 (file-name (string-append "livestreamer-" version ".tar.gz"))
1322 "1dhgk8v8q1h3km4g5jc0cmjsxdaa2d456fvdb2wk7hmxmmwbqm9j"))))
1323 (build-system python-build-system)
1325 '(#:tests? #f)) ; tests rely on external web servers
1327 `(("python-setuptools" ,python-setuptools)))
1329 `(("python-requests" ,python-requests)
1330 ("python-singledispatch" ,python-singledispatch)))
1331 (synopsis "Internet video stream viewer")
1332 (description "Livestreamer is a command-line utility that extracts streams
1333 from various services and pipes them into a video playing application.")
1334 (home-page "http://livestreamer.io/")
1335 (license license:bsd-2)))