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)
267 (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
268 (synopsis "Video acceleration library")
269 (description "The main motivation for VA-API (Video Acceleration API) is
270 to enable hardware accelerated video decode/encode at various
271 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
272 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
273 (license license:expat)))
275 (define-public ffmpeg
281 (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
285 "14a7zp8pa1rvw6nr9l2rf57xr004n5kwkhn5lglybjnn1p68xhr3"))))
286 (build-system gnu-build-system)
288 `(("fontconfig" ,fontconfig)
289 ("freetype" ,freetype)
294 ("libbluray" ,libbluray)
296 ("libcdio-paranoia" ,libcdio-paranoia)
298 ("libtheora" ,libtheora)
299 ("libvorbis" ,libvorbis)
302 ("patchelf" ,patchelf)
303 ("pulseaudio" ,pulseaudio)
313 ("pkg-config" ,pkg-config)
314 ("python" ,python-2) ; scripts use interpreter python2
318 `(#:test-target "fate"
319 #:modules ((guix build gnu-build-system)
323 #:imported-modules (,@%gnu-build-system-modules
326 (modify-phases %standard-phases
329 ;; configure does not work followed by "SHELL=..." and
330 ;; "CONFIG_SHELL=..."; set environment variables instead
331 (lambda* (#:key outputs configure-flags #:allow-other-keys)
332 (let ((out (assoc-ref outputs "out")))
333 (substitute* "configure"
334 (("#! /bin/sh") (string-append "#!" (which "bash"))))
335 (setenv "SHELL" (which "bash"))
336 (setenv "CONFIG_SHELL" (which "bash"))
337 ;; possible additional inputs:
338 ;; --enable-avisynth enable reading of AviSynth script files [no]
339 ;; --enable-frei0r enable frei0r video filtering
340 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
341 ;; --enable-libcelt enable CELT decoding via libcelt [no]
342 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
343 ;; and libraw1394 [no]
344 ;; --enable-libfaac enable AAC encoding via libfaac [no]
345 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
346 ;; --enable-libflite enable flite (voice synthesis) support via libflite [no]
347 ;; --enable-libgme enable Game Music Emu via libgme [no]
348 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
349 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
350 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
351 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
352 ;; --enable-libnut enable NUT (de)muxing via libnut,
353 ;; native (de)muxer exists [no]
354 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
355 ;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
356 ;; --enable-libopencv enable video filtering via libopencv [no]
357 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
358 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
359 ;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
360 ;; --enable-libshine enable fixed-point MP3 encoding via libshine [no]
361 ;; --enable-libssh enable SFTP protocol via libssh [no]
362 ;; (libssh2 does not work)
363 ;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
364 ;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
365 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
366 ;; --enable-libvidstab enable video stabilization using vid.stab [no]
367 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
368 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
369 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
370 ;; --enable-libx264 enable H.264 encoding via x264 [no]
371 ;; --enable-libxavs enable AVS encoding via xavs [no]
372 ;; --enable-libzmq enable message passing via libzmq [no]
373 ;; --enable-libzvbi enable teletext support via libzvbi [no]
374 ;; --enable-opencl enable OpenCL code
375 ;; --enable-x11grab enable X11 grabbing [no]
378 (string-append "--prefix=" out)
379 "--enable-avresample"
380 "--enable-gpl" ; enable optional gpl licensed parts
382 "--enable-fontconfig"
383 ;; "--enable-gnutls" ; causes test failures
389 "--enable-libfreetype"
390 "--enable-libmp3lame"
397 "--enable-libtwolame"
403 "--enable-runtime-cpudetect"
405 ;; Runtime cpu detection is not implemented on
406 ;; MIPS, so we disable some features.
408 "--disable-mipsdspr1"
409 "--disable-mipsdspr2"
410 "--disable-mipsfpu")))))
412 'check 'set-ld-library-path
414 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
416 (let* ((dso (find-files "." "\\.so$"))
417 (path (string-join (map dirname dso) ":")))
418 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
419 (setenv "LD_LIBRARY_PATH" path)
422 'strip 'add-lib-to-runpath
423 (lambda* (#:key outputs #:allow-other-keys)
424 (let* ((out (assoc-ref outputs "out"))
425 (lib (string-append out "/lib")))
426 ;; Add LIB to the RUNPATH of all the executables and libraries.
427 (with-directory-excursion out
428 (for-each (cut augment-rpath <> lib)
429 (append (find-files "bin" ".*")
430 (find-files "lib" "\\.so\\..*\\."))))))))))
431 (home-page "http://www.ffmpeg.org/")
432 (synopsis "Audio and video framework")
433 (description "FFmpeg is a complete, cross-platform solution to record,
434 convert and stream audio and video. It includes the libavcodec
435 audio/video codec library.")
436 (license license:gpl2+)))
445 "http://download.videolan.org/pub/videolan/vlc/"
446 version "/vlc-" version ".tar.xz"))
449 "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy"))))
450 (build-system gnu-build-system)
452 `(("git" ,git) ; needed for a test
453 ("pkg-config" ,pkg-config)))
454 ;; FIXME: Add optional inputs once available.
456 `(("alsa-lib" ,alsa-lib)
461 ("fontconfig" ,fontconfig)
462 ("freetype" ,freetype)
465 ("libgcrypt" ,libgcrypt)
470 ("libsamplerate" ,libsamplerate)
472 ("libvorbis" ,libvorbis)
473 ("libtheora" ,libtheora)
475 ("libxinerama" ,libxinerama)
482 ("pulseaudio" ,pulseaudio)
483 ("python" ,python-wrapper)
486 ("sdl-image" ,sdl-image)
488 ("xcb-util-keysyms" ,xcb-util-keysyms)))
491 `("--disable-a52" ; FIXME: reenable once available
492 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
493 (assoc-ref %build-inputs "ffmpeg")
494 "/lib")))) ; needed for the tests
495 (home-page "https://www.videolan.org/")
496 (synopsis "Audio and video framework")
497 (description "VLC is a cross-platform multimedia player and framework
498 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
499 treaming protocols.")
500 (license license:gpl2+)))
502 (define-public mplayer
509 "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
513 "0xlcg7rszrwmw29wqr0plsw5d1rq0hb7vjsq7bmmfsly2z1wg3yf"))))
514 (build-system gnu-build-system)
515 ;; FIXME: Add additional inputs once available.
517 `(("pkg-config" ,pkg-config)))
519 `(("alsa-lib" ,alsa-lib)
520 ("cdparanoia" ,cdparanoia)
521 ("fontconfig" ,fontconfig)
522 ("freetype" ,freetype)
524 ("libmpg123" ,mpg123) ; audio codec for MP3
525 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
528 ("libtheora" ,libtheora)
529 ("libvorbis" ,libvorbis)
531 ("libxxf86dga" ,libxxf86dga)
532 ("libxinerama" ,libxinerama)
536 ("pulseaudio" ,pulseaudio)
537 ("python" ,python-wrapper)
543 `(#:tests? #f ; no test target
547 ;; configure does not work followed by "SHELL=..." and
548 ;; "CONFIG_SHELL=..."; set environment variables instead
549 (lambda* (#:key inputs outputs #:allow-other-keys)
550 (let ((out (assoc-ref outputs "out"))
551 (libx11 (assoc-ref inputs "libx11")))
552 (substitute* "configure"
553 (("#! /bin/sh") (string-append "#!" (which "bash"))))
554 (setenv "SHELL" (which "bash"))
555 (setenv "CONFIG_SHELL" (which "bash"))
558 (string-append "--extra-cflags=-I"
559 libx11 "/include") ; to detect libx11
560 "--disable-tremor-internal" ; forces external libvorbis
561 (string-append "--prefix=" out)
562 ;; Enable runtime cpu detection where supported,
563 ;; and choose a suitable target.
564 ,@(match (or (%current-target-system)
567 '("--enable-runtime-cpudetection"
568 "--target=x86_64-linux"))
570 '("--enable-runtime-cpudetection"
571 "--target=i686-linux"))
573 '("--target=mips3-linux"))
574 (_ (list (string-append
576 (or (%current-target-system)
577 (nix-system->gnu-triplet
578 (%current-system)))))))
580 "--disable-iwmmxt"))))
582 (home-page "http://www.mplayerhq.hu/design7/news.html")
583 (synopsis "Audio and video player")
584 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
585 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
586 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
587 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
588 (license license:gpl2)))
590 ;;; This is not version 2; it's a fork literally named "mplayer2".
591 (define-public mplayer2
594 ;; There are no tarballs. The 2.0 git tag, which is actually the first
595 ;; release is from 2011. The latest commit is from 2013 October, so we
601 ;; XXX Change this if mplayer2.org goes up again.
602 (url "http://repo.or.cz/mplayer2.git")
603 (commit "2c378c71a4d9b1df382db9aa787b646628b4e3f9")))
606 "0s8554sanj6cvnf0h148nsmjgy5v0568nmcza7grpv6fnmddpfam"))
607 (file-name (string-append name "-" version "-checkout"))
608 ;; Warning: after using this patch, one must pass the -ltheora
609 ;; linker flag manually to configure; see below.
610 (patches (list (search-patch "mplayer2-theora-fix.patch")))))
611 (build-system gnu-build-system)
613 `(("pkg-config" ,pkg-config)
616 ("python-2" ,python-2)
617 ("python-docutils" ,python-docutils)
618 ;; ./configure uses which(1) to find rst2man.py.
620 ;; Missing features: DirectFB, Xss screensaver extensions, VDPAU, MNG,
621 ;; libnut, DirectShow TV interface, Radio interfaces of all kinds, vstream
622 ;; client, XMSS inputplugin support, joystick, lirc/lircc, and openal.
623 ;; OpenAL support is experimental and causes compilation to fail with
626 `(("alsa-lib" ,alsa-lib)
629 ("gettext" ,gnu-gettext)
635 ("libbluray" ,libbluray)
638 ("libcdio-paranoia" ,libcdio-paranoia)
641 ("libdvdread" ,libdvdread)
642 ("libdvdnav" ,libdvdnav-4)
647 ("libtheora" ,libtheora)
648 ("libungif" ,libungif)
649 ("libvorbis" ,libvorbis)
651 ("libxinerama" ,libxinerama)
656 ("portaudio" ,portaudio)
657 ("pulseaudio" ,pulseaudio)
667 ;; ./configure does not work followed by "SHELL=..." and
668 ;; "CONFIG_SHELL=..."; set environment variables instead.
669 (lambda* (#:key inputs outputs #:allow-other-keys)
670 (setenv "SHELL" (which "bash"))
671 (setenv "CONFIG_SHELL" (which "bash"))
672 (substitute* "configure"
673 (("/usr/X11") (assoc-ref inputs "libx11")))
675 (system* "./configure"
676 (string-append "--prefix=" (assoc-ref outputs "out"))
677 "--enable-translation"
678 "--enable-runtime-cpudetection"
679 ;; This is needed in accordance with the theora patch.
680 "--extra-libs=-ltheoradec")))
682 'build 'fix-TOOLS-shebangs
684 (substitute* (find-files "TOOLS" "\\.(sh|pl|py)$")
685 (("/usr/bin/env") (which "env"))
686 (("/usr/bin/perl") (which "perl"))
687 (("/usr/bin/python3") (which "python3"))
688 (("/usr/bin/python") (which "python"))))
690 'build 'fix-input-buffer-padding-size
692 (substitute* "libmpdemux/demuxer.h"
693 ;; This has to match with FFmpeg's FF_INPUT_BUFFER_PADDING_SIZE,
694 ;; which has changed at some point.
695 (("(#define MP_INPUT_BUFFER_PADDING_SIZE )[0-9]*" all)
696 (string-append all "32"))))
698 ;; No 'check' target.
700 ;; XXX Change this if mplayer2.org goes up again.
701 (home-page "http://repo.or.cz/w/mplayer2.git")
702 (synopsis "Audio and video player")
703 (description "mplayer2 is a general-purpose audio and video player. It's
704 a fork of the original MPlayer project, and contains further development in
706 ;; See file Copyright. Most files are gpl2+ or compatible, but talloc.c
707 ;; is under lgpl3+, thus the whole project becomes gpl3+.
708 (license license:gpl3+)))
717 "https://github.com/mpv-player/mpv/archive/v" version
721 "1kw9hr957cxqgm2i94bgqc6sskm6bwhm0akzckilhs460b43h409"))
722 (file-name (string-append name "-" version ".tar.gz"))))
723 (build-system waf-build-system)
726 ("pkg-config" ,pkg-config)
727 ("python-docutils" ,python-docutils)))
728 ;; Missing features: libguess, LIRC, Wayland, VDPAU, V4L2
730 `(("alsa-lib" ,alsa-lib)
737 ("libbluray" ,libbluray)
740 ("libcdio-paranoia" ,libcdio-paranoia)
741 ("libdvdread" ,libdvdread)
742 ("libdvdnav" ,libdvdnav)
747 ("libxinerama" ,libxinerama)
748 ("libxrandr" ,libxrandr)
749 ("libxscrnsaver" ,libxscrnsaver)
754 ("pulseaudio" ,pulseaudio)
757 ("vapoursynth" ,vapoursynth)
760 ;; Keep this in sync with the version in the bootstrap.py
761 ;; script of the source tarball.
762 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.4")
765 "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h"))))
766 ("youtube-dl" ,youtube-dl)
770 (modify-phases %standard-phases
772 'configure 'setup-waf
773 (lambda* (#:key inputs #:allow-other-keys)
774 (copy-file (assoc-ref inputs "waf") "waf")
775 (setenv "CC" "gcc")))
777 'configure 'patch-wscript
778 (lambda* (#:key inputs #:allow-other-keys)
779 (substitute* "wscript"
780 ;; XXX Remove this when our Samba package provides a .pc file.
781 (("check_pkg_config\\('smbclient'\\)")
782 "check_cc(lib='smbclient')")
783 ;; XXX Remove this when our Lua package provides a .pc file.
785 "check_cc(lib='lua')")))))
786 ;; No check function defined.
788 (home-page "http://mpv.io/")
789 (synopsis "Audio and video player")
790 (description "mpv is a general-purpose audio and video player. It is a
791 fork of mplayer2 and MPlayer. It shares some features with the former
792 projects while introducing many more.")
793 (license license:gpl2+)))
795 (define-public libvpx
801 (uri (string-append "http://webm.googlecode.com/files/libvpx-v"
805 "1aai0h0z1bhp89pxmg4fkrwpmqq24k39fhr15cw6q77m9bccip6k"))
807 (list (search-patch "libvpx-vp9-out-of-bounds-access.patch")
808 (search-patch "libvpx-fix-ssse3-quantize.patch")
809 (search-patch "libvpx-fix-armhf-link.patch")))))
810 (build-system gnu-build-system)
812 `(#:phases (alist-replace
814 (lambda* (#:key outputs #:allow-other-keys)
815 (setenv "CONFIG_SHELL" (which "bash"))
816 (let ((out (assoc-ref outputs "out")))
818 (string-append "-Wl,-rpath=" out "/lib"))
819 (zero? (system* "./configure"
822 ,@(if (and (not (%current-target-system))
826 ;; When building on ARMv7, libvpx
827 ;; assumes that NEON will be
828 ;; available. On Guix, armhf
829 ;; does not require NEON, so we
830 ;; build for ARMv6 and -marm (since
831 ;; no thumb2 on ARMv6) to ensure
832 ;; compatibility with all ARMv7
833 ;; cores we support. Based on
834 ;; the Debian libvpx package.
835 '("--target=armv6-linux-gcc"
836 "--extra-cflags=-marm"
839 (string-append "--prefix=" out)))))
841 #:tests? #f)) ; no check target
845 (synopsis "VP8/VP9 video codec")
846 (description "libvpx is a codec for the VP8/VP9 video compression format.")
847 (license license:bsd-3)
848 (home-page "http://www.webmproject.org/")))
850 (define-public youtube-dl
853 (version "2015.01.23.4")
856 (uri (string-append "http://youtube-dl.org/downloads/"
857 version "/youtube-dl-"
861 "0pvvab9dk1righ3fa79000iz8fzdlcxakscx5sd31730c37j3kj2"))))
862 (build-system python-build-system)
863 (inputs `(("setuptools" ,python-setuptools)))
864 (home-page "http://youtube-dl.org")
865 (synopsis "Download videos from YouTube.com and other sites")
867 "youtube-dl is a small command-line program to download videos from
868 YouTube.com and a few more sites.")
869 (license license:public-domain)))
871 (define-public libbluray
877 (uri (string-append "http://download.videolan.org/videolan/"
879 name "-" version ".tar.bz2"))
882 "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp"))))
883 (build-system gnu-build-system)
884 (native-inputs `(("pkg-config" ,pkg-config)))
886 `(("doxygen" ,doxygen)
887 ("fontconfig" ,fontconfig)
888 ("freetype" ,freetype)
890 ("perl" ,perl) ;for doxygen
891 ("texlive" ,texlive)))
892 (home-page "http://www.videolan.org/developers/libbluray.html")
893 (synopsis "Blu-Ray Disc playback library")
895 "libbluray is a library designed for Blu-Ray Disc playback for media
896 players, like VLC or MPlayer.")
897 (license license:lgpl2.1+)))
899 (define-public libdvdread
905 (uri (string-append "http://download.videolan.org/videolan/"
907 name "-" version ".tar.bz2"))
910 "052z62l3x8ka5jpf5bi1mzp5p323n1z9rxj74nq5c35a88x1myv6"))))
911 (build-system gnu-build-system)
912 (home-page "http://dvdnav.mplayerhq.hu/")
913 (synopsis "Library for reading video DVDs")
915 "Libdvdread provides a simple foundation for reading DVD video
916 disks. It provides the functionality that is required to access many
917 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
918 authentication and descrambling (if an external libdvdcss library is
920 (license license:gpl2+)))
922 (define-public libdvdnav
928 (uri (string-append "http://download.videolan.org/videolan/"
930 name "-" version ".tar.bz2"))
933 "1ad2lkkiydgwiyqfysra9lkwjv9yqnvcg4hv92hx8qzics1cpcbj"))))
934 (build-system gnu-build-system)
936 `(("pkg-config" ,pkg-config)))
938 `(("libdvdread" ,libdvdread)))
939 (home-page "http://dvdnav.mplayerhq.hu/")
940 (synopsis "Library for video DVD navigation features")
942 "Libdvdnav is a library for developers of multimedia
943 applications. It allows easy use of sophisticated DVD navigation features
944 such as DVD menus, multiangle playback and even interactive DVD games. All
945 this functionality is provided through a simple API which provides the DVD
946 playback as a single logical stream of blocks, intermitted by special
947 dvdnav events to report certain conditions. The main usage of libdvdnav is
948 a loop regularly calling a function to get the next block, surrounded by
949 additional calls to tell the library of user interaction. The whole
950 DVD virtual machine and internal playback states are completely
952 (license license:gpl2+)))
954 (define-public libdvdnav-4
962 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
966 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
968 `(("pkg-config" ,pkg-config)
969 ("autoconf" ,autoconf)
970 ("automake" ,automake)
971 ("libtool" ,libtool)))
977 (zero? (system* "autoreconf" "-vif")))
978 %standard-phases)))))
980 (define-public libdvdcss
986 (uri (string-append "http://download.videolan.org/videolan/"
988 name "-" version ".tar.bz2"))
991 "158k9zagmbk5bkbz96l6lwhh7xcgfcnzflkr4vblskhcab6llhbw"))))
992 (build-system gnu-build-system)
993 (home-page "http://www.videolan.org/developers/libdvdcss.html")
994 (synopsis "Library for accessing DVDs as block devices")
996 "libdvdcss is a simple library designed for accessing DVDs like a block
997 device without having to bother about the decryption.")
998 (license license:gpl2+)))
1000 (define-public srt2vtt
1007 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1011 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1012 (build-system gnu-build-system)
1014 `(("guile" ,guile-2.0)))
1015 (synopsis "SubRip to WebVTT subtitle converter")
1016 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1017 for use with HTML5 video.")
1018 (home-page "http://dthompson.us/pages/software/srt2vtt")
1019 (license license:gpl3+)))
1021 (define-public avidemux
1028 "mirror://sourceforge/avidemux/avidemux_"
1032 "10p60wjkzf1bxqcb6i7bx4hbqy3vqg598p3l9lc4v2c9b8iqr682"))))
1033 (build-system cmake-build-system)
1035 `(("pkg-config" ,pkg-config)))
1036 ;; FIXME: Once packaged, add libraries not found during the build.
1038 `(("alsa-lib" ,alsa-lib)
1039 ("fontconfig" ,fontconfig)
1040 ("freetype" ,freetype)
1041 ("fribidi" ,fribidi)
1046 ("libvorbis" ,libvorbis)
1050 ("pulseaudio" ,pulseaudio)
1051 ("python" ,python-wrapper)
1058 `(#:tests? #f ; no check target
1060 ;; Make sure files inside the included ffmpeg tarball are
1063 'patch-source-shebangs 'unpack-ffmpeg
1065 (with-directory-excursion "avidemux_core/ffmpeg_package"
1066 (system* "tar" "xf" "ffmpeg-1.2.1.tar.bz2")
1067 (delete-file "ffmpeg-1.2.1.tar.bz2")))
1069 'patch-source-shebangs 'repack-ffmpeg
1071 (with-directory-excursion "avidemux_core/ffmpeg_package"
1072 (substitute* "ffmpeg-1.2.1/configure"
1073 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1074 (system* "tar" "cjf" "ffmpeg-1.2.1.tar.bz2" "ffmpeg-1.2.1")
1075 (delete-file-recursively "ffmpeg-1.2.1")))
1076 (alist-replace 'configure
1078 ;; Copy-paste settings from the cmake build system.
1079 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1080 (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
1081 (alist-replace 'build
1082 (lambda* (#:key inputs outputs #:allow-other-keys)
1084 ((out (assoc-ref outputs "out"))
1085 (lib (string-append out "/lib64"))
1087 (sdl (assoc-ref inputs "sdl"))
1089 (lambda* (component srcdir #:optional (args '()))
1090 (let ((builddir (string-append "build_" component)))
1092 (with-directory-excursion builddir
1094 (apply system* "cmake"
1095 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1096 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1097 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1098 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1099 (string-append "-DSDL_INCLUDE_DIR="
1101 (string-append "../" srcdir)
1103 (system* "make" "-j"
1104 (number->string (parallel-job-count)))
1105 (system* "make" "install"))))))))
1107 (and (build_component "core" "avidemux_core")
1108 (build_component "cli" "avidemux/cli")
1109 (build_component "qt4" "avidemux/qt4")
1110 (build_component "gtk" "avidemux/gtk")
1111 (build_component "plugins_common" "avidemux_plugins"
1112 '("-DPLUGIN_UI=COMMON"))
1113 (build_component "plugins_cli" "avidemux_plugins"
1114 '("-DPLUGIN_UI=CLI"))
1115 (build_component "plugins_qt4" "avidemux_plugins"
1116 '("-DPLUGIN_UI=QT4"))
1117 (build_component "plugins_gtk" "avidemux_plugins"
1118 '("-DPLUGIN_UI=GTK"))
1119 (build_component "plugins_settings" "avidemux_plugins"
1120 '("-DPLUGIN_UI=SETTINGS")))
1121 ;; Remove .exe and .dll file.
1122 (delete-file-recursively
1123 (string-append out "/share/ADM6_addons"))))
1124 (alist-delete 'install
1125 %standard-phases)))))))
1126 (home-page "http://fixounet.free.fr/avidemux/")
1127 (synopsis "Video editor")
1128 (description "Avidemux is a video editor designed for simple cutting,
1129 filtering and encoding tasks. It supports many file types, including AVI,
1130 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1131 can be automated using projects, job queue and powerful scripting
1133 ;; Software with various licenses is included, see License.txt.
1134 (license license:gpl2+)))
1136 (define-public avidemux-2.5
1137 (package (inherit avidemux)
1142 "mirror://sourceforge/avidemux/avidemux_"
1146 "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn"))))
1148 `(("pkg-config" ,pkg-config)))
1150 `(("alsa-lib" ,alsa-lib)
1151 ("gettext" ,gnu-gettext)
1155 ("libvorbis" ,libvorbis)
1157 ("libxml2" ,libxml2)
1158 ("libxslt" ,libxslt)
1161 ("pulseaudio" ,pulseaudio)
1170 'patch-source-shebangs 'unpack-ffmpeg
1172 (with-directory-excursion "avidemux/ADM_libraries"
1173 (system* "tar" "xf" "ffmpeg-0.9.tar.bz2")
1174 (delete-file "ffmpeg-0.9.tar.bz2")))
1176 'patch-source-shebangs 'repack-ffmpeg
1178 (with-directory-excursion "avidemux/ADM_libraries"
1179 (substitute* "ffmpeg-0.9/configure"
1180 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1181 (system* "tar" "cjf" "ffmpeg-0.9.tar.bz2" "ffmpeg-0.9")
1182 (delete-file-recursively "ffmpeg-0.9")))
1183 (alist-replace 'configure
1185 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1186 (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
1187 (alist-replace 'build
1188 (lambda* (#:key inputs outputs #:allow-other-keys)
1190 ((out (assoc-ref outputs "out"))
1191 (lib (string-append out "/lib"))
1193 (sdl (assoc-ref inputs "sdl"))
1195 (lambda* (component srcdir)
1196 (let ((builddir (string-append "build_" component)))
1198 (with-directory-excursion builddir
1201 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1202 (string-append "-DCMAKE_INSTALL_PREFIX="
1204 (string-append "-DCMAKE_INSTALL_RPATH="
1206 (string-append "-DAVIDEMUX_SOURCE_DIR="
1208 (string-append "-DAVIDEMUX_CORECONFIG_DIR="
1209 top "/build_main/config")
1210 (string-append "-DAVIDEMUX_INSTALL_PREFIX="
1212 (string-append "-DSDL_INCLUDE_DIR="
1214 (string-append "../" srcdir))
1215 (system* "make" "-j"
1216 (number->string (parallel-job-count)))
1217 (system* "make" "install"))))))))
1219 (and (build_component "main" ".")
1220 (build_component "plugins" "plugins"))
1221 (delete-file-recursively
1222 (string-append out "/share/ADM_addons"))))
1223 (alist-delete 'install
1224 %standard-phases)))))))))
1226 (define-public vapoursynth
1228 (name "vapoursynth")
1233 "https://github.com/vapoursynth/vapoursynth/archive/R"
1237 "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k"))))
1238 (build-system gnu-build-system)
1240 `(("autoconf" ,autoconf)
1241 ("automake" ,automake)
1242 ("cython" ,python-cython)
1243 ("libtool" ,libtool)
1244 ("pkg-config" ,pkg-config)
1248 `(("ffmpeg" ,ffmpeg)
1250 ("tesseract-ocr" ,tesseract-ocr)))
1253 (modify-phases %standard-phases
1257 (zero? (system* "sh" "autogen.sh")))))))
1258 (home-page "http://www.vapoursynth.com/")
1259 (synopsis "Video processing framework")
1260 (description "VapourSynth is a C++ library and Python module for video
1261 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1262 multithreading, generalized colorspaces, per frame properties, and videos with
1264 ;; As seen from the source files.
1265 (license license:lgpl2.1+)))
1274 "http://downloads.xvid.org/downloads/xvidcore-"
1275 version ".tar.bz2"))
1278 "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh"))))
1279 (build-system gnu-build-system)
1280 (native-inputs `(("yasm" ,yasm)))
1284 'configure 'pre-configure
1286 (chdir "build/generic")
1287 (substitute* "configure"
1288 (("#! /bin/sh") (string-append "#!" (which "sh")))))
1290 ;; No 'check' target.
1292 (home-page "https://www.xvid.com/")
1293 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1294 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1295 codec library. It uses ASP features such as b-frames, global and quarter
1296 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1297 and custom quantization matrices.")
1298 (license license:gpl2+)))
1300 (define-public livestreamer
1302 (name "livestreamer")
1307 "https://github.com/chrippa/livestreamer/archive/v"
1309 (file-name (string-append "livestreamer-" version ".tar.gz"))
1312 "1dhgk8v8q1h3km4g5jc0cmjsxdaa2d456fvdb2wk7hmxmmwbqm9j"))))
1313 (build-system python-build-system)
1315 '(#:tests? #f)) ; tests rely on external web servers
1317 `(("python-setuptools" ,python-setuptools)))
1319 `(("python-requests" ,python-requests)
1320 ("python-singledispatch" ,python-singledispatch)))
1321 (synopsis "Internet video stream viewer")
1322 (description "Livestreamer is a command-line utility that extracts streams
1323 from various services and pipes them into a video playing application.")
1324 (home-page "http://livestreamer.io/")
1325 (license license:bsd-2)))