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