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