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