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