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