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