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 "https://download.videolan.org/pub/videolan/vlc/"
567 version "/vlc-" version ".tar.xz"))
570 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
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)
613 ;("qtx11extras" ,qtx11extras)
615 ("sdl-image" ,sdl-image)
617 ("xcb-util-keysyms" ,xcb-util-keysyms)))
620 `("--disable-a52" ; FIXME: reenable once available
621 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
622 (assoc-ref %build-inputs "ffmpeg")
623 "/lib")) ;needed for the tests
626 (modify-phases %standard-phases
627 (add-before 'configure 'remove-visual-tests
628 ;; Some of the tests require using the display to test out VLC,
629 ;; which fails in our sandboxed build system
631 (substitute* "test/run_vlc.sh"
632 (("./vlc --ignore-config") "echo"))
634 (add-after 'install 'regenerate-plugin-cache
635 (lambda* (#:key outputs #:allow-other-keys)
636 ;; The 'install-exec-hook' rule in the top-level Makefile.am
637 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
638 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
639 ;; it references. Thus, we first reset the timestamps of all
640 ;; these files, and then regenerate the cache such that the
641 ;; mtimes it includes are always zero instead of being dependent
642 ;; on the build time.
643 (let* ((out (assoc-ref outputs "out"))
644 (pkglibdir (string-append out "/lib/vlc"))
645 (plugindir (string-append pkglibdir "/plugins"))
646 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
647 ;; TODO: Factorize 'reset-timestamps'.
648 (for-each (lambda (file)
649 (let ((s (lstat file)))
650 (unless (eq? (stat:type s) 'symlink)
651 (utime file 0 0 0 0))))
652 (find-files plugindir))
653 (zero? (system* cachegen plugindir))))))))
654 (home-page "https://www.videolan.org/")
655 (synopsis "Audio and video framework")
656 (description "VLC is a cross-platform multimedia player and framework
657 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
658 treaming protocols.")
659 (license license:gpl2+)))
661 (define-public mplayer
668 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
672 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
673 (build-system gnu-build-system)
674 ;; FIXME: Add additional inputs once available.
676 `(("pkg-config" ,pkg-config)))
678 `(("alsa-lib" ,alsa-lib)
679 ("cdparanoia" ,cdparanoia)
681 ("fontconfig" ,fontconfig)
682 ("freetype" ,freetype)
683 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
686 ("libdvdcss" ,libdvdcss)
687 ("libdvdnav" ,libdvdnav)
689 ("libmpeg2" ,libmpeg2)
690 ("libmpg123" ,mpg123) ; audio codec for MP3
692 ("libtheora" ,libtheora)
693 ("libvdpau" ,libvdpau)
694 ("libvorbis" ,libvorbis)
697 ("libxinerama" ,libxinerama)
699 ("libxxf86dga" ,libxxf86dga)
703 ("pulseaudio" ,pulseaudio)
704 ("python" ,python-wrapper)
710 `(#:tests? #f ; no test target
712 (modify-phases %standard-phases
714 ;; configure does not work followed by "SHELL=..." and
715 ;; "CONFIG_SHELL=..."; set environment variables instead
716 (lambda* (#:key inputs outputs #:allow-other-keys)
717 (let ((out (assoc-ref outputs "out"))
718 (libx11 (assoc-ref inputs "libx11")))
719 (substitute* "configure"
720 (("#! /bin/sh") (string-append "#!" (which "bash"))))
721 (setenv "SHELL" (which "bash"))
722 (setenv "CONFIG_SHELL" (which "bash"))
725 (string-append "--extra-cflags=-I"
726 libx11 "/include") ; to detect libx11
727 "--disable-ffmpeg_a" ; disables bundled ffmpeg
728 (string-append "--prefix=" out)
729 ;; Enable runtime cpu detection where supported,
730 ;; and choose a suitable target.
731 ,@(match (or (%current-target-system)
734 '("--enable-runtime-cpudetection"
735 "--target=x86_64-linux"))
737 '("--enable-runtime-cpudetection"
738 "--target=i686-linux"))
740 '("--target=mips3-linux"))
741 (_ (list (string-append
743 (or (%current-target-system)
744 (nix-system->gnu-triplet
745 (%current-system)))))))
746 "--disable-iwmmxt"))))))))
747 (home-page "https://www.mplayerhq.hu/design7/news.html")
748 (synopsis "Audio and video player")
749 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
750 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
751 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
752 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
753 (license license:gpl2)))
762 "https://github.com/mpv-player/mpv/archive/v" version
766 "0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30"))
767 (file-name (string-append name "-" version ".tar.gz"))))
768 (build-system waf-build-system)
771 ("pkg-config" ,pkg-config)
772 ("python-docutils" ,python-docutils)))
773 ;; Missing features: libguess, Wayland, V4L2
775 `(("alsa-lib" ,alsa-lib)
782 ("libbluray" ,libbluray)
785 ("libcdio-paranoia" ,libcdio-paranoia)
786 ("libdvdread" ,libdvdread)
787 ("libdvdnav" ,libdvdnav)
790 ("libvdpau" ,libvdpau)
793 ("libxinerama" ,libxinerama)
794 ("libxrandr" ,libxrandr)
795 ("libxscrnsaver" ,libxscrnsaver)
800 ("pulseaudio" ,pulseaudio)
802 ("vapoursynth" ,vapoursynth)
805 ;; Keep this in sync with the version in the bootstrap.py
806 ;; script of the source tarball.
807 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.12")
810 "12y9c352zwliw0zk9jm2lhynsjcf5jy0k1qch1c1av8hnbm2pgq1"))))
811 ("youtube-dl" ,youtube-dl)
815 (modify-phases %standard-phases
817 'configure 'setup-waf
818 (lambda* (#:key inputs #:allow-other-keys)
819 (copy-file (assoc-ref inputs "waf") "waf")
820 (setenv "CC" "gcc"))))
821 #:configure-flags (list "--enable-gpl3" "--enable-zsh-comp")
822 ;; No check function defined.
824 (home-page "https://mpv.io/")
825 (synopsis "Audio and video player")
826 (description "mpv is a general-purpose audio and video player. It is a
827 fork of mplayer2 and MPlayer. It shares some features with the former
828 projects while introducing many more.")
829 (license license:gpl2+)))
831 (define-public libvpx
837 (uri (string-append "http://storage.googleapis.com/"
838 "downloads.webmproject.org/releases/webm/"
839 name "-" version ".tar.bz2"))
842 "15v7qw0ydyxn08ksb6lxn1l51pxgpwgshdwd3275yrr5hs86fv9h"))))
843 (build-system gnu-build-system)
846 (modify-phases %standard-phases
848 (lambda* (#:key outputs #:allow-other-keys)
849 (setenv "CONFIG_SHELL" (which "bash"))
850 (let ((out (assoc-ref outputs "out")))
852 (string-append "-Wl,-rpath=" out "/lib"))
853 (zero? (system* "./configure"
856 ;; Limit size to avoid CVE-2015-1258
857 "--size-limit=16384x16384"
858 (string-append "--prefix=" out)))))))
859 #:tests? #f)) ; no check target
863 (synopsis "VP8/VP9 video codec")
864 (description "libvpx is a codec for the VP8/VP9 video compression format.")
865 (license license:bsd-3)
866 (home-page "http://www.webmproject.org/")))
868 (define-public youtube-dl
871 (version "2016.05.01")
874 (uri (string-append "http://youtube-dl.org/downloads/"
875 version "/youtube-dl-"
879 "1w04afmwq5pjvp3nl2k59q0cigqrj9n8fwkydcfldwpq83l15j5d"))))
880 (build-system python-build-system)
881 (home-page "http://youtube-dl.org")
883 ;; The problem here is that the directory for the man page and completion
884 ;; files is relative, and for some reason, setup.py uses the
885 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
886 ;; So, we need pass the prefix directly. In addition, make sure the Bash
887 ;; completion file is called 'youtube-dl' rather than
888 ;; 'youtube-dl.bash-completion'.
889 `(#:phases (modify-phases %standard-phases
890 (add-before 'install 'fix-the-data-directories
891 (lambda* (#:key outputs #:allow-other-keys)
892 (let ((prefix (assoc-ref outputs "out")))
893 (mkdir "bash-completion")
894 (rename-file "youtube-dl.bash-completion"
895 "bash-completion/youtube-dl")
896 (substitute* "setup.py"
897 (("youtube-dl\\.bash-completion")
898 "bash-completion/youtube-dl")
900 (string-append "'" prefix "/etc/"))
902 (string-append "'" prefix "/share/")))))))))
903 (synopsis "Download videos from YouTube.com and other sites")
905 "Youtube-dl is a small command-line program to download videos from
906 YouTube.com and a few more sites.")
907 (license license:public-domain)))
909 (define-public libbluray
915 (uri (string-append "http://download.videolan.org/videolan/"
917 name "-" version ".tar.bz2"))
920 "1sp71j4agcsg17g6b85cqz78pn5vknl5pl39rvr6mkib5ps99jgg"))))
921 (build-system gnu-build-system)
922 (arguments `(#:configure-flags '("--disable-bdjava")))
923 (native-inputs `(("pkg-config" ,pkg-config)))
925 `(("fontconfig" ,fontconfig)
926 ("freetype" ,freetype)
927 ("libxml2" ,libxml2)))
928 (home-page "http://www.videolan.org/developers/libbluray.html")
929 (synopsis "Blu-Ray Disc playback library")
931 "libbluray is a library designed for Blu-Ray Disc playback for media
932 players, like VLC or MPlayer.")
933 (license license:lgpl2.1+)))
935 (define-public libdvdread
941 (uri (string-append "http://download.videolan.org/videolan/"
943 name "-" version ".tar.bz2"))
946 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
947 (build-system gnu-build-system)
948 (home-page "http://dvdnav.mplayerhq.hu/")
949 (synopsis "Library for reading video DVDs")
951 "Libdvdread provides a simple foundation for reading DVD video
952 disks. It provides the functionality that is required to access many
953 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
954 authentication and descrambling (if an external libdvdcss library is
956 (license license:gpl2+)))
958 (define-public libdvdnav
964 (uri (string-append "http://download.videolan.org/videolan/"
966 name "-" version ".tar.bz2"))
969 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
970 (build-system gnu-build-system)
972 `(("pkg-config" ,pkg-config)))
974 `(("libdvdread" ,libdvdread)))
975 (home-page "http://dvdnav.mplayerhq.hu/")
976 (synopsis "Library for video DVD navigation features")
978 "Libdvdnav is a library for developers of multimedia
979 applications. It allows easy use of sophisticated DVD navigation features
980 such as DVD menus, multiangle playback and even interactive DVD games. All
981 this functionality is provided through a simple API which provides the DVD
982 playback as a single logical stream of blocks, intermitted by special
983 dvdnav events to report certain conditions. The main usage of libdvdnav is
984 a loop regularly calling a function to get the next block, surrounded by
985 additional calls to tell the library of user interaction. The whole
986 DVD virtual machine and internal playback states are completely
988 (license license:gpl2+)))
990 (define-public libdvdnav-4
998 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1002 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1004 `(("pkg-config" ,pkg-config)
1005 ("autoconf" ,autoconf)
1006 ("automake" ,automake)
1007 ("libtool" ,libtool)))
1013 (zero? (system* "autoreconf" "-vif")))
1014 %standard-phases)))))
1016 (define-public libdvdcss
1022 (uri (string-append "http://download.videolan.org/pub/"
1023 name "/" version "/"
1024 name "-" version ".tar.bz2"))
1027 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1028 (build-system gnu-build-system)
1029 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1030 (synopsis "Library for accessing DVDs as block devices")
1032 "libdvdcss is a simple library designed for accessing DVDs like a block
1033 device without having to bother about the decryption.")
1034 (license license:gpl2+)))
1036 (define-public srt2vtt
1043 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1047 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1048 (build-system gnu-build-system)
1050 `(("guile" ,guile-2.0)))
1051 (synopsis "SubRip to WebVTT subtitle converter")
1052 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1053 for use with HTML5 video.")
1054 (home-page "http://dthompson.us/pages/software/srt2vtt")
1055 (license license:gpl3+)))
1057 (define-public avidemux
1064 "mirror://sourceforge/avidemux/avidemux_"
1068 "1vas43bwb15q2wv3dpp7fgp8dc6szinmwl7i0ziq2vv5l2128v0p"))
1069 (patches (search-patches "avidemux-install-to-lib.patch"))))
1070 (build-system cmake-build-system)
1072 `(("pkg-config" ,pkg-config)))
1073 ;; FIXME: Once packaged, add libraries not found during the build.
1075 `(("alsa-lib" ,alsa-lib)
1076 ("fontconfig" ,fontconfig)
1077 ("freetype" ,freetype)
1078 ("fribidi" ,fribidi)
1082 ("libvorbis" ,libvorbis)
1086 ("pulseaudio" ,pulseaudio)
1087 ("python" ,python-wrapper)
1094 `(#:tests? #f ; no check target
1096 ;; Make sure files inside the included ffmpeg tarball are
1099 'patch-source-shebangs 'unpack-ffmpeg
1101 (with-directory-excursion "avidemux_core/ffmpeg_package"
1102 (system* "tar" "xf" "ffmpeg-2.6.1.tar.bz2")
1103 (delete-file "ffmpeg-2.6.1.tar.bz2")))
1105 'patch-source-shebangs 'repack-ffmpeg
1107 (with-directory-excursion "avidemux_core/ffmpeg_package"
1108 (substitute* "ffmpeg-2.6.1/configure"
1109 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1110 (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1"
1111 ;; avoid non-determinism in the archive
1112 "--sort=name" "--mtime=@0"
1113 "--owner=root:0" "--group=root:0")
1114 (delete-file-recursively "ffmpeg-2.6.1")))
1115 (alist-replace 'configure
1117 ;; Copy-paste settings from the cmake build system.
1118 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1119 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")))
1120 (alist-replace 'build
1121 (lambda* (#:key inputs outputs #:allow-other-keys)
1123 ((out (assoc-ref outputs "out"))
1124 (lib (string-append out "/lib"))
1126 (sdl (assoc-ref inputs "sdl"))
1128 (lambda* (component srcdir #:optional (args '()))
1129 (let ((builddir (string-append "build_" component)))
1131 (with-directory-excursion builddir
1133 (apply system* "cmake"
1134 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1135 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1136 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1137 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1138 "\"-Wl,-rpath=" lib "\"")
1139 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1140 (string-append "-DSDL_INCLUDE_DIR="
1142 (string-append "../" srcdir)
1145 (system* "make" "-j"
1146 (number->string (parallel-job-count)))
1147 (system* "make" "install"))))))))
1149 (and (build_component "core" "avidemux_core")
1150 (build_component "cli" "avidemux/cli")
1151 (build_component "qt4" "avidemux/qt4")
1152 (build_component "plugins_common" "avidemux_plugins"
1153 '("-DPLUGIN_UI=COMMON"))
1154 (build_component "plugins_cli" "avidemux_plugins"
1155 '("-DPLUGIN_UI=CLI"))
1156 (build_component "plugins_qt4" "avidemux_plugins"
1157 '("-DPLUGIN_UI=QT4"))
1158 (build_component "plugins_settings" "avidemux_plugins"
1159 '("-DPLUGIN_UI=SETTINGS")))
1160 ;; Remove .exe and .dll file.
1161 (delete-file-recursively
1162 (string-append out "/share/ADM6_addons"))))
1163 (alist-delete 'install
1164 %standard-phases)))))))
1165 (home-page "http://fixounet.free.fr/avidemux/")
1166 (synopsis "Video editor")
1167 (description "Avidemux is a video editor designed for simple cutting,
1168 filtering and encoding tasks. It supports many file types, including AVI,
1169 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1170 can be automated using projects, job queue and powerful scripting
1172 ;; Software with various licenses is included, see License.txt.
1173 (license license:gpl2+)))
1175 (define-public vapoursynth
1177 (name "vapoursynth")
1182 "https://github.com/vapoursynth/vapoursynth/archive/R"
1184 (file-name (string-append name "-" version))
1187 "1j08whj946v2kkpgxsfhpca8xf0ax9iqzn73wvwjx319p9j0ymp9"))))
1188 (build-system gnu-build-system)
1190 `(("autoconf" ,autoconf)
1191 ("automake" ,automake)
1192 ("cython" ,python-cython)
1193 ("libtool" ,libtool)
1194 ("pkg-config" ,pkg-config)
1198 `(("ffmpeg" ,ffmpeg)
1200 ("tesseract-ocr" ,tesseract-ocr)
1204 (modify-phases %standard-phases
1208 (zero? (system* "sh" "autogen.sh")))))))
1209 (home-page "http://www.vapoursynth.com/")
1210 (synopsis "Video processing framework")
1211 (description "VapourSynth is a C++ library and Python module for video
1212 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1213 multithreading, generalized colorspaces, per frame properties, and videos with
1215 ;; As seen from the source files.
1216 (license license:lgpl2.1+)))
1225 "http://downloads.xvid.org/downloads/xvidcore-"
1226 version ".tar.bz2"))
1229 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1230 (build-system gnu-build-system)
1231 (native-inputs `(("yasm" ,yasm)))
1234 (modify-phases %standard-phases
1236 'configure 'pre-configure
1238 (chdir "build/generic")
1239 (substitute* "configure"
1240 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1241 ;; No 'check' target.
1243 (home-page "https://www.xvid.com/")
1244 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1245 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1246 codec library. It uses ASP features such as b-frames, global and quarter
1247 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1248 and custom quantization matrices.")
1249 (license license:gpl2+)))
1251 (define-public livestreamer
1253 (name "livestreamer")
1258 "https://github.com/chrippa/livestreamer/archive/v"
1260 (file-name (string-append "livestreamer-" version ".tar.gz"))
1263 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1264 (build-system python-build-system)
1266 '(#:tests? #f)) ; tests rely on external web servers
1268 `(("python-requests" ,python-requests)))
1269 (synopsis "Internet video stream viewer")
1270 (description "Livestreamer is a command-line utility that extracts streams
1271 from various services and pipes them into a video playing application.")
1272 (home-page "http://livestreamer.io/")
1273 (license license:bsd-2)))
1281 (uri (string-append "https://github.com/mltframework/mlt/"
1282 "archive/v" version ".tar.gz"))
1283 (file-name (string-append name "-" version ".tar.gz"))
1286 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
1287 (build-system gnu-build-system)
1289 `(#:tests? #f ; no tests
1290 #:make-flags '("CC=gcc")
1292 (list "--enable-gpl3"
1295 (modify-phases %standard-phases
1297 'configure 'override-LDFLAGS
1298 (lambda* (#:key outputs #:allow-other-keys)
1299 (substitute* "config.mak"
1301 (string-append "LDFLAGS+=-Wl,-rpath="
1302 (assoc-ref outputs "out")
1306 `(("alsa-lib" ,alsa-lib)
1308 ("libxml2" ,libxml2)
1311 ("libsamplerate" ,libsamplerate)
1312 ("pulseaudio" ,pulseaudio)
1316 `(("pkg-config" ,pkg-config)))
1317 (home-page "https://www.mltframework.org/")
1318 (synopsis "Author, manage, and run multitrack audio/video compositions")
1320 "MLT is a multimedia framework, designed and developed for television
1321 broadcasting. It provides a toolkit for broadcasters, video editors, media
1322 players, transcoders, web streamers and many more types of applications. The
1323 functionality of the system is provided via an assortment of ready to use
1324 tools, XML authoring components, and an extensible plug-in based API.")
1325 (license license:lgpl2.1+)))
1327 (define-public v4l-utils
1333 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1334 "/v4l-utils-" version ".tar.bz2"))
1337 "0srkwh3r6f0bkb4kp0d7i0mlmp8babs3qc22cdy1sw4awmzd5skq"))))
1338 (build-system gnu-build-system)
1341 (list (string-append "--with-udevdir="
1342 (assoc-ref %outputs "out")
1345 `(("pkg-config" ,pkg-config)))
1347 `(("alsa-lib" ,alsa-lib)
1349 ("libjpeg" ,libjpeg)
1353 (synopsis "Realtime video capture utilities for Linux")
1354 (description "The v4l-utils provide a series of libraries and utilities to
1355 be used for realtime video capture via Linux-specific APIs.")
1356 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1357 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1358 (license (list license:lgpl2.1+ license:gpl2))))
1366 (uri (string-append "https://github.com/jp9000/obs-studio"
1367 "/archive/" version ".tar.gz"))
1368 (file-name (string-append name "-" version ".tar.gz"))
1371 "1cb8naa67kfnnngkzv1wpd4y241j29ggnk1w7jgnymp9j8dny1xl"))))
1372 (build-system cmake-build-system)
1373 (arguments '(#:tests? #f)) ; no tests
1375 `(("pkg-config" ,pkg-config)))
1380 ("freetype" ,freetype)
1382 ("jansson" ,jansson)
1383 ("libx264" ,libx264)
1384 ("libxcomposite" ,libxcomposite)
1386 ("pulseaudio" ,pulseaudio)
1388 ("v4l-utils" ,v4l-utils)
1390 (synopsis "Live streaming software")
1391 (description "Open Broadcaster Software provides a graphical interface for
1392 video recording and live streaming. OBS supports capturing audio and video
1393 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1395 (home-page "https://obsproject.com")
1396 (license license:gpl2+)))
1398 (define-public libvdpau
1405 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1406 name "-" version ".tar.bz2"))
1409 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1410 (build-system gnu-build-system)
1412 `(("pkg-config" ,pkg-config)))
1414 `(("dri2proto" ,dri2proto)
1415 ("libx11" ,libx11 "out")
1416 ("libxext" ,libxext)))
1417 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1418 (synopsis "Video Decode and Presentation API")
1419 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1420 provides an interface to video decode acceleration and presentation hardware
1421 present in modern GPUs.")
1422 (license (license:x11-style "file://COPYING"))))
1424 (define-public vdpauinfo
1431 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1432 name "-" version ".tar.gz"))
1435 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1436 (build-system gnu-build-system)
1438 `(("pkg-config" ,pkg-config)
1439 ("libx11" ,libx11)))
1441 `(("libvdpau" ,libvdpau)))
1442 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1443 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1444 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1446 (license (license:x11-style "file://COPYING"))))
1448 (define-public recordmydesktop
1450 (name "recordmydesktop")
1454 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1455 version "/recordmydesktop-" version ".tar.gz"))
1458 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1459 (build-system gnu-build-system)
1460 (inputs `(("popt" ,popt)
1465 ("libxfixes" ,libxfixes)
1466 ("libxdamage" ,libxdamage)
1467 ("libxext" ,libxext)
1468 ("libvorbis" ,libvorbis)
1469 ("libtheora" ,libtheora)))
1470 (home-page "http://recordmydesktop.sourceforge.net/")
1471 (synopsis "Desktop session video recorder")
1473 "recordMyDesktop is a command-line tool that captures the activity in
1474 your graphical desktop and encodes it as a video. This is a useful tool for
1475 making @dfn{screencasts}.")
1476 (license license:gpl2+)))