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