gnu: yt-dlp: Remove trailing #t.
[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, 2020 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, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 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, 2017 Nikita <nikita@n0.is>
14 ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
15 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
16 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
17 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
19 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
20 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
21 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
22 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
23 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
24 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
25 ;;; Copyright © 2018-2022 Marius Bakke <marius@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
27 ;;; Copyright © 2018, 2019, 2020, 2022 Leo Famulari <leo@famulari.name>
28 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
29 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
30 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
31 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
32 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
33 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
34 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
35 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
36 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
37 ;;; Copyright © 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
38 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
39 ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
40 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
41 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
42 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
43 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
44 ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
45 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
46 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
47 ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
48 ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
49 ;;; Copyright © 2021 Alexey Abramov <levenson@mmer.org>
50 ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
51 ;;; Copyright © 2021 David Wilson <david@daviwil.com>
52 ;;; Copyright © 2021,2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
53 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
54 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
55 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
56 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
57 ;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
58 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
59 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
60 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
61 ;;; Copyright © 2022 Bird <birdsite@airmail.cc>
62 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
63 ;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
64 ;;;
65 ;;; This file is part of GNU Guix.
66 ;;;
67 ;;; GNU Guix is free software; you can redistribute it and/or modify it
68 ;;; under the terms of the GNU General Public License as published by
69 ;;; the Free Software Foundation; either version 3 of the License, or (at
70 ;;; your option) any later version.
71 ;;;
72 ;;; GNU Guix is distributed in the hope that it will be useful, but
73 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
74 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 ;;; GNU General Public License for more details.
76 ;;;
77 ;;; You should have received a copy of the GNU General Public License
78 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
79
80 (define-module (gnu packages video)
81 #:use-module (ice-9 match)
82 #:use-module ((srfi srfi-1) #:hide (zip))
83 #:use-module (srfi srfi-26)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (guix utils)
86 #:use-module (guix packages)
87 #:use-module (guix download)
88 #:use-module (guix gexp)
89 #:use-module (guix git-download)
90 #:use-module (guix svn-download)
91 #:use-module (guix hg-download)
92 #:use-module (guix build-system cargo)
93 #:use-module (guix build-system cmake)
94 #:use-module (guix build-system copy)
95 #:use-module (guix build-system gnu)
96 #:use-module (guix build-system glib-or-gtk)
97 #:use-module (guix build-system meson)
98 #:use-module (guix build-system perl)
99 #:use-module (guix build-system python)
100 #:use-module (guix build-system qt)
101 #:use-module (guix build-system waf)
102 #:use-module (guix build-system trivial)
103 #:use-module (gnu packages)
104 #:use-module (gnu packages algebra)
105 #:use-module (gnu packages assembly)
106 #:use-module (gnu packages audio)
107 #:use-module (gnu packages autotools)
108 #:use-module (gnu packages avahi)
109 #:use-module (gnu packages backup)
110 #:use-module (gnu packages base)
111 #:use-module (gnu packages bash)
112 #:use-module (gnu packages bison)
113 #:use-module (gnu packages boost)
114 #:use-module (gnu packages build-tools)
115 #:use-module (gnu packages cdrom)
116 #:use-module (gnu packages check)
117 #:use-module (gnu packages cmake)
118 #:use-module (gnu packages compression)
119 #:use-module (gnu packages cpp)
120 #:use-module (gnu packages crates-io)
121 #:use-module (gnu packages crates-graphics)
122 #:use-module (gnu packages curl)
123 #:use-module (gnu packages dejagnu)
124 #:use-module (gnu packages dns)
125 #:use-module (gnu packages docbook)
126 #:use-module (gnu packages documentation)
127 #:use-module (gnu packages elf)
128 #:use-module (gnu packages file)
129 #:use-module (gnu packages flex)
130 #:use-module (gnu packages fonts)
131 #:use-module (gnu packages fontutils)
132 #:use-module (gnu packages freedesktop)
133 #:use-module (gnu packages fribidi)
134 #:use-module (gnu packages gettext)
135 #:use-module (gnu packages ghostscript)
136 #:use-module (gnu packages gl)
137 #:use-module (gnu packages glib)
138 #:use-module (gnu packages guile)
139 #:use-module (gnu packages gnome)
140 #:use-module (gnu packages gnunet)
141 #:use-module (gnu packages gnupg)
142 #:use-module (gnu packages gstreamer)
143 #:use-module (gnu packages gtk)
144 #:use-module (gnu packages image)
145 #:use-module (gnu packages imagemagick)
146 #:use-module (gnu packages iso-codes)
147 #:use-module (gnu packages libidn)
148 #:use-module (gnu packages libreoffice)
149 #:use-module (gnu packages libusb)
150 #:use-module (gnu packages linux)
151 #:use-module (gnu packages llvm)
152 #:use-module (gnu packages lua)
153 #:use-module (gnu packages m4)
154 #:use-module (gnu packages man)
155 #:use-module (gnu packages markup)
156 #:use-module (gnu packages maths)
157 #:use-module (gnu packages music)
158 #:use-module (gnu packages mp3)
159 #:use-module (gnu packages ncurses)
160 #:use-module (gnu packages networking)
161 #:use-module (gnu packages ocr)
162 #:use-module (gnu packages pcre)
163 #:use-module (gnu packages perl)
164 #:use-module (gnu packages perl-check)
165 #:use-module (gnu packages perl-web)
166 #:use-module (gnu packages photo)
167 #:use-module (gnu packages pkg-config)
168 #:use-module (gnu packages popt)
169 #:use-module (gnu packages pretty-print)
170 #:use-module (gnu packages protobuf)
171 #:use-module (gnu packages pulseaudio)
172 #:use-module (gnu packages python)
173 #:use-module (gnu packages python-crypto)
174 #:use-module (gnu packages python-web)
175 #:use-module (gnu packages python-xyz)
176 #:use-module (gnu packages qt)
177 #:use-module (gnu packages rdesktop)
178 #:use-module (gnu packages re2c)
179 #:use-module (gnu packages ruby)
180 #:use-module (gnu packages rust-apps)
181 #:use-module (gnu packages samba)
182 #:use-module (gnu packages sdl)
183 #:use-module (gnu packages serialization)
184 #:use-module (gnu packages shells)
185 #:use-module (gnu packages sqlite)
186 #:use-module (gnu packages ssh)
187 #:use-module (gnu packages swig)
188 #:use-module (gnu packages texinfo)
189 #:use-module (gnu packages textutils)
190 #:use-module (gnu packages tls)
191 #:use-module (gnu packages time)
192 #:use-module (gnu packages upnp)
193 #:use-module (gnu packages vulkan)
194 #:use-module (gnu packages web)
195 #:use-module (gnu packages webkit)
196 #:use-module (gnu packages wget)
197 #:use-module (gnu packages wxwidgets)
198 #:use-module (gnu packages xdisorg)
199 #:use-module (gnu packages xiph)
200 #:use-module (gnu packages xml)
201 #:use-module (gnu packages xorg))
202
203 (define-public transcode
204 (package
205 (name "transcode")
206 (version "1.1.7")
207 (source
208 (origin
209 (method url-fetch)
210 (uri
211 (string-append "https://sources.archlinux.org/other/community/"
212 name "/" name "-" version ".tar.bz2"))
213 (sha256
214 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
215 (patches
216 (search-patches "transcode-ffmpeg.patch"))))
217 (build-system gnu-build-system)
218 (arguments
219 `(#:configure-flags
220 (list
221 "CFLAGS=-O2 -g -fcommon"
222 ;; XXX: Broken API.
223 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
224 ;; "--enable-libv4l2"
225 "--enable-libmpeg2"
226 "--enable-libmpeg2convert"
227 ;; XXX: Broken API.
228 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
229 ;; "--enable-v4l"
230 ;;; XXX: Not available.
231 ;"--enable-bktr"
232 ;"--enable-sunau"
233 "--enable-oss"
234 "--enable-alsa"
235 ;;; XXX: Not available.
236 ;"--enable-libpostproc"
237 "--enable-freetype2"
238 "--enable-xvid"
239 "--enable-x264"
240 "--enable-ogg"
241 "--enable-vorbis"
242 "--enable-theora"
243 ;;; XXX: Not available.
244 ;"--enable-pvm3"
245 "--enable-libdv"
246 "--enable-libquicktime"
247 "--enable-lzo"
248 "--enable-a52"
249 "--enable-faac"
250 "--enable-libxml2"
251 ;;; XXX: Not available.
252 ;"--enable-ibp"
253 ;;"--enable-mjpegtools"
254 "--enable-sdl"
255 "--enable-imagemagick"
256 ;;; XXX: Not available.
257 ;"--enable-libjpegmmx"
258 "--enable-libjpeg")))
259 ;;; XXX: Not available.
260 ;"--enable-bsdav"
261 ;"--enable-pv3"
262 ;"--enable-nuv"
263 (native-inputs
264 (list autoconf
265 automake
266 libtool
267 libxml2
268 perl
269 pkg-config
270 python-wrapper))
271 (inputs
272 (list alsa-lib
273 faac
274 ffmpeg
275 freetype
276 imagemagick
277 lame
278 liba52
279 libdv
280 libdvdread
281 libjpeg-turbo
282 libmpeg2
283 libogg
284 libquicktime
285 libtheora
286 libvorbis
287 lzo
288 mjpegtools
289 sdl
290 ;; ("v4l-utils" ,v4l-utils)
291 libx11
292 libx264
293 libxaw
294 libxext
295 libxpm
296 libxv
297 xvid
298 zlib))
299 (synopsis "Audio/Video Transcoder")
300 (description "Transcode is a fast, versatile and command-line based
301 audio/video everything to everything converter primarily focused on producing
302 AVI video files with MP3 audio, but also including a program to read all the
303 video and audio streams from a DVD.")
304 (home-page
305 "http://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
306 (license license:gpl2+)))
307
308 (define-public svt-hevc
309 (package
310 (name "svt-hevc")
311 (version "1.5.1")
312 (source
313 (origin
314 (method git-fetch)
315 (uri
316 (git-reference
317 (url "https://github.com/OpenVisualCloud/SVT-HEVC")
318 (commit (string-append "v" version))))
319 (file-name (git-file-name name version))
320 (sha256
321 (base32 "1cv6vcf5yxcwdvj5yqcckbixqrvvdxk7ibincnnv80pz6wh527sv"))))
322 (build-system cmake-build-system)
323 (arguments
324 `(#:tests? #f)) ; Test script is stand-alone
325 (native-inputs
326 (list yasm))
327 (synopsis "SVT HEVC encoder")
328 (description "Scalable Video Technology (SVT) is a software-based video
329 coding technology that is highly optimized for Intel's Xeon processors. Using
330 the SVT-HEVC encoder, it is possible to spread video encoding processing across
331 multiple Intel's Xeon processors to achieve a real advantage of processing
332 efficiency.")
333 (home-page "https://01.org/svt")
334 (license (license:non-copyleft "file:///LICENSE.md"))))
335
336 (define-public mediasdk
337 (package
338 (name "mediasdk")
339 (version "20.1.1")
340 (source
341 (origin
342 (method git-fetch)
343 (uri
344 (git-reference
345 (url "https://github.com/Intel-Media-SDK/MediaSDK")
346 (commit (string-append "intel-" name "-" version))))
347 (file-name (git-file-name name version))
348 (sha256
349 (base32 "0blwcxr5j8762nylx2cxrq0h53bpgnk859dbs6crq4wr9fcxlx9z"))))
350 (build-system cmake-build-system)
351 (arguments
352 `(#:configure-flags
353 (list
354 "-DENABLE_X11=ON"
355 "-DENABLE_X11_DRI3=ON"
356 "-DENABLE_WAYLAND=ON"
357 "-DENABLE_TEXTLOG=ON"
358 "-DENABLE_STAT=ON"
359 "-DBUILD_TESTS=ON"
360 "-DBUILD_TOOLS=ON"
361 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
362 (assoc-ref %outputs "out") "/lib"))))
363 (native-inputs
364 `(("pkg-config" ,pkg-config)
365 ("python" ,python-wrapper)))
366 (inputs
367 `(("libdrm" ,libdrm)
368 ("libva" ,libva)
369 ("pciaccess" ,libpciaccess)
370 ("wayland" ,wayland)
371 ("x11" ,libx11)))
372 (synopsis "Intel Media SDK")
373 (description "MediaSDK provides a plain C API to access hardware-accelerated
374 video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
375 (home-page "http://mediasdk.intel.com/")
376 (license (license:non-copyleft "file:///LICENSE"))))
377
378 (define-public schroedinger
379 (package
380 (name "schroedinger")
381 (version "1.0.11")
382 (source
383 (origin
384 (method url-fetch)
385 (uri
386 (string-append "https://launchpad.net/" name "/trunk/" version
387 "/+download/" name "-" version ".tar.gz"))
388 (sha256
389 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
390 (build-system gnu-build-system)
391 (outputs '("out" "doc"))
392 (arguments
393 `(#:phases
394 (modify-phases %standard-phases
395 (add-after 'install 'move-docs
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let* ((out (assoc-ref outputs "out"))
398 (doc (assoc-ref outputs "doc")))
399 (mkdir-p (string-append doc "/share"))
400 (rename-file
401 (string-append out "/share/gtk-doc")
402 (string-append doc "/share/gtk-doc"))
403 #t))))))
404 (native-inputs
405 (list dash gtk-doc/stable pkg-config))
406 (inputs
407 `(("glew" ,glew)
408 ("opengl" ,mesa)))
409 (propagated-inputs
410 (list orc))
411 (synopsis "Dirac video codec")
412 (description "Schroedinger is a project implementing the Dirac video codec in
413 ANSI C code. It is meant to be highly optimized and portable. It is developed
414 as a joint effort between the BBC and Fluendo.")
415 (home-page "https://launchpad.net/schroedinger")
416 (license
417 ;; This library is licensed under 4 different licenses,
418 ;; and you can choose to use it under the terms of any one of them.
419 (list
420 license:gpl2+
421 license:lgpl2.0+
422 license:expat
423 license:mpl1.1))))
424
425 (define-public libquicktime
426 (package
427 (name "libquicktime")
428 (version "1.2.4")
429 (source
430 (origin
431 (method url-fetch)
432 (uri
433 (string-append "https://sourceforge.net/projects/" name "/files/"
434 name "/" version "/" name "-" version ".tar.gz"))
435 (sha256
436 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
437 (patches
438 (search-patches "libquicktime-ffmpeg.patch"))))
439 (build-system gnu-build-system)
440 (native-inputs
441 (list gettext-minimal doxygen pkg-config))
442 (inputs
443 (list alsa-lib
444 ffmpeg
445 gtk+-2
446 lame
447 libdv
448 libjpeg-turbo
449 libpng
450 libvorbis
451 mesa
452 schroedinger
453 libx11
454 libx264
455 libxaw
456 libxv))
457 (synopsis "Quick Time Library")
458 (description "The goal of this project is to enhance the quicktime4linux
459 library.")
460 (home-page "http://libquicktime.sourceforge.net/")
461 (license license:lgpl2.1+)))
462
463 (define-public mjpg-streamer
464 (package
465 (name "mjpg-streamer")
466 (version "1.0.0")
467 (source (origin
468 (method git-fetch)
469 (uri (git-reference
470 (url "https://github.com/jacksonliam/mjpg-streamer")
471 (commit (string-append "v" version))))
472 (file-name (git-file-name name version))
473 (sha256
474 (base32
475 "0w81pg228154blzbzr590xwhcll9baxyqxl6wxrgqsi9cd7pzq23"))
476 (modules '((guix build utils)))
477 (snippet
478 '(begin
479 (with-directory-excursion "mjpg-streamer-experimental/www"
480 (for-each delete-file-recursively
481 '("cambozola.jar"
482 "JQuerySpinBtn.css"
483 "JQuerySpinBtn.js"
484 "jquery.js"
485 "jquery.rotate.js"
486 "jquery.ui.core.min.js"
487 "jquery.ui.custom.css"
488 "jquery.ui.tabs.min.js"
489 "jquery.ui.widget.min.js")))))))
490 (build-system cmake-build-system)
491 (arguments
492 '(#:tests? #f ; no test suite
493 #:phases
494 (modify-phases %standard-phases
495 (add-after 'unpack 'chdir
496 (lambda* _
497 (chdir "mjpg-streamer-experimental"))))))
498 (inputs (list libjpeg-turbo))
499 (synopsis "Stream JPEG over IP network")
500 (description "Command line application that copies JPEG frames from one or
501 more input plugins to multiple output plugins. It can be used to stream JPEG
502 files over an IP-based network from a webcam to various types of viewers such
503 as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of
504 receiving MJPG streams.")
505 (home-page "https://github.com/jacksonliam/mjpg-streamer")
506 (license license:gpl2+)))
507
508 (define-public mjpegtools
509 (package
510 (name "mjpegtools")
511 (version "2.2.1")
512 (source
513 (origin
514 (method url-fetch)
515 (uri
516 (string-append "https://sourceforge.net/projects/mjpeg/files/"
517 name "/" version "/" name "-" version ".tar.gz"))
518 (sha256
519 (base32 "16pl22ra3x2mkp8p3awslhlhj46b1nq9g89301gb0q4rgmnm705i"))))
520 (build-system gnu-build-system)
521 (inputs
522 (list gtk+-2 libdv libjpeg-turbo libpng libquicktime sdl))
523 (native-inputs
524 (list pkg-config))
525 (synopsis "Tools for handling MPEG")
526 (description "Mjpeg tools is a suite of programs which support video capture,
527 editing, playback, and compression to MPEG of MJPEG video. Edit, play and
528 compression software is hardware independent.")
529 (home-page "http://mjpeg.sourceforge.net/")
530 (license license:gpl2+)))
531
532 (define-public libmms
533 (package
534 (name "libmms")
535 (version "0.6.4")
536 (source
537 (origin
538 (method url-fetch)
539 (uri
540 (string-append "https://sourceforge.net/projects/" name "/files/"
541 name "/" version "/" name "-" version ".tar.gz"))
542 (sha256
543 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
544 (build-system gnu-build-system)
545 (synopsis "MMS stream protocol library")
546 (description "Libmms is a library for streaming media files using the mmst
547 and mmsh protocols.")
548 (home-page "https://sourceforge.net/projects/libmms/")
549 (license license:lgpl2.1+)))
550
551 (define-public libvideogfx
552 (package
553 (name "libvideogfx")
554 (version "1.0.9")
555 (source
556 (origin
557 (method git-fetch)
558 (uri
559 (git-reference
560 (url "https://github.com/farindk/libvideogfx")
561 (commit (string-append "v" version))))
562 (file-name (git-file-name name version))
563 (sha256
564 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
565 (build-system gnu-build-system)
566 (arguments
567 `(#:phases
568 (modify-phases %standard-phases
569 (add-after 'unpack 'fix-build-errors
570 (lambda _
571 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
572 (("av_close_input_file\\(")
573 "avformat_close_input(&"))
574 (substitute* "libvideogfx/graphics/fileio/png.cc"
575 (("is != NULL") "is.good()"))
576 #t)))))
577 (native-inputs
578 (list autoconf automake libtool pkg-config))
579 (inputs
580 `(("ffmpeg" ,ffmpeg-2.8)
581 ("jpeg" ,libjpeg-turbo)
582 ("png" ,libpng)
583 ("x11" ,libx11)
584 ("xext" ,libxext)))
585 (synopsis "Video processing library")
586 (description "LibVideoGfx is a C++ library for low-level video processing.
587 It aims at speeding up the development process for image and video processing
588 applications by providing high-level classes for commonly required tasks.")
589 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
590 (license license:lgpl2.1+)))
591
592 (define-public libde265
593 (package
594 (name "libde265")
595 (version "1.0.8")
596 (source
597 (origin
598 (method git-fetch)
599 (uri
600 (git-reference
601 (url "https://github.com/strukturag/libde265")
602 (commit (string-append "v" version))))
603 (file-name (git-file-name name version))
604 (sha256
605 (base32 "1dzflqbk248lz5ws0ni5acmf32b3rmnq5gsfaz7691qqjxkl1zml"))))
606 (build-system gnu-build-system)
607 (arguments
608 `(#:configure-flags
609 (list "--disable-static")))
610 (native-inputs
611 `(("autoconf" ,autoconf)
612 ("automake" ,automake)
613 ("libtool" ,libtool)
614 ("pkg-config" ,pkg-config)
615 ("python" ,python-wrapper)))
616 (inputs
617 `(;; XXX: Build fails with libvideogfx.
618 ;; ("libvideogfx" ,libvideogfx)
619 ("qt" ,qtbase-5)
620 ("sdl" ,sdl)))
621 (synopsis "H.265 video codec implementation")
622 (description "Libde265 is an implementation of the h.265 video codec. It is
623 written from scratch and has a plain C API to enable a simple integration into
624 other software.")
625 (home-page "https://www.libde265.org/")
626 (license
627 (list
628 ;; Applications.
629 license:expat
630 ;; Library.
631 license:lgpl3+))))
632
633 (define-public tslib
634 (package
635 (name "tslib")
636 (version "1.22")
637 (source
638 (origin
639 (method git-fetch)
640 (uri
641 (git-reference
642 (url "https://github.com/libts/tslib")
643 (commit version)))
644 (file-name (git-file-name name version))
645 (sha256
646 (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
647 (build-system gnu-build-system)
648 (arguments
649 `(#:test-target "tests"
650 #:configure-flags
651 (list "--with-sdl2")))
652 (native-inputs
653 (list autoconf automake libtool pkg-config))
654 (inputs
655 `(("sdl2" ,sdl2)))
656 (synopsis "Touchscreen access library")
657 (description "TSLib is a cross-platform library that provides access to
658 touchscreen devices and the ability to apply filters to their input events.")
659 (home-page "http://www.tslib.org/")
660 (license license:lgpl2.1+)))
661
662 (define-public libmpeg3
663 (package
664 (name "libmpeg3")
665 (version "1.8")
666 (source
667 (origin
668 (method url-fetch)
669 (uri
670 (string-append "https://sourceforge.net/projects/heroines/files/"
671 "releases/081108/" name "-" version "-src.tar.bz2"))
672 (sha256
673 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
674 (build-system gnu-build-system)
675 (arguments
676 `(#:test-target "test"
677 #:make-flags
678 (list
679 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
680 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
681 #:phases
682 (modify-phases %standard-phases
683 (add-after 'unpack 'delete-bundled-a52dec
684 (lambda _
685 (delete-file-recursively "a52dec-0.7.3")
686 (substitute* "Makefile"
687 (("include Makefile\\.a52")
688 "")
689 (("\\(A52DIR\\)/include")
690 "(A52DIR)/include/a52dec")
691 (("LIBS = " match)
692 (string-append match "-la52 ")))
693 #t))
694 (add-before 'install 'create-destination-directory
695 (lambda* (#:key outputs #:allow-other-keys)
696 (let* ((out (string-append (assoc-ref outputs "out"))))
697 (mkdir-p (string-append out "/bin"))
698 #t))))))
699 (native-inputs
700 (list nasm))
701 (inputs
702 (list liba52))
703 (synopsis "Advanced MPEG editing and manipulation library")
704 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
705 and DVD footage in a single library. It supports many esoteric features like
706 parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
707 stream decoding")
708 (home-page "http://heroinewarrior.com/libmpeg3.php")
709 (license license:gpl2+)))
710
711 (define-public aalib
712 (package
713 (name "aalib")
714 (version "1.4rc5")
715 (source (origin
716 (method url-fetch)
717 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
718 version "/" name "-" version ".tar.gz"))
719 (sha256
720 (base32
721 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
722 (build-system gnu-build-system)
723 (native-inputs
724 `(("config" ,config)
725 ("makeinfo" ,texinfo)))
726 (inputs
727 (list ncurses))
728 (arguments
729 `(#:phases
730 (modify-phases %standard-phases
731 (add-after 'unpack 'update-config-scripts
732 (lambda* (#:key inputs native-inputs #:allow-other-keys)
733 ;; Replace outdated config.guess and config.sub.
734 (for-each (lambda (file)
735 (install-file
736 (search-input-file
737 (or native-inputs inputs)
738 (string-append "/bin/" file)) "."))
739 '("config.guess" "config.sub"))))
740 (replace 'configure
741 (lambda* (#:key build inputs outputs #:allow-other-keys)
742 ;; This old `configure' script doesn't support
743 ;; variables passed as arguments.
744 (let ((out (assoc-ref outputs "out"))
745 (ncurses (assoc-ref inputs "ncurses")))
746 (setenv "CONFIG_SHELL" (which "bash"))
747 (invoke "./configure"
748 "--disable-static"
749 (string-append "--prefix=" out)
750 (string-append "--build=" build)
751 (string-append "--with-ncurses="
752 ncurses))))))))
753 (home-page "http://aa-project.sourceforge.net/aalib/")
754 (synopsis "ASCII-art library")
755 (description
756 "AA-lib is a low level gfx library which does not require graphics device.
757 In fact, there is no graphical output possible. AA-lib replaces those
758 old-fashioned output methods with powerful ascii-art renderer.")
759 (license license:lgpl2.0+)))
760
761 (define-public celluloid
762 (package
763 (name "celluloid")
764 (version "0.23")
765 (source
766 (origin
767 (method url-fetch)
768 (uri (string-append "https://github.com/celluloid-player/celluloid"
769 "/releases/download/v" version
770 "/celluloid-" version ".tar.xz"))
771 (sha256
772 (base32 "0x23y09jwkg8wbb0yp5f03sj5hwjg3kyhbbww2y1a0izs1iijbdj"))))
773 (build-system glib-or-gtk-build-system)
774 (native-inputs
775 (list intltool pkg-config))
776 (inputs
777 (list gtk libepoxy mpv))
778 (home-page "https://github.com/celluloid-player/celluloid")
779 (synopsis "GTK+ frontend for the mpv media player")
780 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
781 It interacts with mpv via the client API exported by libmpv, allowing access to
782 mpv's powerful playback capabilities.")
783 (license license:gpl3+)))
784
785 (define-public liba52
786 (package
787 (name "liba52")
788 (version "0.7.4")
789 (source (origin
790 (method url-fetch)
791 (uri (string-append
792 ;; A mirror://sourceforge URI doesn't work, presumably
793 ;; because the SourceForge project is misconfigured.
794 "http://liba52.sourceforge.net/files/a52dec-" version
795 ".tar.gz"))
796 (sha256
797 (base32
798 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
799 (patches (search-patches "liba52-enable-pic.patch"
800 "liba52-set-soname.patch"
801 "liba52-use-mtune-not-mcpu.patch"
802 "liba52-link-with-libm.patch"))))
803 (build-system gnu-build-system)
804 ;; XXX We need to run ./bootstrap because of the build system fixes above.
805 (native-inputs
806 (list autoconf automake libtool))
807 (arguments `(#:configure-flags '("--enable-shared")
808 #:phases
809 (modify-phases %standard-phases
810 ;; XXX We need to run ./bootstrap because of the build
811 ;; system fixes above.
812 (replace 'bootstrap
813 (lambda _ (invoke "sh" "bootstrap"))))))
814 (home-page "http://liba52.sourceforge.net/")
815 (synopsis "ATSC A/52 audio stream decoder")
816 (description "liba52 is a library for decoding ATSC A/52 audio streams.
817 The A/52 standard is used in a variety of applications, including digital
818 television and DVD. It is also known as AC-3.")
819 (license license:gpl2+)))
820
821 (define-public libaom
822 (package
823 (name "libaom")
824 (version "3.3.0")
825 (source (origin
826 (method git-fetch)
827 (uri (git-reference
828 (url "https://aomedia.googlesource.com/aom/")
829 (commit (string-append "v" version))))
830 (file-name (git-file-name name version))
831 (sha256
832 (base32
833 "024vhsx7bw9kajk65hhh5vmqrja0h33rmlcpngsj3yg4p8l29943"))))
834 (build-system cmake-build-system)
835 (native-inputs
836 (list perl pkg-config python)) ; to detect the version
837 (arguments
838 `(#:tests? #f ; downloads many video clips
839 #:configure-flags
840 (list "-DBUILD_SHARED_LIBS=YES"
841 "-DENABLE_PIC=TRUE"
842 "-DAOM_TARGET_CPU=generic"
843 (string-append "-DCMAKE_INSTALL_PREFIX="
844 (assoc-ref %outputs "out")))
845 #:phases
846 (modify-phases %standard-phases
847 (add-after 'install 'delete-static-libraries
848 (lambda* (#:key outputs #:allow-other-keys)
849 (let* ((out (assoc-ref outputs "out"))
850 (lib (string-append out "/lib")))
851 (for-each delete-file
852 (find-files lib "\\.a$"))))))))
853 (home-page "https://aomedia.googlesource.com/aom/")
854 (synopsis "AV1 video codec")
855 (description "Libaom is the reference implementation of AV1. It includes a
856 shared library and encoder and decoder command-line executables.")
857 (license license:bsd-2)))
858
859 (define-public libmpeg2
860 (package
861 (name "libmpeg2")
862 (version "0.5.1")
863 (source (origin
864 (method url-fetch)
865 ;; A mirror://sourceforge URI doesn't work, presumably
866 ;; because the SourceForge project is misconfigured.
867 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
868 name "-" version ".tar.gz"))
869 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
870 "libmpeg2-global-symbol-test.patch"))
871 (sha256
872 (base32
873 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
874 (inputs
875 (list libx11
876 libxext
877 libxv
878 libsm
879 libice
880 sdl))
881 (build-system gnu-build-system)
882 (home-page "http://libmpeg2.sourceforge.net/")
883 (synopsis "MPEG1 and MPEG2 video decoder library")
884 (description
885 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
886 (license license:gpl2+)))
887
888 (define-public libx264
889 ;; There are no tags in the repository, so we take the version number from
890 ;; the X264_BUILD variable defined in x264.h.
891 (let ((version "161")
892 (commit "4c2aafd864dd201832ec2be0fef4484925146650")
893 (revision "0"))
894 (package
895 (name "libx264")
896 (version (git-version version revision commit))
897 (source (origin
898 (method git-fetch)
899 (uri (git-reference
900 (url "https://code.videolan.org/videolan/x264.git")
901 (commit commit)))
902 (file-name (git-file-name name version))
903 (sha256
904 (base32
905 "1i6v9h3xx9pi0zmlj3anwwjxqa63sbhy9crrif8dphipwfn9hyg5"))))
906 (build-system gnu-build-system)
907 (native-inputs
908 (list pkg-config nasm))
909 (inputs
910 (list config))
911 ;; TODO: Add gpac input
912 (arguments
913 `(#:tests? #f ;no check target
914 #:configure-flags '("--enable-shared"
915 ;; Don't build the command-line program. If we
916 ;; want it later, we should do so in a different
917 ;; package to avoid a circular dependency (the x264
918 ;; program depends on ffmpeg and ffmpeg depends on
919 ;; libx264).
920 "--disable-cli"
921 "--enable-pic"
922
923 ;; On MIPS, we must pass "--disable-asm" or else
924 ;; configure fails after printing: "You specified a
925 ;; pre-MSA CPU in your CFLAGS. If you really want
926 ;; to run on such a CPU, configure with
927 ;; --disable-asm."
928 ,@(if (string-prefix? "mips"
929 (or (%current-target-system)
930 (%current-system)))
931 '("--disable-asm")
932 '()))
933 #:phases
934 (modify-phases %standard-phases
935 (add-after 'unpack 'update-config-scripts
936 (lambda* (#:key native-inputs inputs #:allow-other-keys)
937 (for-each (lambda (file)
938 (install-file
939 (search-input-file
940 (or native-inputs inputs)
941 (string-append "/bin/" file)) "."))
942 '("config.guess" "config.sub")))))))
943 (home-page "https://www.videolan.org/developers/x264.html")
944 (synopsis "H.264 video coding library")
945 (description "libx264 is an advanced encoding library for creating
946 H.264 (MPEG-4 AVC) video streams.")
947 (license (list license:gpl2+ ;most files
948 license:isc ;common/x86/x86inc.asm
949 license:lgpl2.1+ ;extras/getopt.c
950 license:bsd-3 ;extras/inttypes.h
951 (license:non-copyleft ;extras/cl*.h
952 "file://extras/cl.h"
953 "See extras/cl.h in the distribution."))))))
954
955 (define-public mkvtoolnix
956 (package
957 (name "mkvtoolnix")
958 (version "52.0.0")
959 (source
960 (origin
961 (method url-fetch)
962 (uri (string-append "https://mkvtoolnix.download/sources/"
963 "mkvtoolnix-" version ".tar.xz"))
964 (sha256
965 (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s"))
966 (modules '((guix build utils)))
967 (snippet '(begin
968 ;; Delete bundled libraries.
969 (for-each delete-file-recursively
970 '("lib/fmt"
971 "lib/libebml"
972 "lib/libmatroska"
973 "lib/nlohmann-json"
974 "lib/pugixml"
975 "lib/utf8-cpp"))
976 #t))))
977 (build-system gnu-build-system)
978 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
979 (inputs
980 (list boost
981 bzip2
982 cmark
983 libebml
984 file
985 flac
986 fmt
987 libdvdread
988 libmatroska
989 libogg
990 libvorbis
991 lzo
992 pcre2
993 pugixml
994 qtbase-5
995 qtmultimedia
996 utfcpp
997 zlib))
998 (native-inputs
999 `(("docbook-xsl" ,docbook-xsl)
1000 ("gettext" ,gettext-minimal)
1001 ("googletest" ,googletest)
1002 ("libxslt" ,libxslt)
1003 ("json-modern-cxx" ,json-modern-cxx)
1004 ("perl" ,perl)
1005 ("pkg-config" ,pkg-config)
1006 ("po4a" ,po4a)
1007 ("qttools" ,qttools)
1008 ("ruby" ,ruby)))
1009 (arguments
1010 `(#:configure-flags
1011 (list (string-append "--with-boost="
1012 (assoc-ref %build-inputs "boost"))
1013 (string-append "--with-docbook-xsl-root="
1014 (assoc-ref %build-inputs "docbook-xsl")
1015 "/xml/xsl/docbook-xsl-"
1016 ,(package-version docbook-xsl))
1017 "--enable-update-check=no"
1018 "--enable-precompiled-headers=no")
1019 #:phases
1020 (modify-phases %standard-phases
1021 (add-after 'unpack 'patch-relative-file-names
1022 (lambda* (#:key outputs #:allow-other-keys)
1023 (let ((out (assoc-ref outputs "out")))
1024 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
1025 (("mkvmerge" match)
1026 (string-append out "/bin/" match)))
1027 #t)))
1028 (add-before 'configure 'add-googletest
1029 (lambda* (#:key inputs #:allow-other-keys)
1030 (symlink (search-input-directory inputs "/include/gtest")
1031 "lib/gtest")))
1032 (replace 'build
1033 (lambda _
1034 (let ((-j (list "-j" (number->string (parallel-job-count)))))
1035 (apply invoke "rake" -j))))
1036 (replace 'check
1037 (lambda _
1038 (invoke "rake" "tests/unit")))
1039 (replace 'install
1040 (lambda _
1041 (invoke "rake" "install")))
1042 (add-after 'install 'post-install
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 ;; Move the Qt interface to "gui".
1045 (let* ((out (assoc-ref outputs "out"))
1046 (gui (assoc-ref outputs "gui"))
1047 (strip-store-dir (lambda (path)
1048 (substring path (string-prefix-length out path)))))
1049 (for-each
1050 (lambda (file)
1051 (mkdir-p (string-append gui (dirname file)))
1052 (rename-file (string-append out file)
1053 (string-append gui file)))
1054 (append '("/bin/mkvtoolnix-gui"
1055 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
1056 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
1057 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
1058 (map strip-store-dir (find-files out "\\.ogg$"))
1059 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
1060 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
1061 (for-each
1062 (lambda (file)
1063 (delete-file-recursively (string-append out file)))
1064 '("/share/applications"
1065 "/share/metainfo"
1066 "/share/mime"
1067 "/share/mkvtoolnix")))
1068 #t)))))
1069 (home-page "https://mkvtoolnix.download")
1070 (synopsis "Tools to create, alter and inspect Matroska files")
1071 (description
1072 "MKVToolNix provides tools for getting information about Matroska files
1073 (@command{mkvinfo}), extracting tracks/data from Matroska files
1074 (@command{mkvextract}), and creating Matroska files from other media files
1075 (@command{mkvmerge}).")
1076 (license license:gpl2)))
1077
1078 (define-public pipe-viewer
1079 (package
1080 (name "pipe-viewer")
1081 (version "0.2.0")
1082 (source
1083 (origin
1084 (method git-fetch)
1085 (uri
1086 (git-reference
1087 (url "https://github.com/trizen/pipe-viewer")
1088 (commit version)))
1089 (file-name (git-file-name name version))
1090 (sha256
1091 (base32 "19qfs0nv7l01468f14a5zbvaiff5hrsk3a4zqknh15014xnvw08s"))))
1092 (build-system perl-build-system)
1093 (arguments
1094 `(#:imported-modules
1095 ((guix build copy-build-system)
1096 ,@%perl-build-system-modules)
1097 #:modules
1098 (((guix build copy-build-system)
1099 #:prefix copy:)
1100 (guix build perl-build-system)
1101 (guix build utils)
1102 (srfi srfi-26))
1103 #:module-build-flags
1104 (list
1105 "--gtk3")
1106 #:phases
1107 (modify-phases %standard-phases
1108 (add-after 'unpack 'patch-source
1109 (lambda* (#:key inputs #:allow-other-keys)
1110 (substitute* (find-files "lib" "\\.pm$")
1111 (("\"youtube-dl\"")
1112 (format #f "\"~a/bin/youtube-dl\""
1113 (assoc-ref inputs "youtube-dl")))
1114 (("\"yt-dlp\"")
1115 (format #f "\"~a/bin/yt-dlp\""
1116 (assoc-ref inputs "yt-dlp"))))
1117 (substitute* (find-files "bin" ".*-viewer$")
1118 (("'ffmpeg'")
1119 (format #f "'~a/bin/ffmpeg'"
1120 (assoc-ref inputs "ffmpeg")))
1121 (("'wget'")
1122 (format #f "'~a/bin/wget'"
1123 (assoc-ref inputs "wget")))
1124 (("'xdg-open'")
1125 (format #f "'~a/bin/xdg-open'"
1126 (assoc-ref inputs "xdg-utils")))
1127 (("'youtube-dl'")
1128 (format #f "'~a/bin/youtube-dl'"
1129 (assoc-ref inputs "youtube-dl")))
1130 (("'yt-dlp'")
1131 (format #f "'~a/bin/yt-dlp'"
1132 (assoc-ref inputs "yt-dlp"))))))
1133 (add-after 'install 'install-xdg
1134 (lambda args
1135 (apply (assoc-ref copy:%standard-phases 'install)
1136 #:install-plan
1137 '(("share/icons" "share/pixmaps")
1138 ("share" "share/applications"
1139 #:include-regexp ("\\.desktop$")))
1140 args)))
1141 (add-after 'install-xdg 'wrap-programs
1142 (lambda* (#:key outputs #:allow-other-keys)
1143 (let* ((out (assoc-ref outputs "out"))
1144 (bin-dir (string-append out "/bin/"))
1145 (site-dir (string-append out "/lib/perl5/site_perl/"))
1146 (perl-lib (getenv "PERL5LIB"))
1147 (gi-typelib (getenv "GI_TYPELIB_PATH")))
1148 (for-each
1149 (cut wrap-program <>
1150 `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
1151 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
1152 (find-files bin-dir))))))))
1153 (native-inputs
1154 (list perl-module-build perl-test-pod perl-test-simple))
1155 (inputs
1156 (list perl-data-dump
1157 perl-digest-md5
1158 perl-encode
1159 ffmpeg
1160 perl-file-path
1161 perl-file-sharedir
1162 perl-getopt-long
1163 perl-gtk3
1164 perl-http-message
1165 perl-json
1166 perl-json-xs
1167 perl-libwww
1168 perl-lwp-protocol-https
1169 perl-lwp-useragent-cached
1170 perl-memoize
1171 perl-mime-base64
1172 perl-pathtools
1173 perl-scalar-list-utils
1174 perl-storable
1175 perl-term-ansicolor
1176 perl-term-readline-gnu
1177 perl-text-parsewords
1178 perl-text-tabs+wrap
1179 perl-unicode-linebreak
1180 perl-uri-escape
1181 wget
1182 xdg-utils
1183 youtube-dl
1184 yt-dlp))
1185 (propagated-inputs
1186 (list dconf))
1187 (home-page "https://github.com/trizen/pipe-viewer")
1188 (synopsis "CLI+GUI YouTube Client")
1189 (description "Pipe-Viewer is a lightweight application for searching and
1190 playing videos from YouTube. It parses the YouTube website directly and relies
1191 on the Invidious instances only as a fallback method.")
1192 (license license:artistic2.0)))
1193
1194 (define-public straw-viewer
1195 (deprecated-package "straw-viewer" pipe-viewer))
1196
1197 (define-public x265
1198 (package
1199 (name "x265")
1200 (version "3.4")
1201 (outputs '("out" "static"))
1202 (source
1203 (origin
1204 (method url-fetch)
1205 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
1206 "/downloads/x265_" version ".tar.gz")
1207 (string-append "https://download.videolan.org/videolan/x265/"
1208 "x265_" version ".tar.gz")))
1209 (sha256
1210 (base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
1211 (patches (search-patches "x265-arm-flags.patch"))
1212 (modules '((guix build utils)))
1213 (snippet '(begin
1214 (delete-file-recursively "source/compat/getopt")
1215 #t))))
1216 (build-system cmake-build-system)
1217 (native-inputs
1218 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1219 (if (string-prefix? "i686" (%current-system))
1220 '()
1221 `(("nasm" ,nasm))))
1222 (arguments
1223 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
1224 #:configure-flags
1225 ;; Ensure position independent code for everyone.
1226 (list "-DENABLE_PIC=TRUE"
1227 ,@(if (target-arm?)
1228 '("-DENABLE_ASSEMBLY=OFF")
1229 '())
1230 (string-append "-DCMAKE_INSTALL_PREFIX="
1231 (assoc-ref %outputs "out")))
1232 #:phases
1233 (modify-phases %standard-phases
1234 (add-after 'unpack 'prepare-build
1235 (lambda _
1236 (delete-file-recursively "build")
1237 (chdir "source")
1238 #t))
1239 (add-before 'configure 'build-12-bit
1240 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1241 (mkdir "../build-12bit")
1242 (with-directory-excursion "../build-12bit"
1243 (apply invoke
1244 "cmake" "../source"
1245 "-DHIGH_BIT_DEPTH=ON"
1246 "-DEXPORT_C_API=OFF"
1247 "-DENABLE_CLI=OFF"
1248 "-DMAIN12=ON"
1249 configure-flags)
1250 (substitute* (cons "cmake_install.cmake"
1251 (append
1252 (find-files "CMakeFiles/x265-shared.dir" ".")
1253 (find-files "CMakeFiles/x265-static.dir" ".")))
1254 (("libx265") "libx265_main12"))
1255 (invoke "make"))))
1256 (add-before 'configure 'build-10-bit
1257 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1258 (mkdir "../build-10bit")
1259 (with-directory-excursion "../build-10bit"
1260 (apply invoke
1261 "cmake" "../source"
1262 "-DHIGH_BIT_DEPTH=ON"
1263 "-DEXPORT_C_API=OFF"
1264 "-DENABLE_CLI=OFF"
1265 configure-flags)
1266 (substitute* (cons "cmake_install.cmake"
1267 (append
1268 (find-files "CMakeFiles/x265-shared.dir" ".")
1269 (find-files "CMakeFiles/x265-static.dir" ".")))
1270 (("libx265") "libx265_main10"))
1271 (invoke "make"))))
1272 (add-after 'install 'install-more-libs
1273 (lambda _
1274 (with-directory-excursion "../build-12bit"
1275 (invoke "make" "install"))
1276 (with-directory-excursion "../build-10bit"
1277 (invoke "make" "install"))))
1278 (add-before 'strip 'move-static-libs
1279 (lambda* (#:key outputs #:allow-other-keys)
1280 (let ((out (assoc-ref outputs "out"))
1281 (static (assoc-ref outputs "static")))
1282 (mkdir-p (string-append static "/lib"))
1283 (with-directory-excursion
1284 (string-append out "/lib")
1285 (for-each
1286 (lambda (file)
1287 (rename-file file
1288 (string-append static "/lib/" file)))
1289 (find-files "." "\\.a$"))))
1290 #t)))))
1291 (home-page "http://x265.org/")
1292 (synopsis "Library for encoding h.265/HEVC video streams")
1293 (description "x265 is a H.265 / HEVC video encoder application library,
1294 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1295 (license license:gpl2+)))
1296
1297 (define-public libass
1298 (package
1299 (name "libass")
1300 (version "0.15.1")
1301 (source (origin
1302 (method url-fetch)
1303 (uri (string-append
1304 "https://github.com/libass/libass/releases/download/"
1305 version "/libass-" version ".tar.xz"))
1306 (sha256
1307 (base32
1308 "0lwfmdizzrr4gcq3fgw4j8g9pkrqgx6h0f3pgrrnxc07s34kkp8w"))))
1309 (build-system gnu-build-system)
1310 (arguments
1311 '(#:configure-flags '("--disable-static")))
1312 (native-inputs
1313 (list pkg-config nasm))
1314 (propagated-inputs
1315 `(("freetype" ,freetype)
1316 ("fribidi" ,fribidi)
1317 ("fontconfig" ,fontconfig)
1318 ("harfbuzz" ,harfbuzz)))
1319 (home-page "https://github.com/libass/libass")
1320 (synopsis "Subtitle rendering library for the ASS/SSA format")
1321 (description "libass is a subtitle rendering library for the
1322 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1323 (license license:isc)))
1324
1325 (define-public libcaca
1326 (package
1327 (name "libcaca")
1328 (version "0.99.beta19")
1329 (source (origin
1330 (method url-fetch)
1331 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1332 version ".tar.gz"))
1333 (sha256
1334 (base32
1335 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
1336 (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
1337 "libcaca-CVE-2021-3410-pt2.patch"))))
1338 (build-system gnu-build-system)
1339 (arguments
1340 '(#:configure-flags '("--disable-static")))
1341 (native-inputs (list pkg-config))
1342 (inputs
1343 (list freeglut
1344 ftgl
1345 imlib2
1346 libx11
1347 mesa
1348 ncurses
1349 zlib))
1350 (home-page "http://caca.zoy.org/wiki/libcaca")
1351 (synopsis "Colour ASCII-art library")
1352 (description "libcaca is a graphics library that outputs text instead of
1353 pixels, so that it can work on older video cards or text terminals. It
1354 supports Unicode, 2048 colors, dithering of color images, and advanced text
1355 canvas operations.")
1356 (license license:wtfpl2)))
1357
1358 (define-public libdca
1359 (package
1360 (name "libdca")
1361 (version "0.0.7")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (string-append
1365 "https://download.videolan.org/pub/videolan/libdca/"
1366 version "/libdca-" version ".tar.bz2"))
1367 (sha256
1368 (base32
1369 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1370 (build-system gnu-build-system)
1371 (native-inputs
1372 (list autoconf automake libtool))
1373 (home-page "https://www.videolan.org/developers/libdca.html")
1374 (synopsis "DTS Coherent Acoustics decoder")
1375 (description "libdca is a library for decoding DTS Coherent Acoustics
1376 streams.")
1377 (license license:gpl2+)))
1378
1379 (define-public libdv
1380 (package
1381 (name "libdv")
1382 (version "1.0.0")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (string-append
1386 "mirror://sourceforge/libdv/libdv/"
1387 version "/libdv-" version ".tar.gz"))
1388 (sha256
1389 (base32
1390 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1391 (build-system gnu-build-system)
1392 (native-inputs (list pkg-config))
1393 (inputs (list libxv))
1394 (home-page "http://libdv.sourceforge.net/")
1395 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1396 (description "The Quasar DV codec (libdv) is a software codec for DV
1397 video, the encoding format used by most digital camcorders, typically those
1398 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1399 developed according to the official standards for DV video: IEC 61834 and
1400 SMPTE 314M.")
1401 (license license:lgpl2.1+)))
1402
1403 (define-public libmatroska
1404 (package
1405 (name "libmatroska")
1406 (version "1.6.3")
1407 (source
1408 (origin
1409 (method url-fetch)
1410 (uri (string-append "https://dl.matroska.org/downloads/"
1411 "libmatroska/libmatroska-" version ".tar.xz"))
1412 (sha256
1413 (base32 "06h81sxyz2riic0gpzik6ffcnq32wrqphi8c6k55glcdymiimyfs"))))
1414 (build-system cmake-build-system)
1415 (inputs
1416 (list libebml))
1417 (arguments
1418 `(#:configure-flags
1419 (list "-DBUILD_SHARED_LIBS=YES")
1420 #:tests? #f)) ; no test suite
1421 (home-page "https://www.matroska.org")
1422 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1423 (description
1424 "Matroska aims to become the standard of multimedia container formats.
1425 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1426 of XML. EBML enables the Matroska Development Team to gain significant
1427 advantages in terms of future format extensibility, without breaking file
1428 support in old parsers.
1429 libebml is a C++ library to read and write EBML files.")
1430 (license license:lgpl2.1)))
1431
1432 (define-public libplacebo
1433 (package
1434 (name "libplacebo")
1435 (version "4.157.0")
1436 (source
1437 (origin
1438 (method git-fetch)
1439 (uri (git-reference
1440 (url "https://code.videolan.org/videolan/libplacebo")
1441 (commit (string-append "v" version))))
1442 (file-name (git-file-name name version))
1443 (sha256
1444 (base32 "08kqsd29h8wm0vz7698wh2mdgpwv6anqc5n7d1spnnamwyfwc64h"))))
1445 (build-system meson-build-system)
1446 (arguments
1447 `(#:configure-flags
1448 `("-Dopengl=enabled"
1449 ,(string-append "-Dvulkan-registry="
1450 (assoc-ref %build-inputs "vulkan-headers")
1451 "/share/vulkan/registry/vk.xml"))))
1452 (native-inputs
1453 (list python-mako pkg-config))
1454 (inputs
1455 (list lcms
1456 libepoxy
1457 mesa
1458 shaderc
1459 vulkan-headers
1460 vulkan-loader))
1461 (home-page "https://code.videolan.org/videolan/libplacebo")
1462 (synopsis "GPU-accelerated image/video processing library")
1463 (description "libplacebo is, in a nutshell, the core rendering algorithms
1464 and ideas of mpv rewritten as an independent library. As of today, libplacebo
1465 contains a large assortment of video processing shaders, focusing on both
1466 quality and performance.")
1467 (license license:lgpl2.1+)))
1468
1469 (define-public libva
1470 (package
1471 (name "libva")
1472 (version "2.13.0")
1473 (source
1474 (origin
1475 (method url-fetch)
1476 (uri (string-append "https://github.com/intel/libva/releases/download/"
1477 version "/libva-" version ".tar.bz2"))
1478 (sha256
1479 (base32 "0q6l193x9whd80sjd5mx8cb7c0fcljb19nhfpla5h49nkzrq7lzs"))))
1480 (build-system gnu-build-system)
1481 (native-inputs
1482 (list pkg-config))
1483 (inputs
1484 (list libdrm
1485 libx11
1486 libxext
1487 libxfixes
1488 mesa
1489 wayland))
1490 (arguments
1491 `(#:phases
1492 (modify-phases %standard-phases
1493 (add-before
1494 'build 'fix-dlopen-paths
1495 (lambda* (#:key outputs #:allow-other-keys)
1496 (let ((out (assoc-ref outputs "out")))
1497 (substitute* "va/drm/va_drm_auth_x11.c"
1498 (("\"libva-x11\\.so\\.%d\"")
1499 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
1500 #t))))
1501 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1502 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1503 #:configure-flags
1504 (list (string-append "--with-drivers-path="
1505 (assoc-ref %build-inputs "mesa") "/lib/dri"))
1506 ;; However, we can't write to mesa's store directory, so override the
1507 ;; following make variable to install the dummy driver to libva's
1508 ;; $prefix/lib/dri directory.
1509 #:make-flags
1510 (list (string-append "dummy_drv_video_ladir="
1511 (assoc-ref %outputs "out") "/lib/dri"))))
1512 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1513 (synopsis "Video acceleration library")
1514 (description "The main motivation for VA-API (Video Acceleration API) is
1515 to enable hardware accelerated video decode/encode at various
1516 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1517 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1518 (license license:expat)))
1519
1520 (define-public libva-utils
1521 (package
1522 (name "libva-utils")
1523 (version "2.5.0")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1528 version "/libva-utils-" version ".tar.bz2"))
1529 (sha256
1530 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1531 (build-system gnu-build-system)
1532 (arguments
1533 `(#:configure-flags
1534 (list "--enable-wayland"
1535 "--enable-x11")))
1536 (native-inputs
1537 (list pkg-config))
1538 (inputs
1539 (list libdrm libva libx11 mesa wayland))
1540 (home-page "https://01.org/linuxmedia/vaapi")
1541 (synopsis "Collection of testing utilities for VA-API")
1542 (description
1543 "This is a collection of utilities to query and test the @acronym{VA-API,
1544 Video Acceleration API} implemented by the libva library.
1545
1546 These tools require a supported graphics chip, driver, and VA-API back end to
1547 operate properly.")
1548 (license license:expat)))
1549
1550 (define-public ffmpeg-5
1551 (package
1552 (name "ffmpeg")
1553 (version "5.0.1")
1554 (source (origin
1555 (method url-fetch)
1556 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1557 version ".tar.xz"))
1558 (sha256
1559 (base32
1560 "0yq0jcdc4qm5znrzylj3dsicrkk2n3n8bv28vr0a506fb7iglbpg"))))
1561 (build-system gnu-build-system)
1562 (inputs
1563 (append
1564 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1565 ;; See also the related configure flag when changing this.
1566 (if (target-x86-64?) (list rav1e) '())
1567 (list dav1d
1568 fontconfig
1569 freetype
1570 frei0r-plugins
1571 gnutls
1572 opus
1573 ladspa
1574 lame
1575 libaom
1576 libass
1577 libbluray
1578 libcaca
1579 libcdio-paranoia
1580 libdrm
1581 libtheora
1582 libva
1583 libvdpau
1584 libvorbis
1585 libvpx
1586 libx11
1587 libx264
1588 mesa
1589 openal
1590 pulseaudio
1591 sdl2
1592 soxr
1593 speex
1594 srt
1595 twolame
1596 vidstab
1597 x265
1598 xvid
1599 zlib)))
1600 (native-inputs
1601 (list bc
1602 perl
1603 pkg-config
1604 texinfo
1605 speex
1606 yasm))
1607 (arguments
1608 (list
1609 #:test-target "fate"
1610 #:configure-flags
1611 ;; possible additional inputs:
1612 ;; --enable-avisynth enable reading of AviSynth script
1613 ;; files [no]
1614 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1615 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1616 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1617 ;; and libraw1394 [no]
1618 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1619 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1620 ;; --enable-libflite enable flite (voice synthesis) support via
1621 ;; libflite [no]
1622 ;; --enable-libgme enable Game Music Emu via libgme [no]
1623 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1624 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1625 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1626 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1627 ;; --enable-libnut enable NUT (de)muxing via libnut,
1628 ;; native (de)muxer exists [no]
1629 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1630 ;; libopencore-amrnb [no]
1631 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1632 ;; libopencore-amrwb [no]
1633 ;; --enable-libopencv enable video filtering via libopencv [no]
1634 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1635 ;; OpenJPEG [no]
1636 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1637 ;; --enable-libschroedinger enable Dirac de/encoding via
1638 ;; libschroedinger [no]
1639 ;; --enable-libshine enable fixed-point MP3 encoding via
1640 ;; libshine [no]
1641 ;; --enable-libssh enable SFTP protocol via libssh [no]
1642 ;; (libssh2 does not work)
1643 ;; --enable-libstagefright-h264 enable H.264 decoding via
1644 ;; libstagefright [no]
1645 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1646 ;; libutvideo [no]
1647 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1648 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1649 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1650 ;; libvo-amrwbenc [no]
1651 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1652 ;; --enable-libxavs enable AVS encoding via xavs [no]
1653 ;; --enable-libzmq enable message passing via libzmq [no]
1654 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1655 ;; --enable-opencl enable OpenCL code
1656 #~(list
1657 "--enable-gpl" ;enable optional gpl licensed parts
1658 "--enable-shared"
1659 "--enable-frei0r"
1660 "--enable-fontconfig"
1661 "--enable-gnutls"
1662 "--enable-ladspa"
1663 "--enable-libaom"
1664 "--enable-libass"
1665 "--enable-libbluray"
1666 "--enable-libcaca"
1667 "--enable-libcdio"
1668 "--enable-libdav1d"
1669 "--enable-libfreetype"
1670 "--enable-libmp3lame"
1671 "--enable-libopus"
1672 "--enable-libpulse"
1673 #$@(if (target-x86-64?)
1674 '("--enable-librav1e")
1675 '())
1676 "--enable-libsoxr"
1677 "--enable-libspeex"
1678 "--enable-libsrt"
1679 "--enable-libtheora"
1680 "--enable-libtwolame"
1681 "--enable-libvidstab"
1682 "--enable-libvorbis"
1683 "--enable-libvpx"
1684 "--enable-libxvid"
1685 "--enable-libx264"
1686 "--enable-libx265"
1687 "--enable-openal"
1688 "--enable-opengl"
1689 "--enable-libdrm"
1690 "--enable-vaapi"
1691
1692 "--enable-runtime-cpudetect"
1693
1694 ;; The HTML pages take 7.2 MiB
1695 "--disable-htmlpages"
1696
1697 ;; The static libraries are 23 MiB
1698 "--disable-static"
1699
1700 ;; Runtime cpu detection is not implemented on
1701 ;; MIPS, so we disable some features.
1702 "--disable-mips32r2"
1703 "--disable-mipsdsp"
1704 "--disable-mipsdspr2"
1705 "--disable-mipsfpu")
1706 #:phases
1707 #~(modify-phases %standard-phases
1708 (replace 'configure
1709 ;; configure does not work followed by "SHELL=..." and
1710 ;; "CONFIG_SHELL=..."; set environment variables instead
1711 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1712 (let ((out (assoc-ref outputs "out")))
1713 (substitute* "configure"
1714 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1715 (setenv "SHELL" (which "bash"))
1716 (setenv "CONFIG_SHELL" (which "bash"))
1717 (apply invoke
1718 "./configure"
1719 (string-append "--prefix=" out)
1720 ;; Add $libdir to the RUNPATH of all the binaries.
1721 (string-append "--extra-ldflags=-Wl,-rpath="
1722 out "/lib")
1723 configure-flags))))
1724 (add-before 'check 'set-ld-library-path
1725 (lambda _
1726 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1727 ;; running tests.
1728 (let* ((dso (find-files "." "\\.so$"))
1729 (path (string-join (map dirname dso) ":")))
1730 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1731 (setenv "LD_LIBRARY_PATH" path)))))))
1732 (home-page "https://www.ffmpeg.org/")
1733 (synopsis "Audio and video framework")
1734 (description "FFmpeg is a complete, cross-platform solution to record,
1735 convert and stream audio and video. It includes the libavcodec
1736 audio/video codec library.")
1737 (license license:gpl2+)))
1738
1739 (define-public ffmpeg-4
1740 (package
1741 (inherit ffmpeg-5)
1742 (version "4.4.2")
1743 (source (origin
1744 (method url-fetch)
1745 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1746 version ".tar.xz"))
1747 (sha256
1748 (base32
1749 "14xadxm1yaamp216nq09xwasxg5g133v86dbb33mdg5di1zrlhdg"))))
1750 (arguments
1751 (substitute-keyword-arguments (package-arguments ffmpeg-5)
1752 ((#:configure-flags flags ''())
1753 #~(cons "--enable-avresample" #$flags))))))
1754
1755 (define-public ffmpeg-3.4
1756 (package
1757 (inherit ffmpeg-4)
1758 (version "3.4.9")
1759 (source (origin
1760 (method url-fetch)
1761 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1762 version ".tar.xz"))
1763 (sha256
1764 (base32
1765 "0d8nkd9c85rkjlgsq1hidmykkrksi883ygqzhhj6wh4nqflv8vs9"))))
1766 (arguments
1767 (substitute-keyword-arguments (package-arguments ffmpeg-4)
1768 ((#:modules modules %gnu-build-system-modules)
1769 `((srfi srfi-1)
1770 ,@modules))
1771 ((#:configure-flags flags)
1772 #~(fold delete #$flags
1773 '("--enable-libdav1d"
1774 "--enable-libaom"
1775 "--enable-librav1e"
1776 "--enable-libsrt")))))
1777 (inputs (modify-inputs (package-inputs ffmpeg-4)
1778 (delete "dav1d" "libaom" "rav1e" "srt")))))
1779
1780 (define-public ffmpeg-2.8
1781 (package
1782 (inherit ffmpeg-3.4)
1783 (version "2.8.18")
1784 (source (origin
1785 (method url-fetch)
1786 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1787 version ".tar.xz"))
1788 (sha256
1789 (base32
1790 "0k6dq7b8rpjvdl5ncf1135qwc36x0x9va8v83aggvbfhy5d97vwn"))))
1791 (arguments
1792 `(#:tests? #f ; XXX: Enable them later, if required
1793 #:configure-flags
1794 (list
1795 "--disable-static"
1796 "--enable-shared"
1797 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1798 #:phases
1799 (modify-phases %standard-phases
1800 (replace 'configure
1801 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1802 (let ((out (assoc-ref outputs "out")))
1803 (substitute* "configure"
1804 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1805 ;; configure does not work followed by "SHELL=..." and
1806 ;; "CONFIG_SHELL=..."; set environment variables instead.
1807 (setenv "SHELL" (which "bash"))
1808 (setenv "CONFIG_SHELL" (which "bash"))
1809 (apply invoke
1810 "./configure"
1811 (string-append "--prefix=" out)
1812 ;; Add $libdir to the RUNPATH of all the binaries.
1813 (string-append "--extra-ldflags=-Wl,-rpath="
1814 out "/lib")
1815 configure-flags))))
1816 (add-before
1817 'check 'set-ld-library-path
1818 (lambda _
1819 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1820 ;; running tests.
1821 (let* ((dso (find-files "." "\\.so$"))
1822 (path (string-join (map dirname dso) ":")))
1823 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1824 (setenv "LD_LIBRARY_PATH" path)))))))))
1825
1826 (define-public ffmpeg ffmpeg-4)
1827
1828 (define-public ffmpeg-for-stepmania
1829 (hidden-package
1830 (package
1831 (inherit ffmpeg-4)
1832 (version "2.1.3")
1833 (source
1834 (origin
1835 (method git-fetch)
1836 (uri (git-reference
1837 (url "https://github.com/stepmania/ffmpeg")
1838 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1839 (sha256
1840 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1841 (file-name (git-file-name "ffmpeg" version))))
1842 (arguments
1843 (substitute-keyword-arguments (package-arguments ffmpeg-4)
1844 ((#:configure-flags flags)
1845 #~(list "--disable-programs"
1846 "--disable-doc"
1847 "--disable-debug"
1848 "--disable-avdevice"
1849 "--disable-swresample"
1850 "--disable-postproc"
1851 "--disable-avfilter"
1852 "--disable-shared"
1853 "--enable-static"))))
1854 (inputs '()))))
1855
1856 (define-public ffmpegthumbnailer
1857 (package
1858 (name "ffmpegthumbnailer")
1859 (version "2.2.2")
1860 (source (origin
1861 (method git-fetch)
1862 (uri (git-reference
1863 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
1864 (commit version)))
1865 (file-name (git-file-name name version))
1866 (sha256
1867 (base32
1868 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1869 (build-system cmake-build-system)
1870 (native-inputs
1871 (list pkg-config))
1872 (inputs
1873 (list ffmpeg libjpeg-turbo libpng gvfs))
1874 (arguments
1875 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1876 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1877 (synopsis "Create thumbnails from video files")
1878 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1879 can be used by file managers to create thumbnails for your video files. The
1880 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1881 videoformats depend on the configuration flags of ffmpeg.")
1882 (license license:gpl2+)))
1883
1884 (define-public vlc
1885 (package
1886 (name "vlc")
1887 (version "3.0.17.3")
1888 (source (origin
1889 (method url-fetch)
1890 (uri (string-append
1891 "https://download.videolan.org/pub/videolan/vlc/"
1892 (car (string-split version #\-))
1893 "/vlc-" version ".tar.xz"))
1894 (sha256
1895 (base32
1896 "0510vqf35f0v9c498yki5441aig3fdqq3nv4vsb1vlvki7pr0zkg"))))
1897 (build-system gnu-build-system)
1898 (native-inputs
1899 `(("flex" ,flex)
1900 ("bison" ,bison)
1901 ("gettext" ,gettext-minimal)
1902 ("pkg-config" ,pkg-config)))
1903 ;; FIXME: Add optional inputs once available.
1904 (inputs
1905 `(("alsa-lib" ,alsa-lib)
1906 ("avahi" ,avahi)
1907 ("dav1d" ,dav1d)
1908 ("dbus" ,dbus)
1909 ("eudev" ,eudev)
1910 ("flac" ,flac)
1911 ("ffmpeg" ,ffmpeg)
1912 ("fontconfig" ,fontconfig)
1913 ("freetype" ,freetype)
1914 ("fribidi" ,fribidi)
1915 ("gnutls" ,gnutls)
1916 ("liba52" ,liba52)
1917 ("libarchive" ,libarchive)
1918 ("libass" ,libass)
1919 ("libavc1394" ,libavc1394)
1920 ("libbluray" ,libbluray)
1921 ("libcaca" ,libcaca)
1922 ("libcddb" ,libcddb)
1923 ("libdca" ,libdca)
1924 ("libdvbpsi" ,libdvbpsi)
1925 ("libdvdnav" ,libdvdnav)
1926 ("libdvdread" ,libdvdread)
1927 ("libebml" ,libebml)
1928 ("libgcrypt" ,libgcrypt)
1929 ("libidn" ,libidn)
1930 ("libkate" ,libkate)
1931 ("libmad" ,libmad)
1932 ("libmatroska" ,libmatroska)
1933 ("libmicrodns" ,libmicrodns)
1934 ("libmodplug" ,libmodplug)
1935 ("libmpeg2" ,libmpeg2)
1936 ("libogg" ,libogg)
1937 ("libpng" ,libpng)
1938 ("libraw1394" ,libraw1394)
1939 ("librsvg" ,(librsvg-for-system))
1940 ("libsamplerate" ,libsamplerate)
1941 ("libsecret" ,libsecret)
1942 ("libssh2" ,libssh2)
1943 ("libupnp" ,libupnp)
1944 ("libva" ,libva)
1945 ("libvdpau" ,libvdpau)
1946 ("libvorbis" ,libvorbis)
1947 ("libvpx" ,libvpx)
1948 ("libtheora" ,libtheora)
1949 ("libx264" ,libx264)
1950 ("libxext" ,libxext)
1951 ("libxi" ,libxi)
1952 ("libxinerama" ,libxinerama)
1953 ("libxml2" ,libxml2)
1954 ("libxpm" ,libxpm)
1955 ("livemedia-utils" ,livemedia-utils)
1956 ("lua" ,lua-5.2)
1957 ("mesa" ,mesa)
1958 ("opus" ,opus)
1959 ("perl" ,perl)
1960 ("pulseaudio" ,pulseaudio)
1961 ("protobuf" ,protobuf)
1962 ("python" ,python-wrapper)
1963 ("qtbase" ,qtbase-5)
1964 ("qtsvg" ,qtsvg)
1965 ("qtx11extras" ,qtx11extras)
1966 ("samba" ,samba)
1967 ("sdl" ,sdl)
1968 ("sdl-image" ,sdl-image)
1969 ("speex" ,speex)
1970 ("speexdsp" ,speexdsp)
1971 ;; VLC is not yet compatible with SRT > 1.4.1.
1972 ("srt" ,srt-1.4.1)
1973 ("taglib" ,taglib)
1974 ("twolame" ,twolame)
1975 ("unzip" ,unzip)
1976 ("wayland" ,wayland)
1977 ("wayland-protocols" ,wayland-protocols)
1978 ("x265" ,x265)
1979 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1980 (arguments
1981 `(#:configure-flags
1982 `("BUILDCC=gcc"
1983 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1984 (assoc-ref %build-inputs "ffmpeg")
1985 "/lib")) ;needed for the tests
1986
1987 #:phases
1988 (modify-phases %standard-phases
1989 (add-after 'unpack 'patch-source
1990 (lambda* (#:key inputs #:allow-other-keys)
1991 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1992 (substitute* "configure"
1993 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1994 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1995 ;; Some of the tests require using the display to test out VLC,
1996 ;; which fails in our sandboxed build system
1997 (substitute* "test/run_vlc.sh"
1998 (("./vlc --ignore-config") "echo"))
1999 #t)))
2000 (add-after 'strip 'regenerate-plugin-cache
2001 (lambda* (#:key outputs #:allow-other-keys)
2002 ;; The 'install-exec-hook' rule in the top-level Makefile.am
2003 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
2004 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
2005 ;; it references. Thus, we first reset the timestamps of all
2006 ;; these files, and then regenerate the cache such that the
2007 ;; mtimes it includes are always zero instead of being dependent
2008 ;; on the build time.
2009 (let* ((out (assoc-ref outputs "out"))
2010 (pkglibdir (string-append out "/lib/vlc"))
2011 (plugindir (string-append pkglibdir "/plugins"))
2012 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
2013 ;; TODO: Factorize 'reset-timestamps'.
2014 (for-each (lambda (file)
2015 (let ((s (lstat file)))
2016 (unless (eq? (stat:type s) 'symlink)
2017 (utime file 1 1))))
2018 (find-files plugindir))
2019 (invoke cachegen plugindir))))
2020 (add-after 'install 'wrap-executable
2021 (lambda* (#:key outputs #:allow-other-keys)
2022 (let ((out (assoc-ref outputs "out"))
2023 (plugin-path (getenv "QT_PLUGIN_PATH")))
2024 (wrap-program (string-append out "/bin/vlc")
2025 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
2026 #t)))))
2027 (home-page "https://www.videolan.org/")
2028 (synopsis "Audio and video framework")
2029 (description "VLC is a cross-platform multimedia player and framework
2030 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
2031 streaming protocols.")
2032 (license license:gpl2+)))
2033
2034 (define-public mplayer
2035 (package
2036 (name "mplayer")
2037 (version "1.4")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append
2041 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
2042 version ".tar.xz"))
2043 (sha256
2044 (base32
2045 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
2046 (build-system gnu-build-system)
2047 ;; FIXME: Add additional inputs once available.
2048 (native-inputs
2049 (list pkg-config yasm))
2050 (inputs
2051 `(("alsa-lib" ,alsa-lib)
2052 ("cdparanoia" ,cdparanoia)
2053 ("ffmpeg" ,ffmpeg)
2054 ("fontconfig" ,fontconfig)
2055 ("freetype" ,freetype)
2056 ("giflib" ,giflib)
2057 ("lame" ,lame)
2058 ("libass" ,libass)
2059 ("libdvdcss" ,libdvdcss)
2060 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
2061 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
2062 ("libjpeg" ,libjpeg-turbo)
2063 ("libmpeg2" ,libmpeg2)
2064 ("libmpg123" ,mpg123) ; audio codec for MP3
2065 ("libpng" ,libpng)
2066 ("libtheora" ,libtheora)
2067 ("libvdpau" ,libvdpau)
2068 ("libvorbis" ,libvorbis)
2069 ("libx11" ,libx11)
2070 ("libx264" ,libx264)
2071 ("libxinerama" ,libxinerama)
2072 ("libxv" ,libxv)
2073 ("libxxf86dga" ,libxxf86dga)
2074 ("mesa" ,mesa)
2075 ("opus" ,opus)
2076 ("perl" ,perl)
2077 ("pulseaudio" ,pulseaudio)
2078 ("python" ,python-wrapper)
2079 ("sdl" ,sdl)
2080 ("speex" ,speex)
2081 ("zlib" ,zlib)))
2082 (arguments
2083 `(#:tests? #f ; no test target
2084 #:phases
2085 (modify-phases %standard-phases
2086 (replace 'configure
2087 ;; configure does not work followed by "SHELL=..." and
2088 ;; "CONFIG_SHELL=..."; set environment variables instead
2089 (lambda* (#:key inputs outputs #:allow-other-keys)
2090 (let ((out (assoc-ref outputs "out"))
2091 (libx11 (assoc-ref inputs "libx11")))
2092 (substitute* "configure"
2093 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2094 (setenv "SHELL" (which "bash"))
2095 (setenv "CONFIG_SHELL" (which "bash"))
2096 (invoke "./configure"
2097 (string-append "--extra-cflags=-I"
2098 libx11 "/include") ; to detect libx11
2099 "--disable-ffmpeg_a" ; disables bundled ffmpeg
2100 (string-append "--prefix=" out)
2101 ;; Enable runtime cpu detection where supported,
2102 ;; and choose a suitable target.
2103 ,@(match (or (%current-target-system)
2104 (%current-system))
2105 ("x86_64-linux"
2106 '("--enable-runtime-cpudetection"
2107 "--target=x86_64-linux"))
2108 ("i686-linux"
2109 '("--enable-runtime-cpudetection"
2110 "--target=i686-linux"))
2111 ("mips64el-linux"
2112 '("--target=mips3-linux"))
2113 (_ (list (string-append
2114 "--target="
2115 (or (%current-target-system)
2116 (nix-system->gnu-triplet
2117 (%current-system)))))))
2118 "--disable-iwmmxt")))))))
2119 (home-page "https://www.mplayerhq.hu")
2120 (synopsis "Audio and video player")
2121 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
2122 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
2123 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
2124 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
2125 (license license:gpl2)))
2126
2127 (define-public mpv
2128 (package
2129 (name "mpv")
2130 (version "0.34.1")
2131 (source (origin
2132 (method git-fetch)
2133 (uri (git-reference
2134 (url "https://github.com/mpv-player/mpv")
2135 (commit (string-append "v" version))))
2136 (file-name (git-file-name name version))
2137 (sha256
2138 (base32 "12qxwm1ww5vhjddl8yvj1xa0n1fi9z3lmzwhaiday2v59ca0qgsk"))))
2139 (build-system waf-build-system)
2140 (native-inputs
2141 (list perl ; for zsh completion file
2142 pkg-config python-docutils))
2143 ;; Missing features: libguess, V4L2
2144 (inputs
2145 `(("alsa-lib" ,alsa-lib)
2146 ("enca" ,enca)
2147 ("ffmpeg" ,ffmpeg)
2148 ("jack" ,jack-1)
2149 ("ladspa" ,ladspa)
2150 ("lcms" ,lcms)
2151 ("libass" ,libass)
2152 ("libbluray" ,libbluray)
2153 ("libcaca" ,libcaca)
2154 ("libbs2b" ,libbs2b)
2155 ("libcdio-paranoia" ,libcdio-paranoia)
2156 ("libdvdread" ,libdvdread)
2157 ("libdvdnav" ,libdvdnav)
2158 ("libjpeg" ,libjpeg-turbo)
2159 ("libva" ,libva)
2160 ("libvdpau" ,libvdpau)
2161 ("libx11" ,libx11)
2162 ("libxext" ,libxext)
2163 ("libxinerama" ,libxinerama)
2164 ("libxrandr" ,libxrandr)
2165 ("libxscrnsaver" ,libxscrnsaver)
2166 ("libxv" ,libxv)
2167 ;; XXX: lua > 5.2 is not currently supported; see
2168 ;; waftools/checks/custom.py
2169 ("lua" ,lua-5.2)
2170 ("mesa" ,mesa)
2171 ("mpg123" ,mpg123)
2172 ("pulseaudio" ,pulseaudio)
2173 ("rsound" ,rsound)
2174 ("shaderc" ,shaderc)
2175 ("vulkan-headers" ,vulkan-headers)
2176 ("vulkan-loader" ,vulkan-loader)
2177 ("waf" ,python-waf)
2178 ("wayland" ,wayland)
2179 ("wayland-protocols" ,wayland-protocols)
2180 ("libxkbcommon" ,libxkbcommon)
2181 ("yt-dlp" ,yt-dlp)
2182 ("zlib" ,zlib)))
2183 (arguments
2184 '(#:phases
2185 (modify-phases %standard-phases
2186 (add-after 'unpack 'patch-paths
2187 (lambda* (#:key inputs #:allow-other-keys)
2188 (let ((ytdl (assoc-ref inputs "yt-dlp")))
2189 (substitute* "player/lua/ytdl_hook.lua"
2190 (("\"yt-dlp\",")
2191 (string-append "\"" ytdl "/bin/yt-dlp\","))))))
2192 (add-before 'configure 'build-reproducibly
2193 (lambda _
2194 ;; Somewhere in the build system library dependencies are enumerated
2195 ;; and passed as linker flags, but the order in which they are added
2196 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
2197 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
2198 (setenv "PYTHONHASHSEED" "1")
2199 #t))
2200 (add-before
2201 'configure 'setup-waf
2202 (lambda* (#:key inputs #:allow-other-keys)
2203 (let ((waf (assoc-ref inputs "waf")))
2204 (copy-file (string-append waf "/bin/waf") "waf"))
2205 (setenv "CC" "gcc")
2206 #t)))
2207 #:configure-flags (list "--enable-libmpv-shared"
2208 "--enable-cdda"
2209 "--enable-dvdnav"
2210 "--disable-build-date")
2211 ;; No check function defined.
2212 #:tests? #f))
2213 (home-page "https://mpv.io/")
2214 (synopsis "Audio and video player")
2215 (description "mpv is a general-purpose audio and video player. It is a
2216 fork of mplayer2 and MPlayer. It shares some features with the former
2217 projects while introducing many more.")
2218 (license license:gpl2+)))
2219
2220 (define-public smplayer
2221 (package
2222 (name "smplayer")
2223 (version "21.10.0")
2224 (source (origin
2225 (method url-fetch)
2226 (uri (string-append
2227 "mirror://sourceforge/smplayer/SMPlayer/" version
2228 "/smplayer-" version ".tar.bz2"))
2229 (sha256
2230 (base32
2231 "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22rc"))))
2232 (build-system qt-build-system)
2233 (native-inputs
2234 (list qttools))
2235 (inputs
2236 (list bash-minimal qtbase-5 zlib mpv))
2237 (arguments
2238 (list #:tests? #false ; no tests
2239 #:make-flags #~(list (string-append "PREFIX=" #$output)
2240 (string-append "CC=" #+(cc-for-target))
2241 ;; A KLUDGE to turn off invoking lrelease on the
2242 ;; project for now, because it fails consistently
2243 ;; with "WARNING: Could not find qmake spec
2244 ;; 'default'". See below.
2245 "LRELEASE=true")
2246 #:phases
2247 #~(modify-phases %standard-phases
2248 (delete 'configure)
2249 ;; Due to the above, we must run lrelease separately on each .ts file
2250 ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
2251 ;; project, as the Makefile does normally without the above kludge).
2252 (add-after 'build 'compile-ts-files
2253 (lambda _
2254 (for-each (lambda (file)
2255 (invoke "lrelease" file))
2256 (find-files "./" "\\.ts$"))))
2257 (add-after 'install 'wrap-executable
2258 (lambda* (#:key inputs outputs #:allow-other-keys)
2259 (let* ((out (assoc-ref outputs "out"))
2260 (mpv (assoc-ref inputs "mpv")))
2261 (wrap-program (string-append out "/bin/smplayer")
2262 `("PATH" ":" prefix
2263 ,(list (string-append mpv "/bin"))))))))))
2264 (home-page "https://www.smplayer.info")
2265 (synopsis "Complete front-end for MPlayer, a media player")
2266 (description "SMPlayer is a graphical user interface (GUI) for
2267 MPlayer, which is capable of playing almost all known video and audio
2268 formats. Apart from providing access for the most common and useful
2269 options of MPlayer, SMPlayer adds other interesting features like the
2270 possibility to play Youtube videos, download subtitles, remember
2271 the last played position, etc.")
2272 (license license:gpl2+)))
2273
2274 (define-public gallery-dl
2275 (package
2276 (name "gallery-dl")
2277 (version "1.20.5")
2278 (source (origin
2279 (method url-fetch)
2280 (uri (string-append "https://github.com/mikf/gallery-dl"
2281 "/releases/download/v" version "/gallery_dl-"
2282 version ".tar.gz"))
2283 (sha256
2284 (base32
2285 "0149hd4nh7bk2yqjdnvrkvag5mwgsb6gxrgfcd88q4cv3k2ji42h"))))
2286 (build-system python-build-system)
2287 (inputs (list python-requests ffmpeg))
2288 (home-page "https://github.com/mikf/gallery-dl")
2289 (synopsis "Command-line program to download images from several sites")
2290 (description "Gallery-dl is a command-line program that downloads image
2291 galleries and collections from several image hosting sites. While this package
2292 can use youtube-dl or yt-dlp packages to download videos, the focus is more on
2293 images and image hosting sites.")
2294 (license license:gpl2)))
2295
2296 (define-public gnome-mpv
2297 (deprecated-package "gnome-mpv" celluloid))
2298
2299 (define-public mpv-mpris
2300 (package
2301 (name "mpv-mpris")
2302 (version "0.6")
2303 (source
2304 (origin
2305 (method git-fetch)
2306 (uri (git-reference
2307 (url "https://github.com/hoyon/mpv-mpris")
2308 (commit version)))
2309 (file-name (git-file-name name version))
2310 (sha256
2311 (base32 "03gldk149i2108w3ylyfmci77kdq4whdzfavh7hjviwyj534101r"))))
2312 (build-system copy-build-system)
2313 (arguments
2314 '(#:install-plan
2315 '(("mpris.so" "lib/"))
2316 #:phases
2317 (modify-phases %standard-phases
2318 (add-before 'install 'build
2319 (lambda _
2320 (setenv "CC" (which "gcc"))
2321 (invoke "make"))))))
2322 (native-inputs
2323 (list pkg-config))
2324 (inputs
2325 (list glib mpv))
2326 (home-page "https://github.com/hoyon/mpv-mpris")
2327 (synopsis "MPRIS plugin for mpv")
2328 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2329 Interfacing Specification) plugin for the @code{mpv} media player. It implements
2330 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2331 interfaces.
2332
2333 To load this plugin, specify the following option when starting mpv:
2334 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2335 @file{$HOME/.config/mpv/scripts}.")
2336 (license license:expat)))
2337
2338 (define-public libvpx
2339 (package
2340 (name "libvpx")
2341 (version "1.11.0")
2342 (source (origin
2343 (method git-fetch)
2344 (uri (git-reference
2345 (url "https://chromium.googlesource.com/webm/libvpx")
2346 (commit (string-append "v" version))))
2347 (file-name (git-file-name name version))
2348 (sha256
2349 (base32
2350 "00f1jrclai2b6ys78dpsg6r1mvcyxlna93vxcz8zjyia24c2pjsb"))
2351 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
2352 (build-system gnu-build-system)
2353 (arguments
2354 `(#:configure-flags (list "--enable-shared"
2355 "--disable-static"
2356 "--as=yasm"
2357 ;; Limit size to avoid CVE-2015-1258
2358 "--size-limit=16384x16384"
2359 (string-append "--prefix=" (assoc-ref %outputs "out")))
2360 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2361 (assoc-ref %outputs "out") "/lib"))
2362 #:phases (modify-phases %standard-phases
2363 (replace 'configure
2364 (lambda* (#:key configure-flags #:allow-other-keys)
2365 ;; The configure script does not understand some of the GNU
2366 ;; options, so we only add the flags specified above.
2367 (apply invoke "./configure" configure-flags))))
2368
2369 ;; XXX: The test suite wants to download 871 files from a cloud storage
2370 ;; service (see test/test-data.sha1). It is possible to specify a
2371 ;; custom directory, but there seems to be no tarball with all files.
2372 #:tests? #f))
2373 (native-inputs
2374 (list perl yasm))
2375 (synopsis "VP8/VP9 video codec")
2376 (description "libvpx is a codec for the VP8/VP9 video compression format.")
2377 (license license:bsd-3)
2378 (home-page "https://www.webmproject.org/")))
2379
2380 (define-public youtube-dl
2381 (package
2382 (name "youtube-dl")
2383 (version "2021.12.17")
2384 (source (origin
2385 (method url-fetch)
2386 (uri (string-append "https://youtube-dl.org/downloads/latest/"
2387 "youtube-dl-" version ".tar.gz"))
2388 (sha256
2389 (base32
2390 "1prm84ci1n1kjzhikhrsbxbgziw6br822psjnijm2ibqnz49jfwz"))
2391 (snippet
2392 '(begin
2393 ;; Delete the pre-generated files, except for the man page
2394 ;; which requires 'pandoc' to build.
2395 (for-each delete-file '("youtube-dl"
2396 ;;pandoc is needed to generate
2397 ;;"youtube-dl.1"
2398 "youtube-dl.bash-completion"
2399 "youtube-dl.fish"
2400 "youtube-dl.zsh"))))))
2401 (build-system python-build-system)
2402 (arguments
2403 ;; The problem here is that the directory for the man page and completion
2404 ;; files is relative, and for some reason, setup.py uses the
2405 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2406 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2407 ;; completion file is called 'youtube-dl' rather than
2408 ;; 'youtube-dl.bash-completion'.
2409 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2410 #:phases (modify-phases %standard-phases
2411 (add-after 'unpack 'default-to-the-ffmpeg-input
2412 (lambda _
2413 ;; See <https://issues.guix.gnu.org/43418#5>.
2414 ;; ffmpeg is big but required to request free formats
2415 ;; from, e.g., YouTube so pull it in unconditionally.
2416 ;; Continue respecting the --ffmpeg-location argument.
2417 (substitute* "youtube_dl/postprocessor/ffmpeg.py"
2418 (("\\.get\\('ffmpeg_location'\\)" match)
2419 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2420 (add-before 'build 'build-generated-files
2421 (lambda _
2422 ;; Avoid the make targets that require pandoc.
2423 (invoke "make"
2424 "PYTHON=python"
2425 "youtube-dl"
2426 ;;"youtube-dl.1" ; needs pandoc
2427 "youtube-dl.bash-completion"
2428 "youtube-dl.zsh"
2429 "youtube-dl.fish")))
2430 (add-before 'install 'fix-the-data-directories
2431 (lambda* (#:key outputs #:allow-other-keys)
2432 (let ((prefix (assoc-ref outputs "out")))
2433 (mkdir "bash-completion")
2434 (rename-file "youtube-dl.bash-completion"
2435 "bash-completion/youtube-dl")
2436 (substitute* "setup.py"
2437 (("youtube-dl\\.bash-completion")
2438 "bash-completion/youtube-dl")
2439 (("'etc/")
2440 (string-append "'" prefix "/etc/"))
2441 (("'share/")
2442 (string-append "'" prefix "/share/"))))))
2443 (add-after 'install 'install-completion
2444 (lambda* (#:key outputs #:allow-other-keys)
2445 (let* ((out (assoc-ref outputs "out"))
2446 (zsh (string-append out
2447 "/share/zsh/site-functions")))
2448 (mkdir-p zsh)
2449 (copy-file "youtube-dl.zsh"
2450 (string-append zsh "/_youtube-dl"))))))))
2451 (native-inputs
2452 (list zip))
2453 (inputs
2454 (list ffmpeg))
2455 (synopsis "Download videos from YouTube.com and other sites")
2456 (description
2457 "Youtube-dl is a small command-line program to download videos from
2458 YouTube.com and many more sites.")
2459 (home-page "https://yt-dl.org")
2460 (properties '((release-monitoring-url . "https://yt-dl.org/downloads/")))
2461 (license license:public-domain)))
2462
2463 (define-public yt-dlp
2464 (package/inherit youtube-dl
2465 (name "yt-dlp")
2466 (version "2022.05.18")
2467 (source (origin
2468 (method url-fetch)
2469 (uri (string-append "https://github.com/yt-dlp/yt-dlp/"
2470 "releases/download/"
2471 version "/yt-dlp.tar.gz"))
2472 (sha256
2473 (base32
2474 "0wiiwqj8m4z6lladmrsp9354ddwlhn2gf0b39j271001g6fyi82r"))
2475 (snippet
2476 '(begin
2477 ;; Delete the pre-generated files, except for the man page
2478 ;; which requires 'pandoc' to build.
2479 (for-each delete-file '("yt-dlp"
2480 ;;pandoc is needed to generate
2481 ;;"yt-dlp.1"
2482 "completions/bash/yt-dlp"
2483 "completions/fish/yt-dlp.fish"
2484 "completions/zsh/_yt-dlp"))))))
2485 (arguments
2486 (substitute-keyword-arguments (package-arguments youtube-dl)
2487 ((#:tests? _) #t)
2488 ((#:phases phases)
2489 `(modify-phases ,phases
2490 ;; See the comment for the corresponding phase in youtube-dl.
2491 (replace 'default-to-the-ffmpeg-input
2492 (lambda _
2493 (substitute* "yt_dlp/postprocessor/ffmpeg.py"
2494 (("\\.get_param\\('ffmpeg_location'\\)" match)
2495 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2496 (replace 'build-generated-files
2497 (lambda _
2498 ;; Avoid the yt-dlp.1 target, which requires pandoc.
2499 (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
2500 (replace 'fix-the-data-directories
2501 (lambda* (#:key outputs #:allow-other-keys)
2502 (let ((prefix (assoc-ref outputs "out")))
2503 (substitute* "setup.py"
2504 (("'etc/")
2505 (string-append "'" prefix "/etc/"))
2506 (("'share/")
2507 (string-append "'" prefix "/share/"))))))
2508 (delete 'install-completion)
2509 (replace 'check
2510 (lambda* (#:key tests? #:allow-other-keys)
2511 (when tests?
2512 (invoke "pytest" "-k" "not download"))))))))
2513 (inputs
2514 `(("python-brotli" ,python-brotli)
2515 ("python-certifi" ,python-certifi)
2516 ("python-mutagen" ,python-mutagen)
2517 ("python-pycryptodomex" ,python-pycryptodomex)
2518 ("python-websockets" ,python-websockets)
2519 ,@(package-inputs youtube-dl)))
2520 (native-inputs
2521 `(("python-pytest" ,python-pytest)
2522 ,@(package-native-inputs youtube-dl)))
2523 (description
2524 "yt-dlp is a small command-line program to download videos from
2525 YouTube.com and many more sites. It is a fork of youtube-dl with a
2526 focus on adding new features while keeping up-to-date with the
2527 original project.")
2528 (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/")))
2529 (home-page "https://github.com/yt-dlp/yt-dlp")))
2530
2531 (define-public youtube-dl-gui
2532 (package
2533 (name "youtube-dl-gui")
2534 (version "0.4")
2535 (source
2536 (origin
2537 (method url-fetch)
2538 (uri (pypi-uri "Youtube-DLG" version))
2539 (sha256
2540 (base32
2541 "1bvq2wyn6az59vpdy04dh68fs8m2qzz948xhphibbcpwpcdk00cd"))))
2542 (build-system python-build-system)
2543 (arguments
2544 ;; In Guix, wxpython has not yet been packaged for Python 3.
2545 `(#:python ,python-2
2546 ;; This package has no tests.
2547 #:tests? #f
2548 #:phases
2549 (modify-phases %standard-phases
2550 (add-before 'build 'patch-source
2551 (lambda* (#:key inputs #:allow-other-keys)
2552 ;; The youtube-dl-gui program lets you configure options. Some of
2553 ;; them are problematic, so we change their defaults.
2554 (substitute* "youtube_dl_gui/optionsmanager.py"
2555 ;; When this is true, the builder process will try (and fail) to
2556 ;; write logs to the builder user's home directory.
2557 (("'enable_log': True") "'enable_log': False")
2558 ;; This determines which youtube-dl program youtube-dl-gui will
2559 ;; run. If we don't set this, then youtube-dl-gui might download
2560 ;; an arbitrary copy from the Internet into the user's home
2561 ;; directory and run it, so let's make sure youtube-dl-gui uses
2562 ;; the youtube-dl from the inputs by default.
2563 (("'youtubedl_path': self.config_path")
2564 (string-append "'youtubedl_path': '"
2565 (assoc-ref inputs "youtube-dl")
2566 "/bin'"))
2567 ;; When this is True, when youtube-dl-gui is finished downloading
2568 ;; a file, it will try (and possibly fail) to open the directory
2569 ;; containing the downloaded file. This can fail because it
2570 ;; assumes that xdg-open is in PATH. Unfortunately, simply
2571 ;; adding xdg-utils to the propagated inputs is not enough to
2572 ;; make this work, so for now we set the default to False.
2573 (("'open_dl_dir': True") "'open_dl_dir': False"))
2574 ;; The youtube-dl program from the inputs is actually a wrapper
2575 ;; script written in bash, so attempting to invoke it as a python
2576 ;; script will fail.
2577 (substitute* "youtube_dl_gui/downloaders.py"
2578 (("cmd = \\['python', self\\.youtubedl_path\\]")
2579 "cmd = [self.youtubedl_path]"))
2580 ;; Use relative paths for installing data files so youtube-dl-gui
2581 ;; installs the files relative to its prefix in the store, rather
2582 ;; than relative to /. Also, instead of installing data files into
2583 ;; $prefix/usr/share, install them into $prefix/share for
2584 ;; consistency (see: (standards) Directory Variables).
2585 (substitute* "setup.py"
2586 (("= '/usr/share") "= 'share"))
2587 ;; Update get_locale_file() so it finds the installed localization
2588 ;; files.
2589 (substitute* "youtube_dl_gui/utils.py"
2590 (("os\\.path\\.join\\('/usr', 'share'")
2591 (string-append "os.path.join('"
2592 (assoc-ref %outputs "out")
2593 "', 'share'")))
2594 #t))
2595 (add-after 'install 'create-desktop-file
2596 (lambda* (#:key outputs #:allow-other-keys)
2597 (let* ((out (assoc-ref outputs "out"))
2598 (applications (string-append out "/share/applications")))
2599 (mkdir-p applications)
2600 (call-with-output-file
2601 (string-append applications "/youtube-dl-gui.desktop")
2602 (lambda (file)
2603 (format
2604 file
2605 "[Desktop Entry]~@
2606 Name=Youtube-dl GUI~@
2607 Comment=Graphical interface to download video with youtube-dl~@
2608 Exec=youtube-dl-gui~@
2609 TryExec=youtube-dl-gui~@
2610 Terminal=false~@
2611 Icon=youtube-dl-gui~@
2612 Type=Application~@
2613 Categories=AudioVideo;Audio;Video;Network~%")))
2614 #t))))))
2615 (native-inputs
2616 (list gettext-minimal))
2617 (inputs
2618 (list python2-twodict python2-wxpython youtube-dl))
2619 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
2620 (synopsis
2621 "GUI (Graphical User Interface) for @command{youtube-dl}")
2622 (description
2623 "Youtube-dlG is a GUI (Graphical User Interface) for
2624 @command{youtube-dl}. You can use it to download videos from YouTube and any
2625 other site that youtube-dl supports.")
2626 (license license:unlicense)))
2627
2628 (define-public you-get
2629 (package
2630 (name "you-get")
2631 (version "0.4.1555")
2632 (source (origin
2633 (method git-fetch)
2634 (uri (git-reference
2635 (url "https://github.com/soimort/you-get")
2636 (commit (string-append "v" version))))
2637 (file-name (git-file-name name version))
2638 (sha256
2639 (base32
2640 "0gn86i6nfsw395r9a3i88nv2g08s5bgjps7w4qawb9gvk4h7zqap"))))
2641 (build-system python-build-system)
2642 (inputs
2643 (list ffmpeg)) ; for multi-part and >=1080p videos
2644 (arguments
2645 `(#:phases
2646 (modify-phases %standard-phases
2647 (add-after 'unpack 'qualify-input-references
2648 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2649 ;; happens to be in the user's $PATH at run time.
2650 (lambda* (#:key inputs #:allow-other-keys)
2651 (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
2652 (substitute* "src/you_get/processor/ffmpeg.py"
2653 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2654 ;; same string is also used when sniffing ffmpeg's output.
2655 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2656 (string-append prefix "'" ffmpeg "'")))))))
2657 #:tests? #f)) ; XXX some tests need Internet access
2658 (synopsis "Download videos, audio, or images from Web sites")
2659 (description
2660 "You-Get is a command-line utility to download media contents (videos,
2661 audio, images) from the Web. It can use either mpv or vlc for playback.")
2662 (home-page "https://you-get.org/")
2663 (license license:expat)))
2664
2665 (define-public youtube-viewer
2666 (package
2667 (name "youtube-viewer")
2668 (version "3.8.1")
2669 (source (origin
2670 (method git-fetch)
2671 (uri (git-reference
2672 (url "https://github.com/trizen/youtube-viewer")
2673 (commit version)))
2674 (file-name (git-file-name name version))
2675 (sha256
2676 (base32
2677 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
2678 (build-system perl-build-system)
2679 (native-inputs
2680 (list perl-module-build))
2681 (inputs
2682 (list perl-data-dump
2683 perl-file-sharedir
2684 perl-gtk2
2685 perl-json
2686 perl-json-xs
2687 perl-libwww
2688 perl-lwp-protocol-https
2689 perl-lwp-useragent-cached
2690 perl-memoize
2691 perl-mozilla-ca
2692 perl-term-readline-gnu
2693 perl-unicode-linebreak
2694 xdg-utils
2695 ;; Some videos play without youtube-dl, but others silently fail to.
2696 youtube-dl))
2697 (arguments
2698 `(#:modules ((guix build perl-build-system)
2699 (guix build utils)
2700 (srfi srfi-26))
2701 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2702 ;; is broken without perl-gtk3.
2703 #:module-build-flags '("--gtk2")
2704 #:phases
2705 (modify-phases %standard-phases
2706 (add-after 'unpack 'refer-to-inputs
2707 (lambda* (#:key inputs #:allow-other-keys)
2708 (substitute* "lib/WWW/YoutubeViewer.pm"
2709 (("'youtube-dl'")
2710 (format #f "'~a/bin/youtube-dl'"
2711 (assoc-ref inputs "youtube-dl"))))
2712 (substitute* '("bin/gtk2-youtube-viewer"
2713 "bin/gtk3-youtube-viewer")
2714 (("'xdg-open'")
2715 (format #f "'~a/bin/xdg-open'"
2716 (assoc-ref inputs "xdg-utils"))))
2717 #t))
2718 (add-after 'install 'install-desktop
2719 (lambda* (#:key outputs #:allow-other-keys)
2720 (let* ((out (assoc-ref outputs "out"))
2721 (sharedir (string-append out "/share")))
2722 (install-file "share/gtk-youtube-viewer.desktop"
2723 (string-append sharedir "/applications"))
2724 (install-file "share/icons/gtk-youtube-viewer.png"
2725 (string-append sharedir "/pixmaps"))
2726 #t)))
2727 (add-after 'install 'wrap-program
2728 (lambda* (#:key outputs #:allow-other-keys)
2729 (let* ((out (assoc-ref outputs "out"))
2730 (bin-dir (string-append out "/bin/"))
2731 (site-dir (string-append out "/lib/perl5/site_perl/"))
2732 (lib-path (getenv "PERL5LIB")))
2733 (for-each (cut wrap-program <>
2734 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2735 (find-files bin-dir))
2736 #t))))))
2737 (synopsis
2738 "Lightweight application for searching and streaming videos from YouTube")
2739 (description
2740 "Youtube-viewer searches and plays YouTube videos in a native player.
2741 It comes with various search options; it can search for videos, playlists
2742 and/or channels. The videos are streamed directly in a selected video player
2743 at the best resolution (customizable) and with closed-captions (if available).
2744 Both command-line and GTK2 interface are available.")
2745 (home-page "https://github.com/trizen/youtube-viewer")
2746 (license license:perl-license)))
2747
2748 (define-public libbluray
2749 (package
2750 (name "libbluray")
2751 (version "1.0.2")
2752 (source (origin
2753 (method url-fetch)
2754 (uri (string-append "https://download.videolan.org/videolan/"
2755 name "/" version "/"
2756 name "-" version ".tar.bz2"))
2757 (sha256
2758 (base32
2759 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
2760 (build-system gnu-build-system)
2761 (arguments
2762 `(#:configure-flags '("--disable-bdjava-jar"
2763 "--disable-static")
2764 #:phases
2765 (modify-phases %standard-phases
2766 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2767 ;; Avoid the need to propagate libxml2 by referring to it
2768 ;; directly, as is already done for fontconfig & freetype.
2769 (lambda* (#:key inputs #:allow-other-keys)
2770 (let ((libxml2 (assoc-ref inputs "libxml2")))
2771 (substitute* "configure"
2772 ((" libxml-2.0") ""))
2773 (substitute* "src/libbluray.pc.in"
2774 (("^Libs.private:" field)
2775 (string-append field " -L" libxml2 "/lib -lxml2")))
2776 #t)))
2777 (add-before 'build 'fix-dlopen-paths
2778 (lambda* (#:key inputs #:allow-other-keys)
2779 (let ((libaacs (assoc-ref inputs "libaacs"))
2780 (libbdplus (assoc-ref inputs "libbdplus")))
2781 (substitute* "src/libbluray/disc/aacs.c"
2782 (("\"libaacs\"")
2783 (string-append "\"" libaacs "/lib/libaacs\"")))
2784 (substitute* "src/libbluray/disc/bdplus.c"
2785 (("\"libbdplus\"")
2786 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2787 #t))))))
2788 (native-inputs (list pkg-config))
2789 (inputs
2790 `(("fontconfig" ,fontconfig)
2791 ("freetype" ,freetype)
2792 ("libaacs" ,libaacs)
2793 ("libbdplus" ,libbdplus)
2794 ("libxml2" ,libxml2)))
2795 (home-page "https://www.videolan.org/developers/libbluray.html")
2796 (synopsis "Blu-Ray Disc playback library")
2797 (description
2798 "libbluray is a library designed for Blu-Ray Disc playback for media
2799 players, like VLC or MPlayer.")
2800 (license license:lgpl2.1+)))
2801
2802 (define-public libdvdread
2803 (package
2804 (name "libdvdread")
2805 (version "6.0.2")
2806 (source (origin
2807 (method url-fetch)
2808 (uri (string-append "https://download.videolan.org/videolan/"
2809 "libdvdread/" version "/"
2810 "libdvdread-" version ".tar.bz2"))
2811 (sha256
2812 (base32
2813 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
2814 (build-system gnu-build-system)
2815 (arguments
2816 `(#:configure-flags '("--with-libdvdcss=yes")))
2817 (native-inputs
2818 (list pkg-config))
2819 (propagated-inputs
2820 (list libdvdcss))
2821 (home-page "http://dvdnav.mplayerhq.hu/")
2822 (synopsis "Library for reading video DVDs")
2823 (description
2824 "Libdvdread provides a simple foundation for reading DVD video
2825 disks. It provides the functionality that is required to access many
2826 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2827 authentication and descrambling (if an external libdvdcss library is
2828 installed).")
2829 (license license:gpl2+)))
2830
2831 (define-public dvdauthor
2832 (package
2833 (name "dvdauthor")
2834 (version "0.7.2")
2835 (source
2836 (origin
2837 (method url-fetch)
2838 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2839 version ".tar.gz"))
2840 (sha256
2841 (base32
2842 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2843 (build-system gnu-build-system)
2844 (inputs
2845 (list libdvdread libpng imagemagick libxml2 freetype))
2846 (native-inputs
2847 (list pkg-config))
2848 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2849 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2850 MPEG-2 stream containing VOB packets.")
2851 (home-page "http://dvdauthor.sourceforge.net")
2852 (license license:gpl3+)))
2853
2854 (define-public libdvdnav
2855 (package
2856 (name "libdvdnav")
2857 (version "6.0.1")
2858 (source (origin
2859 (method url-fetch)
2860 (uri (string-append "https://download.videolan.org/videolan/"
2861 "libdvdnav/" version "/"
2862 "libdvdnav-" version ".tar.bz2"))
2863 (sha256
2864 (base32
2865 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2866 (build-system gnu-build-system)
2867 (native-inputs
2868 (list pkg-config))
2869 (inputs
2870 (list libdvdread))
2871 (home-page "http://dvdnav.mplayerhq.hu/")
2872 (synopsis "Library for video DVD navigation features")
2873 (description
2874 "Libdvdnav is a library for developers of multimedia
2875 applications. It allows easy use of sophisticated DVD navigation features
2876 such as DVD menus, multiangle playback and even interactive DVD games. All
2877 this functionality is provided through a simple API which provides the DVD
2878 playback as a single logical stream of blocks, intermitted by special
2879 dvdnav events to report certain conditions. The main usage of libdvdnav is
2880 a loop regularly calling a function to get the next block, surrounded by
2881 additional calls to tell the library of user interaction. The whole
2882 DVD virtual machine and internal playback states are completely
2883 encapsulated.")
2884 (license license:gpl2+)))
2885
2886 (define-public libdvdcss
2887 (package
2888 (name "libdvdcss")
2889 (version "1.4.3")
2890 (source (origin
2891 (method url-fetch)
2892 (uri (string-append "https://download.videolan.org/pub/"
2893 name "/" version "/"
2894 name "-" version ".tar.bz2"))
2895 (sha256
2896 (base32
2897 "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13"))))
2898 (build-system gnu-build-system)
2899 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2900 (synopsis "Library for accessing DVDs as block devices")
2901 (description
2902 "libdvdcss is a simple library designed for accessing DVDs like a block
2903 device without having to bother about the decryption.")
2904 (license license:gpl2+)))
2905
2906 (define-public srt2vtt
2907 (package
2908 (name "srt2vtt")
2909 (version "0.2")
2910 (source (origin
2911 (method url-fetch)
2912 (uri (string-append
2913 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2914 version ".tar.gz"))
2915 (sha256
2916 (base32
2917 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
2918 (build-system gnu-build-system)
2919 (arguments
2920 `(#:phases
2921 (modify-phases %standard-phases
2922 (add-after 'install 'wrap-srt2vtt
2923 (lambda* (#:key outputs #:allow-other-keys)
2924 (let* ((out (assoc-ref outputs "out"))
2925 (bin (string-append out "/bin"))
2926 (version ,(let ((v (package-version guile-3.0)))
2927 (string-append (car (string-split v #\.))
2928 ".0")))
2929 (site (string-append out "/share/guile/site/" version))
2930 (compiled (string-append
2931 out "/lib/guile/" version
2932 "/site-ccache")))
2933 (wrap-program (string-append bin "/srt2vtt")
2934 `("GUILE_LOAD_PATH" ":" prefix (,site))
2935 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
2936 (native-inputs
2937 (list pkg-config))
2938 (inputs
2939 (list guile-3.0))
2940 (synopsis "SubRip to WebVTT subtitle converter")
2941 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2942 for use with HTML5 video.")
2943 (home-page "https://dthompson.us/projects/srt2vtt.html")
2944 (license license:gpl3+)))
2945
2946 (define-public avidemux
2947 (package
2948 (name "avidemux")
2949 (version "2.7.8")
2950 (source (origin
2951 (method url-fetch)
2952 (uri (string-append
2953 "mirror://sourceforge/avidemux/avidemux/" version "/"
2954 "avidemux_" version ".tar.gz"))
2955 (sha256
2956 (base32
2957 "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2"))
2958 (patches (search-patches "avidemux-install-to-lib.patch"))))
2959 (build-system cmake-build-system)
2960 (native-inputs
2961 `(("perl" ,perl)
2962 ("pkg-config" ,pkg-config)
2963 ("python" ,python-wrapper)
2964 ("qttools" ,qttools)
2965 ("yasm" ,yasm)))
2966 ;; FIXME: Once packaged, add libraries not found during the build.
2967 (inputs
2968 `(("alsa-lib" ,alsa-lib)
2969 ("fontconfig" ,fontconfig)
2970 ("freetype" ,freetype)
2971 ("fribidi" ,fribidi)
2972 ("glu" ,glu)
2973 ("jack" ,jack-1)
2974 ("lame" ,lame)
2975 ("libaom" ,libaom)
2976 ("libva" ,libva)
2977 ("libvdpau" ,libvdpau)
2978 ("libvorbis" ,libvorbis)
2979 ("libvpx" ,libvpx)
2980 ("libxv" ,libxv)
2981 ("pulseaudio" ,pulseaudio)
2982 ("qtbase" ,qtbase-5)
2983 ("sqlite" ,sqlite)
2984 ("zlib" ,zlib)))
2985 (arguments
2986 `(#:tests? #f ; no check target
2987 #:phases
2988 ;; Make sure files inside the included ffmpeg tarball are
2989 ;; patch-shebanged.
2990 (let ((ffmpeg "ffmpeg-4.2.4"))
2991 (modify-phases %standard-phases
2992 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2993 (lambda _
2994 (with-directory-excursion "avidemux_core/ffmpeg_package"
2995 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2996 (delete-file (string-append ffmpeg ".tar.bz2")))
2997 #t))
2998 (add-after 'patch-source-shebangs 'repack-ffmpeg
2999 (lambda _
3000 (with-directory-excursion "avidemux_core/ffmpeg_package"
3001 (substitute* (string-append ffmpeg "/configure")
3002 (("#! /bin/sh") (string-append "#!" (which "sh"))))
3003 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
3004 ;; avoid non-determinism in the archive
3005 "--sort=name" "--mtime=@0"
3006 "--owner=root:0" "--group=root:0")
3007 (delete-file-recursively ffmpeg))
3008 #t))
3009 (replace 'configure
3010 (lambda _
3011 ;; Copy-paste settings from the cmake build system.
3012 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
3013 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
3014 #t))
3015 (replace 'build
3016 (lambda* (#:key inputs outputs #:allow-other-keys)
3017 (let* ((out (assoc-ref outputs "out"))
3018 (lib (string-append out "/lib"))
3019 (top (getcwd))
3020 (build_component
3021 (lambda* (component srcdir #:optional (args '()))
3022 (let ((builddir (string-append "build_" component)))
3023 (mkdir builddir)
3024 (with-directory-excursion builddir
3025 (apply invoke "cmake"
3026 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
3027 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
3028 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
3029 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
3030 "\"-Wl,-rpath=" lib "\"")
3031 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
3032 (string-append "../" srcdir)
3033 "-DENABLE_QT5=True"
3034 args)
3035 (invoke "make" "-j"
3036 (number->string (parallel-job-count)))
3037 (invoke "make" "install"))))))
3038 (mkdir out)
3039 (build_component "core" "avidemux_core")
3040 (build_component "cli" "avidemux/cli")
3041 (build_component "qt4" "avidemux/qt4")
3042 (build_component "plugins_common" "avidemux_plugins"
3043 '("-DPLUGIN_UI=COMMON"))
3044 (build_component "plugins_cli" "avidemux_plugins"
3045 '("-DPLUGIN_UI=CLI"))
3046 (build_component "plugins_qt4" "avidemux_plugins"
3047 '("-DPLUGIN_UI=QT4"))
3048 (build_component "plugins_settings" "avidemux_plugins"
3049 '("-DPLUGIN_UI=SETTINGS"))
3050 ;; Remove .exe and .dll file.
3051 (delete-file-recursively
3052 (string-append out "/share/ADM6_addons"))
3053 #t)))
3054 (delete 'install)))))
3055 (home-page "http://fixounet.free.fr/avidemux/")
3056 (synopsis "Video editor")
3057 (description "Avidemux is a video editor designed for simple cutting,
3058 filtering and encoding tasks. It supports many file types, including AVI,
3059 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
3060 can be automated using projects, job queue and powerful scripting
3061 capabilities.")
3062 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
3063 ;; Software with various licenses is included, see License.txt.
3064 (license license:gpl2+)))
3065
3066 (define-public vapoursynth
3067 (package
3068 (name "vapoursynth")
3069 (version "53")
3070 (source (origin
3071 (method git-fetch)
3072 (uri (git-reference
3073 (url "https://github.com/vapoursynth/vapoursynth")
3074 (commit (string-append "R" version))))
3075 (file-name (git-file-name name version))
3076 (sha256
3077 (base32
3078 "0qcsfkpkry0cmvi60khjwvfz4fqhy23nqmn4pb9qrwll26sn9dcr"))))
3079 (build-system gnu-build-system)
3080 (arguments
3081 `(#:phases
3082 (modify-phases %standard-phases
3083 (add-after 'install 'wrap
3084 (lambda* (#:key outputs #:allow-other-keys)
3085 (let* ((out (assoc-ref outputs "out"))
3086 (site (string-append out "/lib/python"
3087 ,(version-major+minor
3088 (package-version python))
3089 "/site-packages")))
3090 (wrap-program (string-append out "/bin/vspipe")
3091 `("PYTHONPATH" ":" = (,site)))))))))
3092 (native-inputs
3093 `(("autoconf" ,autoconf)
3094 ("automake" ,automake)
3095 ("cython" ,python-cython)
3096 ("libtool" ,libtool)
3097 ("pkg-config" ,pkg-config)
3098 ("yasm" ,yasm)))
3099 (inputs
3100 (list ffmpeg libass python tesseract-ocr zimg))
3101 (home-page "http://www.vapoursynth.com/")
3102 (synopsis "Video processing framework")
3103 (description "VapourSynth is a C++ library and Python module for video
3104 manipulation. It aims to be a modern rewrite of Avisynth, supporting
3105 multithreading, generalized colorspaces, per frame properties, and videos with
3106 format changes.")
3107 ;; src/core/cpufeatures only allows x86, ARM or PPC
3108 (supported-systems (fold delete %supported-systems
3109 '("mips64el-linux" "aarch64-linux")))
3110 ;; As seen from the source files.
3111 (license license:lgpl2.1+)))
3112
3113 (define-public xvid
3114 (package
3115 (name "xvid")
3116 (version "1.3.7")
3117 (source (origin
3118 (method url-fetch)
3119 (uri (string-append
3120 "http://downloads.xvid.com/downloads/xvidcore-"
3121 version ".tar.bz2"))
3122 (sha256
3123 (base32
3124 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
3125 (build-system gnu-build-system)
3126 (native-inputs (list yasm))
3127 (arguments
3128 '(#:phases
3129 (modify-phases %standard-phases
3130 (add-before 'configure 'pre-configure
3131 (lambda _
3132 (chdir "build/generic")
3133 (substitute* "configure"
3134 (("#! /bin/sh") (string-append "#!" (which "sh"))))
3135 #t)))
3136 #:tests? #f)) ; no test suite
3137 (home-page "https://www.xvid.com/")
3138 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
3139 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
3140 codec library. It uses ASP features such as b-frames, global and quarter
3141 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
3142 and custom quantization matrices.")
3143 (license license:gpl2+)))
3144
3145 (define-public streamlink
3146 (package
3147 (name "streamlink")
3148 (version "3.2.0")
3149 (source
3150 (origin
3151 (method url-fetch)
3152 (uri (pypi-uri "streamlink" version))
3153 (sha256
3154 (base32
3155 "09nrspga15svzi0hmakcarbciav0nzf30hg1ff53gia473cd4w4p"))))
3156 (build-system python-build-system)
3157 (arguments
3158 `(#:phases (modify-phases %standard-phases
3159 (replace 'check
3160 (lambda* (#:key tests? #:allow-other-keys)
3161 (when tests?
3162 (invoke "python" "-m" "pytest")))))))
3163 (native-inputs
3164 (list python-freezegun python-mock python-pytest
3165 python-requests-mock))
3166 (propagated-inputs
3167 (list python-pysocks
3168 python-websocket-client
3169 python-isodate
3170 python-lxml-4.7
3171 python-pycountry
3172 python-pycryptodome
3173 python-requests
3174 python-urllib3))
3175 (home-page "https://github.com/streamlink/streamlink")
3176 (synopsis "Extract streams from various services")
3177 (description "Streamlink is command-line utility that extracts streams
3178 from sites like Twitch.tv and pipes them into a video player of choice.")
3179 (license license:bsd-2)))
3180
3181 (define-public twitchy
3182 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
3183 (package
3184 (name "twitchy")
3185 (version (git-version "3.4" "1" commit))
3186 (source
3187 (origin
3188 (method git-fetch)
3189 (uri (git-reference
3190 (url "https://github.com/BasioMeusPuga/twitchy")
3191 (commit commit)))
3192 (file-name (git-file-name name version))
3193 (sha256
3194 (base32
3195 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
3196 (build-system python-build-system)
3197 (arguments
3198 '(#:phases
3199 (modify-phases %standard-phases
3200 (add-after 'unpack 'patch-paths
3201 (lambda* (#:key inputs #:allow-other-keys)
3202 (substitute* "twitchy/twitchy_play.py"
3203 (("\"streamlink ")
3204 (string-append "\"" (assoc-ref inputs "streamlink")
3205 "/bin/streamlink ")))
3206 #t))
3207 (add-before 'check 'check-setup
3208 (lambda _
3209 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
3210 #t))
3211 (add-after 'install 'install-rofi-plugin
3212 (lambda* (#:key outputs #:allow-other-keys)
3213 (install-file "plugins/rofi-twitchy"
3214 (string-append (assoc-ref outputs "out")
3215 "/bin"))
3216 #t)))))
3217 (inputs
3218 (list python-requests streamlink))
3219 (home-page "https://github.com/BasioMeusPuga/twitchy")
3220 (synopsis "Command-line interface for Twitch.tv")
3221 (description
3222 "This package provides a command-line interface for Twitch.tv")
3223 (license license:gpl3+))))
3224
3225 (define-public mlt
3226 (package
3227 (name "mlt")
3228 (version "7.6.0")
3229 (source
3230 (origin
3231 (method git-fetch)
3232 (uri (git-reference
3233 (url "https://github.com/mltframework/mlt")
3234 (commit (string-append "v" version))))
3235 (file-name (git-file-name name version))
3236 (sha256
3237 (base32 "1dj7jb5nk0qy28mlw0pcmj4nd607mgx229nhf14gjc0fq9gx71sd"))))
3238 (build-system cmake-build-system)
3239 (arguments
3240 (list
3241 #:tests? #f ;requires "Kwalify"
3242 #:phases
3243 #~(modify-phases %standard-phases
3244 (add-before 'configure 'override-LDFLAGS
3245 (lambda _
3246 (setenv "LDFLAGS"
3247 (string-append "-Wl,-rpath=" #$output "/lib"))))
3248 (add-after 'install 'wrap-executable
3249 (lambda _
3250 (let* ((frei0r #$(this-package-input "frei0r-plugins"))
3251 (ladspa #$(this-package-input "ladspa"))
3252 ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep
3253 ;; compatibility with MLT 6 where it's only 'melt'.
3254 (major #$(version-major version))
3255 (exec (if (file-exists?
3256 (string-append #$output "/bin/melt-" major))
3257 (string-append "melt-" major)
3258 "melt")))
3259 (wrap-program (string-append #$output "/bin/" exec)
3260 `("FREI0R_PATH" ":" =
3261 (,(string-append frei0r "/lib/frei0r-1")))
3262 `("LADSPA_PATH" ":" =
3263 (,(string-append ladspa "/lib/ladspa"))))))))))
3264 (inputs
3265 (list alsa-lib
3266 `(,alsa-plugins "pulseaudio")
3267 bash-minimal
3268 ffmpeg
3269 fftw
3270 frei0r-plugins
3271 gdk-pixbuf
3272 gtk+
3273 libxml2
3274 jack-1
3275 ladspa
3276 libebur128
3277 libexif
3278 libvorbis
3279 rubberband
3280 libsamplerate
3281 pulseaudio
3282 qtbase-5
3283 qtsvg
3284 rtaudio
3285 sdl2
3286 sdl2-image
3287 sox
3288 vidstab))
3289 (native-inputs
3290 (list pkg-config))
3291 (home-page "https://www.mltframework.org/")
3292 (synopsis "Author, manage, and run multitrack audio/video compositions")
3293 (description
3294 "MLT is a multimedia framework, designed and developed for television
3295 broadcasting. It provides a toolkit for broadcasters, video editors, media
3296 players, transcoders, web streamers and many more types of applications. The
3297 functionality of the system is provided via an assortment of ready to use
3298 tools, XML authoring components, and an extensible plug-in based API.")
3299 (license license:lgpl2.1+)))
3300
3301 (define-public mlt-6
3302 (package
3303 (inherit mlt)
3304 (name "mlt")
3305 (version "6.26.1")
3306 (source
3307 (origin
3308 (method git-fetch)
3309 (uri (git-reference
3310 (url "https://github.com/mltframework/mlt")
3311 (commit (string-append "v" version))))
3312 (file-name (git-file-name name version))
3313 (sha256
3314 (base32 "1gz79xvs5jrzqhwhfk0dqdd3xiavnjp4q957h7nb02rij32byb39"))))
3315 (arguments
3316 `(#:configure-flags
3317 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
3318 (assoc-ref %build-inputs "gtk+")
3319 "/lib/gtk-2.0/include")
3320 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
3321 (assoc-ref %build-inputs "glib")
3322 "/lib/glib-2.0/include"))
3323 ,@(package-arguments mlt)))
3324 (inputs
3325 (modify-inputs (package-inputs mlt)
3326 (replace "gtk+" gtk+-2)))))
3327
3328 (define-public v4l-utils
3329 (package
3330 (name "v4l-utils")
3331 (version "1.20.0")
3332 (source (origin
3333 (method url-fetch)
3334 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
3335 "/v4l-utils-" version ".tar.bz2"))
3336 (sha256
3337 (base32
3338 "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm"))))
3339 (build-system gnu-build-system)
3340 ;; Separate graphical tools in order to save almost 1 GiB on the closure
3341 ;; for the common case.
3342 (outputs '("out" "gui"))
3343 (arguments
3344 '(#:configure-flags
3345 (list "--disable-static"
3346 (string-append "--with-udevdir="
3347 (assoc-ref %outputs "out")
3348 "/lib/udev"))
3349 #:phases
3350 (modify-phases %standard-phases
3351 (add-after 'install 'split
3352 (lambda* (#:key outputs #:allow-other-keys)
3353 (let ((out (assoc-ref outputs "out"))
3354 (gui (assoc-ref outputs "gui")))
3355 (mkdir-p (string-append gui "/bin"))
3356 (mkdir-p (string-append gui "/share/man/man1"))
3357 (mkdir-p (string-append gui "/share/applications"))
3358 (for-each
3359 (lambda (prog)
3360 (for-each
3361 (lambda (file)
3362 (rename-file (string-append out file)
3363 (string-append gui file)))
3364 (list
3365 (string-append "/bin/" prog)
3366 (string-append "/share/man/man1/" prog ".1")
3367 (string-append "/share/applications/" prog ".desktop"))))
3368 '("qv4l2" "qvidcap"))
3369 (copy-recursively (string-append out "/share/icons")
3370 (string-append gui "/share/icons"))
3371 (delete-file-recursively (string-append out "/share/icons"))
3372 (rmdir (string-append out "/share/applications"))
3373 #t))))))
3374 (native-inputs
3375 (list perl pkg-config))
3376 (inputs
3377 `(("alsa-lib" ,alsa-lib)
3378 ("glu" ,glu)
3379 ("libjpeg" ,libjpeg-turbo)
3380 ("libx11" ,libx11)
3381 ("qtbase" ,qtbase-5)
3382 ("eudev" ,eudev)))
3383 (synopsis "Realtime video capture utilities for Linux")
3384 (description "The v4l-utils provide a series of libraries and utilities to
3385 be used for realtime video capture via Linux-specific APIs.")
3386 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
3387 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
3388 (license (list license:lgpl2.1+ license:gpl2))))
3389
3390 (define-public obs
3391 (package
3392 (name "obs")
3393 (version "27.1.3")
3394 (source (origin
3395 (method git-fetch)
3396 (uri (git-reference
3397 (url "https://github.com/obsproject/obs-studio")
3398 (commit version)
3399 (recursive? #t)))
3400 (file-name (git-file-name name version))
3401 (sha256
3402 (base32
3403 "1ndiarr3d6qihymaigf34jjml0lrgbj640fnpnffz2ysj7276q0j"))
3404 (patches
3405 (search-patches "obs-modules-location.patch"))))
3406 (build-system cmake-build-system)
3407 (arguments
3408 (list
3409 #:configure-flags
3410 #~(list (string-append "-DOBS_VERSION_OVERRIDE=" #$version)
3411 "-DENABLE_UNIT_TESTS=TRUE"
3412 ;; Browser plugin requires cef, but it is not packaged yet.
3413 ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
3414 "-DBUILD_BROWSER=FALSE")
3415 #:phases
3416 #~(modify-phases %standard-phases
3417 (add-after 'install 'wrap-executable
3418 (lambda* _
3419 (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
3420 (wrap-program (string-append #$output "/bin/obs")
3421 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
3422 (native-search-paths
3423 (list (search-path-specification
3424 (variable "OBS_PLUGINS_DIRECTORY")
3425 (separator #f) ;single entry
3426 (files '("lib/obs-plugins")))
3427 (search-path-specification
3428 (variable "OBS_PLUGINS_DATA_DIRECTORY")
3429 (separator #f) ;single entry
3430 (files '("share/obs/obs-plugins")))))
3431 (native-inputs
3432 (list cmocka pkg-config))
3433 (inputs
3434 (list
3435 alsa-lib
3436 curl
3437 eudev
3438 ffmpeg
3439 fontconfig
3440 freetype
3441 glib
3442 jack-1
3443 jansson
3444 libx264
3445 libxcomposite
3446 mbedtls-apache
3447 mesa
3448 pipewire-0.3
3449 pulseaudio
3450 qtbase-5
3451 qtsvg
3452 qtx11extras
3453 qtwayland
3454 speexdsp
3455 v4l-utils
3456 wayland
3457 wayland-protocols
3458 zlib))
3459 (synopsis "Live streaming software")
3460 (description "Open Broadcaster Software provides a graphical interface for
3461 video recording and live streaming. OBS supports capturing audio and video
3462 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3463 and JACK.")
3464 (home-page "https://obsproject.com")
3465 (license license:gpl2+)))
3466
3467 (define-public obs-spectralizer
3468 (package
3469 (name "obs-spectralizer")
3470 (version "1.3.3")
3471 (source
3472 (origin
3473 (method git-fetch)
3474 (uri (git-reference
3475 (url "https://github.com/univrsal/spectralizer")
3476 (commit (string-append "v" version))))
3477 (file-name (git-file-name name version))
3478
3479 ;; Remove bundled Windows DLLs.
3480 (snippet '(delete-file-recursively "fftw3"))
3481 (modules '((guix build utils)))
3482
3483 (sha256
3484 (base32
3485 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i"))))
3486 (build-system cmake-build-system)
3487 (arguments
3488 `(#:tests? #f
3489 #:configure-flags
3490 (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON")))
3491 (inputs (list obs fftw))
3492 (home-page "https://github.com/univrsal/spectralizer")
3493 (synopsis "OBS plugin for audio visualization")
3494 (description "This OBS plugins allows you to vizualize MPD and internal
3495 OBS audio sources.")
3496 (license license:gpl2)))
3497
3498 (define-public obs-websocket
3499 (package
3500 (name "obs-websocket")
3501 (version "4.9.1")
3502 (source
3503 (origin
3504 (method git-fetch)
3505 (uri (git-reference
3506 (url "https://github.com/Palakis/obs-websocket")
3507 (commit version)
3508 (recursive? #t)))
3509 (file-name (git-file-name name version))
3510 (sha256
3511 (base32 "0giwhm0rbc578qng4invqqma935zzjlf05msz1gx986aqk654s7k"))))
3512 (build-system cmake-build-system)
3513 (arguments
3514 `(#:tests? #f ;no tests
3515 #:phases
3516 (modify-phases %standard-phases
3517 (add-after 'unpack 'remove-permission-change
3518 (lambda* _
3519 (substitute* "CMakeLists.txt"
3520 ;; Remove lines that set writeable permissions on outputs.
3521 (("PERMISSIONS [^)]*") "")
3522 (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
3523 ;; Ug^WClever hack to comment out the next line, which is ‘)’.
3524 (("(OWNER|GROUP|WORLD)_READ .*") "#")))))))
3525 (inputs
3526 (list obs qtbase-5))
3527 (home-page "https://github.com/Palakis/obs-websocket")
3528 (synopsis "OBS plugin for remote control via WebSockets")
3529 (description "This OBS plugin allows you to establish a WebSocket channel
3530 from within your running OBS instance so that you can control it remotely from
3531 programs on your current machine or on other machines.")
3532 (license license:gpl2+)))
3533
3534 (define-public obs-wlrobs
3535 (package
3536 (name "obs-wlrobs")
3537 (version "1.0")
3538 (source
3539 (origin
3540 (method hg-fetch)
3541 (uri (hg-reference
3542 (url "https://hg.sr.ht/~scoopta/wlrobs")
3543 (changeset (string-append "v" version))))
3544 (file-name (git-file-name name version))
3545 (sha256
3546 (base32
3547 "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
3548 (build-system meson-build-system)
3549 (native-inputs
3550 (list pkg-config))
3551 (propagated-inputs `() )
3552 (inputs (list obs
3553 `(,libx11 "out") wayland wayland-protocols))
3554 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
3555 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
3556 (description
3557 "This OBS plugin allows you to capture the screen on wlroots-based
3558 Wayland compositors.")
3559 (license license:gpl3+)))
3560
3561 (define-public libvdpau
3562 (package
3563 (name "libvdpau")
3564 (version "1.4")
3565 (source
3566 (origin
3567 (method git-fetch)
3568 (uri (git-reference
3569 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3570 (commit version)))
3571 (file-name (git-file-name name version))
3572 (sha256
3573 (base32
3574 "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
3575 (build-system meson-build-system)
3576 (native-inputs
3577 (list pkg-config))
3578 (inputs
3579 (list `(,libx11 "out") libxext xorgproto))
3580 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3581 (synopsis "Video Decode and Presentation API")
3582 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3583 provides an interface to video decode acceleration and presentation hardware
3584 present in modern GPUs.")
3585 (license (license:x11-style "file://COPYING"))))
3586
3587 (define-public vdpauinfo
3588 (package
3589 (name "vdpauinfo")
3590 (version "1.4")
3591 (source
3592 (origin
3593 (method git-fetch)
3594 (uri (git-reference
3595 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
3596 (commit version)))
3597 (file-name (git-file-name name version))
3598 (sha256
3599 (base32 "0s84bavxr39w0r7zfaac7kpbfsg88hgymqyzcr0yvbj1yry3liz2"))))
3600 (build-system gnu-build-system)
3601 (arguments
3602 `(#:phases
3603 (modify-phases %standard-phases
3604 (replace 'bootstrap
3605 ;; ./autogen.sh runs ./configure too soon.
3606 (lambda _
3607 (invoke "autoreconf" "-fiv"))))))
3608 (native-inputs
3609 (list autoconf automake libx11 pkg-config))
3610 (propagated-inputs
3611 (list libvdpau))
3612 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3613 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3614 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3615 implementation.")
3616 (license (license:x11-style "file://COPYING"))))
3617
3618 (define-public libvdpau-va-gl
3619 (package
3620 (name "libvdpau-va-gl")
3621 (version "0.4.2")
3622 (source
3623 (origin
3624 (method url-fetch)
3625 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3626 "releases/download/v" version "/libvdpau-va-gl-"
3627 version ".tar.gz"))
3628 (sha256
3629 (base32
3630 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3631 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3632 (modules '((guix build utils)))
3633 (snippet '(begin (delete-file-recursively "3rdparty")
3634 #t))))
3635 (build-system cmake-build-system)
3636 (arguments
3637 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3638 (native-inputs
3639 (list libvdpau pkg-config))
3640 (inputs
3641 (list libva mesa))
3642 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3643 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3644 (description
3645 "Many applications can use VDPAU to accelerate portions of the video
3646 decoding process and video post-processing to the GPU video hardware. Since
3647 there is no VDPAU available on Intel chips, they fall back to different drawing
3648 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3649 scaling and VA-API (if available) to accelerate video decoding.")
3650 (license license:expat)))
3651
3652 (define-public recordmydesktop
3653 (package
3654 (name "recordmydesktop")
3655 (version "0.4.0")
3656 (source (origin
3657 (method url-fetch)
3658 (uri (string-append "https://github.com/Enselic/"
3659 name "/releases/download/v" version
3660 "/recordmydesktop-" version ".tar.gz"))
3661 (sha256
3662 (base32
3663 "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7"))))
3664 (build-system gnu-build-system)
3665 (inputs (list popt
3666 zlib
3667 libx11
3668 libice
3669 libsm
3670 libxfixes
3671 libxdamage
3672 libxext
3673 alsa-lib
3674 libvorbis
3675 libtheora))
3676 (home-page "https://enselic.github.io/recordmydesktop/")
3677 (synopsis "Desktop session video recorder")
3678 (description
3679 "recordMyDesktop is a command-line tool that captures the activity in
3680 your graphical desktop and encodes it as a video. This is a useful tool for
3681 making @dfn{screencasts}.")
3682 (license license:gpl2+)))
3683
3684 (define-public simplescreenrecorder
3685 (package
3686 (name "simplescreenrecorder")
3687 (version "0.4.2")
3688 (source
3689 (origin
3690 (method git-fetch)
3691 (uri (git-reference
3692 (url "https://github.com/MaartenBaert/ssr")
3693 (commit version)))
3694 (file-name (git-file-name name version))
3695 (sha256
3696 (base32
3697 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3698 (build-system cmake-build-system)
3699 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3700 ;; README.md, the program builds and functions properly without them.
3701 ;; As a result, they are omitted. Please add them back if problems appear.
3702 (inputs
3703 (list alsa-lib
3704 ffmpeg
3705 glu
3706 jack-1
3707 libxi
3708 libxinerama
3709 pulseaudio
3710 qtbase-5
3711 qtx11extras))
3712 (native-inputs (list pkg-config))
3713 (arguments
3714 `(#:configure-flags
3715 (list "-DWITH_QT5=TRUE")
3716 #:tests? #f)) ; no test suite
3717 ;; Using HTTPS causes part of the page to be displayed improperly.
3718 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3719 (synopsis "Screen recorder")
3720 (description "SimpleScreenRecorder is an easy to use screen recorder with
3721 a graphical user interface. It supports recording the entire screen, or a
3722 part of it, and allows encoding in many different codecs and file formats.
3723 Other features include a live preview and live streaming.")
3724 (license (list license:gpl3+ ; most files
3725 license:zlib ; glinject/elfhacks.*
3726 license:isc ; glinject/*
3727 license:x11)))) ; build-aux/install-sh
3728
3729 (define-public libsmpeg
3730 (package
3731 (name "libsmpeg")
3732 (version "0.4.5-401")
3733 (source (origin
3734 (method svn-fetch)
3735 (uri (svn-reference
3736 (url "svn://svn.icculus.org/smpeg/trunk/")
3737 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3738 (file-name (string-append name "-" version "-checkout"))
3739 (sha256
3740 (base32
3741 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3742 (build-system gnu-build-system)
3743 (arguments
3744 ;; libsmpeg fails to build with -std=c++11, which is the default with
3745 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3746 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3747 (native-inputs
3748 (list autoconf automake))
3749 (inputs
3750 `(("sdl" ,sdl2)))
3751 (home-page "https://icculus.org/smpeg/")
3752 (synopsis "SDL MPEG decoding library")
3753 (description
3754 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3755 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3756 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3757 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3758 and MPEG system streams.")
3759 (license (list license:expat
3760 license:lgpl2.1
3761 license:lgpl2.1+
3762 license:gpl2))))
3763
3764 ;; for btanks
3765 (define-public libsmpeg-with-sdl1
3766 (package (inherit libsmpeg)
3767 (name "libsmpeg")
3768 (version "0.4.5-399")
3769 (source (origin
3770 (method svn-fetch)
3771 (uri (svn-reference
3772 (url "svn://svn.icculus.org/smpeg/trunk/")
3773 (revision 399))) ; tagged release 0.4.5
3774 (file-name (string-append name "-" version "-checkout"))
3775 (sha256
3776 (base32
3777 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3778 (inputs
3779 (list sdl))))
3780
3781 (define-public libbdplus
3782 (package
3783 (name "libbdplus")
3784 (version "0.1.2")
3785 (source
3786 (origin
3787 (method url-fetch)
3788 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3789 version "/" name "-" version ".tar.bz2"))
3790 (sha256
3791 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3792 (inputs
3793 (list libgcrypt))
3794 (build-system gnu-build-system)
3795 (home-page "https://www.videolan.org/developers/libbdplus.html")
3796 (synopsis "Library for decrypting certain Blu-Ray discs")
3797 (description "libbdplus is a library which implements the BD+ System
3798 specifications.")
3799 (license license:lgpl2.1+)))
3800
3801 (define-public libaacs
3802 (package
3803 (name "libaacs")
3804 (version "0.11.0")
3805 (source
3806 (origin
3807 (method url-fetch)
3808 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3809 version "/libaacs-" version ".tar.bz2"))
3810 (sha256
3811 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3812 (inputs
3813 (list libgcrypt))
3814 (native-inputs
3815 (list bison flex))
3816 (build-system gnu-build-system)
3817 (home-page "https://www.videolan.org/developers/libaacs.html")
3818 (synopsis "Library for decrypting certain Blu-Ray discs")
3819 (description "libaacs is a library which implements the Advanced Access
3820 Content System specification.")
3821 (license license:lgpl2.1+)))
3822
3823 (define-public mps-youtube
3824 (package
3825 (name "mps-youtube")
3826 (version "0.2.8")
3827 (source
3828 (origin
3829 (method git-fetch)
3830 (uri (git-reference
3831 (url "https://github.com/mps-youtube/mps-youtube")
3832 (commit (string-append "v" version))))
3833 (file-name (git-file-name name version))
3834 (sha256
3835 (base32
3836 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3837 (build-system python-build-system)
3838 (arguments
3839 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3840 ;; test suite results differ depending on the country and also introduce
3841 ;; non-determinism in the tests.
3842 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3843 '(#:tests? #f
3844 #:phases (modify-phases %standard-phases
3845 ;; Loading this as a library will create cache directories,
3846 ;; etc; which fails in the build container.
3847 (delete 'sanity-check))))
3848 (propagated-inputs
3849 (list python-pafy python-pygobject)) ; For mpris2 support
3850 (home-page "https://github.com/mps-youtube/mps-youtube")
3851 (synopsis "Terminal based YouTube player and downloader")
3852 (description
3853 "@code{mps-youtube} is based on mps, a terminal based program to
3854 search, stream and download music. This implementation uses YouTube as
3855 a source of content and can play and download video as well as audio.
3856 It can use either mpv or mplayer for playback, and for conversion of
3857 formats ffmpeg or libav is used. Users should install one of the
3858 supported players in addition to this package.")
3859 (license license:gpl3+)))
3860
3861 (define-public handbrake
3862 (package
3863 (name "handbrake")
3864 (version "1.5.1")
3865 (source (origin
3866 (method url-fetch)
3867 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3868 "releases/download/" version "/"
3869 "HandBrake-" version "-source.tar.bz2"))
3870 (sha256
3871 (base32
3872 "1w1hjj6gvdydypw4mdn281w0x163is59cfm7k6bq371hsl3gx69r"))
3873 (modules '((guix build utils)))
3874 (snippet
3875 ;; Remove "contrib" and source not necessary for
3876 ;; building/running under a GNU environment.
3877 '(begin
3878 (for-each delete-file-recursively
3879 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3880 (substitute* "make/include/main.defs"
3881 ;; Disable unconditional inclusion of "contrib" libraries
3882 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3883 ;; which would lead to fetching and building of these
3884 ;; libraries. Use our own instead.
3885 (("MODULES \\+= contrib") "# MODULES += contrib"))))))
3886 (build-system glib-or-gtk-build-system)
3887 (native-inputs
3888 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3889 ("autoconf" ,autoconf)
3890 ("intltool" ,intltool)
3891 ("libtool" ,libtool)
3892 ("pkg-config" ,pkg-config)
3893 ("python" ,python-2))) ; For configuration
3894 (inputs
3895 `(("bzip2" ,bzip2)
3896 ("dbus-glib" ,dbus-glib)
3897 ("ffmpeg" ,ffmpeg)
3898 ("fontconfig" ,fontconfig)
3899 ("freetype" ,freetype)
3900 ("glib" ,glib)
3901 ("gstreamer" ,gstreamer)
3902 ("gst-plugins-base" ,gst-plugins-base)
3903 ("gtk+" ,gtk+)
3904 ("jansson" ,jansson)
3905 ("lame" ,lame)
3906 ("libass" ,libass)
3907 ("libbluray" ,libbluray)
3908 ("libdav1d" ,dav1d)
3909 ("libdvdnav" ,libdvdnav)
3910 ("libdvdread" ,libdvdread)
3911 ("libgudev" ,libgudev)
3912 ("libjpeg-turbo" ,libjpeg-turbo)
3913 ("libmpeg2" ,libmpeg2)
3914 ("libnotify" ,libnotify)
3915 ("libnuma" ,numactl)
3916 ("libogg" ,libogg)
3917 ("libopus" ,opus)
3918 ("libsamplerate" ,libsamplerate)
3919 ("libtheora" ,libtheora)
3920 ("libvorbis" ,libvorbis)
3921 ("libvpx" ,libvpx)
3922 ("libxml2" ,libxml2)
3923 ("libx264" ,libx264)
3924 ("speex" ,speex)
3925 ("x265" ,x265)
3926 ("zimg" ,zimg)
3927 ("zlib" ,zlib)))
3928 (arguments
3929 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3930 #:configure-flags
3931 (list "--disable-gtk-update-checks"
3932 "--disable-nvenc"
3933 (string-append "CPPFLAGS=-I"
3934 (assoc-ref %build-inputs "libxml2")
3935 "/include/libxml2")
3936 "LDFLAGS=-lx265")
3937 #:phases
3938 (modify-phases %standard-phases
3939 (replace 'bootstrap
3940 ;; Run bootstrap ahead of time so that shebangs get patched.
3941 (lambda _
3942 (setenv "CONFIG_SHELL" (which "sh"))
3943 ;; Patch the Makefile so that it doesn't bootstrap again.
3944 (substitute* "gtk/module.rules"
3945 ((".*autoreconf.*") ""))
3946 (with-directory-excursion "gtk"
3947 (invoke "autoreconf" "-fiv"))))
3948 (add-before 'configure 'patch-SHELL
3949 (lambda _
3950 (substitute* "gtk/po/Makefile.in.in"
3951 (("SHELL = /bin/sh") "SHELL = @SHELL@"))))
3952 (add-before 'configure 'relax-reqs
3953 (lambda _
3954 (substitute* "make/configure.py"
3955 ;; cmake is checked for so that it can be used to build
3956 ;; contrib/harfbuzz and contrib/x265, but we get these as
3957 ;; inputs, so don't abort if it's not found. Similarly, meson
3958 ;; and ninja are only needed for contrib/libdav1d, and nasm
3959 ;; only for libvpx
3960 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3961 (string-append & "False")))))
3962 (replace 'configure
3963 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3964 ;; 'configure' is not an autoconf-generated script, and
3965 ;; errors on unrecognized arguments,
3966 ;; e.g. --enable-fast-install
3967 (let ((out (assoc-ref outputs "out")))
3968 (apply invoke "./configure"
3969 (string-append "--prefix=" out)
3970 (or configure-flags '())))))
3971 (add-after 'configure 'chdir-build
3972 (lambda _ (chdir "./build"))))))
3973 (home-page "https://handbrake.fr")
3974 (synopsis "Video transcoder")
3975 (description
3976 "HandBrake is a tool for converting video from any format to a selection
3977 of modern, widely supported codecs.")
3978 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3979 ;; Combination under GPLv2. See LICENSE.
3980 (license license:gpl2)))
3981
3982 (define-public intel-vaapi-driver
3983 (package
3984 (name "intel-vaapi-driver")
3985 (version "2.4.1")
3986 (source
3987 (origin
3988 (method git-fetch)
3989 (uri (git-reference
3990 (url "https://github.com/intel/intel-vaapi-driver")
3991 (commit version)))
3992 (sha256
3993 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3994 (file-name (git-file-name name version))))
3995 (build-system gnu-build-system)
3996 (native-inputs
3997 (list autoconf automake libtool pkg-config))
3998 (inputs
3999 (list libdrm libva libx11))
4000 (arguments
4001 `(#:phases
4002 (modify-phases %standard-phases
4003 (add-before 'configure 'set-target-directory
4004 (lambda* (#:key outputs #:allow-other-keys)
4005 (let ((out (assoc-ref outputs "out")))
4006 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
4007 #t))))))
4008 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
4009 ;; this to all VA-API back ends instead of once to libva.
4010 (native-search-paths
4011 (list (search-path-specification
4012 (variable "LIBVA_DRIVERS_PATH")
4013 (files '("lib/dri")))))
4014 (supported-systems '("i686-linux" "x86_64-linux"))
4015 (home-page "https://01.org/linuxmedia/vaapi")
4016 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
4017 (description
4018 "This is the @acronym{VA-API, Video Acceleration API} back end required for
4019 hardware-accelerated video processing on Intel GEN Graphics devices supported by
4020 the i915 driver, such as integrated Intel HD Graphics. It provides access to
4021 both hardware and shader functionality for faster encoding, decoding, and
4022 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
4023 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
4024 license:expat)))) ; the rest, excluding the test suite
4025
4026 (define-public openh264
4027 (package
4028 (name "openh264")
4029 (version "2.1.1")
4030 (source (origin
4031 (method git-fetch)
4032 (uri (git-reference
4033 (url "https://github.com/cisco/openh264")
4034 (commit (string-append "v" version))))
4035 (file-name (git-file-name name version))
4036 (sha256
4037 (base32
4038 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
4039 (build-system gnu-build-system)
4040 (native-inputs
4041 (list nasm python))
4042 (arguments
4043 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
4044 "CC=gcc")
4045 #:test-target "test"
4046 #:phases (modify-phases %standard-phases
4047 ;; no configure script
4048 (delete 'configure))))
4049 (home-page "https://www.openh264.org/")
4050 (synopsis "H264 decoder library")
4051 (description
4052 "Openh264 is a library which can decode H264 video streams.")
4053 (license license:bsd-2)))
4054
4055 (define-public libmp4v2
4056 (package
4057 (name "libmp4v2")
4058 (version "2.0.0")
4059 (source
4060 (origin
4061 (method url-fetch)
4062 ;; XXX: The new location of upstream is uncertain and will become relevant the
4063 ;; moment when the googlecode archive shuts down. It is past the date it
4064 ;; should've been turned off. I tried to communicate with upstream, but this
4065 ;; wasn't very responsive and not very helpful. The short summary is, it is
4066 ;; chaos when it comes to the amount of forks and only time will tell where
4067 ;; the new upstream location is.
4068 (uri (string-append "https://storage.googleapis.com/google-"
4069 "code-archive-downloads/v2/"
4070 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
4071 (file-name (string-append name "-" version ".tar.bz2"))
4072 (patches (search-patches "libmp4v2-c++11.patch"))
4073 (sha256
4074 (base32
4075 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
4076 (build-system gnu-build-system)
4077 (outputs '("out"
4078 "static")) ; 3.7MiB .a file
4079 (arguments
4080 `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
4081 #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
4082
4083 #:phases
4084 (modify-phases %standard-phases
4085 (add-after 'unpack 'remove-dates
4086 (lambda _
4087 ;; Make the build reproducible.
4088 (substitute* "configure"
4089 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
4090 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
4091 #t))
4092 (add-after 'install 'move-static-libraries
4093 (lambda* (#:key outputs #:allow-other-keys)
4094 ;; Move static libraries to the "static" output.
4095 (let* ((out (assoc-ref outputs "out"))
4096 (lib (string-append out "/lib"))
4097 (static (assoc-ref outputs "static"))
4098 (slib (string-append static "/lib")))
4099 (mkdir-p slib)
4100 (for-each (lambda (file)
4101 (install-file file slib)
4102 (delete-file file))
4103 (find-files lib "\\.a$"))
4104 #t))))))
4105 (native-inputs
4106 (list help2man dejagnu))
4107 (home-page "https://code.google.com/archive/p/mp4v2/")
4108 (synopsis "API to create and modify mp4 files")
4109 (description
4110 "The MP4v2 library provides an API to create and modify mp4 files as defined by
4111 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
4112 file format that has been used as a multimedia file format in a variety of platforms and
4113 applications. It is a very powerful and extensible format that can accommodate
4114 practically any type of media.")
4115 (license license:mpl1.1)))
4116
4117 (define-public libmediainfo
4118 (package
4119 (name "libmediainfo")
4120 (version "22.03")
4121 (source (origin
4122 (method url-fetch)
4123 (uri (string-append "https://mediaarea.net/download/source/"
4124 name "/" version "/"
4125 name "_" version ".tar.xz"))
4126 (sha256
4127 (base32
4128 "1fc0ihj17cdv9zb346llwvbv0hn3sl3ax398ankgp74fcaxvll7w"))))
4129 ;; TODO add a Big Buck Bunny webm for tests.
4130 (native-inputs
4131 (list autoconf automake libtool pkg-config))
4132 (propagated-inputs
4133 (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc.
4134 libzen))
4135 (build-system gnu-build-system)
4136 (arguments
4137 '(#:tests? #f ; see above TODO
4138 #:configure-flags
4139 (list "--with-libcurl" "--with-libtinyxml2")
4140 #:phases
4141 ;; build scripts not in root of archive
4142 (modify-phases %standard-phases
4143 (add-after 'unpack 'change-to-build-dir
4144 (lambda _
4145 (chdir "Project/GNU/Library")
4146 #t)))))
4147 (home-page "https://mediaarea.net/en/MediaInfo")
4148 (synopsis "Library for retrieving media metadata")
4149 (description "MediaInfo is a library used for retrieving technical
4150 information and other metadata about audio or video files. A non-exhaustive
4151 list of the information MediaInfo can retrieve from media files include:
4152
4153 @itemize
4154 @item General: title, author, director, album, track number, date, duration...
4155 @item Video: codec, aspect, fps, bitrate...
4156 @item Audio: codec, sample rate, channels, language, bitrate...
4157 @item Text: language of subtitle
4158 @item Chapters: number of chapters, list of chapters
4159 @end itemize
4160
4161 MediaInfo supports the following formats:
4162
4163 @itemize
4164 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
4165 MPEG-2, MPEG-4, DVD (VOB)...
4166 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
4167 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
4168 @item Subtitles: SRT, SSA, ASS, SAMI...
4169 @end itemize\n")
4170 (license license:bsd-2)))
4171
4172 ;; TODO also have a GUI version available
4173 (define-public mediainfo
4174 (package
4175 (name "mediainfo")
4176 (version "22.03")
4177 (source (origin
4178 (method url-fetch)
4179 ;; Warning: This source has proved unreliable 1 time at least.
4180 ;; Consider an alternate source or report upstream if this
4181 ;; happens again.
4182 (uri (string-append "https://mediaarea.net/download/source/"
4183 name "/" version "/"
4184 name "_" version ".tar.xz"))
4185 (sha256
4186 (base32
4187 "1r1bh1lk2dsiv0j84whgca7qslxbibg6vsih7x5iga2p3lmgjdk2"))))
4188 (native-inputs
4189 (list autoconf automake libtool pkg-config))
4190 (inputs
4191 (list libmediainfo))
4192 (build-system gnu-build-system)
4193 (arguments
4194 '(#:tests? #f ; lacks tests
4195 #:phases
4196 ;; build scripts not in root of archive
4197 (modify-phases %standard-phases
4198 (add-after 'unpack 'change-to-build-dir
4199 (lambda _
4200 (chdir "Project/GNU/CLI")
4201 #t)))))
4202 (home-page "https://mediaarea.net/en/MediaInfo")
4203 (synopsis "Utility for reading media metadata")
4204 (description "MediaInfo is a utility used for retrieving technical
4205 information and other metadata about audio or video files. It supports the
4206 many codecs and formats supported by libmediainfo.")
4207 (license license:bsd-2)))
4208
4209 (define-public atomicparsley
4210 (package
4211 (name "atomicparsley")
4212 (version "20200701.154658.b0d6223")
4213 (source (origin
4214 (method git-fetch)
4215 (uri (git-reference
4216 (url "https://github.com/wez/atomicparsley")
4217 (commit version)))
4218 (file-name (git-file-name name version))
4219 (sha256
4220 (base32
4221 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
4222 (build-system cmake-build-system)
4223 (arguments
4224 `(#:tests? #f ;; no tests included
4225 #:phases
4226 (modify-phases %standard-phases
4227 (add-before 'configure 'set-cmake-version
4228 (lambda* _
4229 (substitute* "CMakeLists.txt"
4230 ;; At the time of writing, Guix has CMake at 3.16, but
4231 ;; AtomicParsley uses 3.17. This brings the required CMake
4232 ;; version down to what Guix can afford.
4233 (("VERSION 3.17") "VERSION 3.16"))
4234 #t))
4235 (replace 'install
4236 (lambda* (#:key outputs #:allow-other-keys)
4237 (let* ((out (assoc-ref outputs "out"))
4238 (bin (string-append out "/bin")))
4239 (install-file "AtomicParsley" bin))
4240 #t)))))
4241 (inputs
4242 (list zlib))
4243 (synopsis "Metadata editor for MPEG-4 files")
4244 (description "AtomicParsley is a lightweight command line program for
4245 reading, parsing and setting metadata into MPEG-4 files, in particular,
4246 iTunes-style metadata.")
4247 (home-page "https://github.com/wez/atomicparsley")
4248 (license license:gpl2+)))
4249
4250 (define-public livemedia-utils
4251 (package
4252 (name "livemedia-utils")
4253 (version "2020.11.19")
4254 (source (origin
4255 (method url-fetch)
4256 (uri (string-append
4257 "https://download.videolan.org/contrib/live555/live."
4258 version ".tar.gz"))
4259 (sha256
4260 (base32
4261 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
4262 (build-system gnu-build-system)
4263 (arguments
4264 `(#:tests? #f ; no tests
4265 #:make-flags (list (string-append "CC=" ,(cc-for-target))
4266 (string-append "CXX=" ,(cxx-for-target))
4267 (string-append "LDFLAGS=-Wl,-rpath="
4268 (assoc-ref %outputs "out") "/lib")
4269 (string-append "PREFIX="
4270 (assoc-ref %outputs "out")))
4271 #:phases (modify-phases %standard-phases
4272 (add-before 'configure 'fix-makefiles-generation
4273 (lambda _
4274 (substitute* "genMakefiles"
4275 (("/bin/rm") "rm"))
4276 #t))
4277 (replace 'configure
4278 (lambda _
4279 (invoke "./genMakefiles"
4280 "linux-with-shared-libraries"))))))
4281 (inputs
4282 (list openssl))
4283 (home-page "http://www.live555.com/liveMedia/")
4284 (synopsis "Set of C++ libraries for multimedia streaming")
4285 (description "This code forms a set of C++ libraries for multimedia
4286 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
4287 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
4288 JPEG video, and several audio codecs. They can easily be extended to support
4289 additional (audio and/or video) codecs, and can also be used to build basic
4290 RTSP or SIP clients and servers.")
4291 (license license:lgpl3+)))
4292
4293 (define-public libdvbpsi
4294 (package
4295 (name "libdvbpsi")
4296 (version "1.3.3")
4297 (source (origin
4298 (method url-fetch)
4299 (uri (string-append
4300 "https://download.videolan.org/pub/libdvbpsi/"
4301 version "/libdvbpsi-" version ".tar.bz2"))
4302 (sha256
4303 (base32
4304 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
4305 (build-system gnu-build-system)
4306 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
4307 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
4308 tables")
4309 (description "libdvbpsi is a simple library designed for decoding and
4310 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
4311 and ITU-T H.222.0.")
4312 (license license:lgpl2.1)))
4313
4314 (define-public ffms2
4315 (package
4316 (name "ffms2")
4317 (version "2.23")
4318 (home-page "https://github.com/FFMS/ffms2")
4319 (source (origin
4320 (method git-fetch)
4321 (uri (git-reference
4322 (url "https://github.com/FFMS/ffms2")
4323 (commit version)))
4324 (file-name (git-file-name name version))
4325 (sha256
4326 (base32
4327 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
4328 (build-system gnu-build-system)
4329 (arguments
4330 '(#:configure-flags
4331 (list "--enable-avresample")))
4332 (inputs
4333 (list zlib))
4334 (propagated-inputs
4335 (list ffmpeg))
4336 (native-inputs
4337 (list pkg-config))
4338 (synopsis "Cross-platform wrapper around ffmpeg/libav")
4339 (description
4340 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
4341 programmers to access a standard API to open and decompress media files.")
4342 ;; sources are distributed under a different license that the binary.
4343 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
4344 (license license:gpl2+))); inherits from ffmpeg
4345
4346 (define-public aegisub
4347 (package
4348 (name "aegisub")
4349 (version "3.2.2")
4350 (source (origin
4351 (method url-fetch)
4352 (uri (string-append
4353 "http://ftp.aegisub.org/pub/archives/releases/source/"
4354 name "-" version ".tar.xz"))
4355 (sha256
4356 (base32
4357 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
4358 (patches (search-patches "aegisub-icu59-include-unistr.patch"
4359 "aegisub-make43.patch"
4360 "aegisub-boost68.patch"))))
4361 (build-system gnu-build-system)
4362 (arguments
4363 `(#:configure-flags
4364 (list "--disable-update-checker"
4365 "--without-portaudio"
4366 "--without-openal"
4367 "--without-oss"
4368 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
4369 ;; tests require busted, a lua package we don't have yet
4370 #:tests? #f
4371 #:phases
4372 (modify-phases %standard-phases
4373 (add-before 'configure 'fix-ldflags
4374 (lambda _
4375 (setenv "LDFLAGS" "-pthread")
4376 #t))
4377 (add-after 'unpack 'fix-boost-headers
4378 (lambda _
4379 (substitute*
4380 '("src/subtitles_provider_libass.cpp"
4381 "src/colour_button.cpp"
4382 "src/video_provider_dummy.cpp"
4383 "./src/video_frame.cpp")
4384 (("#include <boost/gil/gil_all.hpp>")
4385 "#include <boost/gil.hpp>"))
4386 #t)))))
4387 (inputs
4388 (list boost
4389 ffms2
4390 fftw
4391 hunspell
4392 mesa
4393 libass
4394 alsa-lib
4395 pulseaudio
4396 libx11
4397 freetype
4398 wxwidgets-gtk2))
4399 (native-inputs
4400 (list intltool desktop-file-utils pkg-config))
4401 (home-page "http://www.aegisub.org/")
4402 (synopsis "Subtitle engine")
4403 (description
4404 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
4405 it quick and easy to time subtitles to audio, and features many powerful
4406 tools for styling them, including a built-in real-time video preview.")
4407 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
4408 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
4409 license:expat)))) ; and src/gl that is under a license similar
4410 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
4411 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
4412 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
4413
4414 (define-public pitivi
4415 ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
4416 (let ((latest-semver "0.999.0")
4417 (%version "2021.05.0"))
4418 (package
4419 (name "pitivi")
4420 (version (string-append latest-semver "-" %version))
4421 (source
4422 (origin
4423 (method git-fetch)
4424 (uri (git-reference
4425 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
4426 (commit %version)))
4427 (file-name (git-file-name name version))
4428 (patches (search-patches "pitivi-fix-build-with-meson-0.60.patch"))
4429 (sha256
4430 (base32 "08x2fs2bak1fbmkvjijgx1dsawispv91bpv5j5gkqbv5dfgf7wah"))))
4431 (build-system meson-build-system)
4432 (inputs
4433 (list glib
4434 gst-editing-services
4435 gstreamer
4436 gst-plugins-base
4437 gst-plugins-good
4438 (gst-plugins/selection gst-plugins-bad #:plugins
4439 '("debugutils" "transcode")
4440 #:configure-flags
4441 '("-Dintrospection=enabled"))
4442 gst-libav
4443 gsound
4444 gtk+
4445 librsvg
4446 libpeas
4447 libnotify
4448 pango
4449 python
4450 python-gst
4451 python-numpy
4452 python-matplotlib
4453 python-pycairo
4454 python-pygobject))
4455 (native-inputs
4456 `(("gettext" ,gettext-minimal)
4457 ("glib:bin" ,glib "bin")
4458 ("itstool" ,itstool)
4459 ("pkg-config" ,pkg-config)))
4460 (arguments
4461 `(#:glib-or-gtk? #t
4462 #:phases
4463 (modify-phases %standard-phases
4464 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
4465 (lambda* (#:key outputs #:allow-other-keys)
4466 (let ((prog (string-append (assoc-ref outputs "out")
4467 "/bin/pitivi")))
4468 (wrap-program prog
4469 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
4470 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
4471 ;; We've only added inputs for what Pitivi deems either
4472 ;; necessary or optional. Let the user's packages take
4473 ;; precedence in case they have e.g. the full gst-plugins-bad.
4474 `("GST_PLUGIN_SYSTEM_PATH" suffix
4475 (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))))
4476 (home-page "http://www.pitivi.org")
4477 (synopsis "Video editor based on GStreamer Editing Services")
4478 (description "Pitivi is a video editor built upon the GStreamer Editing
4479 Services. It aims to be an intuitive and flexible application that can appeal
4480 to newbies and professionals alike.")
4481 (license license:lgpl2.1+))))
4482
4483 (define-public gavl
4484 (package
4485 (name "gavl")
4486 (version "1.4.0")
4487 (source
4488 (origin
4489 (method url-fetch)
4490 (uri (string-append "mirror://sourceforge/gmerlin/"
4491 name "/" version "/"
4492 name "-" version ".tar.gz"))
4493 (file-name (string-append name "-" version ".tar.gz"))
4494 (sha256
4495 (base32
4496 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
4497 (build-system gnu-build-system)
4498 (arguments
4499 '(#:configure-flags '("LIBS=-lm")))
4500 (native-inputs
4501 (list pkg-config doxygen))
4502 (home-page "http://gmerlin.sourceforge.net")
4503 (synopsis "Low level library for multimedia API building")
4504 (description
4505 "Gavl is short for Gmerlin Audio Video Library. It is a low level
4506 library, upon which multimedia APIs can be built. Gavl handles all the
4507 details of audio and video formats like colorspaces, sample rates,
4508 multichannel configurations, etc. It provides standardized definitions for
4509 those formats as well as container structures for carrying audio samples or
4510 video images inside an application.
4511
4512 In addition, it handles the sometimes ugly task of converting between all
4513 these formats and provides some elementary operations (copying, scaling,
4514 alpha blending etc).")
4515 (license license:gpl3)))
4516
4517 (define-public frei0r-plugins
4518 (package
4519 (name "frei0r-plugins")
4520 (version "1.7.0")
4521 (source
4522 (origin
4523 (method url-fetch)
4524 (uri (string-append "https://files.dyne.org/frei0r/"
4525 "frei0r-plugins-" version ".tar.gz"))
4526 (sha256
4527 (base32
4528 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
4529 (build-system gnu-build-system)
4530 (arguments
4531 `(#:phases
4532 (modify-phases %standard-phases
4533 (add-after 'unpack 'patch-Makefile
4534 (lambda _
4535 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
4536 ;; names in the tarball. Try removing this for future versions.
4537 (substitute* "Makefile.in"
4538 (("README\\.md ChangeLog TODO AUTHORS")
4539 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
4540 #t)))))
4541 ;; TODO: opencv for additional face detection filters.
4542 (inputs
4543 (list gavl cairo))
4544 (native-inputs
4545 (list pkg-config))
4546 (home-page "https://www.dyne.org/software/frei0r/")
4547 (synopsis "Minimalistic plugin API for video effects")
4548 (description
4549 "Frei0r is a minimalistic plugin API for video effects.
4550 The main emphasis is on simplicity for an API that will round up
4551 the most common video effects into simple filters, sources and
4552 mixers that can be controlled by parameters. Frei0r wants to
4553 provide a way to share these simple effects between many
4554 applications, avoiding their reimplementation by different projects.
4555 It counts more than 100 plugins.")
4556 (license (list license:gpl2+
4557 ;; The following files are licensed as LGPL2.1+:
4558 ;; src/generator/ising0r/ising0r.c
4559 ;; src/generator/onecol0r/onecol0r.cpp
4560 ;; src/generator/nois0r/nois0r.cpp
4561 ;; src/generator/lissajous0r/lissajous0r.cpp
4562 ;; src/filter/ndvi/gradientlut.hpp
4563 ;; src/filter/ndvi/ndvi.cpp
4564 ;; src/filter/facedetect/facedetect.cpp
4565 license:lgpl2.1+))))
4566
4567 (define-public motion
4568 (package
4569 (name "motion")
4570 (version "4.3.2")
4571 (home-page "https://motion-project.github.io/")
4572 (source (origin
4573 (method git-fetch)
4574 (uri (git-reference
4575 (url "https://github.com/Motion-Project/motion")
4576 (commit (string-append "release-" version))))
4577 (sha256
4578 (base32
4579 "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95"))
4580 (file-name (git-file-name name version))))
4581 (build-system gnu-build-system)
4582 (native-inputs
4583 `(("autoconf" ,autoconf)
4584 ("automake" ,automake)
4585 ("gettext" ,gettext-minimal)
4586 ("pkg-config" ,pkg-config)))
4587 (inputs
4588 `(("libjpeg" ,libjpeg-turbo)
4589 ("ffmpeg" ,ffmpeg)
4590 ("libmicrohttpd" ,libmicrohttpd)
4591 ("sqlite" ,sqlite)))
4592 (arguments
4593 '(#:phases (modify-phases %standard-phases
4594 (replace 'bootstrap
4595 (lambda _
4596 (patch-shebang "scripts/version.sh")
4597 (invoke "autoreconf" "-vfi"))))
4598 #:configure-flags '("--sysconfdir=/etc")
4599 #:make-flags (list (string-append "sysconfdir="
4600 (assoc-ref %outputs "out")
4601 "/etc"))
4602
4603 #:tests? #f)) ; no 'check' target
4604 (synopsis "Detect motion from video signals")
4605 (description
4606 "Motion is a program that monitors the video signal from one or more
4607 cameras and is able to detect if a significant part of the picture has
4608 changed. Or in other words, it can detect motion.")
4609
4610 ;; Some files say "version 2" and others "version 2 or later".
4611 (license license:gpl2)))
4612
4613 (define-public subdl
4614 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4615 (revision "1"))
4616 (package
4617 (name "subdl")
4618 (version (git-version "1.0.3" revision commit))
4619 (source (origin
4620 (method git-fetch)
4621 (uri (git-reference
4622 (url "https://github.com/alexanderwink/subdl")
4623 (commit commit)))
4624 (file-name (git-file-name name version))
4625 (sha256
4626 (base32
4627 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4628 (build-system trivial-build-system)
4629 (arguments
4630 `(#:modules ((guix build utils))
4631 #:builder (begin
4632 (use-modules (guix build utils))
4633 (let* ((out (assoc-ref %outputs "out"))
4634 (bin (string-append out "/bin"))
4635 (source (assoc-ref %build-inputs "source"))
4636 (python (assoc-ref %build-inputs "python")))
4637 (install-file (string-append source "/subdl") bin)
4638 (patch-shebang (string-append bin "/subdl")
4639 (list (string-append python "/bin")))))))
4640 (inputs (list python))
4641 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4642 (description "Subdl is a command-line tool for downloading subtitles from
4643 opensubtitles.org. By default, it will search for English subtitles, display
4644 the results, download the highest-rated result in the requested language and
4645 save it to the appropriate filename.")
4646 (license license:gpl3+)
4647 (home-page "https://github.com/alexanderwink/subdl"))))
4648
4649 (define-public l-smash
4650 (package
4651 (name "l-smash")
4652 (version "2.14.5")
4653 (source (origin
4654 (method git-fetch)
4655 (uri (git-reference
4656 (url "https://github.com/l-smash/l-smash")
4657 (commit (string-append "v" version))))
4658 (file-name (git-file-name name version))
4659 (sha256
4660 (base32
4661 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4662 (build-system gnu-build-system)
4663 (arguments
4664 `(#:tests? #f ;no tests
4665 #:make-flags
4666 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4667 (assoc-ref %outputs "out") "/lib"))
4668 #:phases
4669 (modify-phases %standard-phases
4670 ;; configure fails if it is followed by CONFIG_SHELL
4671 (replace 'configure
4672 (lambda* (#:key outputs #:allow-other-keys)
4673 (let ((out (assoc-ref outputs "out")))
4674 (invoke "./configure" (string-append "--prefix=" out)
4675 "--disable-static")))))))
4676 (native-inputs
4677 (list which))
4678 (home-page "https://l-smash.github.io/l-smash/")
4679 (synopsis "MP4 multiplexer and demultiplexer library")
4680 (description
4681 "L-SMASH is a cross-platform library that handles the ISO base media file
4682 format and some of its derived file formats, including MP4. It operates as a
4683 multiplexer and demultiplexer, and can mux video and audio in several formats
4684 using standalone executable files.")
4685 (license license:isc)))
4686
4687 (define-public qtfaststart
4688 (package
4689 (name "qtfaststart")
4690 (version "1.8")
4691 (source (origin
4692 (method url-fetch)
4693 (uri (pypi-uri "qtfaststart" version))
4694 (sha256
4695 (base32
4696 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4697 (build-system python-build-system)
4698 (arguments
4699 '(#:tests? #f)) ; no test suite
4700 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4701 (description "qtfaststart enables streaming and pseudo-streaming of
4702 QuickTime and MP4 files by moving metadata and offset information to the
4703 beginning of the file. It can also print some useful information about the
4704 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4705 project, which is released into the public domain, as well as ISO 14496-12:2005
4706 (the official spec for MP4), which can be obtained from the ISO or found
4707 online.")
4708 (home-page "https://github.com/danielgtaylor/qtfaststart")
4709 (license license:expat)))
4710
4711 (define-public vidstab
4712 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4713 (revision "0"))
4714 (package
4715 (name "vidstab")
4716 (version (git-version "1.1.0" revision commit))
4717 (source (origin
4718 (method git-fetch)
4719 (uri (git-reference
4720 (url "https://github.com/georgmartius/vid.stab")
4721 (commit commit)))
4722 (file-name (git-file-name name version))
4723 (sha256
4724 (base32
4725 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4726 (build-system cmake-build-system)
4727 (arguments
4728 '(#:tests? #f)) ; tests are not run as part of standard build process
4729 (home-page "http://public.hronopik.de/vid.stab/")
4730 (synopsis "Video stabilization library")
4731 (description "Vidstab is a video stabilization library which can be used
4732 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4733 vehicle typically suffers from undesirable shakes and jitters. Activities such
4734 as surfing, skiing, riding and walking while shooting videos are especially
4735 prone to erratic camera shakes. Vidstab targets these video contents to help
4736 create smoother and stable videos.")
4737 (license license:gpl2+))))
4738
4739 (define-public libopenshot
4740 (package
4741 (name "libopenshot")
4742 (version "0.2.7")
4743 (source (origin
4744 (method git-fetch)
4745 (uri (git-reference
4746 (url "https://github.com/OpenShot/libopenshot")
4747 (commit (string-append "v" version))))
4748 (file-name (git-file-name name version))
4749 (sha256
4750 (base32
4751 "0i9bsn8gklm1mvj60l3d3xrxdgy8svpxjfqcwsr308j5zjn30pv8"))
4752 (modules '((guix build utils)))
4753 (snippet '(begin
4754 ;; Allow overriding of the python installation dir
4755 (substitute* "bindings/python/CMakeLists.txt"
4756 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4757 (string-append set " CACHE PATH "
4758 "\"Python bindings directory\")")))
4759 (delete-file-recursively "thirdparty")
4760 #t))))
4761 (build-system cmake-build-system)
4762 (native-inputs
4763 `(("pkg-config" ,pkg-config)
4764 ("python" ,python)
4765 ("swig" ,swig)
4766 ("unittest++" ,unittest-cpp)))
4767 (inputs
4768 (list alsa-lib zlib))
4769 (propagated-inputs ;all referenced in installed headers
4770 (list cppzmq
4771 ffmpeg
4772 imagemagick
4773 jsoncpp
4774 libopenshot-audio
4775 qtbase-5
4776 qtmultimedia
4777 zeromq))
4778 (arguments
4779 `(#:configure-flags
4780 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4781 ,(version-major+minor (package-version python))
4782 "/site-packages")
4783 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4784 #:phases
4785 (modify-phases %standard-phases
4786 (add-before 'configure 'set-vars
4787 (lambda* (#:key inputs #:allow-other-keys)
4788 (setenv "LIBOPENSHOT_AUDIO_DIR"
4789 (assoc-ref inputs "libopenshot-audio"))
4790 (setenv "ZMQDIR"
4791 (assoc-ref inputs "zeromq"))
4792 (setenv "UNITTEST_DIR"
4793 (search-input-directory inputs
4794 "include/UnitTest++")))))))
4795 (home-page "https://openshot.org")
4796 (synopsis "Video-editing, animation, and playback library")
4797 (description "OpenShot Library (libopenshot) is a powerful C++ video
4798 editing library with a multi-threaded and feature rich video editing
4799 API. It includes bindings for Python, Ruby, and other languages.")
4800 (license license:lgpl3+)))
4801
4802 (define-public openshot
4803 (package
4804 (name "openshot")
4805 (version "2.6.1")
4806 (source (origin
4807 (method git-fetch)
4808 (uri (git-reference
4809 (url "https://github.com/OpenShot/openshot-qt")
4810 (commit (string-append "v" version))))
4811 (file-name (git-file-name name version))
4812 (sha256
4813 (base32
4814 "0pa8iwl217503bjlqg2zlrw5lxyq5hvxrf5apxrh3843hj1w1myv"))
4815 (modules '((guix build utils)))
4816 (snippet
4817 '(begin
4818 ;; TODO: Unbundle jquery and others from src/timeline/media
4819 (delete-file-recursively "src/images/fonts") #t))))
4820 (build-system python-build-system)
4821 (inputs
4822 (list ffmpeg
4823 font-dejavu
4824 libopenshot
4825 python
4826 python-pyqt
4827 python-pyzmq
4828 python-requests
4829 qtsvg))
4830 (arguments
4831 `(#:modules ((guix build python-build-system)
4832 (guix build qt-utils)
4833 (guix build utils))
4834 #:imported-modules (,@%python-build-system-modules
4835 (guix build qt-utils))
4836 #:phases (modify-phases %standard-phases
4837 (delete 'build) ;install phase does all the work
4838 (replace 'check
4839 (lambda* (#:key tests? #:allow-other-keys)
4840 (when tests?
4841 (setenv "QT_QPA_PLATFORM" "offscreen")
4842 (invoke "python" "src/tests/query_tests.py"))))
4843 (add-after 'unpack 'patch-font-location
4844 (lambda* (#:key inputs #:allow-other-keys)
4845 (let ((font (assoc-ref inputs "font-dejavu")))
4846 (substitute* "src/classes/app.py"
4847 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4848 (("fonts") "share/fonts/truetype")
4849 (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
4850 #t))
4851 ;; https://github.com/OpenShot/openshot-qt/issues/4502
4852 (add-before 'ensure-no-mtimes-pre-1980 'fix-symbolic-link
4853 (lambda _
4854 (delete-file "images/Humanity/actions/custom/razor_line_with_razor.png")
4855 (symlink "../../../../src/timeline/media/images/razor_line_with_razor.png"
4856 "images/Humanity/actions/custom/razor_line_with_razor.png")))
4857 (add-before 'install 'set-tmp-home
4858 (lambda _
4859 ;; src/classes/info.py "needs" to create several
4860 ;; directories in $HOME when loaded during build
4861 (setenv "HOME" "/tmp")
4862 #t))
4863 (add-after 'install 'wrap-program
4864 (lambda* (#:key outputs inputs #:allow-other-keys)
4865 (let ((out (assoc-ref outputs "out")))
4866 (wrap-qt-program "openshot-qt"
4867 #:output out #:inputs inputs))
4868 #t)))))
4869 (home-page "https://www.openshot.org/")
4870 (synopsis "Video editor")
4871 (description "OpenShot takes your videos, photos, and music files and
4872 helps you create the film you have always dreamed of. Easily add sub-titles,
4873 transitions, and effects and then export your film to many common formats.")
4874 (license license:gpl3+)))
4875
4876 (define-public shotcut
4877 (package
4878 (name "shotcut")
4879 (version "22.04.25")
4880 (source
4881 (origin
4882 (method git-fetch)
4883 (uri (git-reference
4884 (url "https://github.com/mltframework/shotcut")
4885 (commit (string-append "v" version))))
4886 (file-name (git-file-name name version))
4887 (sha256
4888 (base32 "0ccbx2crqrnhl19d7267xc40vs0cjmps2cnhi1g1l6bqxbi7k88x"))))
4889 (build-system qt-build-system)
4890 (arguments
4891 `(#:tests? #f ;there are no tests
4892 #:phases
4893 (modify-phases %standard-phases
4894 (add-after 'unpack 'patch-executable-paths
4895 (lambda* (#:key inputs #:allow-other-keys)
4896 ;; Shotcut expects ffmpeg and melt executables in the shotcut
4897 ;; directory. Use full store paths.
4898 (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
4899 (mlt (assoc-ref inputs "mlt")))
4900 (substitute* "src/jobs/ffmpegjob.cpp"
4901 (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
4902 (substitute* "src/jobs/meltjob.cpp"
4903 (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
4904 (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
4905 (replace 'configure
4906 (lambda* (#:key outputs #:allow-other-keys)
4907 (let* ((out (assoc-ref outputs "out")))
4908 (invoke "qmake"
4909 (string-append "PREFIX=" out)
4910 "QMAKE_LRELEASE=lrelease"
4911 "QMAKE_LUPDATE=lupdate"
4912 "shotcut.pro"))))
4913 (add-after 'install 'wrap-executable
4914 (lambda* (#:key inputs outputs #:allow-other-keys)
4915 (let* ((out (assoc-ref outputs "out"))
4916 (frei0r (assoc-ref inputs "frei0r-plugins"))
4917 (jack (assoc-ref inputs "jack"))
4918 (ladspa (assoc-ref inputs "ladspa"))
4919 (mlt (assoc-ref inputs "mlt"))
4920 (sdl2 (assoc-ref inputs "sdl2")))
4921 (wrap-program (string-append out "/bin/shotcut")
4922 `("FREI0R_PATH" ":" =
4923 (,(string-append frei0r "/lib/frei0r-1")))
4924 `("LADSPA_PATH" ":" =
4925 (,(string-append ladspa "/lib/ladspa")))
4926 `("LD_LIBRARY_PATH" ":" prefix
4927 ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
4928 `("PATH" ":" prefix
4929 ,(list (string-append mlt "/bin"))))))))))
4930 (native-inputs
4931 `(("pkg-config" ,pkg-config)
4932 ("python-wrapper" ,python-wrapper)
4933 ("qttools" ,qttools)))
4934 (inputs
4935 (list bash-minimal
4936 ffmpeg
4937 frei0r-plugins
4938 jack-1
4939 ladspa
4940 lame
4941 libvpx
4942 libx264
4943 mlt
4944 pulseaudio
4945 qtbase-5
4946 qtdeclarative
4947 qtgraphicaleffects
4948 qtmultimedia
4949 qtquickcontrols
4950 qtquickcontrols2
4951 qtsvg
4952 qtwebkit
4953 qtwebsockets
4954 qtx11extras
4955 sdl2))
4956 (home-page "https://www.shotcut.org/")
4957 (synopsis "Video editor built on the MLT framework")
4958 (description
4959 "Shotcut is a video editor built on the MLT framework. Features include
4960 a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
4961 and audio capture, network stream playback, and many more.")
4962 (license license:gpl3+)))
4963
4964 (define-public dav1d
4965 (package
4966 (name "dav1d")
4967 (version "0.9.2")
4968 (source
4969 (origin
4970 (method git-fetch)
4971 (uri (git-reference
4972 (url "https://code.videolan.org/videolan/dav1d.git")
4973 (commit version)))
4974 (file-name (git-file-name name version))
4975 (sha256
4976 (base32 "0bkps488h9s15ylvkm4fmfywgrpbw570glawpnv6khpq9n223dzl"))))
4977 (build-system meson-build-system)
4978 (native-inputs (list nasm))
4979 (home-page "https://code.videolan.org/videolan/dav1d")
4980 (synopsis "AV1 decoder")
4981 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4982 speed and correctness.")
4983 (license license:bsd-2)))
4984
4985 (define-public wlstream
4986 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4987 (revision "1"))
4988 (package
4989 (name "wlstream")
4990 (version (git-version "0.0" revision commit))
4991 (source
4992 (origin
4993 (method git-fetch)
4994 (uri (git-reference
4995 (url "https://github.com/atomnuker/wlstream")
4996 (commit commit)))
4997 (file-name (git-file-name name version))
4998 (sha256
4999 (base32
5000 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
5001 (build-system meson-build-system)
5002 (native-inputs (list libdrm pkg-config))
5003 (inputs (list ffmpeg pulseaudio wayland wayland-protocols))
5004 (home-page "https://github.com/atomnuker/wlstream")
5005 (synopsis "Screen capture tool for Wayland sessions")
5006 (description "Wlstream is a screen capture tool for recording audio and
5007 video from a Wayland session.")
5008 (license license:lgpl2.1+))))
5009
5010 (define-public gaupol
5011 (package
5012 (name "gaupol")
5013 (version "1.9")
5014 (source (origin
5015 (method git-fetch)
5016 (uri (git-reference
5017 (url "https://github.com/otsaloma/gaupol/")
5018 (commit version)))
5019 (file-name (git-file-name name version))
5020 (sha256
5021 (base32
5022 "1mmjg8nwhif2hmmp8i11643izwzdf839brqdai3ksfg0qkh8rnxk"))))
5023 (build-system python-build-system)
5024 (native-inputs
5025 `(("gettext" ,gettext-minimal)
5026 ("pkg-config" ,pkg-config)))
5027 (inputs
5028 (list python-pygobject
5029 gtk+
5030 python-pycairo ; Required or else clicking on a subtitle line fails.
5031 python-chardet ; Optional: Character encoding detection.
5032 gtkspell3 ; Optional: Inline spell-checking.
5033 iso-codes ; Optional: Translations.
5034 gstreamer
5035 gst-libav
5036 gst-plugins-base
5037 gst-plugins-good
5038 gst-plugins-bad
5039 gst-plugins-ugly))
5040 (arguments
5041 `(#:tests? #f ; Tests seem to require networking.
5042 #:phases
5043 (modify-phases %standard-phases
5044 (add-after 'unpack 'disable-builtin-byte-compilation
5045 (lambda _
5046 ;; The setup.py script attempts to compile bytecode and fails.
5047 ;; We compile bytecode in a separate phase, so just disable it.
5048 (substitute* "setup.py"
5049 (("distutils\\.util\\.byte_compile\\(.*")
5050 ""))))
5051 ;; gaupol's setup.py script does not support one of the Python build
5052 ;; system's default flags, "--single-version-externally-managed".
5053 (replace 'install
5054 (lambda* (#:key outputs #:allow-other-keys)
5055 (invoke "python" "setup.py" "install"
5056 (string-append "--prefix=" (assoc-ref outputs "out"))
5057 "--root=/")))
5058 (add-after 'install 'wrap-gaupol
5059 (lambda* (#:key outputs #:allow-other-keys)
5060 (let ((out (assoc-ref outputs "out"))
5061 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
5062 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
5063 (wrap-program (string-append out "/bin/gaupol")
5064 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
5065 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
5066 (add-after 'unpack 'patch-data-dir
5067 ;; Fix some path variables that setup.py seems to garble.
5068 (lambda* (#:key outputs #:allow-other-keys)
5069 (let ((out (assoc-ref outputs "out")))
5070 (substitute* "setup.py"
5071 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
5072 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
5073 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
5074 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
5075 (synopsis "Editor for text-based subtitles")
5076 (description
5077 "Gaupol supports multiple subtitle file formats and provides means of
5078 creating subtitles, editing texts and timing subtitles to match video. The
5079 user interface features a builtin video player and is designed with attention
5080 to convenience of translating and batch processing of multiple documents.")
5081 (home-page "https://otsaloma.io/gaupol/")
5082 (license license:gpl3+)))
5083
5084 (define-public theorafile
5085 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
5086 (package
5087 (name "theorafile")
5088 (version (git-version "0.0.0" "1" commit))
5089 (source
5090 (origin
5091 (method git-fetch)
5092 (uri (git-reference
5093 (url "https://github.com/FNA-XNA/Theorafile")
5094 (commit commit)))
5095 (file-name (git-file-name name version))
5096 (sha256
5097 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
5098 (build-system gnu-build-system)
5099 (arguments
5100 '(#:make-flags '("CC=gcc")
5101 #:phases
5102 (modify-phases %standard-phases
5103 (delete 'configure)
5104 (replace 'check
5105 (lambda _
5106 (setenv "CC" "gcc")
5107 (invoke "make" "test")))
5108 (replace 'install
5109 (lambda* (#:key outputs #:allow-other-keys)
5110 (let ((out (assoc-ref outputs "out")))
5111 (install-file "libtheorafile.so" (string-append out "/lib"))
5112 (install-file "theorafile.h" (string-append out "/include")))
5113 #t)))))
5114 (native-inputs
5115 ;; For tests.
5116 (list sdl2))
5117 (home-page "https://github.com/FNA-XNA/Theorafile")
5118 (synopsis "Ogg Theora Video Decoder Library")
5119 (description "Theorafile is a library for quickly and easily decoding Ogg
5120 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
5121 (license license:zlib))))
5122
5123 (define-public dvdbackup
5124 (package
5125 (name "dvdbackup")
5126 (version "0.4.2")
5127 (source
5128 (origin
5129 (method url-fetch)
5130 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
5131 "dvdbackup-" version "/"
5132 "dvdbackup-" version ".tar.xz"))
5133 (sha256
5134 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
5135 (build-system gnu-build-system)
5136 (inputs
5137 (list libdvdcss libdvdread))
5138 (home-page "http://dvdbackup.sourceforge.net")
5139 (synopsis "DVD video ripper")
5140 (description
5141 "A simple command line tool to backup video from a DVD. Decrypts the
5142 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
5143 transcode or reformat the videos in any way, producing perfect backups.")
5144 (license license:gpl3+)))
5145
5146 (define-public svt-av1
5147 (package
5148 (name "svt-av1")
5149 (version "0.9.1")
5150 (source
5151 (origin
5152 (method git-fetch)
5153 (uri (git-reference
5154 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
5155 (commit (string-append "v" version))))
5156 (file-name (git-file-name name version))
5157 (sha256
5158 (base32 "02fchq2vlxcxzbrss72xl9vrxzysdy39d5i159bmg3qa45ngd2iw"))))
5159 (build-system cmake-build-system)
5160 ;; SVT-AV1 only supports 64-bit Intel-compatible CPUs.
5161 (supported-systems '("x86_64-linux"))
5162 (arguments
5163 ;; The test suite tries to download test data and git clone a 3rd-party
5164 ;; fork of libaom. Skip it.
5165 `(#:tests? #f
5166 #:phases
5167 (modify-phases %standard-phases
5168 (add-after 'install 'install-documentation
5169 (lambda* (#:key outputs #:allow-other-keys)
5170 (let* ((out (assoc-ref %outputs "out"))
5171 (doc (string-append out "/share/doc/svt-av1-" ,version)))
5172 (copy-recursively "../source/Docs" doc)
5173 #t))))))
5174 (native-inputs
5175 (list yasm))
5176 (synopsis "AV1 video codec")
5177 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
5178 work-in-progress, aiming to support video-on-demand and live streaming
5179 applications. It only supports Intel-compatible CPUs (x86).")
5180 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
5181 (license license:bsd-2)))
5182
5183 (define-public svt-vp9
5184 (package
5185 (name "svt-vp9")
5186 (version "0.3.0")
5187 (source (origin
5188 (method git-fetch)
5189 (uri (git-reference
5190 (url "https://github.com/OpenVisualCloud/SVT-VP9")
5191 (commit (string-append "v" version))))
5192 (file-name (git-file-name name version))
5193 (sha256
5194 (base32
5195 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
5196 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
5197 (supported-systems '("x86_64-linux"))
5198 (build-system cmake-build-system)
5199 (arguments
5200 `(#:tests? #f ; No test suite
5201 #:phases
5202 (modify-phases %standard-phases
5203 (add-after 'install 'install-documentation
5204 (lambda* (#:key outputs #:allow-other-keys)
5205 (let* ((out (assoc-ref %outputs "out"))
5206 (doc (string-append out "/share/doc/" ,name "-" ,version)))
5207 (copy-recursively "../source/Docs" doc)
5208 #t))))))
5209 (native-inputs
5210 (list yasm))
5211 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
5212 (synopsis "VP9 video encoder")
5213 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
5214 on supporting video-on-demand and live encoding on Intel Xeon processors.")
5215 (license license:bsd-2)))
5216
5217 (define-public w-scan
5218 (package
5219 (name "w-scan")
5220 (version "20170107")
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
5225 version ".tar.bz2"))
5226 (sha256
5227 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
5228 (build-system gnu-build-system)
5229 (arguments
5230 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
5231 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
5232 (description
5233 "This is a small command line utility used to perform frequency scans for
5234 DVB and ATSC transmissions without initial tuning data. It can print the
5235 result in several formats:
5236 @itemize
5237 @item VDR channels.conf,
5238 @item czap/tzap/xine/mplayer channels.conf,
5239 @item Gstreamer dvbsrc plugin,
5240 @item VLC xspf playlist,
5241 @item XML,
5242 @item initial tuning data for scan or dvbv5-scan.
5243 @end itemize\n")
5244 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
5245 (license license:gpl2+)))
5246
5247 ;;; XXX: This crate is used only for rav1e and can be removed once the latter
5248 ;;; is updated. See <https://issues.guix.gnu.org/52837>.
5249 (define rust-dav1d-sys-0.3.2
5250 (package
5251 (name "rust-dav1d-sys")
5252 (version "0.3.2")
5253 (source
5254 (origin
5255 (method url-fetch)
5256 (uri (crate-uri "dav1d-sys" version))
5257 (file-name
5258 (string-append name "-" version ".tar.gz"))
5259 (sha256
5260 (base32 "1jdxhnlxcml6jd67lx78ifzkn1xm18zfk4li7vjdh3fa61i073kx"))))
5261 (build-system cargo-build-system)
5262 (arguments
5263 `(#:cargo-inputs
5264 (("rust-bindgen" ,rust-bindgen-0.54)
5265 ("rust-metadeps" ,rust-metadeps-1))))
5266 (native-inputs
5267 (list pkg-config))
5268 (inputs
5269 (list dav1d clang llvm))
5270 (home-page "https://github.com/rust-av/dav1d-rs")
5271 (synopsis "FFI bindings to dav1d")
5272 (description "This package provides FFI bindings to dav1d.")
5273 (license license:expat)))
5274
5275 (define-public rav1e
5276 (package
5277 (name "rav1e")
5278 (version "0.5.1")
5279 (source
5280 (origin
5281 (method url-fetch)
5282 (uri (crate-uri "rav1e" version))
5283 (file-name
5284 (string-append name "-" version ".tar.gz"))
5285 (sha256
5286 (base32
5287 "006bfcmjwg0phg8gc25b1sl2ngjrb2bh1b3fd0s5gbf9nlkr8qsn"))))
5288 (build-system cargo-build-system)
5289 (arguments
5290 `(;; Strip the '--release' flag to work around the doctest failures with
5291 ;; Rust 1.57 (see: https://github.com/xiph/rav1e/issues/2851).
5292 #:cargo-test-flags '()
5293 #:cargo-inputs
5294 (("rust-aom-sys" ,rust-aom-sys-0.3)
5295 ("rust-arbitrary" ,rust-arbitrary-0.4)
5296 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
5297 ("rust-arrayvec" ,rust-arrayvec-0.7)
5298 ("rust-av-metrics" ,rust-av-metrics-0.7)
5299 ("rust-backtrace" ,rust-backtrace-0.3)
5300 ("rust-bitstream-io" ,rust-bitstream-io-1)
5301 ("rust-byteorder" ,rust-byteorder-1)
5302 ("rust-cfg-if" ,rust-cfg-if-1)
5303 ("rust-clap" ,rust-clap-2)
5304 ("rust-console" ,rust-console-0.14)
5305 ("rust-crossbeam" ,rust-crossbeam-0.8)
5306 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
5307 ("rust-fern" ,rust-fern-0.6)
5308 ("rust-image" ,rust-image-0.23)
5309 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5310 ("rust-itertools" ,rust-itertools-0.10)
5311 ("rust-ivf" ,rust-ivf-0.1)
5312 ("rust-libc" ,rust-libc-0.2)
5313 ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
5314 ("rust-log" ,rust-log-0.4)
5315 ("rust-nasm-rs" ,rust-nasm-rs-0.2)
5316 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
5317 ("rust-num-derive" ,rust-num-derive-0.3)
5318 ("rust-num-traits" ,rust-num-traits-0.2)
5319 ("rust-paste" ,rust-paste-1)
5320 ("rust-rand" ,rust-rand-0.8)
5321 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5322 ("rust-rayon" ,rust-rayon-1)
5323 ("rust-regex" ,rust-regex-1)
5324 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
5325 ("rust-rustc-version" ,rust-rustc-version-0.4)
5326 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
5327 ("rust-serde" ,rust-serde-1)
5328 ("rust-signal-hook" ,rust-signal-hook-0.3)
5329 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
5330 ("rust-thiserror" ,rust-thiserror-1)
5331 ("rust-toml" ,rust-toml-0.5)
5332 ("rust-v-frame" ,rust-v-frame-0.2)
5333 ("rust-vergen" ,rust-vergen-3)
5334 ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
5335 ("rust-y4m" ,rust-y4m-0.7))
5336 #:cargo-development-inputs
5337 (("rust-assert-cmd" ,rust-assert-cmd-2)
5338 ("rust-cc" ,rust-cc-1)
5339 ("rust-criterion" ,rust-criterion-0.3)
5340 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5341 ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)
5342 ("rust-rand" ,rust-rand-0.8)
5343 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5344 ("rust-semver" ,rust-semver-1))
5345 #:phases
5346 (modify-phases %standard-phases
5347 (add-after 'unpack 'relax-versions
5348 (lambda _
5349 (substitute* "Cargo.toml"
5350 ;; Allow using more recent versions of
5351 (("~3.1.2") "~3"))))
5352 (replace 'build
5353 (lambda* (#:key outputs #:allow-other-keys)
5354 (let ((out (assoc-ref outputs "out")))
5355 (invoke "cargo" "cinstall" "--release"
5356 (string-append "--prefix=" out)))))
5357 (add-after 'install 'delete-static-library
5358 (lambda* (#:key outputs #:allow-other-keys)
5359 ;; Delete 80 MiB (!) static library.
5360 (delete-file (string-append (assoc-ref outputs "out")
5361 "/lib/librav1e.a")))))))
5362 (native-inputs
5363 (list rust-cargo-c nasm))
5364 (home-page "https://github.com/xiph/rav1e/")
5365 (synopsis "Fast and safe AV1 encoder")
5366 (description "@code{rav1e} is an AV1 video encoder. It is designed to
5367 eventually cover all use cases, though in its current form it is most suitable
5368 for cases where libaom (the reference encoder) is too slow.")
5369 (license license:bsd-2)))
5370
5371 (define-public peek
5372 (package
5373 (name "peek")
5374 (version "1.5.1")
5375 (source
5376 (origin
5377 (method git-fetch)
5378 (uri (git-reference
5379 (url "https://github.com/phw/peek")
5380 (commit version)))
5381 (file-name (git-file-name name version))
5382 (sha256
5383 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
5384 (build-system meson-build-system)
5385 (arguments '(#:glib-or-gtk? #t))
5386 (inputs
5387 `(("gtk+" ,gtk+)
5388 ("python" ,python-wrapper)))
5389 (native-inputs
5390 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
5391 ("gettext" ,gettext-minimal)
5392 ("glib:bin" ,glib "bin") ; for glib-compile-resources
5393 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
5394 ("pkg-config" ,pkg-config)
5395 ("vala" ,vala)))
5396 (home-page "https://github.com/phw/peek")
5397 (synopsis "Simple animated GIF screen recorder")
5398 (description
5399 "Peek makes it easy to create short screencasts of a screen area. It was
5400 built for the specific use case of recording screen areas, e.g. for easily
5401 showing UI features of your own apps or for showing a bug in bug reports.
5402 With Peek, you simply place the Peek window over the area you want to record
5403 and press \"Record\". Peek is optimized for generating animated GIFs, but you
5404 can also directly record to WebM or MP4 if you prefer.")
5405 (license license:gpl3+)))
5406
5407 (define-public wf-recorder
5408 (package
5409 (name "wf-recorder")
5410 (version "0.2.1")
5411 (source (origin
5412 (method git-fetch)
5413 (uri (git-reference
5414 (url "https://github.com/ammen99/wf-recorder")
5415 (commit (string-append "v" version))))
5416 (file-name (git-file-name name version))
5417 (sha256
5418 (base32
5419 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
5420 (build-system meson-build-system)
5421 (native-inputs
5422 (list pkg-config))
5423 (inputs
5424 (list ffmpeg pulseaudio wayland wayland-protocols libx264))
5425 (home-page "https://github.com/ammen99/wf-recorder")
5426 (synopsis "Screen recorder for wlroots-based compositors")
5427 (description
5428 "@code{wf-recorder} is a utility program for screen recording of
5429 wlroots-based compositors. More specifically, those that support
5430 @code{wlr-screencopy-v1} and @code{xdg-output}.")
5431 (license license:expat)))
5432
5433 (define-public guvcview
5434 (package
5435 (name "guvcview")
5436 (version "2.0.6")
5437 (source (origin
5438 (method url-fetch)
5439 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
5440 "src-" version ".tar.gz"))
5441 (sha256
5442 (base32
5443 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
5444 (build-system gnu-build-system)
5445 (arguments
5446 ;; There are no tests and "make check" would fail on an intltool error.
5447 '(#:tests? #f))
5448 (native-inputs
5449 (list pkg-config intltool))
5450 (inputs
5451 (list gtk+
5452 eudev
5453 libusb
5454 v4l-utils ;libv4l2
5455 ffmpeg ;libavcodec, libavutil
5456 sdl2
5457 gsl
5458 portaudio
5459 alsa-lib))
5460 (home-page "http://guvcview.sourceforge.net/")
5461 (synopsis "Control your webcam and capture videos and images")
5462 (description
5463 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
5464 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
5465 It provides control over precise settings of the webcam such as exposure,
5466 brightness, contrast, and frame rate.")
5467
5468 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
5469 (license license:gpl2+)))
5470
5471 (define-public get-iplayer
5472 (package
5473 (name "get-iplayer")
5474 (version "3.27")
5475 (source
5476 (origin
5477 (method git-fetch)
5478 (uri (git-reference
5479 (url "https://github.com/get-iplayer/get_iplayer")
5480 (commit (string-append "v" version))))
5481 (file-name (git-file-name name version))
5482 (sha256
5483 (base32 "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi"))))
5484 (build-system perl-build-system)
5485 (arguments
5486 `(#:tests? #f ; no tests
5487 #:phases
5488 (modify-phases %standard-phases
5489 (delete 'configure)
5490 (delete 'build)
5491 (replace 'install
5492 (lambda* (#:key outputs #:allow-other-keys)
5493 (let* ((out (assoc-ref outputs "out"))
5494 (bin (string-append out "/bin"))
5495 (man (string-append out "/share/man/man1")))
5496 (install-file "get_iplayer" bin)
5497 (install-file "get_iplayer.cgi" bin)
5498 (install-file "get_iplayer.1" man))
5499 #t))
5500 (add-after 'install 'wrap-program
5501 (lambda* (#:key inputs outputs #:allow-other-keys)
5502 (let* ((out (assoc-ref outputs "out"))
5503 (perllib (string-append out "/lib/perl5/site_perl/"
5504 ,(package-version perl))))
5505 (wrap-program (string-append out "/bin/get_iplayer")
5506 `("PERL5LIB" ":"
5507 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5508 (wrap-program (string-append out "/bin/get_iplayer.cgi")
5509 `("PERL5LIB" ":"
5510 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5511 #t))))))
5512 (inputs
5513 (list perl-mojolicious perl-lwp-protocol-https perl-xml-libxml))
5514 (home-page "https://github.com/get-iplayer/get_iplayer")
5515 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
5516 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
5517 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
5518 @code{get_iplayer} has three modes: recording a complete programme for later
5519 playback, streaming a programme directly to a playback application, such as
5520 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
5521 terms and recording programmes automatically. It can also stream or record live
5522 BBC iPlayer output.")
5523 (license license:gpl3+)))
5524
5525 (define-public ogmtools
5526 (package
5527 (name "ogmtools")
5528 (version "1.5")
5529 (source (origin
5530 (method url-fetch)
5531 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
5532 version
5533 ".tar.bz2"))
5534 (sha256
5535 (base32
5536 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
5537 (build-system gnu-build-system)
5538 (inputs
5539 (list libvorbis libdvdread))
5540 (synopsis "Information, extraction or creation for OGG media streams")
5541 (description
5542 "These tools allow information about (@code{ogminfo}) or extraction from
5543 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
5544 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
5545 (license license:gpl2)
5546 (home-page "https://www.bunkus.org/videotools/ogmtools/")))
5547
5548 (define-public libcaption
5549 (package
5550 (name "libcaption")
5551 (version "0.7")
5552 (source (origin
5553 (method git-fetch)
5554 (uri (git-reference
5555 (url "https://github.com/szatmary/libcaption")
5556 (commit version)))
5557 (file-name (git-file-name name version))
5558 (sha256
5559 (base32
5560 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
5561 (build-system cmake-build-system)
5562 (arguments
5563 `(#:tests? #f ; Cannot figure out how to run the unit tests
5564 #:configure-flags '("-DENABLE_RE2C=ON")))
5565 (native-inputs
5566 (list re2c))
5567 (synopsis "CEA608 / CEA708 closed-caption codec")
5568 (description "Libcaption creates and parses closed-caption data,
5569 providing an encoder / decoder for the EIA608 and CEA708 closed-caption
5570 standards.
5571
5572 608 support is currently limited to encoding and decoding the necessary control
5573 and preamble codes as well as support for the Basic North American, Special
5574 North American and Extended Western European character sets.
5575
5576 708 support is limited to encoding the 608 data in NTSC field 1 user data type
5577 structure.
5578
5579 In addition, utility functions to create h.264 SEI (Supplementary enhancement
5580 information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
5581 elementary stream are provided.")
5582 (home-page "https://github.com/szatmary/libcaption")
5583 (license license:expat)))
5584
5585 (define-public video-contact-sheet
5586 (package
5587 (name "video-contact-sheet")
5588 (version "1.13.4")
5589 (source (origin
5590 (method url-fetch)
5591 (uri (string-append "http://p.outlyer.net/vcs/files/vcs-" version
5592 ".tar.gz"))
5593 (sha256
5594 (base32
5595 "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw"))))
5596 (build-system gnu-build-system)
5597 (arguments
5598 (list
5599 #:make-flags
5600 #~(list (string-append "prefix=" #$output))
5601 #:phases
5602 #~(modify-phases %standard-phases
5603 (delete 'configure)
5604 (delete 'build)
5605 (delete 'check)
5606 (add-after 'install 'wrap-program
5607 (lambda _
5608 (wrap-program (string-append #$output "/bin/vcs")
5609 `("PATH" ":" prefix
5610 ,(map (lambda (dir)
5611 (string-append dir "/bin"))
5612 (list #$(this-package-input "ffmpeg")
5613 #$(this-package-input "imagemagick"))))))))))
5614 (inputs
5615 (list bash-minimal ffmpeg imagemagick))
5616 (synopsis "Create contact sheets (preview images) from videos")
5617 (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to
5618 create video contact sheets (previews) of videos. Any video supported by
5619 MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools
5620 VCS, by default, makes screenshots the same size as the video, see the manual
5621 for details on how to change this.")
5622 (home-page "http://p.outlyer.net/vcs/")
5623 (license license:lgpl2.1+)))