Merge branch 'master' into staging
[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, 2018 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
16 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
18 ;;; Copyright © 2017, 2018, 2019, 2020 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, 2019 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
30 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
31 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
32 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
34 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
35 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
36 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
37 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
38 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
39 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
40 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
41 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
42 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
43 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
44 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
45 ;;;
46 ;;; This file is part of GNU Guix.
47 ;;;
48 ;;; GNU Guix is free software; you can redistribute it and/or modify it
49 ;;; under the terms of the GNU General Public License as published by
50 ;;; the Free Software Foundation; either version 3 of the License, or (at
51 ;;; your option) any later version.
52 ;;;
53 ;;; GNU Guix is distributed in the hope that it will be useful, but
54 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
55 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56 ;;; GNU General Public License for more details.
57 ;;;
58 ;;; You should have received a copy of the GNU General Public License
59 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
60
61 (define-module (gnu packages video)
62 #:use-module (ice-9 match)
63 #:use-module (srfi srfi-1)
64 #:use-module (srfi srfi-26)
65 #:use-module ((guix licenses) #:prefix license:)
66 #:use-module (guix utils)
67 #:use-module (guix packages)
68 #:use-module (guix download)
69 #:use-module (guix git-download)
70 #:use-module (guix svn-download)
71 #:use-module (guix build-system cargo)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system copy)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system glib-or-gtk)
76 #:use-module (guix build-system meson)
77 #:use-module (guix build-system perl)
78 #:use-module (guix build-system python)
79 #:use-module (guix build-system waf)
80 #:use-module (guix build-system trivial)
81 #:use-module (gnu packages)
82 #:use-module (gnu packages algebra)
83 #:use-module (gnu packages assembly)
84 #:use-module (gnu packages audio)
85 #:use-module (gnu packages autotools)
86 #:use-module (gnu packages avahi)
87 #:use-module (gnu packages backup)
88 #:use-module (gnu packages base)
89 #:use-module (gnu packages bison)
90 #:use-module (gnu packages boost)
91 #:use-module (gnu packages cdrom)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages cmake)
94 #:use-module (gnu packages compression)
95 #:use-module (gnu packages cpp)
96 #:use-module (gnu packages crates-io)
97 #:use-module (gnu packages curl)
98 #:use-module (gnu packages dejagnu)
99 #:use-module (gnu packages dns)
100 #:use-module (gnu packages docbook)
101 #:use-module (gnu packages documentation)
102 #:use-module (gnu packages elf)
103 #:use-module (gnu packages file)
104 #:use-module (gnu packages flex)
105 #:use-module (gnu packages fonts)
106 #:use-module (gnu packages fontutils)
107 #:use-module (gnu packages freedesktop)
108 #:use-module (gnu packages fribidi)
109 #:use-module (gnu packages gettext)
110 #:use-module (gnu packages ghostscript)
111 #:use-module (gnu packages gl)
112 #:use-module (gnu packages glib)
113 #:use-module (gnu packages guile)
114 #:use-module (gnu packages gnome)
115 #:use-module (gnu packages gnunet)
116 #:use-module (gnu packages gnupg)
117 #:use-module (gnu packages gstreamer)
118 #:use-module (gnu packages gtk)
119 #:use-module (gnu packages image)
120 #:use-module (gnu packages imagemagick)
121 #:use-module (gnu packages iso-codes)
122 #:use-module (gnu packages libidn)
123 #:use-module (gnu packages libreoffice)
124 #:use-module (gnu packages linux)
125 #:use-module (gnu packages lua)
126 #:use-module (gnu packages m4)
127 #:use-module (gnu packages man)
128 #:use-module (gnu packages markup)
129 #:use-module (gnu packages mp3)
130 #:use-module (gnu packages ncurses)
131 #:use-module (gnu packages networking)
132 #:use-module (gnu packages ocr)
133 #:use-module (gnu packages perl)
134 #:use-module (gnu packages perl-check)
135 #:use-module (gnu packages pkg-config)
136 #:use-module (gnu packages popt)
137 #:use-module (gnu packages pretty-print)
138 #:use-module (gnu packages protobuf)
139 #:use-module (gnu packages pulseaudio)
140 #:use-module (gnu packages python)
141 #:use-module (gnu packages python-crypto)
142 #:use-module (gnu packages python-web)
143 #:use-module (gnu packages python-xyz)
144 #:use-module (gnu packages qt)
145 #:use-module (gnu packages rdesktop)
146 #:use-module (gnu packages ruby)
147 #:use-module (gnu packages rust-apps)
148 #:use-module (gnu packages samba)
149 #:use-module (gnu packages sdl)
150 #:use-module (gnu packages serialization)
151 #:use-module (gnu packages shells)
152 #:use-module (gnu packages sqlite)
153 #:use-module (gnu packages ssh)
154 #:use-module (gnu packages swig)
155 #:use-module (gnu packages texinfo)
156 #:use-module (gnu packages textutils)
157 #:use-module (gnu packages tls)
158 #:use-module (gnu packages time)
159 #:use-module (gnu packages upnp)
160 #:use-module (gnu packages version-control)
161 #:use-module (gnu packages vulkan)
162 #:use-module (gnu packages web)
163 #:use-module (gnu packages webkit)
164 #:use-module (gnu packages wxwidgets)
165 #:use-module (gnu packages xdisorg)
166 #:use-module (gnu packages xiph)
167 #:use-module (gnu packages xml)
168 #:use-module (gnu packages xorg))
169
170 (define-public aalib
171 (package
172 (name "aalib")
173 (version "1.4rc5")
174 (source (origin
175 (method url-fetch)
176 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
177 version "/" name "-" version ".tar.gz"))
178 (sha256
179 (base32
180 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
181 (build-system gnu-build-system)
182 (native-inputs
183 `(("makeinfo" ,texinfo)))
184 (inputs
185 `(("ncurses" ,ncurses)))
186 (arguments
187 `(#:phases
188 (modify-phases %standard-phases
189 (replace 'configure
190 (lambda* (#:key build inputs outputs #:allow-other-keys)
191 ;; This old `configure' script doesn't support
192 ;; variables passed as arguments.
193 (let ((out (assoc-ref outputs "out"))
194 (ncurses (assoc-ref inputs "ncurses")))
195 (setenv "CONFIG_SHELL" (which "bash"))
196 (invoke "./configure"
197 (string-append "--prefix=" out)
198 (string-append "--build=" build)
199 ;; The ancient config.guess is unable to
200 ;; guess the host triplet on mips64el.
201 ,@(if (string=? "mips64el-linux"
202 (%current-system))
203 '("--host=mips64el-unknown-linux-gnu")
204 '())
205 ;; The same is also true with aarch64.
206 ,@(if (string=? "aarch64-linux"
207 (%current-system))
208 '("--host=aarch64-unknown-linux-gnu")
209 '())
210 (string-append "--with-ncurses="
211 ncurses))))))))
212 (home-page "http://aa-project.sourceforge.net/aalib/")
213 (synopsis "ASCII-art library")
214 (description
215 "AA-lib is a low level gfx library which does not require graphics device.
216 In fact, there is no graphical output possible. AA-lib replaces those
217 old-fashioned output methods with powerful ascii-art renderer.")
218 (license license:lgpl2.0+)))
219
220 (define-public celluloid
221 (package
222 (name "celluloid")
223 (version "0.19")
224 (source
225 (origin
226 (method url-fetch)
227 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
228 "/download/v" version "/celluloid-" version ".tar.xz"))
229 (sha256
230 (base32 "1s3qkism96gi44incvsb6rqg255qcvjvw61ya7nw30md0sapj4sl"))))
231 (build-system glib-or-gtk-build-system)
232 (native-inputs
233 `(("intltool" ,intltool)
234 ("pkg-config" ,pkg-config)))
235 (inputs
236 `(("gtk+" ,gtk+)
237 ("libepoxy" ,libepoxy)
238 ("mpv" ,mpv)))
239 (home-page "https://github.com/celluloid-player/celluloid")
240 (synopsis "GTK+ frontend for the mpv media player")
241 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
242 It interacts with mpv via the client API exported by libmpv, allowing access to
243 mpv's powerful playback capabilities.")
244 (license license:gpl3+)))
245
246 (define-public liba52
247 (package
248 (name "liba52")
249 (version "0.7.4")
250 (source (origin
251 (method url-fetch)
252 (uri (string-append
253 ;; A mirror://sourceforge URI doesn't work, presumably
254 ;; because the SourceForge project is misconfigured.
255 "http://liba52.sourceforge.net/files/a52dec-" version
256 ".tar.gz"))
257 (sha256
258 (base32
259 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
260 (patches (search-patches "liba52-enable-pic.patch"
261 "liba52-set-soname.patch"
262 "liba52-use-mtune-not-mcpu.patch"
263 "liba52-link-with-libm.patch"))))
264 (build-system gnu-build-system)
265 ;; XXX We need to run ./bootstrap because of the build system fixes above.
266 (native-inputs
267 `(("autoconf" ,autoconf)
268 ("automake" ,automake)
269 ("libtool" ,libtool)))
270 (arguments `(#:configure-flags '("--enable-shared")
271 #:phases
272 (modify-phases %standard-phases
273 ;; XXX We need to run ./bootstrap because of the build
274 ;; system fixes above.
275 (replace 'bootstrap
276 (lambda _ (invoke "sh" "bootstrap"))))))
277 (home-page "http://liba52.sourceforge.net/")
278 (synopsis "ATSC A/52 stream decoder")
279 (description "liba52 is a library for decoding ATSC A/52 streams. The
280 A/52 standard is used in a variety of applications, including digital
281 television and DVD. It is also known as AC-3.")
282 (license license:gpl2+)))
283
284 (define-public libaom
285 (package
286 (name "libaom")
287 (version "2.0.0")
288 (source (origin
289 (method git-fetch)
290 (uri (git-reference
291 (url "https://aomedia.googlesource.com/aom/")
292 (commit (string-append "v" version))))
293 (file-name (git-file-name name version))
294 (sha256
295 (base32
296 "1616xjhj6770ykn82ml741h8hx44v507iky3s9h7a5lnk9d4cxzy"))))
297 (build-system cmake-build-system)
298 (native-inputs
299 `(("perl" ,perl)
300 ("pkg-config" ,pkg-config)
301 ("python" ,python))) ; to detect the version
302 (arguments
303 `(#:tests? #f ;no check target
304 #:configure-flags
305 ;; build dynamic library
306 (list "-DBUILD_SHARED_LIBS=YES"
307 "-DENABLE_PIC=TRUE"
308 "-DAOM_TARGET_CPU=generic"
309 (string-append "-DCMAKE_INSTALL_PREFIX="
310 (assoc-ref %outputs "out")))))
311 (home-page "https://aomedia.googlesource.com/aom/")
312 (synopsis "AV1 video codec")
313 (description "Libaom is the reference implementation of AV1. It includes a
314 shared library and encoder and decoder command-line executables.")
315 (license license:bsd-2)))
316
317 (define-public libmpeg2
318 (package
319 (name "libmpeg2")
320 (version "0.5.1")
321 (source (origin
322 (method url-fetch)
323 ;; A mirror://sourceforge URI doesn't work, presumably
324 ;; because the SourceForge project is misconfigured.
325 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
326 name "-" version ".tar.gz"))
327 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
328 "libmpeg2-global-symbol-test.patch"))
329 (sha256
330 (base32
331 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
332 (inputs
333 `(("libx11" ,libx11)
334 ("libxext" ,libxext)
335 ("libxv" ,libxv)
336 ("libsm" ,libsm)
337 ("libice" ,libice)
338 ("sdl" ,sdl)))
339 (build-system gnu-build-system)
340 (home-page "http://libmpeg2.sourceforge.net/")
341 (synopsis "MPEG1 and MPEG2 video decoder library")
342 (description
343 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
344 (license license:gpl2+)))
345
346 (define-public libx264
347 ;; There are no tags in the repository, so we take the version number from
348 ;; the X264_BUILD variable defined in x264.h.
349 (let ((version "159")
350 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
351 (revision "0"))
352 (package
353 (name "libx264")
354 (version (git-version version revision commit))
355 (source (origin
356 (method git-fetch)
357 (uri (git-reference
358 (url "https://code.videolan.org/videolan/x264.git")
359 (commit commit)))
360 (file-name (git-file-name name version))
361 (sha256
362 (base32
363 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
364 (build-system gnu-build-system)
365 (native-inputs
366 `(("pkg-config" ,pkg-config)
367 ("nasm" ,nasm)))
368 ;; TODO: Add gpac input
369 (arguments
370 `(#:tests? #f ;no check target
371 #:configure-flags '("--enable-shared"
372 ;; Don't build the command-line program. If we
373 ;; want it later, we should do so in a different
374 ;; package to avoid a circular dependency (the x264
375 ;; program depends on ffmpeg and ffmpeg depends on
376 ;; libx264).
377 "--disable-cli"
378
379 ;; On MIPS, we must pass "--disable-asm" or else
380 ;; configure fails after printing: "You specified a
381 ;; pre-MSA CPU in your CFLAGS. If you really want
382 ;; to run on such a CPU, configure with
383 ;; --disable-asm."
384 ,@(if (string-prefix? "mips"
385 (or (%current-target-system)
386 (%current-system)))
387 '("--disable-asm")
388 '()))))
389 (home-page "https://www.videolan.org/developers/x264.html")
390 (synopsis "H.264 video coding library")
391 (description "libx264 is an advanced encoding library for creating
392 H.264 (MPEG-4 AVC) video streams.")
393 (license (list license:gpl2+ ;most files
394 license:isc ;common/x86/x86inc.asm
395 license:lgpl2.1+ ;extras/getopt.c
396 license:bsd-3 ;extras/inttypes.h
397 (license:non-copyleft ;extras/cl*.h
398 "file://extras/cl.h"
399 "See extras/cl.h in the distribution."))))))
400
401 (define-public mkvtoolnix
402 (package
403 (name "mkvtoolnix")
404 (version "37.0.0")
405 (source
406 (origin
407 (method url-fetch)
408 (uri (string-append "https://mkvtoolnix.download/sources/"
409 "mkvtoolnix-" version ".tar.xz"))
410 (sha256
411 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
412 (modules '((guix build utils)))
413 (snippet '(begin
414 ;; Delete bundled libraries.
415 (for-each delete-file-recursively
416 '("lib/fmt"
417 "lib/libebml"
418 "lib/libmatroska"
419 "lib/nlohmann-json"
420 "lib/pugixml"
421 "lib/utf8-cpp"))
422 #t))))
423 (build-system gnu-build-system)
424 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
425 (inputs
426 `(("boost" ,boost)
427 ("bzip2" ,bzip2)
428 ("cmark" ,cmark)
429 ("libebml" ,libebml)
430 ("file" ,file)
431 ("flac" ,flac)
432 ("fmt" ,fmt)
433 ("libmatroska" ,libmatroska)
434 ("libogg" ,libogg)
435 ("libvorbis" ,libvorbis)
436 ("lzo" ,lzo)
437 ("pugixml" ,pugixml)
438 ("qtbase" ,qtbase)
439 ("qtmultimedia" ,qtmultimedia)
440 ("utfcpp" ,utfcpp)
441 ("zlib" ,zlib)))
442 (native-inputs
443 `(("docbook-xsl" ,docbook-xsl)
444 ("gettext" ,gettext-minimal)
445 ("googletest" ,googletest)
446 ("libxslt" ,libxslt)
447 ("json-modern-cxx" ,json-modern-cxx)
448 ("perl" ,perl)
449 ("pkg-config" ,pkg-config)
450 ("po4a" ,po4a)
451 ("qttools" ,qttools)
452 ("ruby" ,ruby)))
453 (arguments
454 `(#:configure-flags
455 (list (string-append "--with-boost="
456 (assoc-ref %build-inputs "boost"))
457 (string-append "--with-docbook-xsl-root="
458 (assoc-ref %build-inputs "docbook-xsl")
459 "/xml/xsl/docbook-xsl-"
460 ,(package-version docbook-xsl))
461 "--enable-update-check=no"
462 "--enable-precompiled-headers=no")
463 #:phases
464 (modify-phases %standard-phases
465 (add-after 'unpack 'patch-relative-file-names
466 (lambda* (#:key outputs #:allow-other-keys)
467 (let ((out (assoc-ref outputs "out")))
468 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
469 (("mkvmerge" match)
470 (string-append out "/bin/" match)))
471 #t)))
472 (add-before 'configure 'add-googletest
473 (lambda* (#:key inputs #:allow-other-keys)
474 (symlink
475 (string-append (assoc-ref inputs "googletest")
476 "/include/gtest") "lib/gtest")
477 #t))
478 (replace 'build
479 (lambda _
480 (let ((-j (list "-j" (number->string (parallel-job-count)))))
481 (apply invoke "rake" -j))))
482 (replace 'check
483 (lambda _
484 (invoke "rake" "tests/unit")))
485 (replace 'install
486 (lambda _
487 (invoke "rake" "install")))
488 (add-after 'install 'post-install
489 (lambda* (#:key outputs #:allow-other-keys)
490 ;; Move the Qt interface to "gui".
491 (let* ((out (assoc-ref outputs "out"))
492 (gui (assoc-ref outputs "gui"))
493 (strip-store-dir (lambda (path)
494 (substring path (string-prefix-length out path)))))
495 (for-each
496 (lambda (file)
497 (mkdir-p (string-append gui (dirname file)))
498 (rename-file (string-append out file)
499 (string-append gui file)))
500 (append '("/bin/mkvtoolnix-gui"
501 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
502 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
503 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
504 (map strip-store-dir (find-files out "\\.ogg$"))
505 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
506 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
507 (for-each
508 (lambda (file)
509 (delete-file-recursively (string-append out file)))
510 '("/share/applications"
511 "/share/metainfo"
512 "/share/mime"
513 "/share/mkvtoolnix")))
514 #t)))))
515 (home-page "https://mkvtoolnix.download")
516 (synopsis "Tools to create, alter and inspect Matroska files")
517 (description
518 "MKVToolNix provides tools for getting information about Matroska files
519 (@command{mkvinfo}), extracting tracks/data from Matroska files
520 (@command{mkvextract}), and creating Matroska files from other media files
521 (@command{mkvmerge}).")
522 (license license:gpl2)))
523
524 (define-public straw-viewer
525 (package
526 (name "straw-viewer")
527 (version "0.0.2")
528 (source
529 (origin
530 (method git-fetch)
531 (uri (git-reference
532 (url "https://github.com/trizen/straw-viewer")
533 (commit version)))
534 (file-name (git-file-name name version))
535 (sha256
536 (base32 "067j8wdfy29bi5ahky10xzzs8cr3mn95wl4kyqqjvjzri77a25j3"))))
537 (build-system perl-build-system)
538 (native-inputs
539 `(("perl-module-build" ,perl-module-build)
540 ("perl-test-pod" ,perl-test-pod)))
541 (inputs
542 `(("perl-data-dump" ,perl-data-dump)
543 ("perl-json" ,perl-json)
544 ("perl-libwww" ,perl-libwww)
545 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
546 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
547 ("perl-mozilla-ca" ,perl-mozilla-ca)
548 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
549 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
550 ("xdg-utils" ,xdg-utils)
551
552 ;; Some videos play without youtube-dl, but others silently fail to.
553 ("youtube-dl" ,youtube-dl)))
554
555 ;; Required only when building the graphical interface (--gtk).
556 ;;("perl-file-sharedir" ,perl-file-sharedir)
557 (arguments
558 `(#:modules ((guix build perl-build-system)
559 (guix build utils)
560 (srfi srfi-26))
561 #:phases
562 (modify-phases %standard-phases
563 (add-after 'unpack 'refer-to-inputs
564 (lambda* (#:key inputs #:allow-other-keys)
565 (substitute* "lib/WWW/StrawViewer.pm"
566 (("'youtube-dl'")
567 (format #f "'~a/bin/youtube-dl'"
568 (assoc-ref inputs "youtube-dl"))))
569 (substitute* "bin/gtk-straw-viewer"
570 (("'xdg-open'")
571 (format #f "'~a/bin/xdg-open'"
572 (assoc-ref inputs "xdg-utils"))))
573 #t))
574 (add-after 'install 'install-desktop
575 (lambda* (#:key outputs #:allow-other-keys)
576 (let* ((out (assoc-ref outputs "out"))
577 (sharedir (string-append out "/share")))
578 (install-file "share/gtk-straw-viewer.desktop"
579 (string-append sharedir "/applications"))
580 (install-file "share/icons/gtk-straw-viewer.png"
581 (string-append sharedir "/pixmaps"))
582 #t)))
583 (add-after 'install 'wrap-program
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let* ((out (assoc-ref outputs "out"))
586 (bin-dir (string-append out "/bin/"))
587 (site-dir (string-append out "/lib/perl5/site_perl/"))
588 (lib-path (getenv "PERL5LIB")))
589 (for-each (cut wrap-program <>
590 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
591 (find-files bin-dir))
592 #t))))))
593 (synopsis
594 "Light-weight application for searching and streaming videos from YouTube")
595 (description
596 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
597 invidio.us} and plays them locally in a native media player like @command{vlc}
598 or @command{mpv}.
599
600 You can search for videos, playlists, and/or channels. The videos are streamed
601 directly to the player at the best chosen resolution and with closed captions if
602 available.")
603 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
604 ;; Both a command-line and a graphical interface are available.
605 (home-page "https://github.com/trizen/youtube-viewer")
606 (license license:perl-license)))
607
608 (define-public x265
609 (package
610 (name "x265")
611 (version "3.3")
612 (outputs '("out" "static"))
613 (source
614 (origin
615 (method url-fetch)
616 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
617 "/downloads/x265_" version ".tar.gz")
618 (string-append "https://download.videolan.org/videolan/x265/"
619 "x265_" version ".tar.gz")))
620 (sha256
621 (base32 "170b61cgpcs5n35qps0p40dqs1q81vkgagzbs4zv7pzls6718vpj"))
622 (patches (search-patches "x265-arm-flags.patch"))
623 (modules '((guix build utils)))
624 (snippet '(begin
625 (delete-file-recursively "source/compat/getopt")
626 #t))))
627 (build-system cmake-build-system)
628 (arguments
629 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
630 #:configure-flags
631 ;; Ensure position independent code for everyone.
632 (list "-DENABLE_PIC=TRUE"
633 ,@(if (string-prefix? "armhf" (or (%current-system)
634 (%current-target-system)))
635 '("-DENABLE_ASSEMBLY=OFF")
636 '())
637 (string-append "-DCMAKE_INSTALL_PREFIX="
638 (assoc-ref %outputs "out")))
639 #:phases
640 (modify-phases %standard-phases
641 (add-after 'unpack 'prepare-build
642 (lambda _
643 (delete-file-recursively "build")
644 (chdir "source")
645 ;; recognize armv8 in 32-bit mode as ARM
646 (substitute* "CMakeLists.txt"
647 (("armv6l") "armv8l"))
648 #t))
649 (add-before 'configure 'build-12-bit
650 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
651 (mkdir "../build-12bit")
652 (with-directory-excursion "../build-12bit"
653 (apply invoke
654 "cmake" "../source"
655 "-DHIGH_BIT_DEPTH=ON"
656 "-DEXPORT_C_API=OFF"
657 "-DENABLE_CLI=OFF"
658 "-DMAIN12=ON"
659 configure-flags)
660 (substitute* (cons "cmake_install.cmake"
661 (append
662 (find-files "CMakeFiles/x265-shared.dir" ".")
663 (find-files "CMakeFiles/x265-static.dir" ".")))
664 (("libx265") "libx265_main12"))
665 (invoke "make"))))
666 (add-before 'configure 'build-10-bit
667 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
668 (mkdir "../build-10bit")
669 (with-directory-excursion "../build-10bit"
670 (apply invoke
671 "cmake" "../source"
672 "-DHIGH_BIT_DEPTH=ON"
673 "-DEXPORT_C_API=OFF"
674 "-DENABLE_CLI=OFF"
675 configure-flags)
676 (substitute* (cons "cmake_install.cmake"
677 (append
678 (find-files "CMakeFiles/x265-shared.dir" ".")
679 (find-files "CMakeFiles/x265-static.dir" ".")))
680 (("libx265") "libx265_main10"))
681 (invoke "make"))))
682 (add-after 'install 'install-more-libs
683 (lambda _
684 (with-directory-excursion "../build-12bit"
685 (invoke "make" "install"))
686 (with-directory-excursion "../build-10bit"
687 (invoke "make" "install"))))
688 (add-before 'strip 'move-static-libs
689 (lambda* (#:key outputs #:allow-other-keys)
690 (let ((out (assoc-ref outputs "out"))
691 (static (assoc-ref outputs "static")))
692 (mkdir-p (string-append static "/lib"))
693 (with-directory-excursion
694 (string-append out "/lib")
695 (for-each
696 (lambda (file)
697 (rename-file file
698 (string-append static "/lib/" file)))
699 (find-files "." "\\.a$"))))
700 #t)))))
701 (home-page "http://x265.org/")
702 (synopsis "Library for encoding h.265/HEVC video streams")
703 (description "x265 is a H.265 / HEVC video encoder application library,
704 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
705 (license license:gpl2+)))
706
707 (define-public libass
708 (package
709 (name "libass")
710 (version "0.14.0")
711 (source (origin
712 (method url-fetch)
713 (uri (string-append
714 "https://github.com/libass/libass/releases/download/"
715 version "/libass-" version ".tar.xz"))
716 (sha256
717 (base32
718 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
719 (build-system gnu-build-system)
720 (native-inputs
721 `(("pkg-config" ,pkg-config)
722 ("nasm" ,nasm)))
723 (propagated-inputs
724 `(("freetype" ,freetype)
725 ("fribidi" ,fribidi)
726 ("fontconfig" ,fontconfig)
727 ("harfbuzz" ,harfbuzz)
728 ("enca" ,enca)))
729 (home-page "https://github.com/libass/libass")
730 (synopsis "Subtitle rendering library for the ASS/SSA format")
731 (description "libass is a subtitle rendering library for the
732 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
733 (license license:isc)))
734
735 (define-public libcaca
736 (package
737 (name "libcaca")
738 (version "0.99.beta19")
739 (source (origin
740 (method url-fetch)
741 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
742 version ".tar.gz"))
743 (sha256
744 (base32
745 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
746 (build-system gnu-build-system)
747 (native-inputs `(("pkg-config" ,pkg-config)))
748 (inputs
749 `(("freeglut" ,freeglut)
750 ("ftgl" ,ftgl)
751 ("imlib2" ,imlib2)
752 ("libx11" ,libx11)
753 ("mesa" ,mesa)
754 ("ncurses" ,ncurses)
755 ("zlib" ,zlib)))
756 (home-page "http://caca.zoy.org/wiki/libcaca")
757 (synopsis "Colour ASCII-art library")
758 (description "libcaca is a graphics library that outputs text instead of
759 pixels, so that it can work on older video cards or text terminals. It
760 supports Unicode, 2048 colors, dithering of color images, and advanced text
761 canvas operations.")
762 (license license:wtfpl2)))
763
764 (define-public libdca
765 (package
766 (name "libdca")
767 (version "0.0.7")
768 (source (origin
769 (method url-fetch)
770 (uri (string-append
771 "https://download.videolan.org/pub/videolan/libdca/"
772 version "/libdca-" version ".tar.bz2"))
773 (sha256
774 (base32
775 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
776 (build-system gnu-build-system)
777 (native-inputs
778 `(("autoconf" ,autoconf)
779 ("automake" ,automake)
780 ("libtool" ,libtool)))
781 (home-page "https://www.videolan.org/developers/libdca.html")
782 (synopsis "DTS Coherent Acoustics decoder")
783 (description "libdca is a library for decoding DTS Coherent Acoustics
784 streams.")
785 (license license:gpl2+)))
786
787 (define-public libdv
788 (package
789 (name "libdv")
790 (version "1.0.0")
791 (source (origin
792 (method url-fetch)
793 (uri (string-append
794 "mirror://sourceforge/libdv/libdv/"
795 version "/libdv-" version ".tar.gz"))
796 (sha256
797 (base32
798 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
799 (build-system gnu-build-system)
800 (native-inputs `(("pkg-config" ,pkg-config)))
801 (inputs `(("libxv" ,libxv)))
802 (home-page "http://libdv.sourceforge.net/")
803 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
804 (description "The Quasar DV codec (libdv) is a software codec for DV
805 video, the encoding format used by most digital camcorders, typically those
806 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
807 developed according to the official standards for DV video: IEC 61834 and
808 SMPTE 314M.")
809 (license license:lgpl2.1+)))
810
811 (define-public libmatroska
812 (package
813 (name "libmatroska")
814 (version "1.5.2")
815 (source
816 (origin
817 (method url-fetch)
818 (uri (string-append "https://dl.matroska.org/downloads/"
819 "libmatroska/libmatroska-" version ".tar.xz"))
820 (sha256
821 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
822 (build-system cmake-build-system)
823 (inputs
824 `(("libebml" ,libebml)))
825 (arguments
826 `(#:configure-flags
827 (list "-DBUILD_SHARED_LIBS=YES")
828 #:tests? #f)) ; no test suite
829 (home-page "https://www.matroska.org")
830 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
831 (description
832 "Matroska aims to become the standard of multimedia container formats.
833 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
834 of XML. EBML enables the Matroska Development Team to gain significant
835 advantages in terms of future format extensibility, without breaking file
836 support in old parsers.
837 libebml is a C++ library to read and write EBML files.")
838 (license license:lgpl2.1)))
839
840 (define-public libva
841 (package
842 (name "libva")
843 (version "2.7.1")
844 (source
845 (origin
846 (method url-fetch)
847 (uri (list
848 ;; Newer releases are only available on GitHub.
849 (string-append "https://github.com/01org/libva/releases/download/"
850 version "/libva-" version ".tar.bz2")
851 ;; Keep the old URL around for compatibility.
852 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
853 "libva/libva-" version "/libva-" version ".tar.bz2")))
854 (sha256
855 (base32 "014av7ayyc624xfmr63xhbgg7nw8fynsswj1g2wmk4lnkyfz23x0"))))
856 (build-system gnu-build-system)
857 (native-inputs
858 `(("pkg-config" ,pkg-config)))
859 (inputs
860 `(("libdrm" ,libdrm)
861 ("libx11" ,libx11)
862 ("libxext" ,libxext)
863 ("libxfixes" ,libxfixes)
864 ("mesa" ,mesa)
865 ("wayland" ,wayland)))
866 (arguments
867 `(#:phases
868 (modify-phases %standard-phases
869 (add-before
870 'build 'fix-dlopen-paths
871 (lambda* (#:key outputs #:allow-other-keys)
872 (let ((out (assoc-ref outputs "out")))
873 (substitute* "va/drm/va_drm_auth_x11.c"
874 (("\"libva-x11\\.so\\.%d\"")
875 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
876 #t))))
877 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
878 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
879 #:configure-flags
880 (list (string-append "--with-drivers-path="
881 (assoc-ref %build-inputs "mesa") "/lib/dri"))
882 ;; However, we can't write to mesa's store directory, so override the
883 ;; following make variable to install the dummy driver to libva's
884 ;; $prefix/lib/dri directory.
885 #:make-flags
886 (list (string-append "dummy_drv_video_ladir="
887 (assoc-ref %outputs "out") "/lib/dri"))))
888 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
889 (synopsis "Video acceleration library")
890 (description "The main motivation for VA-API (Video Acceleration API) is
891 to enable hardware accelerated video decode/encode at various
892 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
893 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
894 (license license:expat)))
895
896 (define-public libva-utils
897 (package
898 (name "libva-utils")
899 (version "2.5.0")
900 (source
901 (origin
902 (method url-fetch)
903 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
904 version "/libva-utils-" version ".tar.bz2"))
905 (sha256
906 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
907 (build-system gnu-build-system)
908 (arguments
909 `(#:configure-flags
910 (list "--enable-wayland"
911 "--enable-x11")))
912 (native-inputs
913 `(("pkg-config" ,pkg-config)))
914 (inputs
915 `(("libdrm" ,libdrm)
916 ("libva" ,libva)
917 ("libx11" ,libx11)
918 ("mesa" ,mesa)
919 ("wayland" ,wayland)))
920 (home-page "https://01.org/linuxmedia/vaapi")
921 (synopsis "Collection of testing utilities for VA-API")
922 (description
923 "This is a collection of utilities to query and test the @acronym{VA-API,
924 Video Acceleration API} implemented by the libva library.
925
926 These tools require a supported graphics chip, driver, and VA-API back end to
927 operate properly.")
928 (license license:expat)))
929
930 (define-public ffmpeg
931 (package
932 (name "ffmpeg")
933 (version "4.2.3")
934 (source (origin
935 (method url-fetch)
936 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
937 version ".tar.xz"))
938 ;; See <https://issues.guix.gnu.org/issue/39719>
939 (patches (search-patches "ffmpeg-prefer-dav1d.patch"))
940 (sha256
941 (base32
942 "0cddkb5sma9dzy8i59sfls19rhjlq40zn9mh3x666dqkxl5ckxlx"))))
943 (build-system gnu-build-system)
944 (inputs
945 `(("dav1d" ,dav1d)
946 ("fontconfig" ,fontconfig)
947 ("freetype" ,freetype)
948 ("frei0r-plugins" ,frei0r-plugins)
949 ("gnutls" ,gnutls)
950 ("opus" ,opus)
951 ("ladspa" ,ladspa)
952 ("lame" ,lame)
953 ("libaom" ,libaom)
954 ("libass" ,libass)
955 ("libbluray" ,libbluray)
956 ("libcaca" ,libcaca)
957 ("libcdio-paranoia" ,libcdio-paranoia)
958 ("libdrm" ,libdrm)
959 ("libtheora" ,libtheora)
960 ("libva" ,libva)
961 ("libvdpau" ,libvdpau)
962 ("libvorbis" ,libvorbis)
963 ("libvpx" ,libvpx)
964 ("libx11" ,libx11)
965 ("libx264" ,libx264)
966 ("mesa" ,mesa)
967 ("openal" ,openal)
968 ("pulseaudio" ,pulseaudio)
969 ("sdl" ,sdl2)
970 ("soxr" ,soxr)
971 ("speex" ,speex)
972 ("twolame" ,twolame)
973 ("vidstab" ,vidstab)
974 ("x265" ,x265)
975 ("xvid" ,xvid)
976 ("zlib" ,zlib)))
977 (native-inputs
978 `(("bc" ,bc)
979 ("perl" ,perl)
980 ("pkg-config" ,pkg-config)
981 ("texinfo" ,texinfo)
982 ("python" ,python-2) ; scripts use interpreter python2
983 ("speex" ,speex)
984 ("yasm" ,yasm)))
985 (arguments
986 `(#:test-target "fate"
987 #:configure-flags
988 ;; possible additional inputs:
989 ;; --enable-avisynth enable reading of AviSynth script
990 ;; files [no]
991 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
992 ;; --enable-libcelt enable CELT decoding via libcelt [no]
993 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
994 ;; and libraw1394 [no]
995 ;; --enable-libfaac enable AAC encoding via libfaac [no]
996 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
997 ;; --enable-libflite enable flite (voice synthesis) support via
998 ;; libflite [no]
999 ;; --enable-libgme enable Game Music Emu via libgme [no]
1000 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1001 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1002 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1003 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1004 ;; --enable-libnut enable NUT (de)muxing via libnut,
1005 ;; native (de)muxer exists [no]
1006 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1007 ;; libopencore-amrnb [no]
1008 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1009 ;; libopencore-amrwb [no]
1010 ;; --enable-libopencv enable video filtering via libopencv [no]
1011 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1012 ;; OpenJPEG [no]
1013 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1014 ;; --enable-libschroedinger enable Dirac de/encoding via
1015 ;; libschroedinger [no]
1016 ;; --enable-libshine enable fixed-point MP3 encoding via
1017 ;; libshine [no]
1018 ;; --enable-libssh enable SFTP protocol via libssh [no]
1019 ;; (libssh2 does not work)
1020 ;; --enable-libstagefright-h264 enable H.264 decoding via
1021 ;; libstagefright [no]
1022 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1023 ;; libutvideo [no]
1024 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1025 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1026 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1027 ;; libvo-amrwbenc [no]
1028 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1029 ;; --enable-libxavs enable AVS encoding via xavs [no]
1030 ;; --enable-libzmq enable message passing via libzmq [no]
1031 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1032 ;; --enable-opencl enable OpenCL code
1033 '("--enable-avresample"
1034 "--enable-gpl" ; enable optional gpl licensed parts
1035 "--enable-shared"
1036 "--enable-frei0r"
1037 "--enable-fontconfig"
1038 "--enable-gnutls"
1039 "--enable-ladspa"
1040 "--enable-libaom"
1041 "--enable-libass"
1042 "--enable-libbluray"
1043 "--enable-libcaca"
1044 "--enable-libcdio"
1045 "--enable-libdav1d"
1046 "--enable-libfreetype"
1047 "--enable-libmp3lame"
1048 "--enable-libopus"
1049 "--enable-libpulse"
1050 "--enable-libsoxr"
1051 "--enable-libspeex"
1052 "--enable-libtheora"
1053 "--enable-libtwolame"
1054 "--enable-libvidstab"
1055 "--enable-libvorbis"
1056 "--enable-libvpx"
1057 "--enable-libxvid"
1058 "--enable-libx264"
1059 "--enable-libx265"
1060 "--enable-openal"
1061 "--enable-opengl"
1062 "--enable-libdrm"
1063
1064 "--enable-runtime-cpudetect"
1065
1066 ;; The HTML pages take 7.2 MiB
1067 "--disable-htmlpages"
1068
1069 ;; The static libraries are 23 MiB
1070 "--disable-static"
1071
1072 ;; Runtime cpu detection is not implemented on
1073 ;; MIPS, so we disable some features.
1074 "--disable-mips32r2"
1075 "--disable-mipsdsp"
1076 "--disable-mipsdspr2"
1077 "--disable-mipsfpu")
1078 #:phases
1079 (modify-phases %standard-phases
1080 (replace
1081 'configure
1082 ;; configure does not work followed by "SHELL=..." and
1083 ;; "CONFIG_SHELL=..."; set environment variables instead
1084 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1085 (let ((out (assoc-ref outputs "out")))
1086 (substitute* "configure"
1087 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1088 (setenv "SHELL" (which "bash"))
1089 (setenv "CONFIG_SHELL" (which "bash"))
1090 (apply invoke
1091 "./configure"
1092 (string-append "--prefix=" out)
1093 ;; Add $libdir to the RUNPATH of all the binaries.
1094 (string-append "--extra-ldflags=-Wl,-rpath="
1095 out "/lib")
1096 configure-flags))))
1097 (add-before
1098 'check 'set-ld-library-path
1099 (lambda _
1100 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1101 ;; running tests.
1102 (let* ((dso (find-files "." "\\.so$"))
1103 (path (string-join (map dirname dso) ":")))
1104 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1105 (setenv "LD_LIBRARY_PATH" path)
1106 #t))))))
1107 (home-page "https://www.ffmpeg.org/")
1108 (synopsis "Audio and video framework")
1109 (description "FFmpeg is a complete, cross-platform solution to record,
1110 convert and stream audio and video. It includes the libavcodec
1111 audio/video codec library.")
1112 (license license:gpl2+)))
1113
1114 (define-public ffmpeg-3.4
1115 (package
1116 (inherit ffmpeg)
1117 (version "3.4.7")
1118 (source (origin
1119 (method url-fetch)
1120 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1121 version ".tar.xz"))
1122 (sha256
1123 (base32
1124 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1125 (arguments
1126 (substitute-keyword-arguments (package-arguments ffmpeg)
1127 ((#:configure-flags flags)
1128 `(delete "--enable-libdav1d" (delete "--enable-libaom"
1129 ,flags)))))
1130 (inputs (alist-delete "dav1d" (alist-delete "libaom"
1131 (package-inputs ffmpeg))))))
1132
1133 (define-public ffmpeg-for-stepmania
1134 (hidden-package
1135 (package
1136 (inherit ffmpeg)
1137 (version "2.1.3")
1138 (source
1139 (origin
1140 (method git-fetch)
1141 (uri (git-reference
1142 (url "https://github.com/stepmania/ffmpeg.git")
1143 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1144 (sha256
1145 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1146 (file-name (git-file-name "ffmpeg" version))))
1147 (arguments
1148 (substitute-keyword-arguments (package-arguments ffmpeg)
1149 ((#:configure-flags flags)
1150 '(list "--disable-programs"
1151 "--disable-doc"
1152 "--disable-debug"
1153 "--disable-avdevice"
1154 "--disable-swresample"
1155 "--disable-postproc"
1156 "--disable-avfilter"
1157 "--disable-shared"
1158 "--enable-static"))))
1159 (inputs '()))))
1160
1161 (define-public ffmpegthumbnailer
1162 (package
1163 (name "ffmpegthumbnailer")
1164 (version "2.2.2")
1165 (source (origin
1166 (method git-fetch)
1167 (uri (git-reference
1168 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1169 (commit version)))
1170 (file-name (git-file-name name version))
1171 (sha256
1172 (base32
1173 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1174 (build-system cmake-build-system)
1175 (native-inputs
1176 `(("pkg-config" ,pkg-config)))
1177 (inputs
1178 `(("ffmpeg" ,ffmpeg)
1179 ("libjpeg-turbo" ,libjpeg-turbo)
1180 ("libpng" ,libpng)
1181 ("gvfs" ,gvfs)))
1182 (arguments
1183 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1184 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1185 (synopsis "Create thumbnails from video files")
1186 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1187 can be used by file managers to create thumbnails for your video files. The
1188 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1189 videoformats depend on the configuration flags of ffmpeg.")
1190 (license license:gpl2+)))
1191
1192 (define-public vlc
1193 (package
1194 (name "vlc")
1195 (version "3.0.10")
1196 (source (origin
1197 (method url-fetch)
1198 (uri (string-append
1199 "https://download.videolan.org/pub/videolan/vlc/"
1200 (car (string-split version #\-))
1201 "/vlc-" version ".tar.xz"))
1202 (sha256
1203 (base32
1204 "0cackl1084hcmg4myf3kvjvd6sjxmzn0c0qkmanz6brvgzyanrm9"))))
1205 (build-system gnu-build-system)
1206 (native-inputs
1207 `(("flex" ,flex)
1208 ("bison" ,bison)
1209 ("gettext" ,gettext-minimal)
1210 ("git" ,git) ; needed for a test
1211 ("pkg-config" ,pkg-config)))
1212 ;; FIXME: Add optional inputs once available.
1213 (inputs
1214 `(("alsa-lib" ,alsa-lib)
1215 ("avahi" ,avahi)
1216 ;; XXX Try removing dav1d here and testing AV1 playback when FFmpeg 4.3
1217 ;; is released.
1218 ;; <https://issues.guix.gnu.org/issue/39719>
1219 ("dav1d" ,dav1d)
1220 ("dbus" ,dbus)
1221 ("eudev" ,eudev)
1222 ("flac" ,flac)
1223 ("ffmpeg" ,ffmpeg)
1224 ("fontconfig" ,fontconfig)
1225 ("freetype" ,freetype)
1226 ("fribidi" ,fribidi)
1227 ("gnutls" ,gnutls)
1228 ("liba52" ,liba52)
1229 ("libarchive" ,libarchive)
1230 ("libass" ,libass)
1231 ("libavc1394" ,libavc1394)
1232 ("libbluray" ,libbluray)
1233 ("libcaca" ,libcaca)
1234 ("libcddb" ,libcddb)
1235 ("libdca" ,libdca)
1236 ("libdvbpsi" ,libdvbpsi)
1237 ("libdvdnav" ,libdvdnav)
1238 ("libdvdread" ,libdvdread)
1239 ("libebml" ,libebml)
1240 ("libgcrypt" ,libgcrypt)
1241 ("libidn" ,libidn)
1242 ("libkate" ,libkate)
1243 ("libmad" ,libmad)
1244 ("libmatroska" ,libmatroska)
1245 ("libmicrodns" ,libmicrodns)
1246 ("libmodplug" ,libmodplug)
1247 ("libmpeg2" ,libmpeg2)
1248 ("libogg" ,libogg)
1249 ("libpng" ,libpng)
1250 ("libraw1394" ,libraw1394)
1251 ("librsvg" ,librsvg)
1252 ("libsamplerate" ,libsamplerate)
1253 ("libsecret" ,libsecret)
1254 ("libssh2" ,libssh2)
1255 ("libupnp" ,libupnp)
1256 ("libva" ,libva)
1257 ("libvdpau" ,libvdpau)
1258 ("libvorbis" ,libvorbis)
1259 ("libvpx" ,libvpx)
1260 ("libtheora" ,libtheora)
1261 ("libx264" ,libx264)
1262 ("libxext" ,libxext)
1263 ("libxi" ,libxi)
1264 ("libxinerama" ,libxinerama)
1265 ("libxml2" ,libxml2)
1266 ("libxpm" ,libxpm)
1267 ("livemedia-utils" ,livemedia-utils)
1268 ("lua" ,lua-5.2)
1269 ("mesa" ,mesa)
1270 ("opus" ,opus)
1271 ("perl" ,perl)
1272 ("pulseaudio" ,pulseaudio)
1273 ("protobuf" ,protobuf)
1274 ("python" ,python-wrapper)
1275 ("qtbase" ,qtbase)
1276 ("qtsvg" ,qtsvg)
1277 ("qtx11extras" ,qtx11extras)
1278 ("samba" ,samba)
1279 ("sdl" ,sdl)
1280 ("sdl-image" ,sdl-image)
1281 ("speex" ,speex)
1282 ("speexdsp" ,speexdsp)
1283 ("taglib" ,taglib)
1284 ("twolame" ,twolame)
1285 ("unzip" ,unzip)
1286 ("wayland" ,wayland)
1287 ("wayland-protocols" ,wayland-protocols)
1288 ("x265" ,x265)
1289 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1290 (arguments
1291 `(#:configure-flags
1292 `("BUILDCC=gcc"
1293 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1294 (assoc-ref %build-inputs "ffmpeg")
1295 "/lib")) ;needed for the tests
1296
1297 #:phases
1298 (modify-phases %standard-phases
1299 (add-after 'unpack 'patch-source
1300 (lambda* (#:key inputs #:allow-other-keys)
1301 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1302 (substitute* "configure"
1303 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1304 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1305 ;; Some of the tests require using the display to test out VLC,
1306 ;; which fails in our sandboxed build system
1307 (substitute* "test/run_vlc.sh"
1308 (("./vlc --ignore-config") "echo"))
1309 #t)))
1310 (add-after 'strip 'regenerate-plugin-cache
1311 (lambda* (#:key outputs #:allow-other-keys)
1312 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1313 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1314 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1315 ;; it references. Thus, we first reset the timestamps of all
1316 ;; these files, and then regenerate the cache such that the
1317 ;; mtimes it includes are always zero instead of being dependent
1318 ;; on the build time.
1319 (let* ((out (assoc-ref outputs "out"))
1320 (pkglibdir (string-append out "/lib/vlc"))
1321 (plugindir (string-append pkglibdir "/plugins"))
1322 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1323 ;; TODO: Factorize 'reset-timestamps'.
1324 (for-each (lambda (file)
1325 (let ((s (lstat file)))
1326 (unless (eq? (stat:type s) 'symlink)
1327 (utime file 1 1))))
1328 (find-files plugindir))
1329 (invoke cachegen plugindir))))
1330 (add-after 'install 'wrap-executable
1331 (lambda* (#:key outputs #:allow-other-keys)
1332 (let ((out (assoc-ref outputs "out"))
1333 (plugin-path (getenv "QT_PLUGIN_PATH")))
1334 (wrap-program (string-append out "/bin/vlc")
1335 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1336 #t)))))
1337 (home-page "https://www.videolan.org/")
1338 (synopsis "Audio and video framework")
1339 (description "VLC is a cross-platform multimedia player and framework
1340 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1341 streaming protocols.")
1342 (license license:gpl2+)))
1343
1344 (define-public mplayer
1345 (package
1346 (name "mplayer")
1347 (version "1.4")
1348 (source (origin
1349 (method url-fetch)
1350 (uri (string-append
1351 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1352 version ".tar.xz"))
1353 (sha256
1354 (base32
1355 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
1356 (build-system gnu-build-system)
1357 ;; FIXME: Add additional inputs once available.
1358 (native-inputs
1359 `(("pkg-config" ,pkg-config)
1360 ("yasm" ,yasm)))
1361 (inputs
1362 `(("alsa-lib" ,alsa-lib)
1363 ("cdparanoia" ,cdparanoia)
1364 ("ffmpeg" ,ffmpeg)
1365 ("fontconfig" ,fontconfig)
1366 ("freetype" ,freetype)
1367 ("giflib" ,giflib)
1368 ("lame" ,lame)
1369 ("libass" ,libass)
1370 ("libdvdcss" ,libdvdcss)
1371 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1372 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
1373 ("libjpeg" ,libjpeg-turbo)
1374 ("libmpeg2" ,libmpeg2)
1375 ("libmpg123" ,mpg123) ; audio codec for MP3
1376 ("libpng" ,libpng)
1377 ("libtheora" ,libtheora)
1378 ("libvdpau" ,libvdpau)
1379 ("libvorbis" ,libvorbis)
1380 ("libx11" ,libx11)
1381 ("libx264" ,libx264)
1382 ("libxinerama" ,libxinerama)
1383 ("libxv" ,libxv)
1384 ("libxxf86dga" ,libxxf86dga)
1385 ("mesa" ,mesa)
1386 ("opus" ,opus)
1387 ("perl" ,perl)
1388 ("pulseaudio" ,pulseaudio)
1389 ("python" ,python-wrapper)
1390 ("sdl" ,sdl)
1391 ("speex" ,speex)
1392 ("zlib" ,zlib)))
1393 (arguments
1394 `(#:tests? #f ; no test target
1395 #:phases
1396 (modify-phases %standard-phases
1397 (replace 'configure
1398 ;; configure does not work followed by "SHELL=..." and
1399 ;; "CONFIG_SHELL=..."; set environment variables instead
1400 (lambda* (#:key inputs outputs #:allow-other-keys)
1401 (let ((out (assoc-ref outputs "out"))
1402 (libx11 (assoc-ref inputs "libx11")))
1403 (substitute* "configure"
1404 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1405 (setenv "SHELL" (which "bash"))
1406 (setenv "CONFIG_SHELL" (which "bash"))
1407 (invoke "./configure"
1408 (string-append "--extra-cflags=-I"
1409 libx11 "/include") ; to detect libx11
1410 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1411 (string-append "--prefix=" out)
1412 ;; Enable runtime cpu detection where supported,
1413 ;; and choose a suitable target.
1414 ,@(match (or (%current-target-system)
1415 (%current-system))
1416 ("x86_64-linux"
1417 '("--enable-runtime-cpudetection"
1418 "--target=x86_64-linux"))
1419 ("i686-linux"
1420 '("--enable-runtime-cpudetection"
1421 "--target=i686-linux"))
1422 ("mips64el-linux"
1423 '("--target=mips3-linux"))
1424 (_ (list (string-append
1425 "--target="
1426 (or (%current-target-system)
1427 (nix-system->gnu-triplet
1428 (%current-system)))))))
1429 "--disable-iwmmxt")))))))
1430 (home-page "https://www.mplayerhq.hu")
1431 (synopsis "Audio and video player")
1432 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1433 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1434 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1435 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1436 (license license:gpl2)))
1437
1438 (define-public mpv
1439 (package
1440 (name "mpv")
1441 (version "0.32.0")
1442 (source (origin
1443 (method git-fetch)
1444 (uri (git-reference
1445 (url "https://github.com/mpv-player/mpv.git")
1446 (commit (string-append "v" version))))
1447 (file-name (git-file-name name version))
1448 (sha256
1449 (base32
1450 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1451 (build-system waf-build-system)
1452 (native-inputs
1453 `(("perl" ,perl) ; for zsh completion file
1454 ("pkg-config" ,pkg-config)
1455 ("python-docutils" ,python-docutils)))
1456 ;; Missing features: libguess, V4L2
1457 (inputs
1458 `(("alsa-lib" ,alsa-lib)
1459 ("enca" ,enca)
1460 ("ffmpeg" ,ffmpeg)
1461 ("jack" ,jack-1)
1462 ("ladspa" ,ladspa)
1463 ("lcms" ,lcms)
1464 ("libass" ,libass)
1465 ("libbluray" ,libbluray)
1466 ("libcaca" ,libcaca)
1467 ("libbs2b" ,libbs2b)
1468 ("libcdio-paranoia" ,libcdio-paranoia)
1469 ("libdvdread" ,libdvdread)
1470 ("libdvdnav" ,libdvdnav)
1471 ("libjpeg" ,libjpeg-turbo)
1472 ("libva" ,libva)
1473 ("libvdpau" ,libvdpau)
1474 ("libx11" ,libx11)
1475 ("libxext" ,libxext)
1476 ("libxinerama" ,libxinerama)
1477 ("libxrandr" ,libxrandr)
1478 ("libxscrnsaver" ,libxscrnsaver)
1479 ("libxv" ,libxv)
1480 ;; XXX: lua > 5.2 is not currently supported; see
1481 ;; waftools/checks/custom.py
1482 ("lua" ,lua-5.2)
1483 ("mesa" ,mesa)
1484 ("mpg123" ,mpg123)
1485 ("pulseaudio" ,pulseaudio)
1486 ("rsound" ,rsound)
1487 ("shaderc" ,shaderc)
1488 ("vulkan-headers" ,vulkan-headers)
1489 ("vulkan-loader" ,vulkan-loader)
1490 ("waf" ,python-waf)
1491 ("wayland" ,wayland)
1492 ("wayland-protocols" ,wayland-protocols)
1493 ("libxkbcommon" ,libxkbcommon)
1494 ("youtube-dl" ,youtube-dl)
1495 ("zlib" ,zlib)))
1496 (arguments
1497 '(#:phases
1498 (modify-phases %standard-phases
1499 (add-after
1500 'unpack 'patch-paths
1501 (lambda* (#:key inputs #:allow-other-keys)
1502 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1503 (substitute* "player/lua/ytdl_hook.lua"
1504 (("\"youtube-dl\",")
1505 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1506 #t)))
1507 (add-before
1508 'configure 'setup-waf
1509 (lambda* (#:key inputs #:allow-other-keys)
1510 (let ((waf (assoc-ref inputs "waf")))
1511 (copy-file (string-append waf "/bin/waf") "waf"))
1512 (setenv "CC" "gcc")
1513 #t)))
1514 #:configure-flags (list "--enable-libmpv-shared"
1515 "--enable-cdda"
1516 "--enable-dvdnav"
1517 "--disable-build-date")
1518 ;; No check function defined.
1519 #:tests? #f))
1520 (home-page "https://mpv.io/")
1521 (synopsis "Audio and video player")
1522 (description "mpv is a general-purpose audio and video player. It is a
1523 fork of mplayer2 and MPlayer. It shares some features with the former
1524 projects while introducing many more.")
1525 (license license:gpl2+)))
1526
1527 (define-public gnome-mpv
1528 (deprecated-package "gnome-mpv" celluloid))
1529
1530 (define-public mpv-mpris
1531 (package
1532 (name "mpv-mpris")
1533 (version "0.5")
1534 (source
1535 (origin
1536 (method git-fetch)
1537 (uri (git-reference
1538 (url "https://github.com/hoyon/mpv-mpris")
1539 (commit version)))
1540 (file-name (git-file-name name version))
1541 (sha256
1542 (base32
1543 "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk"))))
1544 (build-system copy-build-system)
1545 (arguments
1546 '(#:install-plan
1547 '(("mpris.so" "lib/"))
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-before 'install 'build
1551 (lambda _
1552 (setenv "CC" (which "gcc"))
1553 (invoke "make"))))))
1554 (native-inputs
1555 `(("pkg-config" ,pkg-config)))
1556 (inputs
1557 `(("glib" ,glib)
1558 ("mpv" ,mpv)))
1559 (home-page "https://github.com/hoyon/mpv-mpris")
1560 (synopsis "MPRIS plugin for mpv")
1561 (description "This package provides an @dfn{MPRIS} (Media Player Remote
1562 Interfacing Specification) plugin for the @code{mpv} media player. It implements
1563 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
1564 interfaces.
1565
1566 To load this plugin, specify the following option when starting mpv:
1567 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
1568 @file{$HOME/.config/mpv/scripts}.")
1569 (license license:expat)))
1570
1571 (define-public libvpx
1572 (package
1573 (name "libvpx")
1574 (version "1.8.2")
1575 (source (origin
1576 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1577 (method git-fetch)
1578 (uri (git-reference
1579 (url "https://chromium.googlesource.com/webm/libvpx")
1580 (commit (string-append "v" version))))
1581 (file-name (git-file-name name version))
1582 (sha256
1583 (base32
1584 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
1585 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1586 (build-system gnu-build-system)
1587 (arguments
1588 `(#:configure-flags (list "--enable-shared"
1589 "--disable-static"
1590 "--as=yasm"
1591 ;; Limit size to avoid CVE-2015-1258
1592 "--size-limit=16384x16384"
1593 (string-append "--prefix=" (assoc-ref %outputs "out")))
1594 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1595 (assoc-ref %outputs "out") "/lib"))
1596 #:phases (modify-phases %standard-phases
1597 (replace 'configure
1598 (lambda* (#:key configure-flags #:allow-other-keys)
1599 ;; The configure script does not understand some of the GNU
1600 ;; options, so we only add the flags specified above.
1601 (apply invoke "./configure" configure-flags))))
1602 #:tests? #f)) ; no check target
1603 (native-inputs
1604 `(("perl" ,perl)
1605 ("yasm" ,yasm)))
1606 (synopsis "VP8/VP9 video codec")
1607 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1608 (license license:bsd-3)
1609 (home-page "https://www.webmproject.org/")))
1610
1611 (define-public youtube-dl
1612 (package
1613 (name "youtube-dl")
1614 (version "2020.05.29")
1615 (source (origin
1616 (method url-fetch)
1617 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1618 "releases/download/" version "/youtube-dl-"
1619 version ".tar.gz"))
1620 (sha256
1621 (base32
1622 "111ganbfi76ipfq5gjgamjbqd7m8l4lim9wwmfnc04bzvwqqzfi3"))))
1623 (build-system python-build-system)
1624 (arguments
1625 ;; The problem here is that the directory for the man page and completion
1626 ;; files is relative, and for some reason, setup.py uses the
1627 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1628 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1629 ;; completion file is called 'youtube-dl' rather than
1630 ;; 'youtube-dl.bash-completion'.
1631 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1632 #:phases (modify-phases %standard-phases
1633 (add-before 'install 'fix-the-data-directories
1634 (lambda* (#:key outputs #:allow-other-keys)
1635 (let ((prefix (assoc-ref outputs "out")))
1636 (mkdir "bash-completion")
1637 (rename-file "youtube-dl.bash-completion"
1638 "bash-completion/youtube-dl")
1639 (substitute* "setup.py"
1640 (("youtube-dl\\.bash-completion")
1641 "bash-completion/youtube-dl")
1642 (("'etc/")
1643 (string-append "'" prefix "/etc/"))
1644 (("'share/")
1645 (string-append "'" prefix "/share/")))
1646 #t)))
1647 (add-after 'install 'install-completion
1648 (lambda* (#:key outputs #:allow-other-keys)
1649 (let* ((out (assoc-ref outputs "out"))
1650 (zsh (string-append out
1651 "/share/zsh/site-functions")))
1652 (mkdir-p zsh)
1653 (copy-file "youtube-dl.zsh"
1654 (string-append zsh "/_youtube-dl"))
1655 #t))))))
1656 (synopsis "Download videos from YouTube.com and other sites")
1657 (description
1658 "Youtube-dl is a small command-line program to download videos from
1659 YouTube.com and many more sites.")
1660 (home-page "https://yt-dl.org")
1661 (license license:public-domain)))
1662
1663 (define-public youtube-dl-gui
1664 (package
1665 (name "youtube-dl-gui")
1666 (version "0.3.8")
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri (pypi-uri "Youtube-DLG" version))
1671 (sha256
1672 (base32
1673 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1674 (build-system python-build-system)
1675 (arguments
1676 ;; In Guix, wxpython has not yet been packaged for Python 3.
1677 `(#:python ,python-2
1678 ;; This package has no tests.
1679 #:tests? #f
1680 #:phases
1681 (modify-phases %standard-phases
1682 (add-before 'build 'patch-source
1683 (lambda* (#:key inputs #:allow-other-keys)
1684 ;; The youtube-dl-gui program lets you configure options. Some of
1685 ;; them are problematic, so we change their defaults.
1686 (substitute* "youtube_dl_gui/optionsmanager.py"
1687 ;; When this is true, the builder process will try (and fail) to
1688 ;; write logs to the builder user's home directory.
1689 (("'enable_log': True") "'enable_log': False")
1690 ;; This determines which youtube-dl program youtube-dl-gui will
1691 ;; run. If we don't set this, then youtube-dl-gui might download
1692 ;; an arbitrary copy from the Internet into the user's home
1693 ;; directory and run it, so let's make sure youtube-dl-gui uses
1694 ;; the youtube-dl from the inputs by default.
1695 (("'youtubedl_path': self.config_path")
1696 (string-append "'youtubedl_path': '"
1697 (assoc-ref inputs "youtube-dl")
1698 "/bin'"))
1699 ;; When this is True, when youtube-dl-gui is finished downloading
1700 ;; a file, it will try (and possibly fail) to open the directory
1701 ;; containing the downloaded file. This can fail because it
1702 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1703 ;; adding xdg-utils to the propagated inputs is not enough to
1704 ;; make this work, so for now we set the default to False.
1705 (("'open_dl_dir': True") "'open_dl_dir': False"))
1706 ;; The youtube-dl program from the inputs is actually a wrapper
1707 ;; script written in bash, so attempting to invoke it as a python
1708 ;; script will fail.
1709 (substitute* "youtube_dl_gui/downloaders.py"
1710 (("cmd = \\['python', self\\.youtubedl_path\\]")
1711 "cmd = [self.youtubedl_path]"))
1712 ;; Use relative paths for installing data files so youtube-dl-gui
1713 ;; installs the files relative to its prefix in the store, rather
1714 ;; than relative to /. Also, instead of installing data files into
1715 ;; $prefix/usr/share, install them into $prefix/share for
1716 ;; consistency (see: (standards) Directory Variables).
1717 (substitute* "setup.py"
1718 (("= '/usr/share") "= 'share"))
1719 ;; Update get_locale_file() so it finds the installed localization
1720 ;; files.
1721 (substitute* "youtube_dl_gui/utils.py"
1722 (("os\\.path\\.join\\('/usr', 'share'")
1723 (string-append "os.path.join('"
1724 (assoc-ref %outputs "out")
1725 "', 'share'")))
1726 #t))
1727 (add-after 'install 'create-desktop-file
1728 (lambda* (#:key outputs #:allow-other-keys)
1729 (let* ((out (assoc-ref outputs "out"))
1730 (applications (string-append out "/share/applications")))
1731 (mkdir-p applications)
1732 (call-with-output-file
1733 (string-append applications "/youtube-dl-gui.desktop")
1734 (lambda (file)
1735 (format
1736 file
1737 "[Desktop Entry]~@
1738 Name=Youtube-dl GUI~@
1739 Comment=Graphical interface to download video with youtube-dl~@
1740 Exec=youtube-dl-gui~@
1741 TryExec=youtube-dl-gui~@
1742 Terminal=false~@
1743 Icon=youtube-dl-gui~@
1744 Type=Application~@
1745 Categories=AudioVideo;Audio;Video;Network~%")))
1746 #t))))))
1747 (inputs
1748 `(("python2-wxpython" ,python2-wxpython)
1749 ("youtube-dl" ,youtube-dl)))
1750 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1751 (synopsis
1752 "GUI (Graphical User Interface) for @command{youtube-dl}")
1753 (description
1754 "Youtube-dlG is a GUI (Graphical User Interface) for
1755 @command{youtube-dl}. You can use it to download videos from YouTube and any
1756 other site that youtube-dl supports.")
1757 (license license:unlicense)))
1758
1759 (define-public you-get
1760 (package
1761 (name "you-get")
1762 (version "0.4.1410")
1763 (source (origin
1764 (method git-fetch)
1765 (uri (git-reference
1766 (url "https://github.com/soimort/you-get.git")
1767 (commit (string-append "v" version))))
1768 (file-name (git-file-name name version))
1769 (sha256
1770 (base32
1771 "1v4lfldcijgngg0s4q5w4ixa0k8k75dwmkhf57pgb31bqlrr8h0s"))))
1772 (build-system python-build-system)
1773 (inputs
1774 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1775 (arguments
1776 `(#:phases
1777 (modify-phases %standard-phases
1778 (add-after 'unpack 'qualify-input-references
1779 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1780 ;; happens to be in the user's $PATH at run time.
1781 (lambda* (#:key inputs #:allow-other-keys)
1782 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1783 "/bin/ffmpeg")))
1784 (substitute* "src/you_get/processor/ffmpeg.py"
1785 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1786 ;; same string is also used when sniffing ffmpeg's output.
1787 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1788 (string-append prefix "'" ffmpeg "'")))
1789 #t))))
1790 #:tests? #f)) ; XXX some tests need Internet access
1791 (synopsis "Download videos, audio, or images from Web sites")
1792 (description
1793 "You-Get is a command-line utility to download media contents (videos,
1794 audio, images) from the Web. It can use either mpv or vlc for playback.")
1795 (home-page "https://you-get.org/")
1796 (license license:expat)))
1797
1798 (define-public youtube-viewer
1799 (package
1800 (name "youtube-viewer")
1801 (version "3.7.6")
1802 (source (origin
1803 (method git-fetch)
1804 (uri (git-reference
1805 (url "https://github.com/trizen/youtube-viewer.git")
1806 (commit version)))
1807 (file-name (git-file-name name version))
1808 (sha256
1809 (base32
1810 "1c7wynx0fzs8awb1s4rdrl8xavqlj64z95yckhl1m1gnhahhq291"))))
1811 (build-system perl-build-system)
1812 (native-inputs
1813 `(("perl-module-build" ,perl-module-build)))
1814 (inputs
1815 `(("perl-data-dump" ,perl-data-dump)
1816 ("perl-file-sharedir" ,perl-file-sharedir)
1817 ("perl-gtk2" ,perl-gtk2)
1818 ("perl-json" ,perl-json)
1819 ("perl-json-xs" ,perl-json-xs)
1820 ("perl-libwww" ,perl-libwww)
1821 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1822 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1823 ("perl-mozilla-ca" ,perl-mozilla-ca)
1824 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1825 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1826 ("xdg-utils" ,xdg-utils)
1827
1828 ;; Some videos play without youtube-dl, but others silently fail to.
1829 ("youtube-dl" ,youtube-dl)))
1830 (arguments
1831 `(#:modules ((guix build perl-build-system)
1832 (guix build utils)
1833 (srfi srfi-26))
1834 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
1835 ;; is broken without perl-gtk3.
1836 #:module-build-flags '("--gtk2")
1837 #:phases
1838 (modify-phases %standard-phases
1839 (add-after 'unpack 'refer-to-inputs
1840 (lambda* (#:key inputs #:allow-other-keys)
1841 (substitute* "lib/WWW/YoutubeViewer.pm"
1842 (("'youtube-dl'")
1843 (format #f "'~a/bin/youtube-dl'"
1844 (assoc-ref inputs "youtube-dl"))))
1845 (substitute* '("bin/gtk2-youtube-viewer"
1846 "bin/gtk3-youtube-viewer")
1847 (("'xdg-open'")
1848 (format #f "'~a/bin/xdg-open'"
1849 (assoc-ref inputs "xdg-utils"))))
1850 #t))
1851 (add-after 'install 'install-desktop
1852 (lambda* (#:key outputs #:allow-other-keys)
1853 (let* ((out (assoc-ref outputs "out"))
1854 (sharedir (string-append out "/share")))
1855 (install-file "share/gtk-youtube-viewer.desktop"
1856 (string-append sharedir "/applications"))
1857 (install-file "share/icons/gtk-youtube-viewer.png"
1858 (string-append sharedir "/pixmaps"))
1859 #t)))
1860 (add-after 'install 'wrap-program
1861 (lambda* (#:key outputs #:allow-other-keys)
1862 (let* ((out (assoc-ref outputs "out"))
1863 (bin-dir (string-append out "/bin/"))
1864 (site-dir (string-append out "/lib/perl5/site_perl/"))
1865 (lib-path (getenv "PERL5LIB")))
1866 (for-each (cut wrap-program <>
1867 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1868 (find-files bin-dir))
1869 #t))))))
1870 (synopsis
1871 "Lightweight application for searching and streaming videos from YouTube")
1872 (description
1873 "Youtube-viewer searches and plays YouTube videos in a native player.
1874 It comes with various search options; it can search for videos, playlists
1875 and/or channels. The videos are streamed directly in a selected video player
1876 at the best resolution (customizable) and with closed-captions (if available).
1877 Both command-line and GTK2 interface are available.")
1878 (home-page "https://github.com/trizen/youtube-viewer")
1879 (license license:perl-license)))
1880
1881 (define-public libbluray
1882 (package
1883 (name "libbluray")
1884 (version "1.0.2")
1885 (source (origin
1886 (method url-fetch)
1887 (uri (string-append "https://download.videolan.org/videolan/"
1888 name "/" version "/"
1889 name "-" version ".tar.bz2"))
1890 (sha256
1891 (base32
1892 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1893 (build-system gnu-build-system)
1894 (arguments
1895 `(#:configure-flags '("--disable-bdjava-jar")
1896 #:phases
1897 (modify-phases %standard-phases
1898 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1899 ;; Avoid the need to propagate libxml2 by referring to it
1900 ;; directly, as is already done for fontconfig & freetype.
1901 (lambda* (#:key inputs #:allow-other-keys)
1902 (let ((libxml2 (assoc-ref inputs "libxml2")))
1903 (substitute* "configure"
1904 ((" libxml-2.0") ""))
1905 (substitute* "src/libbluray.pc.in"
1906 (("^Libs.private:" field)
1907 (string-append field " -L" libxml2 "/lib -lxml2")))
1908 #t)))
1909 (add-before 'build 'fix-dlopen-paths
1910 (lambda* (#:key inputs #:allow-other-keys)
1911 (let ((libaacs (assoc-ref inputs "libaacs"))
1912 (libbdplus (assoc-ref inputs "libbdplus")))
1913 (substitute* "src/libbluray/disc/aacs.c"
1914 (("\"libaacs\"")
1915 (string-append "\"" libaacs "/lib/libaacs\"")))
1916 (substitute* "src/libbluray/disc/bdplus.c"
1917 (("\"libbdplus\"")
1918 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1919 #t))))))
1920 (native-inputs `(("pkg-config" ,pkg-config)))
1921 (inputs
1922 `(("fontconfig" ,fontconfig)
1923 ("freetype" ,freetype)
1924 ("libaacs" ,libaacs)
1925 ("libbdplus" ,libbdplus)
1926 ("libxml2" ,libxml2)))
1927 (home-page "https://www.videolan.org/developers/libbluray.html")
1928 (synopsis "Blu-Ray Disc playback library")
1929 (description
1930 "libbluray is a library designed for Blu-Ray Disc playback for media
1931 players, like VLC or MPlayer.")
1932 (license license:lgpl2.1+)))
1933
1934 (define-public libdvdread
1935 (package
1936 (name "libdvdread")
1937 (version "6.0.2")
1938 (source (origin
1939 (method url-fetch)
1940 (uri (string-append "https://download.videolan.org/videolan/"
1941 "libdvdread/" version "/"
1942 "libdvdread-" version ".tar.bz2"))
1943 (sha256
1944 (base32
1945 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
1946 (build-system gnu-build-system)
1947 (arguments
1948 `(#:configure-flags '("--with-libdvdcss=yes")))
1949 (native-inputs
1950 `(("pkg-config" ,pkg-config)))
1951 (propagated-inputs
1952 `(("libdvdcss" ,libdvdcss)))
1953 (home-page "http://dvdnav.mplayerhq.hu/")
1954 (synopsis "Library for reading video DVDs")
1955 (description
1956 "Libdvdread provides a simple foundation for reading DVD video
1957 disks. It provides the functionality that is required to access many
1958 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1959 authentication and descrambling (if an external libdvdcss library is
1960 installed).")
1961 (license license:gpl2+)))
1962
1963 (define-public dvdauthor
1964 (package
1965 (name "dvdauthor")
1966 (version "0.7.2")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1971 version ".tar.gz"))
1972 (sha256
1973 (base32
1974 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1975 (build-system gnu-build-system)
1976 (inputs
1977 `(("libdvdread" ,libdvdread)
1978 ("libpng" ,libpng)
1979 ("imagemagick" ,imagemagick)
1980 ("libxml2" ,libxml2)
1981 ("freetype" ,freetype)))
1982 (native-inputs
1983 `(("pkg-config" ,pkg-config)))
1984 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1985 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1986 MPEG-2 stream containing VOB packets.")
1987 (home-page "http://dvdauthor.sourceforge.net")
1988 (license license:gpl3+)))
1989
1990 (define-public libdvdnav
1991 (package
1992 (name "libdvdnav")
1993 (version "6.0.1")
1994 (source (origin
1995 (method url-fetch)
1996 (uri (string-append "https://download.videolan.org/videolan/"
1997 "libdvdnav/" version "/"
1998 "libdvdnav-" version ".tar.bz2"))
1999 (sha256
2000 (base32
2001 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2002 (build-system gnu-build-system)
2003 (native-inputs
2004 `(("pkg-config" ,pkg-config)))
2005 (inputs
2006 `(("libdvdread" ,libdvdread)))
2007 (home-page "http://dvdnav.mplayerhq.hu/")
2008 (synopsis "Library for video DVD navigation features")
2009 (description
2010 "Libdvdnav is a library for developers of multimedia
2011 applications. It allows easy use of sophisticated DVD navigation features
2012 such as DVD menus, multiangle playback and even interactive DVD games. All
2013 this functionality is provided through a simple API which provides the DVD
2014 playback as a single logical stream of blocks, intermitted by special
2015 dvdnav events to report certain conditions. The main usage of libdvdnav is
2016 a loop regularly calling a function to get the next block, surrounded by
2017 additional calls to tell the library of user interaction. The whole
2018 DVD virtual machine and internal playback states are completely
2019 encapsulated.")
2020 (license license:gpl2+)))
2021
2022 (define-public libdvdcss
2023 (package
2024 (name "libdvdcss")
2025 (version "1.4.2")
2026 (source (origin
2027 (method url-fetch)
2028 (uri (string-append "https://download.videolan.org/pub/"
2029 name "/" version "/"
2030 name "-" version ".tar.bz2"))
2031 (sha256
2032 (base32
2033 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
2034 (build-system gnu-build-system)
2035 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2036 (synopsis "Library for accessing DVDs as block devices")
2037 (description
2038 "libdvdcss is a simple library designed for accessing DVDs like a block
2039 device without having to bother about the decryption.")
2040 (license license:gpl2+)))
2041
2042 (define-public srt2vtt
2043 (package
2044 (name "srt2vtt")
2045 (version "0.1")
2046 (source (origin
2047 (method url-fetch)
2048 (uri (string-append
2049 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2050 version ".tar.gz"))
2051 (sha256
2052 (base32
2053 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
2054 (build-system gnu-build-system)
2055 (inputs
2056 `(("guile" ,guile-2.0)))
2057 (synopsis "SubRip to WebVTT subtitle converter")
2058 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2059 for use with HTML5 video.")
2060 (home-page "https://dthompson.us/projects/srt2vtt.html")
2061 (license license:gpl3+)))
2062
2063 (define-public avidemux
2064 (package
2065 (name "avidemux")
2066 (version "2.7.4")
2067 (source (origin
2068 (method url-fetch)
2069 (uri (string-append
2070 "mirror://sourceforge/avidemux/avidemux/" version "/"
2071 "avidemux_" version ".tar.gz"))
2072 (sha256
2073 (base32
2074 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
2075 (patches (search-patches "avidemux-install-to-lib.patch"))))
2076 (build-system cmake-build-system)
2077 (native-inputs
2078 `(("perl" ,perl)
2079 ("pkg-config" ,pkg-config)
2080 ("python" ,python-wrapper)
2081 ("qttools" ,qttools)
2082 ("yasm" ,yasm)))
2083 ;; FIXME: Once packaged, add libraries not found during the build.
2084 (inputs
2085 `(("alsa-lib" ,alsa-lib)
2086 ("fontconfig" ,fontconfig)
2087 ("freetype" ,freetype)
2088 ("fribidi" ,fribidi)
2089 ("glu" ,glu)
2090 ("jack" ,jack-1)
2091 ("lame" ,lame)
2092 ("libva" ,libva)
2093 ("libvdpau" ,libvdpau)
2094 ("libvorbis" ,libvorbis)
2095 ("libvpx" ,libvpx)
2096 ("libxv" ,libxv)
2097 ("pulseaudio" ,pulseaudio)
2098 ("qtbase" ,qtbase)
2099 ("sqlite" ,sqlite)
2100 ("zlib" ,zlib)))
2101 (arguments
2102 `(#:tests? #f ; no check target
2103 #:phases
2104 ;; Make sure files inside the included ffmpeg tarball are
2105 ;; patch-shebanged.
2106 (let ((ffmpeg "ffmpeg-4.1.4"))
2107 (modify-phases %standard-phases
2108 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2109 (lambda _
2110 (with-directory-excursion "avidemux_core/ffmpeg_package"
2111 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2112 (delete-file (string-append ffmpeg ".tar.bz2")))
2113 #t))
2114 (add-after 'patch-source-shebangs 'repack-ffmpeg
2115 (lambda _
2116 (with-directory-excursion "avidemux_core/ffmpeg_package"
2117 (substitute* (string-append ffmpeg "/configure")
2118 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2119 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2120 ;; avoid non-determinism in the archive
2121 "--sort=name" "--mtime=@0"
2122 "--owner=root:0" "--group=root:0")
2123 (delete-file-recursively ffmpeg))
2124 #t))
2125 (replace 'configure
2126 (lambda _
2127 ;; Copy-paste settings from the cmake build system.
2128 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2129 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2130 #t))
2131 (replace 'build
2132 (lambda* (#:key inputs outputs #:allow-other-keys)
2133 (let* ((out (assoc-ref outputs "out"))
2134 (lib (string-append out "/lib"))
2135 (top (getcwd))
2136 (build_component
2137 (lambda* (component srcdir #:optional (args '()))
2138 (let ((builddir (string-append "build_" component)))
2139 (mkdir builddir)
2140 (with-directory-excursion builddir
2141 (apply invoke "cmake"
2142 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2143 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2144 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2145 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2146 "\"-Wl,-rpath=" lib "\"")
2147 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2148 (string-append "../" srcdir)
2149 "-DENABLE_QT5=True"
2150 args)
2151 (invoke "make" "-j"
2152 (number->string (parallel-job-count)))
2153 (invoke "make" "install"))))))
2154 (mkdir out)
2155 (build_component "core" "avidemux_core")
2156 (build_component "cli" "avidemux/cli")
2157 (build_component "qt4" "avidemux/qt4")
2158 (build_component "plugins_common" "avidemux_plugins"
2159 '("-DPLUGIN_UI=COMMON"))
2160 (build_component "plugins_cli" "avidemux_plugins"
2161 '("-DPLUGIN_UI=CLI"))
2162 (build_component "plugins_qt4" "avidemux_plugins"
2163 '("-DPLUGIN_UI=QT4"))
2164 (build_component "plugins_settings" "avidemux_plugins"
2165 '("-DPLUGIN_UI=SETTINGS"))
2166 ;; Remove .exe and .dll file.
2167 (delete-file-recursively
2168 (string-append out "/share/ADM6_addons"))
2169 #t)))
2170 (delete 'install)))))
2171 (home-page "http://fixounet.free.fr/avidemux/")
2172 (synopsis "Video editor")
2173 (description "Avidemux is a video editor designed for simple cutting,
2174 filtering and encoding tasks. It supports many file types, including AVI,
2175 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2176 can be automated using projects, job queue and powerful scripting
2177 capabilities.")
2178 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2179 ;; Software with various licenses is included, see License.txt.
2180 (license license:gpl2+)))
2181
2182 (define-public vapoursynth
2183 (package
2184 (name "vapoursynth")
2185 (version "49")
2186 (source (origin
2187 (method git-fetch)
2188 (uri (git-reference
2189 (url "https://github.com/vapoursynth/vapoursynth.git")
2190 (commit (string-append "R" version))))
2191 (file-name (git-file-name name version))
2192 (sha256
2193 (base32
2194 "1d298mlb24nlc2x7pixfbkd0qbpv4c706c32idsgpi96z1spkhvl"))))
2195 (build-system gnu-build-system)
2196 (native-inputs
2197 `(("autoconf" ,autoconf)
2198 ("automake" ,automake)
2199 ("cython" ,python-cython)
2200 ("libtool" ,libtool)
2201 ("pkg-config" ,pkg-config)
2202 ("python" ,python)
2203 ("yasm" ,yasm)))
2204 (inputs
2205 `(("ffmpeg" ,ffmpeg)
2206 ("libass" ,libass)
2207 ("tesseract-ocr" ,tesseract-ocr)
2208 ("zimg" ,zimg)))
2209 (home-page "http://www.vapoursynth.com/")
2210 (synopsis "Video processing framework")
2211 (description "VapourSynth is a C++ library and Python module for video
2212 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2213 multithreading, generalized colorspaces, per frame properties, and videos with
2214 format changes.")
2215 ;; src/core/cpufeatures only allows x86, ARM or PPC
2216 (supported-systems (fold delete %supported-systems
2217 '("mips64el-linux" "aarch64-linux")))
2218 ;; As seen from the source files.
2219 (license license:lgpl2.1+)))
2220
2221 (define-public xvid
2222 (package
2223 (name "xvid")
2224 (version "1.3.7")
2225 (source (origin
2226 (method url-fetch)
2227 (uri (string-append
2228 "http://downloads.xvid.com/downloads/xvidcore-"
2229 version ".tar.bz2"))
2230 (sha256
2231 (base32
2232 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
2233 (build-system gnu-build-system)
2234 (native-inputs `(("yasm" ,yasm)))
2235 (arguments
2236 '(#:phases
2237 (modify-phases %standard-phases
2238 (add-before 'configure 'pre-configure
2239 (lambda _
2240 (chdir "build/generic")
2241 (substitute* "configure"
2242 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2243 #t)))
2244 #:tests? #f)) ; no test suite
2245 (home-page "https://www.xvid.com/")
2246 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2247 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2248 codec library. It uses ASP features such as b-frames, global and quarter
2249 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2250 and custom quantization matrices.")
2251 (license license:gpl2+)))
2252
2253 (define-public streamlink
2254 (package
2255 (name "streamlink")
2256 (version "1.3.1")
2257 (source
2258 (origin
2259 (method url-fetch)
2260 (uri (pypi-uri "streamlink" version))
2261 (sha256
2262 (base32
2263 "0cnlg3ra3g6dml4xfy9ysy9b4qwyn458fadd8ac44cfwi3v4gq6y"))))
2264 (build-system python-build-system)
2265 (home-page "https://github.com/streamlink/streamlink")
2266 (native-inputs
2267 `(("python-freezegun" ,python-freezegun)
2268 ("python-pytest" ,python-pytest)
2269 ("python-mock" ,python-mock)
2270 ("python-requests-mock" ,python-requests-mock)))
2271 (propagated-inputs
2272 `(("python-pysocks" ,python-pysocks)
2273 ("python-websocket-client" ,python-websocket-client)
2274 ("python-iso3166" ,python-iso3166)
2275 ("python-iso639" ,python-iso639)
2276 ("python-isodate" ,python-isodate)
2277 ("python-pycryptodome" ,python-pycryptodome)
2278 ("python-requests" ,python-requests)
2279 ("python-urllib3" ,python-urllib3)))
2280 (synopsis "Extract streams from various services")
2281 (description "Streamlink is command-line utility that extracts streams
2282 from sites like Twitch.tv and pipes them into a video player of choice.")
2283 (license license:bsd-2)))
2284
2285 (define-public twitchy
2286 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2287 (package
2288 (name "twitchy")
2289 (version (git-version "3.4" "1" commit))
2290 (source
2291 (origin
2292 (method git-fetch)
2293 (uri (git-reference
2294 (url "https://github.com/BasioMeusPuga/twitchy.git")
2295 (commit commit)))
2296 (file-name (git-file-name name version))
2297 (sha256
2298 (base32
2299 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2300 (build-system python-build-system)
2301 (arguments
2302 '(#:phases
2303 (modify-phases %standard-phases
2304 (add-after 'unpack 'patch-paths
2305 (lambda* (#:key inputs #:allow-other-keys)
2306 (substitute* "twitchy/twitchy_play.py"
2307 (("\"streamlink ")
2308 (string-append "\"" (assoc-ref inputs "streamlink")
2309 "/bin/streamlink ")))
2310 #t))
2311 (add-before 'check 'check-setup
2312 (lambda _
2313 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2314 #t))
2315 (add-after 'install 'install-rofi-plugin
2316 (lambda* (#:key outputs #:allow-other-keys)
2317 (install-file "plugins/rofi-twitchy"
2318 (string-append (assoc-ref outputs "out")
2319 "/bin"))
2320 #t)))))
2321 (inputs
2322 `(("python-requests" ,python-requests)
2323 ("streamlink" ,streamlink)))
2324 (home-page "https://github.com/BasioMeusPuga/twitchy")
2325 (synopsis "Command-line interface for Twitch.tv")
2326 (description
2327 "This package provides a command-line interface for Twitch.tv")
2328 (license license:gpl3+))))
2329
2330 (define-public mlt
2331 (package
2332 (name "mlt")
2333 (version "6.18.0")
2334 (source (origin
2335 (method git-fetch)
2336 (uri (git-reference
2337 (url "https://github.com/mltframework/mlt.git")
2338 (commit (string-append "v" version))))
2339 (file-name (git-file-name name version))
2340 (sha256
2341 (base32
2342 "0iiqym15n8kbnjzj0asmm86gs23yykz0va5b475cc4v2vv5admgx"))))
2343 (build-system gnu-build-system)
2344 (arguments
2345 `(#:tests? #f ; no tests
2346 #:make-flags '("CC=gcc" "CXX=g++")
2347 #:configure-flags
2348 (list "--enable-gpl3"
2349 "--enable-gpl")
2350 #:phases
2351 (modify-phases %standard-phases
2352 (add-after
2353 'configure 'override-LDFLAGS
2354 (lambda* (#:key outputs #:allow-other-keys)
2355 (substitute* "config.mak"
2356 (("LDFLAGS\\+=")
2357 (string-append "LDFLAGS+=-Wl,-rpath="
2358 (assoc-ref outputs "out")
2359 "/lib ")))
2360 #t)))))
2361 (inputs
2362 `(("alsa-lib" ,alsa-lib)
2363 ("ffmpeg" ,ffmpeg-3.4)
2364 ("fftw" ,fftw)
2365 ("frei0r-plugins" ,frei0r-plugins)
2366 ("gdk-pixbuf" ,gdk-pixbuf)
2367 ("gtk+" ,gtk+-2)
2368 ("libxml2" ,libxml2)
2369 ("jack" ,jack-1)
2370 ("ladspa" ,ladspa)
2371 ("libsamplerate" ,libsamplerate)
2372 ("pulseaudio" ,pulseaudio)
2373 ("qtbase" ,qtbase)
2374 ("qtsvg" ,qtsvg)
2375 ("sdl" ,sdl)
2376 ("sox" ,sox)))
2377 (native-inputs
2378 `(("pkg-config" ,pkg-config)))
2379 (home-page "https://www.mltframework.org/")
2380 (synopsis "Author, manage, and run multitrack audio/video compositions")
2381 (description
2382 "MLT is a multimedia framework, designed and developed for television
2383 broadcasting. It provides a toolkit for broadcasters, video editors, media
2384 players, transcoders, web streamers and many more types of applications. The
2385 functionality of the system is provided via an assortment of ready to use
2386 tools, XML authoring components, and an extensible plug-in based API.")
2387 (license license:gpl3)))
2388
2389 (define-public v4l-utils
2390 (package
2391 (name "v4l-utils")
2392 (version "1.16.6")
2393 (source (origin
2394 (method url-fetch)
2395 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2396 "/v4l-utils-" version ".tar.bz2"))
2397 (sha256
2398 (base32
2399 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2400 (build-system gnu-build-system)
2401 (arguments
2402 '(#:configure-flags
2403 (list (string-append "--with-udevdir="
2404 (assoc-ref %outputs "out")
2405 "/lib/udev"))))
2406 (native-inputs
2407 `(("perl" ,perl)
2408 ("pkg-config" ,pkg-config)))
2409 (inputs
2410 `(("alsa-lib" ,alsa-lib)
2411 ("glu" ,glu)
2412 ("libjpeg" ,libjpeg-turbo)
2413 ("libx11" ,libx11)
2414 ("qtbase" ,qtbase)
2415 ("eudev" ,eudev)))
2416 (synopsis "Realtime video capture utilities for Linux")
2417 (description "The v4l-utils provide a series of libraries and utilities to
2418 be used for realtime video capture via Linux-specific APIs.")
2419 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2420 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2421 (license (list license:lgpl2.1+ license:gpl2))))
2422
2423 (define-public obs
2424 (package
2425 (name "obs")
2426 (version "25.0.8")
2427 (source (origin
2428 (method git-fetch)
2429 (uri (git-reference
2430 (url "https://github.com/obsproject/obs-studio.git")
2431 (commit version)))
2432 (file-name (git-file-name name version))
2433 (sha256
2434 (base32
2435 "0j2k65q3wfyfxhvkl6icz4qy0s3kfqhksizy2i3ah7yml266axbj"))))
2436 (build-system cmake-build-system)
2437 (arguments
2438 `(#:tests? #f ; no test suite
2439 #:configure-flags
2440 (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version))))
2441 (native-inputs
2442 `(("pkg-config" ,pkg-config)))
2443 (inputs
2444 `(("alsa-lib" ,alsa-lib)
2445 ("curl" ,curl)
2446 ("eudev" ,eudev)
2447 ("ffmpeg" ,ffmpeg)
2448 ("fontconfig" ,fontconfig)
2449 ("freetype" ,freetype)
2450 ("jack" ,jack-1)
2451 ("jansson" ,jansson)
2452 ("libx264" ,libx264)
2453 ("libxcomposite" ,libxcomposite)
2454 ("mbedtls" ,mbedtls-apache)
2455 ("mesa" ,mesa)
2456 ("pulseaudio" ,pulseaudio)
2457 ("qtbase" ,qtbase)
2458 ("qtsvg" ,qtsvg)
2459 ("qtx11extras" ,qtx11extras)
2460 ("speex" ,speex)
2461 ("v4l-utils" ,v4l-utils)
2462 ("zlib" ,zlib)))
2463 (synopsis "Live streaming software")
2464 (description "Open Broadcaster Software provides a graphical interface for
2465 video recording and live streaming. OBS supports capturing audio and video
2466 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2467 and JACK.")
2468 (home-page "https://obsproject.com")
2469 (supported-systems '("x86_64-linux" "i686-linux"))
2470 (license license:gpl2+)))
2471
2472 (define-public libvdpau
2473 (package
2474 (name "libvdpau")
2475 (version "1.3")
2476 (source
2477 (origin
2478 (method git-fetch)
2479 (uri (git-reference
2480 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2481 (commit version)))
2482 (file-name (git-file-name name version))
2483 (sha256
2484 (base32
2485 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2486 (build-system meson-build-system)
2487 (native-inputs
2488 `(("pkg-config" ,pkg-config)))
2489 (inputs
2490 `(("libx11" ,libx11 "out")
2491 ("libxext" ,libxext)
2492 ("xorgproto" ,xorgproto)))
2493 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2494 (synopsis "Video Decode and Presentation API")
2495 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2496 provides an interface to video decode acceleration and presentation hardware
2497 present in modern GPUs.")
2498 (license (license:x11-style "file://COPYING"))))
2499
2500 (define-public vdpauinfo
2501 (package
2502 (name "vdpauinfo")
2503 (version "1.0")
2504 (source
2505 (origin
2506 (method url-fetch)
2507 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2508 name "-" version ".tar.gz"))
2509 (sha256
2510 (base32
2511 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2512 (build-system gnu-build-system)
2513 (native-inputs
2514 `(("pkg-config" ,pkg-config)
2515 ("libx11" ,libx11)))
2516 (propagated-inputs
2517 `(("libvdpau" ,libvdpau)))
2518 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2519 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2520 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2521 implementation.")
2522 (license (license:x11-style "file://COPYING"))))
2523
2524 (define-public libvdpau-va-gl
2525 (package
2526 (name "libvdpau-va-gl")
2527 (version "0.4.2")
2528 (source
2529 (origin
2530 (method url-fetch)
2531 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2532 "releases/download/v" version "/libvdpau-va-gl-"
2533 version ".tar.gz"))
2534 (sha256
2535 (base32
2536 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2537 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2538 (modules '((guix build utils)))
2539 (snippet '(begin (delete-file-recursively "3rdparty")
2540 #t))))
2541 (build-system cmake-build-system)
2542 (arguments
2543 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2544 (native-inputs
2545 `(("libvdpau" ,libvdpau)
2546 ("pkg-config" ,pkg-config)))
2547 (inputs
2548 `(("libva" ,libva)
2549 ("mesa" ,mesa)))
2550 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2551 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2552 (description
2553 "Many applications can use VDPAU to accelerate portions of the video
2554 decoding process and video post-processing to the GPU video hardware. Since
2555 there is no VDPAU available on Intel chips, they fall back to different drawing
2556 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2557 scaling and VA-API (if available) to accelerate video decoding.")
2558 (license license:expat)))
2559
2560 (define-public recordmydesktop
2561 (package
2562 (name "recordmydesktop")
2563 (version "0.3.8.1")
2564 (source (origin
2565 (method url-fetch)
2566 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2567 version "/recordmydesktop-" version ".tar.gz"))
2568 (sha256
2569 (base32
2570 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2571 (build-system gnu-build-system)
2572 (inputs `(("popt" ,popt)
2573 ("zlib" ,zlib)
2574 ("libx11" ,libx11)
2575 ("libice" ,libice)
2576 ("libsm" ,libsm)
2577 ("libxfixes" ,libxfixes)
2578 ("libxdamage" ,libxdamage)
2579 ("libxext" ,libxext)
2580 ("alsa-lib" ,alsa-lib)
2581 ("libvorbis" ,libvorbis)
2582 ("libtheora" ,libtheora)))
2583 (home-page "http://recordmydesktop.sourceforge.net/")
2584 (synopsis "Desktop session video recorder")
2585 (description
2586 "recordMyDesktop is a command-line tool that captures the activity in
2587 your graphical desktop and encodes it as a video. This is a useful tool for
2588 making @dfn{screencasts}.")
2589 (license license:gpl2+)))
2590
2591 (define-public simplescreenrecorder
2592 (package
2593 (name "simplescreenrecorder")
2594 (version "0.3.11")
2595 (source
2596 (origin
2597 (method git-fetch)
2598 (uri (git-reference
2599 (url "https://github.com/MaartenBaert/ssr.git")
2600 (commit version)))
2601 (file-name (git-file-name name version))
2602 (sha256
2603 (base32
2604 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2605 (build-system cmake-build-system)
2606 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2607 ;; README.md, the program builds and functions properly without them.
2608 ;; As a result, they are omitted. Please add them back if problems appear.
2609 (inputs
2610 `(("alsa-lib" ,alsa-lib)
2611 ("ffmpeg" ,ffmpeg)
2612 ("glu" ,glu)
2613 ("jack" ,jack-1)
2614 ("libxi" ,libxi)
2615 ("pulseaudio" ,pulseaudio)
2616 ("qtbase" ,qtbase)
2617 ("qtx11extras" ,qtx11extras)))
2618 (native-inputs `(("pkg-config" ,pkg-config)))
2619 (arguments
2620 `(#:configure-flags
2621 (list "-DWITH_QT5=TRUE")
2622 #:tests? #f)) ; no test suite
2623 ;; Using HTTPS causes part of the page to be displayed improperly.
2624 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
2625 (synopsis "Screen recorder")
2626 (description "SimpleScreenRecorder is an easy to use screen recorder with
2627 a graphical user interface. It supports recording the entire screen, or a
2628 part of it, and allows encoding in many different codecs and file formats.
2629 Other features include a live preview and live streaming.")
2630 (license (list license:gpl3+ ; most files
2631 license:zlib ; glinject/elfhacks.*
2632 license:isc ; glinject/*
2633 license:x11)))) ; build-aux/install-sh
2634
2635 (define-public libsmpeg
2636 (package
2637 (name "libsmpeg")
2638 (version "0.4.5-401")
2639 (source (origin
2640 (method svn-fetch)
2641 (uri (svn-reference
2642 (url "svn://svn.icculus.org/smpeg/trunk/")
2643 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2644 (file-name (string-append name "-" version "-checkout"))
2645 (sha256
2646 (base32
2647 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2648 (build-system gnu-build-system)
2649 (arguments
2650 ;; libsmpeg fails to build with -std=c++11, which is the default with
2651 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2652 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
2653 (native-inputs
2654 `(("autoconf" ,autoconf)
2655 ("automake" ,automake)))
2656 (inputs
2657 `(("sdl" ,sdl2)))
2658 (home-page "https://icculus.org/smpeg/")
2659 (synopsis "SDL MPEG decoding library")
2660 (description
2661 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2662 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2663 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2664 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2665 and MPEG system streams.")
2666 (license (list license:expat
2667 license:lgpl2.1
2668 license:lgpl2.1+
2669 license:gpl2))))
2670
2671 ;; for btanks
2672 (define-public libsmpeg-with-sdl1
2673 (package (inherit libsmpeg)
2674 (name "libsmpeg")
2675 (version "0.4.5-399")
2676 (source (origin
2677 (method svn-fetch)
2678 (uri (svn-reference
2679 (url "svn://svn.icculus.org/smpeg/trunk/")
2680 (revision 399))) ; tagged release 0.4.5
2681 (file-name (string-append name "-" version "-checkout"))
2682 (sha256
2683 (base32
2684 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2685 (inputs
2686 `(("sdl" ,sdl)))))
2687
2688 (define-public libbdplus
2689 (package
2690 (name "libbdplus")
2691 (version "0.1.2")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2696 version "/" name "-" version ".tar.bz2"))
2697 (sha256
2698 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2699 (inputs
2700 `(("libgcrypt" ,libgcrypt)))
2701 (build-system gnu-build-system)
2702 (home-page "https://www.videolan.org/developers/libbdplus.html")
2703 (synopsis "Library for decrypting certain Blu-Ray discs")
2704 (description "libbdplus is a library which implements the BD+ System
2705 specifications.")
2706 (license license:lgpl2.1+)))
2707
2708 (define-public libaacs
2709 (package
2710 (name "libaacs")
2711 (version "0.9.0")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2716 version "/" name "-" version ".tar.bz2"))
2717 (sha256
2718 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2719 (inputs
2720 `(("libgcrypt" ,libgcrypt)))
2721 (native-inputs
2722 `(("bison" ,bison)
2723 ("flex" ,flex)))
2724 (build-system gnu-build-system)
2725 (home-page "https://www.videolan.org/developers/libaacs.html")
2726 (synopsis "Library for decrypting certain Blu-Ray discs")
2727 (description "libaacs is a library which implements the Advanced Access
2728 Content System specification.")
2729 (license license:lgpl2.1+)))
2730
2731 (define-public mps-youtube
2732 (package
2733 (name "mps-youtube")
2734 (version "0.2.8")
2735 (source
2736 (origin
2737 (method git-fetch)
2738 (uri (git-reference
2739 (url "https://github.com/mps-youtube/mps-youtube.git")
2740 (commit (string-append "v" version))))
2741 (file-name (git-file-name name version))
2742 (sha256
2743 (base32
2744 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2745 (build-system python-build-system)
2746 (arguments
2747 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2748 ;; test suite results differ depending on the country and also introduce
2749 ;; non-determinism in the tests.
2750 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2751 `(#:tests? #f))
2752 (propagated-inputs
2753 `(("python-pafy" ,python-pafy)
2754 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2755 (home-page "https://github.com/mps-youtube/mps-youtube")
2756 (synopsis "Terminal based YouTube player and downloader")
2757 (description
2758 "@code{mps-youtube} is based on mps, a terminal based program to
2759 search, stream and download music. This implementation uses YouTube as
2760 a source of content and can play and download video as well as audio.
2761 It can use either mpv or mplayer for playback, and for conversion of
2762 formats ffmpeg or libav is used. Users should install one of the
2763 supported players in addition to this package.")
2764 (license license:gpl3+)))
2765
2766 (define-public handbrake
2767 (package
2768 (name "handbrake")
2769 (version "1.3.2")
2770 (source (origin
2771 (method url-fetch)
2772 (uri (string-append "https://github.com/HandBrake/HandBrake/"
2773 "releases/download/" version "/"
2774 "HandBrake-" version "-source.tar.bz2"))
2775 (sha256
2776 (base32
2777 "0w7jxjrccvxp7g15dv0spildg5apmqp4gwbcqmg58va2gylynvzc"))
2778 (modules '((guix build utils)))
2779 (snippet
2780 ;; Remove "contrib" and source not necessary for
2781 ;; building/running under a GNU environment.
2782 '(begin
2783 (for-each delete-file-recursively
2784 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
2785 (substitute* "make/include/main.defs"
2786 ;; Disable unconditional inclusion of "contrib" libraries
2787 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2788 ;; which would lead to fetching and building of these
2789 ;; libraries. Use our own instead.
2790 (("MODULES \\+= contrib") "# MODULES += contrib"))
2791 #t))))
2792 (build-system glib-or-gtk-build-system)
2793 (native-inputs
2794 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
2795 ("autoconf" ,autoconf)
2796 ("intltool" ,intltool)
2797 ("libtool" ,libtool)
2798 ("pkg-config" ,pkg-config)
2799 ("python" ,python-2))) ; For configuration
2800 (inputs
2801 `(("bzip2" ,bzip2)
2802 ("dbus-glib" ,dbus-glib)
2803 ("ffmpeg" ,ffmpeg)
2804 ("fontconfig" ,fontconfig)
2805 ("freetype" ,freetype)
2806 ("glib" ,glib)
2807 ("gstreamer" ,gstreamer)
2808 ("gst-plugins-base" ,gst-plugins-base)
2809 ("gtk+" ,gtk+)
2810 ("jansson" ,jansson)
2811 ("lame" ,lame)
2812 ("libass" ,libass)
2813 ("libbluray" ,libbluray)
2814 ("libdav1d" ,dav1d)
2815 ("libdvdnav" ,libdvdnav)
2816 ("libdvdread" ,libdvdread)
2817 ("libgudev" ,libgudev)
2818 ("libmpeg2" ,libmpeg2)
2819 ("libnotify" ,libnotify)
2820 ("libnuma" ,numactl)
2821 ("libogg" ,libogg)
2822 ("libopus" ,opus)
2823 ("libsamplerate" ,libsamplerate)
2824 ("libtheora" ,libtheora)
2825 ("libvorbis" ,libvorbis)
2826 ("libvpx" ,libvpx)
2827 ("libxml2" ,libxml2)
2828 ("libx264" ,libx264)
2829 ("speex" ,speex)
2830 ("x265" ,x265)
2831 ("zlib" ,zlib)))
2832 (arguments
2833 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2834 #:configure-flags
2835 (list "--disable-gtk-update-checks"
2836 "--disable-nvenc"
2837 (string-append "CPPFLAGS=-I"
2838 (assoc-ref %build-inputs "libxml2")
2839 "/include/libxml2")
2840 "LDFLAGS=-lx265")
2841 #:phases
2842 (modify-phases %standard-phases
2843 (replace 'bootstrap
2844 ;; Run bootstrap ahead of time so that shebangs get patched.
2845 (lambda _
2846 (setenv "CONFIG_SHELL" (which "sh"))
2847 ;; Patch the Makefile so that it doesn't bootstrap again.
2848 (substitute* "gtk/module.rules"
2849 ((".*autoreconf.*") ""))
2850 (with-directory-excursion "gtk"
2851 (invoke "autoreconf" "-fiv"))))
2852 (add-before 'configure 'patch-SHELL
2853 (lambda _
2854 (substitute* "gtk/po/Makefile.in.in"
2855 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
2856 #t))
2857 (add-before 'configure 'relax-reqs
2858 (lambda _
2859 (substitute* "make/configure.py"
2860 ;; cmake is checked for so that it can be used to build
2861 ;; contrib/harfbuzz and contrib/x265, but we get these as
2862 ;; inputs, so don't abort if it's not found. Similarly, meson
2863 ;; and ninja are only needed for contrib/libdav1d, and nasm
2864 ;; only for libvpx
2865 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
2866 (string-append & "False")))
2867 #t))
2868 (replace 'configure
2869 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2870 ;; 'configure' is not an autoconf-generated script, and
2871 ;; errors on unrecognized arguments,
2872 ;; e.g. --enable-fast-install
2873 (let ((out (assoc-ref outputs "out")))
2874 (apply invoke "./configure"
2875 (string-append "--prefix=" out)
2876 (or configure-flags '())))))
2877 (add-after 'configure 'chdir-build
2878 (lambda _ (chdir "./build") #t)))))
2879 (home-page "https://handbrake.fr")
2880 (synopsis "Video transcoder")
2881 (description
2882 "HandBrake is a tool for converting video from any format to a selection
2883 of modern, widely supported codecs.")
2884 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2885 ;; Combination under GPLv2. See LICENSE.
2886 (license license:gpl2)))
2887
2888 (define-public intel-vaapi-driver
2889 (package
2890 (name "intel-vaapi-driver")
2891 (version "2.4.1")
2892 (source
2893 (origin
2894 (method git-fetch)
2895 (uri (git-reference
2896 (url "https://github.com/intel/intel-vaapi-driver")
2897 (commit version)))
2898 (sha256
2899 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
2900 (file-name (git-file-name name version))))
2901 (build-system gnu-build-system)
2902 (native-inputs
2903 `(("autoconf" ,autoconf)
2904 ("automake" ,automake)
2905 ("libtool" ,libtool)
2906 ("pkg-config" ,pkg-config)))
2907 (inputs
2908 `(("libdrm" ,libdrm)
2909 ("libva" ,libva)
2910 ("libx11" ,libx11)))
2911 (arguments
2912 `(#:phases
2913 (modify-phases %standard-phases
2914 (add-before 'configure 'set-target-directory
2915 (lambda* (#:key outputs #:allow-other-keys)
2916 (let ((out (assoc-ref outputs "out")))
2917 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2918 #t))))))
2919 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2920 ;; this to all VA-API back ends instead of once to libva.
2921 (native-search-paths
2922 (list (search-path-specification
2923 (variable "LIBVA_DRIVERS_PATH")
2924 (files '("lib/dri")))))
2925 (supported-systems '("i686-linux" "x86_64-linux"))
2926 (home-page "https://01.org/linuxmedia/vaapi")
2927 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2928 (description
2929 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2930 hardware-accelerated video processing on Intel GEN Graphics devices supported by
2931 the i915 driver, such as integrated Intel HD Graphics. It provides access to
2932 both hardware and shader functionality for faster encoding, decoding, and
2933 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2934 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2935 license:expat)))) ; the rest, excluding the test suite
2936
2937 (define-public openh264
2938 (package
2939 (name "openh264")
2940 (version "2.1.1")
2941 (source (origin
2942 (method git-fetch)
2943 (uri (git-reference
2944 (url "https://github.com/cisco/openh264")
2945 (commit (string-append "v" version))))
2946 (file-name (git-file-name name version))
2947 (sha256
2948 (base32
2949 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
2950 (build-system gnu-build-system)
2951 (native-inputs
2952 `(("nasm" ,nasm)
2953 ("python" ,python)))
2954 (arguments
2955 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2956 "CC=gcc")
2957 #:test-target "test"
2958 #:phases (modify-phases %standard-phases
2959 ;; no configure script
2960 (delete 'configure))))
2961 (home-page "https://www.openh264.org/")
2962 (synopsis "H264 decoder library")
2963 (description
2964 "Openh264 is a library which can decode H264 video streams.")
2965 (license license:bsd-2)))
2966
2967 (define-public libmp4v2
2968 (package
2969 (name "libmp4v2")
2970 (version "2.0.0")
2971 (source
2972 (origin
2973 (method url-fetch)
2974 ;; XXX: The new location of upstream is uncertain and will become relevant the
2975 ;; moment when the googlecode archive shuts down. It is past the date it
2976 ;; should've been turned off. I tried to communicate with upstream, but this
2977 ;; wasn't very responsive and not very helpful. The short summary is, it is
2978 ;; chaos when it comes to the amount of forks and only time will tell where
2979 ;; the new upstream location is.
2980 (uri (string-append "https://storage.googleapis.com/google-"
2981 "code-archive-downloads/v2/"
2982 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2983 (file-name (string-append name "-" version ".tar.bz2"))
2984 (patches (search-patches "libmp4v2-c++11.patch"))
2985 (sha256
2986 (base32
2987 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2988 (build-system gnu-build-system)
2989 (outputs '("out"
2990 "static")) ; 3.7MiB .a file
2991 (arguments
2992 `(#:phases
2993 (modify-phases %standard-phases
2994 (add-after 'unpack 'remove-dates
2995 (lambda _
2996 ;; Make the build reproducible.
2997 (substitute* "configure"
2998 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2999 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
3000 #t))
3001 (add-after 'install 'move-static-libraries
3002 (lambda* (#:key outputs #:allow-other-keys)
3003 ;; Move static libraries to the "static" output.
3004 (let* ((out (assoc-ref outputs "out"))
3005 (lib (string-append out "/lib"))
3006 (static (assoc-ref outputs "static"))
3007 (slib (string-append static "/lib")))
3008 (mkdir-p slib)
3009 (for-each (lambda (file)
3010 (install-file file slib)
3011 (delete-file file))
3012 (find-files lib "\\.a$"))
3013 #t))))))
3014 (native-inputs
3015 `(("help2man" ,help2man)
3016 ("dejagnu" ,dejagnu)))
3017 (home-page "https://code.google.com/archive/p/mp4v2/")
3018 (synopsis "API to create and modify mp4 files")
3019 (description
3020 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3021 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3022 file format that has been used as a multimedia file format in a variety of platforms and
3023 applications. It is a very powerful and extensible format that can accommodate
3024 practically any type of media.")
3025 (license license:mpl1.1)))
3026
3027 (define-public libmediainfo
3028 (package
3029 (name "libmediainfo")
3030 (version "20.03")
3031 (source (origin
3032 (method url-fetch)
3033 (uri (string-append "https://mediaarea.net/download/source/"
3034 name "/" version "/"
3035 name "_" version ".tar.xz"))
3036 (sha256
3037 (base32
3038 "0wkzj5s34m8dvy7hif4h8f90q8ncrzd930gij1zzw3h5nw732j38"))))
3039 ;; TODO add a Big Buck Bunny webm for tests.
3040 (native-inputs
3041 `(("autoconf" ,autoconf)
3042 ("automake" ,automake)
3043 ("libtool" ,libtool)
3044 ("pkg-config" ,pkg-config)
3045 ("zlib" ,zlib)
3046 ("tinyxml2" ,tinyxml2)
3047 ("curl" ,curl)
3048 ("libzen" ,libzen)))
3049 (build-system gnu-build-system)
3050 (arguments
3051 '(#:tests? #f ; see above TODO
3052 #:phases
3053 ;; build scripts not in root of archive
3054 (modify-phases %standard-phases
3055 (add-after 'unpack 'change-to-build-dir
3056 (lambda _
3057 (chdir "Project/GNU/Library")
3058 #t)))))
3059 (home-page "https://mediaarea.net/en/MediaInfo")
3060 (synopsis "Library for retrieving media metadata")
3061 (description "MediaInfo is a library used for retrieving technical
3062 information and other metadata about audio or video files. A non-exhaustive
3063 list of the information MediaInfo can retrieve from media files include:
3064
3065 @itemize
3066 @item General: title, author, director, album, track number, date, duration...
3067 @item Video: codec, aspect, fps, bitrate...
3068 @item Audio: codec, sample rate, channels, language, bitrate...
3069 @item Text: language of subtitle
3070 @item Chapters: number of chapters, list of chapters
3071 @end itemize
3072
3073 MediaInfo supports the following formats:
3074
3075 @itemize
3076 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3077 MPEG-2, MPEG-4, DVD (VOB)...
3078 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3079 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3080 @item Subtitles: SRT, SSA, ASS, SAMI...
3081 @end itemize\n")
3082 (license license:bsd-2)))
3083
3084 ;; TODO also have a GUI version available
3085 (define-public mediainfo
3086 (package
3087 (name "mediainfo")
3088 (version "20.03")
3089 (source (origin
3090 (method url-fetch)
3091 ;; Warning: This source has proved unreliable 1 time at least.
3092 ;; Consider an alternate source or report upstream if this
3093 ;; happens again.
3094 (uri (string-append "https://mediaarea.net/download/source/"
3095 name "/" version "/"
3096 name "_" version ".tar.xz"))
3097 (sha256
3098 (base32
3099 "1f1shnycf0f1fwka9k9s250l228xjkg0k4k73h8bpld8msighgnw"))))
3100 (native-inputs
3101 `(("autoconf" ,autoconf)
3102 ("automake" ,automake)
3103 ("libtool" ,libtool)
3104 ("pkg-config" ,pkg-config)
3105 ("zlib" ,zlib)
3106 ("libmediainfo" ,libmediainfo)
3107 ("libzen" ,libzen)))
3108 (build-system gnu-build-system)
3109 (arguments
3110 '(#:tests? #f ; lacks tests
3111 #:phases
3112 ;; build scripts not in root of archive
3113 (modify-phases %standard-phases
3114 (add-after 'unpack 'change-to-build-dir
3115 (lambda _
3116 (chdir "Project/GNU/CLI")
3117 #t)))))
3118 (home-page "https://mediaarea.net/en/MediaInfo")
3119 (synopsis "Utility for reading media metadata")
3120 (description "MediaInfo is a utility used for retrieving technical
3121 information and other metadata about audio or video files. It supports the
3122 many codecs and formats supported by libmediainfo.")
3123 (license license:bsd-2)))
3124
3125 (define-public livemedia-utils
3126 (package
3127 (name "livemedia-utils")
3128 (version "2019.05.29")
3129 (source (origin
3130 (method url-fetch)
3131 (uri (string-append
3132 "https://download.videolan.org/contrib/live555/live."
3133 version ".tar.gz"))
3134 (sha256
3135 (base32
3136 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
3137 (build-system gnu-build-system)
3138 (arguments
3139 '(#:tests? #f ; no tests
3140 #:make-flags (list "CC=gcc"
3141 (string-append "LDFLAGS=-Wl,-rpath="
3142 (assoc-ref %outputs "out") "/lib")
3143 (string-append "PREFIX="
3144 (assoc-ref %outputs "out")))
3145 #:phases (modify-phases %standard-phases
3146 (add-before 'configure 'fix-makefiles-generation
3147 (lambda _
3148 (substitute* "genMakefiles"
3149 (("/bin/rm") "rm"))
3150 #t))
3151 (replace 'configure
3152 (lambda _
3153 (invoke "./genMakefiles"
3154 "linux-with-shared-libraries"))))))
3155 (home-page "http://www.live555.com/liveMedia/")
3156 (synopsis "Set of C++ libraries for multimedia streaming")
3157 (description "This code forms a set of C++ libraries for multimedia
3158 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3159 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3160 JPEG video, and several audio codecs. They can easily be extended to support
3161 additional (audio and/or video) codecs, and can also be used to build basic
3162 RTSP or SIP clients and servers.")
3163 (license license:lgpl3+)))
3164
3165 (define-public libdvbpsi
3166 (package
3167 (name "libdvbpsi")
3168 (version "1.3.3")
3169 (source (origin
3170 (method url-fetch)
3171 (uri (string-append
3172 "https://download.videolan.org/pub/libdvbpsi/"
3173 version "/libdvbpsi-" version ".tar.bz2"))
3174 (sha256
3175 (base32
3176 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
3177 (build-system gnu-build-system)
3178 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3179 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3180 tables")
3181 (description "libdvbpsi is a simple library designed for decoding and
3182 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3183 and ITU-T H.222.0.")
3184 (license license:lgpl2.1)))
3185
3186 (define-public ffms2
3187 (package
3188 (name "ffms2")
3189 (version "2.23")
3190 (home-page "https://github.com/FFMS/ffms2")
3191 (source (origin
3192 (method git-fetch)
3193 (uri (git-reference
3194 (url "https://github.com/FFMS/ffms2.git")
3195 (commit version)))
3196 (file-name (git-file-name name version))
3197 (sha256
3198 (base32
3199 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3200 (build-system gnu-build-system)
3201 (arguments
3202 '(#:configure-flags
3203 (list "--enable-avresample")))
3204 (inputs
3205 `(("zlib" ,zlib)))
3206 (propagated-inputs
3207 `(("ffmpeg" ,ffmpeg)))
3208 (native-inputs
3209 `(("pkg-config" ,pkg-config)))
3210 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3211 (description
3212 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3213 programmers to access a standard API to open and decompress media files.")
3214 ;; sources are distributed under a different license that the binary.
3215 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3216 (license license:gpl2+))); inherits from ffmpeg
3217
3218 (define-public aegisub
3219 (package
3220 (name "aegisub")
3221 (version "3.2.2")
3222 (source (origin
3223 (method url-fetch)
3224 (uri (string-append
3225 "http://ftp.aegisub.org/pub/archives/releases/source/"
3226 name "-" version ".tar.xz"))
3227 (sha256
3228 (base32
3229 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3230 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3231 "aegisub-make43.patch"
3232 "aegisub-boost68.patch"))))
3233 (build-system gnu-build-system)
3234 (arguments
3235 `(#:configure-flags
3236 (list "--disable-update-checker"
3237 "--without-portaudio"
3238 "--without-openal"
3239 "--without-oss"
3240 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3241 ;; tests require busted, a lua package we don't have yet
3242 #:tests? #f
3243 #:phases
3244 (modify-phases %standard-phases
3245 (add-before 'configure 'fix-ldflags
3246 (lambda _
3247 (setenv "LDFLAGS" "-pthread")
3248 #t))
3249 (add-after 'unpack 'fix-boost-headers
3250 (lambda _
3251 (substitute*
3252 '("src/subtitles_provider_libass.cpp"
3253 "src/colour_button.cpp"
3254 "src/video_provider_dummy.cpp"
3255 "./src/video_frame.cpp")
3256 (("#include <boost/gil/gil_all.hpp>")
3257 "#include <boost/gil.hpp>"))
3258 #t)))))
3259 (inputs
3260 `(("boost" ,boost)
3261 ("ffms2" ,ffms2)
3262 ("fftw" ,fftw)
3263 ("hunspell" ,hunspell)
3264 ("mesa" ,mesa)
3265 ("libass" ,libass)
3266 ("alsa-lib" ,alsa-lib)
3267 ("pulseaudio" ,pulseaudio)
3268 ("libx11" ,libx11)
3269 ("freetype" ,freetype)
3270 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3271 (native-inputs
3272 `(("intltool" ,intltool)
3273 ("desktop-file-utils" ,desktop-file-utils)
3274 ("pkg-config" ,pkg-config)))
3275 (home-page "http://www.aegisub.org/")
3276 (synopsis "Subtitle engine")
3277 (description
3278 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3279 it quick and easy to time subtitles to audio, and features many powerful
3280 tools for styling them, including a built-in real-time video preview.")
3281 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3282 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3283 license:expat)))) ; and src/gl that is under a license similar
3284 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3285 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3286 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3287
3288 (define-public gst-transcoder
3289 (package
3290 (name "gst-transcoder")
3291 (version "1.12.2")
3292 (source
3293 (origin
3294 (method git-fetch)
3295 (uri (git-reference
3296 (url "https://github.com/pitivi/gst-transcoder.git")
3297 (commit version)))
3298 (file-name (git-file-name name version))
3299 (sha256
3300 (base32
3301 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3302 (build-system meson-build-system)
3303 (inputs
3304 `(("gobject-introspection" ,gobject-introspection)
3305 ("glib" ,glib)
3306 ("gstreamer" ,gstreamer)
3307 ("gst-plugins-base" ,gst-plugins-base)))
3308 (native-inputs
3309 `(("python" ,python)
3310 ("pkg-config" ,pkg-config)))
3311 (home-page "https://github.com/pitivi/gst-transcoder/")
3312 (synopsis "GStreamer Transcoding API")
3313 (description "GStreamer Transcoding API")
3314 (license license:lgpl2.1)))
3315
3316 (define-public gavl
3317 (package
3318 (name "gavl")
3319 (version "1.4.0")
3320 (source
3321 (origin
3322 (method url-fetch)
3323 (uri (string-append "mirror://sourceforge/gmerlin/"
3324 name "/" version "/"
3325 name "-" version ".tar.gz"))
3326 (file-name (string-append name "-" version ".tar.gz"))
3327 (sha256
3328 (base32
3329 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3330 (build-system gnu-build-system)
3331 (arguments
3332 '(#:configure-flags '("LIBS=-lm")))
3333 (native-inputs
3334 `(("pkg-config" ,pkg-config)
3335 ("doxygen" ,doxygen)))
3336 (home-page "http://gmerlin.sourceforge.net")
3337 (synopsis "Low level library for multimedia API building")
3338 (description
3339 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3340 library, upon which multimedia APIs can be built. Gavl handles all the
3341 details of audio and video formats like colorspaces, sample rates,
3342 multichannel configurations, etc. It provides standardized definitions for
3343 those formats as well as container structures for carrying audio samples or
3344 video images inside an application.
3345
3346 In addition, it handles the sometimes ugly task of converting between all
3347 these formats and provides some elementary operations (copying, scaling,
3348 alpha blending etc).")
3349 (license license:gpl3)))
3350
3351 (define-public frei0r-plugins
3352 (package
3353 (name "frei0r-plugins")
3354 (version "1.7.0")
3355 (source
3356 (origin
3357 (method url-fetch)
3358 (uri (string-append "https://files.dyne.org/frei0r/"
3359 "frei0r-plugins-" version ".tar.gz"))
3360 (sha256
3361 (base32
3362 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
3363 (build-system gnu-build-system)
3364 (arguments
3365 `(#:phases
3366 (modify-phases %standard-phases
3367 (add-after 'unpack 'patch-Makefile
3368 (lambda _
3369 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3370 ;; names in the tarball. Try removing this for future versions.
3371 (substitute* "Makefile.in"
3372 (("README\\.md ChangeLog TODO AUTHORS")
3373 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3374 #t)))))
3375 ;; TODO: opencv for additional face detection filters.
3376 (inputs
3377 `(("gavl" ,gavl)
3378 ("cairo" ,cairo)))
3379 (native-inputs
3380 `(("pkg-config" ,pkg-config)))
3381 (home-page "https://www.dyne.org/software/frei0r/")
3382 (synopsis "Minimalistic plugin API for video effects")
3383 (description
3384 "Frei0r is a minimalistic plugin API for video effects.
3385 The main emphasis is on simplicity for an API that will round up
3386 the most common video effects into simple filters, sources and
3387 mixers that can be controlled by parameters. Frei0r wants to
3388 provide a way to share these simple effects between many
3389 applications, avoiding their reimplementation by different projects.
3390 It counts more than 100 plugins.")
3391 (license (list license:gpl2+
3392 ;; The following files are licensed as LGPL2.1+:
3393 ;; src/generator/ising0r/ising0r.c
3394 ;; src/generator/onecol0r/onecol0r.cpp
3395 ;; src/generator/nois0r/nois0r.cpp
3396 ;; src/generator/lissajous0r/lissajous0r.cpp
3397 ;; src/filter/ndvi/gradientlut.hpp
3398 ;; src/filter/ndvi/ndvi.cpp
3399 ;; src/filter/facedetect/facedetect.cpp
3400 license:lgpl2.1+))))
3401
3402 (define-public motion
3403 (package
3404 (name "motion")
3405 (version "4.2.2")
3406 (home-page "https://motion-project.github.io/")
3407 (source (origin
3408 (method git-fetch)
3409 (uri (git-reference
3410 (url "https://github.com/Motion-Project/motion.git")
3411 (commit (string-append "release-" version))))
3412 (sha256
3413 (base32
3414 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3415 (file-name (git-file-name name version))))
3416 (build-system gnu-build-system)
3417 (native-inputs
3418 `(("autoconf" ,autoconf-wrapper)
3419 ("automake" ,automake)
3420 ("gettext" ,gettext-minimal)
3421 ("pkg-config" ,pkg-config)))
3422 (inputs
3423 `(("libjpeg" ,libjpeg-turbo)
3424 ("ffmpeg" ,ffmpeg-3.4)
3425 ("libmicrohttpd" ,libmicrohttpd)
3426 ("sqlite" ,sqlite)))
3427 (arguments
3428 '(#:phases (modify-phases %standard-phases
3429 (replace 'bootstrap
3430 (lambda _
3431 (patch-shebang "version.sh")
3432 (invoke "autoreconf" "-vfi"))))
3433 #:configure-flags '("--sysconfdir=/etc")
3434 #:make-flags (list (string-append "sysconfdir="
3435 (assoc-ref %outputs "out")
3436 "/etc"))
3437
3438 #:tests? #f)) ; no 'check' target
3439 (synopsis "Detect motion from video signals")
3440 (description
3441 "Motion is a program that monitors the video signal from one or more
3442 cameras and is able to detect if a significant part of the picture has
3443 changed. Or in other words, it can detect motion.")
3444
3445 ;; Some files say "version 2" and others "version 2 or later".
3446 (license license:gpl2)))
3447
3448 (define-public subdl
3449 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3450 (revision "1"))
3451 (package
3452 (name "subdl")
3453 (version (git-version "1.0.3" revision commit))
3454 (source (origin
3455 (method git-fetch)
3456 (uri (git-reference
3457 (url "https://github.com/alexanderwink/subdl.git")
3458 (commit commit)))
3459 (file-name (git-file-name name version))
3460 (sha256
3461 (base32
3462 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3463 (build-system trivial-build-system)
3464 (arguments
3465 `(#:modules ((guix build utils))
3466 #:builder (begin
3467 (use-modules (guix build utils))
3468 (let* ((out (assoc-ref %outputs "out"))
3469 (bin (string-append out "/bin"))
3470 (source (assoc-ref %build-inputs "source"))
3471 (python (assoc-ref %build-inputs "python")))
3472 (install-file (string-append source "/subdl") bin)
3473 (patch-shebang (string-append bin "/subdl")
3474 (list (string-append python "/bin")))))))
3475 (inputs `(("python" ,python)))
3476 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3477 (description "Subdl is a command-line tool for downloading subtitles from
3478 opensubtitles.org. By default, it will search for English subtitles, display
3479 the results, download the highest-rated result in the requested language and
3480 save it to the appropriate filename.")
3481 (license license:gpl3+)
3482 (home-page "https://github.com/alexanderwink/subdl"))))
3483
3484 (define-public l-smash
3485 (package
3486 (name "l-smash")
3487 (version "2.14.5")
3488 (source (origin
3489 (method git-fetch)
3490 (uri (git-reference
3491 (url "https://github.com/l-smash/l-smash.git")
3492 (commit (string-append "v" version))))
3493 (file-name (git-file-name name version))
3494 (sha256
3495 (base32
3496 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3497 (build-system gnu-build-system)
3498 (arguments
3499 `(#:tests? #f ;no tests
3500 #:make-flags
3501 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3502 (assoc-ref %outputs "out") "/lib"))
3503 #:phases
3504 (modify-phases %standard-phases
3505 ;; configure fails if it is followed by CONFIG_SHELL
3506 (replace 'configure
3507 (lambda* (#:key outputs #:allow-other-keys)
3508 (let ((out (assoc-ref outputs "out")))
3509 (invoke "./configure" (string-append "--prefix=" out)
3510 "--disable-static")))))))
3511 (native-inputs
3512 `(("which" ,which)))
3513 (home-page "https://l-smash.github.io/l-smash/")
3514 (synopsis "MP4 multiplexer and demultiplexer library")
3515 (description
3516 "L-SMASH is a cross-platform library that handles the ISO base media file
3517 format and some of its derived file formats, including MP4. It operates as a
3518 multiplexer and demultiplexer, and can mux video and audio in several formats
3519 using standalone executable files.")
3520 (license license:isc)))
3521
3522 (define-public qtfaststart
3523 (package
3524 (name "qtfaststart")
3525 (version "1.8")
3526 (source (origin
3527 (method url-fetch)
3528 (uri (pypi-uri "qtfaststart" version))
3529 (sha256
3530 (base32
3531 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3532 (build-system python-build-system)
3533 (arguments
3534 '(#:tests? #f)) ; no test suite
3535 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3536 (description "qtfaststart enables streaming and pseudo-streaming of
3537 QuickTime and MP4 files by moving metadata and offset information to the
3538 beginning of the file. It can also print some useful information about the
3539 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3540 project, which is released into the public domain, as well as ISO 14496-12:2005
3541 (the official spec for MP4), which can be obtained from the ISO or found
3542 online.")
3543 (home-page "https://github.com/danielgtaylor/qtfaststart")
3544 (license license:expat)))
3545
3546 (define-public vidstab
3547 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3548 (revision "0"))
3549 (package
3550 (name "vidstab")
3551 (version (git-version "1.1.0" revision commit))
3552 (source (origin
3553 (method git-fetch)
3554 (uri (git-reference
3555 (url "https://github.com/georgmartius/vid.stab.git")
3556 (commit commit)))
3557 (file-name (git-file-name name version))
3558 (sha256
3559 (base32
3560 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3561 (build-system cmake-build-system)
3562 (arguments
3563 '(#:tests? #f)) ; tests are not run as part of standard build process
3564 (home-page "http://public.hronopik.de/vid.stab/")
3565 (synopsis "Video stabilization library")
3566 (description "Vidstab is a video stabilization library which can be used
3567 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3568 vehicle typically suffers from undesirable shakes and jitters. Activities such
3569 as surfing, skiing, riding and walking while shooting videos are especially
3570 prone to erratic camera shakes. Vidstab targets these video contents to help
3571 create smoother and stable videos.")
3572 (license license:gpl2+))))
3573
3574 (define-public libopenshot
3575 (package
3576 (name "libopenshot")
3577 (version "0.2.5")
3578 (source (origin
3579 (method git-fetch)
3580 (uri (git-reference
3581 (url "https://github.com/OpenShot/libopenshot")
3582 (commit (string-append "v" version))))
3583 (file-name (git-file-name name version))
3584 (sha256
3585 (base32
3586 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
3587 (modules '((guix build utils)))
3588 (snippet '(begin
3589 ;; Allow overriding of the python installation dir
3590 (substitute* "src/bindings/python/CMakeLists.txt"
3591 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3592 (string-append set " CACHE PATH "
3593 "\"Python bindings directory\")")))
3594 (delete-file-recursively "thirdparty")
3595 #t))))
3596 (build-system cmake-build-system)
3597 (native-inputs
3598 `(("pkg-config" ,pkg-config)
3599 ("python" ,python)
3600 ("swig" ,swig)
3601 ("unittest++" ,unittest-cpp)))
3602 (propagated-inputs ;all referenced in installed headers
3603 `(("cppzmq" ,cppzmq)
3604 ("ffmpeg" ,ffmpeg)
3605 ("imagemagick" ,imagemagick)
3606 ("jsoncpp" ,jsoncpp)
3607 ("libopenshot-audio" ,libopenshot-audio)
3608 ("qtbase" ,qtbase)
3609 ("qtmultimedia" ,qtmultimedia)
3610 ("zeromq" ,zeromq)))
3611 (arguments
3612 `(#:configure-flags
3613 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3614 ,(version-major+minor (package-version python))
3615 "/site-packages")
3616 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3617 #:phases
3618 (modify-phases %standard-phases
3619 (add-before 'configure 'set-vars
3620 (lambda* (#:key inputs #:allow-other-keys)
3621 (setenv "LIBOPENSHOT_AUDIO_DIR"
3622 (assoc-ref inputs "libopenshot-audio"))
3623 (setenv "ZMQDIR"
3624 (assoc-ref inputs "zeromq"))
3625 (setenv "UNITTEST_DIR"
3626 (string-append (assoc-ref inputs "unittest++")
3627 "/include/UnitTest++"))
3628 #t)))))
3629 (home-page "https://openshot.org")
3630 (synopsis "Video-editing, animation, and playback library")
3631 (description "OpenShot Library (libopenshot) is a powerful C++ video
3632 editing library with a multi-threaded and feature rich video editing
3633 API. It includes bindings for Python, Ruby, and other languages.")
3634 (license license:lgpl3+)))
3635
3636 (define-public openshot
3637 (package
3638 (name "openshot")
3639 (version "2.5.1")
3640 (source (origin
3641 (method git-fetch)
3642 (uri (git-reference
3643 (url "https://github.com/OpenShot/openshot-qt")
3644 (commit (string-append "v" version))))
3645 (file-name (git-file-name name version))
3646 (sha256
3647 (base32
3648 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
3649 (modules '((guix build utils)))
3650 (snippet
3651 '(begin
3652 ;; TODO: Unbundle jquery and others from src/timeline/media
3653 (delete-file-recursively "src/images/fonts") #t))))
3654 (build-system python-build-system)
3655 (inputs
3656 `(("ffmpeg" ,ffmpeg)
3657 ("font-ubuntu" ,font-ubuntu)
3658 ("libopenshot" ,libopenshot)
3659 ("python" ,python)
3660 ("python-pyqt" ,python-pyqt)
3661 ("python-pyzmq" ,python-pyzmq)
3662 ("python-requests" ,python-requests)
3663 ("qtsvg" ,qtsvg)))
3664 (arguments
3665 `(#:modules ((guix build python-build-system)
3666 (guix build qt-utils)
3667 (guix build utils))
3668 #:imported-modules (,@%python-build-system-modules
3669 (guix build qt-utils))
3670 #:phases (modify-phases %standard-phases
3671 (delete 'build) ;install phase does all the work
3672 (replace 'check
3673 (lambda _
3674 (setenv "QT_QPA_PLATFORM" "offscreen")
3675 (invoke "python" "src/tests/query_tests.py")))
3676 (add-after 'unpack 'patch-font-location
3677 (lambda* (#:key inputs #:allow-other-keys)
3678 (let ((font (assoc-ref inputs "font-ubuntu")))
3679 (substitute* "src/classes/app.py"
3680 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3681 (("fonts") "share/fonts/truetype")))
3682 #t))
3683 (add-before 'install 'set-tmp-home
3684 (lambda _
3685 ;; src/classes/info.py "needs" to create several
3686 ;; directories in $HOME when loaded during build
3687 (setenv "HOME" "/tmp")
3688 #t))
3689 (add-after 'install 'wrap-program
3690 (lambda* (#:key outputs #:allow-other-keys)
3691 (let ((out (assoc-ref outputs "out")))
3692 (wrap-qt-program out "openshot-qt"))
3693 #t)))))
3694 (home-page "https://www.openshot.org/")
3695 (synopsis "Video editor")
3696 (description "OpenShot takes your videos, photos, and music files and
3697 helps you create the film you have always dreamed of. Easily add sub-titles,
3698 transitions, and effects and then export your film to many common formats.")
3699 (license license:gpl3+)))
3700
3701 (define-public dav1d
3702 (package
3703 (name "dav1d")
3704 (version "0.7.0")
3705 (source
3706 (origin
3707 (method url-fetch)
3708 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3709 "/dav1d/" version "/dav1d-" version ".tar.xz"))
3710 (sha256
3711 (base32
3712 "0xcykraf42gkymzqx1k1lcdclgk9y5yf7rr56vslrgmr0r849qnk"))))
3713 (build-system meson-build-system)
3714 (native-inputs `(("nasm" ,nasm)))
3715 (home-page "https://code.videolan.org/videolan/dav1d")
3716 (synopsis "AV1 decoder")
3717 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3718 speed and correctness.")
3719 (license license:bsd-2)))
3720
3721 (define-public wlstream
3722 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3723 (revision "1"))
3724 (package
3725 (name "wlstream")
3726 (version (git-version "0.0" revision commit))
3727 (source
3728 (origin
3729 (method git-fetch)
3730 (uri (git-reference
3731 (url "https://github.com/atomnuker/wlstream.git")
3732 (commit commit)))
3733 (file-name (git-file-name name version))
3734 (sha256
3735 (base32
3736 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3737 (build-system meson-build-system)
3738 (native-inputs `(("libdrm" ,libdrm)
3739 ("pkg-config" ,pkg-config)))
3740 (inputs `(("ffmpeg" ,ffmpeg)
3741 ("pulseaudio" ,pulseaudio)
3742 ("wayland" ,wayland)
3743 ("wayland-protocols" ,wayland-protocols)))
3744 (home-page "https://github.com/atomnuker/wlstream")
3745 (synopsis "Screen capture tool for Wayland sessions")
3746 (description "Wlstream is a screen capture tool for recording audio and
3747 video from a Wayland session.")
3748 (license license:lgpl2.1+))))
3749
3750 (define-public gaupol
3751 (package
3752 (name "gaupol")
3753 (version "1.7")
3754 (source (origin
3755 (method git-fetch)
3756 (uri (git-reference
3757 (url "https://github.com/otsaloma/gaupol/")
3758 (commit version)))
3759 (file-name (git-file-name name version))
3760 (sha256
3761 (base32
3762 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
3763 (build-system python-build-system)
3764 (native-inputs
3765 `(("gettext" ,gettext-minimal)
3766 ("pkg-config" ,pkg-config)))
3767 (inputs
3768 `(("python-pygobject" ,python-pygobject)
3769 ("gtk+" ,gtk+)
3770 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3771 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3772 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3773 ("iso-codes" ,iso-codes) ; Optional: Translations.
3774 ("gstreamer" ,gstreamer)
3775 ("gst-libav" ,gst-libav)
3776 ("gst-plugins-base" ,gst-plugins-base)
3777 ("gst-plugins-good" ,gst-plugins-good)
3778 ("gst-plugins-bad" ,gst-plugins-bad)
3779 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3780 (arguments
3781 `(#:tests? #f ; Tests seem to require networking.
3782 #:phases
3783 (modify-phases %standard-phases
3784 ;; gaupol's setup.py script does not support one of the Python build
3785 ;; system's default flags, "--single-version-externally-managed".
3786 (replace 'install
3787 (lambda* (#:key outputs #:allow-other-keys)
3788 (invoke "python" "setup.py" "install"
3789 (string-append "--prefix=" (assoc-ref outputs "out"))
3790 "--root=/")))
3791 (add-after 'install 'wrap-gaupol
3792 (lambda* (#:key outputs #:allow-other-keys)
3793 (let ((out (assoc-ref outputs "out"))
3794 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3795 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3796 (wrap-program (string-append out "/bin/gaupol")
3797 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3798 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3799 #t))
3800 (add-after 'unpack 'patch-data-dir
3801 ;; Fix some path variables that setup.py seems to garble.
3802 (lambda* (#:key outputs #:allow-other-keys)
3803 (let ((out (assoc-ref outputs "out")))
3804 (substitute* "setup.py"
3805 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3806 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3807 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3808 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3809 #t))))))
3810 (synopsis "Editor for text-based subtitles")
3811 (description
3812 "Gaupol supports multiple subtitle file formats and provides means of
3813 creating subtitles, editing texts and timing subtitles to match video. The
3814 user interface features a builtin video player and is designed with attention
3815 to convenience of translating and batch processing of multiple documents.")
3816 (home-page "https://otsaloma.io/gaupol/")
3817 (license license:gpl3+)))
3818
3819 (define-public theorafile
3820 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
3821 (package
3822 (name "theorafile")
3823 (version (git-version "0.0.0" "1" commit))
3824 (source
3825 (origin
3826 (method git-fetch)
3827 (uri (git-reference
3828 (url "https://github.com/FNA-XNA/Theorafile.git")
3829 (commit commit)))
3830 (file-name (git-file-name name version))
3831 (sha256
3832 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
3833 (build-system gnu-build-system)
3834 (arguments
3835 '(#:make-flags '("CC=gcc")
3836 #:phases
3837 (modify-phases %standard-phases
3838 (delete 'configure)
3839 (replace 'check
3840 (lambda _
3841 (setenv "CC" "gcc")
3842 (invoke "make" "test")))
3843 (replace 'install
3844 (lambda* (#:key outputs #:allow-other-keys)
3845 (let ((out (assoc-ref outputs "out")))
3846 (install-file "libtheorafile.so" (string-append out "/lib"))
3847 (install-file "theorafile.h" (string-append out "/include")))
3848 #t)))))
3849 (native-inputs
3850 ;; For tests.
3851 `(("sdl2" ,sdl2)))
3852 (home-page "https://github.com/FNA-XNA/Theorafile")
3853 (synopsis "Ogg Theora Video Decoder Library")
3854 (description "Theorafile is a library for quickly and easily decoding Ogg
3855 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
3856 (license license:zlib))))
3857
3858 (define-public dvdbackup
3859 (package
3860 (name "dvdbackup")
3861 (version "0.4.2")
3862 (source
3863 (origin
3864 (method url-fetch)
3865 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
3866 "dvdbackup-" version "/"
3867 "dvdbackup-" version ".tar.xz"))
3868 (sha256
3869 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
3870 (build-system gnu-build-system)
3871 (inputs
3872 `(("libdvdcss" ,libdvdcss)
3873 ("libdvdread" ,libdvdread)))
3874 (home-page "http://dvdbackup.sourceforge.net")
3875 (synopsis "DVD video ripper")
3876 (description
3877 "A simple command line tool to backup video from a DVD. Decrypts the
3878 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
3879 transcode or reformat the videos in any way, producing perfect backups.")
3880 (license license:gpl3+)))
3881
3882 (define-public svt-av1
3883 (package
3884 (name "svt-av1")
3885 (version "0.8.3")
3886 (source (origin
3887 (method git-fetch)
3888 (uri (git-reference
3889 (url "https://github.com/OpenVisualCloud/SVT-AV1.git")
3890 (commit (string-append "v" version))))
3891 (file-name (git-file-name name version))
3892 (sha256
3893 (base32
3894 "1rh4sz1bmrsxyxfxajsffw5jd17djcrymhwsi877v02fgln027qr"))))
3895 (build-system cmake-build-system)
3896 ;; SVT-AV1 only supports Intel-compatible CPUs.
3897 (supported-systems '("x86_64-linux" "i686-linux"))
3898 (arguments
3899 ;; The test suite tries to download test data and git clone a 3rd-party
3900 ;; fork of libaom. Skip it.
3901 `(#:tests? #f
3902 #:phases
3903 (modify-phases %standard-phases
3904 (add-after 'install 'install-documentation
3905 (lambda* (#:key outputs #:allow-other-keys)
3906 (let* ((out (assoc-ref %outputs "out"))
3907 (doc (string-append out "/share/doc/svt-av1-" ,version)))
3908 (copy-recursively "../source/Docs" doc)
3909 #t))))))
3910 (native-inputs
3911 `(("yasm" ,yasm)))
3912 (synopsis "AV1 video codec")
3913 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
3914 work-in-progress, aiming to support video-on-demand and live streaming
3915 applications. It only supports Intel-compatible CPUs (x86).")
3916 (home-page "https://github.com/OpenVisualCloud/SVT-AV1")
3917 (license license:bsd-2)))
3918
3919 (define-public w-scan
3920 (package
3921 (name "w-scan")
3922 (version "20170107")
3923 (source
3924 (origin
3925 (method url-fetch)
3926 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
3927 version ".tar.bz2"))
3928 (sha256
3929 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
3930 (build-system gnu-build-system)
3931 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
3932 (description
3933 "This is a small command line utility used to perform frequency scans for
3934 DVB and ATSC transmissions without initial tuning data. It can print the
3935 result in several formats:
3936 @itemize
3937 @item VDR channels.conf,
3938 @item czap/tzap/xine/mplayer channels.conf,
3939 @item Gstreamer dvbsrc plugin,
3940 @item VLC xspf playlist,
3941 @item XML,
3942 @item initial tuning data for scan or dvbv5-scan.
3943 @end itemize\n")
3944 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
3945 (license license:gpl2+)))
3946
3947 (define-public rav1e
3948 (package
3949 (name "rav1e")
3950 (version "0.3.0")
3951 (source
3952 (origin
3953 (method url-fetch)
3954 (uri (crate-uri "rav1e" version))
3955 (file-name
3956 (string-append name "-" version ".tar.gz"))
3957 (sha256
3958 (base32
3959 "1bsmj8kqzs5pf8dl98rsl6a67cljj1gkj3b5hmd8hn8wdy4ya173"))))
3960 (build-system cargo-build-system)
3961 (arguments
3962 `(#:cargo-inputs
3963 (("rust-simd-helpers" ,rust-simd-helpers-0.1)
3964 ("rust-ivf" ,rust-ivf-0.1)
3965 ("rust-cfg-if" ,rust-cfg-if-0.1)
3966 ("rust-paste" ,rust-paste-0.1)
3967 ("rust-signal-hook" ,rust-signal-hook-0.1)
3968 ("rust-aom-sys" ,rust-aom-sys-0.1)
3969 ("rust-nasm-rs" ,rust-nasm-rs-0.1)
3970 ("rust-arbitrary" ,rust-arbitrary-0.2)
3971 ("rust-better-panic" ,rust-better-panic-0.2)
3972 ("rust-noop-proc-macro"
3973 ,rust-noop-proc-macro-0.2)
3974 ("rust-num-traits" ,rust-num-traits-0.2)
3975 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
3976 ("rust-err-derive" ,rust-err-derive-0.2)
3977 ("rust-interpolate-name"
3978 ,rust-interpolate-name-0.2)
3979 ("rust-rustc-version" ,rust-rustc-version-0.2)
3980 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
3981 ("rust-libc" ,rust-libc-0.2)
3982 ("rust-image" ,rust-image-0.22)
3983 ("rust-arg-enum-proc-macro"
3984 ,rust-arg-enum-proc-macro-0.3)
3985 ("rust-num-derive" ,rust-num-derive-0.3)
3986 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
3987 ("rust-backtrace" ,rust-backtrace-0.3)
3988 ("rust-log" ,rust-log-0.4)
3989 ("rust-y4m" ,rust-y4m-0.5)
3990 ("rust-arrayvec" ,rust-arrayvec-0.5)
3991 ("rust-toml" ,rust-toml-0.5)
3992 ("rust-fern" ,rust-fern-0.5)
3993 ("rust-rust-hawktracer"
3994 ,rust-rust-hawktracer-0.7)
3995 ("rust-rand" ,rust-rand-0.7)
3996 ("rust-itertools" ,rust-itertools-0.8)
3997 ("rust-bitstream-io" ,rust-bitstream-io-0.8)
3998 ("rust-console" ,rust-console-0.9)
3999 ("rust-serde" ,rust-serde-1.0)
4000 ("rust-cc" ,rust-cc-1.0)
4001 ("rust-rayon" ,rust-rayon-1.3)
4002 ("rust-byteorder" ,rust-byteorder-1.3)
4003 ("rust-clap" ,rust-clap-2)
4004 ("rust-vergen" ,rust-vergen-3.1))
4005 #:cargo-development-inputs
4006 (("rust-rand-chacha" ,rust-rand-chacha-0.2)
4007 ("rust-interpolate-name"
4008 ,rust-interpolate-name-0.2)
4009 ("rust-criterion" ,rust-criterion-0.3)
4010 ("rust-pretty-assertions"
4011 ,rust-pretty-assertions-0.6)
4012 ("rust-rand" ,rust-rand-0.7)
4013 ("rust-semver" ,rust-semver-0.9))
4014 #:phases
4015 (modify-phases %standard-phases
4016 (replace 'build
4017 (lambda* (#:key outputs #:allow-other-keys)
4018 (let ((out (assoc-ref outputs "out")))
4019 (invoke "cargo" "cinstall" "--release"
4020 (string-append "--prefix=" out))))))))
4021 (native-inputs
4022 `(("cargo-c" ,rust-cargo-c)))
4023 (inputs
4024 `(("nasm" ,nasm)))
4025 (home-page "https://github.com/xiph/rav1e/")
4026 (synopsis "The fastest and safest AV1 encoder")
4027 (description
4028 "The fastest and safest AV1 encoder.")
4029 (license license:bsd-2)))
4030
4031 (define-public peek
4032 (package
4033 (name "peek")
4034 (version "1.5.1")
4035 (source
4036 (origin
4037 (method git-fetch)
4038 (uri (git-reference
4039 (url "https://github.com/phw/peek.git")
4040 (commit version)))
4041 (file-name (git-file-name name version))
4042 (sha256
4043 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4044 (build-system meson-build-system)
4045 (arguments '(#:glib-or-gtk? #t))
4046 (inputs
4047 `(("gtk+" ,gtk+)))
4048 (native-inputs
4049 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4050 ("gettext" ,gettext-minimal)
4051 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4052 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4053 ("pkg-config" ,pkg-config)
4054 ("vala" ,vala)))
4055 (home-page "https://github.com/phw/peek")
4056 (synopsis "Simple animated GIF screen recorder")
4057 (description
4058 "Peek makes it easy to create short screencasts of a screen area. It was
4059 built for the specific use case of recording screen areas, e.g. for easily
4060 showing UI features of your own apps or for showing a bug in bug reports.
4061 With Peek, you simply place the Peek window over the area you want to record
4062 and press \"Record\". Peek is optimized for generating animated GIFs, but you
4063 can also directly record to WebM or MP4 if you prefer.")
4064 (license license:gpl3+)))
4065
4066 (define-public wf-recorder
4067 (package
4068 (name "wf-recorder")
4069 (version "0.2.1")
4070 (source (origin
4071 (method git-fetch)
4072 (uri (git-reference
4073 (url "https://github.com/ammen99/wf-recorder.git")
4074 (commit (string-append "v" version))))
4075 (file-name (git-file-name name version))
4076 (sha256
4077 (base32
4078 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4079 (build-system meson-build-system)
4080 (native-inputs
4081 `(("pkg-config" ,pkg-config)))
4082 (inputs
4083 `(("ffmpeg" ,ffmpeg)
4084 ("pulseaudio" ,pulseaudio)
4085 ("wayland" ,wayland)
4086 ("wayland-protocols" ,wayland-protocols)
4087 ("libx264" ,libx264)))
4088 (home-page "https://github.com/ammen99/wf-recorder")
4089 (synopsis "Screen recorder for wlroots-based compositors")
4090 (description
4091 "@code{wf-recorder} is a utility program for screen recording of
4092 wlroots-based compositors. More specifically, those that support
4093 @code{wlr-screencopy-v1} and @code{xdg-output}.")
4094 (license license:expat)))