gnu: xscreensaver: Update to 5.39.
[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, 2018 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, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
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, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
22 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
23 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
24 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
28 ;;;
29 ;;; This file is part of GNU Guix.
30 ;;;
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
35 ;;;
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
40 ;;;
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43
44 (define-module (gnu packages video)
45 #:use-module (ice-9 match)
46 #:use-module (srfi srfi-1)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix utils)
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix git-download)
52 #:use-module (guix svn-download)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system glib-or-gtk)
56 #:use-module (guix build-system meson)
57 #:use-module (guix build-system perl)
58 #:use-module (guix build-system python)
59 #:use-module (guix build-system waf)
60 #:use-module (guix build-system trivial)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages audio)
64 #:use-module (gnu packages autotools)
65 #:use-module (gnu packages avahi)
66 #:use-module (gnu packages base)
67 #:use-module (gnu packages bison)
68 #:use-module (gnu packages boost)
69 #:use-module (gnu packages cdrom)
70 #:use-module (gnu packages check)
71 #:use-module (gnu packages cmake)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages cpp)
74 #:use-module (gnu packages curl)
75 #:use-module (gnu packages databases)
76 #:use-module (gnu packages dejagnu)
77 #:use-module (gnu packages docbook)
78 #:use-module (gnu packages documentation)
79 #:use-module (gnu packages elf)
80 #:use-module (gnu packages file)
81 #:use-module (gnu packages flex)
82 #:use-module (gnu packages fontutils)
83 #:use-module (gnu packages freedesktop)
84 #:use-module (gnu packages fribidi)
85 #:use-module (gnu packages gettext)
86 #:use-module (gnu packages ghostscript)
87 #:use-module (gnu packages gl)
88 #:use-module (gnu packages glib)
89 #:use-module (gnu packages guile)
90 #:use-module (gnu packages gnome)
91 #:use-module (gnu packages gnupg)
92 #:use-module (gnu packages gstreamer)
93 #:use-module (gnu packages gtk)
94 #:use-module (gnu packages image)
95 #:use-module (gnu packages imagemagick)
96 #:use-module (gnu packages iso-codes)
97 #:use-module (gnu packages libreoffice)
98 #:use-module (gnu packages linux)
99 #:use-module (gnu packages lua)
100 #:use-module (gnu packages m4)
101 #:use-module (gnu packages man)
102 #:use-module (gnu packages mp3)
103 #:use-module (gnu packages ncurses)
104 #:use-module (gnu packages ocr)
105 #:use-module (gnu packages perl)
106 #:use-module (gnu packages pkg-config)
107 #:use-module (gnu packages popt)
108 #:use-module (gnu packages pulseaudio)
109 #:use-module (gnu packages python)
110 #:use-module (gnu packages python-crypto)
111 #:use-module (gnu packages python-web)
112 #:use-module (gnu packages qt)
113 #:use-module (gnu packages ruby)
114 #:use-module (gnu packages sdl)
115 #:use-module (gnu packages serialization)
116 #:use-module (gnu packages shells)
117 #:use-module (gnu packages ssh)
118 #:use-module (gnu packages texinfo)
119 #:use-module (gnu packages textutils)
120 #:use-module (gnu packages tls)
121 #:use-module (gnu packages version-control)
122 #:use-module (gnu packages vulkan)
123 #:use-module (gnu packages web)
124 #:use-module (gnu packages webkit)
125 #:use-module (gnu packages wxwidgets)
126 #:use-module (gnu packages xdisorg)
127 #:use-module (gnu packages xiph)
128 #:use-module (gnu packages xml)
129 #:use-module (gnu packages xorg)
130 #:use-module (gnu packages assembly))
131
132 (define-public aalib
133 (package
134 (name "aalib")
135 (version "1.4rc5")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
139 version "/" name "-" version ".tar.gz"))
140 (sha256
141 (base32
142 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
143 (build-system gnu-build-system)
144 (native-inputs
145 `(("makeinfo" ,texinfo)))
146 (inputs
147 `(("ncurses" ,ncurses)))
148 (arguments
149 `(#:phases
150 (modify-phases %standard-phases
151 (replace 'configure
152 (lambda* (#:key build inputs outputs #:allow-other-keys)
153 ;; This old `configure' script doesn't support
154 ;; variables passed as arguments.
155 (let ((out (assoc-ref outputs "out"))
156 (ncurses (assoc-ref inputs "ncurses")))
157 (setenv "CONFIG_SHELL" (which "bash"))
158 (zero? (system* "./configure"
159 (string-append "--prefix=" out)
160 (string-append "--build=" build)
161 ;; The ancient config.guess is unable to
162 ;; guess the host triplet on mips64el.
163 ,@(if (string=? "mips64el-linux"
164 (%current-system))
165 '("--host=mips64el-unknown-linux-gnu")
166 '())
167 ;; The same is also true with aarch64.
168 ,@(if (string=? "aarch64-linux"
169 (%current-system))
170 '("--host=aarch64-unknown-linux-gnu")
171 '())
172 (string-append "--with-ncurses="
173 ncurses)))))))))
174 (home-page "http://aa-project.sourceforge.net/aalib/")
175 (synopsis "ASCII-art library")
176 (description
177 "AA-lib is a low level gfx library which does not require graphics device.
178 In fact, there is no graphical output possible. AA-lib replaces those
179 old-fashioned output methods with powerful ascii-art renderer.")
180 (license license:lgpl2.0+)))
181
182 (define-public liba52
183 (package
184 (name "liba52")
185 (version "0.7.4")
186 (source (origin
187 (method url-fetch)
188 (uri (string-append
189 ;; A mirror://sourceforge URI doesn't work, presumably
190 ;; because the SourceForge project is misconfigured.
191 "http://liba52.sourceforge.net/files/a52dec-" version
192 ".tar.gz"))
193 (sha256
194 (base32
195 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
196 (patches (search-patches "liba52-enable-pic.patch"
197 "liba52-set-soname.patch"
198 "liba52-use-mtune-not-mcpu.patch"
199 "liba52-link-with-libm.patch"))))
200 (build-system gnu-build-system)
201 ;; XXX We need to run ./bootstrap because of the build system fixes above.
202 (native-inputs
203 `(("autoconf" ,autoconf)
204 ("automake" ,automake)
205 ("libtool" ,libtool)))
206 (arguments `(#:configure-flags '("--enable-shared")
207 #:phases
208 (modify-phases %standard-phases
209 ;; XXX We need to run ./bootstrap because of the build
210 ;; system fixes above.
211 (add-after
212 'unpack 'bootstrap
213 (lambda _ (zero? (system* "sh" "bootstrap")))))))
214 (home-page "http://liba52.sourceforge.net/")
215 (synopsis "ATSC A/52 stream decoder")
216 (description "liba52 is a library for decoding ATSC A/52 streams. The
217 A/52 standard is used in a variety of applications, including digital
218 television and DVD. It is also known as AC-3.")
219 (license license:gpl2+)))
220
221 (define-public libmpeg2
222 (package
223 (name "libmpeg2")
224 (version "0.5.1")
225 (source (origin
226 (method url-fetch)
227 ;; A mirror://sourceforge URI doesn't work, presumably
228 ;; because the SourceForge project is misconfigured.
229 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
230 name "-" version ".tar.gz"))
231 (sha256
232 (base32
233 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
234 (inputs
235 `(("libx11" ,libx11)
236 ("libxext" ,libxext)
237 ("libxv" ,libxv)
238 ("libsm" ,libsm)
239 ("libice" ,libice)
240 ("sdl" ,sdl)))
241 (build-system gnu-build-system)
242 (home-page "http://libmpeg2.sourceforge.net/")
243 (synopsis "MPEG1 and MPEG2 video decoder library")
244 (description
245 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
246 (license license:gpl2+)))
247
248 (define-public libx264
249 (package
250 (name "libx264")
251 (version "20180219-2245")
252 (source (origin
253 (method url-fetch)
254 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
255 "x264-snapshot-" version "-stable.tar.bz2"))
256 (sha256
257 (base32
258 "1x0cg8l30wp84mr7q0ddp06jclm0kjrszazrx87d4k7js3qxjy8m"))))
259 (build-system gnu-build-system)
260 (native-inputs
261 `(("pkg-config" ,pkg-config)
262 ("nasm" ,nasm)))
263 ;; TODO: Add gpac input
264 (arguments
265 `(#:tests? #f ;no check target
266 #:configure-flags '("--enable-shared"
267 ;; Don't build the command-line program. If we
268 ;; want it later, we should do so in a different
269 ;; package to avoid a circular dependency (the x264
270 ;; program depends on ffmpeg and ffmpeg depends on
271 ;; libx264).
272 "--disable-cli"
273
274 ;; On MIPS, we must pass "--disable-asm" or else
275 ;; configure fails after printing: "You specified a
276 ;; pre-MSA CPU in your CFLAGS. If you really want
277 ;; to run on such a CPU, configure with
278 ;; --disable-asm."
279 ,@(if (string-prefix? "mips"
280 (or (%current-target-system)
281 (%current-system)))
282 '("--disable-asm")
283 '()))))
284 (home-page "https://www.videolan.org/developers/x264.html")
285 (synopsis "H.264 video coding library")
286 (description "libx264 is an advanced encoding library for creating
287 H.264 (MPEG-4 AVC) video streams.")
288 (license (list license:gpl2+ ;most files
289 license:isc ;common/x86/x86inc.asm
290 license:lgpl2.1+ ;extras/getopt.c
291 license:bsd-3 ;extras/inttypes.h
292 (license:non-copyleft ;extras/cl*.h
293 "file://extras/cl.h"
294 "See extras/cl.h in the distribution.")))))
295
296 (define-public mkvtoolnix
297 (package
298 (name "mkvtoolnix")
299 (version "13.0.0")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (string-append "https://mkvtoolnix.download/sources/"
304 name "-" version ".tar.xz"))
305 (sha256
306 (base32
307 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
308 (modules '((guix build utils)))
309 (snippet
310 '(begin
311 ;; Delete bundled libraries.
312 (for-each delete-file-recursively
313 '("lib/libebml"
314 "lib/libmatroska"
315 "lib/nlohmann-json"
316 "lib/pugixml"
317 "lib/utf8-cpp"))))))
318 (build-system gnu-build-system)
319 (inputs
320 `(("boost" ,boost)
321 ("bzip2" ,bzip2)
322 ("libebml" ,libebml)
323 ("flac" ,flac)
324 ("file" ,file)
325 ("libmatroska" ,libmatroska)
326 ("libogg" ,libogg)
327 ("libvorbis" ,libvorbis)
328 ("lzo" ,lzo)
329 ("pugixml" ,pugixml)
330 ("qt" ,qt)
331 ("utfcpp" ,utfcpp)
332 ("zlib" ,zlib)))
333 (native-inputs
334 `(("docbook-xsl" ,docbook-xsl)
335 ("gettext" ,gettext-minimal)
336 ("googletest" ,googletest)
337 ("libxslt" ,libxslt)
338 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
339 ("perl" ,perl)
340 ("pkg-config" ,pkg-config)
341 ("po4a" ,po4a)
342 ("ruby" ,ruby)))
343 (arguments
344 `(#:configure-flags
345 (list (string-append "--with-boost="
346 (assoc-ref %build-inputs "boost"))
347 (string-append "--with-docbook-xsl-root="
348 (assoc-ref %build-inputs "docbook-xsl")
349 "/xml/xsl/docbook-xsl-"
350 ,(package-version docbook-xsl))
351 (string-append "--with-extra-includes="
352 (assoc-ref %build-inputs "nlohmann-json-cpp")
353 "/include/nlohmann"))
354 #:phases
355 (modify-phases %standard-phases
356 (add-before 'configure 'add-googletest
357 (lambda _
358 (symlink
359 (string-append (assoc-ref %build-inputs "googletest")
360 "/include/gtest") "lib/gtest")
361 #t))
362 (replace 'build
363 (lambda _
364 (let ((-j (list "-j" (number->string (parallel-job-count)))))
365 (zero? (apply system* "rake" -j)))))
366 (replace 'check
367 (lambda _
368 (zero? (system* "rake" "tests/unit"))))
369 (replace 'install
370 (lambda _
371 (zero? (system* "rake" "install")))))))
372 (home-page "https://mkvtoolnix.download")
373 (synopsis "Tools to create, alter and inspect Matroska files")
374 (description
375 "MKVToolNix provides tools for getting information about Matroska files
376 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
377 and creating Matroska files from other media files (@code{mkvmerge}).")
378 (license license:gpl2)))
379
380 (define-public x265
381 (package
382 (name "x265")
383 (version "2.6")
384 (source
385 (origin
386 (method url-fetch)
387 (uri (string-append "https://download.videolan.org/videolan/x265/"
388 "x265_" version ".tar.gz"))
389 (sha256
390 (base32
391 "1gyd94jkwdii9308m07nymsbxrmrcl81c0j8i10zhslr2mj07w0v"))
392 (modules '((guix build utils)))
393 (snippet
394 '(delete-file-recursively "source/compat/getopt"))))
395 (build-system cmake-build-system)
396 (arguments
397 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
398 ;; Currently the source code doesn't check for aarch64
399 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
400 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
401 '())
402 #:phases
403 (modify-phases %standard-phases
404 (add-before 'configure 'prepare-build
405 (lambda _
406 (delete-file-recursively "build")
407 (chdir "source")
408 #t)))))
409 (home-page "http://x265.org/")
410 (synopsis "Library for encoding h.265/HEVC video streams")
411 (description "x265 is a H.265 / HEVC video encoder application library,
412 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
413 (license license:gpl2+)))
414
415 (define-public libass
416 (package
417 (name "libass")
418 (version "0.14.0")
419 (source (origin
420 (method url-fetch)
421 (uri (string-append
422 "https://github.com/libass/libass/releases/download/"
423 version "/libass-" version ".tar.xz"))
424 (sha256
425 (base32
426 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
427 (build-system gnu-build-system)
428 (native-inputs
429 `(("pkg-config" ,pkg-config)
430 ("nasm" ,nasm)))
431 (propagated-inputs
432 `(("freetype" ,freetype)
433 ("fribidi" ,fribidi)
434 ("fontconfig" ,fontconfig)
435 ("harfbuzz" ,harfbuzz)
436 ("enca" ,enca)))
437 (home-page "https://github.com/libass/libass")
438 (synopsis "Subtitle rendering library for the ASS/SSA format")
439 (description "libass is a subtitle rendering library for the
440 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
441 (license license:isc)))
442
443 (define-public libcaca
444 (package
445 (name "libcaca")
446 (version "0.99.beta19")
447 (source (origin
448 (method url-fetch)
449 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
450 version ".tar.gz"))
451 (sha256
452 (base32
453 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
454 (build-system gnu-build-system)
455 (native-inputs `(("pkg-config" ,pkg-config)))
456 (inputs
457 `(("freeglut" ,freeglut)
458 ("ftgl" ,ftgl)
459 ("imlib2" ,imlib2)
460 ("libx11" ,libx11)
461 ("mesa" ,mesa)
462 ("ncurses" ,ncurses)
463 ("zlib" ,zlib)))
464 (home-page "http://caca.zoy.org/wiki/libcaca")
465 (synopsis "Colour ASCII-art library")
466 (description "libcaca is a graphics library that outputs text instead of
467 pixels, so that it can work on older video cards or text terminals. It
468 supports Unicode, 2048 colors, dithering of color images, and advanced text
469 canvas operations.")
470 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
471
472 (define-public libdca
473 (package
474 (name "libdca")
475 (version "0.0.5")
476 (source (origin
477 (method url-fetch)
478 (uri (string-append
479 "https://download.videolan.org/pub/videolan/libdca/"
480 version "/libdca-" version ".tar.bz2"))
481 (sha256
482 (base32
483 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
484 (build-system gnu-build-system)
485 (home-page "https://www.videolan.org/developers/libdca.html")
486 (synopsis "DTS Coherent Acoustics decoder")
487 (description "libdca is a library for decoding DTS Coherent Acoustics
488 streams.")
489 (license license:gpl2+)))
490
491 (define-public libdv
492 (package
493 (name "libdv")
494 (version "1.0.0")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append
498 "mirror://sourceforge/" name "/" name "/"
499 version "/" name "-" version ".tar.gz"))
500 (sha256
501 (base32
502 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
503 (build-system gnu-build-system)
504 (native-inputs `(("pkg-config" ,pkg-config)))
505 (inputs `(("libxv" ,libxv)))
506 (home-page "http://libdv.sourceforge.net/")
507 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
508 (description "The Quasar DV codec (libdv) is a software codec for DV
509 video, the encoding format used by most digital camcorders, typically those
510 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
511 developed according to the official standards for DV video: IEC 61834 and
512 SMPTE 314M.")
513 (license license:lgpl2.1+)))
514
515 (define-public libmatroska
516 (package
517 (name "libmatroska")
518 (version "1.4.8")
519 (source
520 (origin
521 (method url-fetch)
522 (uri (string-append "https://dl.matroska.org/downloads/"
523 name "/" name "-" version ".tar.xz"))
524 (sha256
525 (base32
526 "14n9sw974prr3yp4yjb7aadi6x2yz5a0hjw8fs3qigy5shh2piyq"))))
527 (build-system gnu-build-system)
528 (native-inputs
529 `(("pkg-config" ,pkg-config)))
530 (inputs
531 `(("libebml" ,libebml)))
532 (home-page "https://www.matroska.org")
533 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
534 (description
535 "Matroska aims to become the standard of multimedia container formats.
536 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
537 of XML. EBML enables the Matroska Development Team to gain significant
538 advantages in terms of future format extensibility, without breaking file
539 support in old parsers.
540 libebml is a C++ library to read and write EBML files.")
541 (license license:lgpl2.1)))
542
543 (define-public libva
544 (package
545 (name "libva")
546 (version "2.1.0")
547 (source
548 (origin
549 (method url-fetch)
550 (uri (list
551 ;; Newer releases are only available on GitHub.
552 (string-append "https://github.com/01org/libva/releases/download/"
553 version "/libva-" version ".tar.bz2")
554 ;; Keep the old URL around for compatibility.
555 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
556 "libva/libva-" version "/libva-" version ".tar.bz2")))
557 (sha256
558 (base32 "03sb1b3fxw8myf9kz6rxw5f3v1p0vfmk34779qx0q8fk24x9bypk"))))
559 (build-system gnu-build-system)
560 (native-inputs
561 `(("pkg-config" ,pkg-config)))
562 (inputs
563 `(("libdrm" ,libdrm)
564 ("libx11" ,libx11)
565 ("libxext" ,libxext)
566 ("libxfixes" ,libxfixes)
567 ("mesa" ,mesa)))
568 (arguments
569 `(#:phases
570 (modify-phases %standard-phases
571 (add-before
572 'build 'fix-dlopen-paths
573 (lambda* (#:key outputs #:allow-other-keys)
574 (let ((out (assoc-ref outputs "out")))
575 (substitute* "va/drm/va_drm_auth_x11.c"
576 (("\"libva-x11\\.so\\.%d\"")
577 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
578 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
579 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
580 #:configure-flags
581 (list (string-append "--with-drivers-path="
582 (assoc-ref %build-inputs "mesa") "/lib/dri"))
583 ;; However, we can't write to mesa's store directory, so override the
584 ;; following make variable to install the dummy driver to libva's
585 ;; $prefix/lib/dri directory.
586 #:make-flags
587 (list (string-append "dummy_drv_video_ladir="
588 (assoc-ref %outputs "out") "/lib/dri"))))
589 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
590 (synopsis "Video acceleration library")
591 (description "The main motivation for VA-API (Video Acceleration API) is
592 to enable hardware accelerated video decode/encode at various
593 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
594 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
595 (license license:expat)))
596
597 (define-public ffmpeg
598 (package
599 (name "ffmpeg")
600 (version "3.4.2")
601 (source (origin
602 (method url-fetch)
603 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
604 version ".tar.xz"))
605 (sha256
606 (base32
607 "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"))))
608 (build-system gnu-build-system)
609 (inputs
610 `(("fontconfig" ,fontconfig)
611 ("freetype" ,freetype)
612 ("frei0r-plugins" ,frei0r-plugins)
613 ("gnutls" ,gnutls)
614 ("opus" ,opus)
615 ("ladspa" ,ladspa)
616 ("lame" ,lame)
617 ("libass" ,libass)
618 ("libbluray" ,libbluray)
619 ("libcaca" ,libcaca)
620 ("libcdio-paranoia" ,libcdio-paranoia)
621 ("libtheora" ,libtheora)
622 ("libva" ,libva)
623 ("libvdpau" ,libvdpau)
624 ("libvorbis" ,libvorbis)
625 ("libvpx" ,libvpx)
626 ("libx11" ,libx11)
627 ("libx264" ,libx264)
628 ("mesa" ,mesa)
629 ("openal" ,openal)
630 ("pulseaudio" ,pulseaudio)
631 ("sdl" ,sdl2)
632 ("soxr" ,soxr)
633 ("speex" ,speex)
634 ("twolame" ,twolame)
635 ("x265" ,x265)
636 ("xvid" ,xvid)
637 ("zlib" ,zlib)))
638 (native-inputs
639 `(("bc" ,bc)
640 ("perl" ,perl)
641 ("pkg-config" ,pkg-config)
642 ("texinfo" ,texinfo)
643 ("python" ,python-2) ; scripts use interpreter python2
644 ("speex" ,speex)
645 ("yasm" ,yasm)))
646 (arguments
647 `(#:test-target "fate"
648 #:configure-flags
649 ;; possible additional inputs:
650 ;; --enable-avisynth enable reading of AviSynth script
651 ;; files [no]
652 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
653 ;; --enable-libcelt enable CELT decoding via libcelt [no]
654 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
655 ;; and libraw1394 [no]
656 ;; --enable-libfaac enable AAC encoding via libfaac [no]
657 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
658 ;; --enable-libflite enable flite (voice synthesis) support via
659 ;; libflite [no]
660 ;; --enable-libgme enable Game Music Emu via libgme [no]
661 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
662 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
663 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
664 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
665 ;; --enable-libnut enable NUT (de)muxing via libnut,
666 ;; native (de)muxer exists [no]
667 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
668 ;; libopencore-amrnb [no]
669 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
670 ;; libopencore-amrwb [no]
671 ;; --enable-libopencv enable video filtering via libopencv [no]
672 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
673 ;; OpenJPEG [no]
674 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
675 ;; --enable-libschroedinger enable Dirac de/encoding via
676 ;; libschroedinger [no]
677 ;; --enable-libshine enable fixed-point MP3 encoding via
678 ;; libshine [no]
679 ;; --enable-libssh enable SFTP protocol via libssh [no]
680 ;; (libssh2 does not work)
681 ;; --enable-libstagefright-h264 enable H.264 decoding via
682 ;; libstagefright [no]
683 ;; --enable-libutvideo enable Ut Video encoding and decoding via
684 ;; libutvideo [no]
685 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
686 ;; --enable-libvidstab enable video stabilization using
687 ;; vid.stab [no]
688 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
689 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
690 ;; libvo-amrwbenc [no]
691 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
692 ;; --enable-libxavs enable AVS encoding via xavs [no]
693 ;; --enable-libzmq enable message passing via libzmq [no]
694 ;; --enable-libzvbi enable teletext support via libzvbi [no]
695 ;; --enable-opencl enable OpenCL code
696 '("--enable-avresample"
697 "--enable-gpl" ; enable optional gpl licensed parts
698 "--enable-shared"
699 "--enable-frei0r"
700 "--enable-fontconfig"
701 "--enable-gnutls"
702 "--enable-ladspa"
703 "--enable-libass"
704 "--enable-libbluray"
705 "--enable-libcaca"
706 "--enable-libcdio"
707 "--enable-libfreetype"
708 "--enable-libmp3lame"
709 "--enable-libopus"
710 "--enable-libpulse"
711 "--enable-libsoxr"
712 "--enable-libspeex"
713 "--enable-libtheora"
714 "--enable-libtwolame"
715 "--enable-libvorbis"
716 "--enable-libvpx"
717 "--enable-libxvid"
718 "--enable-libx264"
719 "--enable-libx265"
720 "--enable-openal"
721 "--enable-opengl"
722
723 "--enable-runtime-cpudetect"
724
725 ;; The HTML pages take 7.2 MiB
726 "--disable-htmlpages"
727
728 ;; The static libraries are 23 MiB
729 "--disable-static"
730
731 ;; Runtime cpu detection is not implemented on
732 ;; MIPS, so we disable some features.
733 "--disable-mips32r2"
734 "--disable-mipsdsp"
735 "--disable-mipsdspr2"
736 "--disable-mipsfpu")
737 #:phases
738 (modify-phases %standard-phases
739 (replace
740 'configure
741 ;; configure does not work followed by "SHELL=..." and
742 ;; "CONFIG_SHELL=..."; set environment variables instead
743 (lambda* (#:key outputs configure-flags #:allow-other-keys)
744 (let ((out (assoc-ref outputs "out")))
745 (substitute* "configure"
746 (("#! /bin/sh") (string-append "#!" (which "sh"))))
747 (setenv "SHELL" (which "bash"))
748 (setenv "CONFIG_SHELL" (which "bash"))
749 (zero? (apply system*
750 "./configure"
751 (string-append "--prefix=" out)
752 ;; Add $libdir to the RUNPATH of all the binaries.
753 (string-append "--extra-ldflags=-Wl,-rpath="
754 out "/lib")
755 configure-flags)))))
756 (add-before
757 'check 'set-ld-library-path
758 (lambda _
759 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
760 ;; running tests.
761 (let* ((dso (find-files "." "\\.so$"))
762 (path (string-join (map dirname dso) ":")))
763 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
764 (setenv "LD_LIBRARY_PATH" path)
765 #t))))))
766 (home-page "https://www.ffmpeg.org/")
767 (synopsis "Audio and video framework")
768 (description "FFmpeg is a complete, cross-platform solution to record,
769 convert and stream audio and video. It includes the libavcodec
770 audio/video codec library.")
771 (license license:gpl2+)))
772
773 (define-public ffmpeg-2.8
774 (package
775 (inherit ffmpeg)
776 (version "2.8.14")
777 (source (origin
778 (method url-fetch)
779 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
780 version ".tar.xz"))
781 (sha256
782 (base32
783 "05m1272r5qa2r0ym5vq4figdfnpvcys1fgb1026n5s6xdjd1s1pg"))))
784 (arguments
785 (substitute-keyword-arguments (package-arguments ffmpeg)
786 ((#:configure-flags flags)
787 `(map (lambda (flag)
788 (if (string=? flag "--disable-mipsdsp")
789 "--disable-mipsdspr1"
790 flag))
791 ,flags))))))
792
793 ;; Annoyingly enough, the latest mpv release does not build with the stable
794 ;; release of ffmpeg. Use a git commit until the situation is fixed.
795 (define-public ffmpeg-git
796 (let ((commit "3f887440677328c9cfed97ad81d14051ffa32aae")
797 (revision "1"))
798 (package
799 (inherit ffmpeg)
800 (name "ffmpeg-git")
801 (version (string-append "3.4-" revision "." (string-take commit 9)))
802 (source (origin
803 (method git-fetch)
804 (uri (git-reference
805 (url "https://github.com/FFmpeg/FFmpeg.git")
806 (commit commit)))
807 (file-name (string-append name "-" version "-checkout"))
808 (sha256
809 (base32
810 "1b7n3g4m2rbvrwsgbfl8wl91z42g1ld42clwxs8qpl9ny5rwz6sq")))))))
811
812 (define-public vlc
813 (package
814 (name "vlc")
815 (version "2.2.8")
816 (source (origin
817 (method url-fetch)
818 (uri (string-append
819 "https://download.videolan.org/pub/videolan/vlc/"
820 version "/vlc-" version ".tar.xz"))
821 (sha256
822 (base32
823 "1v32snw46rkgbdqdy3dssl2y13i8p2cr1cw1i18r6vdmiy24dw4v"))))
824 (build-system gnu-build-system)
825 (native-inputs
826 `(("git" ,git) ; needed for a test
827 ("pkg-config" ,pkg-config)))
828 ;; FIXME: Add optional inputs once available.
829 (inputs
830 `(("alsa-lib" ,alsa-lib)
831 ("avahi" ,avahi)
832 ("dbus" ,dbus)
833 ("flac" ,flac)
834 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
835 ("fontconfig" ,fontconfig)
836 ("freetype" ,freetype)
837 ("gnutls" ,gnutls)
838 ("liba52" ,liba52)
839 ("libcddb" ,libcddb)
840 ("libdvbpsi" ,libdvbpsi)
841 ("libgcrypt" ,libgcrypt)
842 ("libkate" ,libkate)
843 ("libmad" ,libmad)
844 ("libogg" ,libogg)
845 ("libpng" ,libpng)
846 ("libsamplerate" ,libsamplerate)
847 ("libssh2" ,libssh2)
848 ("libvorbis" ,libvorbis)
849 ("libtheora" ,libtheora)
850 ("libxext" ,libxext)
851 ("libxi" ,libxi)
852 ("libxinerama" ,libxinerama)
853 ("libxml2" ,libxml2)
854 ("libxpm" ,libxpm)
855 ("livemedia-utils" ,livemedia-utils)
856 ("lua" ,lua-5.1)
857 ("mesa" ,mesa)
858 ("opus" ,opus)
859 ("perl" ,perl)
860 ("pulseaudio" ,pulseaudio)
861 ("python" ,python-wrapper)
862 ("qtbase" ,qtbase)
863 ("qtx11extras" ,qtx11extras)
864 ("sdl" ,sdl)
865 ("sdl-image" ,sdl-image)
866 ("speex" ,speex)
867 ("x265" ,x265)
868 ("xcb-util-keysyms" ,xcb-util-keysyms)))
869 (arguments
870 `(#:configure-flags
871 `("CXXFLAGS=-std=gnu++11"
872 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
873 (assoc-ref %build-inputs "ffmpeg")
874 "/lib")) ;needed for the tests
875
876 #:phases
877 (modify-phases %standard-phases
878 (add-after 'unpack 'patch-source
879 (lambda* (#:key inputs #:allow-other-keys)
880 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
881 (substitute* "configure"
882 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
883 (string-append "LIVE555_PREFIX=" livemedia-utils)))
884 ;; Some of the tests require using the display to test out VLC,
885 ;; which fails in our sandboxed build system
886 (substitute* "test/run_vlc.sh"
887 (("./vlc --ignore-config") "echo"))
888 ;; XXX Likely not needed for >2.2.6.
889 (substitute* "modules/gui/qt4/components/interface_widgets.cpp"
890 (("<qx11info_x11.h>") "<QtX11Extras/qx11info_x11.h>"))
891 #t)))
892 (add-after 'install 'regenerate-plugin-cache
893 (lambda* (#:key outputs #:allow-other-keys)
894 ;; The 'install-exec-hook' rule in the top-level Makefile.am
895 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
896 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
897 ;; it references. Thus, we first reset the timestamps of all
898 ;; these files, and then regenerate the cache such that the
899 ;; mtimes it includes are always zero instead of being dependent
900 ;; on the build time.
901 (let* ((out (assoc-ref outputs "out"))
902 (pkglibdir (string-append out "/lib/vlc"))
903 (plugindir (string-append pkglibdir "/plugins"))
904 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
905 ;; TODO: Factorize 'reset-timestamps'.
906 (for-each (lambda (file)
907 (let ((s (lstat file)))
908 (unless (eq? (stat:type s) 'symlink)
909 (utime file 0 0 0 0))))
910 (find-files plugindir))
911 (zero? (system* cachegen plugindir))))))))
912 (home-page "https://www.videolan.org/")
913 (synopsis "Audio and video framework")
914 (description "VLC is a cross-platform multimedia player and framework
915 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
916 treaming protocols.")
917 (license license:gpl2+)))
918
919 (define-public mplayer
920 (package
921 (name "mplayer")
922 (version "1.3.0")
923 (source (origin
924 (method url-fetch)
925 (uri (string-append
926 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
927 version ".tar.xz"))
928 (sha256
929 (base32
930 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
931 (build-system gnu-build-system)
932 ;; FIXME: Add additional inputs once available.
933 (native-inputs
934 `(("pkg-config" ,pkg-config)))
935 (inputs
936 `(("alsa-lib" ,alsa-lib)
937 ("cdparanoia" ,cdparanoia)
938 ("ffmpeg" ,ffmpeg)
939 ("fontconfig" ,fontconfig)
940 ("freetype" ,freetype)
941 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
942 ("lame" ,lame)
943 ("libass" ,libass)
944 ("libdvdcss" ,libdvdcss)
945 ("libdvdnav" ,libdvdnav)
946 ("libjpeg" ,libjpeg)
947 ("libmpeg2" ,libmpeg2)
948 ("libmpg123" ,mpg123) ; audio codec for MP3
949 ("libpng" ,libpng)
950 ("libtheora" ,libtheora)
951 ("libvdpau" ,libvdpau)
952 ("libvorbis" ,libvorbis)
953 ("libx11" ,libx11)
954 ("libx264" ,libx264)
955 ("libxinerama" ,libxinerama)
956 ("libxv" ,libxv)
957 ("libxxf86dga" ,libxxf86dga)
958 ("mesa" ,mesa)
959 ("opus" ,opus)
960 ("perl" ,perl)
961 ("pulseaudio" ,pulseaudio)
962 ("python" ,python-wrapper)
963 ("sdl" ,sdl)
964 ("speex" ,speex)
965 ("yasm" ,yasm)
966 ("zlib" ,zlib)))
967 (arguments
968 `(#:tests? #f ; no test target
969 #:phases
970 (modify-phases %standard-phases
971 (replace 'configure
972 ;; configure does not work followed by "SHELL=..." and
973 ;; "CONFIG_SHELL=..."; set environment variables instead
974 (lambda* (#:key inputs outputs #:allow-other-keys)
975 (let ((out (assoc-ref outputs "out"))
976 (libx11 (assoc-ref inputs "libx11")))
977 (substitute* "configure"
978 (("#! /bin/sh") (string-append "#!" (which "sh"))))
979 (setenv "SHELL" (which "bash"))
980 (setenv "CONFIG_SHELL" (which "bash"))
981 (zero? (system*
982 "./configure"
983 (string-append "--extra-cflags=-I"
984 libx11 "/include") ; to detect libx11
985 "--disable-ffmpeg_a" ; disables bundled ffmpeg
986 (string-append "--prefix=" out)
987 ;; Enable runtime cpu detection where supported,
988 ;; and choose a suitable target.
989 ,@(match (or (%current-target-system)
990 (%current-system))
991 ("x86_64-linux"
992 '("--enable-runtime-cpudetection"
993 "--target=x86_64-linux"))
994 ("i686-linux"
995 '("--enable-runtime-cpudetection"
996 "--target=i686-linux"))
997 ("mips64el-linux"
998 '("--target=mips3-linux"))
999 (_ (list (string-append
1000 "--target="
1001 (or (%current-target-system)
1002 (nix-system->gnu-triplet
1003 (%current-system)))))))
1004 "--disable-iwmmxt"))))))))
1005 (home-page "https://www.mplayerhq.hu/design7/news.html")
1006 (synopsis "Audio and video player")
1007 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1008 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1009 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1010 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1011 (license license:gpl2)))
1012
1013 (define-public mpv
1014 (package
1015 (name "mpv")
1016 (version "0.28.2")
1017 (source (origin
1018 (method url-fetch)
1019 (uri (string-append
1020 "https://github.com/mpv-player/mpv/archive/v" version
1021 ".tar.gz"))
1022 (sha256
1023 (base32
1024 "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
1025 (file-name (string-append name "-" version ".tar.gz"))))
1026 (build-system waf-build-system)
1027 (native-inputs
1028 `(("perl" ,perl) ; for zsh completion file
1029 ("pkg-config" ,pkg-config)
1030 ("python-docutils" ,python-docutils)))
1031 ;; Missing features: libguess, V4L2
1032 (inputs
1033 `(("alsa-lib" ,alsa-lib)
1034 ("enca" ,enca)
1035 ("ffmpeg" ,ffmpeg-git)
1036 ("jack" ,jack-1)
1037 ("ladspa" ,ladspa)
1038 ("lcms" ,lcms)
1039 ("libass" ,libass)
1040 ("libbluray" ,libbluray)
1041 ("libcaca" ,libcaca)
1042 ("libbs2b" ,libbs2b)
1043 ("libcdio-paranoia" ,libcdio-paranoia)
1044 ("libdvdread" ,libdvdread)
1045 ("libdvdnav" ,libdvdnav)
1046 ("libjpeg" ,libjpeg)
1047 ("libva" ,libva)
1048 ("libvdpau" ,libvdpau)
1049 ("libx11" ,libx11)
1050 ("libxext" ,libxext)
1051 ("libxinerama" ,libxinerama)
1052 ("libxrandr" ,libxrandr)
1053 ("libxscrnsaver" ,libxscrnsaver)
1054 ("libxv" ,libxv)
1055 ;; XXX: lua > 5.2 is not currently supported; see
1056 ;; waftools/checks/custom.py
1057 ("lua" ,lua-5.2)
1058 ("mesa" ,mesa)
1059 ("mpg123" ,mpg123)
1060 ("pulseaudio" ,pulseaudio)
1061 ("rsound" ,rsound)
1062 ("shaderc" ,shaderc)
1063 ("vulkan-icd-loader" ,vulkan-icd-loader)
1064 ("waf" ,python-waf)
1065 ("wayland" ,wayland)
1066 ("wayland-protocols" ,wayland-protocols)
1067 ("libxkbcommon" ,libxkbcommon)
1068 ("youtube-dl" ,youtube-dl)
1069 ("zlib" ,zlib)))
1070 (arguments
1071 '(#:phases
1072 (modify-phases %standard-phases
1073 (add-before
1074 'configure 'setup-waf
1075 (lambda* (#:key inputs #:allow-other-keys)
1076 (copy-file (assoc-ref inputs "waf") "waf")
1077 (setenv "CC" "gcc"))))
1078 #:configure-flags (list "--enable-libmpv-shared"
1079 "--enable-cdda"
1080 "--enable-dvdread"
1081 "--enable-dvdnav"
1082 "--enable-zsh-comp"
1083 "--disable-build-date")
1084 ;; No check function defined.
1085 #:tests? #f))
1086 (home-page "https://mpv.io/")
1087 (synopsis "Audio and video player")
1088 (description "mpv is a general-purpose audio and video player. It is a
1089 fork of mplayer2 and MPlayer. It shares some features with the former
1090 projects while introducing many more.")
1091 (license license:gpl2+)))
1092
1093 (define-public gnome-mpv
1094 (package
1095 (name "gnome-mpv")
1096 (version "0.14")
1097 (source
1098 (origin
1099 (method url-fetch)
1100 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1101 "/download/v" version "/gnome-mpv-" version
1102 ".tar.xz"))
1103 (sha256
1104 (base32
1105 "03kjwd5jq0i5ajnvhjwf5019bjjaa16xkdrhdkiz1k58ipjvvj93"))))
1106 (native-inputs
1107 `(("intltool" ,intltool)
1108 ("pkg-config" ,pkg-config)))
1109 (inputs
1110 `(("gtk+" ,gtk+)
1111 ("libepoxy" ,libepoxy)
1112 ("mpv" ,mpv)))
1113 (build-system glib-or-gtk-build-system)
1114 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1115 (synopsis "GTK+ frontend for the mpv media player")
1116 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1117 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1118 access to mpv's powerful playback capabilities.")
1119 (license license:gpl3+)))
1120
1121 (define-public libvpx
1122 (package
1123 (name "libvpx")
1124 (version "1.7.0")
1125 (source (origin
1126 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1127 (method git-fetch)
1128 (uri (git-reference
1129 (url "https://chromium.googlesource.com/webm/libvpx")
1130 (commit (string-append "v" version))))
1131 (file-name (git-file-name name version))
1132 (sha256
1133 (base32
1134 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1135 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1136 (build-system gnu-build-system)
1137 (arguments
1138 `(#:configure-flags (list "--enable-shared"
1139 "--as=yasm"
1140 ;; Limit size to avoid CVE-2015-1258
1141 "--size-limit=16384x16384"
1142 (string-append "--prefix=" (assoc-ref %outputs "out")))
1143 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1144 (assoc-ref %outputs "out") "/lib"))
1145 #:phases (modify-phases %standard-phases
1146 (replace 'configure
1147 (lambda* (#:key configure-flags #:allow-other-keys)
1148 ;; The configure script does not understand some of the GNU
1149 ;; options, so we only add the flags specified above.
1150 (apply invoke "./configure" configure-flags))))
1151 #:tests? #f)) ; no check target
1152 (native-inputs
1153 `(("perl" ,perl)
1154 ("yasm" ,yasm)))
1155 (synopsis "VP8/VP9 video codec")
1156 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1157 (license license:bsd-3)
1158 (home-page "https://www.webmproject.org/")))
1159
1160 (define-public youtube-dl
1161 (package
1162 (name "youtube-dl")
1163 (version "2018.03.14")
1164 (source (origin
1165 (method url-fetch)
1166 (uri (string-append "https://yt-dl.org/downloads/"
1167 version "/youtube-dl-"
1168 version ".tar.gz"))
1169 (sha256
1170 (base32
1171 "0j8j797gqc29fd5ra3cjvwkp8dgvigdydsj0zzjs05zccfqrj9lh"))))
1172 (build-system python-build-system)
1173 (arguments
1174 ;; The problem here is that the directory for the man page and completion
1175 ;; files is relative, and for some reason, setup.py uses the
1176 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1177 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1178 ;; completion file is called 'youtube-dl' rather than
1179 ;; 'youtube-dl.bash-completion'.
1180 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1181 #:phases (modify-phases %standard-phases
1182 (add-before 'install 'fix-the-data-directories
1183 (lambda* (#:key outputs #:allow-other-keys)
1184 (let ((prefix (assoc-ref outputs "out")))
1185 (mkdir "bash-completion")
1186 (rename-file "youtube-dl.bash-completion"
1187 "bash-completion/youtube-dl")
1188 (substitute* "setup.py"
1189 (("youtube-dl\\.bash-completion")
1190 "bash-completion/youtube-dl")
1191 (("'etc/")
1192 (string-append "'" prefix "/etc/"))
1193 (("'share/")
1194 (string-append "'" prefix "/share/")))
1195 #t))))))
1196 (synopsis "Download videos from YouTube.com and other sites")
1197 (description
1198 "Youtube-dl is a small command-line program to download videos from
1199 YouTube.com and many more sites.")
1200 (home-page "https://yt-dl.org")
1201 (license license:public-domain)))
1202
1203 (define-public youtube-dl-gui
1204 (package
1205 (name "youtube-dl-gui")
1206 (version "0.3.8")
1207 (source
1208 (origin
1209 (method url-fetch)
1210 (uri (pypi-uri "Youtube-DLG" version))
1211 (sha256
1212 (base32
1213 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1214 (build-system python-build-system)
1215 (arguments
1216 ;; In Guix, wxpython has not yet been packaged for Python 3.
1217 `(#:python ,python-2
1218 ;; This package has no tests.
1219 #:tests? #f
1220 #:phases
1221 (modify-phases %standard-phases
1222 (add-before 'build 'patch-source
1223 (lambda* (#:key inputs #:allow-other-keys)
1224 ;; The youtube-dl-gui program lets you configure options. Some of
1225 ;; them are problematic, so we change their defaults.
1226 (substitute* "youtube_dl_gui/optionsmanager.py"
1227 ;; When this is true, the builder process will try (and fail) to
1228 ;; write logs to the builder user's home directory.
1229 (("'enable_log': True") "'enable_log': False")
1230 ;; This determines which youtube-dl program youtube-dl-gui will
1231 ;; run. If we don't set this, then youtube-dl-gui might download
1232 ;; an arbitrary copy from the Internet into the user's home
1233 ;; directory and run it, so let's make sure youtube-dl-gui uses
1234 ;; the youtube-dl from the inputs by default.
1235 (("'youtubedl_path': self.config_path")
1236 (string-append "'youtubedl_path': '"
1237 (assoc-ref inputs "youtube-dl")
1238 "/bin'"))
1239 ;; When this is True, when youtube-dl-gui is finished downloading
1240 ;; a file, it will try (and possibly fail) to open the directory
1241 ;; containing the downloaded file. This can fail because it
1242 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1243 ;; adding xdg-utils to the propagated inputs is not enough to
1244 ;; make this work, so for now we set the default to False.
1245 (("'open_dl_dir': True") "'open_dl_dir': False"))
1246 ;; The youtube-dl program from the inputs is actually a wrapper
1247 ;; script written in bash, so attempting to invoke it as a python
1248 ;; script will fail.
1249 (substitute* "youtube_dl_gui/downloaders.py"
1250 (("cmd = \\['python', self\\.youtubedl_path\\]")
1251 "cmd = [self.youtubedl_path]"))
1252 ;; Use relative paths for installing data files so youtube-dl-gui
1253 ;; installs the files relative to its prefix in the store, rather
1254 ;; than relative to /. Also, instead of installing data files into
1255 ;; $prefix/usr/share, install them into $prefix/share for
1256 ;; consistency (see: (standards) Directory Variables).
1257 (substitute* "setup.py"
1258 (("= '/usr/share") "= 'share"))
1259 ;; Update get_locale_file() so it finds the installed localization
1260 ;; files.
1261 (substitute* "youtube_dl_gui/utils.py"
1262 (("os\\.path\\.join\\('/usr', 'share'")
1263 (string-append "os.path.join('"
1264 (assoc-ref %outputs "out")
1265 "', 'share'"))))))))
1266 (inputs
1267 `(("python2-wxpython" ,python2-wxpython)
1268 ("youtube-dl" ,youtube-dl)))
1269 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1270 (synopsis
1271 "GUI (Graphical User Interface) for @command{youtube-dl}")
1272 (description
1273 "Youtube-dlG is a GUI (Graphical User Interface) for
1274 @command{youtube-dl}. You can use it to download videos from YouTube and any
1275 other site that youtube-dl supports.")
1276 (license license:unlicense)))
1277
1278 (define-public you-get
1279 (package
1280 (name "you-get")
1281 (version "0.4.1040")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append
1285 "https://github.com/soimort/you-get/archive/v"
1286 version ".tar.gz"))
1287 (file-name (string-append name "-" version ".tar.gz"))
1288 (sha256
1289 (base32
1290 "0257p9bn426rv0cjk2j5hsx6cg7dz5gpjwlqq0sy1axa47phis46"))))
1291 (build-system python-build-system)
1292 (inputs
1293 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1294 (arguments
1295 `(#:phases
1296 (modify-phases %standard-phases
1297 (add-after 'unpack 'qualify-input-references
1298 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1299 ;; happens to be in the user's $PATH at run time.
1300 (lambda* (#:key inputs #:allow-other-keys)
1301 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1302 "/bin/ffmpeg")))
1303 (substitute* "src/you_get/processor/ffmpeg.py"
1304 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1305 ;; same string is also used when sniffing ffmpeg's output.
1306 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1307 (string-append prefix "'" ffmpeg "'")))
1308 #t))))
1309 #:tests? #f)) ; XXX some tests need Internet access
1310 (synopsis "Download videos, audio, or images from Web sites")
1311 (description
1312 "You-Get is a command-line utility to download media contents (videos,
1313 audio, images) from the Web. It can use either mpv or vlc for playback.")
1314 (home-page "https://you-get.org/")
1315 (license license:expat)))
1316
1317 (define-public youtube-viewer
1318 (package
1319 (name "youtube-viewer")
1320 (version "3.3.3")
1321 (source (origin
1322 (method url-fetch)
1323 (uri (string-append
1324 "https://github.com/trizen/youtube-viewer/archive/"
1325 version ".tar.gz"))
1326 (file-name (string-append name "-" version ".tar.gz"))
1327 (sha256
1328 (base32
1329 "1j572his6qmazlmyrbnfq62s9bqml875ay7wy26byy9hfc7m0vgk"))))
1330 (build-system perl-build-system)
1331 (native-inputs
1332 `(("perl-module-build" ,perl-module-build)))
1333 ;; FIXME: Add optional dependencies once available:
1334 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1335 (inputs
1336 `(("perl-data-dump" ,perl-data-dump)
1337 ("perl-file-sharedir" ,perl-file-sharedir)
1338 ("perl-gtk2" ,perl-gtk2)
1339 ("perl-json" ,perl-json)
1340 ("perl-libwww" ,perl-libwww)
1341 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1342 ("perl-mozilla-ca" ,perl-mozilla-ca)
1343 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1344 (arguments
1345 `(#:modules ((guix build perl-build-system)
1346 (guix build utils)
1347 (srfi srfi-26))
1348 #:module-build-flags '("--gtk")
1349 #:phases
1350 (modify-phases %standard-phases
1351 (add-after 'install 'wrap-program
1352 (lambda* (#:key outputs #:allow-other-keys)
1353 (let* ((out (assoc-ref outputs "out"))
1354 (bin-dir (string-append out "/bin/"))
1355 (site-dir (string-append out "/lib/perl5/site_perl/"))
1356 (lib-path (getenv "PERL5LIB")))
1357 (for-each (cut wrap-program <>
1358 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1359 (find-files bin-dir))
1360 #t))))))
1361 (synopsis
1362 "Lightweight application for searching and streaming videos from YouTube")
1363 (description
1364 "Youtube-viewer searches and plays YouTube videos in a native player.
1365 It comes with various search options; it can search for videos, playlists
1366 and/or channels. The videos are streamed directly in a selected video player
1367 at the best resolution (customizable) and with closed-captions (if available).
1368 Both command-line and GTK2 interface are available.")
1369 (home-page "https://github.com/trizen/youtube-viewer")
1370 (license license:perl-license)))
1371
1372 (define-public libbluray
1373 (package
1374 (name "libbluray")
1375 (version "1.0.2")
1376 (source (origin
1377 (method url-fetch)
1378 (uri (string-append "https://download.videolan.org/videolan/"
1379 name "/" version "/"
1380 name "-" version ".tar.bz2"))
1381 (sha256
1382 (base32
1383 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1384 (build-system gnu-build-system)
1385 (arguments
1386 `(#:configure-flags '("--disable-bdjava-jar")
1387 #:phases
1388 (modify-phases %standard-phases
1389 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1390 ;; Avoid the need to propagate libxml2 by referring to it
1391 ;; directly, as is already done for fontconfig & freetype.
1392 (lambda* (#:key inputs #:allow-other-keys)
1393 (let ((libxml2 (assoc-ref inputs "libxml2")))
1394 (substitute* "configure"
1395 ((" libxml-2.0") ""))
1396 (substitute* "src/libbluray.pc.in"
1397 (("^Libs.private:" field)
1398 (string-append field " -L" libxml2 "/lib -lxml2")))
1399 #t)))
1400 (add-before 'build 'fix-dlopen-paths
1401 (lambda* (#:key inputs #:allow-other-keys)
1402 (let ((libaacs (assoc-ref inputs "libaacs"))
1403 (libbdplus (assoc-ref inputs "libbdplus")))
1404 (substitute* "src/libbluray/disc/aacs.c"
1405 (("\"libaacs\"")
1406 (string-append "\"" libaacs "/lib/libaacs\"")))
1407 (substitute* "src/libbluray/disc/bdplus.c"
1408 (("\"libbdplus\"")
1409 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1410 #t))))))
1411 (native-inputs `(("pkg-config" ,pkg-config)))
1412 (inputs
1413 `(("fontconfig" ,fontconfig)
1414 ("freetype" ,freetype)
1415 ("libaacs" ,libaacs)
1416 ("libbdplus" ,libbdplus)
1417 ("libxml2" ,libxml2)))
1418 (home-page "https://www.videolan.org/developers/libbluray.html")
1419 (synopsis "Blu-Ray Disc playback library")
1420 (description
1421 "libbluray is a library designed for Blu-Ray Disc playback for media
1422 players, like VLC or MPlayer.")
1423 (license license:lgpl2.1+)))
1424
1425 (define-public libdvdread
1426 (package
1427 (name "libdvdread")
1428 (version "6.0.0")
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append "https://download.videolan.org/videolan/"
1432 name "/" version "/"
1433 name "-" version ".tar.bz2"))
1434 (sha256
1435 (base32
1436 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1437 (build-system gnu-build-system)
1438 (arguments
1439 `(#:configure-flags '("--with-libdvdcss=yes")))
1440 (native-inputs
1441 `(("pkg-config" ,pkg-config)))
1442 (propagated-inputs
1443 `(("libdvdcss" ,libdvdcss)))
1444 (home-page "http://dvdnav.mplayerhq.hu/")
1445 (synopsis "Library for reading video DVDs")
1446 (description
1447 "Libdvdread provides a simple foundation for reading DVD video
1448 disks. It provides the functionality that is required to access many
1449 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1450 authentication and descrambling (if an external libdvdcss library is
1451 installed).")
1452 (license license:gpl2+)))
1453
1454 (define-public dvdauthor
1455 (package
1456 (name "dvdauthor")
1457 (version "0.7.2")
1458 (source
1459 (origin
1460 (method url-fetch)
1461 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1462 version ".tar.gz"))
1463 (sha256
1464 (base32
1465 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1466 (build-system gnu-build-system)
1467 (inputs
1468 `(("libdvdread" ,libdvdread)
1469 ("libpng" ,libpng)
1470 ("imagemagick" ,imagemagick)
1471 ("libxml2" ,libxml2)
1472 ("freetype" ,freetype)))
1473 (native-inputs
1474 `(("pkg-config" ,pkg-config)))
1475 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1476 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1477 MPEG-2 stream containing VOB packets.")
1478 (home-page "http://dvdauthor.sourceforge.net")
1479 (license license:gpl3+)))
1480
1481 (define-public libdvdnav
1482 (package
1483 (name "libdvdnav")
1484 (version "6.0.0")
1485 (source (origin
1486 (method url-fetch)
1487 (uri (string-append "https://download.videolan.org/videolan/"
1488 name "/" version "/"
1489 name "-" version ".tar.bz2"))
1490 (sha256
1491 (base32
1492 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1493 (build-system gnu-build-system)
1494 (native-inputs
1495 `(("pkg-config" ,pkg-config)))
1496 (inputs
1497 `(("libdvdread" ,libdvdread)))
1498 (home-page "http://dvdnav.mplayerhq.hu/")
1499 (synopsis "Library for video DVD navigation features")
1500 (description
1501 "Libdvdnav is a library for developers of multimedia
1502 applications. It allows easy use of sophisticated DVD navigation features
1503 such as DVD menus, multiangle playback and even interactive DVD games. All
1504 this functionality is provided through a simple API which provides the DVD
1505 playback as a single logical stream of blocks, intermitted by special
1506 dvdnav events to report certain conditions. The main usage of libdvdnav is
1507 a loop regularly calling a function to get the next block, surrounded by
1508 additional calls to tell the library of user interaction. The whole
1509 DVD virtual machine and internal playback states are completely
1510 encapsulated.")
1511 (license license:gpl2+)))
1512
1513 (define-public libdvdcss
1514 (package
1515 (name "libdvdcss")
1516 (version "1.4.2")
1517 (source (origin
1518 (method url-fetch)
1519 (uri (string-append "https://download.videolan.org/pub/"
1520 name "/" version "/"
1521 name "-" version ".tar.bz2"))
1522 (sha256
1523 (base32
1524 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1525 (build-system gnu-build-system)
1526 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1527 (synopsis "Library for accessing DVDs as block devices")
1528 (description
1529 "libdvdcss is a simple library designed for accessing DVDs like a block
1530 device without having to bother about the decryption.")
1531 (license license:gpl2+)))
1532
1533 (define-public srt2vtt
1534 (package
1535 (name "srt2vtt")
1536 (version "0.1")
1537 (source (origin
1538 (method url-fetch)
1539 (uri (string-append
1540 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1541 version ".tar.gz"))
1542 (sha256
1543 (base32
1544 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1545 (build-system gnu-build-system)
1546 (inputs
1547 `(("guile" ,guile-2.0)))
1548 (synopsis "SubRip to WebVTT subtitle converter")
1549 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1550 for use with HTML5 video.")
1551 (home-page "http://dthompson.us/pages/software/srt2vtt")
1552 (license license:gpl3+)))
1553
1554 (define-public avidemux
1555 (package
1556 (name "avidemux")
1557 (version "2.6.12")
1558 (source (origin
1559 (method url-fetch)
1560 (uri (string-append
1561 "mirror://sourceforge/" name "/" name "/" version "/"
1562 name "_" version ".tar.gz"))
1563 (sha256
1564 (base32
1565 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1566 (patches (search-patches "avidemux-install-to-lib.patch"))))
1567 (build-system cmake-build-system)
1568 (native-inputs
1569 `(("pkg-config" ,pkg-config)))
1570 ;; FIXME: Once packaged, add libraries not found during the build.
1571 (inputs
1572 `(("alsa-lib" ,alsa-lib)
1573 ("fontconfig" ,fontconfig)
1574 ("freetype" ,freetype)
1575 ("fribidi" ,fribidi)
1576 ("glu" ,glu)
1577 ("jack" ,jack-1)
1578 ("lame" ,lame)
1579 ("libva" ,libva)
1580 ("libvdpau" ,libvdpau)
1581 ("libvorbis" ,libvorbis)
1582 ("libvpx" ,libvpx)
1583 ("libxv" ,libxv)
1584 ("perl" ,perl)
1585 ("pulseaudio" ,pulseaudio)
1586 ("python" ,python-wrapper)
1587 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1588 ;("qtbase" ,qtbase) with -std=gnu++11.
1589 ;("qttools" ,qttools)
1590 ("sdl" ,sdl)
1591 ("sqlite" ,sqlite)
1592 ("yasm" ,yasm)
1593 ("zlib" ,zlib)))
1594 (arguments
1595 `(#:tests? #f ; no check target
1596 #:phases
1597 ;; Make sure files inside the included ffmpeg tarball are
1598 ;; patch-shebanged.
1599 (modify-phases %standard-phases
1600 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1601 (lambda _
1602 (with-directory-excursion "avidemux_core/ffmpeg_package"
1603 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1604 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1605 (add-after 'patch-source-shebangs 'repack-ffmpeg
1606 (lambda _
1607 (with-directory-excursion "avidemux_core/ffmpeg_package"
1608 (substitute* "ffmpeg-2.7.6/configure"
1609 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1610 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1611 ;; avoid non-determinism in the archive
1612 "--sort=name" "--mtime=@0"
1613 "--owner=root:0" "--group=root:0")
1614 (delete-file-recursively "ffmpeg-2.7.6"))))
1615 (replace 'configure
1616 (lambda _
1617 ;; Copy-paste settings from the cmake build system.
1618 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1619 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1620 (replace 'build
1621 (lambda* (#:key inputs outputs #:allow-other-keys)
1622 (let*
1623 ((out (assoc-ref outputs "out"))
1624 (lib (string-append out "/lib"))
1625 (top (getcwd))
1626 (sdl (assoc-ref inputs "sdl"))
1627 (build_component
1628 (lambda* (component srcdir #:optional (args '()))
1629 (let ((builddir (string-append "build_" component)))
1630 (mkdir builddir)
1631 (with-directory-excursion builddir
1632 (zero?
1633 (and
1634 (apply system* "cmake"
1635 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1636 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1637 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1638 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1639 "\"-Wl,-rpath=" lib "\"")
1640 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1641 (string-append "-DSDL_INCLUDE_DIR="
1642 sdl "/include/SDL")
1643 (string-append "../" srcdir)
1644 "-DENABLE_QT5=True"
1645 args)
1646 (system* "make" "-j"
1647 (number->string (parallel-job-count)))
1648 (system* "make" "install"))))))))
1649 (mkdir out)
1650 (and (build_component "core" "avidemux_core")
1651 (build_component "cli" "avidemux/cli")
1652 (build_component "qt4" "avidemux/qt4")
1653 (build_component "plugins_common" "avidemux_plugins"
1654 '("-DPLUGIN_UI=COMMON"))
1655 (build_component "plugins_cli" "avidemux_plugins"
1656 '("-DPLUGIN_UI=CLI"))
1657 (build_component "plugins_qt4" "avidemux_plugins"
1658 '("-DPLUGIN_UI=QT4"))
1659 (build_component "plugins_settings" "avidemux_plugins"
1660 '("-DPLUGIN_UI=SETTINGS")))
1661 ;; Remove .exe and .dll file.
1662 (delete-file-recursively
1663 (string-append out "/share/ADM6_addons")))))
1664 (delete 'install))))
1665 (home-page "http://fixounet.free.fr/avidemux/")
1666 (synopsis "Video editor")
1667 (description "Avidemux is a video editor designed for simple cutting,
1668 filtering and encoding tasks. It supports many file types, including AVI,
1669 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1670 can be automated using projects, job queue and powerful scripting
1671 capabilities.")
1672 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1673 ;; Software with various licenses is included, see License.txt.
1674 (license license:gpl2+)))
1675
1676 (define-public vapoursynth
1677 (package
1678 (name "vapoursynth")
1679 (version "37")
1680 (source (origin
1681 (method url-fetch)
1682 (uri (string-append
1683 "https://github.com/vapoursynth/vapoursynth/archive/R"
1684 version ".tar.gz"))
1685 (file-name (string-append name "-" version ".tar.gz"))
1686 (sha256
1687 (base32
1688 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1689 (build-system gnu-build-system)
1690 (native-inputs
1691 `(("autoconf" ,autoconf)
1692 ("automake" ,automake)
1693 ("cython" ,python-cython)
1694 ("libtool" ,libtool)
1695 ("pkg-config" ,pkg-config)
1696 ("python" ,python)
1697 ("yasm" ,yasm)))
1698 (inputs
1699 `(("ffmpeg" ,ffmpeg)
1700 ("libass" ,libass)
1701 ("tesseract-ocr" ,tesseract-ocr)
1702 ("zimg" ,zimg)))
1703 (arguments
1704 '(#:phases
1705 (modify-phases %standard-phases
1706 (add-after
1707 'unpack 'autogen
1708 (lambda _
1709 (zero? (system* "sh" "autogen.sh")))))))
1710 (home-page "http://www.vapoursynth.com/")
1711 (synopsis "Video processing framework")
1712 (description "VapourSynth is a C++ library and Python module for video
1713 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1714 multithreading, generalized colorspaces, per frame properties, and videos with
1715 format changes.")
1716 ;; src/core/cpufeatures only allows x86, ARM or PPC
1717 (supported-systems (fold delete %supported-systems
1718 '("mips64el-linux" "aarch64-linux")))
1719 ;; As seen from the source files.
1720 (license license:lgpl2.1+)))
1721
1722 (define-public xvid
1723 (package
1724 (name "xvid")
1725 (version "1.3.4")
1726 (source (origin
1727 (method url-fetch)
1728 (uri (string-append
1729 "http://downloads.xvid.org/downloads/xvidcore-"
1730 version ".tar.bz2"))
1731 (sha256
1732 (base32
1733 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1734 (build-system gnu-build-system)
1735 (native-inputs `(("yasm" ,yasm)))
1736 (arguments
1737 '(#:phases
1738 (modify-phases %standard-phases
1739 (add-before
1740 'configure 'pre-configure
1741 (lambda _
1742 (chdir "build/generic")
1743 (substitute* "configure"
1744 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1745 ;; No 'check' target.
1746 #:tests? #f))
1747 (home-page "https://www.xvid.com/")
1748 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1749 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1750 codec library. It uses ASP features such as b-frames, global and quarter
1751 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1752 and custom quantization matrices.")
1753 (license license:gpl2+)))
1754
1755 (define-public streamlink
1756 (package
1757 (name "streamlink")
1758 (version "0.11.0")
1759 (source
1760 (origin
1761 (method url-fetch)
1762 (uri (pypi-uri "streamlink" version))
1763 (sha256
1764 (base32
1765 "02h8b3k8l5zz4vjm0nhxvl1pm924jms8y7sjl40fbybrzvsa4mg2"))))
1766 (build-system python-build-system)
1767 (home-page "https://github.com/streamlink/streamlink")
1768 (native-inputs
1769 `(("python-pytest" ,python-pytest)
1770 ("python-mock" ,python-mock)
1771 ("python-requests-mock" ,python-requests-mock)))
1772 (propagated-inputs
1773 `(("python-pysocks" ,python-pysocks)
1774 ("python-websocket-client" ,python-websocket-client)
1775 ("python-iso3166" ,python-iso3166)
1776 ("python-iso639" ,python-iso639)
1777 ("python-pycryptodome" ,python-pycryptodome)
1778 ("python-requests" ,python-requests)
1779 ("python-urllib3" ,python-urllib3)))
1780 (synopsis "Extract streams from various services")
1781 (description "Streamlink is command-line utility that extracts streams
1782 from sites like Twitch.tv and pipes them into a video player of choice.")
1783 (license license:bsd-2)))
1784
1785 (define-public livestreamer
1786 (deprecated-package "livestreamer" streamlink))
1787
1788 (define-public twitchy
1789 (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
1790 (package
1791 (name "twitchy")
1792 (version (git-version "3.2" "1" commit))
1793 (source
1794 (origin
1795 (method git-fetch)
1796 (uri (git-reference
1797 (url "https://github.com/BasioMeusPuga/twitchy.git")
1798 (commit commit)))
1799 (file-name (git-file-name name version))
1800 (sha256
1801 (base32
1802 "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
1803 (build-system python-build-system)
1804 (arguments
1805 '(#:phases
1806 (modify-phases %standard-phases
1807 (add-before 'check 'check-setup
1808 (lambda _
1809 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
1810 #t)))))
1811 (inputs
1812 `(("python-requests" ,python-requests)
1813 ("streamlink" ,streamlink)))
1814 (home-page "https://github.com/BasioMeusPuga/twitchy")
1815 (synopsis "Command-line interface for Twitch.tv")
1816 (description
1817 "This package provides a command-line interface for Twitch.tv")
1818 (license license:gpl3+))))
1819
1820 (define-public mlt
1821 (package
1822 (name "mlt")
1823 (version "6.4.1")
1824 (source (origin
1825 (method url-fetch)
1826 (uri (string-append "https://github.com/mltframework/mlt/"
1827 "archive/v" version ".tar.gz"))
1828 (file-name (string-append name "-" version ".tar.gz"))
1829 (sha256
1830 (base32
1831 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
1832 (modules '((guix build utils)))
1833 (snippet
1834 ;; As of glibc 2.26, <xlocale.h> no longer is.
1835 '(substitute* "src/framework/mlt_property.h"
1836 (("xlocale\\.h") "locale.h")))))
1837 (build-system gnu-build-system)
1838 (arguments
1839 `(#:tests? #f ; no tests
1840 #:make-flags '("CC=gcc")
1841 #:configure-flags
1842 (list "--enable-gpl3"
1843 "--enable-gpl")
1844 #:phases
1845 (modify-phases %standard-phases
1846 (add-after
1847 'configure 'override-LDFLAGS
1848 (lambda* (#:key outputs #:allow-other-keys)
1849 (substitute* "config.mak"
1850 (("LDFLAGS\\+=")
1851 (string-append "LDFLAGS+=-Wl,-rpath="
1852 (assoc-ref outputs "out")
1853 "/lib ")))
1854 #t)))))
1855 (inputs
1856 `(("alsa-lib" ,alsa-lib)
1857 ("ffmpeg" ,ffmpeg)
1858 ("fftw" ,fftw)
1859 ("libxml2" ,libxml2)
1860 ("jack" ,jack-1)
1861 ("ladspa" ,ladspa)
1862 ("libsamplerate" ,libsamplerate)
1863 ("pulseaudio" ,pulseaudio)
1864 ("sdl" ,sdl)
1865 ("sox" ,sox)))
1866 (native-inputs
1867 `(("pkg-config" ,pkg-config)))
1868 (home-page "https://www.mltframework.org/")
1869 (synopsis "Author, manage, and run multitrack audio/video compositions")
1870 (description
1871 "MLT is a multimedia framework, designed and developed for television
1872 broadcasting. It provides a toolkit for broadcasters, video editors, media
1873 players, transcoders, web streamers and many more types of applications. The
1874 functionality of the system is provided via an assortment of ready to use
1875 tools, XML authoring components, and an extensible plug-in based API.")
1876 (license license:gpl3)))
1877
1878 (define-public v4l-utils
1879 (package
1880 (name "v4l-utils")
1881 (version "1.12.5")
1882 (source (origin
1883 (method url-fetch)
1884 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1885 "/v4l-utils-" version ".tar.bz2"))
1886 (sha256
1887 (base32
1888 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1889 (build-system gnu-build-system)
1890 (arguments
1891 '(#:configure-flags
1892 (list (string-append "--with-udevdir="
1893 (assoc-ref %outputs "out")
1894 "/lib/udev")
1895 "CXXFLAGS=-std=gnu++11")))
1896 (native-inputs
1897 `(("perl" ,perl)
1898 ("pkg-config" ,pkg-config)))
1899 (inputs
1900 `(("alsa-lib" ,alsa-lib)
1901 ("glu" ,glu)
1902 ("libjpeg" ,libjpeg)
1903 ("libx11" ,libx11)
1904 ("qtbase" ,qtbase)
1905 ("eudev" ,eudev)))
1906 (synopsis "Realtime video capture utilities for Linux")
1907 (description "The v4l-utils provide a series of libraries and utilities to
1908 be used for realtime video capture via Linux-specific APIs.")
1909 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1910 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1911 (license (list license:lgpl2.1+ license:gpl2))))
1912
1913 (define-public obs
1914 (package
1915 (name "obs")
1916 (version "20.1.3")
1917 (source (origin
1918 (method url-fetch)
1919 (uri (string-append "https://github.com/jp9000/obs-studio"
1920 "/archive/" version ".tar.gz"))
1921 (file-name (string-append name "-" version ".tar.gz"))
1922 (sha256
1923 (base32
1924 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1925 (build-system cmake-build-system)
1926 (arguments
1927 `(#:tests? #f)) ; no tests
1928 (native-inputs
1929 `(("pkg-config" ,pkg-config)))
1930 (inputs
1931 `(("alsa-lib" ,alsa-lib)
1932 ("curl" ,curl)
1933 ("eudev" ,eudev)
1934 ("ffmpeg" ,ffmpeg)
1935 ("fontconfig" ,fontconfig)
1936 ("freetype" ,freetype)
1937 ("jack" ,jack-1)
1938 ("jansson" ,jansson)
1939 ("libx264" ,libx264)
1940 ("libxcomposite" ,libxcomposite)
1941 ("mesa" ,mesa)
1942 ("pulseaudio" ,pulseaudio)
1943 ("qtbase" ,qtbase)
1944 ("qtx11extras" ,qtx11extras)
1945 ("speex" ,speex)
1946 ("v4l-utils" ,v4l-utils)
1947 ("zlib" ,zlib)))
1948 (synopsis "Live streaming software")
1949 (description "Open Broadcaster Software provides a graphical interface for
1950 video recording and live streaming. OBS supports capturing audio and video
1951 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1952 and JACK.")
1953 (home-page "https://obsproject.com")
1954 (supported-systems '("x86_64-linux" "i686-linux"))
1955 (license license:gpl2+)))
1956
1957 (define-public libvdpau
1958 (package
1959 (name "libvdpau")
1960 (version "1.1.1")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1965 name "-" version ".tar.bz2"))
1966 (sha256
1967 (base32
1968 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1969 (build-system gnu-build-system)
1970 (native-inputs
1971 `(("pkg-config" ,pkg-config)))
1972 (inputs
1973 `(("dri2proto" ,dri2proto)
1974 ("libx11" ,libx11 "out")
1975 ("libxext" ,libxext)))
1976 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1977 (synopsis "Video Decode and Presentation API")
1978 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1979 provides an interface to video decode acceleration and presentation hardware
1980 present in modern GPUs.")
1981 (license (license:x11-style "file://COPYING"))))
1982
1983 (define-public vdpauinfo
1984 (package
1985 (name "vdpauinfo")
1986 (version "1.0")
1987 (source
1988 (origin
1989 (method url-fetch)
1990 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1991 name "-" version ".tar.gz"))
1992 (sha256
1993 (base32
1994 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1995 (build-system gnu-build-system)
1996 (native-inputs
1997 `(("pkg-config" ,pkg-config)
1998 ("libx11" ,libx11)))
1999 (propagated-inputs
2000 `(("libvdpau" ,libvdpau)))
2001 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2002 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2003 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2004 implementation.")
2005 (license (license:x11-style "file://COPYING"))))
2006
2007 (define-public libvdpau-va-gl
2008 (package
2009 (name "libvdpau-va-gl")
2010 (version "0.4.2")
2011 (source
2012 (origin
2013 (method url-fetch)
2014 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2015 "releases/download/v" version "/libvdpau-va-gl-"
2016 version ".tar.gz"))
2017 (sha256
2018 (base32
2019 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2020 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2021 (modules '((guix build utils)))
2022 (snippet '(delete-file-recursively "3rdparty"))))
2023 (build-system cmake-build-system)
2024 (arguments
2025 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2026 (native-inputs
2027 `(("libvdpau" ,libvdpau)
2028 ("pkg-config" ,pkg-config)))
2029 (inputs
2030 `(("libva" ,libva)
2031 ("mesa" ,mesa)))
2032 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2033 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2034 (description
2035 "Many applications can use VDPAU to accelerate portions of the video
2036 decoding process and video post-processing to the GPU video hardware. Since
2037 there is no VDPAU available on Intel chips, they fall back to different drawing
2038 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2039 scaling and VA-API (if available) to accelerate video decoding.")
2040 (license license:expat)))
2041
2042 (define-public recordmydesktop
2043 (package
2044 (name "recordmydesktop")
2045 (version "0.3.8.1")
2046 (source (origin
2047 (method url-fetch)
2048 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2049 version "/recordmydesktop-" version ".tar.gz"))
2050 (sha256
2051 (base32
2052 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2053 (build-system gnu-build-system)
2054 (inputs `(("popt" ,popt)
2055 ("zlib" ,zlib)
2056 ("libx11" ,libx11)
2057 ("libice" ,libice)
2058 ("libsm" ,libsm)
2059 ("libxfixes" ,libxfixes)
2060 ("libxdamage" ,libxdamage)
2061 ("libxext" ,libxext)
2062 ("alsa-lib" ,alsa-lib)
2063 ("libvorbis" ,libvorbis)
2064 ("libtheora" ,libtheora)))
2065 (home-page "http://recordmydesktop.sourceforge.net/")
2066 (synopsis "Desktop session video recorder")
2067 (description
2068 "recordMyDesktop is a command-line tool that captures the activity in
2069 your graphical desktop and encodes it as a video. This is a useful tool for
2070 making @dfn{screencasts}.")
2071 (license license:gpl2+)))
2072
2073 (define-public simplescreenrecorder
2074 (package
2075 (name "simplescreenrecorder")
2076 (version "0.3.10")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2081 version ".tar.gz"))
2082 (file-name (string-append name "-" version ".tar.gz"))
2083 (sha256
2084 (base32
2085 "02rl9yyx3hlz9fqvgzv7ipmvx2qahj7ws5wx2m7zs3lssq3qag3g"))))
2086 (build-system cmake-build-system)
2087 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2088 ;; README.md, the program builds and functions properly without them.
2089 ;; As a result, they are omitted. Please add them back if problems appear.
2090 (inputs
2091 `(("alsa-lib" ,alsa-lib)
2092 ("ffmpeg" ,ffmpeg)
2093 ("glu" ,glu)
2094 ("jack" ,jack-1)
2095 ("libxi" ,libxi)
2096 ("pulseaudio" ,pulseaudio)
2097 ("qt" ,qt)))
2098 (native-inputs `(("pkg-config" ,pkg-config)))
2099 (arguments
2100 `(#:configure-flags
2101 (list "-DWITH_QT5=TRUE")
2102 #:tests? #f)) ; no test suite
2103 ;; Using HTTPS causes part of the page to be displayed improperly.
2104 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2105 (synopsis "Screen recorder")
2106 (description "SimpleScreenRecorder is an easy to use screen recorder with
2107 a graphical user interface. It supports recording the entire screen, or a
2108 part of it, and allows encoding in many different codecs and file formats.
2109 Other features include a live preview and live streaming.")
2110 (license (list license:gpl3+ ; most files
2111 license:zlib ; glinject/elfhacks.*
2112 license:isc ; glinject/*
2113 license:x11)))) ; build-aux/install-sh
2114
2115 (define-public libsmpeg
2116 (package
2117 (name "libsmpeg")
2118 (version "0.4.5")
2119 (source (origin
2120 (method svn-fetch)
2121 (uri (svn-reference
2122 (url "svn://svn.icculus.org/smpeg/trunk/")
2123 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2124 (file-name (string-append name "-" version "-checkout"))
2125 (sha256
2126 (base32
2127 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2128 (build-system gnu-build-system)
2129 (arguments
2130 `(#:phases (modify-phases %standard-phases
2131 (add-after 'unpack 'autogen.sh
2132 (lambda _
2133 (zero? (system* "sh" "autogen.sh")))))))
2134 (native-inputs
2135 `(("autoconf" ,autoconf)
2136 ("automake" ,automake)))
2137 (inputs
2138 `(("sdl" ,sdl2)))
2139 (home-page "http://icculus.org/smpeg/")
2140 (synopsis "SDL MPEG decoding library")
2141 (description
2142 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2143 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2144 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2145 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2146 and MPEG system streams.")
2147 (license (list license:expat
2148 license:lgpl2.1
2149 license:lgpl2.1+
2150 license:gpl2))))
2151
2152 (define-public libbdplus
2153 (package
2154 (name "libbdplus")
2155 (version "0.1.2")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2160 version "/" name "-" version ".tar.bz2"))
2161 (sha256
2162 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2163 (inputs
2164 `(("libgcrypt" ,libgcrypt)))
2165 (build-system gnu-build-system)
2166 (home-page "https://www.videolan.org/developers/libbdplus.html")
2167 (synopsis "Library for decrypting certain Blu-Ray discs")
2168 (description "libbdplus is a library which implements the BD+ System
2169 specifications.")
2170 (license license:lgpl2.1+)))
2171
2172 (define-public libaacs
2173 (package
2174 (name "libaacs")
2175 (version "0.9.0")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2180 version "/" name "-" version ".tar.bz2"))
2181 (sha256
2182 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2183 (inputs
2184 `(("libgcrypt" ,libgcrypt)))
2185 (native-inputs
2186 `(("bison" ,bison)
2187 ("flex" ,flex)))
2188 (build-system gnu-build-system)
2189 (home-page "https://www.videolan.org/developers/libaacs.html")
2190 (synopsis "Library for decrypting certain Blu-Ray discs")
2191 (description "libaacs is a library which implements the Advanced Access
2192 Content System specification.")
2193 (license license:lgpl2.1+)))
2194
2195 (define-public mps-youtube
2196 (package
2197 (name "mps-youtube")
2198 (version "0.2.7.1")
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2203 "archive/v" version ".tar.gz"))
2204 (file-name (string-append name "-" version ".tar.gz"))
2205 (sha256
2206 (base32
2207 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
2208 (build-system python-build-system)
2209 (arguments
2210 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2211 ;; test suite results differ depending on the country and also introduce
2212 ;; non-determinism in the tests.
2213 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2214 `(#:tests? #f))
2215 (propagated-inputs
2216 `(("python-pafy" ,python-pafy)
2217 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2218 (home-page "https://github.com/mps-youtube/mps-youtube")
2219 (synopsis "Terminal based YouTube player and downloader")
2220 (description
2221 "@code{mps-youtube} is based on mps, a terminal based program to
2222 search, stream and download music. This implementation uses YouTube as
2223 a source of content and can play and download video as well as audio.
2224 It can use either mpv or mplayer for playback, and for conversion of
2225 formats ffmpeg or libav is used. Users should install one of the
2226 supported players in addition to this package.")
2227 (license license:gpl3+)))
2228
2229 (define-public handbrake
2230 (package
2231 (name "handbrake")
2232 (version "0.10.5")
2233 (source (origin
2234 (method url-fetch)
2235 (uri (string-append "https://handbrake.fr/rotation.php?file="
2236 "HandBrake-" version ".tar.bz2"))
2237 (file-name (string-append "handbrake-" version ".tar.bz2"))
2238 (sha256
2239 (base32
2240 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2241 (patches (search-patches "handbrake-pkg-config-path.patch"))
2242 (modules '((guix build utils)))
2243 (snippet
2244 ;; Remove bundled libraries and source not necessary for
2245 ;; running under a GNU environment.
2246 '(begin
2247 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2248 #t))))
2249 (build-system glib-or-gtk-build-system)
2250 (native-inputs
2251 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2252 ("autoconf" ,autoconf)
2253 ("curl" ,curl) ;not actually used, but tested for
2254 ("intltool" ,intltool)
2255 ("libtool" ,libtool)
2256 ("pkg-config" ,pkg-config)
2257 ("python" ,python-2))) ;for configuration
2258 (inputs
2259 `(("bzip2" ,bzip2)
2260 ("dbus-glib" ,dbus-glib)
2261 ("ffmpeg" ,ffmpeg)
2262 ("fontconfig" ,fontconfig)
2263 ("freetype" ,freetype)
2264 ("glib" ,glib)
2265 ("gstreamer" ,gstreamer)
2266 ("gst-plugins-base" ,gst-plugins-base)
2267 ("gtk+" ,gtk+)
2268 ("lame" ,lame)
2269 ("libass" ,libass)
2270 ("libbluray" ,libbluray)
2271 ("libdvdnav" ,libdvdnav)
2272 ("libdvdread" ,libdvdread)
2273 ("libgudev" ,libgudev)
2274 ("libmpeg2" ,libmpeg2)
2275 ("libnotify" ,libnotify)
2276 ("libogg" ,libogg)
2277 ("libsamplerate" ,libsamplerate)
2278 ("libtheora" ,libtheora)
2279 ("libvorbis" ,libvorbis)
2280 ("libvpx" ,libvpx)
2281 ("libxml2" ,libxml2)
2282 ("libx264" ,libx264)
2283 ("x265" ,x265)
2284 ("zlib" ,zlib)))
2285 (arguments
2286 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2287 #:phases
2288 (modify-phases %standard-phases
2289 (add-before 'patch-source-shebangs 'bootstrap-gtk
2290 ;; Run bootstrap ahead of time so that shebangs get patched.
2291 (lambda _
2292 (setenv "CONFIG_SHELL" (which "sh"))
2293 (setenv "NOCONFIGURE" "1")
2294 ;; Patch the Makefile so that it doesn't bootstrap again.
2295 (substitute* "gtk/module.rules"
2296 ((".*autogen\\.sh.*") ""))
2297 (zero? (system* "sh" "./gtk/autogen.sh"))))
2298 (add-before 'configure 'disable-contrib
2299 (lambda _
2300 (substitute* "make/include/main.defs"
2301 ;; Disable unconditional inclusion of some "contrib"
2302 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2303 ;; and libbluray), which would lead to fetching and
2304 ;; building of these libraries. Use our own instead.
2305 (("MODULES \\+= contrib") "# MODULES += contrib"))
2306 #t))
2307 (add-before 'configure 'fix-x265-linking
2308 (lambda _
2309 (substitute* "test/module.defs"
2310 ;; Fix missing library during linking error
2311 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2312 #t))
2313 (replace 'configure
2314 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2315 ;; 'configure' is not an autoconf-generated script, and
2316 ;; errors on unrecognized arguments,
2317 ;; e.g. --enable-fast-install
2318 (let ((out (assoc-ref outputs "out")))
2319 (zero? (apply system* "./configure"
2320 (string-append "--prefix=" out)
2321 (or configure-flags '()))))))
2322 (add-after 'configure 'chdir-build
2323 (lambda _ (chdir "./build") #t)))))
2324 (home-page "https://handbrake.fr")
2325 (synopsis "Video transcoder")
2326 (description
2327 "HandBrake is a tool for converting video from any format to a selection
2328 of modern, widely supported codecs.")
2329 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2330 (license (list license:gpl2+ license:bsd-3))))
2331
2332 (define-public openh264
2333 (package
2334 (name "openh264")
2335 (version "1.7.0")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (string-append "https://github.com/cisco/"
2339 name "/archive/v" version ".tar.gz"))
2340 (file-name (string-append name "-" version ".tar.gz"))
2341 (sha256
2342 (base32
2343 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2344 (build-system gnu-build-system)
2345 (native-inputs
2346 `(("nasm" ,nasm)
2347 ("python" ,python)))
2348 (arguments
2349 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2350 "CC=gcc")
2351 #:test-target "test"
2352 #:phases (modify-phases %standard-phases
2353 ;; no configure script
2354 (delete 'configure))))
2355 (home-page "http://www.openh264.org/")
2356 (synopsis "H264 decoder library")
2357 (description
2358 "Openh264 is a library which can decode H264 video streams.")
2359 (license license:bsd-2)))
2360
2361 (define-public libmp4v2
2362 (package
2363 (name "libmp4v2")
2364 (version "2.0.0")
2365 (source
2366 (origin
2367 (method url-fetch)
2368 ;; XXX: The new location of upstream is uncertain and will become relevant the
2369 ;; moment when the googlecode archive shuts down. It is past the date it
2370 ;; should've been turned off. I tried to communicate with upstream, but this
2371 ;; wasn't very responsive and not very helpful. The short summary is, it is
2372 ;; chaos when it comes to the amount of forks and only time will tell where
2373 ;; the new upstream location is.
2374 (uri (string-append "https://storage.googleapis.com/google-"
2375 "code-archive-downloads/v2/"
2376 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2377 (file-name (string-append name "-" version ".tar.bz2"))
2378 (sha256
2379 (base32
2380 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2381 (build-system gnu-build-system)
2382 (outputs '("out"
2383 "static")) ; 3.7MiB .a file
2384 (arguments
2385 `(#:phases
2386 (modify-phases %standard-phases
2387 (add-after 'unpack 'remove-dates
2388 (lambda _
2389 ;; Make the build reproducible.
2390 (substitute* "configure"
2391 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2392 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2393 #t))
2394 (add-after 'install 'move-static-libraries
2395 (lambda* (#:key outputs #:allow-other-keys)
2396 ;; Move static libraries to the "static" output.
2397 (let* ((out (assoc-ref outputs "out"))
2398 (lib (string-append out "/lib"))
2399 (static (assoc-ref outputs "static"))
2400 (slib (string-append static "/lib")))
2401 (mkdir-p slib)
2402 (for-each (lambda (file)
2403 (install-file file slib)
2404 (delete-file file))
2405 (find-files lib "\\.a$"))
2406 #t))))))
2407 (native-inputs
2408 `(("help2man" ,help2man)
2409 ("dejagnu" ,dejagnu)))
2410 (home-page "https://code.google.com/archive/p/mp4v2/")
2411 (synopsis "API to create and modify mp4 files")
2412 (description
2413 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2414 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2415 file format that has been used as a multimedia file format in a variety of platforms and
2416 applications. It is a very powerful and extensible format that can accommodate
2417 practically any type of media.")
2418 (license license:mpl1.1)))
2419
2420 (define-public libmediainfo
2421 (package
2422 (name "libmediainfo")
2423 (version "0.7.95")
2424 (source (origin
2425 (method url-fetch)
2426 (uri (string-append "https://mediaarea.net/download/source/"
2427 name "/" version"/"
2428 name "_" version ".tar.bz2"))
2429 (sha256
2430 (base32
2431 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2432 ;; TODO add a Big Buck Bunny webm for tests.
2433 (native-inputs
2434 `(("autoconf" ,autoconf)
2435 ("automake" ,automake)
2436 ("libtool" ,libtool)
2437 ("pkg-config" ,pkg-config)
2438 ("zlib" ,zlib)
2439 ("tinyxml2" ,tinyxml2)
2440 ("curl" ,curl)
2441 ("libzen" ,libzen)))
2442 (build-system gnu-build-system)
2443 (arguments
2444 '(#:tests? #f ; see above TODO
2445 #:phases
2446 ;; build scripts not in root of archive
2447 (modify-phases %standard-phases
2448 (add-after 'unpack 'change-to-build-dir
2449 (lambda _
2450 (chdir "Project/GNU/Library")
2451 #t))
2452 (add-after 'change-to-build-dir 'autogen
2453 (lambda _
2454 (zero? (system* "sh" "autogen.sh")))))))
2455 (home-page "https://mediaarea.net/en/MediaInfo")
2456 (synopsis "Library for retrieving media metadata")
2457 (description "MediaInfo is a library used for retrieving technical
2458 information and other metadata about audio or video files. A non-exhaustive
2459 list of the information MediaInfo can retrieve from media files include:
2460
2461 @itemize
2462 @item General: title, author, director, album, track number, date, duration...
2463 @item Video: codec, aspect, fps, bitrate...
2464 @item Audio: codec, sample rate, channels, language, bitrate...
2465 @item Text: language of subtitle
2466 @item Chapters: number of chapters, list of chapters
2467 @end itemize
2468
2469 MediaInfo supports the following formats:
2470
2471 @itemize
2472 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2473 MPEG-2, MPEG-4, DVD (VOB)...
2474 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2475 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2476 @item Subtitles: SRT, SSA, ASS, SAMI...
2477 @end itemize\n")
2478 (license license:bsd-2)))
2479
2480 ;; TODO also have a GUI version available
2481 (define-public mediainfo
2482 (package
2483 (name "mediainfo")
2484 (version "0.7.95")
2485 (source (origin
2486 (method url-fetch)
2487 (uri (string-append "https://mediaarea.net/download/source/"
2488 name "/" version "/"
2489 name "_" version ".tar.bz2"))
2490 (sha256
2491 (base32
2492 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2493 (native-inputs
2494 `(("autoconf" ,autoconf)
2495 ("automake" ,automake)
2496 ("libtool" ,libtool)
2497 ("pkg-config" ,pkg-config)
2498 ("zlib" ,zlib)
2499 ("libmediainfo" ,libmediainfo)
2500 ("libzen" ,libzen)))
2501 (build-system gnu-build-system)
2502 (arguments
2503 '(#:tests? #f ; lacks tests
2504 #:phases
2505 ;; build scripts not in root of archive
2506 (modify-phases %standard-phases
2507 (add-after 'unpack 'change-to-build-dir
2508 (lambda _
2509 (chdir "Project/GNU/CLI")
2510 #t))
2511 (add-after 'change-to-build-dir 'autogen
2512 (lambda _
2513 (zero? (system* "sh" "autogen.sh")))))))
2514 (home-page "https://mediaarea.net/en/MediaInfo")
2515 (synopsis "Utility for reading media metadata")
2516 (description "MediaInfo is a utility used for retrieving technical
2517 information and other metadata about audio or video files. It supports the
2518 many codecs and formats supported by libmediainfo.")
2519 (license license:bsd-2)))
2520
2521 (define-public livemedia-utils
2522 (package
2523 (name "livemedia-utils")
2524 (version "2017.10.28")
2525 (source (origin
2526 (method url-fetch)
2527 (uri (string-append
2528 "https://download.videolan.org/contrib/live555/live."
2529 version ".tar.gz"))
2530 (sha256
2531 (base32
2532 "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
2533 (modules '((guix build utils)))
2534 (snippet
2535 ;; As of glibc 2.26, <xlocale.h> no longer is.
2536 '(substitute* "liveMedia/include/Locale.hh"
2537 (("xlocale\\.h") "locale.h")))))
2538 (build-system gnu-build-system)
2539 (arguments
2540 '(#:tests? #f ; no tests
2541 #:make-flags (list "CC=gcc"
2542 (string-append "LDFLAGS=-Wl,-rpath="
2543 (assoc-ref %outputs "out") "/lib")
2544 (string-append "PREFIX="
2545 (assoc-ref %outputs "out")))
2546 #:phases (modify-phases %standard-phases
2547 (add-before 'configure 'fix-makefiles-generation
2548 (lambda _
2549 (substitute* "genMakefiles"
2550 (("/bin/rm") "rm"))
2551 #t))
2552 (replace 'configure
2553 (lambda _
2554 (zero? (system* "./genMakefiles"
2555 "linux-with-shared-libraries")))))))
2556 (home-page "http://www.live555.com/liveMedia/")
2557 (synopsis "Set of C++ libraries for multimedia streaming")
2558 (description "This code forms a set of C++ libraries for multimedia
2559 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2560 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2561 JPEG video, and several audio codecs. They can easily be extended to support
2562 additional (audio and/or video) codecs, and can also be used to build basic
2563 RTSP or SIP clients and servers.")
2564 (license license:lgpl3+)))
2565
2566 (define-public libdvbpsi
2567 (package
2568 (name "libdvbpsi")
2569 (version "1.3.2")
2570 (source (origin
2571 (method url-fetch)
2572 (uri (string-append
2573 "https://download.videolan.org/pub/libdvbpsi/"
2574 version "/libdvbpsi-" version ".tar.bz2"))
2575 (sha256
2576 (base32
2577 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2578 (build-system gnu-build-system)
2579 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2580 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2581 tables")
2582 (description "libdvbpsi is a simple library designed for decoding and
2583 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2584 and ITU-T H.222.0.")
2585 (license license:lgpl2.1)))
2586
2587 (define-public ffms2
2588 (package
2589 (name "ffms2")
2590 (version "2.23")
2591 (home-page "https://github.com/FFMS/ffms2")
2592 (source (origin
2593 (method url-fetch)
2594 (uri (string-append home-page "/archive/" version ".tar.gz"))
2595 (file-name (string-append name "-" version ".tar.gz"))
2596 (sha256
2597 (base32
2598 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2599 (build-system gnu-build-system)
2600 (arguments
2601 '(#:configure-flags
2602 (list "--enable-avresample")))
2603 (inputs
2604 `(("zlib" ,zlib)))
2605 (propagated-inputs
2606 `(("ffmpeg" ,ffmpeg)))
2607 (native-inputs
2608 `(("pkg-config" ,pkg-config)))
2609 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2610 (description
2611 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2612 programmers to access a standard API to open and decompress media files.")
2613 ;; sources are distributed under a different license that the binary.
2614 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2615 (license license:gpl2+))); inherits from ffmpeg
2616
2617 (define-public aegisub
2618 (package
2619 (name "aegisub")
2620 (version "3.2.2")
2621 (source (origin
2622 (method url-fetch)
2623 (uri (string-append
2624 "http://ftp.aegisub.org/pub/archives/releases/source/"
2625 name "-" version ".tar.xz"))
2626 (sha256
2627 (base32
2628 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2629 (build-system gnu-build-system)
2630 (arguments
2631 `(#:configure-flags
2632 (list "--disable-update-checker"
2633 "--without-portaudio"
2634 "--without-openal"
2635 "--without-oss")
2636 ;; tests require busted, a lua package we don't have yet
2637 #:tests? #f
2638 #:phases
2639 (modify-phases %standard-phases
2640 (add-before 'configure 'fix-ldflags
2641 (lambda _
2642 (setenv "LDFLAGS" "-pthread"))))))
2643 (inputs
2644 `(("boost" ,boost)
2645 ("desktop-file-utils" ,desktop-file-utils)
2646 ("ffms2" ,ffms2)
2647 ("fftw" ,fftw)
2648 ("hunspell" ,hunspell)
2649 ("mesa" ,mesa)
2650 ("libass" ,libass)
2651 ("alsa-lib" ,alsa-lib)
2652 ("pulseaudio" ,pulseaudio)
2653 ("libx11" ,libx11)
2654 ("freetype" ,freetype)
2655 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2656 (native-inputs
2657 `(("intltool" ,intltool)
2658 ("pkg-config" ,pkg-config)))
2659 (home-page "http://www.aegisub.org/")
2660 (synopsis "Subtitle engine")
2661 (description
2662 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2663 it quick and easy to time subtitles to audio, and features many powerful
2664 tools for styling them, including a built-in real-time video preview.")
2665 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2666 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2667 license:expat)))) ; and src/gl that is under a license similar
2668 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2669 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2670 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2671
2672 (define-public gst-transcoder
2673 (package
2674 (name "gst-transcoder")
2675 (version "1.12.2")
2676 (source
2677 (origin
2678 (method url-fetch)
2679 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2680 "archive/" version ".tar.gz"))
2681 (file-name (string-append name "-" version ".tar.gz"))
2682 (sha256
2683 (base32
2684 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2685 (build-system meson-build-system)
2686 (inputs
2687 `(("gobject-introspection" ,gobject-introspection)
2688 ("glib" ,glib)
2689 ("gstreamer" ,gstreamer)
2690 ("gst-plugins-base" ,gst-plugins-base)))
2691 (native-inputs
2692 `(("python" ,python)
2693 ("pkg-config" ,pkg-config)))
2694 (home-page "https://github.com/pitivi/gst-transcoder/")
2695 (synopsis "GStreamer Transcoding API")
2696 (description "GStreamer Transcoding API")
2697 (license license:lgpl2.1)))
2698
2699 (define-public gavl
2700 (package
2701 (name "gavl")
2702 (version "1.4.0")
2703 (source
2704 (origin
2705 (method url-fetch)
2706 (uri (string-append "mirror://sourceforge/gmerlin/"
2707 name "/" version "/"
2708 name "-" version ".tar.gz"))
2709 (file-name (string-append name "-" version ".tar.gz"))
2710 (sha256
2711 (base32
2712 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2713 (build-system gnu-build-system)
2714 (arguments
2715 '(#:configure-flags '("LIBS=-lm")))
2716 (native-inputs
2717 `(("pkg-config" ,pkg-config)
2718 ("doxygen" ,doxygen)))
2719 (home-page "http://gmerlin.sourceforge.net")
2720 (synopsis "Low level library for multimedia API building")
2721 (description
2722 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2723 library, upon which multimedia APIs can be built. Gavl handles all the
2724 details of audio and video formats like colorspaces, sample rates,
2725 multichannel configurations, etc. It provides standardized definitions for
2726 those formats as well as container structures for carrying audio samples or
2727 video images inside an application.
2728
2729 In addition, it handles the sometimes ugly task of converting between all
2730 these formats and provides some elementary operations (copying, scaling,
2731 alpha blending etc).")
2732 (license license:gpl3)))
2733
2734 (define-public frei0r-plugins
2735 (package
2736 (name "frei0r-plugins")
2737 (version "1.6.1")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (string-append "https://files.dyne.org/frei0r/"
2742 "frei0r-plugins-" version ".tar.gz"))
2743 (sha256
2744 (base32
2745 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2746 (build-system gnu-build-system)
2747 (arguments
2748 `(#:phases
2749 (modify-phases %standard-phases
2750 (add-after 'unpack 'autotools
2751 (lambda _
2752 (zero? (system* "sh" "autogen.sh")))))))
2753 ;; TODO: opencv for additional face detection filters
2754 (inputs
2755 `(("gavl" ,gavl)
2756 ("cairo" ,cairo)))
2757 (native-inputs
2758 `(("pkg-config" ,pkg-config)
2759 ("libtool" ,libtool)
2760 ("automake" ,automake)
2761 ("autoconf" ,autoconf)))
2762 (home-page "https://www.dyne.org/software/frei0r/")
2763 (synopsis "Minimalistic plugin API for video effects")
2764 (description
2765 "Frei0r is a minimalistic plugin API for video effects.
2766 The main emphasis is on simplicity for an API that will round up
2767 the most common video effects into simple filters, sources and
2768 mixers that can be controlled by parameters. Frei0r wants to
2769 provide a way to share these simple effects between many
2770 applications, avoiding their reimplementation by different projects.
2771 It counts more than 100 plugins.")
2772 (license (list license:gpl2+
2773 ;; The following files are licensed as LGPL2.1+:
2774 ;; src/generator/ising0r/ising0r.c
2775 ;; src/generator/onecol0r/onecol0r.cpp
2776 ;; src/generator/nois0r/nois0r.cpp
2777 ;; src/generator/lissajous0r/lissajous0r.cpp
2778 ;; src/filter/ndvi/gradientlut.hpp
2779 ;; src/filter/ndvi/ndvi.cpp
2780 ;; src/filter/facedetect/facedetect.cpp
2781 license:lgpl2.1+))))
2782
2783 (define-public motion
2784 (package
2785 (name "motion")
2786 (version "4.1.1")
2787 (home-page "https://motion-project.github.io/")
2788 (source (origin
2789 (method url-fetch)
2790 (uri (string-append
2791 "https://github.com/Motion-Project/motion/archive/"
2792 "release-" version ".tar.gz"))
2793 (sha256
2794 (base32
2795 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2796 (file-name (string-append name "-" version ".tar.gz"))))
2797 (build-system gnu-build-system)
2798 (native-inputs
2799 `(("autoconf" ,autoconf-wrapper)
2800 ("automake" ,automake)
2801 ("pkg-config" ,pkg-config)))
2802 (inputs
2803 `(("libjpeg" ,libjpeg)
2804 ("ffmpeg" ,ffmpeg)
2805 ("sqlite" ,sqlite)))
2806 (arguments
2807 '(#:phases (modify-phases %standard-phases
2808 (add-after 'unpack 'bootstrap
2809 (lambda _
2810 (patch-shebang "version.sh")
2811 (invoke "autoreconf" "-vfi"))))
2812 #:configure-flags '("--sysconfdir=/etc")
2813 #:make-flags (list (string-append "sysconfdir="
2814 (assoc-ref %outputs "out")
2815 "/etc"))
2816
2817 #:tests? #f)) ;no 'check' target
2818 (synopsis "Detect motion from video signals")
2819 (description
2820 "Motion is a program that monitors the video signal from one or more
2821 cameras and is able to detect if a significant part of the picture has
2822 changed. Or in other words, it can detect motion.")
2823
2824 ;; Some files say "version 2" and others "version 2 or later".
2825 (license license:gpl2)))
2826
2827 (define-public subdl
2828 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
2829 (revision "1"))
2830 (package
2831 (name "subdl")
2832 (version (git-version "1.0.3" revision commit))
2833 (source (origin
2834 (method git-fetch)
2835 (uri (git-reference
2836 (url "https://github.com/alexanderwink/subdl.git")
2837 (commit commit)))
2838 (file-name (git-file-name name version))
2839 (sha256
2840 (base32
2841 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
2842 (build-system trivial-build-system)
2843 (arguments
2844 `(#:modules ((guix build utils))
2845 #:builder (begin
2846 (use-modules (guix build utils))
2847 (let* ((out (assoc-ref %outputs "out"))
2848 (bin (string-append out "/bin"))
2849 (source (assoc-ref %build-inputs "source"))
2850 (python (assoc-ref %build-inputs "python")))
2851 (install-file (string-append source "/subdl") bin)
2852 (patch-shebang (string-append bin "/subdl")
2853 (list (string-append python "/bin")))))))
2854 (inputs `(("python" ,python)))
2855 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
2856 (description "Subdl is a command-line tool for downloading subtitles from
2857 opensubtitles.org. By default, it will search for English subtitles, display
2858 the results, download the highest-rated result in the requested language and
2859 save it to the appropriate filename.")
2860 (license license:gpl3+)
2861 (home-page "https://github.com/alexanderwink/subdl"))))