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