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