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