Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1865 lines
73 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2016 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages video)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix svn-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system python)
#:use-module (guix build-system waf)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages audio)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
#:use-module (gnu packages base)
#:use-module (gnu packages bison)
#:use-module (gnu packages cdrom)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages elf)
#:use-module (gnu packages flex)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages fribidi)
#:use-module (gnu packages gettext)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages guile)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
#:use-module (gnu packages lua)
#:use-module (gnu packages m4)
#:use-module (gnu packages mp3)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages ocr)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages popt)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages qt)
#:use-module (gnu packages sdl)
#:use-module (gnu packages ssh)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages web)
#:use-module (gnu packages webkit)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages assembly)
#:use-module (gnu packages zip))
(define-public aalib
(package
(name "aalib")
(version "1.4rc5")
(source (origin
(method url-fetch)
gnu: Update URLs for sourceforge.net. * gnu/packages/admin.scm: Update URLs pointing to sourceforge.net. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/boost.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/code.scm: Likewise. * gnu/packages/compression.scm: Likewise. * gnu/packages/cups.scm: Likewise. * gnu/packages/djvu.scm: Likewise. * gnu/packages/docbook.scm: Likewise. * gnu/packages/documentation.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fonts.scm: Likewise. * gnu/packages/fontutils.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/gl.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/graphviz.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/networking.scm: Likewise. * gnu/packages/onc-rpc.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/photo.scm: Likewise. * gnu/packages/popt.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/rdesktop.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/swig.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xml.scm: Likewise.
6 years ago
(uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
version "/" name "-" version ".tar.gz"))
(sha256
(base32
"1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
(build-system gnu-build-system)
(native-inputs
`(("makeinfo" ,texinfo)))
(inputs
`(("ncurses" ,ncurses)))
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key build inputs outputs #:allow-other-keys)
;; This old `configure' script doesn't support
;; variables passed as arguments.
(let ((out (assoc-ref outputs "out"))
(ncurses (assoc-ref inputs "ncurses")))
(setenv "CONFIG_SHELL" (which "bash"))
(zero? (system* "./configure"
(string-append "--prefix=" out)
(string-append "--build=" build)
;; The ancient config.guess is unable to
;; guess the host triplet on mips64el.
,@(if (string=? "mips64el-linux"
(%current-system))
'("--host=mips64el-unknown-linux-gnu")
'())
(string-append "--with-ncurses="
ncurses)))))))))
(home-page "http://aa-project.sourceforge.net/aalib/")
(synopsis "ASCII-art library")
(description
"AA-lib is a low level gfx library which does not require graphics device.
In fact, there is no graphical output possible. AA-lib replaces those
old-fashioned output methods with powerful ascii-art renderer.")
(license license:lgpl2.0+)))
(define-public liba52
(package
(name "liba52")
(version "0.7.4")
(source (origin
(method url-fetch)
(uri (string-append
;; A mirror://sourceforge URI doesn't work, presumably
;; because the SourceForge project is misconfigured.
"http://liba52.sourceforge.net/files/a52dec-" version
".tar.gz"))
(sha256
(base32
"0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
gnu: packages: Use 'search-patches' everywhere. * gnu/packages/abiword.scm: Use 'search-patches' for 'patches' field. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/algebra.scm: Likewise. * gnu/packages/animation.scm: Likewise. * gnu/packages/apr.scm: Likewise. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/autotools.scm: Likewise. * gnu/packages/avahi.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/bash.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/ci.scm: Likewise. * gnu/packages/cmake.scm: Likewise. * gnu/packages/cpio.scm: Likewise. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/dico.scm: Likewise. * gnu/packages/doxygen.scm: Likewise. * gnu/packages/ebook.scm: Likewise. * gnu/packages/elf.scm: Likewise. * gnu/packages/emacs.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/firmware.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fltk.scm: Likewise. * gnu/packages/ftp.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gawk.scm: Likewise. * gnu/packages/gcc.scm: Likewise. * gnu/packages/gd.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/gnunet.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/gnuzilla.scm: Likewise. * gnu/packages/graphics.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/icu4c.scm: Likewise. * gnu/packages/idutils.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/imagemagick.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/ldc.scm: Likewise. * gnu/packages/libcanberra.scm: Likewise. * gnu/packages/libevent.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libunwind.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/llvm.scm: Likewise. * gnu/packages/lsh.scm: Likewise. * gnu/packages/lua.scm: Likewise. * gnu/packages/lxqt.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/messaging.scm: Likewise. * gnu/packages/mit-krb5.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/multiprecision.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/ninja.scm: Likewise. * gnu/packages/nvi.scm: Likewise. * gnu/packages/ocaml.scm: Likewise. * gnu/packages/orpheus.scm: Likewise. * gnu/packages/ots.scm: Likewise. * gnu/packages/parallel.scm: Likewise. * gnu/packages/patchutils.scm: Likewise. * gnu/packages/pcre.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/plotutils.scm: Likewise. * gnu/packages/polkit.scm: Likewise. * gnu/packages/pulseaudio.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/qemu.scm: Likewise. * gnu/packages/qt.scm: Likewise. * gnu/packages/ratpoison.scm: Likewise. * gnu/packages/rdf.scm: Likewise. * gnu/packages/readline.scm: Likewise. * gnu/packages/rush.scm: Likewise. * gnu/packages/scheme.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/sdl.scm: Likewise. * gnu/packages/slim.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/tcsh.scm: Likewise. * gnu/packages/texinfo.scm: Likewise. * gnu/packages/tls.scm: Likewise. * gnu/packages/tor.scm: Likewise. * gnu/packages/tv.scm: Likewise. * gnu/packages/valgrind.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/vtk.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xfce.scm: Likewise. * gnu/packages/xiph.scm: Likewise. * gnu/packages/xml.scm: Likewise. * gnu/packages/xorg.scm: Likewise. * gnu/packages/zip.scm: Likewise.
6 years ago
(patches (search-patches "liba52-enable-pic.patch"
"liba52-set-soname.patch"
"liba52-use-mtune-not-mcpu.patch"
"liba52-link-with-libm.patch"))))
(build-system gnu-build-system)
;; XXX We need to run ./bootstrap because of the build system fixes above.
(native-inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)))
(arguments `(#:configure-flags '("--enable-shared")
#:phases
(modify-phases %standard-phases
;; XXX We need to run ./bootstrap because of the build
;; system fixes above.
(add-after
'unpack 'bootstrap
(lambda _ (zero? (system* "sh" "bootstrap")))))))
(home-page "http://liba52.sourceforge.net/")
(synopsis "ATSC A/52 stream decoder")
(description "liba52 is a library for decoding ATSC A/52 streams. The
A/52 standard is used in a variety of applications, including digital
television and DVD. It is also known as AC-3.")
(license license:gpl2+)))
(define-public libmpeg2
(package
(name "libmpeg2")
(version "0.5.1")
(source (origin
(method url-fetch)
;; A mirror://sourceforge URI doesn't work, presumably
;; because the SourceForge project is misconfigured.
(uri (string-append "http://libmpeg2.sourceforge.net/files/"
name "-" version ".tar.gz"))
(sha256
(base32
"1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
(inputs
`(("libx11" ,libx11)
("libxext" ,libxext)
("libxv" ,libxv)
("libsm" ,libsm)
("libice" ,libice)
("sdl" ,sdl)))
(build-system gnu-build-system)
(home-page "http://libmpeg2.sourceforge.net/")
(synopsis "MPEG1 and MPEG2 video decoder library")
(description
"libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
(license license:gpl2+)))
(define-public libx264
(package
(name "libx264")
(version "20161205-2245")
(source (origin
(method url-fetch)
(uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
"x264-snapshot-" version ".tar.bz2"))
(sha256
(base32
"0jjzdwag59kqlk09bb2pykm1ss8bw3p9q7bsks2kjgdwbj121a44"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("yasm" ,yasm)))
;; TODO: Add gpac input
(arguments
`(#:tests? #f ;no check target
#:configure-flags '("--enable-shared"
;; Don't build the command-line program. If we
;; want it later, we should do so in a different
;; package to avoid a circular dependency (the x264
;; program depends on ffmpeg and ffmpeg depends on
;; libx264).
"--disable-cli"
;; On MIPS, we must pass "--disable-asm" or else
;; configure fails after printing: "You specified a
;; pre-MSA CPU in your CFLAGS. If you really want
;; to run on such a CPU, configure with
;; --disable-asm."
,@(if (string-prefix? "mips"
(or (%current-target-system)
(%current-system)))
'("--disable-asm")
'()))))
(home-page "https://www.videolan.org/developers/x264.html")
(synopsis "H.264 video coding library")
(description "libx264 is an advanced encoding library for creating
H.264 (MPEG-4 AVC) video streams.")
(license (list license:gpl2+ ;most files
license:isc ;common/x86/x86inc.asm
license:lgpl2.1+ ;extras/getopt.c
license:bsd-3 ;extras/inttypes.h
(license:non-copyleft ;extras/cl*.h
"file://extras/cl.h"
"See extras/cl.h in the distribution.")))))
(define-public x265
(package
(name "x265")
(version "2.1")
(source
(origin
(method url-fetch)
(uri (string-append "https://download.videolan.org/videolan/x265/"
"x265_" version ".tar.gz"))
(sha256
(base32
"0hx6sr9l7586gs4qds2sj0i1m5brxkaqq3cwmibhfb559fpvkz48"))
(modules '((guix build utils)))
(snippet
'(delete-file-recursively "source/compat/getopt"))))
(build-system cmake-build-system)
(arguments
`(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
#:phases
(modify-phases %standard-phases
(add-before 'configure 'prepare-build
(lambda _
(delete-file-recursively "build")
(chdir "source")
#t)))))
(home-page "http://x265.org/")
(synopsis "Library for encoding h.265/HEVC video streams")
(description "x265 is a H.265 / HEVC video encoder application library,
designed to encode video or images into an H.265 / HEVC encoded bitstream.")
(license license:gpl2+)))
(define-public libass
(package
(name "libass")
(version "0.13.4")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/libass/libass/releases/download/"
version "/libass-" version ".tar.xz"))
(sha256
(base32
"1dlzkjybnpl2fkvyjq0qblb7qw12cs893bs7zj3rvf8ij342yjnq"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)
("yasm" ,yasm)))
(propagated-inputs
`(("freetype" ,freetype)
("fribidi" ,fribidi)
("fontconfig" ,fontconfig)
("harfbuzz" ,harfbuzz)
("enca" ,enca)))
(home-page "https://github.com/libass/libass")
(synopsis "Subtitle rendering library for the ASS/SSA format")
(description "libass is a subtitle rendering library for the
ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
(license license:isc)))
(define-public libcaca
(package
(name "libcaca")
(version "0.99.beta19")
(source (origin
(method url-fetch)
(uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
version ".tar.gz"))
(sha256
(base32
"1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
(build-system gnu-build-system)
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs
`(("freeglut" ,freeglut)
("ftgl" ,ftgl)
("imlib2" ,imlib2)
("libx11" ,libx11)
("mesa" ,mesa)
("ncurses" ,ncurses)
("zlib" ,zlib)))
(home-page "http://caca.zoy.org/wiki/libcaca")
(synopsis "Colour ASCII-art library")
(description "libcaca is a graphics library that outputs text instead of
pixels, so that it can work on older video cards or text terminals. It
supports Unicode, 2048 colors, dithering of color images, and advanced text
canvas operations.")
(license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
(define-public libdca
(package
(name "libdca")
(version "0.0.5")
(source (origin
(method url-fetch)
(uri (string-append
"http://download.videolan.org/pub/videolan/libdca/"
version "/libdca-" version ".tar.bz2"))
(sha256
(base32
"0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
(build-system gnu-build-system)
(home-page "http://www.videolan.org/developers/libdca.html")
(synopsis "DTS Coherent Acoustics decoder")
(description "libdca is a library for decoding DTS Coherent Acoustics
streams.")
(license license:gpl2+)))
(define-public libdv
(package
(name "libdv")
(version "1.0.0")
(source (origin
(method url-fetch)
(uri (string-append
gnu: Update URLs for sourceforge.net. * gnu/packages/admin.scm: Update URLs pointing to sourceforge.net. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/boost.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/code.scm: Likewise. * gnu/packages/compression.scm: Likewise. * gnu/packages/cups.scm: Likewise. * gnu/packages/djvu.scm: Likewise. * gnu/packages/docbook.scm: Likewise. * gnu/packages/documentation.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fonts.scm: Likewise. * gnu/packages/fontutils.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/gl.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/graphviz.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/networking.scm: Likewise. * gnu/packages/onc-rpc.scm: Likewise. * gnu/packages/password-utils.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/photo.scm: Likewise. * gnu/packages/popt.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/rdesktop.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/swig.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xml.scm: Likewise.
6 years ago
"mirror://sourceforge/" name "/" name "/"
version "/" name "-" version ".tar.gz"))
(sha256
(base32
"1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
(build-system gnu-build-system)
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("libxv" ,libxv)))
(home-page "http://libdv.sourceforge.net/")
(synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
(description "The Quasar DV codec (libdv) is a software codec for DV
video, the encoding format used by most digital camcorders, typically those
that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
developed according to the official standards for DV video: IEC 61834 and
SMPTE 314M.")
(license license:lgpl2.1+)))
(define-public libva
(package
(name "libva")
(version "1.7.1")
(source
(origin
(method url-fetch)
(uri (string-append
"https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
version".tar.bz2"))
(sha256
(base32 "1j8mb3p9kafhp30r3kmndnrklvzycc2ym0w6xdqz6m7jap626028"))))
(build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("libdrm" ,libdrm)
("libx11" ,libx11)
("libxext" ,libxext)
("libxfixes" ,libxfixes)
("mesa" ,mesa)))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before
'build 'fix-dlopen-paths
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "va/drm/va_drm_auth_x11.c"
(("\"libva-x11\\.so\\.%d\"")
(string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
;; overridden at run-time via LIBVA_DRIVERS_PATH.)
#:configure-flags
(list (string-append "--with-drivers-path="
(assoc-ref %build-inputs "mesa") "/lib/dri"))
;; However, we can't write to mesa's store directory, so override the
;; following make variable to install the dummy driver to libva's
;; $prefix/lib/dri directory.
#:make-flags
(list (string-append "dummy_drv_video_ladir="
(assoc-ref %outputs "out") "/lib/dri"))))
(home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
(synopsis "Video acceleration library")
(description "The main motivation for VA-API (Video Acceleration API) is
to enable hardware accelerated video decode/encode at various
entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
(license license:expat)))
(define-public ffmpeg
(package
(name "ffmpeg")
(version "3.2.2")
(source (origin
(method url-fetch)
(uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
version ".tar.xz"))
(sha256
(base32
"1z7d5y5crhsl5fm74236rdwbkd4jj5frx1l4iizjfym1w4gvs09z"))))
(build-system gnu-build-system)
(inputs
`(("fontconfig" ,fontconfig)
("freetype" ,freetype)
("gnutls" ,gnutls)
("opus" ,opus)
("ladspa" ,ladspa)
("lame" ,lame)
("libass" ,libass)
("libbluray" ,libbluray)
("libcaca" ,libcaca)
("libcdio-paranoia" ,libcdio-paranoia)
("libtheora" ,libtheora)
("libvdpau" ,libvdpau)
("libvorbis" ,libvorbis)
("libvpx" ,libvpx)
("libx11" ,libx11)
("libx264" ,libx264)
("mesa" ,mesa)
("openal" ,openal)
("pulseaudio" ,pulseaudio)
("soxr" ,soxr)
("speex" ,speex)
("twolame" ,twolame)
("x265" ,x265)
("xvid" ,xvid)
("zlib" ,zlib)))
(native-inputs
`(("bc" ,bc)
("perl" ,perl)
("pkg-config" ,pkg-config)
("texinfo" ,texinfo)
("python" ,python-2) ; scripts use interpreter python2
("speex" ,speex)
("yasm" ,yasm)))
(arguments
`(#:test-target "fate"
#:configure-flags
;; possible additional inputs:
;; --enable-avisynth enable reading of AviSynth script
;; files [no]
;; --enable-frei0r enable frei0r video filtering
;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
;; --enable-libcelt enable CELT decoding via libcelt [no]
;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
;; and libraw1394 [no]
;; --enable-libfaac enable AAC encoding via libfaac [no]
;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
;; --enable-libflite enable flite (voice synthesis) support via
;; libflite [no]
;; --enable-libgme enable Game Music Emu via libgme [no]
;; --enable-libgsm enable GSM de/encoding via libgsm [no]
;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
;; --enable-libmodplug enable ModPlug via libmodplug [no]
;; --enable-libnut enable NUT (de)muxing via libnut,
;; native (de)muxer exists [no]
;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
;; libopencore-amrnb [no]
;; --enable-libopencore-amrwb enable AMR-WB decoding via
;; libopencore-amrwb [no]
;; --enable-libopencv enable video filtering via libopencv [no]
;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
;; OpenJPEG [no]
;; --enable-librtmp enable RTMP[E] support via librtmp [no]
;; --enable-libschroedinger enable Dirac de/encoding via
;; libschroedinger [no]
;; --enable-libshine enable fixed-point MP3 encoding via
;; libshine [no]
;; --enable-libssh enable SFTP protocol via libssh [no]
;; (libssh2 does not work)
;; --enable-libstagefright-h264 enable H.264 decoding via
;; libstagefright [no]
;; --enable-libutvideo enable Ut Video encoding and decoding via
;; libutvideo [no]
;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
;; --enable-libvidstab enable video stabilization using
;; vid.stab [no]
;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
;; --enable-libvo-amrwbenc enable AMR-WB encoding via
;; libvo-amrwbenc [no]
;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
;; --enable-libxavs enable AVS encoding via xavs [no]
;; --enable-libzmq enable message passing via libzmq [no]
;; --enable-libzvbi enable teletext support via libzvbi [no]
;; --enable-opencl enable OpenCL code
'("--enable-avresample"
"--enable-gpl" ; enable optional gpl licensed parts
"--enable-shared"
"--enable-fontconfig"
"--enable-gnutls"
"--enable-ladspa"
"--enable-libass"
"--enable-libbluray"
"--enable-libcaca"
"--enable-libcdio"
"--enable-libfreetype"
"--enable-libmp3lame"
"--enable-libopus"
"--enable-libpulse"
"--enable-libsoxr"
"--enable-libspeex"
"--enable-libtheora"
"--enable-libtwolame"
"--enable-libvorbis"
"--enable-libvpx"
"--enable-libxvid"
"--enable-libx264"
"--enable-libx265"
"--enable-openal"
"--enable-opengl"
"--enable-x11grab"
"--enable-runtime-cpudetect"
;; Runtime cpu detection is not implemented on
;; MIPS, so we disable some features.
"--disable-mips32r2"
"--disable-mipsdsp"
"--disable-mipsdspr2"
"--disable-mipsfpu")
#:phases
(modify-phases %standard-phases
(replace
'configure
;; configure does not work followed by "SHELL=..." and
;; "CONFIG_SHELL=..."; set environment variables instead
(lambda* (#:key outputs configure-flags #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "configure"
(("#! /bin/sh") (string-append "#!" (which "bash"))))
(setenv "SHELL" (which "bash"))
(setenv "CONFIG_SHELL" (which "bash"))
(zero? (apply system*
"./configure"
(string-append "--prefix=" out)
;; Add $libdir to the RUNPATH of all the binaries.
(string-append "--extra-ldflags=-Wl,-rpath="
out "/lib")
configure-flags)))))
(add-before
'check 'set-ld-library-path
(lambda _
;; Allow $(top_builddir)/ffmpeg to find its dependencies when
;; running tests.
(let* ((dso (find-files "." "\\.so$"))
(path (string-join (map dirname dso) ":")))
(format #t "setting LD_LIBRARY_PATH to ~s~%" path)
(setenv "LD_LIBRARY_PATH" path)
#t))))))
(home-page "https://www.ffmpeg.org/")
(synopsis "Audio and video framework")
(description "FFmpeg is a complete, cross-platform solution to record,
convert and stream audio and video. It includes the libavcodec
audio/video codec library.")
(license license:gpl2+)))
(define-public ffmpeg-2.8
(package
(inherit ffmpeg)
(version "2.8.10")
(source (origin
(method url-fetch)
(uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
version ".tar.xz"))
(sha256
(base32
"1ca84kc715xm7wmbnj1z4jfhxj8c7rxhy4cqwrd8cnih0l196j1c"))))
(arguments
(substitute-keyword-arguments (package-arguments ffmpeg)
((#:configure-flags flags)
`(map (lambda (flag)
(if (string=? flag "--disable-mipsdsp")
"--disable-mipsdspr1"
flag))
,flags))))))
(define-public vlc
(package
(name "vlc")
(version "2.2.4")
(source (origin
(method url-fetch)
(uri (string-append
"https://download.videolan.org/pub/videolan/vlc/"
version "/vlc-" version ".tar.xz"))
(sha256
(base32
"1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
(modules '((guix build utils)))
(snippet
;; There are two occurrences where __DATE__ and __TIME__ are
;; used to capture the build time and show it to the user.
'(substitute* (find-files "." "help\\.c(pp)?$")
(("__DATE__") "\"2016\"")
(("__TIME__") "\"00:00\"")))))
(build-system gnu-build-system)
(native-inputs
`(("git" ,git) ; needed for a test
("pkg-config" ,pkg-config)))
;; FIXME: Add optional inputs once available.
(inputs
`(("alsa-lib" ,alsa-lib)
("avahi" ,avahi)
("dbus" ,dbus)
("flac" ,flac)
("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
("fontconfig" ,fontconfig)
("freetype" ,freetype)
("gnutls" ,gnutls)
("liba52" ,liba52)
("libcddb" ,libcddb)
("libgcrypt" ,libgcrypt)
("libkate" ,libkate)
("libmad" ,libmad)
("libogg" ,libogg)
("libpng" ,libpng)
("libsamplerate" ,libsamplerate)
("libssh2" ,libssh2)
("libvorbis" ,libvorbis)
("libtheora" ,libtheora)
("libxext" ,libxext)
("libxi" ,libxi)
("libxinerama" ,libxinerama)
("libxml2" ,libxml2)
("libxpm" ,libxpm)
("lua" ,lua-5.1)
("mesa" ,mesa)
("opus" ,opus)
("perl" ,perl)
("pulseaudio" ,pulseaudio)
("python" ,python-wrapper)
("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
;("qtbase" ,qtbase) with -std=gnu++11.
;("qtx11extras" ,qtx11extras)
("sdl" ,sdl)
("sdl-image" ,sdl-image)
("speex" ,speex)
("x265" ,x265)
("xcb-util-keysyms" ,xcb-util-keysyms)))
(arguments
`(#:configure-flags
`(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
;; In our case, this led to a test failure:
;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
"ac_cv_c_fast_math=no"
,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
(assoc-ref %build-inputs "ffmpeg")
"/lib")) ;needed for the tests
#:phases
(modify-phases %standard-phases
(add-before 'configure 'remove-visual-tests
;; Some of the tests require using the display to test out VLC,
;; which fails in our sandboxed build system
(lambda _
(substitute* "test/run_vlc.sh"
(("./vlc --ignore-config") "echo"))
#t))
(add-after 'install 'regenerate-plugin-cache
(lambda* (#:key outputs #:allow-other-keys)
;; The 'install-exec-hook' rule in the top-level Makefile.am
;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
;; 'vlc-cache-gen'. This file includes the mtime of the plugins
;; it references. Thus, we first reset the timestamps of all
;; these files, and then regenerate the cache such that the
;; mtimes it includes are always zero instead of being dependent
;; on the build time.
(let* ((out (assoc-ref outputs "out"))
(pkglibdir (string-append out "/lib/vlc"))
(plugindir (string-append pkglibdir "/plugins"))
(cachegen (string-append pkglibdir "/vlc-cache-gen")))
;; TODO: Factorize 'reset-timestamps'.
(for-each (lambda (file)
(let ((s (lstat file)))
(unless (eq? (stat:type s) 'symlink)
(utime file 0 0 0 0))))
(find-files plugindir))
(zero? (system* cachegen plugindir))))))))
(home-page "https://www.videolan.org/")
(synopsis "Audio and video framework")
(description "VLC is a cross-platform multimedia player and framework
that plays most multimedia files as well as DVD, Audio CD, VCD, and various
treaming protocols.")
(license license:gpl2+)))
(define-public mplayer
(package
(name "mplayer")
(version "1.3.0")
(source (origin