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