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