gnu: mpv: Disable build date.
[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.3")
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 "1ifwjh68zw0mwq9swmfjqk2ck84gysi0w8hrkw2yddqhr8m51kjl"))))
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 "sh"))))
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 "sh"))))
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"
895 "--enable-zsh-comp"
896 "--disable-build-date")
897 ;; No check function defined.
898 #:tests? #f))
899 (home-page "https://mpv.io/")
900 (synopsis "Audio and video player")
901 (description "mpv is a general-purpose audio and video player. It is a
902 fork of mplayer2 and MPlayer. It shares some features with the former
903 projects while introducing many more.")
904 (license license:gpl2+)))
905
906 (define-public gnome-mpv
907 (package
908 (name "gnome-mpv")
909 (version "0.11")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
914 "/download/v" version "/gnome-mpv-" version
915 ".tar.xz"))
916 (sha256
917 (base32
918 "1hn3mpsxbrwf2m0nz4vzji4i6i896y8kqjb9kijqpk04cnrs3fgz"))))
919 (native-inputs
920 `(("intltool" ,intltool)
921 ("pkg-config" ,pkg-config)))
922 (inputs
923 `(("gtk+" ,gtk+)
924 ("libepoxy" ,libepoxy)
925 ("mpv" ,mpv)))
926 (build-system glib-or-gtk-build-system)
927 (home-page "https://github.com/gnome-mpv/gnome-mpv")
928 (synopsis "GTK+ frontend for the mpv media player")
929 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
930 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
931 access to mpv's powerful playback capabilities.")
932 (license license:gpl3+)))
933
934 (define-public libvpx
935 (package
936 (name "libvpx")
937 (version "1.6.0")
938 (source (origin
939 (method url-fetch)
940 (uri (string-append "http://storage.googleapis.com/"
941 "downloads.webmproject.org/releases/webm/"
942 name "-" version ".tar.bz2"))
943 (sha256
944 (base32
945 "1basd6dda5di9p7jhc0f4f52wzm9c3hsravqspw6ibpcn5gbpbyh"))
946 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
947 (build-system gnu-build-system)
948 (arguments
949 `(#:phases
950 (modify-phases %standard-phases
951 (replace 'configure
952 (lambda* (#:key outputs #:allow-other-keys)
953 (setenv "CONFIG_SHELL" (which "bash"))
954 (let ((out (assoc-ref outputs "out")))
955 (setenv "LDFLAGS"
956 (string-append "-Wl,-rpath=" out "/lib"))
957 (zero? (system* "./configure"
958 "--enable-shared"
959 "--as=yasm"
960 ;; Limit size to avoid CVE-2015-1258
961 "--size-limit=16384x16384"
962 (string-append "--prefix=" out)))))))
963 #:tests? #f)) ; no check target
964 (native-inputs
965 `(("perl" ,perl)
966 ("yasm" ,yasm)))
967 (synopsis "VP8/VP9 video codec")
968 (description "libvpx is a codec for the VP8/VP9 video compression format.")
969 (license license:bsd-3)
970 (home-page "http://www.webmproject.org/")))
971
972 (define-public youtube-dl
973 (package
974 (name "youtube-dl")
975 (version "2017.02.07")
976 (source (origin
977 (method url-fetch)
978 (uri (string-append "https://yt-dl.org/downloads/"
979 version "/youtube-dl-"
980 version ".tar.gz"))
981 (sha256
982 (base32
983 "1grq3aqa1zc0xdq1y6vqnk0y0vcd1j2jjn85696hw98mi0w1am73"))))
984 (build-system python-build-system)
985 (arguments
986 ;; The problem here is that the directory for the man page and completion
987 ;; files is relative, and for some reason, setup.py uses the
988 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
989 ;; So, we need pass the prefix directly. In addition, make sure the Bash
990 ;; completion file is called 'youtube-dl' rather than
991 ;; 'youtube-dl.bash-completion'.
992 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
993 #:phases (modify-phases %standard-phases
994 (add-before 'install 'fix-the-data-directories
995 (lambda* (#:key outputs #:allow-other-keys)
996 (let ((prefix (assoc-ref outputs "out")))
997 (mkdir "bash-completion")
998 (rename-file "youtube-dl.bash-completion"
999 "bash-completion/youtube-dl")
1000 (substitute* "setup.py"
1001 (("youtube-dl\\.bash-completion")
1002 "bash-completion/youtube-dl")
1003 (("'etc/")
1004 (string-append "'" prefix "/etc/"))
1005 (("'share/")
1006 (string-append "'" prefix "/share/")))))))))
1007 (synopsis "Download videos from YouTube.com and other sites")
1008 (description
1009 "Youtube-dl is a small command-line program to download videos from
1010 YouTube.com and a few more sites.")
1011 (home-page "https://yt-dl.org")
1012 (license license:public-domain)))
1013
1014 (define-public libbluray
1015 (package
1016 (name "libbluray")
1017 (version "0.9.3")
1018 (source (origin
1019 (method url-fetch)
1020 (uri (string-append "https://download.videolan.org/videolan/"
1021 name "/" version "/"
1022 name "-" version ".tar.bz2"))
1023 (sha256
1024 (base32
1025 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
1026 (build-system gnu-build-system)
1027 (arguments
1028 `(#:configure-flags '("--disable-bdjava")
1029 #:phases
1030 (modify-phases %standard-phases
1031 (add-before 'build 'fix-dlopen-paths
1032 (lambda* (#:key inputs #:allow-other-keys)
1033 (let ((libaacs (assoc-ref inputs "libaacs"))
1034 (libbdplus (assoc-ref inputs "libbdplus")))
1035 (substitute* "src/libbluray/disc/aacs.c"
1036 (("\"libaacs\"")
1037 (string-append "\"" libaacs "/lib/libaacs\"")))
1038 (substitute* "src/libbluray/disc/bdplus.c"
1039 (("\"libbdplus\"")
1040 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1041 #t))))))
1042 (native-inputs `(("pkg-config" ,pkg-config)))
1043 (inputs
1044 `(("fontconfig" ,fontconfig)
1045 ("freetype" ,freetype)
1046 ("libaacs" ,libaacs)
1047 ("libbdplus" ,libbdplus)
1048 ("libxml2" ,libxml2)))
1049 (home-page "https://www.videolan.org/developers/libbluray.html")
1050 (synopsis "Blu-Ray Disc playback library")
1051 (description
1052 "libbluray is a library designed for Blu-Ray Disc playback for media
1053 players, like VLC or MPlayer.")
1054 (license license:lgpl2.1+)))
1055
1056 (define-public libdvdread
1057 (package
1058 (name "libdvdread")
1059 (version "5.0.3")
1060 (source (origin
1061 (method url-fetch)
1062 (uri (string-append "http://download.videolan.org/videolan/"
1063 name "/" version "/"
1064 name "-" version ".tar.bz2"))
1065 (sha256
1066 (base32
1067 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1068 (build-system gnu-build-system)
1069 (home-page "http://dvdnav.mplayerhq.hu/")
1070 (synopsis "Library for reading video DVDs")
1071 (description
1072 "Libdvdread provides a simple foundation for reading DVD video
1073 disks. It provides the functionality that is required to access many
1074 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1075 authentication and descrambling (if an external libdvdcss library is
1076 installed).")
1077 (license license:gpl2+)))
1078
1079 (define-public libdvdnav
1080 (package
1081 (name "libdvdnav")
1082 (version "5.0.3")
1083 (source (origin
1084 (method url-fetch)
1085 (uri (string-append "http://download.videolan.org/videolan/"
1086 name "/" version "/"
1087 name "-" version ".tar.bz2"))
1088 (sha256
1089 (base32
1090 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1091 (build-system gnu-build-system)
1092 (native-inputs
1093 `(("pkg-config" ,pkg-config)))
1094 (inputs
1095 `(("libdvdread" ,libdvdread)))
1096 (home-page "http://dvdnav.mplayerhq.hu/")
1097 (synopsis "Library for video DVD navigation features")
1098 (description
1099 "Libdvdnav is a library for developers of multimedia
1100 applications. It allows easy use of sophisticated DVD navigation features
1101 such as DVD menus, multiangle playback and even interactive DVD games. All
1102 this functionality is provided through a simple API which provides the DVD
1103 playback as a single logical stream of blocks, intermitted by special
1104 dvdnav events to report certain conditions. The main usage of libdvdnav is
1105 a loop regularly calling a function to get the next block, surrounded by
1106 additional calls to tell the library of user interaction. The whole
1107 DVD virtual machine and internal playback states are completely
1108 encapsulated.")
1109 (license license:gpl2+)))
1110
1111 (define-public libdvdnav-4
1112 (package
1113 (inherit libdvdnav)
1114 (version "4.2.1")
1115 (source (origin
1116 (method url-fetch)
1117 (uri
1118 (string-append
1119 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1120 version ".tar.xz"))
1121 (sha256
1122 (base32
1123 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1124 (native-inputs
1125 `(("pkg-config" ,pkg-config)
1126 ("autoconf" ,autoconf)
1127 ("automake" ,automake)
1128 ("libtool" ,libtool)))
1129 (arguments
1130 '(#:phases
1131 (alist-cons-after
1132 'unpack 'autoreconf
1133 (lambda _
1134 (zero? (system* "autoreconf" "-vif")))
1135 %standard-phases)))))
1136
1137 (define-public libdvdcss
1138 (package
1139 (name "libdvdcss")
1140 (version "1.4.0")
1141 (source (origin
1142 (method url-fetch)
1143 (uri (string-append "http://download.videolan.org/pub/"
1144 name "/" version "/"
1145 name "-" version ".tar.bz2"))
1146 (sha256
1147 (base32
1148 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1149 (build-system gnu-build-system)
1150 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1151 (synopsis "Library for accessing DVDs as block devices")
1152 (description
1153 "libdvdcss is a simple library designed for accessing DVDs like a block
1154 device without having to bother about the decryption.")
1155 (license license:gpl2+)))
1156
1157 (define-public srt2vtt
1158 (package
1159 (name "srt2vtt")
1160 (version "0.1")
1161 (source (origin
1162 (method url-fetch)
1163 (uri (string-append
1164 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1165 version ".tar.gz"))
1166 (sha256
1167 (base32
1168 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1169 (build-system gnu-build-system)
1170 (inputs
1171 `(("guile" ,guile-2.0)))
1172 (synopsis "SubRip to WebVTT subtitle converter")
1173 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1174 for use with HTML5 video.")
1175 (home-page "http://dthompson.us/pages/software/srt2vtt")
1176 (license license:gpl3+)))
1177
1178 (define-public avidemux
1179 (package
1180 (name "avidemux")
1181 (version "2.6.12")
1182 (source (origin
1183 (method url-fetch)
1184 (uri (string-append
1185 "mirror://sourceforge/" name "/" name "/" version "/"
1186 name "_" version ".tar.gz"))
1187 (sha256
1188 (base32
1189 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1190 (patches (search-patches "avidemux-install-to-lib.patch"))))
1191 (build-system cmake-build-system)
1192 (native-inputs
1193 `(("pkg-config" ,pkg-config)))
1194 ;; FIXME: Once packaged, add libraries not found during the build.
1195 (inputs
1196 `(("alsa-lib" ,alsa-lib)
1197 ("fontconfig" ,fontconfig)
1198 ("freetype" ,freetype)
1199 ("fribidi" ,fribidi)
1200 ("glu" ,glu)
1201 ("jack" ,jack-1)
1202 ("lame" ,lame)
1203 ("libva" ,libva)
1204 ("libvdpau" ,libvdpau)
1205 ("libvorbis" ,libvorbis)
1206 ("libvpx" ,libvpx)
1207 ("libxv" ,libxv)
1208 ("perl" ,perl)
1209 ("pulseaudio" ,pulseaudio)
1210 ("python" ,python-wrapper)
1211 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1212 ;("qtbase" ,qtbase) with -std=gnu++11.
1213 ;("qttools" ,qttools)
1214 ("sdl" ,sdl)
1215 ("sqlite" ,sqlite)
1216 ("yasm" ,yasm)
1217 ("zlib" ,zlib)))
1218 (arguments
1219 `(#:tests? #f ; no check target
1220 #:phases
1221 ;; Make sure files inside the included ffmpeg tarball are
1222 ;; patch-shebanged.
1223 (modify-phases %standard-phases
1224 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1225 (lambda _
1226 (with-directory-excursion "avidemux_core/ffmpeg_package"
1227 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1228 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1229 (add-after 'patch-source-shebangs 'repack-ffmpeg
1230 (lambda _
1231 (with-directory-excursion "avidemux_core/ffmpeg_package"
1232 (substitute* "ffmpeg-2.7.6/configure"
1233 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1234 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1235 ;; avoid non-determinism in the archive
1236 "--sort=name" "--mtime=@0"
1237 "--owner=root:0" "--group=root:0")
1238 (delete-file-recursively "ffmpeg-2.7.6"))))
1239 (replace 'configure
1240 (lambda _
1241 ;; Copy-paste settings from the cmake build system.
1242 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1243 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1244 (replace 'build
1245 (lambda* (#:key inputs outputs #:allow-other-keys)
1246 (let*
1247 ((out (assoc-ref outputs "out"))
1248 (lib (string-append out "/lib"))
1249 (top (getcwd))
1250 (sdl (assoc-ref inputs "sdl"))
1251 (build_component
1252 (lambda* (component srcdir #:optional (args '()))
1253 (let ((builddir (string-append "build_" component)))
1254 (mkdir builddir)
1255 (with-directory-excursion builddir
1256 (zero?
1257 (and
1258 (apply system* "cmake"
1259 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1260 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1261 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1262 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1263 "\"-Wl,-rpath=" lib "\"")
1264 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1265 (string-append "-DSDL_INCLUDE_DIR="
1266 sdl "/include/SDL")
1267 (string-append "../" srcdir)
1268 "-DENABLE_QT5=True"
1269 args)
1270 (system* "make" "-j"
1271 (number->string (parallel-job-count)))
1272 (system* "make" "install"))))))))
1273 (mkdir out)
1274 (and (build_component "core" "avidemux_core")
1275 (build_component "cli" "avidemux/cli")
1276 (build_component "qt4" "avidemux/qt4")
1277 (build_component "plugins_common" "avidemux_plugins"
1278 '("-DPLUGIN_UI=COMMON"))
1279 (build_component "plugins_cli" "avidemux_plugins"
1280 '("-DPLUGIN_UI=CLI"))
1281 (build_component "plugins_qt4" "avidemux_plugins"
1282 '("-DPLUGIN_UI=QT4"))
1283 (build_component "plugins_settings" "avidemux_plugins"
1284 '("-DPLUGIN_UI=SETTINGS")))
1285 ;; Remove .exe and .dll file.
1286 (delete-file-recursively
1287 (string-append out "/share/ADM6_addons")))))
1288 (delete 'install))))
1289 (home-page "http://fixounet.free.fr/avidemux/")
1290 (synopsis "Video editor")
1291 (description "Avidemux is a video editor designed for simple cutting,
1292 filtering and encoding tasks. It supports many file types, including AVI,
1293 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1294 can be automated using projects, job queue and powerful scripting
1295 capabilities.")
1296 ;; Software with various licenses is included, see License.txt.
1297 (license license:gpl2+)))
1298
1299 (define-public vapoursynth
1300 (package
1301 (name "vapoursynth")
1302 (version "35")
1303 (source (origin
1304 (method url-fetch)
1305 (uri (string-append
1306 "https://github.com/vapoursynth/vapoursynth/archive/R"
1307 version ".tar.gz"))
1308 (file-name (string-append name "-" version ".tar.gz"))
1309 (sha256
1310 (base32
1311 "0629ys2lf618n9cc644xlvx0vx52v2fp3sx14p4mx5rg9nlasb3n"))))
1312 (build-system gnu-build-system)
1313 (native-inputs
1314 `(("autoconf" ,autoconf)
1315 ("automake" ,automake)
1316 ("cython" ,python-cython)
1317 ("libtool" ,libtool)
1318 ("pkg-config" ,pkg-config)
1319 ("python" ,python)
1320 ("yasm" ,yasm)))
1321 (inputs
1322 `(("ffmpeg" ,ffmpeg)
1323 ("libass" ,libass)
1324 ("tesseract-ocr" ,tesseract-ocr)
1325 ("zimg" ,zimg)))
1326 (arguments
1327 '(#:phases
1328 (modify-phases %standard-phases
1329 (add-after
1330 'unpack 'autogen
1331 (lambda _
1332 (zero? (system* "sh" "autogen.sh")))))))
1333 (home-page "http://www.vapoursynth.com/")
1334 (synopsis "Video processing framework")
1335 (description "VapourSynth is a C++ library and Python module for video
1336 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1337 multithreading, generalized colorspaces, per frame properties, and videos with
1338 format changes.")
1339 ;; src/core/cpufeatures only allows x86, ARM or PPC
1340 (supported-systems (delete "mips64el-linux" %supported-systems))
1341 ;; As seen from the source files.
1342 (license license:lgpl2.1+)))
1343
1344 (define-public xvid
1345 (package
1346 (name "xvid")
1347 (version "1.3.4")
1348 (source (origin
1349 (method url-fetch)
1350 (uri (string-append
1351 "http://downloads.xvid.org/downloads/xvidcore-"
1352 version ".tar.bz2"))
1353 (sha256
1354 (base32
1355 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1356 (build-system gnu-build-system)
1357 (native-inputs `(("yasm" ,yasm)))
1358 (arguments
1359 '(#:phases
1360 (modify-phases %standard-phases
1361 (add-before
1362 'configure 'pre-configure
1363 (lambda _
1364 (chdir "build/generic")
1365 (substitute* "configure"
1366 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1367 ;; No 'check' target.
1368 #:tests? #f))
1369 (home-page "https://www.xvid.com/")
1370 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1371 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1372 codec library. It uses ASP features such as b-frames, global and quarter
1373 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1374 and custom quantization matrices.")
1375 (license license:gpl2+)))
1376
1377 (define-public livestreamer
1378 (package
1379 (name "livestreamer")
1380 (version "1.12.2")
1381 (source (origin
1382 (method url-fetch)
1383 (uri (string-append
1384 "https://github.com/chrippa/livestreamer/archive/v"
1385 version ".tar.gz"))
1386 (file-name (string-append "livestreamer-" version ".tar.gz"))
1387 (sha256
1388 (base32
1389 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1390 (build-system python-build-system)
1391 (arguments
1392 '(#:tests? #f)) ; tests rely on external web servers
1393 (propagated-inputs
1394 `(("python-requests" ,python-requests)))
1395 (synopsis "Internet video stream viewer")
1396 (description "Livestreamer is a command-line utility that extracts streams
1397 from various services and pipes them into a video playing application.")
1398 (home-page "http://livestreamer.io/")
1399 (license license:bsd-2)))
1400
1401 (define-public mlt
1402 (package
1403 (name "mlt")
1404 (version "6.4.1")
1405 (source (origin
1406 (method url-fetch)
1407 (uri (string-append "https://github.com/mltframework/mlt/"
1408 "archive/v" version ".tar.gz"))
1409 (file-name (string-append name "-" version ".tar.gz"))
1410 (sha256
1411 (base32
1412 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1413 (build-system gnu-build-system)
1414 (arguments
1415 `(#:tests? #f ; no tests
1416 #:make-flags '("CC=gcc")
1417 #:configure-flags
1418 (list "--enable-gpl3"
1419 "--enable-gpl")
1420 #:phases
1421 (modify-phases %standard-phases
1422 (add-after
1423 'configure 'override-LDFLAGS
1424 (lambda* (#:key outputs #:allow-other-keys)
1425 (substitute* "config.mak"
1426 (("LDFLAGS\\+=")
1427 (string-append "LDFLAGS+=-Wl,-rpath="
1428 (assoc-ref outputs "out")
1429 "/lib ")))
1430 #t)))))
1431 (inputs
1432 `(("alsa-lib" ,alsa-lib)
1433 ("fftw" ,fftw)
1434 ("libxml2" ,libxml2)
1435 ("jack" ,jack-1)
1436 ("ladspa" ,ladspa)
1437 ("libsamplerate" ,libsamplerate)
1438 ("pulseaudio" ,pulseaudio)
1439 ("sdl" ,sdl)
1440 ("sox" ,sox)))
1441 (native-inputs
1442 `(("pkg-config" ,pkg-config)))
1443 (home-page "https://www.mltframework.org/")
1444 (synopsis "Author, manage, and run multitrack audio/video compositions")
1445 (description
1446 "MLT is a multimedia framework, designed and developed for television
1447 broadcasting. It provides a toolkit for broadcasters, video editors, media
1448 players, transcoders, web streamers and many more types of applications. The
1449 functionality of the system is provided via an assortment of ready to use
1450 tools, XML authoring components, and an extensible plug-in based API.")
1451 (license license:lgpl2.1+)))
1452
1453 (define-public v4l-utils
1454 (package
1455 (name "v4l-utils")
1456 (version "1.10.1")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1460 "/v4l-utils-" version ".tar.bz2"))
1461 (sha256
1462 (base32
1463 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
1464 (build-system gnu-build-system)
1465 (arguments
1466 '(#:configure-flags
1467 (list (string-append "--with-udevdir="
1468 (assoc-ref %outputs "out")
1469 "/lib/udev")
1470 "CXXFLAGS=-std=gnu++11")))
1471 (native-inputs
1472 `(("pkg-config" ,pkg-config)))
1473 (inputs
1474 `(("alsa-lib" ,alsa-lib)
1475 ("glu" ,glu)
1476 ("libjpeg" ,libjpeg)
1477 ("libx11" ,libx11)
1478 ("qtbase" ,qtbase)
1479 ("eudev" ,eudev)))
1480 (synopsis "Realtime video capture utilities for Linux")
1481 (description "The v4l-utils provide a series of libraries and utilities to
1482 be used for realtime video capture via Linux-specific APIs.")
1483 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1484 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1485 (license (list license:lgpl2.1+ license:gpl2))))
1486
1487 (define-public obs
1488 (package
1489 (name "obs")
1490 (version "17.0.2")
1491 (source (origin
1492 (method url-fetch)
1493 (uri (string-append "https://github.com/jp9000/obs-studio"
1494 "/archive/" version ".tar.gz"))
1495 (file-name (string-append name "-" version ".tar.gz"))
1496 (sha256
1497 (base32
1498 "02cfhpkcsq718zwhwwsm48gjggf95qr38hqpi0kwrvsy18ll0msm"))))
1499 (build-system cmake-build-system)
1500 (arguments
1501 `(#:tests? #f ; no tests
1502 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1503 (%current-system)))
1504 '("arm" "mips"))
1505 '(#:phases
1506 (modify-phases %standard-phases
1507 (add-after 'unpack 'remove-architecture-specific-instructions
1508 ;; non-Intel platforms fail to build with the architecture
1509 ;; specific compiler flags included by default.
1510 (lambda _
1511 (substitute* "libobs/CMakeLists.txt"
1512 (("if\\(NOT MSVC\\)") "if(MSVC)"))
1513 #t))))
1514 '())))
1515 (native-inputs
1516 `(("pkg-config" ,pkg-config)))
1517 (inputs
1518 `(("alsa-lib" ,alsa-lib)
1519 ("curl" ,curl)
1520 ("eudev" ,eudev)
1521 ("ffmpeg" ,ffmpeg)
1522 ("fontconfig" ,fontconfig)
1523 ("freetype" ,freetype)
1524 ("jack" ,jack-1)
1525 ("jansson" ,jansson)
1526 ("libx264" ,libx264)
1527 ("libxcomposite" ,libxcomposite)
1528 ("mesa" ,mesa)
1529 ("pulseaudio" ,pulseaudio)
1530 ("qtbase" ,qtbase)
1531 ("qtx11extras" ,qtx11extras)
1532 ("speex" ,speex)
1533 ("v4l-utils" ,v4l-utils)
1534 ("zlib" ,zlib)))
1535 (synopsis "Live streaming software")
1536 (description "Open Broadcaster Software provides a graphical interface for
1537 video recording and live streaming. OBS supports capturing audio and video
1538 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1539 and JACK.")
1540 (home-page "https://obsproject.com")
1541 (license license:gpl2+)))
1542
1543 (define-public libvdpau
1544 (package
1545 (name "libvdpau")
1546 (version "1.1.1")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1551 name "-" version ".tar.bz2"))
1552 (sha256
1553 (base32
1554 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1555 (build-system gnu-build-system)
1556 (native-inputs
1557 `(("pkg-config" ,pkg-config)))
1558 (inputs
1559 `(("dri2proto" ,dri2proto)
1560 ("libx11" ,libx11 "out")
1561 ("libxext" ,libxext)))
1562 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1563 (synopsis "Video Decode and Presentation API")
1564 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1565 provides an interface to video decode acceleration and presentation hardware
1566 present in modern GPUs.")
1567 (license (license:x11-style "file://COPYING"))))
1568
1569 (define-public vdpauinfo
1570 (package
1571 (name "vdpauinfo")
1572 (version "1.0")
1573 (source
1574 (origin
1575 (method url-fetch)
1576 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1577 name "-" version ".tar.gz"))
1578 (sha256
1579 (base32
1580 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1581 (build-system gnu-build-system)
1582 (native-inputs
1583 `(("pkg-config" ,pkg-config)
1584 ("libx11" ,libx11)))
1585 (propagated-inputs
1586 `(("libvdpau" ,libvdpau)))
1587 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1588 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1589 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1590 implementation.")
1591 (license (license:x11-style "file://COPYING"))))
1592
1593 (define-public recordmydesktop
1594 (package
1595 (name "recordmydesktop")
1596 (version "0.3.8.1")
1597 (source (origin
1598 (method url-fetch)
1599 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1600 version "/recordmydesktop-" version ".tar.gz"))
1601 (sha256
1602 (base32
1603 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1604 (build-system gnu-build-system)
1605 (inputs `(("popt" ,popt)
1606 ("zlib" ,zlib)
1607 ("libx11" ,libx11)
1608 ("libice" ,libice)
1609 ("libsm" ,libsm)
1610 ("libxfixes" ,libxfixes)
1611 ("libxdamage" ,libxdamage)
1612 ("libxext" ,libxext)
1613 ("alsa-lib" ,alsa-lib)
1614 ("libvorbis" ,libvorbis)
1615 ("libtheora" ,libtheora)))
1616 (home-page "http://recordmydesktop.sourceforge.net/")
1617 (synopsis "Desktop session video recorder")
1618 (description
1619 "recordMyDesktop is a command-line tool that captures the activity in
1620 your graphical desktop and encodes it as a video. This is a useful tool for
1621 making @dfn{screencasts}.")
1622 (license license:gpl2+)))
1623
1624 (define-public libsmpeg
1625 (package
1626 (name "libsmpeg")
1627 (version "0.4.5")
1628 (source (origin
1629 (method svn-fetch)
1630 (uri (svn-reference
1631 (url "svn://svn.icculus.org/smpeg/trunk/")
1632 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1633 (sha256
1634 (base32
1635 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1636 (build-system gnu-build-system)
1637 (arguments
1638 `(#:phases (modify-phases %standard-phases
1639 (add-after 'unpack 'autogen.sh
1640 (lambda _
1641 (zero? (system* "sh" "autogen.sh")))))))
1642 (native-inputs
1643 `(("autoconf" ,autoconf)
1644 ("automake" ,automake)))
1645 (inputs
1646 `(("sdl" ,sdl2)))
1647 (home-page "http://icculus.org/smpeg/")
1648 (synopsis "SDL MPEG decoding library")
1649 (description
1650 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1651 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1652 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1653 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1654 and MPEG system streams.")
1655 (license (list license:expat
1656 license:lgpl2.1
1657 license:lgpl2.1+
1658 license:gpl2))))
1659
1660 (define-public libbdplus
1661 (package
1662 (name "libbdplus")
1663 (version "0.1.2")
1664 (source
1665 (origin
1666 (method url-fetch)
1667 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1668 version "/" name "-" version ".tar.bz2"))
1669 (sha256
1670 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1671 (inputs
1672 `(("libgcrypt" ,libgcrypt)))
1673 (build-system gnu-build-system)
1674 (home-page "http://www.videolan.org/developers/libbdplus.html")
1675 (synopsis "Library for decrypting certain Blu-Ray discs")
1676 (description "libbdplus is a library which implements the BD+ System
1677 specifications.")
1678 (license license:lgpl2.1+)))
1679
1680 (define-public libaacs
1681 (package
1682 (name "libaacs")
1683 (version "0.8.1")
1684 (source
1685 (origin
1686 (method url-fetch)
1687 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1688 version "/" name "-" version ".tar.bz2"))
1689 (sha256
1690 (base32 "1s5v075hnbs57995r6lljm79wgrip3gnyf55a0y7bja75jh49hwm"))))
1691 (inputs
1692 `(("libgcrypt" ,libgcrypt)))
1693 (native-inputs
1694 `(("bison" ,bison)
1695 ("flex" ,flex)))
1696 (build-system gnu-build-system)
1697 (home-page "http://www.videolan.org/developers/libaacs.html")
1698 (synopsis "Library for decrypting certain Blu-Ray discs")
1699 (description "libaacs is a library which implements the Advanced Access
1700 Content System specification.")
1701 (license license:lgpl2.1+)))
1702
1703 (define-public mps-youtube
1704 (package
1705 (name "mps-youtube")
1706 (version "0.2.7.1")
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
1711 "archive/v" version ".tar.gz"))
1712 (file-name (string-append name "-" version ".tar.gz"))
1713 (sha256
1714 (base32
1715 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
1716 (build-system python-build-system)
1717 (arguments
1718 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
1719 ;; test suite results differ depending on the country and also introduce
1720 ;; non-determinism in the tests.
1721 ;; https://github.com/mps-youtube/mps-youtube/issues/556
1722 `(#:tests? #f))
1723 (propagated-inputs
1724 `(("python-pafy" ,python-pafy)
1725 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
1726 (home-page "https://github.com/mps-youtube/mps-youtube")
1727 (synopsis "Terminal based YouTube player and downloader")
1728 (description
1729 "@code{mps-youtube} is based on mps, a terminal based program to
1730 search, stream and download music. This implementation uses YouTube as
1731 a source of content and can play and download video as well as audio.
1732 It can use either mpv or mplayer for playback, and for conversion of
1733 formats ffmpeg or libav is used. Users should install one of the
1734 supported players in addition to this package.")
1735 (license license:gpl3+)))
1736
1737 (define-public handbrake
1738 (package
1739 (name "handbrake")
1740 (version "0.10.5")
1741 (source (origin
1742 (method url-fetch)
1743 (uri (string-append "https://handbrake.fr/rotation.php?file="
1744 "HandBrake-" version ".tar.bz2"))
1745 (file-name (string-append "handbrake-" version ".tar.bz2"))
1746 (sha256
1747 (base32
1748 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
1749 (patches (search-patches "handbrake-pkg-config-path.patch"))
1750 (modules '((guix build utils)))
1751 (snippet
1752 ;; Remove bundled libraries and source not necessary for
1753 ;; running under a GNU environment.
1754 '(begin
1755 (for-each delete-file-recursively '("contrib" "macosx" "win"))
1756 #t))))
1757 (build-system glib-or-gtk-build-system)
1758 (native-inputs
1759 `(("automake" ,automake) ;gui subpackage must be bootstrapped
1760 ("autoconf" ,autoconf)
1761 ("curl" ,curl) ;not actually used, but tested for
1762 ("intltool" ,intltool)
1763 ("libtool" ,libtool)
1764 ("pkg-config" ,pkg-config)
1765 ("python" ,python-2))) ;for configuration
1766 (inputs
1767 `(("bzip2" ,bzip2)
1768 ("dbus-glib" ,dbus-glib)
1769 ("ffmpeg" ,ffmpeg)
1770 ("fontconfig" ,fontconfig)
1771 ("freetype" ,freetype)
1772 ("glib" ,glib)
1773 ("gstreamer" ,gstreamer)
1774 ("gst-plugins-base" ,gst-plugins-base)
1775 ("gtk+" ,gtk+)
1776 ("lame" ,lame)
1777 ("libass" ,libass)
1778 ("libbluray" ,libbluray)
1779 ("libdvdnav" ,libdvdnav)
1780 ("libdvdread" ,libdvdread)
1781 ("libgudev" ,libgudev)
1782 ("libmpeg2" ,libmpeg2)
1783 ("libnotify" ,libnotify)
1784 ("libogg" ,libogg)
1785 ("libsamplerate" ,libsamplerate)
1786 ("libtheora" ,libtheora)
1787 ("libvorbis" ,libvorbis)
1788 ("libvpx" ,libvpx)
1789 ("libxml2" ,libxml2)
1790 ("libx264" ,libx264)
1791 ("x265" ,x265)
1792 ("zlib" ,zlib)))
1793 (arguments
1794 `(#:tests? #f ;tests require Ruby and claim to be unsupported
1795 #:phases
1796 (modify-phases %standard-phases
1797 (add-before 'patch-source-shebangs 'bootstrap-gtk
1798 ;; Run bootstrap ahead of time so that shebangs get patched.
1799 (lambda _
1800 (setenv "CONFIG_SHELL" (which "sh"))
1801 (setenv "NOCONFIGURE" "1")
1802 ;; Patch the Makefile so that it doesn't bootstrap again.
1803 (substitute* "gtk/module.rules"
1804 ((".*autogen\\.sh.*") ""))
1805 (zero? (system* "sh" "./gtk/autogen.sh"))))
1806 (add-before 'configure 'disable-contrib
1807 (lambda _
1808 (substitute* "make/include/main.defs"
1809 ;; Disable unconditional inclusion of some "contrib"
1810 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
1811 ;; and libbluray), which would lead to fetching and
1812 ;; building of these libraries. Use our own instead.
1813 (("MODULES \\+= contrib") "# MODULES += contrib"))
1814 #t))
1815 (add-before 'configure 'fix-x265-linking
1816 (lambda _
1817 (substitute* "test/module.defs"
1818 ;; Fix missing library during linking error
1819 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
1820 #t))
1821 (replace 'configure
1822 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1823 ;; 'configure' is not an autoconf-generated script, and
1824 ;; errors on unrecognized arguments,
1825 ;; e.g. --enable-fast-install
1826 (let ((out (assoc-ref outputs "out")))
1827 (zero? (apply system* "./configure"
1828 (string-append "--prefix=" out)
1829 (or configure-flags '()))))))
1830 (add-after 'configure 'chdir-build
1831 (lambda _ (chdir "./build") #t)))))
1832 (home-page "https://handbrake.fr")
1833 (synopsis "Video transcoder")
1834 (description
1835 "HandBrake is a tool for converting video from any format to a selection
1836 of modern, widely supported codecs.")
1837 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
1838 (license (list license:gpl2+ license:bsd-3))))
1839
1840 (define-public openh264
1841 (package
1842 (name "openh264")
1843 (version "1.6.0")
1844 (source (origin
1845 (method url-fetch)
1846 (uri (string-append "https://github.com/cisco/"
1847 name "/archive/v" version ".tar.gz"))
1848 (file-name (string-append name "-" version ".tar.gz"))
1849 (sha256
1850 (base32
1851 "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
1852 (build-system gnu-build-system)
1853 (native-inputs
1854 `(("nasm" ,nasm)
1855 ("python" ,python)))
1856 (arguments
1857 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1858 #:test-target "test"
1859 #:phases (modify-phases %standard-phases
1860 ;; no configure script
1861 (delete 'configure))))
1862 (home-page "http://www.openh264.org/")
1863 (synopsis "H264 decoder library")
1864 (description
1865 "Openh264 is a library which can decode H264 video streams.")
1866 (license license:bsd-2)))