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