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