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