gnu: perl-www-curl: Fix build failure.
[jackhill/guix/guix.git] / gnu / packages / video.scm
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, 2016 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages video)
31 #:use-module (ice-9 match)
32 #:use-module (srfi srfi-1)
33 #:use-module (srfi srfi-26)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix utils)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system glib-or-gtk)
43 #:use-module (guix build-system python)
44 #:use-module (guix build-system waf)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages algebra)
47 #:use-module (gnu packages audio)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages avahi)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages cdrom)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages curl)
55 #:use-module (gnu packages databases)
56 #:use-module (gnu packages elf)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages freedesktop)
60 #:use-module (gnu packages fribidi)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages ghostscript)
63 #:use-module (gnu packages gl)
64 #:use-module (gnu packages glib)
65 #:use-module (gnu packages guile)
66 #:use-module (gnu packages gnupg)
67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages image)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages lua)
71 #:use-module (gnu packages mp3)
72 #:use-module (gnu packages ncurses)
73 #:use-module (gnu packages ocr)
74 #:use-module (gnu packages perl)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages popt)
77 #:use-module (gnu packages pulseaudio)
78 #:use-module (gnu packages python)
79 #:use-module (gnu packages qt)
80 #:use-module (gnu packages sdl)
81 #:use-module (gnu packages ssh)
82 #:use-module (gnu packages texinfo)
83 #:use-module (gnu packages textutils)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages version-control)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages xdisorg)
88 #:use-module (gnu packages xiph)
89 #:use-module (gnu packages xml)
90 #:use-module (gnu packages xorg)
91 #:use-module (gnu packages assembly)
92 #:use-module (gnu packages zip))
93
94 (define-public aalib
95 (package
96 (name "aalib")
97 (version "1.4rc5")
98 (source (origin
99 (method url-fetch)
100 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
101 version "/" name "-" version ".tar.gz"))
102 (sha256
103 (base32
104 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
105 (build-system gnu-build-system)
106 (native-inputs
107 `(("makeinfo" ,texinfo)))
108 (inputs
109 `(("ncurses" ,ncurses)))
110 (arguments
111 `(#:phases
112 (modify-phases %standard-phases
113 (replace 'configure
114 (lambda* (#:key build inputs outputs #:allow-other-keys)
115 ;; This old `configure' script doesn't support
116 ;; variables passed as arguments.
117 (let ((out (assoc-ref outputs "out"))
118 (ncurses (assoc-ref inputs "ncurses")))
119 (setenv "CONFIG_SHELL" (which "bash"))
120 (zero? (system* "./configure"
121 (string-append "--prefix=" out)
122 (string-append "--build=" build)
123 ;; The ancient config.guess is unable to
124 ;; guess the host triplet on mips64el.
125 ,@(if (string=? "mips64el-linux"
126 (%current-system))
127 '("--host=mips64el-unknown-linux-gnu")
128 '())
129 (string-append "--with-ncurses="
130 ncurses)))))))))
131 (home-page "http://aa-project.sourceforge.net/aalib/")
132 (synopsis "ASCII-art library")
133 (description
134 "AA-lib is a low level gfx library which does not require graphics device.
135 In fact, there is no graphical output possible. AA-lib replaces those
136 old-fashioned output methods with powerful ascii-art renderer.")
137 (license license:lgpl2.0+)))
138
139 (define-public liba52
140 (package
141 (name "liba52")
142 (version "0.7.4")
143 (source (origin
144 (method url-fetch)
145 (uri (string-append
146 ;; A mirror://sourceforge URI doesn't work, presumably
147 ;; because the SourceForge project is misconfigured.
148 "http://liba52.sourceforge.net/files/a52dec-" version
149 ".tar.gz"))
150 (sha256
151 (base32
152 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
153 (patches (search-patches "liba52-enable-pic.patch"
154 "liba52-set-soname.patch"
155 "liba52-use-mtune-not-mcpu.patch"
156 "liba52-link-with-libm.patch"))))
157 (build-system gnu-build-system)
158 ;; XXX We need to run ./bootstrap because of the build system fixes above.
159 (native-inputs
160 `(("autoconf" ,autoconf)
161 ("automake" ,automake)
162 ("libtool" ,libtool)))
163 (arguments `(#:configure-flags '("--enable-shared")
164 #:phases
165 (modify-phases %standard-phases
166 ;; XXX We need to run ./bootstrap because of the build
167 ;; system fixes above.
168 (add-after
169 'unpack 'bootstrap
170 (lambda _ (zero? (system* "sh" "bootstrap")))))))
171 (home-page "http://liba52.sourceforge.net/")
172 (synopsis "ATSC A/52 stream decoder")
173 (description "liba52 is a library for decoding ATSC A/52 streams. The
174 A/52 standard is used in a variety of applications, including digital
175 television and DVD. It is also known as AC-3.")
176 (license license:gpl2+)))
177
178 (define-public libmpeg2
179 (package
180 (name "libmpeg2")
181 (version "0.5.1")
182 (source (origin
183 (method url-fetch)
184 ;; A mirror://sourceforge URI doesn't work, presumably
185 ;; because the SourceForge project is misconfigured.
186 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
187 name "-" version ".tar.gz"))
188 (sha256
189 (base32
190 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
191 (inputs
192 `(("libx11" ,libx11)
193 ("libxext" ,libxext)
194 ("libxv" ,libxv)
195 ("libsm" ,libsm)
196 ("libice" ,libice)
197 ("sdl" ,sdl)))
198 (build-system gnu-build-system)
199 (home-page "http://libmpeg2.sourceforge.net/")
200 (synopsis "MPEG1 and MPEG2 video decoder library")
201 (description
202 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
203 (license license:gpl2+)))
204
205 (define-public libx264
206 (package
207 (name "libx264")
208 (version "20160220-2245")
209 (source (origin
210 (method url-fetch)
211 (uri (string-append "http://download.videolan.org/pub/x264/snapshots/"
212 "x264-snapshot-" version ".tar.bz2"))
213 (sha256
214 (base32
215 "12zyzbiihfhamf7yi4qqaj6k0nisnrydvfr36kxadvmsm7dg4sj3"))))
216 (build-system gnu-build-system)
217 (native-inputs
218 `(("pkg-config" ,pkg-config)
219 ("yasm" ,yasm)))
220 ;; TODO: Add gpac input
221 (arguments
222 `(#:tests? #f ;no check target
223 #:configure-flags '("--enable-shared"
224 ;; Don't build the command-line program. If we
225 ;; want it later, we should do so in a different
226 ;; package to avoid a circular dependency (the x264
227 ;; program depends on ffmpeg and ffmpeg depends on
228 ;; libx264).
229 "--disable-cli"
230
231 ;; On MIPS, we must pass "--disable-asm" or else
232 ;; configure fails after printing: "You specified a
233 ;; pre-MSA CPU in your CFLAGS. If you really want
234 ;; to run on such a CPU, configure with
235 ;; --disable-asm."
236 ,@(if (string-prefix? "mips"
237 (or (%current-target-system)
238 (%current-system)))
239 '("--disable-asm")
240 '()))))
241 (home-page "http://www.videolan.org/developers/x264.html")
242 (synopsis "H.264 video coding library")
243 (description "libx264 is an advanced encoding library for creating
244 H.264 (MPEG-4 AVC) video streams.")
245 (license (list license:gpl2+ ;most files
246 license:isc ;common/x86/x86inc.asm
247 license:lgpl2.1+ ;extras/getopt.c
248 license:bsd-3 ;extras/inttypes.h
249 (license:non-copyleft ;extras/cl*.h
250 "file://extras/cl.h"
251 "See extras/cl.h in the distribution.")))))
252
253 (define-public libass
254 (package
255 (name "libass")
256 (version "0.13.4")
257 (source (origin
258 (method url-fetch)
259 (uri (string-append
260 "https://github.com/libass/libass/releases/download/"
261 version "/libass-" version ".tar.xz"))
262 (sha256
263 (base32
264 "1dlzkjybnpl2fkvyjq0qblb7qw12cs893bs7zj3rvf8ij342yjnq"))))
265 (build-system gnu-build-system)
266 (native-inputs
267 `(("pkg-config" ,pkg-config)
268 ("yasm" ,yasm)))
269 (propagated-inputs
270 `(("freetype" ,freetype)
271 ("fribidi" ,fribidi)
272 ("fontconfig" ,fontconfig)
273 ("harfbuzz" ,harfbuzz)
274 ("enca" ,enca)))
275 (home-page "https://github.com/libass/libass")
276 (synopsis "Subtitle rendering library for the ASS/SSA format")
277 (description "libass is a subtitle rendering library for the
278 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
279 (license license:isc)))
280
281 (define-public libcaca
282 (package
283 (name "libcaca")
284 (version "0.99.beta19")
285 (source (origin
286 (method url-fetch)
287 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
288 version ".tar.gz"))
289 (sha256
290 (base32
291 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
292 (build-system gnu-build-system)
293 (native-inputs `(("pkg-config" ,pkg-config)))
294 (inputs
295 `(("freeglut" ,freeglut)
296 ("ftgl" ,ftgl)
297 ("imlib2" ,imlib2)
298 ("libx11" ,libx11)
299 ("mesa" ,mesa)
300 ("ncurses" ,ncurses)
301 ("zlib" ,zlib)))
302 (home-page "http://caca.zoy.org/wiki/libcaca")
303 (synopsis "Colour ASCII-art library")
304 (description "libcaca is a graphics library that outputs text instead of
305 pixels, so that it can work on older video cards or text terminals. It
306 supports Unicode, 2048 colors, dithering of color images, and advanced text
307 canvas operations.")
308 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
309
310 (define-public libdca
311 (package
312 (name "libdca")
313 (version "0.0.5")
314 (source (origin
315 (method url-fetch)
316 (uri (string-append
317 "http://download.videolan.org/pub/videolan/libdca/"
318 version "/libdca-" version ".tar.bz2"))
319 (sha256
320 (base32
321 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
322 (build-system gnu-build-system)
323 (home-page "http://www.videolan.org/developers/libdca.html")
324 (synopsis "DTS Coherent Acoustics decoder")
325 (description "libdca is a library for decoding DTS Coherent Acoustics
326 streams.")
327 (license license:gpl2+)))
328
329 (define-public libdv
330 (package
331 (name "libdv")
332 (version "1.0.0")
333 (source (origin
334 (method url-fetch)
335 (uri (string-append
336 "mirror://sourceforge/" name "/" name "/"
337 version "/" name "-" version ".tar.gz"))
338 (sha256
339 (base32
340 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
341 (build-system gnu-build-system)
342 (native-inputs `(("pkg-config" ,pkg-config)))
343 (inputs `(("libxv" ,libxv)))
344 (home-page "http://libdv.sourceforge.net/")
345 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
346 (description "The Quasar DV codec (libdv) is a software codec for DV
347 video, the encoding format used by most digital camcorders, typically those
348 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
349 developed according to the official standards for DV video: IEC 61834 and
350 SMPTE 314M.")
351 (license license:lgpl2.1+)))
352
353 (define-public libva
354 (package
355 (name "libva")
356 (version "1.7.1")
357 (source
358 (origin
359 (method url-fetch)
360 (uri (string-append
361 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
362 version".tar.bz2"))
363 (sha256
364 (base32 "1j8mb3p9kafhp30r3kmndnrklvzycc2ym0w6xdqz6m7jap626028"))))
365 (build-system gnu-build-system)
366 (native-inputs
367 `(("pkg-config" ,pkg-config)))
368 (inputs
369 `(("libdrm" ,libdrm)
370 ("libx11" ,libx11)
371 ("libxext" ,libxext)
372 ("libxfixes" ,libxfixes)
373 ("mesa" ,mesa)))
374 (arguments
375 `(#:phases
376 (modify-phases %standard-phases
377 (add-before
378 'build 'fix-dlopen-paths
379 (lambda* (#:key outputs #:allow-other-keys)
380 (let ((out (assoc-ref outputs "out")))
381 (substitute* "va/drm/va_drm_auth_x11.c"
382 (("\"libva-x11\\.so\\.%d\"")
383 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
384 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
385 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
386 #:configure-flags
387 (list (string-append "--with-drivers-path="
388 (assoc-ref %build-inputs "mesa") "/lib/dri"))
389 ;; However, we can't write to mesa's store directory, so override the
390 ;; following make variable to install the dummy driver to libva's
391 ;; $prefix/lib/dri directory.
392 #:make-flags
393 (list (string-append "dummy_drv_video_ladir="
394 (assoc-ref %outputs "out") "/lib/dri"))))
395 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
396 (synopsis "Video acceleration library")
397 (description "The main motivation for VA-API (Video Acceleration API) is
398 to enable hardware accelerated video decode/encode at various
399 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
400 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
401 (license license:expat)))
402
403 (define-public ffmpeg
404 (package
405 (name "ffmpeg")
406 (version "3.1.5")
407 (source (origin
408 (method url-fetch)
409 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
410 version ".tar.xz"))
411 (sha256
412 (base32
413 "16mqb1fs6ahqqv6a64dk4d8rp75ixdsipfzsz0vmc749yw2k3k29"))))
414 (build-system gnu-build-system)
415 (inputs
416 `(("fontconfig" ,fontconfig)
417 ("freetype" ,freetype)
418 ("gnutls" ,gnutls)
419 ("opus" ,opus)
420 ("ladspa" ,ladspa)
421 ("lame" ,lame)
422 ("libass" ,libass)
423 ("libbluray" ,libbluray)
424 ("libcaca" ,libcaca)
425 ("libcdio-paranoia" ,libcdio-paranoia)
426 ("libtheora" ,libtheora)
427 ("libvdpau" ,libvdpau)
428 ("libvorbis" ,libvorbis)
429 ("libvpx" ,libvpx)
430 ("libx11" ,libx11)
431 ("libx264" ,libx264)
432 ("mesa" ,mesa)
433 ("openal" ,openal)
434 ("pulseaudio" ,pulseaudio)
435 ("soxr" ,soxr)
436 ("speex" ,speex)
437 ("twolame" ,twolame)
438 ("xvid" ,xvid)
439 ("zlib" ,zlib)))
440 (native-inputs
441 `(("bc" ,bc)
442 ("perl" ,perl)
443 ("pkg-config" ,pkg-config)
444 ("texinfo" ,texinfo)
445 ("python" ,python-2) ; scripts use interpreter python2
446 ("speex" ,speex)
447 ("yasm" ,yasm)))
448 (arguments
449 `(#:test-target "fate"
450 #:configure-flags
451 ;; possible additional inputs:
452 ;; --enable-avisynth enable reading of AviSynth script
453 ;; files [no]
454 ;; --enable-frei0r enable frei0r video filtering
455 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
456 ;; --enable-libcelt enable CELT decoding via libcelt [no]
457 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
458 ;; and libraw1394 [no]
459 ;; --enable-libfaac enable AAC encoding via libfaac [no]
460 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
461 ;; --enable-libflite enable flite (voice synthesis) support via
462 ;; libflite [no]
463 ;; --enable-libgme enable Game Music Emu via libgme [no]
464 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
465 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
466 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
467 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
468 ;; --enable-libnut enable NUT (de)muxing via libnut,
469 ;; native (de)muxer exists [no]
470 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
471 ;; libopencore-amrnb [no]
472 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
473 ;; libopencore-amrwb [no]
474 ;; --enable-libopencv enable video filtering via libopencv [no]
475 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
476 ;; OpenJPEG [no]
477 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
478 ;; --enable-libschroedinger enable Dirac de/encoding via
479 ;; libschroedinger [no]
480 ;; --enable-libshine enable fixed-point MP3 encoding via
481 ;; libshine [no]
482 ;; --enable-libssh enable SFTP protocol via libssh [no]
483 ;; (libssh2 does not work)
484 ;; --enable-libstagefright-h264 enable H.264 decoding via
485 ;; libstagefright [no]
486 ;; --enable-libutvideo enable Ut Video encoding and decoding via
487 ;; libutvideo [no]
488 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
489 ;; --enable-libvidstab enable video stabilization using
490 ;; vid.stab [no]
491 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
492 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
493 ;; libvo-amrwbenc [no]
494 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
495 ;; --enable-libxavs enable AVS encoding via xavs [no]
496 ;; --enable-libzmq enable message passing via libzmq [no]
497 ;; --enable-libzvbi enable teletext support via libzvbi [no]
498 ;; --enable-opencl enable OpenCL code
499 '("--enable-avresample"
500 "--enable-gpl" ; enable optional gpl licensed parts
501 "--enable-shared"
502 "--enable-fontconfig"
503 "--enable-gnutls"
504 "--enable-ladspa"
505 "--enable-libass"
506 "--enable-libbluray"
507 "--enable-libcaca"
508 "--enable-libcdio"
509 "--enable-libfreetype"
510 "--enable-libmp3lame"
511 "--enable-libopus"
512 "--enable-libpulse"
513 "--enable-libsoxr"
514 "--enable-libspeex"
515 "--enable-libtheora"
516 "--enable-libtwolame"
517 "--enable-libvorbis"
518 "--enable-libvpx"
519 "--enable-libxvid"
520 "--enable-libx264"
521 "--enable-openal"
522 "--enable-opengl"
523 "--enable-x11grab"
524
525 "--enable-runtime-cpudetect"
526
527 ;; Runtime cpu detection is not implemented on
528 ;; MIPS, so we disable some features.
529 "--disable-mips32r2"
530 "--disable-mipsdsp"
531 "--disable-mipsdspr2"
532 "--disable-mipsfpu")
533 #:phases
534 (modify-phases %standard-phases
535 (replace
536 'configure
537 ;; configure does not work followed by "SHELL=..." and
538 ;; "CONFIG_SHELL=..."; set environment variables instead
539 (lambda* (#:key outputs configure-flags #:allow-other-keys)
540 (let ((out (assoc-ref outputs "out")))
541 (substitute* "configure"
542 (("#! /bin/sh") (string-append "#!" (which "bash"))))
543 (setenv "SHELL" (which "bash"))
544 (setenv "CONFIG_SHELL" (which "bash"))
545 (zero? (apply system*
546 "./configure"
547 (string-append "--prefix=" out)
548 ;; Add $libdir to the RUNPATH of all the binaries.
549 (string-append "--extra-ldflags=-Wl,-rpath="
550 out "/lib")
551 configure-flags)))))
552 (add-before
553 'check 'set-ld-library-path
554 (lambda _
555 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
556 ;; running tests.
557 (let* ((dso (find-files "." "\\.so$"))
558 (path (string-join (map dirname dso) ":")))
559 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
560 (setenv "LD_LIBRARY_PATH" path)
561 #t))))))
562 (home-page "https://www.ffmpeg.org/")
563 (synopsis "Audio and video framework")
564 (description "FFmpeg is a complete, cross-platform solution to record,
565 convert and stream audio and video. It includes the libavcodec
566 audio/video codec library.")
567 (license license:gpl2+)))
568
569 (define-public ffmpeg-2.8
570 (package
571 (inherit ffmpeg)
572 (version "2.8.8")
573 (source (origin
574 (method url-fetch)
575 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
576 version ".tar.xz"))
577 (sha256
578 (base32
579 "1691bmq8j56rcys09xwvzjq16z25m8vczj5a50gdn7ydm9qjykpr"))))
580 (arguments
581 (substitute-keyword-arguments (package-arguments ffmpeg)
582 ((#:configure-flags flags)
583 `(map (lambda (flag)
584 (if (string=? flag "--disable-mipsdsp")
585 "--disable-mipsdspr1"
586 flag))
587 ,flags))))))
588
589 (define-public vlc
590 (package
591 (name "vlc")
592 (version "2.2.4")
593 (source (origin
594 (method url-fetch)
595 (uri (string-append
596 "https://download.videolan.org/pub/videolan/vlc/"
597 version "/vlc-" version ".tar.xz"))
598 (sha256
599 (base32
600 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
601 (modules '((guix build utils)))
602 (snippet
603 ;; There are two occurrences where __DATE__ and __TIME__ are
604 ;; used to capture the build time and show it to the user.
605 '(substitute* (find-files "." "help\\.c(pp)?$")
606 (("__DATE__") "\"2016\"")
607 (("__TIME__") "\"00:00\"")))))
608 (build-system gnu-build-system)
609 (native-inputs
610 `(("git" ,git) ; needed for a test
611 ("pkg-config" ,pkg-config)))
612 ;; FIXME: Add optional inputs once available.
613 (inputs
614 `(("alsa-lib" ,alsa-lib)
615 ("avahi" ,avahi)
616 ("dbus" ,dbus)
617 ("flac" ,flac)
618 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
619 ("fontconfig" ,fontconfig)
620 ("freetype" ,freetype)
621 ("gnutls" ,gnutls)
622 ("liba52" ,liba52)
623 ("libcddb" ,libcddb)
624 ("libgcrypt" ,libgcrypt)
625 ("libkate" ,libkate)
626 ("libmad" ,libmad)
627 ("libogg" ,libogg)
628 ("libpng" ,libpng)
629 ("libsamplerate" ,libsamplerate)
630 ("libssh2" ,libssh2)
631 ("libvorbis" ,libvorbis)
632 ("libtheora" ,libtheora)
633 ("libxext" ,libxext)
634 ("libxi" ,libxi)
635 ("libxinerama" ,libxinerama)
636 ("libxml2" ,libxml2)
637 ("libxpm" ,libxpm)
638 ("lua" ,lua-5.1)
639 ("mesa" ,mesa)
640 ("opus" ,opus)
641 ("perl" ,perl)
642 ("pulseaudio" ,pulseaudio)
643 ("python" ,python-wrapper)
644 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
645 ;("qtbase" ,qtbase) with -std=gnu++11.
646 ;("qtx11extras" ,qtx11extras)
647 ("sdl" ,sdl)
648 ("sdl-image" ,sdl-image)
649 ("speex" ,speex)
650 ("xcb-util-keysyms" ,xcb-util-keysyms)))
651 (arguments
652 `(#:configure-flags
653 `(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
654 ;; In our case, this led to a test failure:
655 ;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
656 "ac_cv_c_fast_math=no"
657
658 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
659 (assoc-ref %build-inputs "ffmpeg")
660 "/lib")) ;needed for the tests
661
662 #:phases
663 (modify-phases %standard-phases
664 (add-before 'configure 'remove-visual-tests
665 ;; Some of the tests require using the display to test out VLC,
666 ;; which fails in our sandboxed build system
667 (lambda _
668 (substitute* "test/run_vlc.sh"
669 (("./vlc --ignore-config") "echo"))
670 #t))
671 (add-after 'install 'regenerate-plugin-cache
672 (lambda* (#:key outputs #:allow-other-keys)
673 ;; The 'install-exec-hook' rule in the top-level Makefile.am
674 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
675 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
676 ;; it references. Thus, we first reset the timestamps of all
677 ;; these files, and then regenerate the cache such that the
678 ;; mtimes it includes are always zero instead of being dependent
679 ;; on the build time.
680 (let* ((out (assoc-ref outputs "out"))
681 (pkglibdir (string-append out "/lib/vlc"))
682 (plugindir (string-append pkglibdir "/plugins"))
683 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
684 ;; TODO: Factorize 'reset-timestamps'.
685 (for-each (lambda (file)
686 (let ((s (lstat file)))
687 (unless (eq? (stat:type s) 'symlink)
688 (utime file 0 0 0 0))))
689 (find-files plugindir))
690 (zero? (system* cachegen plugindir))))))))
691 (home-page "https://www.videolan.org/")
692 (synopsis "Audio and video framework")
693 (description "VLC is a cross-platform multimedia player and framework
694 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
695 treaming protocols.")
696 (license license:gpl2+)))
697
698 (define-public mplayer
699 (package
700 (name "mplayer")
701 (version "1.3.0")
702 (source (origin
703 (method url-fetch)
704 (uri (string-append
705 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
706 version ".tar.xz"))
707 (sha256
708 (base32
709 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
710 (build-system gnu-build-system)
711 ;; FIXME: Add additional inputs once available.
712 (native-inputs
713 `(("pkg-config" ,pkg-config)))
714 (inputs
715 `(("alsa-lib" ,alsa-lib)
716 ("cdparanoia" ,cdparanoia)
717 ("ffmpeg" ,ffmpeg)
718 ("fontconfig" ,fontconfig)
719 ("freetype" ,freetype)
720 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
721 ("lame" ,lame)
722 ("libass" ,libass)
723 ("libdvdcss" ,libdvdcss)
724 ("libdvdnav" ,libdvdnav)
725 ("libjpeg" ,libjpeg)
726 ("libmpeg2" ,libmpeg2)
727 ("libmpg123" ,mpg123) ; audio codec for MP3
728 ("libpng" ,libpng)
729 ("libtheora" ,libtheora)
730 ("libvdpau" ,libvdpau)
731 ("libvorbis" ,libvorbis)
732 ("libx11" ,libx11)
733 ("libx264" ,libx264)
734 ("libxinerama" ,libxinerama)
735 ("libxv" ,libxv)
736 ("libxxf86dga" ,libxxf86dga)
737 ("mesa" ,mesa)
738 ("opus" ,opus)
739 ("perl" ,perl)
740 ("pulseaudio" ,pulseaudio)
741 ("python" ,python-wrapper)
742 ("sdl" ,sdl)
743 ("speex" ,speex)
744 ("yasm" ,yasm)
745 ("zlib" ,zlib)))
746 (arguments
747 `(#:tests? #f ; no test target
748 #:phases
749 (modify-phases %standard-phases
750 (replace 'configure
751 ;; configure does not work followed by "SHELL=..." and
752 ;; "CONFIG_SHELL=..."; set environment variables instead
753 (lambda* (#:key inputs outputs #:allow-other-keys)
754 (let ((out (assoc-ref outputs "out"))
755 (libx11 (assoc-ref inputs "libx11")))
756 (substitute* "configure"
757 (("#! /bin/sh") (string-append "#!" (which "bash"))))
758 (setenv "SHELL" (which "bash"))
759 (setenv "CONFIG_SHELL" (which "bash"))
760 (zero? (system*
761 "./configure"
762 (string-append "--extra-cflags=-I"
763 libx11 "/include") ; to detect libx11
764 "--disable-ffmpeg_a" ; disables bundled ffmpeg
765 (string-append "--prefix=" out)
766 ;; Enable runtime cpu detection where supported,
767 ;; and choose a suitable target.
768 ,@(match (or (%current-target-system)
769 (%current-system))
770 ("x86_64-linux"
771 '("--enable-runtime-cpudetection"
772 "--target=x86_64-linux"))
773 ("i686-linux"
774 '("--enable-runtime-cpudetection"
775 "--target=i686-linux"))
776 ("mips64el-linux"
777 '("--target=mips3-linux"))
778 (_ (list (string-append
779 "--target="
780 (or (%current-target-system)
781 (nix-system->gnu-triplet
782 (%current-system)))))))
783 "--disable-iwmmxt"))))))))
784 (home-page "https://www.mplayerhq.hu/design7/news.html")
785 (synopsis "Audio and video player")
786 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
787 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
788 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
789 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
790 (license license:gpl2)))
791
792 (define-public mpv
793 (package
794 (name "mpv")
795 (version "0.21.0")
796 (source (origin
797 (method url-fetch)
798 (uri (string-append
799 "https://github.com/mpv-player/mpv/archive/v" version
800 ".tar.gz"))
801 (sha256
802 (base32
803 "1lwvvhldqrkp44zdm3wbi7qrsln13s8ympwwckqhwl4whp78wpyh"))
804 (file-name (string-append name "-" version ".tar.gz"))))
805 (build-system waf-build-system)
806 (native-inputs
807 `(("perl" ,perl)
808 ("pkg-config" ,pkg-config)
809 ("python-docutils" ,python-docutils)))
810 ;; Missing features: libguess, Wayland, V4L2
811 (inputs
812 `(("alsa-lib" ,alsa-lib)
813 ("enca" ,enca)
814 ("ffmpeg" ,ffmpeg)
815 ("jack" ,jack-1)
816 ("ladspa" ,ladspa)
817 ("lcms" ,lcms)
818 ("libass" ,libass)
819 ("libbluray" ,libbluray)
820 ("libcaca" ,libcaca)
821 ("libbs2b" ,libbs2b)
822 ("libcdio-paranoia" ,libcdio-paranoia)
823 ("libdvdread" ,libdvdread)
824 ("libdvdnav" ,libdvdnav)
825 ("libjpeg" ,libjpeg)
826 ("libva" ,libva)
827 ("libvdpau" ,libvdpau)
828 ("libx11" ,libx11)
829 ("libxext" ,libxext)
830 ("libxinerama" ,libxinerama)
831 ("libxrandr" ,libxrandr)
832 ("libxscrnsaver" ,libxscrnsaver)
833 ("libxv" ,libxv)
834 ("lua" ,lua)
835 ("mesa" ,mesa)
836 ("mpg123" ,mpg123)
837 ("pulseaudio" ,pulseaudio)
838 ("rsound" ,rsound)
839 ("waf" ,python-waf)
840 ("youtube-dl" ,youtube-dl)
841 ("zlib" ,zlib)))
842 (arguments
843 '(#:phases
844 (modify-phases %standard-phases
845 (add-before
846 'configure 'setup-waf
847 (lambda* (#:key inputs #:allow-other-keys)
848 (copy-file (assoc-ref inputs "waf") "waf")
849 (setenv "CC" "gcc"))))
850 #:configure-flags (list "--enable-libmpv-shared" "--enable-zsh-comp")
851 ;; No check function defined.
852 #:tests? #f))
853 (home-page "https://mpv.io/")
854 (synopsis "Audio and video player")
855 (description "mpv is a general-purpose audio and video player. It is a
856 fork of mplayer2 and MPlayer. It shares some features with the former
857 projects while introducing many more.")
858 (license license:gpl2+)))
859
860 (define-public gnome-mpv
861 (package
862 (name "gnome-mpv")
863 (version "0.10")
864 (source
865 (origin
866 (method url-fetch)
867 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
868 "/download/v" version "/gnome-mpv-" version
869 ".tar.xz"))
870 (sha256
871 (base32
872 "10zizf926a82c753a80bi49rb5c4yqjyd6zin4xgmggspfxngncj"))))
873 (native-inputs
874 `(("intltool" ,intltool)
875 ("pkg-config" ,pkg-config)))
876 (inputs
877 `(("gtk+" ,gtk+)
878 ("libepoxy" ,libepoxy)
879 ("mpv" ,mpv)))
880 (build-system glib-or-gtk-build-system)
881 (home-page "https://github.com/gnome-mpv/gnome-mpv")
882 (synopsis "GTK+ frontend for the mpv media player")
883 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
884 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
885 access to mpv's powerful playback capabilities.")
886 (license license:gpl3+)))
887
888 (define-public libvpx
889 (package
890 (name "libvpx")
891 (version "1.6.0")
892 (source (origin
893 (method url-fetch)
894 (uri (string-append "http://storage.googleapis.com/"
895 "downloads.webmproject.org/releases/webm/"
896 name "-" version ".tar.bz2"))
897 (sha256
898 (base32
899 "1basd6dda5di9p7jhc0f4f52wzm9c3hsravqspw6ibpcn5gbpbyh"))
900 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
901 (build-system gnu-build-system)
902 (arguments
903 `(#:phases
904 (modify-phases %standard-phases
905 (replace 'configure
906 (lambda* (#:key outputs #:allow-other-keys)
907 (setenv "CONFIG_SHELL" (which "bash"))
908 (let ((out (assoc-ref outputs "out")))
909 (setenv "LDFLAGS"
910 (string-append "-Wl,-rpath=" out "/lib"))
911 (zero? (system* "./configure"
912 "--enable-shared"
913 "--as=yasm"
914 ;; Limit size to avoid CVE-2015-1258
915 "--size-limit=16384x16384"
916 (string-append "--prefix=" out)))))))
917 #:tests? #f)) ; no check target
918 (native-inputs
919 `(("perl" ,perl)
920 ("yasm" ,yasm)))
921 (synopsis "VP8/VP9 video codec")
922 (description "libvpx is a codec for the VP8/VP9 video compression format.")
923 (license license:bsd-3)
924 (home-page "http://www.webmproject.org/")))
925
926 (define-public youtube-dl
927 (package
928 (name "youtube-dl")
929 (version "2016.10.16")
930 (source (origin
931 (method url-fetch)
932 (uri (string-append "https://youtube-dl.org/downloads/"
933 version "/youtube-dl-"
934 version ".tar.gz"))
935 (sha256
936 (base32
937 "0q6cxbp1xx8xmwn3xbxh6gcbgqjxy3slzfca4dbkk9xl2yy9rwqg"))))
938 (build-system python-build-system)
939 (arguments
940 ;; The problem here is that the directory for the man page and completion
941 ;; files is relative, and for some reason, setup.py uses the
942 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
943 ;; So, we need pass the prefix directly. In addition, make sure the Bash
944 ;; completion file is called 'youtube-dl' rather than
945 ;; 'youtube-dl.bash-completion'.
946 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
947 #:phases (modify-phases %standard-phases
948 (add-before 'install 'fix-the-data-directories
949 (lambda* (#:key outputs #:allow-other-keys)
950 (let ((prefix (assoc-ref outputs "out")))
951 (mkdir "bash-completion")
952 (rename-file "youtube-dl.bash-completion"
953 "bash-completion/youtube-dl")
954 (substitute* "setup.py"
955 (("youtube-dl\\.bash-completion")
956 "bash-completion/youtube-dl")
957 (("'etc/")
958 (string-append "'" prefix "/etc/"))
959 (("'share/")
960 (string-append "'" prefix "/share/")))))))))
961 (synopsis "Download videos from YouTube.com and other sites")
962 (description
963 "Youtube-dl is a small command-line program to download videos from
964 YouTube.com and a few more sites.")
965 (home-page "https://youtube-dl.org")
966 (license license:public-domain)))
967
968 (define-public libbluray
969 (package
970 (name "libbluray")
971 (version "0.9.3")
972 (source (origin
973 (method url-fetch)
974 (uri (string-append "https://download.videolan.org/videolan/"
975 name "/" version "/"
976 name "-" version ".tar.bz2"))
977 (sha256
978 (base32
979 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
980 (build-system gnu-build-system)
981 (arguments
982 `(#:configure-flags '("--disable-bdjava")
983 #:phases
984 (modify-phases %standard-phases
985 (add-before 'build 'fix-dlopen-paths
986 (lambda* (#:key inputs #:allow-other-keys)
987 (let ((libaacs (assoc-ref inputs "libaacs"))
988 (libbdplus (assoc-ref inputs "libbdplus")))
989 (substitute* "src/libbluray/disc/aacs.c"
990 (("\"libaacs\"")
991 (string-append "\"" libaacs "/lib/libaacs\"")))
992 (substitute* "src/libbluray/disc/bdplus.c"
993 (("\"libbdplus\"")
994 (string-append "\"" libbdplus "/lib/libbdplus\"")))
995 #t))))))
996 (native-inputs `(("pkg-config" ,pkg-config)))
997 (inputs
998 `(("fontconfig" ,fontconfig)
999 ("freetype" ,freetype)
1000 ("libaacs" ,libaacs)
1001 ("libbdplus" ,libbdplus)
1002 ("libxml2" ,libxml2)))
1003 (home-page "https://www.videolan.org/developers/libbluray.html")
1004 (synopsis "Blu-Ray Disc playback library")
1005 (description
1006 "libbluray is a library designed for Blu-Ray Disc playback for media
1007 players, like VLC or MPlayer.")
1008 (license license:lgpl2.1+)))
1009
1010 (define-public libdvdread
1011 (package
1012 (name "libdvdread")
1013 (version "5.0.3")
1014 (source (origin
1015 (method url-fetch)
1016 (uri (string-append "http://download.videolan.org/videolan/"
1017 name "/" version "/"
1018 name "-" version ".tar.bz2"))
1019 (sha256
1020 (base32
1021 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1022 (build-system gnu-build-system)
1023 (home-page "http://dvdnav.mplayerhq.hu/")
1024 (synopsis "Library for reading video DVDs")
1025 (description
1026 "Libdvdread provides a simple foundation for reading DVD video
1027 disks. It provides the functionality that is required to access many
1028 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1029 authentication and descrambling (if an external libdvdcss library is
1030 installed).")
1031 (license license:gpl2+)))
1032
1033 (define-public libdvdnav
1034 (package
1035 (name "libdvdnav")
1036 (version "5.0.3")
1037 (source (origin
1038 (method url-fetch)
1039 (uri (string-append "http://download.videolan.org/videolan/"
1040 name "/" version "/"
1041 name "-" version ".tar.bz2"))
1042 (sha256
1043 (base32
1044 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1045 (build-system gnu-build-system)
1046 (native-inputs
1047 `(("pkg-config" ,pkg-config)))
1048 (inputs
1049 `(("libdvdread" ,libdvdread)))
1050 (home-page "http://dvdnav.mplayerhq.hu/")
1051 (synopsis "Library for video DVD navigation features")
1052 (description
1053 "Libdvdnav is a library for developers of multimedia
1054 applications. It allows easy use of sophisticated DVD navigation features
1055 such as DVD menus, multiangle playback and even interactive DVD games. All
1056 this functionality is provided through a simple API which provides the DVD
1057 playback as a single logical stream of blocks, intermitted by special
1058 dvdnav events to report certain conditions. The main usage of libdvdnav is
1059 a loop regularly calling a function to get the next block, surrounded by
1060 additional calls to tell the library of user interaction. The whole
1061 DVD virtual machine and internal playback states are completely
1062 encapsulated.")
1063 (license license:gpl2+)))
1064
1065 (define-public libdvdnav-4
1066 (package
1067 (inherit libdvdnav)
1068 (version "4.2.1")
1069 (source (origin
1070 (method url-fetch)
1071 (uri
1072 (string-append
1073 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1074 version ".tar.xz"))
1075 (sha256
1076 (base32
1077 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1078 (native-inputs
1079 `(("pkg-config" ,pkg-config)
1080 ("autoconf" ,autoconf)
1081 ("automake" ,automake)
1082 ("libtool" ,libtool)))
1083 (arguments
1084 '(#:phases
1085 (alist-cons-after
1086 'unpack 'autoreconf
1087 (lambda _
1088 (zero? (system* "autoreconf" "-vif")))
1089 %standard-phases)))))
1090
1091 (define-public libdvdcss
1092 (package
1093 (name "libdvdcss")
1094 (version "1.4.0")
1095 (source (origin
1096 (method url-fetch)
1097 (uri (string-append "http://download.videolan.org/pub/"
1098 name "/" version "/"
1099 name "-" version ".tar.bz2"))
1100 (sha256
1101 (base32
1102 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1103 (build-system gnu-build-system)
1104 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1105 (synopsis "Library for accessing DVDs as block devices")
1106 (description
1107 "libdvdcss is a simple library designed for accessing DVDs like a block
1108 device without having to bother about the decryption.")
1109 (license license:gpl2+)))
1110
1111 (define-public srt2vtt
1112 (package
1113 (name "srt2vtt")
1114 (version "0.1")
1115 (source (origin
1116 (method url-fetch)
1117 (uri (string-append
1118 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1119 version ".tar.gz"))
1120 (sha256
1121 (base32
1122 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1123 (build-system gnu-build-system)
1124 (inputs
1125 `(("guile" ,guile-2.0)))
1126 (synopsis "SubRip to WebVTT subtitle converter")
1127 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1128 for use with HTML5 video.")
1129 (home-page "http://dthompson.us/pages/software/srt2vtt")
1130 (license license:gpl3+)))
1131
1132 (define-public avidemux
1133 (package
1134 (name "avidemux")
1135 (version "2.6.12")
1136 (source (origin
1137 (method url-fetch)
1138 (uri (string-append
1139 "mirror://sourceforge/" name "/" name "/" version "/"
1140 name "_" version ".tar.gz"))
1141 (sha256
1142 (base32
1143 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1144 (patches (search-patches "avidemux-install-to-lib.patch"))))
1145 (build-system cmake-build-system)
1146 (native-inputs
1147 `(("pkg-config" ,pkg-config)))
1148 ;; FIXME: Once packaged, add libraries not found during the build.
1149 (inputs
1150 `(("alsa-lib" ,alsa-lib)
1151 ("fontconfig" ,fontconfig)
1152 ("freetype" ,freetype)
1153 ("fribidi" ,fribidi)
1154 ("glu" ,glu)
1155 ("jack" ,jack-1)
1156 ("lame" ,lame)
1157 ("libva" ,libva)
1158 ("libvdpau" ,libvdpau)
1159 ("libvorbis" ,libvorbis)
1160 ("libvpx" ,libvpx)
1161 ("libxv" ,libxv)
1162 ("perl" ,perl)
1163 ("pulseaudio" ,pulseaudio)
1164 ("python" ,python-wrapper)
1165 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1166 ;("qtbase" ,qtbase) with -std=gnu++11.
1167 ;("qttools" ,qttools)
1168 ("sdl" ,sdl)
1169 ("sqlite" ,sqlite)
1170 ("yasm" ,yasm)
1171 ("zlib" ,zlib)))
1172 (arguments
1173 `(#:tests? #f ; no check target
1174 #:phases
1175 ;; Make sure files inside the included ffmpeg tarball are
1176 ;; patch-shebanged.
1177 (modify-phases %standard-phases
1178 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1179 (lambda _
1180 (with-directory-excursion "avidemux_core/ffmpeg_package"
1181 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1182 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1183 (add-after 'patch-source-shebangs 'repack-ffmpeg
1184 (lambda _
1185 (with-directory-excursion "avidemux_core/ffmpeg_package"
1186 (substitute* "ffmpeg-2.7.6/configure"
1187 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1188 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1189 ;; avoid non-determinism in the archive
1190 "--sort=name" "--mtime=@0"
1191 "--owner=root:0" "--group=root:0")
1192 (delete-file-recursively "ffmpeg-2.7.6"))))
1193 (replace 'configure
1194 (lambda _
1195 ;; Copy-paste settings from the cmake build system.
1196 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1197 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1198 (replace 'build
1199 (lambda* (#:key inputs outputs #:allow-other-keys)
1200 (let*
1201 ((out (assoc-ref outputs "out"))
1202 (lib (string-append out "/lib"))
1203 (top (getcwd))
1204 (sdl (assoc-ref inputs "sdl"))
1205 (build_component
1206 (lambda* (component srcdir #:optional (args '()))
1207 (let ((builddir (string-append "build_" component)))
1208 (mkdir builddir)
1209 (with-directory-excursion builddir
1210 (zero?
1211 (and
1212 (apply system* "cmake"
1213 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1214 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1215 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1216 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1217 "\"-Wl,-rpath=" lib "\"")
1218 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1219 (string-append "-DSDL_INCLUDE_DIR="
1220 sdl "/include/SDL")
1221 (string-append "../" srcdir)
1222 "-DENABLE_QT5=True"
1223 args)
1224 (system* "make" "-j"
1225 (number->string (parallel-job-count)))
1226 (system* "make" "install"))))))))
1227 (mkdir out)
1228 (and (build_component "core" "avidemux_core")
1229 (build_component "cli" "avidemux/cli")
1230 (build_component "qt4" "avidemux/qt4")
1231 (build_component "plugins_common" "avidemux_plugins"
1232 '("-DPLUGIN_UI=COMMON"))
1233 (build_component "plugins_cli" "avidemux_plugins"
1234 '("-DPLUGIN_UI=CLI"))
1235 (build_component "plugins_qt4" "avidemux_plugins"
1236 '("-DPLUGIN_UI=QT4"))
1237 (build_component "plugins_settings" "avidemux_plugins"
1238 '("-DPLUGIN_UI=SETTINGS")))
1239 ;; Remove .exe and .dll file.
1240 (delete-file-recursively
1241 (string-append out "/share/ADM6_addons")))))
1242 (delete 'install))))
1243 (home-page "http://fixounet.free.fr/avidemux/")
1244 (synopsis "Video editor")
1245 (description "Avidemux is a video editor designed for simple cutting,
1246 filtering and encoding tasks. It supports many file types, including AVI,
1247 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1248 can be automated using projects, job queue and powerful scripting
1249 capabilities.")
1250 ;; Software with various licenses is included, see License.txt.
1251 (license license:gpl2+)))
1252
1253 (define-public vapoursynth
1254 (package
1255 (name "vapoursynth")
1256 (version "34")
1257 (source (origin
1258 (method url-fetch)
1259 (uri (string-append
1260 "https://github.com/vapoursynth/vapoursynth/archive/R"
1261 version ".tar.gz"))
1262 (file-name (string-append name "-" version))
1263 (sha256
1264 (base32
1265 "0rfldphg4gy3sdfffi5yzklqz93vsj2j6nny8snjbavnf161blyi"))))
1266 (build-system gnu-build-system)
1267 (native-inputs
1268 `(("autoconf" ,autoconf)
1269 ("automake" ,automake)
1270 ("cython" ,python-cython)
1271 ("libtool" ,libtool)
1272 ("pkg-config" ,pkg-config)
1273 ("python" ,python)
1274 ("yasm" ,yasm)))
1275 (inputs
1276 `(("ffmpeg" ,ffmpeg)
1277 ("libass" ,libass)
1278 ("tesseract-ocr" ,tesseract-ocr)
1279 ("zimg" ,zimg)))
1280 (arguments
1281 '(#:phases
1282 (modify-phases %standard-phases
1283 (add-after
1284 'unpack 'autogen
1285 (lambda _
1286 (zero? (system* "sh" "autogen.sh")))))))
1287 (home-page "http://www.vapoursynth.com/")
1288 (synopsis "Video processing framework")
1289 (description "VapourSynth is a C++ library and Python module for video
1290 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1291 multithreading, generalized colorspaces, per frame properties, and videos with
1292 format changes.")
1293 ;; src/core/cpufeatures only allows x86, ARM or PPC
1294 (supported-systems (delete "mips64el-linux" %supported-systems))
1295 ;; As seen from the source files.
1296 (license license:lgpl2.1+)))
1297
1298 (define-public xvid
1299 (package
1300 (name "xvid")
1301 (version "1.3.4")
1302 (source (origin
1303 (method url-fetch)
1304 (uri (string-append
1305 "http://downloads.xvid.org/downloads/xvidcore-"
1306 version ".tar.bz2"))
1307 (sha256
1308 (base32
1309 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1310 (build-system gnu-build-system)
1311 (native-inputs `(("yasm" ,yasm)))
1312 (arguments
1313 '(#:phases
1314 (modify-phases %standard-phases
1315 (add-before
1316 'configure 'pre-configure
1317 (lambda _
1318 (chdir "build/generic")
1319 (substitute* "configure"
1320 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1321 ;; No 'check' target.
1322 #:tests? #f))
1323 (home-page "https://www.xvid.com/")
1324 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1325 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1326 codec library. It uses ASP features such as b-frames, global and quarter
1327 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1328 and custom quantization matrices.")
1329 (license license:gpl2+)))
1330
1331 (define-public livestreamer
1332 (package
1333 (name "livestreamer")
1334 (version "1.12.2")
1335 (source (origin
1336 (method url-fetch)
1337 (uri (string-append
1338 "https://github.com/chrippa/livestreamer/archive/v"
1339 version ".tar.gz"))
1340 (file-name (string-append "livestreamer-" version ".tar.gz"))
1341 (sha256
1342 (base32
1343 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1344 (build-system python-build-system)
1345 (arguments
1346 '(#:tests? #f)) ; tests rely on external web servers
1347 (propagated-inputs
1348 `(("python-requests" ,python-requests)))
1349 (synopsis "Internet video stream viewer")
1350 (description "Livestreamer is a command-line utility that extracts streams
1351 from various services and pipes them into a video playing application.")
1352 (home-page "http://livestreamer.io/")
1353 (license license:bsd-2)))
1354
1355 (define-public mlt
1356 (package
1357 (name "mlt")
1358 (version "6.2.0")
1359 (source (origin
1360 (method url-fetch)
1361 (uri (string-append "https://github.com/mltframework/mlt/"
1362 "archive/v" version ".tar.gz"))
1363 (file-name (string-append name "-" version ".tar.gz"))
1364 (sha256
1365 (base32
1366 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
1367 (build-system gnu-build-system)
1368 (arguments
1369 `(#:tests? #f ; no tests
1370 #:make-flags '("CC=gcc")
1371 #:configure-flags
1372 (list "--enable-gpl3"
1373 "--enable-gpl")
1374 #:phases
1375 (modify-phases %standard-phases
1376 (add-after
1377 'configure 'override-LDFLAGS
1378 (lambda* (#:key outputs #:allow-other-keys)
1379 (substitute* "config.mak"
1380 (("LDFLAGS\\+=")
1381 (string-append "LDFLAGS+=-Wl,-rpath="
1382 (assoc-ref outputs "out")
1383 "/lib ")))
1384 #t)))))
1385 (inputs
1386 `(("alsa-lib" ,alsa-lib)
1387 ("fftw" ,fftw)
1388 ("libxml2" ,libxml2)
1389 ("jack" ,jack-1)
1390 ("ladspa" ,ladspa)
1391 ("libsamplerate" ,libsamplerate)
1392 ("pulseaudio" ,pulseaudio)
1393 ("sdl" ,sdl)
1394 ("sox" ,sox)))
1395 (native-inputs
1396 `(("pkg-config" ,pkg-config)))
1397 (home-page "https://www.mltframework.org/")
1398 (synopsis "Author, manage, and run multitrack audio/video compositions")
1399 (description
1400 "MLT is a multimedia framework, designed and developed for television
1401 broadcasting. It provides a toolkit for broadcasters, video editors, media
1402 players, transcoders, web streamers and many more types of applications. The
1403 functionality of the system is provided via an assortment of ready to use
1404 tools, XML authoring components, and an extensible plug-in based API.")
1405 (license license:lgpl2.1+)))
1406
1407 (define-public v4l-utils
1408 (package
1409 (name "v4l-utils")
1410 (version "1.10.1")
1411 (source (origin
1412 (method url-fetch)
1413 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1414 "/v4l-utils-" version ".tar.bz2"))
1415 (sha256
1416 (base32
1417 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
1418 (build-system gnu-build-system)
1419 (arguments
1420 '(#:configure-flags
1421 (list (string-append "--with-udevdir="
1422 (assoc-ref %outputs "out")
1423 "/lib/udev")
1424 "CXXFLAGS=-std=gnu++11")))
1425 (native-inputs
1426 `(("pkg-config" ,pkg-config)))
1427 (inputs
1428 `(("alsa-lib" ,alsa-lib)
1429 ("glu" ,glu)
1430 ("libjpeg" ,libjpeg)
1431 ("libx11" ,libx11)
1432 ("qtbase" ,qtbase)
1433 ("eudev" ,eudev)))
1434 (synopsis "Realtime video capture utilities for Linux")
1435 (description "The v4l-utils provide a series of libraries and utilities to
1436 be used for realtime video capture via Linux-specific APIs.")
1437 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1438 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1439 (license (list license:lgpl2.1+ license:gpl2))))
1440
1441 (define-public obs
1442 (package
1443 (name "obs")
1444 (version "0.16.2")
1445 (source (origin
1446 (method url-fetch)
1447 (uri (string-append "https://github.com/jp9000/obs-studio"
1448 "/archive/" version ".tar.gz"))
1449 (file-name (string-append name "-" version ".tar.gz"))
1450 (sha256
1451 (base32
1452 "0p2grxyaf79hb3nlja23xp7b2vc1w18llvzcyhnjn2lhwfjabcgm"))))
1453 (build-system cmake-build-system)
1454 (arguments
1455 `(#:tests? #f ; no tests
1456 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1457 (%current-system)))
1458 '("arm" "mips"))
1459 '(#:phases
1460 (modify-phases %standard-phases
1461 (add-after 'unpack 'remove-architecture-specific-instructions
1462 ;; non-Intel platforms fail to build with the architecture
1463 ;; specific compiler flags included by default.
1464 (lambda _
1465 (substitute* "libobs/CMakeLists.txt"
1466 (("if\\(NOT MSVC\\)") "if(MSVC)"))
1467 #t))))
1468 '())))
1469 (native-inputs
1470 `(("pkg-config" ,pkg-config)))
1471 (inputs
1472 `(("curl" ,curl)
1473 ("eudev" ,eudev)
1474 ("ffmpeg" ,ffmpeg)
1475 ("freetype" ,freetype)
1476 ("jack" ,jack-1)
1477 ("jansson" ,jansson)
1478 ("libx264" ,libx264)
1479 ("libxcomposite" ,libxcomposite)
1480 ("mesa" ,mesa)
1481 ("pulseaudio" ,pulseaudio)
1482 ("qtbase" ,qtbase)
1483 ("qtx11extras" ,qtx11extras)
1484 ("v4l-utils" ,v4l-utils)
1485 ("zlib" ,zlib)))
1486 (synopsis "Live streaming software")
1487 (description "Open Broadcaster Software provides a graphical interface for
1488 video recording and live streaming. OBS supports capturing audio and video
1489 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1490 and JACK.")
1491 (home-page "https://obsproject.com")
1492 (license license:gpl2+)))
1493
1494 (define-public libvdpau
1495 (package
1496 (name "libvdpau")
1497 (version "1.1.1")
1498 (source
1499 (origin
1500 (method url-fetch)
1501 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1502 name "-" version ".tar.bz2"))
1503 (sha256
1504 (base32
1505 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1506 (build-system gnu-build-system)
1507 (native-inputs
1508 `(("pkg-config" ,pkg-config)))
1509 (inputs
1510 `(("dri2proto" ,dri2proto)
1511 ("libx11" ,libx11 "out")
1512 ("libxext" ,libxext)))
1513 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1514 (synopsis "Video Decode and Presentation API")
1515 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1516 provides an interface to video decode acceleration and presentation hardware
1517 present in modern GPUs.")
1518 (license (license:x11-style "file://COPYING"))))
1519
1520 (define-public vdpauinfo
1521 (package
1522 (name "vdpauinfo")
1523 (version "1.0")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1528 name "-" version ".tar.gz"))
1529 (sha256
1530 (base32
1531 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1532 (build-system gnu-build-system)
1533 (native-inputs
1534 `(("pkg-config" ,pkg-config)
1535 ("libx11" ,libx11)))
1536 (propagated-inputs
1537 `(("libvdpau" ,libvdpau)))
1538 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1539 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1540 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1541 implementation.")
1542 (license (license:x11-style "file://COPYING"))))
1543
1544 (define-public recordmydesktop
1545 (package
1546 (name "recordmydesktop")
1547 (version "0.3.8.1")
1548 (source (origin
1549 (method url-fetch)
1550 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1551 version "/recordmydesktop-" version ".tar.gz"))
1552 (sha256
1553 (base32
1554 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1555 (build-system gnu-build-system)
1556 (inputs `(("popt" ,popt)
1557 ("zlib" ,zlib)
1558 ("libx11" ,libx11)
1559 ("libice" ,libice)
1560 ("libsm" ,libsm)
1561 ("libxfixes" ,libxfixes)
1562 ("libxdamage" ,libxdamage)
1563 ("libxext" ,libxext)
1564 ("alsa-lib" ,alsa-lib)
1565 ("libvorbis" ,libvorbis)
1566 ("libtheora" ,libtheora)))
1567 (home-page "http://recordmydesktop.sourceforge.net/")
1568 (synopsis "Desktop session video recorder")
1569 (description
1570 "recordMyDesktop is a command-line tool that captures the activity in
1571 your graphical desktop and encodes it as a video. This is a useful tool for
1572 making @dfn{screencasts}.")
1573 (license license:gpl2+)))
1574
1575 (define-public libsmpeg
1576 (package
1577 (name "libsmpeg")
1578 (version "0.4.5")
1579 (source (origin
1580 (method svn-fetch)
1581 (uri (svn-reference
1582 (url "svn://svn.icculus.org/smpeg/trunk/")
1583 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1584 (sha256
1585 (base32
1586 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1587 (build-system gnu-build-system)
1588 (arguments
1589 `(#:phases (modify-phases %standard-phases
1590 (add-after 'unpack 'autogen.sh
1591 (lambda _
1592 (zero? (system* "sh" "autogen.sh")))))))
1593 (native-inputs
1594 `(("autoconf" ,autoconf)
1595 ("automake" ,automake)))
1596 (inputs
1597 `(("sdl" ,sdl2)))
1598 (home-page "http://icculus.org/smpeg/")
1599 (synopsis "SDL MPEG decoding library")
1600 (description
1601 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1602 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1603 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1604 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1605 and MPEG system streams.")
1606 (license (list license:expat
1607 license:lgpl2.1
1608 license:lgpl2.1+
1609 license:gpl2))))
1610
1611 (define-public libbdplus
1612 (package
1613 (name "libbdplus")
1614 (version "0.1.2")
1615 (source
1616 (origin
1617 (method url-fetch)
1618 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1619 version "/" name "-" version ".tar.bz2"))
1620 (sha256
1621 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1622 (inputs
1623 `(("libgcrypt" ,libgcrypt)))
1624 (build-system gnu-build-system)
1625 (home-page "http://www.videolan.org/developers/libbdplus.html")
1626 (synopsis "Library for decrypting certain Blu-Ray discs")
1627 (description "libbdplus is a library which implements the BD+ System
1628 specifications.")
1629 (license license:lgpl2.1+)))
1630
1631 (define-public libaacs
1632 (package
1633 (name "libaacs")
1634 (version "0.8.1")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1639 version "/" name "-" version ".tar.bz2"))
1640 (sha256
1641 (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm"))))
1642 (inputs
1643 `(("libgcrypt" ,libgcrypt)))
1644 (native-inputs
1645 `(("bison" ,bison)
1646 ("flex" ,flex)))
1647 (build-system gnu-build-system)
1648 (home-page "http://www.videolan.org/developers/libaacs.html")
1649 (synopsis "Library for decrypting certain Blu-Ray discs")
1650 (description "libaacs is a library which implements the Advanced Access
1651 Content System specification.")
1652 (license license:lgpl2.1+)))