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