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 #t)))
889 (add-after 'install 'regenerate-plugin-cache
890 (lambda* (#:key outputs #:allow-other-keys)
891 ;; The 'install-exec-hook' rule in the top-level Makefile.am
892 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
893 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
894 ;; it references. Thus, we first reset the timestamps of all
895 ;; these files, and then regenerate the cache such that the
896 ;; mtimes it includes are always zero instead of being dependent
897 ;; on the build time.
898 (let* ((out (assoc-ref outputs "out"))
899 (pkglibdir (string-append out "/lib/vlc"))
900 (plugindir (string-append pkglibdir "/plugins"))
901 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
902 ;; TODO: Factorize 'reset-timestamps'.
903 (for-each (lambda (file)
904 (let ((s (lstat file)))
905 (unless (eq? (stat:type s) 'symlink)
906 (utime file 0 0 0 0))))
907 (find-files plugindir))
908 (zero? (system* cachegen plugindir))))))))
909 (home-page "https://www.videolan.org/")
910 (synopsis "Audio and video framework")
911 (description "VLC is a cross-platform multimedia player and framework
912 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
913 treaming protocols.")
914 (license license:gpl2+)))
915
916 (define-public mplayer
917 (package
918 (name "mplayer")
919 (version "1.3.0")
920 (source (origin
921 (method url-fetch)
922 (uri (string-append
923 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
924 version ".tar.xz"))
925 (sha256
926 (base32
927 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
928 (build-system gnu-build-system)
929 ;; FIXME: Add additional inputs once available.
930 (native-inputs
931 `(("pkg-config" ,pkg-config)))
932 (inputs
933 `(("alsa-lib" ,alsa-lib)
934 ("cdparanoia" ,cdparanoia)
935 ("ffmpeg" ,ffmpeg)
936 ("fontconfig" ,fontconfig)
937 ("freetype" ,freetype)
938 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
939 ("lame" ,lame)
940 ("libass" ,libass)
941 ("libdvdcss" ,libdvdcss)
942 ("libdvdnav" ,libdvdnav)
943 ("libjpeg" ,libjpeg)
944 ("libmpeg2" ,libmpeg2)
945 ("libmpg123" ,mpg123) ; audio codec for MP3
946 ("libpng" ,libpng)
947 ("libtheora" ,libtheora)
948 ("libvdpau" ,libvdpau)
949 ("libvorbis" ,libvorbis)
950 ("libx11" ,libx11)
951 ("libx264" ,libx264)
952 ("libxinerama" ,libxinerama)
953 ("libxv" ,libxv)
954 ("libxxf86dga" ,libxxf86dga)
955 ("mesa" ,mesa)
956 ("opus" ,opus)
957 ("perl" ,perl)
958 ("pulseaudio" ,pulseaudio)
959 ("python" ,python-wrapper)
960 ("sdl" ,sdl)
961 ("speex" ,speex)
962 ("yasm" ,yasm)
963 ("zlib" ,zlib)))
964 (arguments
965 `(#:tests? #f ; no test target
966 #:phases
967 (modify-phases %standard-phases
968 (replace 'configure
969 ;; configure does not work followed by "SHELL=..." and
970 ;; "CONFIG_SHELL=..."; set environment variables instead
971 (lambda* (#:key inputs outputs #:allow-other-keys)
972 (let ((out (assoc-ref outputs "out"))
973 (libx11 (assoc-ref inputs "libx11")))
974 (substitute* "configure"
975 (("#! /bin/sh") (string-append "#!" (which "sh"))))
976 (setenv "SHELL" (which "bash"))
977 (setenv "CONFIG_SHELL" (which "bash"))
978 (zero? (system*
979 "./configure"
980 (string-append "--extra-cflags=-I"
981 libx11 "/include") ; to detect libx11
982 "--disable-ffmpeg_a" ; disables bundled ffmpeg
983 (string-append "--prefix=" out)
984 ;; Enable runtime cpu detection where supported,
985 ;; and choose a suitable target.
986 ,@(match (or (%current-target-system)
987 (%current-system))
988 ("x86_64-linux"
989 '("--enable-runtime-cpudetection"
990 "--target=x86_64-linux"))
991 ("i686-linux"
992 '("--enable-runtime-cpudetection"
993 "--target=i686-linux"))
994 ("mips64el-linux"
995 '("--target=mips3-linux"))
996 (_ (list (string-append
997 "--target="
998 (or (%current-target-system)
999 (nix-system->gnu-triplet
1000 (%current-system)))))))
1001 "--disable-iwmmxt"))))))))
1002 (home-page "https://www.mplayerhq.hu/design7/news.html")
1003 (synopsis "Audio and video player")
1004 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1005 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1006 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1007 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1008 (license license:gpl2)))
1009
1010 (define-public mpv
1011 (package
1012 (name "mpv")
1013 (version "0.28.2")
1014 (source (origin
1015 (method url-fetch)
1016 (uri (string-append
1017 "https://github.com/mpv-player/mpv/archive/v" version
1018 ".tar.gz"))
1019 (sha256
1020 (base32
1021 "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
1022 (file-name (string-append name "-" version ".tar.gz"))))
1023 (build-system waf-build-system)
1024 (native-inputs
1025 `(("perl" ,perl) ; for zsh completion file
1026 ("pkg-config" ,pkg-config)
1027 ("python-docutils" ,python-docutils)))
1028 ;; Missing features: libguess, V4L2
1029 (inputs
1030 `(("alsa-lib" ,alsa-lib)
1031 ("enca" ,enca)
1032 ("ffmpeg" ,ffmpeg)
1033 ("jack" ,jack-1)
1034 ("ladspa" ,ladspa)
1035 ("lcms" ,lcms)
1036 ("libass" ,libass)
1037 ("libbluray" ,libbluray)
1038 ("libcaca" ,libcaca)
1039 ("libbs2b" ,libbs2b)
1040 ("libcdio-paranoia" ,libcdio-paranoia)
1041 ("libdvdread" ,libdvdread)
1042 ("libdvdnav" ,libdvdnav)
1043 ("libjpeg" ,libjpeg)
1044 ("libva" ,libva)
1045 ("libvdpau" ,libvdpau)
1046 ("libx11" ,libx11)
1047 ("libxext" ,libxext)
1048 ("libxinerama" ,libxinerama)
1049 ("libxrandr" ,libxrandr)
1050 ("libxscrnsaver" ,libxscrnsaver)
1051 ("libxv" ,libxv)
1052 ;; XXX: lua > 5.2 is not currently supported; see
1053 ;; waftools/checks/custom.py
1054 ("lua" ,lua-5.2)
1055 ("mesa" ,mesa)
1056 ("mpg123" ,mpg123)
1057 ("pulseaudio" ,pulseaudio)
1058 ("rsound" ,rsound)
1059 ("shaderc" ,shaderc)
1060 ("vulkan-icd-loader" ,vulkan-icd-loader)
1061 ("waf" ,python-waf)
1062 ("wayland" ,wayland)
1063 ("wayland-protocols" ,wayland-protocols)
1064 ("libxkbcommon" ,libxkbcommon)
1065 ("youtube-dl" ,youtube-dl)
1066 ("zlib" ,zlib)))
1067 (arguments
1068 '(#:phases
1069 (modify-phases %standard-phases
1070 (add-before
1071 'configure 'setup-waf
1072 (lambda* (#:key inputs #:allow-other-keys)
1073 (copy-file (assoc-ref inputs "waf") "waf")
1074 (setenv "CC" "gcc")
1075 #t)))
1076 #:configure-flags (list "--enable-libmpv-shared"
1077 "--enable-cdda"
1078 "--enable-dvdread"
1079 "--enable-dvdnav"
1080 "--enable-zsh-comp"
1081 "--disable-build-date")
1082 ;; No check function defined.
1083 #:tests? #f))
1084 (home-page "https://mpv.io/")
1085 (synopsis "Audio and video player")
1086 (description "mpv is a general-purpose audio and video player. It is a
1087 fork of mplayer2 and MPlayer. It shares some features with the former
1088 projects while introducing many more.")
1089 (license license:gpl2+)))
1090
1091 (define-public gnome-mpv
1092 (package
1093 (name "gnome-mpv")
1094 (version "0.14")
1095 (source
1096 (origin
1097 (method url-fetch)
1098 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1099 "/download/v" version "/gnome-mpv-" version
1100 ".tar.xz"))
1101 (sha256
1102 (base32
1103 "03kjwd5jq0i5ajnvhjwf5019bjjaa16xkdrhdkiz1k58ipjvvj93"))))
1104 (native-inputs
1105 `(("intltool" ,intltool)
1106 ("pkg-config" ,pkg-config)))
1107 (inputs
1108 `(("gtk+" ,gtk+)
1109 ("libepoxy" ,libepoxy)
1110 ("mpv" ,mpv)))
1111 (build-system glib-or-gtk-build-system)
1112 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1113 (synopsis "GTK+ frontend for the mpv media player")
1114 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1115 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1116 access to mpv's powerful playback capabilities.")
1117 (license license:gpl3+)))
1118
1119 (define-public libvpx
1120 (package
1121 (name "libvpx")
1122 (version "1.7.0")
1123 (source (origin
1124 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1125 (method git-fetch)
1126 (uri (git-reference
1127 (url "https://chromium.googlesource.com/webm/libvpx")
1128 (commit (string-append "v" version))))
1129 (file-name (git-file-name name version))
1130 (sha256
1131 (base32
1132 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1133 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1134 (build-system gnu-build-system)
1135 (arguments
1136 `(#:configure-flags (list "--enable-shared"
1137 "--as=yasm"
1138 ;; Limit size to avoid CVE-2015-1258
1139 "--size-limit=16384x16384"
1140 (string-append "--prefix=" (assoc-ref %outputs "out")))
1141 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1142 (assoc-ref %outputs "out") "/lib"))
1143 #:phases (modify-phases %standard-phases
1144 (replace 'configure
1145 (lambda* (#:key configure-flags #:allow-other-keys)
1146 ;; The configure script does not understand some of the GNU
1147 ;; options, so we only add the flags specified above.
1148 (apply invoke "./configure" configure-flags))))
1149 #:tests? #f)) ; no check target
1150 (native-inputs
1151 `(("perl" ,perl)
1152 ("yasm" ,yasm)))
1153 (synopsis "VP8/VP9 video codec")
1154 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1155 (license license:bsd-3)
1156 (home-page "https://www.webmproject.org/")))
1157
1158 (define-public youtube-dl
1159 (package
1160 (name "youtube-dl")
1161 (version "2018.05.09")
1162 (source (origin
1163 (method url-fetch)
1164 (uri (string-append "https://yt-dl.org/downloads/"
1165 version "/youtube-dl-"
1166 version ".tar.gz"))
1167 (sha256
1168 (base32
1169 "0sl4bi2jls3417rd62awbqdq1b6wskkjbfwpnyw4a61qarfxid1d"))))
1170 (build-system python-build-system)
1171 (arguments
1172 ;; The problem here is that the directory for the man page and completion
1173 ;; files is relative, and for some reason, setup.py uses the
1174 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1175 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1176 ;; completion file is called 'youtube-dl' rather than
1177 ;; 'youtube-dl.bash-completion'.
1178 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1179 #:phases (modify-phases %standard-phases
1180 (add-before 'install 'fix-the-data-directories
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 (let ((prefix (assoc-ref outputs "out")))
1183 (mkdir "bash-completion")
1184 (rename-file "youtube-dl.bash-completion"
1185 "bash-completion/youtube-dl")
1186 (substitute* "setup.py"
1187 (("youtube-dl\\.bash-completion")
1188 "bash-completion/youtube-dl")
1189 (("'etc/")
1190 (string-append "'" prefix "/etc/"))
1191 (("'share/")
1192 (string-append "'" prefix "/share/")))
1193 #t))))))
1194 (synopsis "Download videos from YouTube.com and other sites")
1195 (description
1196 "Youtube-dl is a small command-line program to download videos from
1197 YouTube.com and many more sites.")
1198 (home-page "https://yt-dl.org")
1199 (license license:public-domain)))
1200
1201 (define-public youtube-dl-gui
1202 (package
1203 (name "youtube-dl-gui")
1204 (version "0.3.8")
1205 (source
1206 (origin
1207 (method url-fetch)
1208 (uri (pypi-uri "Youtube-DLG" version))
1209 (sha256
1210 (base32
1211 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1212 (build-system python-build-system)
1213 (arguments
1214 ;; In Guix, wxpython has not yet been packaged for Python 3.
1215 `(#:python ,python-2
1216 ;; This package has no tests.
1217 #:tests? #f
1218 #:phases
1219 (modify-phases %standard-phases
1220 (add-before 'build 'patch-source
1221 (lambda* (#:key inputs #:allow-other-keys)
1222 ;; The youtube-dl-gui program lets you configure options. Some of
1223 ;; them are problematic, so we change their defaults.
1224 (substitute* "youtube_dl_gui/optionsmanager.py"
1225 ;; When this is true, the builder process will try (and fail) to
1226 ;; write logs to the builder user's home directory.
1227 (("'enable_log': True") "'enable_log': False")
1228 ;; This determines which youtube-dl program youtube-dl-gui will
1229 ;; run. If we don't set this, then youtube-dl-gui might download
1230 ;; an arbitrary copy from the Internet into the user's home
1231 ;; directory and run it, so let's make sure youtube-dl-gui uses
1232 ;; the youtube-dl from the inputs by default.
1233 (("'youtubedl_path': self.config_path")
1234 (string-append "'youtubedl_path': '"
1235 (assoc-ref inputs "youtube-dl")
1236 "/bin'"))
1237 ;; When this is True, when youtube-dl-gui is finished downloading
1238 ;; a file, it will try (and possibly fail) to open the directory
1239 ;; containing the downloaded file. This can fail because it
1240 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1241 ;; adding xdg-utils to the propagated inputs is not enough to
1242 ;; make this work, so for now we set the default to False.
1243 (("'open_dl_dir': True") "'open_dl_dir': False"))
1244 ;; The youtube-dl program from the inputs is actually a wrapper
1245 ;; script written in bash, so attempting to invoke it as a python
1246 ;; script will fail.
1247 (substitute* "youtube_dl_gui/downloaders.py"
1248 (("cmd = \\['python', self\\.youtubedl_path\\]")
1249 "cmd = [self.youtubedl_path]"))
1250 ;; Use relative paths for installing data files so youtube-dl-gui
1251 ;; installs the files relative to its prefix in the store, rather
1252 ;; than relative to /. Also, instead of installing data files into
1253 ;; $prefix/usr/share, install them into $prefix/share for
1254 ;; consistency (see: (standards) Directory Variables).
1255 (substitute* "setup.py"
1256 (("= '/usr/share") "= 'share"))
1257 ;; Update get_locale_file() so it finds the installed localization
1258 ;; files.
1259 (substitute* "youtube_dl_gui/utils.py"
1260 (("os\\.path\\.join\\('/usr', 'share'")
1261 (string-append "os.path.join('"
1262 (assoc-ref %outputs "out")
1263 "', 'share'"))))))))
1264 (inputs
1265 `(("python2-wxpython" ,python2-wxpython)
1266 ("youtube-dl" ,youtube-dl)))
1267 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1268 (synopsis
1269 "GUI (Graphical User Interface) for @command{youtube-dl}")
1270 (description
1271 "Youtube-dlG is a GUI (Graphical User Interface) for
1272 @command{youtube-dl}. You can use it to download videos from YouTube and any
1273 other site that youtube-dl supports.")
1274 (license license:unlicense)))
1275
1276 (define-public you-get
1277 (package
1278 (name "you-get")
1279 (version "0.4.1060")
1280 (source (origin
1281 (method url-fetch)
1282 (uri (string-append
1283 "https://github.com/soimort/you-get/archive/v"
1284 version ".tar.gz"))
1285 (file-name (string-append name "-" version ".tar.gz"))
1286 (sha256
1287 (base32
1288 "1pq7c2ay42aan7ykpmddzh6ylq0qsq8a27pk68m5imaxi6abbwsz"))))
1289 (build-system python-build-system)
1290 (inputs
1291 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1292 (arguments
1293 `(#:phases
1294 (modify-phases %standard-phases
1295 (add-after 'unpack 'qualify-input-references
1296 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1297 ;; happens to be in the user's $PATH at run time.
1298 (lambda* (#:key inputs #:allow-other-keys)
1299 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1300 "/bin/ffmpeg")))
1301 (substitute* "src/you_get/processor/ffmpeg.py"
1302 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1303 ;; same string is also used when sniffing ffmpeg's output.
1304 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1305 (string-append prefix "'" ffmpeg "'")))
1306 #t))))
1307 #:tests? #f)) ; XXX some tests need Internet access
1308 (synopsis "Download videos, audio, or images from Web sites")
1309 (description
1310 "You-Get is a command-line utility to download media contents (videos,
1311 audio, images) from the Web. It can use either mpv or vlc for playback.")
1312 (home-page "https://you-get.org/")
1313 (license license:expat)))
1314
1315 (define-public youtube-viewer
1316 (package
1317 (name "youtube-viewer")
1318 (version "3.3.4")
1319 (source (origin
1320 (method url-fetch)
1321 (uri (string-append
1322 "https://github.com/trizen/youtube-viewer/archive/"
1323 version ".tar.gz"))
1324 (file-name (string-append name "-" version ".tar.gz"))
1325 (sha256
1326 (base32
1327 "1dqaxkz5svv0lmxds6lppcpzhkq6gar2raw9gx6imrd7yz02fpgn"))))
1328 (build-system perl-build-system)
1329 (native-inputs
1330 `(("perl-module-build" ,perl-module-build)))
1331 ;; FIXME: Add optional dependencies once available:
1332 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1333 (inputs
1334 `(("perl-data-dump" ,perl-data-dump)
1335 ("perl-file-sharedir" ,perl-file-sharedir)
1336 ("perl-gtk2" ,perl-gtk2)
1337 ("perl-json" ,perl-json)
1338 ("perl-libwww" ,perl-libwww)
1339 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1340 ("perl-mozilla-ca" ,perl-mozilla-ca)
1341 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1342 (arguments
1343 `(#:modules ((guix build perl-build-system)
1344 (guix build utils)
1345 (srfi srfi-26))
1346 #:module-build-flags '("--gtk")
1347 #:phases
1348 (modify-phases %standard-phases
1349 (add-after 'install 'wrap-program
1350 (lambda* (#:key outputs #:allow-other-keys)
1351 (let* ((out (assoc-ref outputs "out"))
1352 (bin-dir (string-append out "/bin/"))
1353 (site-dir (string-append out "/lib/perl5/site_perl/"))
1354 (lib-path (getenv "PERL5LIB")))
1355 (for-each (cut wrap-program <>
1356 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1357 (find-files bin-dir))
1358 #t))))))
1359 (synopsis
1360 "Lightweight application for searching and streaming videos from YouTube")
1361 (description
1362 "Youtube-viewer searches and plays YouTube videos in a native player.
1363 It comes with various search options; it can search for videos, playlists
1364 and/or channels. The videos are streamed directly in a selected video player
1365 at the best resolution (customizable) and with closed-captions (if available).
1366 Both command-line and GTK2 interface are available.")
1367 (home-page "https://github.com/trizen/youtube-viewer")
1368 (license license:perl-license)))
1369
1370 (define-public libbluray
1371 (package
1372 (name "libbluray")
1373 (version "1.0.2")
1374 (source (origin
1375 (method url-fetch)
1376 (uri (string-append "https://download.videolan.org/videolan/"
1377 name "/" version "/"
1378 name "-" version ".tar.bz2"))
1379 (sha256
1380 (base32
1381 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1382 (build-system gnu-build-system)
1383 (arguments
1384 `(#:configure-flags '("--disable-bdjava-jar")
1385 #:phases
1386 (modify-phases %standard-phases
1387 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1388 ;; Avoid the need to propagate libxml2 by referring to it
1389 ;; directly, as is already done for fontconfig & freetype.
1390 (lambda* (#:key inputs #:allow-other-keys)
1391 (let ((libxml2 (assoc-ref inputs "libxml2")))
1392 (substitute* "configure"
1393 ((" libxml-2.0") ""))
1394 (substitute* "src/libbluray.pc.in"
1395 (("^Libs.private:" field)
1396 (string-append field " -L" libxml2 "/lib -lxml2")))
1397 #t)))
1398 (add-before 'build 'fix-dlopen-paths
1399 (lambda* (#:key inputs #:allow-other-keys)
1400 (let ((libaacs (assoc-ref inputs "libaacs"))
1401 (libbdplus (assoc-ref inputs "libbdplus")))
1402 (substitute* "src/libbluray/disc/aacs.c"
1403 (("\"libaacs\"")
1404 (string-append "\"" libaacs "/lib/libaacs\"")))
1405 (substitute* "src/libbluray/disc/bdplus.c"
1406 (("\"libbdplus\"")
1407 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1408 #t))))))
1409 (native-inputs `(("pkg-config" ,pkg-config)))
1410 (inputs
1411 `(("fontconfig" ,fontconfig)
1412 ("freetype" ,freetype)
1413 ("libaacs" ,libaacs)
1414 ("libbdplus" ,libbdplus)
1415 ("libxml2" ,libxml2)))
1416 (home-page "https://www.videolan.org/developers/libbluray.html")
1417 (synopsis "Blu-Ray Disc playback library")
1418 (description
1419 "libbluray is a library designed for Blu-Ray Disc playback for media
1420 players, like VLC or MPlayer.")
1421 (license license:lgpl2.1+)))
1422
1423 (define-public libdvdread
1424 (package
1425 (name "libdvdread")
1426 (version "6.0.0")
1427 (source (origin
1428 (method url-fetch)
1429 (uri (string-append "https://download.videolan.org/videolan/"
1430 name "/" version "/"
1431 name "-" version ".tar.bz2"))
1432 (sha256
1433 (base32
1434 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1435 (build-system gnu-build-system)
1436 (arguments
1437 `(#:configure-flags '("--with-libdvdcss=yes")))
1438 (native-inputs
1439 `(("pkg-config" ,pkg-config)))
1440 (propagated-inputs
1441 `(("libdvdcss" ,libdvdcss)))
1442 (home-page "http://dvdnav.mplayerhq.hu/")
1443 (synopsis "Library for reading video DVDs")
1444 (description
1445 "Libdvdread provides a simple foundation for reading DVD video
1446 disks. It provides the functionality that is required to access many
1447 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1448 authentication and descrambling (if an external libdvdcss library is
1449 installed).")
1450 (license license:gpl2+)))
1451
1452 (define-public dvdauthor
1453 (package
1454 (name "dvdauthor")
1455 (version "0.7.2")
1456 (source
1457 (origin
1458 (method url-fetch)
1459 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1460 version ".tar.gz"))
1461 (sha256
1462 (base32
1463 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1464 (build-system gnu-build-system)
1465 (inputs
1466 `(("libdvdread" ,libdvdread)
1467 ("libpng" ,libpng)
1468 ("imagemagick" ,imagemagick)
1469 ("libxml2" ,libxml2)
1470 ("freetype" ,freetype)))
1471 (native-inputs
1472 `(("pkg-config" ,pkg-config)))
1473 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1474 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1475 MPEG-2 stream containing VOB packets.")
1476 (home-page "http://dvdauthor.sourceforge.net")
1477 (license license:gpl3+)))
1478
1479 (define-public libdvdnav
1480 (package
1481 (name "libdvdnav")
1482 (version "6.0.0")
1483 (source (origin
1484 (method url-fetch)
1485 (uri (string-append "https://download.videolan.org/videolan/"
1486 name "/" version "/"
1487 name "-" version ".tar.bz2"))
1488 (sha256
1489 (base32
1490 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1491 (build-system gnu-build-system)
1492 (native-inputs
1493 `(("pkg-config" ,pkg-config)))
1494 (inputs
1495 `(("libdvdread" ,libdvdread)))
1496 (home-page "http://dvdnav.mplayerhq.hu/")
1497 (synopsis "Library for video DVD navigation features")
1498 (description
1499 "Libdvdnav is a library for developers of multimedia
1500 applications. It allows easy use of sophisticated DVD navigation features
1501 such as DVD menus, multiangle playback and even interactive DVD games. All
1502 this functionality is provided through a simple API which provides the DVD
1503 playback as a single logical stream of blocks, intermitted by special
1504 dvdnav events to report certain conditions. The main usage of libdvdnav is
1505 a loop regularly calling a function to get the next block, surrounded by
1506 additional calls to tell the library of user interaction. The whole
1507 DVD virtual machine and internal playback states are completely
1508 encapsulated.")
1509 (license license:gpl2+)))
1510
1511 (define-public libdvdcss
1512 (package
1513 (name "libdvdcss")
1514 (version "1.4.2")
1515 (source (origin
1516 (method url-fetch)
1517 (uri (string-append "https://download.videolan.org/pub/"
1518 name "/" version "/"
1519 name "-" version ".tar.bz2"))
1520 (sha256
1521 (base32
1522 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1523 (build-system gnu-build-system)
1524 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1525 (synopsis "Library for accessing DVDs as block devices")
1526 (description
1527 "libdvdcss is a simple library designed for accessing DVDs like a block
1528 device without having to bother about the decryption.")
1529 (license license:gpl2+)))
1530
1531 (define-public srt2vtt
1532 (package
1533 (name "srt2vtt")
1534 (version "0.1")
1535 (source (origin
1536 (method url-fetch)
1537 (uri (string-append
1538 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1539 version ".tar.gz"))
1540 (sha256
1541 (base32
1542 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1543 (build-system gnu-build-system)
1544 (inputs
1545 `(("guile" ,guile-2.0)))
1546 (synopsis "SubRip to WebVTT subtitle converter")
1547 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1548 for use with HTML5 video.")
1549 (home-page "http://dthompson.us/pages/software/srt2vtt")
1550 (license license:gpl3+)))
1551
1552 (define-public avidemux
1553 (package
1554 (name "avidemux")
1555 (version "2.6.12")
1556 (source (origin
1557 (method url-fetch)
1558 (uri (string-append
1559 "mirror://sourceforge/" name "/" name "/" version "/"
1560 name "_" version ".tar.gz"))
1561 (sha256
1562 (base32
1563 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1564 (patches (search-patches "avidemux-install-to-lib.patch"))))
1565 (build-system cmake-build-system)
1566 (native-inputs
1567 `(("pkg-config" ,pkg-config)))
1568 ;; FIXME: Once packaged, add libraries not found during the build.
1569 (inputs
1570 `(("alsa-lib" ,alsa-lib)
1571 ("fontconfig" ,fontconfig)
1572 ("freetype" ,freetype)
1573 ("fribidi" ,fribidi)
1574 ("glu" ,glu)
1575 ("jack" ,jack-1)
1576 ("lame" ,lame)
1577 ("libva" ,libva)
1578 ("libvdpau" ,libvdpau)
1579 ("libvorbis" ,libvorbis)
1580 ("libvpx" ,libvpx)
1581 ("libxv" ,libxv)
1582 ("perl" ,perl)
1583 ("pulseaudio" ,pulseaudio)
1584 ("python" ,python-wrapper)
1585 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1586 ;("qtbase" ,qtbase) with -std=gnu++11.
1587 ;("qttools" ,qttools)
1588 ("sdl" ,sdl)
1589 ("sqlite" ,sqlite)
1590 ("yasm" ,yasm)
1591 ("zlib" ,zlib)))
1592 (arguments
1593 `(#:tests? #f ; no check target
1594 #:phases
1595 ;; Make sure files inside the included ffmpeg tarball are
1596 ;; patch-shebanged.
1597 (modify-phases %standard-phases
1598 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1599 (lambda _
1600 (with-directory-excursion "avidemux_core/ffmpeg_package"
1601 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1602 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1603 (add-after 'patch-source-shebangs 'repack-ffmpeg
1604 (lambda _
1605 (with-directory-excursion "avidemux_core/ffmpeg_package"
1606 (substitute* "ffmpeg-2.7.6/configure"
1607 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1608 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1609 ;; avoid non-determinism in the archive
1610 "--sort=name" "--mtime=@0"
1611 "--owner=root:0" "--group=root:0")
1612 (delete-file-recursively "ffmpeg-2.7.6"))))
1613 (replace 'configure
1614 (lambda _
1615 ;; Copy-paste settings from the cmake build system.
1616 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1617 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1618 (replace 'build
1619 (lambda* (#:key inputs outputs #:allow-other-keys)
1620 (let*
1621 ((out (assoc-ref outputs "out"))
1622 (lib (string-append out "/lib"))
1623 (top (getcwd))
1624 (sdl (assoc-ref inputs "sdl"))
1625 (build_component
1626 (lambda* (component srcdir #:optional (args '()))
1627 (let ((builddir (string-append "build_" component)))
1628 (mkdir builddir)
1629 (with-directory-excursion builddir
1630 (zero?
1631 (and
1632 (apply system* "cmake"
1633 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1634 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1635 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1636 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1637 "\"-Wl,-rpath=" lib "\"")
1638 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1639 (string-append "-DSDL_INCLUDE_DIR="
1640 sdl "/include/SDL")
1641 (string-append "../" srcdir)
1642 "-DENABLE_QT5=True"
1643 args)
1644 (system* "make" "-j"
1645 (number->string (parallel-job-count)))
1646 (system* "make" "install"))))))))
1647 (mkdir out)
1648 (and (build_component "core" "avidemux_core")
1649 (build_component "cli" "avidemux/cli")
1650 (build_component "qt4" "avidemux/qt4")
1651 (build_component "plugins_common" "avidemux_plugins"
1652 '("-DPLUGIN_UI=COMMON"))
1653 (build_component "plugins_cli" "avidemux_plugins"
1654 '("-DPLUGIN_UI=CLI"))
1655 (build_component "plugins_qt4" "avidemux_plugins"
1656 '("-DPLUGIN_UI=QT4"))
1657 (build_component "plugins_settings" "avidemux_plugins"
1658 '("-DPLUGIN_UI=SETTINGS")))
1659 ;; Remove .exe and .dll file.
1660 (delete-file-recursively
1661 (string-append out "/share/ADM6_addons")))))
1662 (delete 'install))))
1663 (home-page "http://fixounet.free.fr/avidemux/")
1664 (synopsis "Video editor")
1665 (description "Avidemux is a video editor designed for simple cutting,
1666 filtering and encoding tasks. It supports many file types, including AVI,
1667 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1668 can be automated using projects, job queue and powerful scripting
1669 capabilities.")
1670 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1671 ;; Software with various licenses is included, see License.txt.
1672 (license license:gpl2+)))
1673
1674 (define-public vapoursynth
1675 (package
1676 (name "vapoursynth")
1677 (version "37")
1678 (source (origin
1679 (method url-fetch)
1680 (uri (string-append
1681 "https://github.com/vapoursynth/vapoursynth/archive/R"
1682 version ".tar.gz"))
1683 (file-name (string-append name "-" version ".tar.gz"))
1684 (sha256
1685 (base32
1686 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1687 (build-system gnu-build-system)
1688 (native-inputs
1689 `(("autoconf" ,autoconf)
1690 ("automake" ,automake)
1691 ("cython" ,python-cython)
1692 ("libtool" ,libtool)
1693 ("pkg-config" ,pkg-config)
1694 ("python" ,python)
1695 ("yasm" ,yasm)))
1696 (inputs
1697 `(("ffmpeg" ,ffmpeg)
1698 ("libass" ,libass)
1699 ("tesseract-ocr" ,tesseract-ocr)
1700 ("zimg" ,zimg)))
1701 (arguments
1702 '(#:phases
1703 (modify-phases %standard-phases
1704 (add-after
1705 'unpack 'autogen
1706 (lambda _
1707 (zero? (system* "sh" "autogen.sh")))))))
1708 (home-page "http://www.vapoursynth.com/")
1709 (synopsis "Video processing framework")
1710 (description "VapourSynth is a C++ library and Python module for video
1711 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1712 multithreading, generalized colorspaces, per frame properties, and videos with
1713 format changes.")
1714 ;; src/core/cpufeatures only allows x86, ARM or PPC
1715 (supported-systems (fold delete %supported-systems
1716 '("mips64el-linux" "aarch64-linux")))
1717 ;; As seen from the source files.
1718 (license license:lgpl2.1+)))
1719
1720 (define-public xvid
1721 (package
1722 (name "xvid")
1723 (version "1.3.4")
1724 (source (origin
1725 (method url-fetch)
1726 (uri (string-append
1727 "http://downloads.xvid.org/downloads/xvidcore-"
1728 version ".tar.bz2"))
1729 (sha256
1730 (base32
1731 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1732 (build-system gnu-build-system)
1733 (native-inputs `(("yasm" ,yasm)))
1734 (arguments
1735 '(#:phases
1736 (modify-phases %standard-phases
1737 (add-before
1738 'configure 'pre-configure
1739 (lambda _
1740 (chdir "build/generic")
1741 (substitute* "configure"
1742 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1743 ;; No 'check' target.
1744 #:tests? #f))
1745 (home-page "https://www.xvid.com/")
1746 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1747 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1748 codec library. It uses ASP features such as b-frames, global and quarter
1749 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1750 and custom quantization matrices.")
1751 (license license:gpl2+)))
1752
1753 (define-public streamlink
1754 (package
1755 (name "streamlink")
1756 (version "0.11.0")
1757 (source
1758 (origin
1759 (method url-fetch)
1760 (uri (pypi-uri "streamlink" version))
1761 (sha256
1762 (base32
1763 "02h8b3k8l5zz4vjm0nhxvl1pm924jms8y7sjl40fbybrzvsa4mg2"))))
1764 (build-system python-build-system)
1765 (home-page "https://github.com/streamlink/streamlink")
1766 (native-inputs
1767 `(("python-pytest" ,python-pytest)
1768 ("python-mock" ,python-mock)
1769 ("python-requests-mock" ,python-requests-mock)))
1770 (propagated-inputs
1771 `(("python-pysocks" ,python-pysocks)
1772 ("python-websocket-client" ,python-websocket-client)
1773 ("python-iso3166" ,python-iso3166)
1774 ("python-iso639" ,python-iso639)
1775 ("python-pycryptodome" ,python-pycryptodome)
1776 ("python-requests" ,python-requests)
1777 ("python-urllib3" ,python-urllib3)))
1778 (synopsis "Extract streams from various services")
1779 (description "Streamlink is command-line utility that extracts streams
1780 from sites like Twitch.tv and pipes them into a video player of choice.")
1781 (license license:bsd-2)))
1782
1783 (define-public livestreamer
1784 (deprecated-package "livestreamer" streamlink))
1785
1786 (define-public twitchy
1787 (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
1788 (package
1789 (name "twitchy")
1790 (version (git-version "3.2" "1" commit))
1791 (source
1792 (origin
1793 (method git-fetch)
1794 (uri (git-reference
1795 (url "https://github.com/BasioMeusPuga/twitchy.git")
1796 (commit commit)))
1797 (file-name (git-file-name name version))
1798 (sha256
1799 (base32
1800 "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
1801 (build-system python-build-system)
1802 (arguments
1803 '(#:phases
1804 (modify-phases %standard-phases
1805 (add-before 'check 'check-setup
1806 (lambda _
1807 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
1808 #t)))))
1809 (inputs
1810 `(("python-requests" ,python-requests)
1811 ("streamlink" ,streamlink)))
1812 (home-page "https://github.com/BasioMeusPuga/twitchy")
1813 (synopsis "Command-line interface for Twitch.tv")
1814 (description
1815 "This package provides a command-line interface for Twitch.tv")
1816 (license license:gpl3+))))
1817
1818 (define-public mlt
1819 (package
1820 (name "mlt")
1821 (version "6.4.1")
1822 (source (origin
1823 (method url-fetch)
1824 (uri (string-append "https://github.com/mltframework/mlt/"
1825 "archive/v" version ".tar.gz"))
1826 (file-name (string-append name "-" version ".tar.gz"))
1827 (sha256
1828 (base32
1829 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
1830 (modules '((guix build utils)))
1831 (snippet '(begin
1832 ;; As of glibc 2.26, <xlocale.h> no longer is.
1833 (substitute* "src/framework/mlt_property.h"
1834 (("xlocale\\.h") "locale.h"))
1835 #t))))
1836 (build-system gnu-build-system)
1837 (arguments
1838 `(#:tests? #f ; no tests
1839 #:make-flags '("CC=gcc")
1840 #:configure-flags
1841 (list "--enable-gpl3"
1842 "--enable-gpl")
1843 #:phases
1844 (modify-phases %standard-phases
1845 (add-after
1846 'configure 'override-LDFLAGS
1847 (lambda* (#:key outputs #:allow-other-keys)
1848 (substitute* "config.mak"
1849 (("LDFLAGS\\+=")
1850 (string-append "LDFLAGS+=-Wl,-rpath="
1851 (assoc-ref outputs "out")
1852 "/lib ")))
1853 #t)))))
1854 (inputs
1855 `(("alsa-lib" ,alsa-lib)
1856 ("ffmpeg" ,ffmpeg-3.4)
1857 ("fftw" ,fftw)
1858 ("libxml2" ,libxml2)
1859 ("jack" ,jack-1)
1860 ("ladspa" ,ladspa)
1861 ("libsamplerate" ,libsamplerate)
1862 ("pulseaudio" ,pulseaudio)
1863 ("sdl" ,sdl)
1864 ("sox" ,sox)))
1865 (native-inputs
1866 `(("pkg-config" ,pkg-config)))
1867 (home-page "https://www.mltframework.org/")
1868 (synopsis "Author, manage, and run multitrack audio/video compositions")
1869 (description
1870 "MLT is a multimedia framework, designed and developed for television
1871 broadcasting. It provides a toolkit for broadcasters, video editors, media
1872 players, transcoders, web streamers and many more types of applications. The
1873 functionality of the system is provided via an assortment of ready to use
1874 tools, XML authoring components, and an extensible plug-in based API.")
1875 (license license:gpl3)))
1876
1877 (define-public v4l-utils
1878 (package
1879 (name "v4l-utils")
1880 (version "1.12.5")
1881 (source (origin
1882 (method url-fetch)
1883 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1884 "/v4l-utils-" version ".tar.bz2"))
1885 (sha256
1886 (base32
1887 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1888 (build-system gnu-build-system)
1889 (arguments
1890 '(#:configure-flags
1891 (list (string-append "--with-udevdir="
1892 (assoc-ref %outputs "out")
1893 "/lib/udev")
1894 "CXXFLAGS=-std=gnu++11")))
1895 (native-inputs
1896 `(("perl" ,perl)
1897 ("pkg-config" ,pkg-config)))
1898 (inputs
1899 `(("alsa-lib" ,alsa-lib)
1900 ("glu" ,glu)
1901 ("libjpeg" ,libjpeg)
1902 ("libx11" ,libx11)
1903 ("qtbase" ,qtbase)
1904 ("eudev" ,eudev)))
1905 (synopsis "Realtime video capture utilities for Linux")
1906 (description "The v4l-utils provide a series of libraries and utilities to
1907 be used for realtime video capture via Linux-specific APIs.")
1908 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1909 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1910 (license (list license:lgpl2.1+ license:gpl2))))
1911
1912 (define-public obs
1913 (package
1914 (name "obs")
1915 (version "20.1.3")
1916 (source (origin
1917 (method url-fetch)
1918 (uri (string-append "https://github.com/jp9000/obs-studio"
1919 "/archive/" version ".tar.gz"))
1920 (file-name (string-append name "-" version ".tar.gz"))
1921 (sha256
1922 (base32
1923 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1924 (build-system cmake-build-system)
1925 (arguments
1926 `(#:tests? #f)) ; no tests
1927 (native-inputs
1928 `(("pkg-config" ,pkg-config)))
1929 (inputs
1930 `(("alsa-lib" ,alsa-lib)
1931 ("curl" ,curl)
1932 ("eudev" ,eudev)
1933 ("ffmpeg" ,ffmpeg)
1934 ("fontconfig" ,fontconfig)
1935 ("freetype" ,freetype)
1936 ("jack" ,jack-1)
1937 ("jansson" ,jansson)
1938 ("libx264" ,libx264)
1939 ("libxcomposite" ,libxcomposite)
1940 ("mesa" ,mesa)
1941 ("pulseaudio" ,pulseaudio)
1942 ("qtbase" ,qtbase)
1943 ("qtx11extras" ,qtx11extras)
1944 ("speex" ,speex)
1945 ("v4l-utils" ,v4l-utils)
1946 ("zlib" ,zlib)))
1947 (synopsis "Live streaming software")
1948 (description "Open Broadcaster Software provides a graphical interface for
1949 video recording and live streaming. OBS supports capturing audio and video
1950 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1951 and JACK.")
1952 (home-page "https://obsproject.com")
1953 (supported-systems '("x86_64-linux" "i686-linux"))
1954 (license license:gpl2+)))
1955
1956 (define-public libvdpau
1957 (package
1958 (name "libvdpau")
1959 (version "1.1.1")
1960 (source
1961 (origin
1962 (method url-fetch)
1963 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1964 name "-" version ".tar.bz2"))
1965 (sha256
1966 (base32
1967 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1968 (build-system gnu-build-system)
1969 (native-inputs
1970 `(("pkg-config" ,pkg-config)))
1971 (inputs
1972 `(("libx11" ,libx11 "out")
1973 ("libxext" ,libxext)
1974 ("xorgproto" ,xorgproto)))
1975 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1976 (synopsis "Video Decode and Presentation API")
1977 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1978 provides an interface to video decode acceleration and presentation hardware
1979 present in modern GPUs.")
1980 (license (license:x11-style "file://COPYING"))))
1981
1982 (define-public vdpauinfo
1983 (package
1984 (name "vdpauinfo")
1985 (version "1.0")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1990 name "-" version ".tar.gz"))
1991 (sha256
1992 (base32
1993 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1994 (build-system gnu-build-system)
1995 (native-inputs
1996 `(("pkg-config" ,pkg-config)
1997 ("libx11" ,libx11)))
1998 (propagated-inputs
1999 `(("libvdpau" ,libvdpau)))
2000 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2001 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2002 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2003 implementation.")
2004 (license (license:x11-style "file://COPYING"))))
2005
2006 (define-public libvdpau-va-gl
2007 (package
2008 (name "libvdpau-va-gl")
2009 (version "0.4.2")
2010 (source
2011 (origin
2012 (method url-fetch)
2013 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2014 "releases/download/v" version "/libvdpau-va-gl-"
2015 version ".tar.gz"))
2016 (sha256
2017 (base32
2018 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2019 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2020 (modules '((guix build utils)))
2021 (snippet '(begin (delete-file-recursively "3rdparty")
2022 #t))))
2023 (build-system cmake-build-system)
2024 (arguments
2025 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2026 (native-inputs
2027 `(("libvdpau" ,libvdpau)
2028 ("pkg-config" ,pkg-config)))
2029 (inputs
2030 `(("libva" ,libva)
2031 ("mesa" ,mesa)))
2032 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2033 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2034 (description
2035 "Many applications can use VDPAU to accelerate portions of the video
2036 decoding process and video post-processing to the GPU video hardware. Since
2037 there is no VDPAU available on Intel chips, they fall back to different drawing
2038 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2039 scaling and VA-API (if available) to accelerate video decoding.")
2040 (license license:expat)))
2041
2042 (define-public recordmydesktop
2043 (package
2044 (name "recordmydesktop")
2045 (version "0.3.8.1")
2046 (source (origin
2047 (method url-fetch)
2048 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2049 version "/recordmydesktop-" version ".tar.gz"))
2050 (sha256
2051 (base32
2052 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2053 (build-system gnu-build-system)
2054 (inputs `(("popt" ,popt)
2055 ("zlib" ,zlib)
2056 ("libx11" ,libx11)
2057 ("libice" ,libice)
2058 ("libsm" ,libsm)
2059 ("libxfixes" ,libxfixes)
2060 ("libxdamage" ,libxdamage)
2061 ("libxext" ,libxext)
2062 ("alsa-lib" ,alsa-lib)
2063 ("libvorbis" ,libvorbis)
2064 ("libtheora" ,libtheora)))
2065 (home-page "http://recordmydesktop.sourceforge.net/")
2066 (synopsis "Desktop session video recorder")
2067 (description
2068 "recordMyDesktop is a command-line tool that captures the activity in
2069 your graphical desktop and encodes it as a video. This is a useful tool for
2070 making @dfn{screencasts}.")
2071 (license license:gpl2+)))
2072
2073 (define-public simplescreenrecorder
2074 (package
2075 (name "simplescreenrecorder")
2076 (version "0.3.11")
2077 (source
2078 (origin
2079 (method url-fetch)
2080 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2081 version ".tar.gz"))
2082 (file-name (string-append name "-" version ".tar.gz"))
2083 (sha256
2084 (base32
2085 "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal"))))
2086 (build-system cmake-build-system)
2087 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2088 ;; README.md, the program builds and functions properly without them.
2089 ;; As a result, they are omitted. Please add them back if problems appear.
2090 (inputs
2091 `(("alsa-lib" ,alsa-lib)
2092 ("ffmpeg" ,ffmpeg)
2093 ("glu" ,glu)
2094 ("jack" ,jack-1)
2095 ("libxi" ,libxi)
2096 ("pulseaudio" ,pulseaudio)
2097 ("qt" ,qt)))
2098 (native-inputs `(("pkg-config" ,pkg-config)))
2099 (arguments
2100 `(#:configure-flags
2101 (list "-DWITH_QT5=TRUE")
2102 #:tests? #f)) ; no test suite
2103 ;; Using HTTPS causes part of the page to be displayed improperly.
2104 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2105 (synopsis "Screen recorder")
2106 (description "SimpleScreenRecorder is an easy to use screen recorder with
2107 a graphical user interface. It supports recording the entire screen, or a
2108 part of it, and allows encoding in many different codecs and file formats.
2109 Other features include a live preview and live streaming.")
2110 (license (list license:gpl3+ ; most files
2111 license:zlib ; glinject/elfhacks.*
2112 license:isc ; glinject/*
2113 license:x11)))) ; build-aux/install-sh
2114
2115 (define-public libsmpeg
2116 (package
2117 (name "libsmpeg")
2118 (version "0.4.5")
2119 (source (origin
2120 (method svn-fetch)
2121 (uri (svn-reference
2122 (url "svn://svn.icculus.org/smpeg/trunk/")
2123 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2124 (file-name (string-append name "-" version "-checkout"))
2125 (sha256
2126 (base32
2127 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2128 (build-system gnu-build-system)
2129 (arguments
2130 `(#:phases (modify-phases %standard-phases
2131 (add-after 'unpack 'autogen.sh
2132 (lambda _
2133 (zero? (system* "sh" "autogen.sh")))))))
2134 (native-inputs
2135 `(("autoconf" ,autoconf)
2136 ("automake" ,automake)))
2137 (inputs
2138 `(("sdl" ,sdl2)))
2139 (home-page "http://icculus.org/smpeg/")
2140 (synopsis "SDL MPEG decoding library")
2141 (description
2142 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2143 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2144 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2145 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2146 and MPEG system streams.")
2147 (license (list license:expat
2148 license:lgpl2.1
2149 license:lgpl2.1+
2150 license:gpl2))))
2151
2152 (define-public libbdplus
2153 (package
2154 (name "libbdplus")
2155 (version "0.1.2")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2160 version "/" name "-" version ".tar.bz2"))
2161 (sha256
2162 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2163 (inputs
2164 `(("libgcrypt" ,libgcrypt)))
2165 (build-system gnu-build-system)
2166 (home-page "https://www.videolan.org/developers/libbdplus.html")
2167 (synopsis "Library for decrypting certain Blu-Ray discs")
2168 (description "libbdplus is a library which implements the BD+ System
2169 specifications.")
2170 (license license:lgpl2.1+)))
2171
2172 (define-public libaacs
2173 (package
2174 (name "libaacs")
2175 (version "0.9.0")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2180 version "/" name "-" version ".tar.bz2"))
2181 (sha256
2182 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2183 (inputs
2184 `(("libgcrypt" ,libgcrypt)))
2185 (native-inputs
2186 `(("bison" ,bison)
2187 ("flex" ,flex)))
2188 (build-system gnu-build-system)
2189 (home-page "https://www.videolan.org/developers/libaacs.html")
2190 (synopsis "Library for decrypting certain Blu-Ray discs")
2191 (description "libaacs is a library which implements the Advanced Access
2192 Content System specification.")
2193 (license license:lgpl2.1+)))
2194
2195 (define-public mps-youtube
2196 (package
2197 (name "mps-youtube")
2198 (version "0.2.8")
2199 (source
2200 (origin
2201 (method url-fetch)
2202 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2203 "archive/v" version ".tar.gz"))
2204 (file-name (string-append name "-" version ".tar.gz"))
2205 (sha256
2206 (base32
2207 "0x7cmfh199q9j396v7bz81nnvanfllhsg86489i5dw2p3yyc9wnm"))))
2208 (build-system python-build-system)
2209 (arguments
2210 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2211 ;; test suite results differ depending on the country and also introduce
2212 ;; non-determinism in the tests.
2213 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2214 `(#:tests? #f))
2215 (propagated-inputs
2216 `(("python-pafy" ,python-pafy)
2217 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2218 (home-page "https://github.com/mps-youtube/mps-youtube")
2219 (synopsis "Terminal based YouTube player and downloader")
2220 (description
2221 "@code{mps-youtube} is based on mps, a terminal based program to
2222 search, stream and download music. This implementation uses YouTube as
2223 a source of content and can play and download video as well as audio.
2224 It can use either mpv or mplayer for playback, and for conversion of
2225 formats ffmpeg or libav is used. Users should install one of the
2226 supported players in addition to this package.")
2227 (license license:gpl3+)))
2228
2229 (define-public handbrake
2230 (package
2231 (name "handbrake")
2232 (version "0.10.5")
2233 (source (origin
2234 (method url-fetch)
2235 (uri (string-append "https://handbrake.fr/rotation.php?file="
2236 "HandBrake-" version ".tar.bz2"))
2237 (file-name (string-append "handbrake-" version ".tar.bz2"))
2238 (sha256
2239 (base32
2240 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2241 (patches (search-patches "handbrake-pkg-config-path.patch"))
2242 (modules '((guix build utils)))
2243 (snippet
2244 ;; Remove bundled libraries and source not necessary for
2245 ;; running under a GNU environment.
2246 '(begin
2247 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2248 #t))))
2249 (build-system glib-or-gtk-build-system)
2250 (native-inputs
2251 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2252 ("autoconf" ,autoconf)
2253 ("curl" ,curl) ;not actually used, but tested for
2254 ("intltool" ,intltool)
2255 ("libtool" ,libtool)
2256 ("pkg-config" ,pkg-config)
2257 ("python" ,python-2))) ;for configuration
2258 (inputs
2259 `(("bzip2" ,bzip2)
2260 ("dbus-glib" ,dbus-glib)
2261 ("ffmpeg" ,ffmpeg)
2262 ("fontconfig" ,fontconfig)
2263 ("freetype" ,freetype)
2264 ("glib" ,glib)
2265 ("gstreamer" ,gstreamer)
2266 ("gst-plugins-base" ,gst-plugins-base)
2267 ("gtk+" ,gtk+)
2268 ("lame" ,lame)
2269 ("libass" ,libass)
2270 ("libbluray" ,libbluray)
2271 ("libdvdnav" ,libdvdnav)
2272 ("libdvdread" ,libdvdread)
2273 ("libgudev" ,libgudev)
2274 ("libmpeg2" ,libmpeg2)
2275 ("libnotify" ,libnotify)
2276 ("libogg" ,libogg)
2277 ("libsamplerate" ,libsamplerate)
2278 ("libtheora" ,libtheora)
2279 ("libvorbis" ,libvorbis)
2280 ("libvpx" ,libvpx)
2281 ("libxml2" ,libxml2)
2282 ("libx264" ,libx264)
2283 ("x265" ,x265)
2284 ("zlib" ,zlib)))
2285 (arguments
2286 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2287 #:phases
2288 (modify-phases %standard-phases
2289 (replace 'bootstrap
2290 ;; Run bootstrap ahead of time so that shebangs get patched.
2291 (lambda _
2292 (setenv "CONFIG_SHELL" (which "sh"))
2293 (setenv "NOCONFIGURE" "1")
2294 ;; Patch the Makefile so that it doesn't bootstrap again.
2295 (substitute* "gtk/module.rules"
2296 ((".*autogen\\.sh.*") ""))
2297 (zero? (system* "sh" "./gtk/autogen.sh"))))
2298 (add-before 'configure 'disable-contrib
2299 (lambda _
2300 (substitute* "make/include/main.defs"
2301 ;; Disable unconditional inclusion of some "contrib"
2302 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2303 ;; and libbluray), which would lead to fetching and
2304 ;; building of these libraries. Use our own instead.
2305 (("MODULES \\+= contrib") "# MODULES += contrib"))
2306 #t))
2307 (add-before 'configure 'fix-x265-linking
2308 (lambda _
2309 (substitute* "test/module.defs"
2310 ;; Fix missing library during linking error
2311 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2312 #t))
2313 (replace 'configure
2314 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2315 ;; 'configure' is not an autoconf-generated script, and
2316 ;; errors on unrecognized arguments,
2317 ;; e.g. --enable-fast-install
2318 (let ((out (assoc-ref outputs "out")))
2319 (zero? (apply system* "./configure"
2320 (string-append "--prefix=" out)
2321 (or configure-flags '()))))))
2322 (add-after 'configure 'chdir-build
2323 (lambda _ (chdir "./build") #t)))))
2324 (home-page "https://handbrake.fr")
2325 (synopsis "Video transcoder")
2326 (description
2327 "HandBrake is a tool for converting video from any format to a selection
2328 of modern, widely supported codecs.")
2329 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2330 (license (list license:gpl2+ license:bsd-3))))
2331
2332 (define-public openh264
2333 (package
2334 (name "openh264")
2335 (version "1.7.0")
2336 (source (origin
2337 (method url-fetch)
2338 (uri (string-append "https://github.com/cisco/"
2339 name "/archive/v" version ".tar.gz"))
2340 (file-name (string-append name "-" version ".tar.gz"))
2341 (sha256
2342 (base32
2343 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2344 (build-system gnu-build-system)
2345 (native-inputs
2346 `(("nasm" ,nasm)
2347 ("python" ,python)))
2348 (arguments
2349 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2350 "CC=gcc")
2351 #:test-target "test"
2352 #:phases (modify-phases %standard-phases
2353 ;; no configure script
2354 (delete 'configure))))
2355 (home-page "http://www.openh264.org/")
2356 (synopsis "H264 decoder library")
2357 (description
2358 "Openh264 is a library which can decode H264 video streams.")
2359 (license license:bsd-2)))
2360
2361 (define-public libmp4v2
2362 (package
2363 (name "libmp4v2")
2364 (version "2.0.0")
2365 (source
2366 (origin
2367 (method url-fetch)
2368 ;; XXX: The new location of upstream is uncertain and will become relevant the
2369 ;; moment when the googlecode archive shuts down. It is past the date it
2370 ;; should've been turned off. I tried to communicate with upstream, but this
2371 ;; wasn't very responsive and not very helpful. The short summary is, it is
2372 ;; chaos when it comes to the amount of forks and only time will tell where
2373 ;; the new upstream location is.
2374 (uri (string-append "https://storage.googleapis.com/google-"
2375 "code-archive-downloads/v2/"
2376 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2377 (file-name (string-append name "-" version ".tar.bz2"))
2378 (sha256
2379 (base32
2380 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2381 (build-system gnu-build-system)
2382 (outputs '("out"
2383 "static")) ; 3.7MiB .a file
2384 (arguments
2385 `(#:phases
2386 (modify-phases %standard-phases
2387 (add-after 'unpack 'remove-dates
2388 (lambda _
2389 ;; Make the build reproducible.
2390 (substitute* "configure"
2391 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2392 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2393 #t))
2394 (add-after 'install 'move-static-libraries
2395 (lambda* (#:key outputs #:allow-other-keys)
2396 ;; Move static libraries to the "static" output.
2397 (let* ((out (assoc-ref outputs "out"))
2398 (lib (string-append out "/lib"))
2399 (static (assoc-ref outputs "static"))
2400 (slib (string-append static "/lib")))
2401 (mkdir-p slib)
2402 (for-each (lambda (file)
2403 (install-file file slib)
2404 (delete-file file))
2405 (find-files lib "\\.a$"))
2406 #t))))))
2407 (native-inputs
2408 `(("help2man" ,help2man)
2409 ("dejagnu" ,dejagnu)))
2410 (home-page "https://code.google.com/archive/p/mp4v2/")
2411 (synopsis "API to create and modify mp4 files")
2412 (description
2413 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2414 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2415 file format that has been used as a multimedia file format in a variety of platforms and
2416 applications. It is a very powerful and extensible format that can accommodate
2417 practically any type of media.")
2418 (license license:mpl1.1)))
2419
2420 (define-public libmediainfo
2421 (package
2422 (name "libmediainfo")
2423 (version "0.7.95")
2424 (source (origin
2425 (method url-fetch)
2426 (uri (string-append "https://mediaarea.net/download/source/"
2427 name "/" version"/"
2428 name "_" version ".tar.bz2"))
2429 (sha256
2430 (base32
2431 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2432 ;; TODO add a Big Buck Bunny webm for tests.
2433 (native-inputs
2434 `(("autoconf" ,autoconf)
2435 ("automake" ,automake)
2436 ("libtool" ,libtool)
2437 ("pkg-config" ,pkg-config)
2438 ("zlib" ,zlib)
2439 ("tinyxml2" ,tinyxml2)
2440 ("curl" ,curl)
2441 ("libzen" ,libzen)))
2442 (build-system gnu-build-system)
2443 (arguments
2444 '(#:tests? #f ; see above TODO
2445 #:phases
2446 ;; build scripts not in root of archive
2447 (modify-phases %standard-phases
2448 (add-after 'unpack 'change-to-build-dir
2449 (lambda _
2450 (chdir "Project/GNU/Library")
2451 #t))
2452 (add-after 'change-to-build-dir 'autogen
2453 (lambda _
2454 (zero? (system* "sh" "autogen.sh")))))))
2455 (home-page "https://mediaarea.net/en/MediaInfo")
2456 (synopsis "Library for retrieving media metadata")
2457 (description "MediaInfo is a library used for retrieving technical
2458 information and other metadata about audio or video files. A non-exhaustive
2459 list of the information MediaInfo can retrieve from media files include:
2460
2461 @itemize
2462 @item General: title, author, director, album, track number, date, duration...
2463 @item Video: codec, aspect, fps, bitrate...
2464 @item Audio: codec, sample rate, channels, language, bitrate...
2465 @item Text: language of subtitle
2466 @item Chapters: number of chapters, list of chapters
2467 @end itemize
2468
2469 MediaInfo supports the following formats:
2470
2471 @itemize
2472 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2473 MPEG-2, MPEG-4, DVD (VOB)...
2474 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2475 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2476 @item Subtitles: SRT, SSA, ASS, SAMI...
2477 @end itemize\n")
2478 (license license:bsd-2)))
2479
2480 ;; TODO also have a GUI version available
2481 (define-public mediainfo
2482 (package
2483 (name "mediainfo")
2484 (version "0.7.95")
2485 (source (origin
2486 (method url-fetch)
2487 (uri (string-append "https://mediaarea.net/download/source/"
2488 name "/" version "/"
2489 name "_" version ".tar.bz2"))
2490 (sha256
2491 (base32
2492 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2493 (native-inputs
2494 `(("autoconf" ,autoconf)
2495 ("automake" ,automake)
2496 ("libtool" ,libtool)
2497 ("pkg-config" ,pkg-config)
2498 ("zlib" ,zlib)
2499 ("libmediainfo" ,libmediainfo)
2500 ("libzen" ,libzen)))
2501 (build-system gnu-build-system)
2502 (arguments
2503 '(#:tests? #f ; lacks tests
2504 #:phases
2505 ;; build scripts not in root of archive
2506 (modify-phases %standard-phases
2507 (add-after 'unpack 'change-to-build-dir
2508 (lambda _
2509 (chdir "Project/GNU/CLI")
2510 #t))
2511 (add-after 'change-to-build-dir 'autogen
2512 (lambda _
2513 (zero? (system* "sh" "autogen.sh")))))))
2514 (home-page "https://mediaarea.net/en/MediaInfo")
2515 (synopsis "Utility for reading media metadata")
2516 (description "MediaInfo is a utility used for retrieving technical
2517 information and other metadata about audio or video files. It supports the
2518 many codecs and formats supported by libmediainfo.")
2519 (license license:bsd-2)))
2520
2521 (define-public livemedia-utils
2522 (package
2523 (name "livemedia-utils")
2524 (version "2017.10.28")
2525 (source (origin
2526 (method url-fetch)
2527 (uri (string-append
2528 "https://download.videolan.org/contrib/live555/live."
2529 version ".tar.gz"))
2530 (sha256
2531 (base32
2532 "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
2533 (modules '((guix build utils)))
2534 (snippet '(begin
2535 ;; As of glibc 2.26, <xlocale.h> no longer is.
2536 (substitute* "liveMedia/include/Locale.hh"
2537 (("xlocale\\.h") "locale.h"))
2538 #t))))
2539 (build-system gnu-build-system)
2540 (arguments
2541 '(#:tests? #f ; no tests
2542 #:make-flags (list "CC=gcc"
2543 (string-append "LDFLAGS=-Wl,-rpath="
2544 (assoc-ref %outputs "out") "/lib")
2545 (string-append "PREFIX="
2546 (assoc-ref %outputs "out")))
2547 #:phases (modify-phases %standard-phases
2548 (add-before 'configure 'fix-makefiles-generation
2549 (lambda _
2550 (substitute* "genMakefiles"
2551 (("/bin/rm") "rm"))
2552 #t))
2553 (replace 'configure
2554 (lambda _
2555 (zero? (system* "./genMakefiles"
2556 "linux-with-shared-libraries")))))))
2557 (home-page "http://www.live555.com/liveMedia/")
2558 (synopsis "Set of C++ libraries for multimedia streaming")
2559 (description "This code forms a set of C++ libraries for multimedia
2560 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2561 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2562 JPEG video, and several audio codecs. They can easily be extended to support
2563 additional (audio and/or video) codecs, and can also be used to build basic
2564 RTSP or SIP clients and servers.")
2565 (license license:lgpl3+)))
2566
2567 (define-public libdvbpsi
2568 (package
2569 (name "libdvbpsi")
2570 (version "1.3.2")
2571 (source (origin
2572 (method url-fetch)
2573 (uri (string-append
2574 "https://download.videolan.org/pub/libdvbpsi/"
2575 version "/libdvbpsi-" version ".tar.bz2"))
2576 (sha256
2577 (base32
2578 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2579 (build-system gnu-build-system)
2580 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2581 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2582 tables")
2583 (description "libdvbpsi is a simple library designed for decoding and
2584 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2585 and ITU-T H.222.0.")
2586 (license license:lgpl2.1)))
2587
2588 (define-public ffms2
2589 (package
2590 (name "ffms2")
2591 (version "2.23")
2592 (home-page "https://github.com/FFMS/ffms2")
2593 (source (origin
2594 (method url-fetch)
2595 (uri (string-append home-page "/archive/" version ".tar.gz"))
2596 (file-name (string-append name "-" version ".tar.gz"))
2597 (sha256
2598 (base32
2599 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2600 (build-system gnu-build-system)
2601 (arguments
2602 '(#:configure-flags
2603 (list "--enable-avresample")))
2604 (inputs
2605 `(("zlib" ,zlib)))
2606 (propagated-inputs
2607 `(("ffmpeg" ,ffmpeg)))
2608 (native-inputs
2609 `(("pkg-config" ,pkg-config)))
2610 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2611 (description
2612 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2613 programmers to access a standard API to open and decompress media files.")
2614 ;; sources are distributed under a different license that the binary.
2615 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2616 (license license:gpl2+))); inherits from ffmpeg
2617
2618 (define-public aegisub
2619 (package
2620 (name "aegisub")
2621 (version "3.2.2")
2622 (source (origin
2623 (method url-fetch)
2624 (uri (string-append
2625 "http://ftp.aegisub.org/pub/archives/releases/source/"
2626 name "-" version ".tar.xz"))
2627 (sha256
2628 (base32
2629 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2630 (build-system gnu-build-system)
2631 (arguments
2632 `(#:configure-flags
2633 (list "--disable-update-checker"
2634 "--without-portaudio"
2635 "--without-openal"
2636 "--without-oss")
2637 ;; tests require busted, a lua package we don't have yet
2638 #:tests? #f
2639 #:phases
2640 (modify-phases %standard-phases
2641 (add-before 'configure 'fix-ldflags
2642 (lambda _
2643 (setenv "LDFLAGS" "-pthread"))))))
2644 (inputs
2645 `(("boost" ,boost)
2646 ("desktop-file-utils" ,desktop-file-utils)
2647 ("ffms2" ,ffms2)
2648 ("fftw" ,fftw)
2649 ("hunspell" ,hunspell)
2650 ("mesa" ,mesa)
2651 ("libass" ,libass)
2652 ("alsa-lib" ,alsa-lib)
2653 ("pulseaudio" ,pulseaudio)
2654 ("libx11" ,libx11)
2655 ("freetype" ,freetype)
2656 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2657 (native-inputs
2658 `(("intltool" ,intltool)
2659 ("pkg-config" ,pkg-config)))
2660 (home-page "http://www.aegisub.org/")
2661 (synopsis "Subtitle engine")
2662 (description
2663 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2664 it quick and easy to time subtitles to audio, and features many powerful
2665 tools for styling them, including a built-in real-time video preview.")
2666 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2667 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2668 license:expat)))) ; and src/gl that is under a license similar
2669 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2670 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2671 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2672
2673 (define-public gst-transcoder
2674 (package
2675 (name "gst-transcoder")
2676 (version "1.12.2")
2677 (source
2678 (origin
2679 (method url-fetch)
2680 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2681 "archive/" version ".tar.gz"))
2682 (file-name (string-append name "-" version ".tar.gz"))
2683 (sha256
2684 (base32
2685 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2686 (build-system meson-build-system)
2687 (inputs
2688 `(("gobject-introspection" ,gobject-introspection)
2689 ("glib" ,glib)
2690 ("gstreamer" ,gstreamer)
2691 ("gst-plugins-base" ,gst-plugins-base)))
2692 (native-inputs
2693 `(("python" ,python)
2694 ("pkg-config" ,pkg-config)))
2695 (home-page "https://github.com/pitivi/gst-transcoder/")
2696 (synopsis "GStreamer Transcoding API")
2697 (description "GStreamer Transcoding API")
2698 (license license:lgpl2.1)))
2699
2700 (define-public gavl
2701 (package
2702 (name "gavl")
2703 (version "1.4.0")
2704 (source
2705 (origin
2706 (method url-fetch)
2707 (uri (string-append "mirror://sourceforge/gmerlin/"
2708 name "/" version "/"
2709 name "-" version ".tar.gz"))
2710 (file-name (string-append name "-" version ".tar.gz"))
2711 (sha256
2712 (base32
2713 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2714 (build-system gnu-build-system)
2715 (arguments
2716 '(#:configure-flags '("LIBS=-lm")))
2717 (native-inputs
2718 `(("pkg-config" ,pkg-config)
2719 ("doxygen" ,doxygen)))
2720 (home-page "http://gmerlin.sourceforge.net")
2721 (synopsis "Low level library for multimedia API building")
2722 (description
2723 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2724 library, upon which multimedia APIs can be built. Gavl handles all the
2725 details of audio and video formats like colorspaces, sample rates,
2726 multichannel configurations, etc. It provides standardized definitions for
2727 those formats as well as container structures for carrying audio samples or
2728 video images inside an application.
2729
2730 In addition, it handles the sometimes ugly task of converting between all
2731 these formats and provides some elementary operations (copying, scaling,
2732 alpha blending etc).")
2733 (license license:gpl3)))
2734
2735 (define-public frei0r-plugins
2736 (package
2737 (name "frei0r-plugins")
2738 (version "1.6.1")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (string-append "https://files.dyne.org/frei0r/"
2743 "frei0r-plugins-" version ".tar.gz"))
2744 (sha256
2745 (base32
2746 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2747 (build-system gnu-build-system)
2748 (arguments
2749 `(#:phases
2750 (modify-phases %standard-phases
2751 (add-after 'unpack 'autotools
2752 (lambda _
2753 (zero? (system* "sh" "autogen.sh")))))))
2754 ;; TODO: opencv for additional face detection filters
2755 (inputs
2756 `(("gavl" ,gavl)
2757 ("cairo" ,cairo)))
2758 (native-inputs
2759 `(("pkg-config" ,pkg-config)
2760 ("libtool" ,libtool)
2761 ("automake" ,automake)
2762 ("autoconf" ,autoconf)))
2763 (home-page "https://www.dyne.org/software/frei0r/")
2764 (synopsis "Minimalistic plugin API for video effects")
2765 (description
2766 "Frei0r is a minimalistic plugin API for video effects.
2767 The main emphasis is on simplicity for an API that will round up
2768 the most common video effects into simple filters, sources and
2769 mixers that can be controlled by parameters. Frei0r wants to
2770 provide a way to share these simple effects between many
2771 applications, avoiding their reimplementation by different projects.
2772 It counts more than 100 plugins.")
2773 (license (list license:gpl2+
2774 ;; The following files are licensed as LGPL2.1+:
2775 ;; src/generator/ising0r/ising0r.c
2776 ;; src/generator/onecol0r/onecol0r.cpp
2777 ;; src/generator/nois0r/nois0r.cpp
2778 ;; src/generator/lissajous0r/lissajous0r.cpp
2779 ;; src/filter/ndvi/gradientlut.hpp
2780 ;; src/filter/ndvi/ndvi.cpp
2781 ;; src/filter/facedetect/facedetect.cpp
2782 license:lgpl2.1+))))
2783
2784 (define-public motion
2785 (package
2786 (name "motion")
2787 (version "4.1.1")
2788 (home-page "https://motion-project.github.io/")
2789 (source (origin
2790 (method url-fetch)
2791 (uri (string-append
2792 "https://github.com/Motion-Project/motion/archive/"
2793 "release-" version ".tar.gz"))
2794 (sha256
2795 (base32
2796 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2797 (file-name (string-append name "-" version ".tar.gz"))))
2798 (build-system gnu-build-system)
2799 (native-inputs
2800 `(("autoconf" ,autoconf-wrapper)
2801 ("automake" ,automake)
2802 ("pkg-config" ,pkg-config)))
2803 (inputs
2804 `(("libjpeg" ,libjpeg)
2805 ("ffmpeg" ,ffmpeg-3.4)
2806 ("sqlite" ,sqlite)))
2807 (arguments
2808 '(#:phases (modify-phases %standard-phases
2809 (replace 'bootstrap
2810 (lambda _
2811 (patch-shebang "version.sh")
2812 (invoke "autoreconf" "-vfi"))))
2813 #:configure-flags '("--sysconfdir=/etc")
2814 #:make-flags (list (string-append "sysconfdir="
2815 (assoc-ref %outputs "out")
2816 "/etc"))
2817
2818 #:tests? #f)) ;no 'check' target
2819 (synopsis "Detect motion from video signals")
2820 (description
2821 "Motion is a program that monitors the video signal from one or more
2822 cameras and is able to detect if a significant part of the picture has
2823 changed. Or in other words, it can detect motion.")
2824
2825 ;; Some files say "version 2" and others "version 2 or later".
2826 (license license:gpl2)))
2827
2828 (define-public subdl
2829 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
2830 (revision "1"))
2831 (package
2832 (name "subdl")
2833 (version (git-version "1.0.3" revision commit))
2834 (source (origin
2835 (method git-fetch)
2836 (uri (git-reference
2837 (url "https://github.com/alexanderwink/subdl.git")
2838 (commit commit)))
2839 (file-name (git-file-name name version))
2840 (sha256
2841 (base32
2842 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
2843 (build-system trivial-build-system)
2844 (arguments
2845 `(#:modules ((guix build utils))
2846 #:builder (begin
2847 (use-modules (guix build utils))
2848 (let* ((out (assoc-ref %outputs "out"))
2849 (bin (string-append out "/bin"))
2850 (source (assoc-ref %build-inputs "source"))
2851 (python (assoc-ref %build-inputs "python")))
2852 (install-file (string-append source "/subdl") bin)
2853 (patch-shebang (string-append bin "/subdl")
2854 (list (string-append python "/bin")))))))
2855 (inputs `(("python" ,python)))
2856 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
2857 (description "Subdl is a command-line tool for downloading subtitles from
2858 opensubtitles.org. By default, it will search for English subtitles, display
2859 the results, download the highest-rated result in the requested language and
2860 save it to the appropriate filename.")
2861 (license license:gpl3+)
2862 (home-page "https://github.com/alexanderwink/subdl"))))
2863
2864 (define-public l-smash
2865 (package
2866 (name "l-smash")
2867 (version "2.14.5")
2868 (source (origin
2869 (method url-fetch)
2870 (uri (string-append
2871 "https://github.com/" name "/" name "/archive/v"
2872 version ".tar.gz"))
2873 (file-name (string-append name "-" version ".tar.gz"))
2874 (sha256
2875 (base32
2876 "0dary0h65kq6sv93iabv25djlvzr5ckdcp3ywagbix44wqfw7xz6"))))
2877 (build-system gnu-build-system)
2878 (arguments
2879 `(#:tests? #f ;no tests
2880 #:make-flags
2881 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
2882 (assoc-ref %outputs "out") "/lib"))
2883 #:phases
2884 (modify-phases %standard-phases
2885 ;; configure fails if it is followed by CONFIG_SHELL
2886 (replace 'configure
2887 (lambda* (#:key outputs #:allow-other-keys)
2888 (let ((out (assoc-ref outputs "out")))
2889 (invoke "./configure" (string-append "--prefix=" out)
2890 "--disable-static")))))))
2891 (native-inputs
2892 `(("which" ,which)))
2893 (home-page "https://l-smash.github.io/l-smash/")
2894 (synopsis "MP4 multiplexer and demultiplexer library")
2895 (description
2896 "L-SMASH is a cross-platform library that handles the ISO base media file
2897 format and some of its derived file formats, including MP4. It operates as a
2898 multiplexer and demultiplexer, and can mux video and audio in several formats
2899 using standalone executable files.")
2900 (license license:isc)))