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