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