projects/guix·blob javascript-team · refs

7618 lines · 293.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <[email protected]>
3;;; Copyright © 2014, 2015, 2016 David Thompson <[email protected]>
4;;; Copyright © 2014-2016, 2018, 2020, 2025, 2026 Mark H Weaver <[email protected]>
5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <[email protected]>
6;;; Copyright © 2015-2024, 2026 Efraim Flashner <[email protected]>
7;;; Copyright © 2015, 2016 Andy Patterson <[email protected]>
8;;; Copyright © 2015, 2018, 2019, 2020, 2021, 2023, 2025 Ricardo Wurmus <[email protected]>
9;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <[email protected]>
10;;; Copyright © 2016, 2017 Alex Griffin <[email protected]>
11;;; Copyright © 2016 Kei Kebreau <[email protected]>
12;;; Copyright © 2016 Dmitry Nikolaev <[email protected]>
13;;; Copyright © 2016, 2017 Nikita <[email protected]>
14;;; Copyright © 2016, 2018-2021, 2025 Eric Bavier <[email protected]>
15;;; Copyright © 2016, 2024, 2025 Janneke Nieuwenhuizen <[email protected]>
16;;; Copyright © 2017 Feng Shu <[email protected]>
17;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <[email protected]>
18;;; Copyright © 2017 Chris Marusich <[email protected]>
19;;; Copyright © 2017 Thomas Danckaert <[email protected]>
20;;; Copyright © 2017 Ethan R. Jones <[email protected]>
21;;; Copyright © 2017, 2018 Clément Lassieur <[email protected]>
22;;; Copyright © 2017 Gregor Giesen <[email protected]>
23;;; Copyright © 2017, 2018, 2019 Rutger Helling <[email protected]>
24;;; Copyright © 2018 Roel Janssen <[email protected]>
25;;; Copyright © 2018-2022 Marius Bakke <[email protected]>
26;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <[email protected]>
27;;; Copyright © 2018, 2019, 2020, 2022 Leo Famulari <[email protected]>
28;;; Copyright © 2018, 2025 Brendan Tildesley <[email protected]>
29;;; Copyright © 2018 Arun Isaac <[email protected]>
30;;; Copyright © 2018 Björn Höfling <[email protected]>
31;;; Copyright © 2018 Mark Meyer <[email protected]>
32;;; Copyright © 2018 Gábor Boskovit <[email protected]>
33;;; Copyright © 2019 Mathieu Othacehe <[email protected]>
34;;; Copyright © 2019 Timo Eisenmann <[email protected]>
35;;; Copyright © 2019 Arne Babenhauserheide <[email protected]>
36;;; Copyright © 2019 Riku Viitanen <[email protected]>
37;;; Copyright © 2020, 2021, 2023, 2024, 2025 Oleg Pykhalov <[email protected]>
38;;; Copyright © 2020 Josh Holland <[email protected]>
39;;; Copyright © 2020, 2021 Brice Waegeneire <[email protected]>
40;;; Copyright © 2020, 2025 Vincent Legoll <[email protected]>
41;;; Copyright © 2020, 2021 Guillaume Le Vaillant <[email protected]>
42;;; Copyright © 2020 Alex McGrath <[email protected]>
43;;; Copyright © 2020, 2021, 2022 Michael Rohleder <[email protected]>
44;;; Copyright © 2020, 2021, 2022, 2023, 2025, 2026 Vinicius Monego <[email protected]>
45;;; Copyright © 2020 Brett Gilio <[email protected]>
46;;; Copyright © 2020 Alexandru-Sergiu Marton <[email protected]>
47;;; Copyright © 2020 Ivan Kozlov <[email protected]>
48;;; Copyright © 2020, 2025 Antoine Côté <[email protected]>
49;;; Copyright © 2020 Hartmut Goebel <[email protected]>
50;;; Copyright © 2021 Alexey Abramov <[email protected]>
51;;; Copyright © 2021, 2022, 2023 Andrew Tropin <[email protected]>
52;;; Copyright © 2021 David Wilson <[email protected]>
53;;; Copyright © 2021-2026 Maxim Cournoyer <[email protected]>
54;;; Copyright © 2020 Hartmut Goebel <[email protected]>
55;;; Copyright © 2021 Raghav Gururajan <[email protected]>
56;;; Copyright © 2021 Thiago Jung Bauermann <[email protected]>
57;;; Copyright © 2021 Petr Hodina <[email protected]>
58;;; Copyright © 2021 Robin Templeton <[email protected]>
59;;; Copyright © 2021 Aleksandr Vityazev <[email protected]>
60;;; Copyright © 2021 Pradana Aumars <[email protected]>
61;;; Copyright © 2021 Alexandros Theodotou <[email protected]>
62;;; Copyright © 2022,2026 Denis 'GNUtoo' Carikli <[email protected]>
63;;; Copyright © 2022 Bird <[email protected]>
64;;; Copyright © 2022 Jai Vetrivelan <[email protected]>
65;;; Copyright © 2022 Chadwain Holness <[email protected]>
66;;; Copyright © 2022 Andy Tai <[email protected]>
67;;; Copyright © 2023 Ott Joon <[email protected]>
68;;; Copyright © 2023 Dominik Delgado Steuter <[email protected]>
69;;; Copyright © 2023 Saku Laesvuori <[email protected]>
70;;; Copyright © 2023 Jaeme Sifat <[email protected]>
71;;; Copyright © 2023, 2024 Zheng Junjie <[email protected]>
72;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
73;;; Copyright © 2024 aurtzy <[email protected]>
74;;; Copyright © 2025 Formbi <[email protected]>
75;;; Copyright © 2025 Sharlatan Hellseher <[email protected]>
76;;; Copyright © 2025 VnPower <[email protected]>
77;;; Copyright © 2025 Zhu Zihao <[email protected]>
78;;; Copyright © 2025 Remco van 't Veer <[email protected]>
79;;; Copyright © 2025 John Kehayias <[email protected]>
80;;; Copyright © 2025 Julian Flake <[email protected]>
81;;; Copyright © 2025 Karl Hallsby <[email protected]>
82;;; Copyright © 2026 Ashish SHUKLA <[email protected]>
83;;; Copyright © 2026 Carlos Durán Domínguez <[email protected]>
84;;;
85;;; This file is part of GNU Guix.
86;;;
87;;; GNU Guix is free software; you can redistribute it and/or modify it
88;;; under the terms of the GNU General Public License as published by
89;;; the Free Software Foundation; either version 3 of the License, or (at
90;;; your option) any later version.
91;;;
92;;; GNU Guix is distributed in the hope that it will be useful, but
93;;; WITHOUT ANY WARRANTY; without even the implied warranty of
94;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
95;;; GNU General Public License for more details.
96;;;
97;;; You should have received a copy of the GNU General Public License
98;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
99
100(define-module (gnu packages video)
101 #:use-module (ice-9 match)
102 #:use-module ((srfi srfi-1) #:hide (zip))
103 #:use-module (srfi srfi-26)
104 #:use-module ((guix licenses) #:prefix license:)
105 #:use-module (guix utils)
106 #:use-module (guix packages)
107 #:use-module (guix deprecation)
108 #:use-module (guix download)
109 #:use-module (guix gexp)
110 #:use-module (guix git-download)
111 #:use-module (guix svn-download)
112 #:use-module (guix hg-download)
113 #:use-module (guix build-system cargo)
114 #:use-module (guix build-system cmake)
115 #:use-module (guix build-system copy)
116 #:use-module (guix build-system gnu)
117 #:use-module (guix build-system go)
118 #:use-module (guix build-system glib-or-gtk)
119 #:use-module (guix build-system linux-module)
120 #:use-module (guix build-system meson)
121 #:use-module (guix build-system perl)
122 #:use-module (guix build-system pyproject)
123 #:use-module (guix build-system qt)
124 #:use-module (guix build-system waf)
125 #:use-module (guix build-system trivial)
126 #:use-module (gnu packages)
127 #:use-module (gnu packages aidc)
128 #:use-module (gnu packages algebra)
129 #:use-module (gnu packages assembly)
130 #:use-module (gnu packages audio)
131 #:use-module (gnu packages autotools)
132 #:use-module (gnu packages backup)
133 #:use-module (gnu packages base)
134 #:use-module (gnu packages bash)
135 #:use-module (gnu packages bison)
136 #:use-module (gnu packages bittorrent)
137 #:use-module (gnu packages boost)
138 #:use-module (gnu packages build-tools)
139 #:use-module (gnu packages calendar)
140 #:use-module (gnu packages cdrom)
141 #:use-module (gnu packages nss)
142 #:use-module (gnu packages check)
143 #:use-module (gnu packages cmake)
144 #:use-module (gnu packages compression)
145 #:use-module (gnu packages cpp)
146 #:use-module (gnu packages curl)
147 #:use-module (gnu packages datastructures)
148 #:use-module (gnu packages dbm)
149 #:use-module (gnu packages dejagnu)
150 #:use-module (gnu packages dns)
151 #:use-module (gnu packages docbook)
152 #:use-module (gnu packages documentation)
153 #:use-module (gnu packages file)
154 #:use-module (gnu packages fonts)
155 #:use-module (gnu packages fontutils)
156 #:use-module (gnu packages freedesktop)
157 #:use-module (gnu packages fribidi)
158 #:use-module (gnu packages gcc)
159 #:use-module (gnu packages gettext)
160 #:use-module (gnu packages ghostscript)
161 #:use-module (gnu packages gl)
162 #:use-module (gnu packages glib)
163 #:use-module (gnu packages guile)
164 #:use-module (gnu packages gnome)
165 #:use-module (gnu packages gnunet)
166 #:use-module (gnu packages gnupg)
167 #:use-module (gnu packages golang)
168 #:use-module (gnu packages golang-build)
169 #:use-module (gnu packages golang-xyz)
170 #:use-module (gnu packages graphics)
171 #:use-module (gnu packages gstreamer)
172 #:use-module (gnu packages gtk)
173 #:use-module (gnu packages haskell-xyz)
174 #:use-module (gnu packages hunspell)
175 #:use-module (gnu packages icu4c)
176 #:use-module (gnu packages image)
177 #:use-module (gnu packages image-processing)
178 #:use-module (gnu packages imagemagick)
179 #:use-module (gnu packages iso-codes)
180 #:use-module (gnu packages java)
181 #:use-module (gnu packages kde-frameworks)
182 #:use-module (gnu packages libbsd)
183 #:use-module (gnu packages libcanberra)
184 #:use-module (gnu packages libevent)
185 #:use-module (gnu packages libidn)
186 #:use-module (gnu packages libusb)
187 #:use-module (gnu packages linux)
188 #:use-module (gnu packages lua)
189 #:use-module (gnu packages man)
190 #:use-module (gnu packages markup)
191 #:use-module (gnu packages maths)
192 #:use-module (gnu packages messaging)
193 #:use-module (gnu packages music)
194 #:use-module (gnu packages mp3)
195 #:use-module (gnu packages multiprecision)
196 #:use-module (gnu packages ncurses)
197 #:use-module (gnu packages nettle)
198 #:use-module (gnu packages networking)
199 #:use-module (gnu packages ocr)
200 #:use-module (gnu packages openkinect)
201 #:use-module (gnu packages pcre)
202 #:use-module (gnu packages pciutils)
203 #:use-module (gnu packages perl)
204 #:use-module (gnu packages perl-check)
205 #:use-module (gnu packages perl-web)
206 #:use-module (gnu packages php)
207 #:use-module (gnu packages photo)
208 #:use-module (gnu packages pkg-config)
209 #:use-module (gnu packages polkit)
210 #:use-module (gnu packages popt)
211 #:use-module (gnu packages pretty-print)
212 #:use-module (gnu packages protobuf)
213 #:use-module (gnu packages pulseaudio)
214 #:use-module (gnu packages python)
215 #:use-module (gnu packages python-build)
216 #:use-module (gnu packages python-check)
217 #:use-module (gnu packages python-compression)
218 #:use-module (gnu packages python-crypto)
219 #:use-module (gnu packages python-web)
220 #:use-module (gnu packages python-xyz)
221 #:use-module (gnu packages qt)
222 #:use-module (gnu packages compiler-tools)
223 #:use-module (gnu packages ruby)
224 #:use-module (gnu packages rust-apps)
225 #:use-module (gnu packages samba)
226 #:use-module (gnu packages sdl)
227 #:use-module (gnu packages serialization)
228 #:use-module (gnu packages shells)
229 #:use-module (gnu packages spice)
230 #:use-module (gnu packages sqlite)
231 #:use-module (gnu packages ssh)
232 #:use-module (gnu packages swig)
233 #:use-module (gnu packages terminals)
234 #:use-module (gnu packages texinfo)
235 #:use-module (gnu packages textutils)
236 #:use-module (gnu packages tls)
237 #:use-module (gnu packages time)
238 #:use-module (gnu packages upnp)
239 #:use-module (gnu packages version-control)
240 #:use-module (gnu packages vnc)
241 #:use-module (gnu packages vulkan)
242 #:use-module (gnu packages web)
243 #:use-module (gnu packages wget)
244 #:use-module (gnu packages window-management)
245 #:use-module (gnu packages wxwidgets)
246 #:use-module (gnu packages xdisorg)
247 #:use-module (gnu packages xiph)
248 #:use-module (gnu packages xml)
249 #:use-module (gnu packages xorg))
250
251(define-public ani-cli
252 (package
253 (name "ani-cli")
254 (version "5.1")
255 (source
256 (origin
257 (method git-fetch)
258 (uri (git-reference
259 (url "https://github.com/pystardust/ani-cli")
260 (commit (string-append "v" version))))
261 (file-name (git-file-name name version))
262 (sha256
263 (base32 "1409hdwhgpg6c2x0qccn5rmdm7dh3h3qjcv29d6zy5xp4gg01x4l"))))
264 (build-system gnu-build-system)
265 (arguments
266 (list
267 #:tests? #f ;no test suite
268 #:phases
269 #~(modify-phases %standard-phases
270 (delete 'configure) ;nothing to configure
271 (delete 'build) ;nothing to build
272 (replace 'install
273 (lambda _
274 (install-file "ani-cli" (string-append #$output "/bin"))
275 (install-file "ani-cli.1"
276 (string-append #$output "/share/man/man1"))))
277 (add-after 'install 'wrap
278 (lambda* (#:key inputs #:allow-other-keys)
279 (define (bin command)
280 (dirname (search-input-file
281 inputs (string-append "bin/" command))))
282 (wrap-program (string-append #$output "/bin/ani-cli")
283 `("PATH" ":" prefix
284 ,(map bin (list "base64"
285 "curl"
286 "ffmpeg"
287 "fzf"
288 "grep"
289 "mpv"
290 "sed"
291 "tput"
292 "yt-dlp")))))))))
293 (inputs (list bash-minimal
294 coreutils
295 curl
296 ffmpeg
297 fzf
298 grep
299 mpv
300 ncurses
301 sed
302 yt-dlp))
303 (native-search-paths
304 ;; This was copied from the curl package.
305 (list (search-path-specification
306 (variable "CURL_CA_BUNDLE")
307 (file-type 'regular)
308 (separator #f) ;single entry
309 (files '("etc/ssl/certs/ca-certificates.crt")))))
310 (home-page "https://github.com/pystardust/ani-cli")
311 (synopsis "Browse and watch anime from the command line")
312 (description
313 "ani-cli is a @acronym{CLI, command-line interface} to browse and watch
314anime by streaming videos from @uref{https://hianime.at,HiAnime}.
315
316There are different features such as episode browsing, history tracking,
317streaming at multiple resolutions, and much more, depending on what programs the
318user has installed.")
319 (license license:gpl3+)))
320
321(define-public transcode
322 (package
323 (name "transcode")
324 (version "1.1.7")
325 (source
326 (origin
327 (method url-fetch)
328 (uri
329 (string-append "https://sources.archlinux.org/other/community/"
330 name "/" name "-" version ".tar.bz2"))
331 (sha256
332 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
333 (patches
334 (search-patches "transcode-ffmpeg.patch"))))
335 (build-system gnu-build-system)
336 (arguments
337 `(#:configure-flags
338 (list
339 ,(string-append "CFLAGS=-O2 -g -fcommon"
340 " -Wno-error=implicit-function-declaration"
341 " -Wno-error=int-conversion")
342 ;; XXX: Broken API.
343 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
344 ;; "--enable-libv4l2"
345 "--enable-libmpeg2"
346 "--enable-libmpeg2convert"
347 ;; XXX: Broken API.
348 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
349 ;; "--enable-v4l"
350 ;;; XXX: Not available.
351 ;"--enable-bktr"
352 ;"--enable-sunau"
353 "--enable-oss"
354 "--enable-alsa"
355 ;;; XXX: Not available.
356 ;"--enable-libpostproc"
357 "--enable-freetype2"
358 "--enable-xvid"
359 "--enable-x264"
360 "--enable-ogg"
361 "--enable-vorbis"
362 "--enable-theora"
363 ;;; XXX: Not available.
364 ;"--enable-pvm3"
365 "--enable-libdv"
366 "--enable-libquicktime"
367 "--enable-lzo"
368 "--enable-a52"
369 "--enable-libxml2"
370 ;;; XXX: Not available.
371 ;"--enable-ibp"
372 ;;"--enable-mjpegtools"
373 "--enable-sdl"
374 "--enable-imagemagick"
375 ;;; XXX: Not available.
376 ;"--enable-libjpegmmx"
377 "--enable-libjpeg")))
378 ;;; XXX: Not available.
379 ;"--enable-bsdav"
380 ;"--enable-pv3"
381 ;"--enable-nuv"
382 (native-inputs
383 (list autoconf
384 automake
385 libtool
386 libxml2
387 perl
388 pkg-config
389 python-wrapper))
390 (inputs
391 (list alsa-lib
392 ffmpeg-4
393 freetype
394 imagemagick
395 lame
396 liba52
397 libdv
398 libdvdread
399 libjpeg-turbo
400 libmpeg2
401 libogg
402 libquicktime
403 libtheora
404 libvorbis
405 lzo
406 mjpegtools
407 sdl
408 ;; ("v4l-utils" ,v4l-utils)
409 libx11
410 libx264
411 libxaw
412 libxext
413 libxpm
414 libxv
415 xvid
416 zlib))
417 (synopsis "Audio/Video Transcoder")
418 (description "Transcode is a fast, versatile and command-line based
419audio/video everything to everything converter primarily focused on producing
420AVI video files with MP3 audio, but also including a program to read all the
421video and audio streams from a DVD.")
422 (home-page
423 "https://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
424 (license license:gpl2+)))
425
426;;; Warning: this package shouldn't be added as an input anywhere, as it can
427;;; only be used for recent x86_64 CPUs implementing the AVX2 instruction!
428(define-public svt-hevc
429 (package
430 (name "svt-hevc")
431 (version "1.5.1")
432 (source
433 (origin
434 (method git-fetch)
435 (uri
436 (git-reference
437 (url "https://github.com/OpenVisualCloud/SVT-HEVC")
438 (commit (string-append "v" version))))
439 (file-name (git-file-name name version))
440 (sha256
441 (base32 "1cv6vcf5yxcwdvj5yqcckbixqrvvdxk7ibincnnv80pz6wh527sv"))))
442 (build-system cmake-build-system)
443 (arguments
444 `(#:tests? #f)) ; Test script is stand-alone
445 (native-inputs
446 (list yasm))
447 (synopsis "SVT HEVC encoder")
448 (description "Scalable Video Technology (SVT) is a software-based video
449coding technology that is highly optimized for Intel's Xeon processors. Using
450the SVT-HEVC encoder, it is possible to spread video encoding processing
451across multiple Intel's Xeon processors to achieve a real advantage of
452processing efficiency. Note that this package @emph{requires} the AVX2
453instruction, which means it will @emph{not} work on older x86_64 CPUs such as
454the Core 2 Duo.")
455 (home-page "https://github.com/OpenVisualCloud/SVT-HEVC/")
456 (supported-systems '("x86_64-linux"))
457 (license (license:non-copyleft "file:///LICENSE.md"))))
458
459(define-public mediasdk
460 (package
461 (name "mediasdk")
462 (version "23.2.2")
463 (source
464 (origin
465 (method git-fetch)
466 (uri
467 (git-reference
468 (url "https://github.com/Intel-Media-SDK/MediaSDK")
469 (commit (string-append "intel-" name "-" version))))
470 (patches (search-patches "mediasdk-gcc-14.patch"))
471 (file-name (git-file-name name version))
472 (sha256
473 (base32 "12if7ylhz1r8mpj2q2n7nw8nnsglm90jg8lqpl3zhajjyrmkfyn2"))))
474 (build-system cmake-build-system)
475 (arguments
476 (list
477 #:configure-flags
478 #~(list
479 "-DENABLE_X11=ON"
480 "-DENABLE_X11_DRI3=ON"
481 "-DENABLE_WAYLAND=ON"
482 "-DENABLE_TEXTLOG=ON"
483 "-DENABLE_STAT=ON"
484 "-DBUILD_TESTS=ON"
485 "-DBUILD_TOOLS=ON"
486 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
487 #$output "/lib"))
488 #:phases
489 #~(modify-phases %standard-phases
490 (add-after 'unpack 'do-not-embed-kernel-version
491 (lambda _
492 (substitute* "builder/FindGlobals.cmake"
493 (("set\\([[:blank:]]+?BUILD_INFO \"\\$\\{CMAKE_SYSTEM\\}\
494 \\$\\{CMAKE_SYSTEM_VERSION\\}")
495 "set( BUILD_INFO \"Linux")))))))
496 (native-inputs
497 (list pkg-config python-wrapper))
498 (inputs
499 (list libdrm libva libpciaccess wayland libx11))
500 (synopsis "Intel Media SDK")
501 (description "MediaSDK provides a plain C API to access hardware-accelerated
502video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
503 (home-page "http://mediasdk.intel.com/")
504 (supported-systems '("x86_64-linux" "i686-linux"))
505 (license (license:non-copyleft "file:///LICENSE"))))
506
507(define-public schroedinger
508 (package
509 (name "schroedinger")
510 (version "1.0.11")
511 (source
512 (origin
513 (method url-fetch)
514 (uri
515 (string-append "https://launchpad.net/" name "/trunk/" version
516 "/+download/" name "-" version ".tar.gz"))
517 (sha256
518 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
519 (build-system gnu-build-system)
520 (outputs '("out" "doc"))
521 (arguments
522 (list
523 #:phases
524 #~(modify-phases %standard-phases
525 (add-after 'install 'move-docs
526 (lambda _
527 (let ((doc #$output:doc))
528 (mkdir-p (string-append doc "/share"))
529 (rename-file (string-append #$output "/share/gtk-doc")
530 (string-append doc "/share/gtk-doc"))))))))
531 (native-inputs
532 (list dash gtk-doc/stable pkg-config))
533 (inputs
534 (list glew mesa))
535 (propagated-inputs
536 (list orc))
537 (synopsis "Dirac video codec")
538 (description "Schroedinger is a project implementing the Dirac video codec in
539ANSI C code. It is meant to be highly optimized and portable. It is developed
540as a joint effort between the BBC and Fluendo.")
541 (home-page "https://launchpad.net/schroedinger")
542 (license
543 ;; This library is licensed under 4 different licenses,
544 ;; and you can choose to use it under the terms of any one of them.
545 (list
546 license:gpl2+
547 license:lgpl2.0+
548 license:expat
549 license:mpl1.1))))
550
551(define-public libquicktime
552 (package
553 (name "libquicktime")
554 (version "1.2.4")
555 (source
556 (origin
557 (method url-fetch)
558 (uri
559 (string-append "https://sourceforge.net/projects/" name "/files/"
560 name "/" version "/" name "-" version ".tar.gz"))
561 (sha256
562 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
563 (patches
564 (search-patches "libquicktime-ffmpeg.patch"))))
565 (build-system gnu-build-system)
566 (arguments
567 (list #:configure-flags
568 #~(list
569 "CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"
570 ;; Avoid legacy dependencies such as GTK+ 2 and FFmpeg 4.
571 "--without-ffmpeg"
572 "--without-gtk")))
573 (native-inputs
574 (list gettext-minimal doxygen pkg-config))
575 (inputs
576 (list alsa-lib
577 lame
578 libdv
579 libjpeg-turbo
580 libpng
581 libvorbis
582 mesa
583 schroedinger
584 libx11
585 libx264
586 libxaw
587 libxv))
588 (synopsis "Quick Time Library")
589 (description "The goal of this project is to enhance the quicktime4linux
590library.")
591 (home-page "https://libquicktime.sourceforge.net/")
592 (license license:lgpl2.1+)))
593
594(define-public mjpg-streamer
595 (package
596 (name "mjpg-streamer")
597 (version "1.0.0")
598 (source (origin
599 (method git-fetch)
600 (uri (git-reference
601 (url "https://github.com/jacksonliam/mjpg-streamer")
602 (commit (string-append "v" version))))
603 (file-name (git-file-name name version))
604 (sha256
605 (base32
606 "0w81pg228154blzbzr590xwhcll9baxyqxl6wxrgqsi9cd7pzq23"))
607 (modules '((guix build utils)))
608 (snippet
609 '(begin
610 (with-directory-excursion "mjpg-streamer-experimental/www"
611 (for-each delete-file-recursively
612 '("cambozola.jar"
613 "JQuerySpinBtn.css"
614 "JQuerySpinBtn.js"
615 "jquery.js"
616 "jquery.rotate.js"
617 "jquery.ui.core.min.js"
618 "jquery.ui.custom.css"
619 "jquery.ui.tabs.min.js"
620 "jquery.ui.widget.min.js")))))))
621 (build-system cmake-build-system)
622 (arguments
623 '(#:tests? #f ; no test suite
624 #:phases
625 (modify-phases %standard-phases
626 (add-after 'unpack 'chdir
627 (lambda* _
628 (chdir "mjpg-streamer-experimental"))))))
629 (inputs (list libjpeg-turbo))
630 (synopsis "Stream JPEG over IP network")
631 (description "Command line application that copies JPEG frames from one or
632more input plugins to multiple output plugins. It can be used to stream JPEG
633files over an IP-based network from a webcam to various types of viewers such
634as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of
635receiving MJPG streams.")
636 (home-page "https://github.com/jacksonliam/mjpg-streamer")
637 (license license:gpl2+)))
638
639(define-public ustreamer
640 (package
641 (name "ustreamer")
642 (version "6.40")
643 (source (origin
644 (method git-fetch)
645 (uri (git-reference
646 (url "https://github.com/pikvm/ustreamer")
647 (commit (string-append "v" version))))
648 (file-name (git-file-name name version))
649 (sha256
650 (base32
651 "10ig3wad8af7zxjnnhcwk1wpi4w26zpx97qb4w8zlsyy1zx40g3b"))))
652 (build-system gnu-build-system)
653 (arguments
654 `(#:tests? #f ; no test suite
655 #:make-flags (list (string-append "CC=" ,(cc-for-target))
656 (string-append "PREFIX=" (assoc-ref %outputs "out"))
657 "WITH_GPIO=1 WITH_PYTHON=1")
658 #:phases
659 (modify-phases %standard-phases
660 (delete 'configure))))
661 (inputs (list libbsd libevent libgpiod libjpeg-turbo which))
662 (native-inputs (list pkg-config python))
663 (synopsis "Lightweight and fast MJPEG-HTTP streamer")
664 (description "Lightweight and very quick server to stream MJPEG video
665from any V4L2 device to the net. All new browsers have native support of
666this video format, as well as most video players such as mplayer, VLC etc.
667µStreamer is a part of the PiKVM project designed to stream VGA and
668HDMI screencast hardware data with the highest resolution and FPS possible.")
669 (home-page "https://pikvm.org")
670 (license license:gpl3)))
671
672(define-public mjpegtools
673 (package
674 (name "mjpegtools")
675 (version "2.2.1")
676 (source
677 (origin
678 (method url-fetch)
679 (uri
680 (string-append "https://sourceforge.net/projects/mjpeg/files/"
681 name "/" version "/" name "-" version ".tar.gz"))
682 (sha256
683 (base32 "16pl22ra3x2mkp8p3awslhlhj46b1nq9g89301gb0q4rgmnm705i"))))
684 (build-system gnu-build-system)
685 ;; Avoid a dependency on the legacy GTK+ 2.
686 (arguments (list #:configure-flags #~(list "--without-gtk")))
687 (inputs
688 (list libdv libjpeg-turbo libpng libquicktime sdl))
689 (native-inputs
690 (list pkg-config))
691 (synopsis "Tools for handling MPEG")
692 (description "Mjpeg tools is a suite of programs which support video capture,
693editing, playback, and compression to MPEG of MJPEG video. Edit, play and
694compression software is hardware independent.")
695 (home-page "https://mjpeg.sourceforge.net/")
696 (license license:gpl2+)))
697
698(define-public libmms
699 (package
700 (name "libmms")
701 (version "0.6.4")
702 (source
703 (origin
704 (method url-fetch)
705 (uri
706 (string-append "https://sourceforge.net/projects/" name "/files/"
707 name "/" version "/" name "-" version ".tar.gz"))
708 (sha256
709 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
710 (build-system gnu-build-system)
711 (synopsis "MMS stream protocol library")
712 (description "Libmms is a library for streaming media files using the mmst
713and mmsh protocols.")
714 (home-page "https://sourceforge.net/projects/libmms/")
715 (license license:lgpl2.1+)))
716
717(define-public libde265
718 (package
719 (name "libde265")
720 (version "1.1.3")
721 (source
722 (origin
723 (method git-fetch)
724 (uri
725 (git-reference
726 (url "https://github.com/strukturag/libde265")
727 (commit (string-append "v" version))))
728 (file-name (git-file-name name version))
729 (sha256
730 (base32 "0mldsicrwxcg32a74qips34dmqwx7ynhknwfn9ycgzkwlqk40rnb"))))
731 (build-system cmake-build-system)
732 (arguments
733 (list #:configure-flags
734 #~'("-DBUILD_SHARED_LIBS=ON" "-DENABLE_SHERLOCK265=OFF")
735 #:phases
736 #~(modify-phases %standard-phases
737 ;; Other tests in scripts/ci-run.sh requires non-free data.
738 (replace 'check
739 (lambda _
740 (invoke
741 "sh" "-c"
742 (simple-format #f "test \"$(~a)\" = ~a"
743 (string-join
744 '("dec265/dec265 ../source/testdata/girlshy.h265 -q -o -"
745 "md5sum -"
746 "cut -d ' ' -f1")
747 "|")
748 "b81538fa33a67278e5263e231e43ca98")))))))
749 (inputs
750 ;; XXX: Build a complete version using libswscale or libvideogfx
751 ;; and qtbase-5.
752 (list sdl2-compat))
753 (synopsis "H.265 video codec implementation")
754 (description "Libde265 is an implementation of the h.265 video codec. It is
755written from scratch and has a plain C API to enable a simple integration into
756other software.")
757 (home-page "https://www.libde265.org/")
758 (license
759 (list
760 ;; Applications.
761 license:expat
762 ;; Library.
763 license:lgpl3+))))
764
765(define-public tslib
766 (package
767 (name "tslib")
768 (version "1.23")
769 (source
770 (origin
771 (method url-fetch)
772 (uri (string-append "https://github.com/libts/tslib/releases/download/"
773 version "/tslib-" version ".tar.xz"))
774 (sha256
775 (base32 "1b0xk746dcf72rd8xkxnjfn3axc57y6ahmg95wgj01l0sia9lj4v"))))
776 (build-system gnu-build-system)
777 (arguments
778 `(#:test-target "tests"
779 #:configure-flags (list "--with-sdl2")))
780 (native-inputs (list pkg-config))
781 (inputs (list sdl2))
782 (synopsis "Touchscreen access library")
783 (description "TSLib is a cross-platform library that provides access to
784touchscreen devices and the ability to apply filters to their input events.")
785 (home-page "http://www.tslib.org/")
786 (license license:lgpl2.1+)))
787
788(define-public libmpeg3
789 (package
790 (name "libmpeg3")
791 (version "1.8")
792 (source
793 (origin
794 (method url-fetch)
795 (uri
796 (string-append "https://sourceforge.net/projects/heroines/files/"
797 "releases/081108/" name "-" version "-src.tar.bz2"))
798 (sha256
799 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
800 (build-system gnu-build-system)
801 (arguments
802 `(#:test-target "test"
803 #:make-flags
804 (list
805 "CC=gcc -g -O2 -Wno-error=implicit-function-declaration"
806 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
807 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
808 #:phases
809 (modify-phases %standard-phases
810 (add-after 'unpack 'delete-bundled-a52dec
811 (lambda _
812 (delete-file-recursively "a52dec-0.7.3")
813 (substitute* "Makefile"
814 (("include Makefile\\.a52")
815 "")
816 (("\\(A52DIR\\)/include")
817 "(A52DIR)/include/a52dec")
818 (("LIBS = " match)
819 (string-append match "-la52 ")))))
820 (add-after 'unpack 'preseed-cflags
821 (lambda _
822 (setenv "CFLAGS"
823 (string-append "-D_FILE_OFFSET_BITS=64 "
824 "-D_LARGEFILE_SOURCE "
825 "-D_LARGEFILE64_SOURCE"))))
826 (add-before 'install 'create-destination-directory
827 (lambda* (#:key outputs #:allow-other-keys)
828 (let* ((out (string-append (assoc-ref outputs "out"))))
829 (mkdir-p (string-append out "/bin"))))))))
830 (native-inputs
831 (list nasm))
832 (inputs
833 (list liba52))
834 (synopsis "Advanced MPEG editing and manipulation library")
835 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
836and DVD footage in a single library. It supports many esoteric features like
837parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
838stream decoding")
839 (home-page "http://heroinewarrior.com/libmpeg3.php")
840 (license license:gpl2+)))
841
842(define-public aalib
843 (package
844 (name "aalib")
845 (version "1.4rc5")
846 (source (origin
847 (method url-fetch)
848 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
849 version "/" name "-" version ".tar.gz"))
850 (sha256
851 (base32
852 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
853 (build-system gnu-build-system)
854 (arguments
855 (list
856 #:configure-flags
857 #~(list #$(string-append
858 "CFLAGS=-g -O2"
859 " -Wno-error=implicit-function-declaration"
860 " -Wno-error=return-mismatch")
861 "--disable-static"
862 (string-append "--with-ncurses="
863 #$(this-package-input "ncurses")))
864 #:phases
865 #~(modify-phases %standard-phases
866 (add-after 'unpack 'force-autoreconf
867 (lambda _
868 (delete-file "configure"))))))
869 (native-inputs (list autoconf automake libtool texinfo))
870 (inputs (list ncurses))
871 (home-page "https://aa-project.sourceforge.net/aalib/")
872 (synopsis "ASCII-art library")
873 (description
874 "AA-lib is a low level gfx library which does not require graphics device.
875In fact, there is no graphical output possible. AA-lib replaces those
876old-fashioned output methods with powerful ascii-art renderer.")
877 (license license:lgpl2.0+)))
878
879(define-public celluloid
880 (package
881 (name "celluloid")
882 (version "0.30")
883 (source
884 (origin
885 (method git-fetch)
886 (uri (git-reference
887 (url "https://github.com/celluloid-player/celluloid")
888 (commit (string-append "v" version))))
889 (file-name (git-file-name name version))
890 (sha256
891 (base32 "05g6159kax4nndj4wy4pvrvrfp3mkjq2244xd297qm3mal8xp22h"))))
892 (build-system meson-build-system)
893 (arguments
894 (list
895 #:glib-or-gtk? #t
896 #:phases
897 #~(modify-phases %standard-phases
898 (add-after 'unpack 'disable-postinstall-script
899 (lambda _
900 (setenv "DESTDIR" "/"))))))
901 (native-inputs
902 (list
903 intltool
904 libdisplay-info
905 `(,glib "bin") ; for glib-compile-resources
906 pkg-config
907 python-wrapper)) ; for generate-authors.py
908 (inputs
909 (list gtk libadwaita libepoxy mpv))
910 (home-page "https://github.com/celluloid-player/celluloid")
911 (synopsis "GTK+ frontend for the mpv media player")
912 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
913It interacts with mpv via the client API exported by libmpv, allowing access to
914mpv's powerful playback capabilities.")
915 (license license:gpl3+)))
916
917(define-public liba52
918 (package
919 (name "liba52")
920 (version "0.8.0")
921 (source
922 (origin (method git-fetch)
923 (uri (git-reference
924 (url "https://git.adelielinux.org/community/a52dec")
925 (commit (string-append "v" version))))
926 (file-name (git-file-name name version))
927 (sha256
928 (base32 "0k1y7irz1hqfzs6yqv4brgwpa04biv50z05gc584h9md0y5y52k7"))
929 (modules '((guix build utils)))
930 (snippet
931 #~(begin (substitute* "liba52/Makefile.am"
932 ;; Set so name to liba52-$(VERSION).so
933 (("liba52_la_LDFLAGS = -no-undefined" all)
934 (string-append all " -release @VERSION@")))
935 (substitute* "liba52/configure.incl"
936 ;; Don't avoid -fPIC
937 (("^.+-prefer-non-pic.*$") ""))
938 (substitute* "configure.ac" (("-mcpu") "-mtune"))))))
939 (build-system gnu-build-system)
940 (native-inputs (list autoconf automake libtool))
941 (arguments (list #:configure-flags #~(list "--enable-shared")))
942 (home-page "https://git.adelielinux.org/community/a52dec/")
943 (synopsis "ATSC A/52 audio stream decoder")
944 (description "liba52 is a library for decoding ATSC A/52 audio streams.
945The A/52 standard is used in a variety of applications, including digital
946television and DVD. It is also known as AC-3.")
947 (license license:gpl2+)))
948
949(define-public libaom
950 (package
951 (name "libaom")
952 (version "3.14.1")
953 (source (origin
954 (method git-fetch)
955 (uri (git-reference
956 (url "https://aomedia.googlesource.com/aom/")
957 (commit (string-append "v" version))))
958 (file-name (git-file-name name version))
959 (sha256
960 (base32
961 "00y0c29va611nk0ndrdlgpijpkpf4p2b12pilhdkbrlm8l72plvm"))))
962 (build-system cmake-build-system)
963 (native-inputs
964 (list perl pkg-config python)) ; to detect the version
965 (arguments
966 (list
967 #:tests? #f ; downloads many video clips
968 #:configure-flags
969 #~(list "-DBUILD_SHARED_LIBS=YES"
970 "-DENABLE_TESTS=NO"
971 "-DAOM_TARGET_CPU=generic"
972 (string-append "-DCMAKE_INSTALL_PREFIX=" #$output))
973 #:phases
974 #~(modify-phases %standard-phases
975 (add-after 'install 'delete-static-libraries
976 (lambda _
977 (let ((lib (string-append #$output "/lib")))
978 ;; CMake files are deeply coupled with static libraries.
979 (delete-file-recursively (string-append lib "/cmake"))
980 (for-each delete-file (find-files lib "\\.a$"))))))))
981 (home-page "https://aomedia.googlesource.com/aom/")
982 (synopsis "AV1 video codec")
983 (description "Libaom is the reference implementation of AV1. It includes a
984shared library and encoder and decoder command-line executables.")
985 (license license:bsd-2)))
986
987(define-public libmpeg2
988 (package
989 (name "libmpeg2")
990 (version "0.5.1")
991 (source (origin
992 (method url-fetch)
993 ;; A mirror://sourceforge URI doesn't work, presumably
994 ;; because the SourceForge project is misconfigured.
995 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
996 name "-" version ".tar.gz"))
997 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
998 "libmpeg2-global-symbol-test.patch"))
999 (sha256
1000 (base32
1001 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
1002 (inputs
1003 (list libx11
1004 libxext
1005 libxv
1006 libsm
1007 libice
1008 sdl))
1009 (build-system gnu-build-system)
1010 (home-page "https://libmpeg2.sourceforge.net/")
1011 (synopsis "MPEG1 and MPEG2 video decoder library")
1012 (description
1013 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
1014 (license license:gpl2+)))
1015
1016(define-public libx264
1017 ;; There are no tags in the repository, so we take the version number from
1018 ;; the X264_BUILD variable defined in x264.h.
1019 (let ((version "165")
1020 (commit "0480cb05fa188d37ae87e8f4fd8f1aea3711f7ee")
1021 (revision "0"))
1022 (package
1023 (name "libx264")
1024 (version (git-version version revision commit))
1025 (source (origin
1026 (method git-fetch)
1027 (uri (git-reference
1028 (url "https://code.videolan.org/videolan/x264.git")
1029 (commit commit)))
1030 (file-name (git-file-name name version))
1031 (sha256
1032 (base32
1033 "136vma04rfzn8kcass8psnxygmn3ykrsyrv0q2dy3iv080vywpy9"))))
1034 (build-system gnu-build-system)
1035 (native-inputs
1036 (list pkg-config nasm))
1037 (inputs
1038 (list config))
1039 ;; TODO: Add gpac input
1040 (arguments
1041 `(#:tests? #f ;no check target
1042 #:configure-flags '("--enable-shared"
1043 ;; Don't build the command-line program. If we
1044 ;; want it later, we should do so in a different
1045 ;; package to avoid a circular dependency (the x264
1046 ;; program depends on ffmpeg and ffmpeg depends on
1047 ;; libx264).
1048 "--disable-cli"
1049 "--enable-pic"
1050
1051 ;; On MIPS, we must pass "--disable-asm" or else
1052 ;; configure fails after printing: "You specified a
1053 ;; pre-MSA CPU in your CFLAGS. If you really want
1054 ;; to run on such a CPU, configure with
1055 ;; --disable-asm."
1056 ,@(if (string-prefix? "mips"
1057 (or (%current-target-system)
1058 (%current-system)))
1059 '("--disable-asm")
1060 '()))
1061 #:phases
1062 (modify-phases %standard-phases
1063 (add-after 'unpack 'update-config-scripts
1064 (lambda* (#:key native-inputs inputs #:allow-other-keys)
1065 (for-each (lambda (file)
1066 (install-file
1067 (search-input-file
1068 (or native-inputs inputs)
1069 (string-append "/bin/" file)) "."))
1070 '("config.guess" "config.sub")))))))
1071 (home-page "https://www.videolan.org/developers/x264.html")
1072 (synopsis "H.264 video coding library")
1073 (description "libx264 is an advanced encoding library for creating
1074H.264 (MPEG-4 AVC) video streams.")
1075 (license (list license:gpl2+ ;most files
1076 license:isc ;common/x86/x86inc.asm
1077 license:lgpl2.1+ ;extras/getopt.c
1078 license:bsd-3 ;extras/inttypes.h
1079 (license:non-copyleft ;extras/cl*.h
1080 "file://extras/cl.h"
1081 "See extras/cl.h in the distribution."))))))
1082
1083(define-public mkvtoolnix
1084 (package
1085 (name "mkvtoolnix")
1086 (version "97.0")
1087 (source
1088 (origin
1089 (method url-fetch)
1090 (uri (string-append "https://mkvtoolnix.download/sources/"
1091 "mkvtoolnix-" version ".tar.xz"))
1092 (sha256
1093 (base32 "1lr9d6l4jj7pzjc78fhsg4qicyvizfidp8hnjpq5mzqiw1kbyhsx"))
1094 (modules '((guix build utils)))
1095 (snippet '(begin
1096 ;; Delete bundled libraries.
1097 (for-each delete-file-recursively
1098 '("lib/fmt"
1099 "lib/libebml"
1100 "lib/libmatroska"
1101 "lib/nlohmann-json"
1102 "lib/pugixml"
1103 "lib/utf8-cpp"))
1104 #t))))
1105 (build-system gnu-build-system)
1106 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
1107 (inputs
1108 (list boost
1109 gmp
1110 bzip2
1111 cmark
1112 libebml
1113 file
1114 flac
1115 fmt-11
1116 libdvdread
1117 libmatroska
1118 libogg
1119 libvorbis
1120 lzo
1121 pcre2
1122 pugixml
1123 qtbase
1124 qtmultimedia
1125 qtsvg
1126 utfcpp
1127 zlib))
1128 (native-inputs
1129 (list docbook-xsl
1130 gettext-minimal
1131 googletest
1132 libxslt
1133 nlohmann-json
1134 perl
1135 pkg-config
1136 po4a
1137 qttools
1138 ruby-3.4))
1139 (arguments
1140 (list
1141 #:configure-flags
1142 #~(list (string-append "--with-boost="
1143 #$(this-package-input "boost"))
1144 (string-append "--with-docbook-xsl-root="
1145 #$(this-package-native-input "docbook-xsl")
1146 "/xml/xsl/docbook-xsl-"
1147 #$(package-version
1148 (this-package-native-input "docbook-xsl")))
1149 "--enable-update-check=no"
1150 "--enable-precompiled-headers=no")
1151 #:phases
1152 #~(modify-phases %standard-phases
1153 (add-after 'unpack 'fix-utfcpp-include
1154 (lambda _
1155 (substitute* "src/common/strings/utf8.cpp"
1156 (("<utf8.h>")
1157 "<utf8cpp/utf8.h>"))))
1158 (add-after 'unpack 'patch-relative-file-names
1159 (lambda* (#:key outputs #:allow-other-keys)
1160 (let ((out (assoc-ref outputs "out")))
1161 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
1162 (("mkvmerge" match)
1163 (string-append out "/bin/" match))) #t)))
1164 (add-before 'configure 'add-googletest
1165 (lambda* (#:key inputs #:allow-other-keys)
1166 (symlink (search-input-directory inputs
1167 "/include/gtest")
1168 "lib/gtest")))
1169 (replace 'build
1170 (lambda _
1171 (let ((-j (list "-j"
1172 (number->string (parallel-job-count)))))
1173 (apply invoke "rake" -j))))
1174 (replace 'check
1175 (lambda _
1176 (invoke "rake" "tests/unit")))
1177 (replace 'install
1178 (lambda _
1179 (invoke "rake" "install")))
1180 (add-after 'install 'post-install
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 ;; Move the Qt interface to "gui".
1183 (let* ((out (assoc-ref outputs "out"))
1184 (gui (assoc-ref outputs "gui"))
1185 (strip-store-dir (lambda (path)
1186 (substring path
1187 (string-prefix-length
1188 out path)))))
1189 (for-each (lambda (file)
1190 (mkdir-p (string-append gui
1191 (dirname
1192 file)))
1193 (rename-file (string-append out file)
1194 (string-append gui file)))
1195 (append '("/bin/mkvtoolnix-gui"
1196 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
1197 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
1198 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
1199 (map strip-store-dir
1200 (find-files out "\\.ogg$"))
1201 (map strip-store-dir
1202 (find-files out
1203 "mkvtoolnix-gui\\.png$"))
1204 (map strip-store-dir
1205 (find-files out
1206 "mkvtoolnix-gui\\.1"))))
1207 (for-each (lambda (file)
1208 (delete-file-recursively
1209 (string-append out file)))
1210 '("/share/applications"
1211 "/share/metainfo" "/share/mime"
1212 "/share/mkvtoolnix"))))))))
1213 (home-page "https://mkvtoolnix.download")
1214 (synopsis "Tools to create, alter and inspect Matroska files")
1215 (description
1216 "MKVToolNix provides tools for getting information about Matroska files
1217(@command{mkvinfo}), extracting tracks/data from Matroska files
1218(@command{mkvextract}), and creating Matroska files from other media files
1219(@command{mkvmerge}).")
1220 (license license:gpl2)))
1221
1222(define-public pipe-viewer
1223 (package
1224 (name "pipe-viewer")
1225 (version "0.5.6")
1226 (source
1227 (origin
1228 (method git-fetch)
1229 (uri
1230 (git-reference
1231 (url "https://github.com/trizen/pipe-viewer")
1232 (commit version)))
1233 (file-name (git-file-name name version))
1234 (sha256
1235 (base32 "0crsgkqr5lycv831ynnnghjhyf5akrx5rd40b1722pfc63pv9hv5"))))
1236 (build-system perl-build-system)
1237 (arguments
1238 `(#:imported-modules
1239 ((guix build copy-build-system)
1240 ,@%perl-build-system-modules)
1241 #:modules
1242 (((guix build copy-build-system)
1243 #:prefix copy:)
1244 (guix build perl-build-system)
1245 (guix build utils)
1246 (srfi srfi-26))
1247 #:module-build-flags
1248 (list
1249 "--gtk3")
1250 #:phases
1251 (modify-phases %standard-phases
1252 (add-after 'unpack 'patch-source
1253 (lambda* (#:key inputs #:allow-other-keys)
1254 (substitute* (find-files "lib" "\\.pm$")
1255 (("\"yt-dlp\"")
1256 (format #f "\"~a/bin/yt-dlp\""
1257 (assoc-ref inputs "yt-dlp"))))
1258 (substitute* (find-files "bin" ".*-viewer$")
1259 (("'ffmpeg'")
1260 (format #f "'~a/bin/ffmpeg'"
1261 (assoc-ref inputs "ffmpeg")))
1262 (("'wget'")
1263 (format #f "'~a/bin/wget'"
1264 (assoc-ref inputs "wget")))
1265 (("'xdg-open'")
1266 (format #f "'~a/bin/xdg-open'"
1267 (assoc-ref inputs "xdg-utils")))
1268 (("'yt-dlp'")
1269 (format #f "'~a/bin/yt-dlp'"
1270 (assoc-ref inputs "yt-dlp"))))))
1271 (add-after 'install 'install-xdg
1272 (lambda args
1273 (apply (assoc-ref copy:%standard-phases 'install)
1274 #:install-plan
1275 '(("share/icons" "share/pixmaps")
1276 ("share" "share/applications"
1277 #:include-regexp ("\\.desktop$")))
1278 args)))
1279 (add-after 'install-xdg 'wrap-programs
1280 (lambda* (#:key outputs #:allow-other-keys)
1281 (let* ((out (assoc-ref outputs "out"))
1282 (bin-dir (string-append out "/bin/"))
1283 (site-dir (string-append out "/lib/perl5/site_perl/"))
1284 (perl-lib (getenv "PERL5LIB"))
1285 (gi-typelib (getenv "GI_TYPELIB_PATH")))
1286 (for-each
1287 (cut wrap-program <>
1288 `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
1289 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
1290 (find-files bin-dir))))))))
1291 (native-inputs
1292 (list perl-module-build perl-test-pod perl-test-simple))
1293 (inputs
1294 (list bash-minimal
1295 perl-data-dump
1296 perl-digest-md5
1297 perl-encode
1298 ffmpeg
1299 perl-file-path
1300 perl-file-sharedir
1301 perl-getopt-long
1302 perl-gtk3
1303 perl-http-message
1304 perl-json
1305 perl-json-xs
1306 perl-libwww
1307 perl-lwp-protocol-https
1308 perl-lwp-useragent-cached
1309 perl-memoize
1310 perl-mime-base64
1311 perl-pathtools
1312 perl-scalar-list-utils
1313 perl-storable
1314 perl-term-ansicolor
1315 perl-term-readline-gnu
1316 perl-text-parsewords
1317 perl-text-tabs+wrap
1318 perl-unicode-linebreak
1319 perl-uri-escape
1320 wget
1321 xdg-utils
1322 yt-dlp))
1323 (propagated-inputs
1324 (list dconf))
1325 (home-page "https://github.com/trizen/pipe-viewer")
1326 (synopsis "CLI+GUI YouTube Client")
1327 (description "Pipe-Viewer is a lightweight application for searching and
1328playing videos from YouTube. It parses the YouTube website directly and relies
1329on the Invidious instances only as a fallback method.")
1330 (license license:artistic2.0)))
1331
1332(define-public x265
1333 (package
1334 (name "x265")
1335 (version "3.5")
1336 (outputs '("out" "static"))
1337 (source
1338 (origin
1339 (method url-fetch)
1340 (uri (string-append "https://bitbucket.org/multicoreware/x265_git"
1341 "/downloads/x265_" version ".tar.gz"))
1342 (sha256
1343 (base32 "1s6afxj61jdwfjnn70dwiql34fbqsvn6zv10785vmjyar8sk62p7"))
1344 (patches (search-patches "x265-arm-flags.patch"))
1345 (modules '((guix build utils)))
1346 (snippet '(begin
1347 (delete-file-recursively "source/compat/getopt")))))
1348 (build-system cmake-build-system)
1349 (native-inputs
1350 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1351 (if (target-x86-64?)
1352 (list nasm)
1353 '()))
1354 (arguments
1355 `(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
1356 #:configure-flags
1357 (list "-DENABLE_PIC=TRUE"
1358 "-DLINKED_10BIT=ON"
1359 "-DLINKED_12BIT=ON"
1360 "-DEXTRA_LIB=x265_main10.a;x265_main12.a"
1361 "-DEXTRA_LINK_FLAGS=-L../build-10bit -L../build-12bit"
1362 (string-append "-DCMAKE_INSTALL_PREFIX="
1363 (assoc-ref %outputs "out")))
1364 #:phases
1365 (modify-phases %standard-phases
1366 (add-after 'unpack 'prepare-build
1367 (lambda _
1368 (delete-file-recursively "build")
1369 (chdir "source")
1370 ;; We're not building from a git or mercurial repository,
1371 ;; so help cmake find the version number.
1372 (substitute* "cmake/Version.cmake"
1373 (("if\\(X265_TAG_DISTANCE STREQUAL \"0\"\\)")
1374 (string-append "if(TRUE)\n"
1375 " set(X265_LATEST_TAG \"" ,version "\")\n")))))
1376 (add-before 'configure 'build-12-bit
1377 (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
1378 (mkdir "../build-12bit")
1379 (with-directory-excursion "../build-12bit"
1380 (invoke
1381 "cmake" "../source"
1382 ,@(if (target-aarch64?)
1383 '("-DENABLE_ASSEMBLY=OFF")
1384 '())
1385 ;; Altivec code produces many build errors.
1386 ,@(if (target-ppc64le?)
1387 '("-DENABLE_ALTIVEC=OFF")
1388 '())
1389 "-DHIGH_BIT_DEPTH=ON"
1390 "-DEXPORT_C_API=OFF"
1391 "-DENABLE_CLI=OFF"
1392 "-DENABLE_SHARED=OFF"
1393 "-DENABLE_PIC=TRUE"
1394 "-DMAIN12=ON")
1395 (substitute* (cons "cmake_install.cmake"
1396 (append
1397 (find-files "CMakeFiles/x265-shared.dir")
1398 (find-files "CMakeFiles/x265-static.dir")))
1399 (("libx265") "libx265_main12"))
1400 ((assoc-ref %standard-phases 'build)))))
1401 (add-before 'configure 'build-10-bit
1402 (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
1403 (mkdir "../build-10bit")
1404 (with-directory-excursion "../build-10bit"
1405 (invoke
1406 "cmake" "../source"
1407 ,@(if (target-aarch64?)
1408 '("-DENABLE_ASSEMBLY=OFF")
1409 '())
1410 ;; Altivec code produces many build errors.
1411 ,@(if (target-ppc64le?)
1412 '("-DENABLE_ALTIVEC=OFF")
1413 '())
1414 "-DHIGH_BIT_DEPTH=ON"
1415 "-DEXPORT_C_API=OFF"
1416 "-DENABLE_CLI=OFF"
1417 "-DENABLE_SHARED=OFF"
1418 "-DENABLE_PIC=TRUE")
1419 (substitute* (cons "cmake_install.cmake"
1420 (append
1421 (find-files "CMakeFiles/x265-shared.dir")
1422 (find-files "CMakeFiles/x265-static.dir")))
1423 (("libx265") "libx265_main10"))
1424 ((assoc-ref %standard-phases 'build)))))
1425 (add-before 'strip 'move-static-libs
1426 (lambda* (#:key outputs #:allow-other-keys)
1427 (let ((out (assoc-ref outputs "out"))
1428 (static (assoc-ref outputs "static")))
1429 (mkdir-p (string-append static "/lib"))
1430 (with-directory-excursion
1431 (string-append out "/lib")
1432 (for-each
1433 (lambda (file)
1434 (rename-file file
1435 (string-append static "/lib/" file)))
1436 (find-files "." "\\.a$")))))))))
1437 (home-page "https://x265.org/")
1438 (synopsis "Library for encoding h.265/HEVC video streams")
1439 (description "x265 is a H.265 / HEVC video encoder application library,
1440designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1441 (license license:gpl2+)))
1442
1443(define-public x265-4
1444 (package/inherit x265
1445 (version "4.1")
1446 (source
1447 (origin
1448 (method url-fetch)
1449 (uri (string-append "https://bitbucket.org/multicoreware/x265_git"
1450 "/downloads/x265_" version ".tar.gz"))
1451 (sha256
1452 (base32 "0acgmzbpjhwapxggx0h40m4lppk5vykydrai055vf1lqm339j5m3"))
1453 (patches (search-patches "x265-4-arm-flags.patch"))
1454 (modules '((guix build utils)))
1455 (snippet '(begin
1456 (delete-file-recursively "source/compat/getopt")))))))
1457
1458(define-public libass
1459 (package
1460 (name "libass")
1461 (version "0.15.1")
1462 (source (origin
1463 (method url-fetch)
1464 (uri (string-append
1465 "https://github.com/libass/libass/releases/download/"
1466 version "/libass-" version ".tar.xz"))
1467 (sha256
1468 (base32
1469 "0lwfmdizzrr4gcq3fgw4j8g9pkrqgx6h0f3pgrrnxc07s34kkp8w"))))
1470 (build-system gnu-build-system)
1471 (arguments
1472 '(#:configure-flags '("--disable-static")))
1473 (native-inputs
1474 (list pkg-config nasm))
1475 (propagated-inputs
1476 (list freetype
1477 fribidi
1478 fontconfig
1479 harfbuzz))
1480 (home-page "https://github.com/libass/libass")
1481 (synopsis "Subtitle rendering library for the ASS/SSA format")
1482 (description "libass is a subtitle rendering library for the
1483ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1484 (license license:isc)))
1485
1486(define-public libcaca
1487 (package
1488 (name "libcaca")
1489 (version "0.99.beta19")
1490 (source (origin
1491 (method url-fetch)
1492 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1493 version ".tar.gz"))
1494 (sha256
1495 (base32
1496 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
1497 (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
1498 "libcaca-CVE-2021-3410-pt2.patch"))))
1499 (build-system gnu-build-system)
1500 (arguments
1501 '(#:configure-flags '("--disable-static")))
1502 (native-inputs (list pkg-config))
1503 (inputs
1504 (list freeglut
1505 ftgl
1506 imlib2
1507 libx11
1508 mesa
1509 ncurses
1510 zlib))
1511 (home-page "http://caca.zoy.org/wiki/libcaca")
1512 (synopsis "Colour ASCII-art library")
1513 (description "libcaca is a graphics library that outputs text instead of
1514pixels, so that it can work on older video cards or text terminals. It
1515supports Unicode, 2048 colors, dithering of color images, and advanced text
1516canvas operations.")
1517 (license license:wtfpl2)))
1518
1519(define-public libdca
1520 (package
1521 (name "libdca")
1522 (version "0.0.7")
1523 (source (origin
1524 (method url-fetch)
1525 (uri (string-append
1526 "https://download.videolan.org/pub/videolan/libdca/"
1527 version "/libdca-" version ".tar.bz2"))
1528 (sha256
1529 (base32
1530 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1531 (build-system gnu-build-system)
1532 (native-inputs
1533 (list autoconf automake libtool))
1534 (home-page "https://www.videolan.org/developers/libdca.html")
1535 (synopsis "DTS Coherent Acoustics decoder")
1536 (description "libdca is a library for decoding DTS Coherent Acoustics
1537streams.")
1538 (license license:gpl2+)))
1539
1540(define-public libdv
1541 (package
1542 (name "libdv")
1543 (version "1.0.0")
1544 (source (origin
1545 (method url-fetch)
1546 (uri (string-append
1547 "mirror://sourceforge/libdv/libdv/"
1548 version "/libdv-" version ".tar.gz"))
1549 (sha256
1550 (base32
1551 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1552 (build-system gnu-build-system)
1553 (native-inputs (list pkg-config))
1554 (inputs (list libxv))
1555 (home-page "https://libdv.sourceforge.net/")
1556 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1557 (description "The Quasar DV codec (libdv) is a software codec for DV
1558video, the encoding format used by most digital camcorders, typically those
1559that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1560developed according to the official standards for DV video: IEC 61834 and
1561SMPTE 314M.")
1562 (license license:lgpl2.1+)))
1563
1564(define-public libmatroska
1565 (package
1566 (name "libmatroska")
1567 (version "1.7.1")
1568 (source
1569 (origin
1570 (method url-fetch)
1571 (uri (string-append "https://dl.matroska.org/downloads/"
1572 "libmatroska/libmatroska-" version ".tar.xz"))
1573 (sha256
1574 (base32 "1cqq61qgv6x3xjzjrw71dya7lbsbrsmi9raqm2k4hgfrp0rk0ajp"))))
1575 (build-system cmake-build-system)
1576 (inputs
1577 (list libebml))
1578 (arguments
1579 `(#:configure-flags
1580 (list "-DBUILD_SHARED_LIBS=YES")
1581 #:tests? #f)) ; no test suite
1582 (home-page "https://www.matroska.org")
1583 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1584 (description
1585 "Matroska aims to become the standard of multimedia container formats.
1586It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1587of XML. EBML enables the Matroska Development Team to gain significant
1588advantages in terms of future format extensibility, without breaking file
1589support in old parsers.
1590libebml is a C++ library to read and write EBML files.")
1591 (license license:lgpl2.1)))
1592
1593(define-public movit
1594 (package
1595 (name "movit")
1596 (version "1.7.2")
1597 (source
1598 (origin
1599 (method url-fetch)
1600 (uri (string-append "https://movit.sesse.net/movit-" version ".tar.gz"))
1601 (sha256
1602 (base32 "1mg8rxgbd51h0mqcn4f6b30m2mv11aps3dybfn6f7ly28s71zb00"))))
1603 (build-system gnu-build-system)
1604 (arguments
1605 (list
1606 #:tests? #f
1607 ;; Rendering tests fail due to differing results, but they fail on other
1608 ;; other distros too and still requires the test suite to compile.
1609 ;; Failed tests: deinterlace_effect_test ycbcr_conversion_effect_test
1610 ;; resample_effect_test colorspace_conversion_effect_test
1611 ;; effect_chain_test
1612 #:make-flags
1613 #~(list (string-append
1614 "GTEST_DIR="
1615 #$(this-package-native-input "googletest-source")
1616 "/googletest"))))
1617 (native-inputs
1618 `(("pkg-config" ,pkg-config)
1619 ("googletest-source" ,(package-source googletest))))
1620 (inputs (list eigen
1621 fftw
1622 libepoxy ;; for tests
1623 sdl2)) ;; for tests
1624 (home-page "https://movit.sesse.net")
1625 (synopsis "High-performance GPU-accelerated video filtering library")
1626 (description
1627 "Movit is a high-quality, high-performance library for GPU-accelerated
1628video filtering built on modern OpenGL. It provides a compact set of
1629carefully implemented filters designed for predictable real-time performance
1630and visually accurate results, supporting OpenGL 3.0 or GLES 3.0.
1631
1632Included filters provide blur, diffusion, FFT-based convolution, glow,
1633color correction (lift/gamma/gain), mirror, luma-based transitions, Porter-Duff
1634overlay composition, bilinear and Lanczos scaling, sharpening (unsharp mask
1635and Wiener), saturation, vignette, white balance and YADIF deinterlacing.")
1636 (license license:gpl2+)))
1637
1638(define-public libplacebo
1639 (package
1640 (name "libplacebo")
1641 (version "7.351.0")
1642 (source
1643 (origin
1644 (method git-fetch)
1645 (uri (git-reference
1646 (url "https://code.videolan.org/videolan/libplacebo.git")
1647 (commit (string-append "v" version))))
1648 (file-name (git-file-name name version))
1649 (sha256
1650 (base32 "094mzr4cvvryxr7rpxqhvrs018r89m116cpkmmfy3d3sk8b09jki"))))
1651 (build-system meson-build-system)
1652 (arguments
1653 (list #:configure-flags
1654 #~(list "-Dopengl=enabled"
1655 (string-append "-Dvulkan-registry="
1656 #$(this-package-input "vulkan-headers")
1657 "/share/vulkan/registry/vk.xml"))))
1658 (native-inputs
1659 (list glad python python-mako pkg-config))
1660 (inputs (list libepoxy mesa vulkan-headers))
1661 ;; These are propagated as they are listed in 'Requires.private' of
1662 ;; libplacebo.pc.
1663 (propagated-inputs (list lcms shaderc vulkan-loader))
1664 (home-page "https://code.videolan.org/videolan/libplacebo")
1665 (synopsis "GPU-accelerated image/video processing library")
1666 (description "libplacebo is, in a nutshell, the core rendering algorithms
1667and ideas of mpv rewritten as an independent library. As of today, libplacebo
1668contains a large assortment of video processing shaders, focusing on both
1669quality and performance.")
1670 (license license:lgpl2.1+)))
1671
1672(define-public libva
1673 (package
1674 (name "libva")
1675 (version "2.22.0")
1676 (source
1677 (origin
1678 (method url-fetch)
1679 (uri (string-append "https://github.com/intel/libva/releases/download/"
1680 version "/libva-" version ".tar.bz2"))
1681 (sha256
1682 (base32 "1f7dwwyndigv032dny23wqp1myz7v3rv734zynrm53accm825np3"))))
1683 (build-system gnu-build-system)
1684 (native-inputs
1685 (list config pkg-config))
1686 (inputs
1687 (list libdrm
1688 libx11
1689 libxext
1690 libxfixes
1691 mesa
1692 wayland))
1693 (arguments
1694 (list
1695 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1696 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1697 #:configure-flags
1698 #~(list (string-append "--with-drivers-path="
1699 (search-input-directory %build-inputs "lib/dri")))
1700 ;; However, we can't write to mesa's store directory, so override the
1701 ;; following make variable to install the dummy driver to libva's
1702 ;; $prefix/lib/dri directory.
1703 #:make-flags
1704 #~(list (string-append "dummy_drv_video_ladir=" #$output "/lib/dri"))
1705 #:phases
1706 #~(modify-phases %standard-phases
1707 (add-after 'unpack 'update-config-scripts
1708 (lambda* (#:key native-inputs inputs #:allow-other-keys)
1709 (for-each (lambda (file)
1710 (install-file
1711 (search-input-file
1712 (or native-inputs inputs)
1713 (string-append "/bin/" file)) "."))
1714 '("config.guess" "config.sub"))))
1715 (add-before 'build 'fix-dlopen-paths
1716 (lambda _
1717 (substitute* "va/drm/va_drm_auth_x11.c"
1718 (("\"libva-x11\\.so\\.%d\"")
1719 (string-append "\"" #$output "/lib/libva-x11.so.%d\""))))))))
1720 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1721 (synopsis "Video acceleration library")
1722 (description "The main motivation for VA-API (Video Acceleration API) is
1723to enable hardware accelerated video decode/encode at various
1724entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1725standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1726 (license license:expat)))
1727
1728(define-public libva-utils
1729 (package
1730 (name "libva-utils")
1731 (version "2.18.1")
1732 (source
1733 (origin
1734 (method url-fetch)
1735 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1736 version "/libva-utils-" version ".tar.bz2"))
1737 (sha256
1738 (base32 "06n123kvzk51bx5cbhf34i3cfxc8vxmksgh5azycz9fwwcz3n7rm"))))
1739 (build-system gnu-build-system)
1740 (arguments
1741 `(#:configure-flags
1742 (list "--enable-wayland"
1743 "--enable-x11")))
1744 (native-inputs
1745 (list pkg-config))
1746 (inputs
1747 (list libdrm libva libx11 mesa wayland))
1748 (home-page "https://github.com/intel/libva-utils")
1749 (synopsis "Collection of testing utilities for VA-API")
1750 (description
1751 "This is a collection of utilities to query and test the @acronym{VA-API,
1752Video Acceleration API} implemented by the libva library.
1753
1754These tools require a supported graphics chip, driver, and VA-API back end to
1755operate properly.")
1756 (license license:expat)))
1757
1758(define-public ffmpeg
1759 (package
1760 (name "ffmpeg")
1761 (version "8.1.2")
1762 (source (origin
1763 (method url-fetch)
1764 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1765 version ".tar.xz"))
1766 (sha256
1767 (base32
1768 "0k2jggcp8akl64i0id5ba64ghancx422zbj5igk13hzhgdgfnjs6"))))
1769 (outputs '("out" "debug"))
1770 (build-system gnu-build-system)
1771 (inputs
1772 (append
1773 (if (supported-package? rav1e) (list rav1e) '())
1774 (list dav1d
1775 fontconfig
1776 freetype
1777 gnutls
1778 opus
1779 ladspa
1780 lame
1781 libaom
1782 libass
1783 libbluray
1784 libcaca
1785 libcdio-paranoia
1786 libdrm
1787 libgme
1788 libplacebo
1789 libtheora
1790 libva
1791 libvdpau
1792 libvorbis
1793 libvpx
1794 libwebp
1795 libx11
1796 libx264
1797 mesa
1798 openal
1799 pulseaudio
1800 shaderc
1801 sdl2
1802 soxr
1803 speex
1804 spirv-tools
1805 srt
1806 svt-av1
1807 twolame
1808 vidstab
1809 vulkan-loader
1810 x265
1811 xvid
1812 zlib)))
1813 (native-inputs
1814 (list bc
1815 frei0r-api
1816 perl
1817 pkg-config
1818 texinfo
1819 speex
1820 vulkan-headers
1821 nasm))
1822 (arguments
1823 (list
1824 #:test-target "fate"
1825 #:configure-flags
1826 ;; possible additional inputs:
1827 ;; --enable-avisynth enable reading of AviSynth script
1828 ;; files [no]
1829 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1830 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1831 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1832 ;; and libraw1394 [no]
1833 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1834 ;; --enable-libflite enable flite (voice synthesis) support via
1835 ;; libflite [no]
1836 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1837 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1838 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1839 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1840 ;; --enable-libnut enable NUT (de)muxing via libnut,
1841 ;; native (de)muxer exists [no]
1842 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1843 ;; libopencore-amrnb [no]
1844 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1845 ;; libopencore-amrwb [no]
1846 ;; --enable-libopencv enable video filtering via libopencv [no]
1847 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1848 ;; OpenJPEG [no]
1849 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1850 ;; --enable-libschroedinger enable Dirac de/encoding via
1851 ;; libschroedinger [no]
1852 ;; --enable-libshine enable fixed-point MP3 encoding via
1853 ;; libshine [no]
1854 ;; --enable-libssh enable SFTP protocol via libssh [no]
1855 ;; (libssh2 does not work)
1856 ;; --enable-libstagefright-h264 enable H.264 decoding via
1857 ;; libstagefright [no]
1858 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1859 ;; libutvideo [no]
1860 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1861 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1862 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1863 ;; libvo-amrwbenc [no]
1864 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1865 ;; --enable-libxavs enable AVS encoding via xavs [no]
1866 ;; --enable-libzmq enable message passing via libzmq [no]
1867 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1868 ;; --enable-opencl enable OpenCL code
1869 #~(list
1870 #$(let ((ignored-tests
1871 ;; Ignore frei0r tests, because frei0r is an optional
1872 ;; runtime dependency and therefore not present at build
1873 ;; time.
1874 (append
1875 (list "filter-frei0r-filter"
1876 "filter-frei0r-filter-unaligned")
1877 (if (target-powerpc?)
1878 ;; These tests fail on powerpc64-le (see:
1879 ;; https://trac.ffmpeg.org/ticket/9604).
1880 '("checkasm-sw_scale"
1881 "filter-scale2ref_keep_aspect"
1882 "sws-floatimg-cmp")
1883 '()))))
1884 (string-append "--ignore-tests="
1885 (string-join ignored-tests ",")))
1886 "--enable-gpl" ;enable optional gpl licensed parts
1887 "--enable-shared"
1888 "--enable-frei0r"
1889 "--enable-fontconfig"
1890 "--enable-gnutls"
1891 "--enable-ladspa"
1892 "--enable-libaom"
1893 "--enable-libass"
1894 "--enable-libbluray"
1895 "--enable-libcaca"
1896 "--enable-libcdio"
1897 "--enable-libdav1d"
1898 "--enable-libfreetype"
1899 "--enable-libgme"
1900 "--enable-libmp3lame"
1901 "--enable-libopus"
1902 "--enable-libplacebo"
1903 "--enable-libpulse"
1904 #$@(if (this-package-input "rav1e")
1905 '("--enable-librav1e")
1906 '())
1907 "--enable-libshaderc"
1908 "--enable-libsoxr"
1909 "--enable-libspeex"
1910 "--enable-libsrt"
1911 "--enable-libsvtav1"
1912 "--enable-libtheora"
1913 "--enable-libtwolame"
1914 "--enable-libvidstab"
1915 "--enable-libvorbis"
1916 "--enable-libvpx"
1917 "--enable-libwebp"
1918 "--enable-libxvid"
1919 "--enable-libx264"
1920 "--enable-libx265"
1921 "--enable-openal"
1922 "--enable-opengl"
1923 "--enable-libdrm"
1924 "--enable-vaapi"
1925 "--enable-vulkan"
1926
1927 "--enable-runtime-cpudetect"
1928
1929 ;; The HTML pages take 7.2 MiB
1930 "--disable-htmlpages"
1931
1932 ;; The static libraries are 23 MiB
1933 "--disable-static"
1934
1935 "--disable-stripping"
1936
1937 #$@(if (target-riscv64?)
1938 '("--extra-cflags=-fPIC")
1939 '())
1940
1941 ;; Runtime cpu detection is not implemented on
1942 ;; MIPS, so we disable some features.
1943 "--disable-mips32r2"
1944 "--disable-mipsdsp"
1945 "--disable-mipsdspr2"
1946 "--disable-mipsfpu")
1947 #:phases
1948 #~(modify-phases %standard-phases
1949 #$@(if (target-x86-32?)
1950 #~((add-before 'configure 'bypass-openal-check
1951 ;; configure fails linking to openal when using binutils
1952 ;; >= 2.38 due to openal's usage of protected visibility
1953 ;; for its dynamic symbols. Bypass this configure time
1954 ;; check for now. See:
1955 ;; https://lists.gnu.org/archive/html/guix-devel/2024-08/msg00159.html
1956 (lambda _
1957 (substitute* "configure"
1958 ;; This string only matches on ffmpeg v6 and above.
1959 ;; Replace it with the one defined at ffmpeg-5 which
1960 ;; matches on all ffmpeg versions. See #71917.
1961 (("alGetError \\|\\|")
1962 "alGetError \|\| true \|\|")))))
1963 #~())
1964 (replace 'configure
1965 ;; configure does not work followed by "SHELL=..." and
1966 ;; "CONFIG_SHELL=..."; set environment variables instead
1967 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1968 (let ((out (assoc-ref outputs "out")))
1969 (substitute* "configure"
1970 (("#! */bin/sh") (string-append "#!" (which "sh"))))
1971 (setenv "SHELL" (which "bash"))
1972 (setenv "CONFIG_SHELL" (which "bash"))
1973 (apply invoke
1974 "./configure"
1975 (string-append "--prefix=" out)
1976 ;; Add $libdir to the RUNPATH of all the binaries.
1977 (string-append "--extra-ldflags=-Wl,-rpath="
1978 out "/lib")
1979 configure-flags))))
1980 (add-before 'check 'set-ld-library-path
1981 (lambda _
1982 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1983 ;; running tests.
1984 (let* ((dso (find-files "." "\\.so$"))
1985 (path (string-join (map dirname dso) ":")))
1986 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1987 (setenv "LD_LIBRARY_PATH" path)))))))
1988 (native-search-paths
1989 (list (search-path-specification
1990 (variable "FREI0R_PATH")
1991 (files (list "lib/frei0r-1")))))
1992 (home-page "https://www.ffmpeg.org/")
1993 (synopsis "Audio and video framework")
1994 (description "FFmpeg is a complete, cross-platform solution to record,
1995convert and stream audio and video. It includes the libavcodec
1996audio/video codec library.")
1997 (license license:gpl2+)))
1998
1999(define-public ffmpeg-6
2000 (package
2001 (inherit ffmpeg)
2002 (version "6.1.6")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-" version
2007 ".tar.xz"))
2008 (sha256
2009 (base32 "02ip0zsghyz09p0jv8ayqxrnkb3awirarh4jbppbxlwd09jb3z6l"))
2010 (patches (search-patches
2011 "ffmpeg-add-av_stream_get_first_dts-for-chromium.patch"))))
2012 (arguments
2013 (if (target-x86-32?)
2014 (substitute-keyword-arguments arguments
2015 ((#:phases phases)
2016 #~(modify-phases #$phases
2017 (add-before 'configure 'relax-gcc-14-strictness
2018 (lambda _
2019 (setenv "CFLAGS"
2020 (string-append "-g -O2"
2021 " -Wno-error=incompatible-pointer-types"
2022 " -Wno-error=int-conversion")))))))
2023 (package-arguments ffmpeg)))))
2024
2025(define-public ffmpeg-5
2026 (package
2027 (inherit ffmpeg-6)
2028 (version "5.1.10")
2029 (source (origin
2030 (method url-fetch)
2031 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
2032 version ".tar.xz"))
2033 (sha256
2034 (base32
2035 "14v2fskpf154xl5347dk5wxfhhhq0wg3hmgaw3lv1nj5zkb0c8rr"))))
2036 (arguments
2037 (substitute-keyword-arguments arguments
2038 ((#:modules modules %default-gnu-modules)
2039 `((srfi srfi-1) ,@modules))
2040 ((#:phases phases)
2041 (if (target-x86-32?)
2042 #~(modify-phases #$phases
2043 (replace 'bypass-openal-check
2044 (lambda _
2045 (substitute* "configure"
2046 (("die \"ERROR: openal not found\"")
2047 "true")))))
2048 phases))
2049 ((#:configure-flags flags ''())
2050 #~(fold delete #$flags '("--enable-libplacebo")))))
2051 (inputs (modify-inputs inputs
2052 (delete "libplacebo")))))
2053
2054(define-public ffmpeg-4
2055 (package
2056 (inherit ffmpeg-5)
2057 (version "4.4.8")
2058 (source (origin
2059 (method url-fetch)
2060 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
2061 version ".tar.xz"))
2062 (sha256
2063 (base32
2064 "1hrr3iz9nb6xs005amc30hw46ddwzxm2ffxywyp9wg98mv24hf67"))))
2065 (arguments
2066 (substitute-keyword-arguments arguments
2067 ((#:configure-flags flags ''())
2068 #~(cons "--enable-avresample"
2069 (fold delete #$flags '("--enable-libshaderc"))))))))
2070
2071;;; Custom ffmpeg package used by Jami, which incorporates custom patches.
2072(define-public ffmpeg-jami
2073 (let ((ffmpeg ffmpeg-6))
2074 (package
2075 (inherit ffmpeg)
2076 (name "ffmpeg-jami")
2077 (source (let ((ffmpeg-origin (package-source ffmpeg)))
2078 (origin
2079 (inherit ffmpeg-origin)
2080 ;; These patches originate come from
2081 ;; <https://review.jami.net/plugins/gitiles/jami-daemon/+/refs/heads/master/contrib/src/ffmpeg/>.
2082 ;; Make sure to keep them update and/or register any new ones
2083 ;; here.
2084 (patches
2085 (append
2086 (origin-patches ffmpeg-origin)
2087 (search-patches
2088 "ffmpeg-jami-remove-mjpeg-log.patch"
2089 "ffmpeg-jami-change-RTCP-ratio.patch"
2090 "ffmpeg-jami-rtp_ext_abs_send_time.patch"
2091 "ffmpeg-jami-libopusdec-enable-FEC.patch"
2092 "ffmpeg-jami-libopusenc-enable-FEC.patch"
2093 "ffmpeg-jami-libopusenc-reload-packet-loss-at-encode.patch"
2094 "ffmpeg-jami-screen-sharing-x11-fix.patch"
2095 "ffmpeg-jami-pipewiregrab-source-filter.patch"))))))
2096 (arguments
2097 (substitute-keyword-arguments arguments
2098 ((#:configure-flags _ '())
2099 ;; The base configure flags preserved from ffmpeg appear first.
2100 #~(list "--disable-static"
2101 "--enable-shared"
2102 "--disable-stripping"
2103
2104 ;; Extra Guix-added flags that make sense for this custom
2105 ;; package; these could be contributed upstream.
2106 "--disable-doc"
2107
2108 ;; The following flags are those specified by Jami.
2109 ;; They're from the jami/daemon/contrib/src/ffmpeg/rules.mak
2110 ;; file. We try to keep it as close to the official Jami
2111 ;; package as possible, to provide all the codecs and extra
2112 ;; features that are expected (see:
2113 ;; https://review.jami.net/plugins/gitiles/jami-daemon/+/
2114 ;; refs/heads/master/contrib/src/ffmpeg/rules.mak).
2115 "--disable-everything"
2116 "--enable-zlib"
2117 "--enable-gpl"
2118 "--enable-swscale"
2119 "--enable-bsfs"
2120 "--disable-filters"
2121 "--disable-programs"
2122 "--disable-postproc"
2123
2124 "--enable-libpipewire"
2125 "--enable-filter=pipewiregrab"
2126 "--enable-indev=lavfi"
2127 "--enable-decoder=wrapped_avframe"
2128
2129 "--disable-protocols"
2130 "--enable-protocol=crypto"
2131 "--enable-protocol=file"
2132 "--enable-protocol=rtp"
2133 "--enable-protocol=srtp"
2134 "--enable-protocol=tcp"
2135 "--enable-protocol=udp"
2136 "--enable-protocol=unix"
2137 "--enable-protocol=pipe"
2138
2139 ;; Enable muxers/demuxers.
2140 "--disable-demuxers"
2141 "--disable-muxers"
2142 "--enable-muxer=rtp"
2143 "--enable-muxer=g722"
2144 "--enable-muxer=g723_1"
2145 "--enable-muxer=g726"
2146 "--enable-muxer=g726le"
2147 "--enable-muxer=h263"
2148 "--enable-muxer=h264"
2149 "--enable-muxer=hevc"
2150 "--enable-muxer=matroska"
2151 "--enable-muxer=webm"
2152 "--enable-muxer=ogg"
2153 "--enable-muxer=pcm_s16be"
2154 "--enable-muxer=pcm_s16le"
2155 "--enable-muxer=wav"
2156 "--enable-demuxer=rtp"
2157 "--enable-demuxer=mjpeg"
2158 "--enable-demuxer=mjpeg_2000"
2159 "--enable-demuxer=mpegvideo"
2160 "--enable-demuxer=gif"
2161 "--enable-demuxer=image_jpeg_pipe"
2162 "--enable-demuxer=image_png_pipe"
2163 "--enable-demuxer=image_webp_pipe"
2164 "--enable-demuxer=matroska"
2165 "--enable-demuxer=m4v"
2166 "--enable-demuxer=mp3"
2167 "--enable-demuxer=ogg"
2168 "--enable-demuxer=flac"
2169 "--enable-demuxer=wav"
2170 "--enable-demuxer=ac3"
2171 "--enable-demuxer=g722"
2172 "--enable-demuxer=g723_1"
2173 "--enable-demuxer=g726"
2174 "--enable-demuxer=g726le"
2175 "--enable-demuxer=pcm_mulaw"
2176 "--enable-demuxer=pcm_alaw"
2177 "--enable-demuxer=pcm_s16be"
2178 "--enable-demuxer=pcm_s16le"
2179 "--enable-demuxer=h263"
2180 "--enable-demuxer=h264"
2181 "--enable-demuxer=hevc"
2182
2183 ;; Enable parsers.
2184 "--enable-parser=h263"
2185 "--enable-parser=h264"
2186 "--enable-parser=hevc"
2187 "--enable-parser=mpeg4video"
2188 "--enable-parser=vp8"
2189 "--enable-parser=vp9"
2190 "--enable-parser=opus"
2191
2192 ;; Encoders/decoders.
2193 "--enable-encoder=adpcm_g722"
2194 "--enable-decoder=adpcm_g722"
2195 "--enable-encoder=adpcm_g726"
2196 "--enable-decoder=adpcm_g726"
2197 "--enable-encoder=adpcm_g726le"
2198 "--enable-decoder=adpcm_g726le"
2199 "--enable-decoder=g729"
2200 "--enable-encoder=g723_1"
2201 "--enable-decoder=g723_1"
2202 "--enable-encoder=rawvideo"
2203 "--enable-decoder=rawvideo"
2204 "--enable-encoder=libx264"
2205 "--enable-decoder=h264"
2206 "--enable-encoder=pcm_alaw"
2207 "--enable-decoder=pcm_alaw"
2208 "--enable-encoder=pcm_mulaw"
2209 "--enable-decoder=pcm_mulaw"
2210 "--enable-encoder=mpeg4"
2211 "--enable-decoder=mpeg4"
2212 "--enable-encoder=libvpx_vp8"
2213 "--enable-decoder=vp8"
2214 "--enable-decoder=vp9"
2215 "--enable-encoder=h263"
2216 "--enable-encoder=h263p"
2217 "--enable-decoder=h263"
2218 "--enable-encoder=mjpeg"
2219 "--enable-decoder=mjpeg"
2220 "--enable-decoder=mjpegb"
2221 "--enable-libspeex"
2222 "--enable-libopus"
2223 "--enable-libvpx"
2224 "--enable-libx264"
2225 "--enable-encoder=libspeex"
2226 "--enable-decoder=libspeex"
2227 "--enable-encoder=libopus"
2228 "--enable-decoder=libopus"
2229
2230 ;; Encoders/decoders for ringtones and audio streaming.
2231 "--enable-decoder=flac"
2232 "--enable-decoder=vorbis"
2233 "--enable-decoder=aac"
2234 "--enable-decoder=ac3"
2235 "--enable-decoder=eac3"
2236 "--enable-decoder=mp3"
2237 "--enable-decoder=pcm_u24le"
2238 "--enable-decoder=pcm_u32le"
2239 "--enable-decoder=pcm_u8"
2240 "--enable-decoder=pcm_f16le"
2241 "--enable-decoder=pcm_f32le"
2242 "--enable-decoder=pcm_f64le"
2243 "--enable-decoder=pcm_s16le"
2244 "--enable-decoder=pcm_s24le"
2245 "--enable-decoder=pcm_s32le"
2246 "--enable-decoder=pcm_s64le"
2247 "--enable-decoder=pcm_u16le"
2248 "--enable-encoder=pcm_u8"
2249 "--enable-encoder=pcm_f32le"
2250 "--enable-encoder=pcm_f64le"
2251 "--enable-encoder=pcm_s16le"
2252 "--enable-encoder=pcm_s32le"
2253 "--enable-encoder=pcm_s64le"
2254
2255 ;; Encoders/decoders for images.
2256 "--enable-encoder=gif"
2257 "--enable-decoder=gif"
2258 "--enable-encoder=jpegls"
2259 "--enable-decoder=jpegls"
2260 "--enable-encoder=ljpeg"
2261 "--enable-decoder=jpeg2000"
2262 "--enable-encoder=png"
2263 "--enable-decoder=png"
2264 "--enable-encoder=bmp"
2265 "--enable-decoder=bmp"
2266 "--enable-encoder=tiff"
2267 "--enable-decoder=tiff"
2268
2269 ;; Filters.
2270 "--enable-filter=scale"
2271 "--enable-filter=overlay"
2272 "--enable-filter=amix"
2273 "--enable-filter=amerge"
2274 "--enable-filter=aresample"
2275 "--enable-filter=format"
2276 "--enable-filter=aformat"
2277 "--enable-filter=fps"
2278 "--enable-filter=transpose"
2279 "--enable-filter=pad"
2280
2281 ;; Decoders for ringtones and audio streaming.
2282 "--enable-decoder=pcm_s16be"
2283 "--enable-decoder=pcm_s16be_planar"
2284 "--enable-decoder=pcm_s16le_planar"
2285 "--enable-decoder=pcm_s24be"
2286 "--enable-decoder=pcm_s24le_planar"
2287 "--enable-decoder=pcm_s32be"
2288 "--enable-decoder=pcm_s32le_planar"
2289 "--enable-decoder=pcm_s64be"
2290 "--enable-decoder=pcm_s8"
2291 "--enable-decoder=pcm_s8_planar"
2292 "--enable-decoder=pcm_u16be"
2293
2294 ;; More filters.
2295 "--enable-filter=afir"
2296 "--enable-filter=split"
2297 "--enable-filter=drawbox"
2298 "--enable-filter=drawtext"
2299 "--enable-filter=rotate"
2300 "--enable-filter=loop"
2301 "--enable-filter=setpts"
2302 "--enable-filter=movie"
2303 "--enable-filter=alphamerge"
2304 "--enable-filter=boxblur"
2305 "--enable-filter=lut"
2306 "--enable-filter=negate"
2307 "--enable-filter=colorkey"
2308 "--enable-filter=transpose"
2309
2310 "--enable-libfreetype"
2311
2312 #$@(if (string-contains (%current-system) "linux")
2313 ;; Leave out the '--enable-cuvid' ... '--enable-encoder=hevc_nvenc'
2314 ;; flags, as there's no support for ffnvcodec in Guix;
2315 ;; it would not work with Mesa anyway.
2316 '("--enable-pic"
2317 "--extra-cxxflags=-fPIC"
2318 "--extra-cflags=-fPIC"
2319 "--target-os=linux"
2320 "--enable-indev=v4l2"
2321 "--enable-indev=xcbgrab"
2322 "--enable-vdpau"
2323 "--enable-hwaccel=h264_vdpau"
2324 "--enable-hwaccel=mpeg4_vdpau"
2325 "--enable-vaapi"
2326 "--enable-hwaccel=h264_vaapi"
2327 "--enable-hwaccel=mpeg4_vaapi"
2328 "--enable-hwaccel=h263_vaapi"
2329 "--enable-hwaccel=vp8_vaapi"
2330 "--enable-hwaccel=mjpeg_vaapi"
2331 "--enable-hwaccel=hevc_vaapi"
2332 "--enable-encoder=h264_vaapi"
2333 "--enable-encoder=vp8_vaapi"
2334 "--enable-encoder=mjpeg_vaapi"
2335 "--enable-encoder=hevc_vaapi")
2336 '())))))
2337 (inputs (modify-inputs inputs
2338 (append pipewire))))))
2339
2340(define-public ffmpegthumbnailer
2341 (package
2342 (name "ffmpegthumbnailer")
2343 (version "2.2.2")
2344 (source (origin
2345 (method git-fetch)
2346 (uri (git-reference
2347 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
2348 (commit version)))
2349 (file-name (git-file-name name version))
2350 (sha256
2351 (base32
2352 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
2353 (build-system cmake-build-system)
2354 (native-inputs
2355 (list pkg-config))
2356 (inputs
2357 (list ffmpeg-4 libjpeg-turbo libpng gvfs))
2358 (arguments
2359 (list
2360 #:configure-flags ''("-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")
2361 #:phases
2362 #~(modify-phases %standard-phases
2363 (add-after 'patch-dot-desktop-files 'patch-dot-thumbnailer-files
2364 (lambda _
2365 (define abs-path (string-append #$output "/bin/ffmpegthumbnailer"))
2366 (substitute* (string-append #$output "/share/thumbnailers/ffmpegthumbnailer.thumbnailer")
2367 (("TryExec=ffmpegthumbnailer")
2368 (format #f "TryExec=~a" abs-path))
2369 (("Exec=ffmpegthumbnailer")
2370 (format #f "Exec=~a" abs-path))))))))
2371 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
2372 (synopsis "Create thumbnails from video files")
2373 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
2374can be used by file managers to create thumbnails for your video files. The
2375thumbnailer uses ffmpeg to decode frames from the video files, so supported
2376videoformats depend on the configuration flags of ffmpeg.")
2377 (license license:gpl2+)))
2378
2379(define-public ffmpeg-progress-yield
2380 (package
2381 (name "ffmpeg-progress-yield")
2382 (version "1.1.3")
2383 (source
2384 (origin
2385 (method git-fetch)
2386 (uri (git-reference
2387 (url "https://github.com/slhck/ffmpeg-progress-yield")
2388 (commit (string-append "v" version))))
2389 (file-name (git-file-name name version))
2390 (sha256
2391 (base32 "0hkxvrndr0kmhq7ldapg3b59k6ydfsjzkaxniv5chqfg1kg3ch9q"))))
2392 (build-system pyproject-build-system)
2393 (arguments
2394 (list
2395 #:phases #~(modify-phases %standard-phases
2396 (add-after 'wrap 'wrap-program
2397 ;; Wrap ffmpeg on the executable.
2398 (lambda* (#:key inputs outputs #:allow-other-keys)
2399 (let ((fpy "bin/ffmpeg-progress-yield")
2400 (ffm "bin/ffmpeg"))
2401 (wrap-program (search-input-file outputs fpy)
2402 `("PATH" ":" prefix
2403 (,(search-input-file inputs ffm))))))))))
2404 (inputs (list bash-minimal ffmpeg))
2405 (native-inputs (list procps ; for 'pgrep'
2406 python-pytest
2407 python-pytest-asyncio
2408 python-uv-build))
2409 (propagated-inputs (list python-tqdm))
2410 (home-page "https://github.com/slhck/ffmpeg-progress-yield")
2411 (synopsis "Run an ffmpeg command with progress")
2412 (description "This package allows an ffmpeg command to run with progress.
2413It is usually a complement to @code{ffmpeg-normalize}.")
2414 (license license:expat)))
2415
2416(define-public ffmpeg-normalize
2417 (package
2418 (name "ffmpeg-normalize")
2419 (version "1.42.0")
2420 (source
2421 (origin
2422 (method git-fetch)
2423 (uri (git-reference
2424 (url "https://github.com/slhck/ffmpeg-normalize")
2425 (commit (string-append "v" version))))
2426 (file-name (git-file-name name version))
2427 (sha256
2428 (base32 "0r6j0s2lgrrvl2yibza3gvdg8pm4yb9gp8yvlwad7gd9p30nch36"))))
2429 (build-system pyproject-build-system)
2430 (arguments
2431 (list
2432 #:test-flags
2433 #~(list
2434 ;; These tests rely on a remote API.
2435 "--ignore" "tests/test_api_ground_truth.py"
2436 ;; These fail because of missing presets in the source.
2437 "--ignore" "tests/test_presets.py")
2438 #:phases
2439 #~(modify-phases %standard-phases
2440 (add-after 'unpack 'relax-colorlog
2441 (lambda _
2442 (substitute* "pyproject.toml"
2443 ;; The only breaking change after 6.7.0 was the removal
2444 ;; of Python2 support.
2445 (("colorlog==6.7.0") "colorlog"))))
2446 (add-after 'wrap 'wrap-ffmpeg
2447 ;; Wrap ffmpeg on the executable.
2448 (lambda* (#:key inputs outputs #:allow-other-keys)
2449 (let ((ffn (search-input-file outputs
2450 "bin/ffmpeg-normalize"))
2451 (ffm (search-input-file inputs "bin/ffmpeg")))
2452 (wrap-program ffn
2453 `("FFMPEG_PATH" = (,ffm)))))))))
2454 (native-inputs (list git-minimal/pinned ; for replaygain tests
2455 python-pytest
2456 python-uv-build))
2457 (inputs (list bash-minimal ffmpeg))
2458 (propagated-inputs (list ffmpeg-progress-yield
2459 python-colorlog
2460 python-mutagen
2461 python-tqdm))
2462 (home-page "https://github.com/slhck/ffmpeg-normalize")
2463 (synopsis "Normalize audio via ffmpeg")
2464 (description "This program normalizes media files to a certain loudness
2465level using the EBU R128 loudness normalization procedure. It can also
2466perform RMS-based normalization (where the mean is lifted or attenuated),
2467or peak normalization to a certain target level. Batch processing of several
2468input files is possible, including video files.")
2469 (license license:expat)))
2470
2471(define-public gpac
2472 (let ((commit "9c1da9ec7e4d16b162856495f8ba284844a1b976")
2473 (revision "1"))
2474 (package
2475 (name "gpac")
2476 ;; Use a git snapshot of the master branch, as it fixes build issues
2477 ;; when using a recent ffmpeg release.
2478 (version (git-version "2.4.0" revision commit))
2479 (source (origin
2480 (method git-fetch)
2481 (uri (git-reference
2482 (url "https://github.com/gpac/gpac")
2483 (commit commit)))
2484 (file-name (git-file-name name version))
2485 (sha256
2486 (base32
2487 "0q3j9l8khq7cgzv0lwll65vhmsi9gqj1sfnz7az4mz3wqfv23vri"))))
2488 (build-system gnu-build-system)
2489 (arguments
2490 (list #:configure-flags
2491 #~(list (string-append "--cc=" #$(cc-for-target))
2492 (string-append "--cxx=" #$(cxx-for-target))
2493 "--verbose")
2494 ;; The test suite is a git submodule that must synchronize its data
2495 ;; from the network.
2496 #:tests? #f))
2497 (inputs
2498 (list alsa-lib
2499 curl
2500 faad2
2501 ffmpeg
2502 freetype
2503 glu
2504 jack-2
2505 liba52
2506 libcaca
2507 libcaption
2508 libfreenect
2509 libjpeg-turbo
2510 libmad
2511 libpng
2512 libtheora
2513 libvorbis
2514 libx11
2515 libxv
2516 mesa
2517 openssl
2518 pulseaudio
2519 sdl2
2520 xvid
2521 zlib))
2522 (home-page "https://gpac.io/")
2523 (synopsis "Video streaming and multimedia transcoding toolkit")
2524 (description "GPAC is a multimedia framework focused on modularity and
2525standards compliance. GPAC provides tools to process, inspect, package,
2526stream, playback and interact with media content. Such content can be any
2527combination of audio, video, subtitles, metadata, scalable graphics, encrypted
2528media, 2D/3D graphics and ECMAScript.")
2529 (license license:lgpl2.1+))))
2530
2531(define-public gpu-screen-recorder
2532 (package
2533 (name "gpu-screen-recorder")
2534 (version "5.15.3")
2535 (source
2536 (origin
2537 (method git-fetch)
2538 (uri (git-reference
2539 (url "https://repo.dec05eba.com/gpu-screen-recorder")
2540 (commit version)))
2541 (file-name (git-file-name name version))
2542 (sha256
2543 (base32
2544 "1kiqvbs9fbgm5gxlxfybnyfmd0chgi7gzm6wr1cpafnvg1x203dm"))
2545 (patches
2546 (search-patches
2547 "gpu-screen-recorder-privileged-kms-helper.patch"))))
2548 (build-system meson-build-system)
2549 (arguments
2550 (list
2551 #:configure-flags
2552 #~(list "-Dsystemd=false"
2553 "-Dcapabilities=false"
2554 "-Dnvidia_suspend_fix=false")
2555 #:tests? #f ;no test suite
2556 #:phases
2557 #~(modify-phases %standard-phases
2558 (add-after 'unpack 'patch-runtime-paths
2559 (lambda* (#:key inputs #:allow-other-keys)
2560 (substitute* '("src/egl.c"
2561 "src/codec_query/vulkan.c"
2562 "src/capture/v4l2.c"
2563 "src/image_writer.c")
2564 (("dlopen\\(\"([^\"]*)\"," match library)
2565 (format #f "dlopen(~s,"
2566 (search-input-file
2567 inputs (string-append "lib/" library)))))
2568
2569 (substitute* "kms/client/kms_client.c"
2570 (("const char \\*args\\[\\] = \\{ \"pkexec\",")
2571 (format #f "const char *args[] = { ~s,"
2572 (search-input-file inputs "bin/pkexec")))))))))
2573 (native-inputs
2574 (list pkg-config
2575 wayland))
2576 (inputs
2577 (list dbus
2578 ffmpeg
2579 libcap
2580 libdrm
2581 libglvnd
2582 libjpeg-turbo
2583 libva
2584 libx11
2585 libxcomposite
2586 libxdamage
2587 libxfixes
2588 libxrandr
2589 pipewire
2590 polkit
2591 pulseaudio
2592 vulkan-headers
2593 vulkan-loader
2594 wayland))
2595 (home-page "https://git.dec05eba.com/gpu-screen-recorder/about")
2596 (synopsis "GPU-accelerated screen recorder")
2597 (description
2598 "GPU Screen Recorder records monitors, windows, regions, and applications
2599using hardware-accelerated video encoding. It supports X11 and Wayland,
2600desktop-portal capture, application audio capture, screenshots, streaming, and
2601replay buffering. On Guix System, @code{gpu-screen-recorder-service-type} can
2602be used to grant the KMS helper the capability required for direct monitor
2603capture.")
2604 (license license:gpl3)))
2605
2606(define-public vlc
2607 (package
2608 (name "vlc")
2609 (version "3.0.23")
2610 (source (origin
2611 (method url-fetch)
2612 (uri (string-append
2613 "https://download.videolan.org/pub/videolan/vlc/"
2614 (car (string-split version #\-))
2615 "/vlc-" version ".tar.xz"))
2616 (sha256
2617 (base32
2618 "1q77ygpnjvk646diplmiv6kwfmdwbh8daws1z6dsdk9wmbkcm4g8"))))
2619 (build-system gnu-build-system)
2620 (native-inputs
2621 (list flex bison gettext-minimal pkg-config))
2622 ;; FIXME: Add optional inputs once available.
2623 (inputs
2624 (list alsa-lib
2625 avahi
2626 bash-minimal
2627 dav1d
2628 dbus
2629 eudev
2630 ffmpeg
2631 flac
2632 fontconfig
2633 freetype
2634 fribidi
2635 gnutls
2636 liba52
2637 libarchive
2638 libass
2639 libavc1394
2640 libbluray
2641 libcaca
2642 libcddb
2643 libdca
2644 libdvbpsi
2645 libdvdnav
2646 libdvdread
2647 libebml
2648 libgcrypt
2649 libidn
2650 libkate
2651 libmad
2652 libmatroska
2653 libmicrodns
2654 libmodplug
2655 libmpeg2
2656 libogg
2657 libpng
2658 libraw1394
2659 (librsvg-for-system)
2660 libsamplerate
2661 libsecret
2662 libssh2
2663 libtheora
2664 libupnp
2665 libva
2666 libvdpau
2667 libvnc
2668 libvorbis
2669 libvpx
2670 libx264
2671 libxext
2672 libxi
2673 libxinerama
2674 libxml2
2675 libxpm
2676 livemedia-utils
2677 lua-5.2
2678 mesa
2679 opus
2680 perl
2681 protobuf
2682 pulseaudio
2683 python-wrapper
2684 qtbase-5
2685 qtsvg-5
2686 qtx11extras
2687 samba
2688 sdl
2689 sdl-image
2690 speex
2691 speexdsp
2692 srt
2693 taglib-1
2694 twolame
2695 unzip
2696 wayland
2697 wayland-protocols
2698 x265
2699 xcb-util-keysyms))
2700 (arguments
2701 `(#:configure-flags
2702 `("BUILDCC=gcc"
2703 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
2704 (assoc-ref %build-inputs "ffmpeg")
2705 "/lib")) ;needed for the tests
2706
2707 #:phases
2708 (modify-phases %standard-phases
2709 (add-after 'unpack 'patch-source
2710 (lambda* (#:key inputs #:allow-other-keys)
2711 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
2712 (substitute* "configure"
2713 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
2714 (string-append "LIVE555_PREFIX=" livemedia-utils)))
2715 ;; Some of the tests require using the display to test out VLC,
2716 ;; which fails in our sandboxed build system
2717 (substitute* "test/run_vlc.sh"
2718 (("./vlc --ignore-config") "echo")))))
2719 (add-after 'strip 'regenerate-plugin-cache
2720 (lambda* (#:key outputs #:allow-other-keys)
2721 ;; The 'install-exec-hook' rule in the top-level Makefile.am
2722 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
2723 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
2724 ;; it references. Thus, we first reset the timestamps of all
2725 ;; these files, and then regenerate the cache such that the
2726 ;; mtimes it includes are always zero instead of being dependent
2727 ;; on the build time.
2728 (let* ((out (assoc-ref outputs "out"))
2729 (pkglibdir (string-append out "/lib/vlc"))
2730 (plugindir (string-append pkglibdir "/plugins"))
2731 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
2732 ;; TODO: Factorize 'reset-timestamps'.
2733 (for-each (lambda (file)
2734 (let ((s (lstat file)))
2735 (unless (eq? (stat:type s) 'symlink)
2736 (utime file 1 1))))
2737 (find-files plugindir))
2738 (invoke cachegen plugindir))))
2739 (add-after 'install 'wrap-executable
2740 (lambda* (#:key outputs #:allow-other-keys)
2741 (let ((out (assoc-ref outputs "out"))
2742 (plugin-path (getenv "QT_PLUGIN_PATH")))
2743 (wrap-program (string-append out "/bin/vlc")
2744 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
2745 (home-page "https://www.videolan.org/")
2746 (synopsis "Audio and video framework")
2747 (description "VLC is a cross-platform multimedia player and framework
2748that plays most multimedia files as well as DVD, Audio CD, VCD, and various
2749streaming protocols.")
2750 (properties
2751 '((release-monitoring-url . "https://download.videolan.org/pub/videolan/vlc/last")))
2752 (license license:gpl2+)))
2753
2754(define-public mplayer
2755 (package
2756 (name "mplayer")
2757 (version "1.5")
2758 (source (origin
2759 (method url-fetch)
2760 (uri (string-append
2761 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
2762 version ".tar.xz"))
2763 (sha256
2764 (base32
2765 "11dzrdb74ayvivcid3giqncrfm98hi4aqvg3kjrwji6bnddxa335"))))
2766 (build-system gnu-build-system)
2767 (arguments
2768 (list
2769 #:tests? #f ; no test target
2770 #:configure-flags
2771 #~(list (string-append "--prefix=" #$output)
2772 "--disable-ffmpeg_a" ; disables bundled ffmpeg
2773 "--disable-iwmmxt"
2774 (string-append "--extra-cflags=-I"
2775 #$(this-package-input "libx11")
2776 "/include") ; to detect libx11
2777
2778 ;; Enable runtime cpu detection where supported,
2779 ;; and choose a suitable target.
2780 #$@(match (or (%current-target-system)
2781 (%current-system))
2782 ("x86_64-linux"
2783 '("--enable-runtime-cpudetection"
2784 "--target=x86_64-linux"))
2785 ("i686-linux"
2786 '("--enable-runtime-cpudetection"
2787 "--target=i686-linux"))
2788 ("mips64el-linux"
2789 '("--target=mips3-linux"))
2790 (_ (list (string-append
2791 "--target="
2792 (or (%current-target-system)
2793 (nix-system->gnu-triplet
2794 (%current-system))))))))
2795 #:phases
2796 #~(modify-phases %standard-phases
2797 (replace 'configure
2798 ;; configure does not work followed by "SHELL=..." and
2799 ;; "CONFIG_SHELL=..."; set environment variables instead
2800 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
2801 (substitute* "configure"
2802 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2803 (setenv "SHELL" (which "bash"))
2804 (setenv "CONFIG_SHELL" (which "bash"))
2805 (apply invoke "./configure" configure-flags)
2806 ;; Adding CFLAGS to #:configure-flags, or setting it in the
2807 ;; environment does not work. Adding CFLAGS to #:make-flags
2808 ;; breaks the build.
2809 (substitute* "config.mak"
2810 (("CFLAGS *=" all)
2811 (string-append all
2812 " -Wno-error=incompatible-pointer-types"
2813 " -Wno-error=int-conversion"))))))))
2814 ;; FIXME: Add additional inputs once available.
2815 (native-inputs
2816 (list pkg-config yasm))
2817 (inputs
2818 (list alsa-lib
2819 cdparanoia
2820 ffmpeg-5
2821 fontconfig
2822 freetype
2823 giflib
2824 lame
2825 libass
2826 libdvdcss
2827 libdvdnav ; ignored without libdvdread
2828 libdvdread ; ignored without libdvdnav
2829 libjpeg-turbo
2830 libmpeg2
2831 libmpg123 ; audio codec for MP3
2832 libpng
2833 libtheora
2834 libvdpau
2835 libvorbis
2836 libx11
2837 libx264
2838 libxinerama
2839 libxv
2840 libxxf86dga
2841 mesa
2842 opus
2843 perl
2844 pulseaudio
2845 python-wrapper
2846 sdl
2847 speex
2848 zlib))
2849 (home-page "https://www.mplayerhq.hu")
2850 (synopsis "Audio and video player")
2851 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
2852Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
2853NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
2854SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
2855 (license license:gpl2)))
2856
2857(define-public mpc-qt
2858 (package
2859 (name "mpc-qt")
2860 (version "26.01")
2861 (source
2862 (origin
2863 (method git-fetch)
2864 (uri (git-reference
2865 (url "https://github.com/mpc-qt/mpc-qt")
2866 (commit (string-append "v" version))))
2867 (file-name (git-file-name name version))
2868 (sha256
2869 (base32 "1h94yk3xf1cz9n8cx5qkczhpzya29hwnqn9d1dvmlli578zrs05n"))))
2870 (build-system qt-build-system)
2871 (arguments (list #:qtbase qtbase
2872 #:tests? #f)) ; No tests.
2873 (native-inputs (list pkgconf qttools))
2874 (inputs (list mpv qtsvg))
2875 (home-page "https://mpc-qt.github.io/")
2876 (synopsis
2877 "Qt reproduction of @acronym{MPC-HC, Media Player Classic Home Cinema}")
2878 (description
2879 "@acronym{MPC-QT, Media Player Classic Qute Theater} is a
2880re-implementation of @acronym{MPC-HC, Media Player Classic Home Cinema} using
2881Qt and libmpv. Features include multiple playlist tracking, an editable
2882queue, playlist searching, refined screenshots, a custom metadata display, and
2883in-program custom styling.")
2884 (license license:gpl2+)))
2885
2886(define-public mpv
2887 (package
2888 (name "mpv")
2889 (version "0.41.0")
2890 (source (origin
2891 (method git-fetch)
2892 (uri (git-reference
2893 (url "https://github.com/mpv-player/mpv")
2894 (commit (string-append "v" version))))
2895 (file-name (git-file-name name version))
2896 (sha256
2897 (base32 "1myphqbzr4xynhzmc9ic34mqwb2yc0v37xh8js517sy4ydzam5c0"))))
2898 (build-system meson-build-system)
2899 (arguments
2900 (list
2901 #:phases
2902 #~(modify-phases %standard-phases
2903 (add-after 'unpack 'patch-file-names
2904 (lambda* (#:key inputs #:allow-other-keys)
2905 (substitute* "player/lua/ytdl_hook.lua"
2906 (("\"yt-dlp\",")
2907 (string-append
2908 "\"" (search-input-file inputs "bin/yt-dlp") "\","))))))
2909 #:configure-flags
2910 #~(list "-Dlibmpv=true"
2911 "-Dcdda=enabled"
2912 "-Ddmabuf-wayland=enabled"
2913 "-Ddvdnav=enabled"
2914 "-Dbuild-date=false")))
2915 (native-inputs
2916 (list libdisplay-info
2917 perl ;for zsh completion file
2918 pkg-config
2919 python-docutils
2920 python-wrapper))
2921 ;; Missing features: libguess, V4L2.
2922 (inputs
2923 (list enca
2924 ladspa
2925 lcms
2926 libbs2b
2927 libmpg123
2928 rsound
2929 vulkan-headers
2930 vulkan-loader
2931 yt-dlp))
2932 ;; XXX: These are propagated for the mpv pkg-config package, as they are
2933 ;; listed in Requires.private and would break 'pkg-config --exists mpv' if
2934 ;; unavailable.
2935 (propagated-inputs
2936 (list alsa-lib
2937 ffmpeg
2938 jack-1
2939 libass
2940 libbluray
2941 libcaca
2942 libcdio-paranoia
2943 libdisplay-info
2944 libdrm
2945 libdvdnav
2946 libdvdread
2947 libjpeg-turbo
2948 libplacebo
2949 libsixel
2950 libva
2951 libvdpau
2952 libx11
2953 libxext
2954 libxinerama
2955 libxkbcommon
2956 libxpresent
2957 libxrandr
2958 libxscrnsaver
2959 libxv
2960 ;; XXX: lua > 5.2 is not currently supported; see meson.build
2961 lua-5.2
2962 mesa
2963 pipewire-minimal
2964 pulseaudio
2965 shaderc
2966 wayland
2967 wayland-protocols
2968 zimg
2969 zlib))
2970 (home-page "https://mpv.io/")
2971 (synopsis "Audio and video player")
2972 (description "mpv is a general-purpose audio and video player. It is a
2973fork of mplayer2 and MPlayer. It shares some features with the former
2974projects while introducing many more.")
2975 (license license:gpl2+)))
2976
2977(define-public mpv-thumbfast
2978 ;; Latest commit as of 2025-12-08
2979 (let ((commit "9deb0733c4e36938cf90e42ddfb7a19a8b2f4641")
2980 (revision "0"))
2981 (package
2982 (name "mpv-thumbfast")
2983 (version (git-version "0.0.1" revision commit))
2984 (source
2985 (origin
2986 (method git-fetch)
2987 (uri (git-reference
2988 (url "https://github.com/po5/thumbfast")
2989 (commit commit)))
2990 (file-name (git-file-name name version))
2991 (sha256
2992 (base32 "0q537fjj9ndq7pzg2rv4h5qas8s3812k21bpw064bcvb204vbwba"))))
2993 (build-system copy-build-system)
2994 (arguments
2995 (list
2996 #:install-plan
2997 #~'(("thumbfast.lua" "share/mpv/scripts/"))))
2998 (home-page "https://github.com/po5/thumbfast")
2999 (synopsis "High-performance on-the-fly thumbnailer script for mpv")
3000 (description
3001 "Thumbfast is a high-performance on-the-fly thumbnailer script for mpv.
3002@strong{This script does not display thumbnails on its own}, it is meant to be
3003used alongside a @acronym{UI, User Interface} script that calls it.")
3004 (license license:mpl2.0))))
3005
3006(define-public mpv-uosc
3007 (package
3008 (name "mpv-uosc")
3009 (version "5.12.0")
3010 (source
3011 (origin
3012 (method git-fetch)
3013 (uri (git-reference
3014 (url "https://github.com/tomasklaen/uosc")
3015 (commit version)))
3016 (file-name (git-file-name name version))
3017 (sha256
3018 (base32 "0pn9a8jp9v7pf6vpifqy9nwr7ac862cb1p1vgm6wy84nxxgklaxx"))))
3019 (build-system copy-build-system)
3020 (arguments
3021 (list
3022 #:install-plan
3023 #~'(("src/uosc" "share/mpv/scripts/")
3024 ("src/fonts" "share/mpv/"))))
3025 (propagated-inputs
3026 (list mpv-thumbfast))
3027 (home-page "https://github.com/tomasklaen/uosc")
3028 (synopsis "Feature-rich minimalist proximity-based UI for mpv player")
3029 (description
3030 "uosc is a minimalist interface for mpv. It hides and shows elements
3031based on cursor proximity and offers configurable controls, thumbnails, and
3032tools for selecting subtitles, audio, and video tracks, and downloading
3033subtitles. Menus are searchable and support mouse scroll wheel.")
3034 (license license:gpl3+)))
3035
3036(define-public smplayer
3037 (package
3038 (name "smplayer")
3039 (version "25.6.0")
3040 (source (origin
3041 (method git-fetch)
3042 (uri (git-reference
3043 (url "https://github.com/smplayer-dev/smplayer")
3044 (commit (string-append "v" version))))
3045 (file-name (git-file-name name version))
3046 (sha256
3047 (base32 "0jwib6pqmsqzbgj2a8xmq8r8fn99a0ri3djif5w4n2mf7523b15a"))))
3048 (build-system qt-build-system)
3049 (native-inputs
3050 (list qttools-5))
3051 (inputs
3052 (list bash-minimal
3053 qtbase-5
3054 qtdeclarative-5
3055 qtwayland-5
3056 zlib
3057 mpv))
3058 (arguments
3059 (list #:tests? #false ; no tests
3060 #:make-flags #~(list (string-append "PREFIX=" #$output)
3061 (string-append "CC=" #+(cc-for-target)))
3062 #:modules '((guix build qt-build-system)
3063 ((guix build gnu-build-system) #:prefix gnu:)
3064 (guix build utils))
3065 #:phases
3066 #~(modify-phases %standard-phases
3067 (delete 'configure)
3068 (replace 'build (assoc-ref gnu:%standard-phases 'build))
3069 (replace 'install (assoc-ref gnu:%standard-phases 'install))
3070 (add-after 'install 'wrap-executable
3071 (lambda* (#:key inputs outputs #:allow-other-keys)
3072 (let* ((out (assoc-ref outputs "out"))
3073 (mpv (assoc-ref inputs "mpv")))
3074 (wrap-program (string-append out "/bin/smplayer")
3075 `("PATH" ":" prefix
3076 ,(list (string-append mpv "/bin"))))))))))
3077 (home-page "https://www.smplayer.info")
3078 (synopsis "Complete front-end for MPlayer, a media player")
3079 (description "SMPlayer is a graphical user interface (GUI) for
3080MPlayer, which is capable of playing almost all known video and audio
3081formats. Apart from providing access for the most common and useful
3082options of MPlayer, SMPlayer adds other interesting features like the
3083possibility to play Youtube videos, download subtitles, remember
3084the last played position, etc.")
3085 (license license:gpl2+)))
3086
3087(define-public jellyfin-mpv-shim
3088 (package
3089 (name "jellyfin-mpv-shim")
3090 (version "2.9.0")
3091 (source
3092 (origin
3093 (method url-fetch)
3094 (uri (pypi-uri "jellyfin-mpv-shim" version))
3095 (sha256
3096 (base32 "0hcvqskhgwdyi117hqmlhqknsii22qcmiwhzhf50ab5szsy0rg32"))))
3097 (build-system pyproject-build-system)
3098 (arguments
3099 (list
3100 ;; There is no test suite, but the code is ill-behaved and tries
3101 ;; to open network connections at module import time, which makes
3102 ;; `python setup.py test' fail.
3103 #:tests? #f
3104 #:phases
3105 #~(modify-phases %standard-phases
3106 ;; sanity-check loads console_scripts endpoints, which launches
3107 ;; the program, which makes the build hang. Disable it.
3108 (delete 'sanity-check)
3109 (add-after 'unpack 'disable-updates
3110 (lambda _
3111 (substitute* "jellyfin_mpv_shim/conf.py"
3112 (("check_updates: bool = True")
3113 "check_updates: bool = False")
3114 (("notify_updates: bool = True")
3115 "notify_updates: bool = False"))))
3116 (add-after 'install 'install-desktop-file
3117 (lambda* (#:key outputs #:allow-other-keys)
3118 (let* ((out (assoc-ref outputs "out"))
3119 (apps (string-append out "/share/applications"))
3120 (metainfo (string-append out "/share/metainfo"))
3121 (icons (string-append out "/share/icons"))
3122 (desktop-base "jellyfin_mpv_shim/integration/")
3123 (package-id
3124 "com.github.iwalton3.jellyfin-mpv-shim"))
3125 (for-each (lambda (size)
3126 (let ((dir (format
3127 #f "~a/hicolor/~ax~a/apps/"
3128 icons size size package-id)))
3129 (mkdir-p dir)
3130 (copy-file
3131 (format #f
3132 "~ajellyfin-~a.png"
3133 desktop-base size)
3134 (string-append dir package-id ".png"))))
3135 '(256 128 64 48 32 16))
3136 (install-file (string-append desktop-base package-id
3137 ".appdata.xml") metainfo)
3138 (install-file (string-append desktop-base package-id
3139 ".desktop") apps)))))))
3140 (native-inputs (list python-setuptools))
3141 (inputs (list `(,python "tk")
3142 python-jellyfin-apiclient
3143 python-jinja2
3144 python-mpv
3145 python-mpv-jsonipc
3146 python-pypresence
3147 python-pystray
3148 python-requests))
3149 (home-page "https://github.com/jellyfin/jellyfin-mpv-shim")
3150 (synopsis "Cast media from Jellyfin Mobile and Web apps to MPV")
3151 (description "Jellyfin MPV Shim is a cross-platform cast client for
3152Jellyfin. It has support for various media files without transcoding.")
3153 (license (list
3154 ;; jellyfin-mpv-shim
3155 license:gpl3
3156
3157 ;; jellyfin-mpv-shim, and Anime4K, FSRCNNX, NVIDIA Image
3158 ;; Scaling, AMD FidelityFX Super Resolution, AMD
3159 ;; FidelityFX Contrast Adaptive Sharpening shaders.
3160 license:expat
3161
3162 ;; Static Grain shader.
3163 license:public-domain
3164
3165 ;; KrigBilatera, SSimDownscaler, and NNEDI3 shaders.
3166 license:lgpl3+))))
3167
3168(define-public gallery-dl
3169 (package
3170 (name "gallery-dl")
3171 (version "1.32.1")
3172 (source
3173 (origin
3174 (method git-fetch)
3175 (uri (git-reference
3176 (url "https://codeberg.org/mikf/gallery-dl")
3177 (commit (string-append "v" version))))
3178 (file-name (git-file-name name version))
3179 (sha256
3180 (base32 "0d4ygppic3s2m3p0jrg60jznvf6ip6dx9qaiv6vr1ik8b84p0rg4"))))
3181 (build-system pyproject-build-system)
3182 (arguments
3183 (list
3184 ;; XXX: A lot of those require network.
3185 #:test-flags #~(list "--ignore=test/test_results.py")))
3186 (native-inputs
3187 (list python-pytest python-setuptools python-wheel nss-certs-for-test))
3188 (inputs (list python-requests ffmpeg))
3189 (home-page "https://codeberg.org/mikf/gallery-dl")
3190 (synopsis "Command-line program to download images from several sites")
3191 (description
3192 "Gallery-dl is a command-line program that downloads image galleries and
3193collections from several image hosting sites. While this package can use
3194yt-dlp packages to download videos, the focus is more on images and image
3195hosting sites.")
3196 (license license:gpl2)))
3197
3198(define-public mpv-mpris
3199 (package
3200 (name "mpv-mpris")
3201 (version "1.2")
3202 (source
3203 (origin
3204 (method git-fetch)
3205 (uri (git-reference
3206 (url "https://github.com/hoyon/mpv-mpris")
3207 (commit version)))
3208 (file-name (git-file-name name version))
3209 (sha256
3210 (base32 "1vnkiy4f1mpx1g6m9i5qivi6lxl888gd7x37qwzaa8vdfrlhssa3"))))
3211 (build-system gnu-build-system)
3212 (arguments
3213 (list
3214 #:make-flags
3215 #~(list (string-append "PREFIX=" #$output)
3216 (string-append "SYS_SCRIPTS_DIR=" #$output "/etc/mpv/scripts")
3217 (string-append "CC=" #$(cc-for-target)))
3218 #:phases
3219 #~(modify-phases %standard-phases
3220 (delete 'configure)
3221 (replace 'check
3222 (lambda* (#:key inputs native-inputs tests? #:allow-other-keys)
3223 (if tests?
3224 (begin
3225 (setenv
3226 "MPV_MPRIS_TEST_PLAY"
3227 (search-input-file
3228 (or native-inputs inputs)
3229 "share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"))
3230 (invoke "make" "test"))
3231 (format #t "test suite not run~%"))))
3232 (replace 'install
3233 (lambda* (#:key (make-flags '()) #:allow-other-keys)
3234 (apply invoke "make" "install-system" make-flags))))))
3235 (native-inputs
3236 (list dbus
3237 jq
3238 pkg-config
3239 playerctl
3240 socat
3241 sound-theme-freedesktop
3242 xorg-server-for-tests
3243 xvfb-run))
3244 (inputs
3245 (list ffmpeg glib mpv))
3246 (home-page "https://github.com/hoyon/mpv-mpris")
3247 (synopsis "MPRIS plugin for mpv")
3248 (description "This package provides an @dfn{MPRIS} (Media Player Remote
3249Interfacing Specification) plugin for the @code{mpv} media player. It implements
3250@code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
3251interfaces.
3252
3253To load this plugin, specify the following option when starting mpv:
3254@code{--script $GUIX_PROFILE/lib/mpv-mpris/mpris.so} or link it into
3255@file{$HOME/.config/mpv/scripts}.")
3256 (license license:expat)))
3257
3258(define-public mpvpaper
3259 (package
3260 (name "mpvpaper")
3261 (version "1.9")
3262 (source
3263 (origin
3264 (method git-fetch)
3265 (uri (git-reference
3266 (url "https://github.com/GhostNaN/mpvpaper")
3267 (commit version)))
3268 (file-name (git-file-name name version))
3269 (sha256
3270 (base32 "082x1bj7byd3lrlagcp0pgcs3blis48fnpcjdqpkqvi66s3hr70n"))))
3271 (build-system meson-build-system)
3272 (inputs
3273 (list mesa
3274 mpv
3275 wayland
3276 wayland-protocols))
3277 (native-inputs
3278 (list cmake-minimal
3279 pkg-config))
3280 (home-page "https://github.com/GhostNaN/mpvpaper")
3281 (synopsis
3282 "Video wallpaper program for wlroots-based wayland compositors")
3283 (description
3284 "The mpvpaper package provides a wallpaper program for wlroots-based
3285wayland compositors, allowing you to play videos as your wallpaper using mpv.")
3286 (license license:gpl3)))
3287
3288(define-public libvpx
3289 (package
3290 (name "libvpx")
3291 (version "1.16.0")
3292 (source (origin
3293 (method git-fetch)
3294 (uri (git-reference
3295 (url "https://chromium.googlesource.com/webm/libvpx")
3296 (commit (string-append "v" version))))
3297 (file-name (git-file-name name version))
3298 (sha256
3299 (base32
3300 "0llik9k5rs9ychw9fnknwrz8662dm370yf76r6d6n07727faylyg"))
3301 (patches (search-patches "libvpx-CVE-2016-2818.patch"
3302 "libvpx-CVE-2026-2447.patch"))))
3303 (build-system gnu-build-system)
3304 (arguments
3305 `(#:configure-flags (list "--enable-shared"
3306 "--disable-static"
3307 "--as=yasm"
3308 ;; Limit size to avoid CVE-2015-1258
3309 "--size-limit=16384x16384"
3310 (string-append "--prefix=" (assoc-ref %outputs "out")))
3311 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
3312 (assoc-ref %outputs "out") "/lib"))
3313 #:phases (modify-phases %standard-phases
3314 (replace 'configure
3315 (lambda* (#:key configure-flags #:allow-other-keys)
3316 ;; The configure script does not understand some of the GNU
3317 ;; options, so we only add the flags specified above.
3318 (apply invoke "./configure" configure-flags))))
3319
3320 ;; XXX: The test suite wants to download 871 files from a cloud storage
3321 ;; service (see test/test-data.sha1). It is possible to specify a
3322 ;; custom directory, but there seems to be no tarball with all files.
3323 #:tests? #f))
3324 (native-inputs
3325 (list perl yasm))
3326 (synopsis "VP8/VP9 video codec")
3327 (description "libvpx is a codec for the VP8/VP9 video compression format.")
3328 (license license:bsd-3)
3329 (home-page "https://www.webmproject.org/")))
3330
3331(define-public orfondl
3332 (package
3333 (name "orfondl")
3334 (version "1.0.1")
3335 (source (origin
3336 (method git-fetch)
3337 (uri (git-reference
3338 (url "https://github.com/badlogic/orfondl")
3339 (commit (string-append "v" version))))
3340 (file-name (git-file-name name version))
3341 (sha256
3342 (base32
3343 "0h1zcxxhvshbc3gkmr33npki6sdjh79haack1cci9k40a0gk144v"))
3344 (modules '((guix build utils)))
3345 (snippet '(begin
3346 ;; Delete prebuilt binary file.
3347 (delete-file "orfondl")))))
3348 (build-system go-build-system)
3349 (arguments
3350 (list #:install-source? #f
3351 #:import-path "github.com/badlogic/orfondl"
3352 #:phases
3353 #~(modify-phases %standard-phases
3354 (add-after 'unpack 'patch-source
3355 (lambda* (#:key inputs import-path #:allow-other-keys)
3356 (substitute* (string-append "src/" import-path "/main.go")
3357 (("\"ffmpeg\"")
3358 (string-append "\""
3359 (search-input-file inputs "bin/ffmpeg")
3360 "\""))))))))
3361 (inputs (list ffmpeg))
3362 (home-page "https://github.com/tpoechtrager/orf_dl")
3363 (synopsis "Download videos from ORF ON")
3364 (description "This package provides a Go-based command line application
3365to download videos from Austria's national television broadcaster.")
3366 (license license:bsd-3)))
3367
3368(define-public yle-dl
3369 (package
3370 (name "yle-dl")
3371 (version "20260520")
3372 (source (origin
3373 ;; PyPI release doesn't include tests.
3374 (method git-fetch)
3375 (uri (git-reference
3376 (url "https://github.com/aajanki/yle-dl")
3377 (commit (string-append "releases/" version))))
3378 (file-name (git-file-name name version))
3379 (sha256
3380 (base32
3381 "0apll6raix3c7naa12wwdiygaj7hyij0p3bdq7abzv2hy6rmkyix"))))
3382 (build-system pyproject-build-system)
3383 (arguments
3384 (list
3385 #:phases
3386 #~(modify-phases %standard-phases
3387 (add-after 'wrap 'wrap-path
3388 (lambda _
3389 (wrap-program (string-append #$output "/bin/yle-dl")
3390 `("PATH" = (,(string-append #$(this-package-input "ffmpeg")
3391 "/bin")
3392 ,(string-append #$(this-package-input "wget")
3393 "/bin"))))))
3394 ;; Integration tests require internet access.
3395 (add-before 'check 'remove-integration-tests
3396 (lambda _
3397 (delete-file-recursively "tests/integration"))))))
3398 (native-inputs
3399 (list python-flit-core python-pytest))
3400 (inputs (list bash-minimal ffmpeg wget))
3401 (propagated-inputs
3402 (list python-attrs
3403 python-configargparse
3404 python-lxml
3405 python-requests
3406 python-xattr))
3407 (home-page "https://aajanki.github.io/yle-dl/")
3408 (synopsis "Download videos from Yle servers")
3409 (description
3410 "Yle-dl is a command line program for downloading media files from the
3411video streaming services of the Finnish national broadcasting company Yle.")
3412 (license license:gpl3+)))
3413
3414(define-deprecated/public-alias youtube-dl yt-dlp)
3415
3416(define-public yt-dlp
3417 (package
3418 (name "yt-dlp")
3419 (version "2026.08.19")
3420 (source
3421 (origin
3422 (method git-fetch)
3423 (uri (git-reference
3424 (url "https://github.com/yt-dlp/yt-dlp/")
3425 (commit version)))
3426 (file-name (git-file-name name version))
3427 (sha256
3428 (base32 "1257p5r20cxdr5shsi0zi20wpn0a5qxzz1kyqjssy7p6ciw5kkh4"))))
3429 (build-system pyproject-build-system)
3430 (arguments
3431 (list
3432 #:tests? (not (%current-target-system))
3433 #:test-flags #~'("--ignore=test/test_websockets.py"
3434 "--deselect=test/test_socks.py::TestSocks4Proxy::test_socks4_errors"
3435 "--deselect=test/test_socks.py::TestSocks5Proxy::test_socks5_ipv4_target")
3436 #:phases
3437 #~(modify-phases %standard-phases
3438 ;; See <https://issues.guix.gnu.org/43418#5>.
3439 ;; ffmpeg is big but required to request free formats from, e.g.,
3440 ;; YouTube so pull it in unconditionally. Continue respecting the
3441 ;; --ffmpeg-location argument.
3442 (add-after 'unpack 'default-to-the-ffmpeg-input
3443 (lambda* (#:key inputs #:allow-other-keys)
3444 (substitute* "yt_dlp/postprocessor/ffmpeg.py"
3445 (("location = self.get_param(.*)$")
3446 (string-append
3447 "location = '"
3448 (dirname (search-input-file inputs "bin/ffmpeg"))
3449 "'\n")))))
3450 (add-before 'build 'build-generated-files
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 (if (which "pandoc")
3453 (invoke "make"
3454 "PYTHON=python"
3455 "yt-dlp"
3456 "yt-dlp.1"
3457 "completions")
3458 (invoke "make"
3459 "PYTHON=python"
3460 "yt-dlp"
3461 "completions"))))
3462 (replace 'check
3463 (lambda* (#:key tests? test-flags #:allow-other-keys)
3464 (when tests?
3465 (apply invoke "pytest"
3466 "-k"
3467 (string-append
3468 "not download"
3469 " and not "
3470 "test_partial_read_then_full_read")
3471 test-flags)))))))
3472 (inputs (list ffmpeg python-brotli
3473 python-certifi
3474 python-mutagen
3475 python-pycryptodomex
3476 python-requests
3477 python-urllib3
3478 python-websockets))
3479 (native-inputs
3480 (append
3481 ;; To generate the manpage.
3482 (if (supported-package? pandoc)
3483 (list pandoc)
3484 '())
3485 (list nss-certs-for-test python-hatchling python-pytest zip)))
3486 (synopsis "Download videos from YouTube.com and other sites")
3487 (description
3488 "yt-dlp is a small command-line program to download videos from
3489YouTube.com and many more sites. It is a fork of youtube-dl with a
3490focus on adding new features while keeping up-to-date with the
3491original project.")
3492 (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/")))
3493 (home-page "https://github.com/yt-dlp/yt-dlp")
3494 (license license:public-domain)))
3495
3496(define-public you-get
3497 (package
3498 (name "you-get")
3499 (version "0.4.1743")
3500 (source
3501 (origin
3502 (method git-fetch)
3503 (uri (git-reference
3504 (url "https://github.com/soimort/you-get")
3505 (commit (string-append "v" version))))
3506 (file-name (git-file-name name version))
3507 (sha256
3508 (base32 "05i2rzj40n5l14zm1zwgncwpdfgrrr1p94wk4vjxkji56y60yydf"))))
3509 (build-system pyproject-build-system)
3510 (arguments
3511 (list
3512 #:tests? #f ;XXX some tests need Internet access
3513 #:phases
3514 #~(modify-phases %standard-phases
3515 (add-after 'unpack 'qualify-input-references
3516 ;; Explicitly invoke the input ffmpeg, instead of whichever one
3517 ;; happens to be in the user's $PATH at run time.
3518 (lambda* (#:key inputs #:allow-other-keys)
3519 (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
3520 (substitute* "src/you_get/processor/ffmpeg.py"
3521 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
3522 ;; same string is also used when sniffing ffmpeg's output.
3523 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
3524 (string-append prefix "'" ffmpeg "'")))))))))
3525 (native-inputs (list python-setuptools))
3526 (inputs
3527 (list ffmpeg ;for multi-part and >=1080p videos
3528 python-dukpy))
3529 (synopsis "Download videos, audio, or images from Web sites")
3530 (description
3531 "You-Get is a command-line utility to download media contents (videos,
3532audio, images) from the Web. It can use either mpv or vlc for playback.")
3533 (home-page "https://you-get.org/")
3534 (license license:expat)))
3535
3536(define-public youtube-viewer
3537 (package
3538 (name "youtube-viewer")
3539 (version "3.8.1")
3540 (source (origin
3541 (method git-fetch)
3542 (uri (git-reference
3543 (url "https://github.com/trizen/youtube-viewer")
3544 (commit version)))
3545 (file-name (git-file-name name version))
3546 (sha256
3547 (base32
3548 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
3549 (build-system perl-build-system)
3550 (native-inputs
3551 (list perl-module-build))
3552 (inputs
3553 (list bash-minimal
3554 perl-data-dump
3555 perl-file-sharedir
3556 perl-gtk2
3557 perl-json
3558 perl-json-xs
3559 perl-libwww
3560 perl-lwp-protocol-https
3561 perl-lwp-useragent-cached
3562 perl-memoize
3563 perl-mozilla-ca
3564 perl-term-readline-gnu
3565 perl-unicode-linebreak
3566 xdg-utils
3567 yt-dlp))
3568 (arguments
3569 `(#:modules ((guix build perl-build-system)
3570 (guix build utils)
3571 (srfi srfi-26))
3572 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
3573 ;; is broken without perl-gtk3.
3574 #:module-build-flags '("--gtk2")
3575 #:phases
3576 (modify-phases %standard-phases
3577 (add-after 'unpack 'refer-to-inputs
3578 (lambda* (#:key inputs #:allow-other-keys)
3579 (substitute* "lib/WWW/YoutubeViewer.pm"
3580 (("'yt-dlp'")
3581 (format #f "'~a'"
3582 (search-input-file inputs "bin/yt-dlp"))))
3583 (substitute* '("bin/gtk2-youtube-viewer"
3584 "bin/gtk3-youtube-viewer")
3585 (("'xdg-open'")
3586 (format #f "'~a/bin/xdg-open'"
3587 (assoc-ref inputs "xdg-utils"))))))
3588 (add-after 'install 'install-desktop
3589 (lambda* (#:key outputs #:allow-other-keys)
3590 (let* ((out (assoc-ref outputs "out"))
3591 (sharedir (string-append out "/share")))
3592 (install-file "share/gtk-youtube-viewer.desktop"
3593 (string-append sharedir "/applications"))
3594 (install-file "share/icons/gtk-youtube-viewer.png"
3595 (string-append sharedir "/pixmaps")))))
3596 (add-after 'install 'wrap-program
3597 (lambda* (#:key outputs #:allow-other-keys)
3598 (let* ((out (assoc-ref outputs "out"))
3599 (bin-dir (string-append out "/bin/"))
3600 (site-dir (string-append out "/lib/perl5/site_perl/"))
3601 (lib-path (getenv "PERL5LIB")))
3602 (for-each (cut wrap-program <>
3603 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
3604 (find-files bin-dir))))))))
3605 (synopsis
3606 "Lightweight application for searching and streaming videos from YouTube")
3607 (description
3608 "Youtube-viewer searches and plays YouTube videos in a native player.
3609It comes with various search options; it can search for videos, playlists
3610and/or channels. The videos are streamed directly in a selected video player
3611at the best resolution (customizable) and with closed-captions (if available).
3612Both command-line and GTK2 interface are available.")
3613 (home-page "https://github.com/trizen/youtube-viewer")
3614 (license license:perl-license)))
3615
3616(define-public ytcc
3617 (package
3618 (name "ytcc")
3619 (version "2.8.0")
3620 (source
3621 (origin
3622 (method git-fetch)
3623 (uri (git-reference
3624 (url "https://github.com/woefe/ytcc")
3625 (commit (string-append "v" version))))
3626 (file-name (git-file-name name version))
3627 (sha256
3628 (base32 "0k9cyd9fb9cwn58xyf3ysyw2w6cm8hpikygqjk7rkd6fcsh737p9"))))
3629 (build-system pyproject-build-system)
3630 (arguments
3631 (list
3632 #:test-flags
3633 ;; AssertionError: assert 'NoCopyrightSounds'.
3634 #~(list "--deselect=tests/test_cli.py::test_download"
3635 "--deselect=tests/test_cli.py::test_import"
3636 "--deselect=tests/test_cli.py::test_import_csv"
3637 "--deselect=tests/test_cli.py::test_import_duplicate"
3638 "--deselect=tests/test_cli.py::test_play_video"
3639 "--deselect=tests/test_cli.py::test_subscribe"
3640 "--deselect=tests/test_cli.py::test_update")
3641 #:phases
3642 #~(modify-phases %standard-phases
3643 (add-before 'check 'pre-check
3644 (lambda _
3645 (setenv "HOME" "/tmp"))))))
3646 (native-inputs
3647 (list python-hatchling
3648 python-pytest))
3649 (inputs
3650 (list mpv
3651 python-click
3652 python-defusedxml
3653 python-websockets
3654 python-wcwidth
3655 yt-dlp))
3656 (home-page "https://github.com/woefe/ytcc")
3657 (synopsis "Command line tool to keep track of your favorite playlists")
3658 (description "ytcc is a command line tool to keep track of your favorite
3659playlists.")
3660 (license license:gpl3+)))
3661
3662(define-public ytarchive
3663 (package
3664 (name "ytarchive")
3665 (version "0.5.0")
3666 (source
3667 (origin
3668 (method git-fetch)
3669 (uri (git-reference
3670 (url "https://github.com/Kethsar/ytarchive")
3671 (commit (string-append "v" version))))
3672 (file-name (git-file-name name version))
3673 (sha256
3674 (base32 "1mx7w423rr6s4zvv65sbzl5rifj67rb0pzxjpi2y69l9p1vynmv3"))))
3675 (build-system go-build-system)
3676 (arguments
3677 (list
3678 #:install-source? #f
3679 #:import-path "github.com/Kethsar/ytarchive"
3680 #:embed-files #~(list "children" "nodes" "text")
3681 #:phases
3682 #~(modify-phases %standard-phases
3683 (add-after 'install 'wrap
3684 (lambda _
3685 (wrap-program (string-append #$output "/bin/ytarchive")
3686 `("PATH" ":" prefix
3687 (,(string-append #$(this-package-input "ffmpeg")
3688 "/bin/ffmpeg")))))))
3689 #:test-flags #~(list "-vet=off")))
3690 (native-inputs
3691 (list go-github-com-alessio-shellescape
3692 go-github-com-dannav-hhmmss
3693 go-github-com-mattn-go-colorable
3694 go-github-com-xhit-go-str2duration-v2
3695 go-golang-org-x-net
3696 go-golang-org-x-sys))
3697 (inputs
3698 (list ffmpeg))
3699 (home-page "https://github.com/Kethsar/ytarchive")
3700 (synopsis "Youtube livestream downloader")
3701 (description
3702 "Attempt to archive a given Youtube livestream from the start. This is
3703most useful for streams that have already started and you want to download,
3704but can also be used to wait for a scheduled stream and start downloading as
3705soon as it starts.")
3706 (license license:expat)))
3707
3708(define-public libbluray
3709 (package
3710 (name "libbluray")
3711 (version "1.4.1")
3712 (source (origin
3713 (method url-fetch)
3714 (uri (string-append "https://download.videolan.org/videolan/"
3715 name "/" version "/"
3716 name "-" version ".tar.xz"))
3717 (sha256
3718 (base32
3719 "0jglp44wsjpp5k3mrxskfj9b488ksn7cj2dhxfjdqa3z150drdbn"))))
3720 (build-system meson-build-system)
3721 (arguments
3722 (list
3723 #:disallowed-references
3724 (list (gexp-input (this-package-native-input "openjdk") "jdk"))
3725 #:phases
3726 #~(modify-phases %standard-phases
3727 (add-before 'build 'set-java-home
3728 (lambda* (#:key inputs #:allow-other-keys)
3729 ;; There is a jdk_home build option, but it conflates build-time
3730 ;; (openjdk:jdk) and runtime (openjdk), so use JAVA_HOME
3731 ;; instead.
3732 (setenv "JAVA_HOME"
3733 #$(gexp-input (this-package-native-input "openjdk")
3734 "jdk"))))
3735 (add-after 'unpack 'fix-dlopen-paths
3736 (lambda* (#:key inputs #:allow-other-keys)
3737 (define (lib/no.so library)
3738 (let ((found (search-input-file inputs library)))
3739 (substring found 0 (- (string-length found)
3740 (string-length ".so")))))
3741 (substitute* "src/libbluray/disc/aacs.c"
3742 (("\"libaacs\"")
3743 (string-append "\"" (lib/no.so "lib/libaacs.so") "\"")))
3744 (substitute* "src/libbluray/bdj/bdj.c"
3745 ;; Manually fix the JDK_HOME macro that is set by Meson for
3746 ;; the `jdk_home' option and embedded in the binaries for use
3747 ;; at runtime. The Meson option is not used because we need
3748 ;; to build with the 'jdk' output but don't want to retain a
3749 ;; reference to it.
3750 (("JDK_HOME")
3751 (format #f "~s" #$(this-package-input "openjdk"))))
3752 (substitute* "src/libbluray/disc/bdplus.c"
3753 (("\"libbdplus\"")
3754 (string-append "\"" (lib/no.so "lib/libbdplus.so") "\"")))))
3755 (add-after 'install 'move-packages-to-libs
3756 ;; Avoid the need to propagate libxml2 et al. by referring to them
3757 ;; directly.
3758 (lambda* (#:key inputs #:allow-other-keys)
3759 (define (search-input-vicinity lib)
3760 (dirname
3761 (search-input-file inputs
3762 (string-append "lib/lib" lib ".so"))))
3763 (substitute* (string-append #$output
3764 "/lib/pkgconfig/libbluray.pc")
3765 (("^Requires.private.*") "")
3766 (("^Libs.private:" field)
3767 (string-append field
3768 " -L" (search-input-vicinity "xml2")
3769 " -L" (search-input-vicinity "freetype")
3770 " -L" (search-input-vicinity "fontconfig")
3771 " -lxml2 -lfreetype -lfontconfig"))))))))
3772 ;; The latest OpenJDK 25 is not yet supported, so we use an older version
3773 ;; that is a bit smaller and produces less warnings at runtime.
3774 (native-inputs (list ant `(,openjdk11 "jdk") pkg-config))
3775 (inputs (list fontconfig freetype libaacs libbdplus libudfread libxml2
3776 openjdk11))
3777 (home-page "https://www.videolan.org/developers/libbluray.html")
3778 (synopsis "Blu-Ray Disc playback library")
3779 (description
3780 "libbluray is a library designed for Blu-Ray Disc playback for media
3781players, like VLC or MPlayer.")
3782 (license license:lgpl2.1+)))
3783
3784(define-public libdvdread
3785 (package
3786 (name "libdvdread")
3787 (version "7.0.1")
3788 (source (origin
3789 (method url-fetch)
3790 (uri (string-append "https://download.videolan.org/videolan/"
3791 "libdvdread/" version "/"
3792 "libdvdread-" version ".tar.xz"))
3793 (sha256
3794 (base32
3795 "01ylalrr9lw6x7fz7z030243kln1hfd1pbh3m9ikjp610nih8gif"))))
3796 (build-system meson-build-system)
3797 (native-inputs (list pkg-config))
3798 (propagated-inputs (list libdvdcss))
3799 (home-page "http://dvdnav.mplayerhq.hu/")
3800 (synopsis "Library for reading video DVDs")
3801 (description
3802 "Libdvdread provides a simple foundation for reading DVD video
3803disks. It provides the functionality that is required to access many
3804DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
3805authentication and descrambling (if an external libdvdcss library is
3806installed).")
3807 (license license:gpl2+)))
3808
3809(define-public lsdvd
3810 (package
3811 (name "lsdvd")
3812 (version "0.17")
3813 (source
3814 (origin
3815 (method git-fetch)
3816 (uri (git-reference
3817 (url "https://git.code.sf.net/p/lsdvd/git")
3818 (commit version)))
3819 (file-name (git-file-name name version))
3820 (sha256
3821 (base32 "1zsk4bwgw0ka44qymv52c5j9igajvdhdj8hlf07p35rpnbl2qzfm"))))
3822 (native-inputs
3823 (list autoconf
3824 automake
3825 pkg-config))
3826 (inputs (list libdvdread))
3827 (build-system gnu-build-system)
3828 (home-page "https://sourceforge.net/projects/lsdvd/")
3829 (synopsis "Console application that lists the contents of a DVD")
3830 (description
3831 "@command{lsdvd} provides output about the types of video, audio tracks
3832and subtitles. Output is available in a number of formats including human
3833readable, perl, ruby or xml.")
3834 (license license:gpl2)))
3835
3836(define-public dvdauthor
3837 (package
3838 (name "dvdauthor")
3839 (version "0.7.2")
3840 (source
3841 (origin
3842 (method url-fetch)
3843 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
3844 version ".tar.gz"))
3845 (sha256
3846 (base32
3847 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
3848 (build-system gnu-build-system)
3849 (inputs
3850 (list libdvdread libpng imagemagick libxml2 freetype))
3851 (native-inputs
3852 (list pkg-config))
3853 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
3854 (description "@command{dvdauthor} will generate a DVD-Video movie from a
3855MPEG-2 stream containing VOB packets.")
3856 (home-page "https://dvdauthor.sourceforge.net")
3857 (license license:gpl3+)))
3858
3859(define-public libdvdnav
3860 (package
3861 (name "libdvdnav")
3862 (version "7.0.0")
3863 (source (origin
3864 (method url-fetch)
3865 (uri (string-append "https://download.videolan.org/videolan/"
3866 "libdvdnav/" version "/"
3867 "libdvdnav-" version ".tar.xz"))
3868 (sha256
3869 (base32
3870 "07i2gdj4nfah4lwlc6hl14xjbyh6b12bc1lipxs3q4vdsdd8z8d2"))))
3871 (build-system meson-build-system)
3872 (native-inputs (list pkg-config))
3873 (propagated-inputs (list libdvdread)) ;in 'Requires.private' of dvdnav.pc
3874 (home-page "http://dvdnav.mplayerhq.hu/")
3875 (synopsis "Library for video DVD navigation features")
3876 (description
3877 "Libdvdnav is a library for developers of multimedia
3878applications. It allows easy use of sophisticated DVD navigation features
3879such as DVD menus, multiangle playback and even interactive DVD games. All
3880this functionality is provided through a simple API which provides the DVD
3881playback as a single logical stream of blocks, intermitted by special
3882dvdnav events to report certain conditions. The main usage of libdvdnav is
3883a loop regularly calling a function to get the next block, surrounded by
3884additional calls to tell the library of user interaction. The whole
3885DVD virtual machine and internal playback states are completely
3886encapsulated.")
3887 (license license:gpl2+)))
3888
3889(define-public libdvdcss
3890 (package
3891 (name "libdvdcss")
3892 (version "1.5.0")
3893 (source (origin
3894 (method url-fetch)
3895 (uri (string-append "https://download.videolan.org/pub/"
3896 name "/" version "/"
3897 name "-" version ".tar.xz"))
3898 (sha256
3899 (base32
3900 "16f3lnwcldy0ssq2yah97qsb0b8scsvhsivfbhpgizmys7j6752j"))))
3901 (build-system meson-build-system)
3902 (home-page "https://www.videolan.org/developers/libdvdcss.html")
3903 (synopsis "Library for accessing DVDs as block devices")
3904 (description
3905 "libdvdcss is a simple library designed for accessing DVDs like a block
3906device without having to bother about the decryption.")
3907 (license license:gpl2+)))
3908
3909(define-public srt2vtt
3910 (package
3911 (name "srt2vtt")
3912 (version "0.2")
3913 (source (origin
3914 (method url-fetch)
3915 (uri (string-append
3916 "https://files.dthompson.us/srt2vtt/srt2vtt-"
3917 version ".tar.gz"))
3918 (sha256
3919 (base32
3920 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
3921 (build-system gnu-build-system)
3922 (arguments
3923 `(#:phases
3924 (modify-phases %standard-phases
3925 (add-after 'install 'wrap-srt2vtt
3926 (lambda* (#:key outputs #:allow-other-keys)
3927 (let* ((out (assoc-ref outputs "out"))
3928 (bin (string-append out "/bin"))
3929 (version ,(let ((v (package-version guile-3.0)))
3930 (string-append (car (string-split v #\.))
3931 ".0")))
3932 (site (string-append out "/share/guile/site/" version))
3933 (compiled (string-append
3934 out "/lib/guile/" version
3935 "/site-ccache")))
3936 (wrap-program (string-append bin "/srt2vtt")
3937 `("GUILE_LOAD_PATH" ":" prefix (,site))
3938 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
3939 (native-inputs
3940 (list pkg-config))
3941 (inputs
3942 (list guile-3.0))
3943 (synopsis "SubRip to WebVTT subtitle converter")
3944 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
3945for use with HTML5 video.")
3946 (home-page "https://dthompson.us/projects/srt2vtt.html")
3947 (license license:gpl3+)))
3948
3949(define-public avidemux
3950 (package
3951 (name "avidemux")
3952 (version "2.8.1")
3953 (source (origin
3954 (method url-fetch)
3955 (uri (string-append
3956 "mirror://sourceforge/avidemux/avidemux/" version "/"
3957 "avidemux_" version ".tar.gz"))
3958 (sha256
3959 (base32
3960 "18ixmm18wp3vlczzdq4wfnkr5kxpz9y217dnjb0mgkl3hv5bvnbp"))
3961 (patches (search-patches "avidemux-install-to-lib.patch"))))
3962 (build-system qt-build-system)
3963 (native-inputs
3964 (list perl pkg-config python-wrapper qttools-5 yasm))
3965 ;; FIXME: Once packaged, add libraries not found during the build.
3966 (inputs
3967 (list alsa-lib
3968 fontconfig
3969 freetype
3970 fribidi
3971 glu
3972 jack-1
3973 lame
3974 libaom
3975 libva
3976 libvdpau
3977 libvorbis
3978 libvpx
3979 libxv
3980 pulseaudio
3981 qtbase-5
3982 qtwayland-5
3983 sqlite
3984 zlib))
3985 (arguments
3986 (list
3987 #:tests? #f ; no check target
3988 #:phases
3989 ;; Make sure files inside the included ffmpeg tarball are
3990 ;; patch-shebanged.
3991 #~(let ((ffmpeg "ffmpeg-4.4.2"))
3992 (modify-phases %standard-phases
3993 (add-before 'patch-source-shebangs 'unpack-ffmpeg
3994 (lambda _
3995 (with-directory-excursion "avidemux_core/ffmpeg_package"
3996 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
3997 (delete-file (string-append ffmpeg ".tar.bz2"))
3998 (with-directory-excursion ffmpeg
3999 (invoke
4000 "patch" "-p1" "--force" "-i"
4001 #$(local-file
4002 (search-patch "ffmpeg-4-binutils-2.41.patch")))))))
4003 (add-after 'patch-source-shebangs 'repack-ffmpeg
4004 (lambda _
4005 (with-directory-excursion "avidemux_core/ffmpeg_package"
4006 (substitute* (string-append ffmpeg "/configure")
4007 (("#! /bin/sh") (string-append "#!" (which "sh"))))
4008 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
4009 ;; avoid non-determinism in the archive
4010 "--sort=name" "--mtime=@0"
4011 "--owner=root:0" "--group=root:0")
4012 (delete-file-recursively ffmpeg))))
4013 (replace 'configure
4014 (lambda _
4015 ;; Copy-paste settings from the cmake build system.
4016 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
4017 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
4018 (replace 'build
4019 (lambda _
4020 (let* ((out #$output)
4021 (lib (string-append out "/lib"))
4022 (top (getcwd))
4023 (build_component
4024 (lambda* (component srcdir #:optional (args '()))
4025 (let ((builddir (string-append "build_" component)))
4026 (mkdir builddir)
4027 (with-directory-excursion builddir
4028 (apply invoke "cmake"
4029 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
4030 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
4031 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
4032 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
4033 "\"-Wl,-rpath=" lib "\"")
4034 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
4035 (string-append "../" srcdir)
4036 "-DENABLE_QT5=True"
4037 args)
4038 (invoke "make" "-j"
4039 (number->string (parallel-job-count)))
4040 (invoke "make" "install"))))))
4041 (mkdir out)
4042 (build_component "core" "avidemux_core")
4043 (build_component "cli" "avidemux/cli")
4044 (build_component "qt4" "avidemux/qt4")
4045 (build_component "plugins_common" "avidemux_plugins"
4046 '("-DPLUGIN_UI=COMMON"))
4047 (build_component "plugins_cli" "avidemux_plugins"
4048 '("-DPLUGIN_UI=CLI"))
4049 (build_component "plugins_qt4" "avidemux_plugins"
4050 '("-DPLUGIN_UI=QT4"))
4051 (build_component "plugins_settings" "avidemux_plugins"
4052 '("-DPLUGIN_UI=SETTINGS"))
4053 ;; Remove .exe and .dll file.
4054 (delete-file-recursively
4055 (string-append out "/share/ADM6_addons")))))
4056 (delete 'install)))))
4057 (home-page "http://fixounet.free.fr/avidemux/")
4058 (synopsis "Video editor")
4059 (description "Avidemux is a video editor designed for simple cutting,
4060filtering and encoding tasks. It supports many file types, including AVI,
4061DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
4062can be automated using projects, job queue and powerful scripting
4063capabilities.")
4064 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
4065 ;; Software with various licenses is included, see License.txt.
4066 (license license:gpl2+)))
4067
4068(define-public vapoursynth
4069 (package
4070 (name "vapoursynth")
4071 (version "76")
4072 (source
4073 (origin
4074 (method git-fetch)
4075 (uri (git-reference
4076 (url "https://github.com/vapoursynth/vapoursynth")
4077 (commit (string-append "R" version))))
4078 (file-name (git-file-name name version))
4079 (sha256
4080 (base32 "1gckysv75dq5vd6q40wzlb269lfdil2h3p5dvzqck9k63w36j5m7"))))
4081 (build-system pyproject-build-system)
4082 (arguments
4083 (list
4084 #:phases
4085 #~(modify-phases %standard-phases
4086 (add-after 'install 'install-to-standard-directories
4087 (lambda* (#:key inputs outputs #:allow-other-keys)
4088 (let ((vapoursynth (string-append (site-packages inputs outputs)
4089 "/vapoursynth")))
4090
4091 ;; Add a copy of the headers to the standard location.
4092 (mkdir-p (string-append #$output "/include"))
4093 (for-each (lambda (file)
4094 (link file
4095 (string-append #$output "/include/"
4096 (basename file))))
4097 (find-files (string-append vapoursynth "/include")))
4098
4099 ;; Install a second pkgconfig file at the standard location
4100 ;; pointing to the location where the files were installed.
4101 (install-file (string-append vapoursynth
4102 "/pkgconfig/vapoursynth.pc")
4103 (string-append #$output "/lib/pkgconfig"))
4104 (substitute* (string-append #$output
4105 "/lib/pkgconfig/vapoursynth.pc")
4106 (("prefix=.*")
4107 (string-append "prefix=" vapoursynth "\n")))))))))
4108 (native-inputs
4109 (list python-meson python-pytest pkg-config))
4110 (inputs
4111 (list ffmpeg libass tesseract-ocr zimg))
4112 (home-page "https://www.vapoursynth.com/")
4113 (synopsis "Video processing framework")
4114 (description "VapourSynth is a C++ library and Python module for video
4115manipulation. It aims to be a modern rewrite of Avisynth, supporting
4116multithreading, generalized colorspaces, per frame properties, and videos with
4117format changes.")
4118 ;; As seen from the source files.
4119 (license license:lgpl2.1+)))
4120
4121(define-public xvid
4122 (package
4123 (name "xvid")
4124 (version "1.3.7")
4125 (source (origin
4126 (method url-fetch)
4127 (uri (string-append
4128 "http://downloads.xvid.com/downloads/xvidcore-"
4129 version ".tar.bz2"))
4130 (sha256
4131 (base32
4132 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
4133 (build-system gnu-build-system)
4134 (native-inputs (list yasm))
4135 (arguments
4136 '(#:phases
4137 (modify-phases %standard-phases
4138 (add-before 'configure 'pre-configure
4139 (lambda _
4140 (chdir "build/generic")
4141 (substitute* "configure"
4142 (("#! /bin/sh") (string-append "#!" (which "sh"))))
4143 #t)))
4144 #:tests? #f)) ; no test suite
4145 (home-page "https://www.xvid.com/")
4146 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
4147 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
4148codec library. It uses ASP features such as b-frames, global and quarter
4149pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
4150and custom quantization matrices.")
4151 (license license:gpl2+)))
4152
4153(define-public streamlink
4154 (package
4155 (name "streamlink")
4156 (version "8.5.0")
4157 (source
4158 (origin
4159 (method git-fetch)
4160 (uri (git-reference
4161 (url "https://github.com/streamlink/streamlink")
4162 (commit version)))
4163 (file-name (git-file-name name version))
4164 (sha256
4165 (base32 "08b81189fabzycxwlyk4md0kq6sxfsw04pc267psz8nhkz7na3nk"))))
4166 (build-system pyproject-build-system)
4167 (arguments
4168 (list
4169 #:test-flags #~(list "-k" "not test_no_cache")
4170 #:phases
4171 #~(modify-phases %standard-phases
4172 (add-after 'unpack 'fix-version
4173 (lambda _
4174 ;; versioningit needs git tags; set version via environment
4175 ;; variable and create _version.py directly.
4176 (substitute* "pyproject.toml"
4177 (("\"version\",") "")
4178 (("requires-python = ")
4179 (string-append "version = \"" #$version "\"\n"
4180 "requires-python = ")))
4181 (call-with-output-file "src/streamlink/_version.py"
4182 (lambda (port)
4183 (format port "__version__ = \"~a\"~%" #$version))))))))
4184 (native-inputs
4185 (list python-freezegun
4186 python-pytest
4187 python-pytest-trio
4188 python-requests-mock
4189 python-setuptools))
4190 (propagated-inputs
4191 (list python-certifi
4192 python-isodate
4193 python-lxml
4194 python-pycountry
4195 python-pycryptodome
4196 python-pysocks
4197 python-requests
4198 python-trio
4199 python-trio-websocket
4200 python-urllib3
4201 python-websocket-client))
4202 (home-page "https://github.com/streamlink/streamlink")
4203 (synopsis "Extract streams from various services")
4204 (description "Streamlink is command-line utility that extracts streams
4205from sites like Twitch.tv and pipes them into a video player of choice.")
4206 (license license:bsd-2)))
4207
4208(define-public mlt
4209 (package
4210 (name "mlt")
4211 (version "7.40.0")
4212 (source
4213 (origin
4214 (method git-fetch)
4215 (uri (git-reference
4216 (url "https://github.com/mltframework/mlt")
4217 (commit (string-append "v" version))))
4218 (file-name (git-file-name name version))
4219 (sha256
4220 (base32 "0pn0f6d6qjjnzp9ygx4gl5n74xr13ylfr2fygnijhd9z0mvzba5c"))))
4221 (build-system cmake-build-system)
4222 (arguments
4223 (list
4224 #:tests? #f ;requires "Kwalify"
4225 #:configure-flags #~(list "-DSWIG_PYTHON=On"
4226 "-DMOD_DECKLINK=OFF" ; needs nonfree software
4227 "-DMOD_QT6=ON")
4228 #:phases
4229 #~(modify-phases %standard-phases
4230 (add-after 'install 'wrap-executable
4231 (lambda _
4232 (let* ((ladspa #$(this-package-input "ladspa"))
4233 ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep
4234 ;; compatibility with MLT 6 where it's only 'melt'.
4235 (major #$(version-major version))
4236 (exec (if (file-exists?
4237 (string-append #$output "/bin/melt-" major))
4238 (string-append "melt-" major)
4239 "melt")))
4240 (wrap-program (string-append #$output "/bin/" exec)
4241 `("LADSPA_PATH" ":" =
4242 (,(string-append ladspa "/lib/ladspa"))))))))))
4243 (inputs
4244 (list alsa-lib
4245 `(,alsa-plugins "pulseaudio")
4246 bash-minimal
4247 eigen ; movit requires.private
4248 ffmpeg
4249 fftw
4250 gdk-pixbuf
4251 gtk+
4252 jack-1
4253 ladspa
4254 libebur128
4255 libexif
4256 libsamplerate
4257 libvorbis
4258 libxml2
4259 lilv
4260 movit
4261 pulseaudio
4262 qt5compat
4263 qtbase
4264 qtsvg
4265 rnnoise
4266 rtaudio
4267 rubberband
4268 sdl2
4269 sdl2-image
4270 sox
4271 vidstab))
4272 (native-inputs
4273 (list frei0r-api pkg-config python-minimal swig-4.4))
4274 (native-search-paths
4275 (list (search-path-specification
4276 (variable "FREI0R_PATH")
4277 (files (list "lib/frei0r-1")))))
4278 (home-page "https://www.mltframework.org/")
4279 (synopsis "Author, manage, and run multitrack audio/video compositions")
4280 (description
4281 "MLT is a multimedia framework, designed and developed for television
4282broadcasting. It provides a toolkit for broadcasters, video editors, media
4283players, transcoders, web streamers and many more types of applications. The
4284functionality of the system is provided via an assortment of ready to use
4285tools, XML authoring components, and an extensible plug-in based API.")
4286 (license license:lgpl2.1+)))
4287
4288(define-public v4l-utils
4289 (package
4290 (name "v4l-utils")
4291 (version "1.24.1")
4292 (source (origin
4293 (method url-fetch)
4294 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
4295 "/v4l-utils-" version ".tar.bz2"))
4296 (sha256
4297 (base32
4298 "0nszh1fvflzb0z8bdfas743bmhwkpdqfvk85799wxx87cf5gxdyb"))))
4299 (build-system gnu-build-system)
4300 (arguments
4301 '(#:configure-flags
4302 (list "--disable-static"
4303 (string-append "--with-udevdir="
4304 (assoc-ref %outputs "out")
4305 "/lib/udev"))))
4306 (native-inputs
4307 (list perl pkg-config))
4308 (inputs
4309 (list libjpeg-turbo
4310 eudev))
4311 (synopsis "Realtime video capture utilities for Linux")
4312 (description "The v4l-utils provide a series of libraries and utilities to
4313be used for realtime video capture via Linux-specific APIs.")
4314 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
4315 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
4316 (license (list license:lgpl2.1+ license:gpl2))))
4317
4318;; 2026-03-20
4319(define-deprecated-package v4l-utils-minimal v4l-utils)
4320
4321(define-public obs
4322 (package
4323 (name "obs")
4324 (version "32.0.4")
4325 (source (origin
4326 (method url-fetch)
4327 (uri (string-append "https://github.com/obsproject/obs-studio/releases/download/"
4328 version
4329 "/OBS-Studio-" version "-Sources.tar.gz"))
4330 (sha256
4331 (base32
4332 "1a5vpm0ah0a6gq6wrwid4gd89zi52pg24r4sqqagxyq58fi2xrnr"))
4333 (patches
4334 (search-patches "obs-modules-location.patch"))))
4335 (build-system cmake-build-system)
4336 (arguments
4337 (list
4338 #:tests? #f
4339 #:configure-flags
4340 #~(let ((libdir (string-append (assoc-ref %outputs "out") "/lib")))
4341 (list (string-append "-DOBS_VERSION_OVERRIDE=" #$version)
4342 (string-append "-DOBS_EXECUTABLE_RPATH=" libdir)
4343 (string-append "-DOBS_LIBRARY_RPATH=" libdir)
4344 (string-append "-DOBS_MODULE_RPATH=" libdir)
4345 "-DENABLE_UNIT_TESTS=ON"
4346 "-DENABLE_NEW_MPEGTS_OUTPUT=OFF"
4347 "-DENABLE_AJA=OFF"
4348 "-DENABLE_QSV11=OFF"
4349 "-DENABLE_NVENC=OFF"
4350 ;; Requires a custom version of websocketpp in inputs, that's
4351 ;; patched to be compatible with recent versions of Boost
4352 "-DENABLE_WEBSOCKET=ON"
4353 ;; Browser plugin requires cef, but it is not packaged yet.
4354 ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
4355 "-DBUILD_BROWSER=OFF"))
4356 #:phases
4357 #~(modify-phases %standard-phases
4358 (add-after 'install 'wrap-executable
4359 (lambda* _
4360 (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
4361 (wrap-program (string-append #$output "/bin/obs")
4362 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))
4363 `("LD_LIBRARY_PATH" ":" prefix
4364 (,(string-append #$(this-package-input "vlc")
4365 "/lib")
4366 ;; TODO: Remove this once our mesa has glvnd support.
4367 ,(string-append #$(this-package-input "mesa")
4368 "/lib"))))))))))
4369 (native-search-paths
4370 (list (search-path-specification
4371 (variable "OBS_PLUGINS_DIRECTORY")
4372 (separator #f) ;single entry
4373 (files '("lib/obs-plugins")))
4374 (search-path-specification
4375 (variable "OBS_PLUGINS_DATA_DIRECTORY")
4376 (separator #f) ;single entry
4377 (files '("share/obs/obs-plugins")))))
4378 (native-inputs
4379 (list cmocka pkg-config swig-4.0 extra-cmake-modules))
4380 (inputs
4381 (list
4382 alsa-lib
4383 asio
4384 bash-minimal
4385 curl
4386 eudev
4387 ffmpeg
4388 fontconfig
4389 freetype
4390 glib
4391 jack-1
4392 jansson
4393 libdatachannel
4394 libfdk
4395 libglvnd
4396 libva
4397 libx264
4398 libxcomposite
4399 libxkbcommon
4400 luajit
4401 mbedtls-lts
4402 mesa
4403 nlohmann-json
4404 pciutils
4405 pipewire
4406 pulseaudio
4407 python
4408 qrcodegen-cpp
4409 qtbase
4410 qtsvg
4411 qtwayland
4412 rnnoise
4413 simde
4414 speexdsp
4415 v4l-utils
4416 uthash
4417 vlc
4418 vulkan-headers
4419 wayland
4420 wayland-protocols
4421 websocketpp-next ;see websocket note above
4422 zlib))
4423 (synopsis "Live streaming software")
4424 (description "Open Broadcaster Software provides a graphical interface for
4425video recording and live streaming. OBS supports capturing audio and video
4426from many input sources such as webcams, X11 (for screencasting), PulseAudio,
4427and JACK.")
4428 (home-page "https://obsproject.com")
4429 (license license:gpl2+)))
4430
4431(define-public obs-advanced-masks
4432 (package
4433 (name "obs-advanced-masks")
4434 (version "1.5.4")
4435 (source
4436 (origin
4437 (method git-fetch)
4438 (uri (git-reference
4439 (url "https://github.com/FiniteSingularity/obs-advanced-masks")
4440 (commit (string-append "v" version))))
4441 (file-name (git-file-name name version))
4442 (sha256
4443 (base32 "1llmz42y2m2gpm1bp48dybi7iv4vafl7ya3rb259798ikwzva3fm"))
4444 (patches (search-patches "obs-advanced-masks-nlohmann-json.patch"))))
4445 (build-system cmake-build-system)
4446 (arguments
4447 (list
4448 #:modules '((guix build cmake-build-system)
4449 (guix build utils))
4450 #:tests? #f ;no tests
4451 #:configure-flags
4452 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4453 #$(this-package-input "obs") "/lib")
4454 "-DBUILD_OUT_OF_TREE=On" "-Wno-dev")))
4455 (inputs (list curl
4456 obs
4457 nlohmann-json
4458 qtbase
4459 qtsvg
4460 simde))
4461 (home-page "https://github.com/FiniteSingularity/obs-advanced-masks")
4462 (synopsis "Advanced masking plugin for OBS")
4463 (description
4464 "OBS Advanced Masks is a project designed to expand the
4465masking functionalities within OBS Studio. This plug-in provides filters for
4466users to create intricate and customized masks for their OBS Scenes and
4467Sources.
4468
4469@itemize
4470@item Advanced Masks provides both Alpha Masking and Adjustment Masking.
4471@item Shape masks allow for dynamically generated Rectangle, Circle,
4472Elliptical, Regular Polygon, Star, and Heart shaped masks, with many
4473adjustable parameters.
4474@item Source Masks allow an existing OBS source to be used as a mask, using
4475any combination of the red, green, blue, or alpha channels from said source.
4476@item Image Masks include all of the same functionality as Source Masks, but
4477applied via a static image (.png, .jpeg, etc).
4478@item Gradient Masks allow a fading mask using a user-specified gradient.
4479@end itemize
4480")
4481 (license license:gpl2)))
4482
4483(define-public obs-advanced-scene-switcher
4484 (package
4485 (name "obs-advanced-scene-switcher")
4486 (version "1.32.7")
4487 (source
4488 (origin
4489 (method url-fetch)
4490 (uri (string-append
4491 "https://github.com/WarmUpTill/SceneSwitcher/releases/download/"
4492 version "/advanced-scene-switcher-" version "-source.tar.xz"))
4493 (sha256
4494 (base32
4495 "15r4ck2agzhjzjkmczs3ag36km32axcjsz0m57yh568b3nrcxmj3"))
4496 (modules '((guix build utils)))
4497 ;; FIXME: [email protected] and jsoncons could be unbundled
4498 ;; cpp-httplib is too old to unbundle
4499 (snippet #~(begin
4500 (delete-file-recursively ".ccache")
4501 (delete-file-recursively "deps/asio")
4502 (delete-file-recursively "deps/cpp-httplib")
4503 (delete-file-recursively "deps/date")
4504 (delete-file-recursively "deps/json")
4505 (delete-file-recursively "deps/leptonica")
4506 (delete-file-recursively "deps/libusb")
4507 (delete-file-recursively "deps/exprtk")
4508 (delete-file-recursively "deps/obs-websocket")
4509 (delete-file-recursively "deps/opencv")
4510 ;;Arch package says openvr is only used on Windows
4511 (delete-file-recursively "deps/openvr")
4512 (delete-file-recursively "deps/paho.mqtt.cpp")
4513 (delete-file-recursively "deps/tesseract")
4514 (delete-file-recursively "deps/websocketpp")))))
4515 (build-system cmake-build-system)
4516 (arguments
4517 (list
4518 #:tests? #f ;no tests
4519 #:generator "Ninja"
4520 #:configure-flags
4521 #~(list "-DBUILD_OUT_OF_TREE=ON" "-Wno-dev")))
4522 (native-inputs (list asio-1.28
4523 date
4524 libxtst
4525 libx11
4526 nlohmann-json
4527 pkg-config))
4528 (inputs (list curl
4529 cpp-httplib
4530 exprtk
4531 leptonica
4532 libxscrnsaver
4533 obs
4534 openssl ;Arch pkg says used by Twitch
4535 opencv
4536 procps
4537 qtbase
4538 simde
4539 websocketpp))
4540 (home-page "https://github.com/WarmUpTill/SceneSwitcher")
4541 (synopsis "This plugin automates actions in OBS")
4542 (description "An OBS plugin that can automate almost anything through
4543macros. Originally, for switching between @code{Scenes} depending on a
4544condition, it's capable of much more. Macros are created with a condition,
4545when the condition takes places an action runs which can be anything from
4546switching to a specified @code{Scene} to changing the volume.")
4547 (license license:gpl2)))
4548
4549(define-public obs-branch-output
4550 (package
4551 (name "obs-branch-output")
4552 (version "1.0.7")
4553 (source
4554 (origin
4555 (method url-fetch)
4556 (uri (string-append
4557 "https://github.com/OPENSPHERE-Inc/branch-output/releases/download/"
4558 version "/osi-branch-output-" version "-source.tar.xz"))
4559 (sha256
4560 (base32
4561 "01ijh6hyp7x2gn83y2rjyaqbgcjar5p5fnaw35k7kanxdg2awzn7"))))
4562 (build-system cmake-build-system)
4563 (arguments
4564 (list
4565 #:tests? #f ;no tests
4566 #:generator "Ninja"
4567 #:configure-flags
4568 #~(list "-DBUILD_OUT_OF_TREE=ON" "-Wno-dev")))
4569 (inputs (list obs qtbase simde))
4570 (home-page "https://github.com/OPENSPHERE-Inc/branch-output")
4571 (synopsis "This OBS plugin can record individual sources and scenes")
4572 (description "An OBS plugin to record or stream individual OBS
4573@code{sources} or @code{scenes}. It's an alternative to the
4574@command{Source Record} plugin, but more focused on streaming. The plugin can
4575be used to simultaneously stream to multiple platforms, or to record
4576@code{sources} to different files providing flexibility during editing.")
4577 (license license:gpl2)))
4578
4579(define-public obs-composite-blur
4580 (package
4581 (name "obs-composite-blur")
4582 (version "1.5.2")
4583 (source (origin
4584 (method git-fetch)
4585 (uri (git-reference
4586 (url "https://github.com/FiniteSingularity/obs-composite-blur")
4587 (commit (string-append "v" version))))
4588 (file-name (git-file-name name version))
4589 (sha256
4590 (base32
4591 "0y0g75q3vvvw9bciwh8qlz711x1qlpbph9g6hfmwk4v25in3sgn1"))))
4592 (build-system cmake-build-system)
4593 (arguments
4594 (list
4595 #:modules '((guix build cmake-build-system)
4596 (guix build utils))
4597 #:tests? #f ;no tests
4598 #:configure-flags
4599 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4600 #$(this-package-input "obs") "/lib")
4601 "-DBUILD_OUT_OF_TREE=On"
4602 "-Wno-dev")))
4603 (inputs (list obs qtbase simde))
4604 (home-page "https://github.com/FiniteSingularity/obs-composite-blur")
4605 (synopsis "Different blur algorithms for OBS")
4606 (description "Composite Blur Plugin is a comprehensive blur plugin that
4607provides blur algorithms and types for all levels of quality and computational
4608need.
4609
4610@itemize
4611@item Composite Blur provides several highly optimized blur algorithms
4612including Gaussian, Multi-Pass Box, Dual Kawase, and Pixelate.
4613@item Composite Blur provides multiple blur effects to give a different look
4614and feel to the blur including Area, Directional, Zoom, Motion, and
4615Tilt-Shift.
4616@item Composite Blur also allows setting a Background Source so that it can
4617properly composite blurred masks, allowing you to properly layer blurred
4618sources.
4619@item Finally, Composite Blur provides an option to mask where and how much
4620blurring occurs on the source via Crop, Rectangle, Circle, Source, and Image
4621masks.
4622@end itemize\n")
4623 (license license:gpl2)))
4624
4625(define-public obs-downstream-keyer
4626 (package
4627 (name "obs-downstream-keyer")
4628 (version "0.4.4")
4629 (source
4630 (origin
4631 (method git-fetch)
4632 (uri (git-reference
4633 (url "https://github.com/exeldro/obs-downstream-keyer")
4634 (commit version)))
4635 (file-name (git-file-name name version))
4636 (sha256
4637 (base32
4638 "0rm5plc9bblzlpyiwgbw68ypsr1gihgi1msxhj74k4b07qhldr2d"))))
4639 (build-system cmake-build-system)
4640 (arguments
4641 (list
4642 #:tests? #f ;no tests
4643 #:generator "Ninja"
4644 #:configure-flags
4645 #~(list "-DBUILD_OUT_OF_TREE=ON" "-Wno-dev")))
4646 (inputs (list obs qtbase simde))
4647 (home-page "https://github.com/exeldro/obs-downstream-keyer")
4648 (synopsis "Plugin for OBS that adds a Downstream Keyer dock")
4649 (description "The Downstream Keyer can add a @code{Scene} to all output,
4650appearing as an overlay in front of all other content. Effectively, it creates
4651a global @code{Scene} which exists on all @code{Scenes}. The Downstream Keyer
4652plugin can be used for any global elements that should be in all @code{Scenes}
4653such as logos, lower thirds or anything done through a Nested Scene.")
4654 (license license:gpl2)))
4655
4656(define-public obs-gradient-source
4657 (package
4658 (name "obs-gradient-source")
4659 (version "0.3.3")
4660 (source (origin
4661 (method git-fetch)
4662 (uri (git-reference
4663 (url "https://github.com/exeldro/obs-gradient-source")
4664 (commit version)))
4665 (file-name (git-file-name name version))
4666 (sha256
4667 (base32
4668 "18wxjjn9hgkj74wc1wlfs8nm0i4a931mm80s3rq07v3blsyx7lv3"))))
4669 (build-system cmake-build-system)
4670 (arguments
4671 (list
4672 #:modules '((guix build cmake-build-system)
4673 (guix build utils))
4674 #:tests? #f ;no tests
4675 #:configure-flags
4676 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4677 #$(this-package-input "obs") "/lib")
4678 "-DBUILD_OUT_OF_TREE=On"
4679 "-Wno-dev")))
4680 (inputs (list obs qtbase simde))
4681 (home-page "https://github.com/exeldro/obs-gradient-source")
4682 (synopsis "Plugin for adding a gradient Source to OBS Studio")
4683 (description "This package provides a plugin for adding a gradient Source
4684to OBS Studio.")
4685 (license license:gpl2)))
4686
4687(define-public obs-looking-glass
4688 (package
4689 (name "obs-looking-glass")
4690 (version "B7")
4691 (source (origin
4692 (method url-fetch)
4693 (uri (string-append "https://looking-glass.io/artifact/" version
4694 "/source"))
4695 (file-name (string-append name "-" version ".tar.gz"))
4696 (sha256
4697 (base32
4698 "11crsvy783ig7kzmr2cr68wv9zsjkcbp1akcs28rc6yc1ik0dr89"))))
4699 (build-system cmake-build-system)
4700 (arguments
4701 (list
4702 #:tests? #f ; no test target
4703 #:make-flags #~(list "CC=gcc")
4704 #:configure-flags
4705 #~(list "-DGLOBAL_INSTALLATION=ON"
4706 "-DUSE_CMAKE_LIBDIR=ON"
4707 (string-append "-DOBS_PLUGIN_PREFIX="
4708 #$output "/lib/obs-plugins"))
4709 #:phases
4710 #~(modify-phases %standard-phases
4711 (add-before 'configure 'chdir-to-source
4712 (lambda* (#:key outputs #:allow-other-keys)
4713 (chdir "obs")
4714 #t))
4715 (add-after 'chdir-to-source 'substitute-output
4716 (lambda* (#:key outputs #:allow-other-keys)
4717 (substitute* "CMakeLists.txt"
4718 (("\\$\\{OBS_PLUGIN_PREFIX\\}/\\$\\{CMAKE_PROJECT_NAME\\}/bin/\\$\\{OBS_PLUGIN_DIR\\}")
4719 (string-append (string-append #$output "/lib/obs-plugins"))))
4720 #t)))))
4721 (native-inputs (list libconfig nettle pkg-config))
4722 (inputs
4723 (list bash-minimal
4724 fontconfig
4725 freetype
4726 glu
4727 gmp
4728 libglvnd
4729 libiberty
4730 libx11
4731 libxcursor
4732 libxfixes
4733 libxi
4734 libxinerama
4735 libxkbcommon
4736 libxpresent
4737 libxrandr
4738 libxscrnsaver
4739 mesa
4740 obs
4741 openssl
4742 sdl2
4743 sdl2-ttf
4744 simde
4745 spice-protocol
4746 wayland
4747 wayland-protocols
4748 `(,zlib "static")))
4749 (home-page "https://looking-glass.io/")
4750 (synopsis "Looking Glass video feed to OBS as a video source")
4751 (description "This OBS plugin allows a Looking Glass video feed to OBS as
4752a video source with the included OBS plugin. This provides a lower-latency
4753alternative to capturing the Looking Glass client window with a Screen or
4754Window Capture source.
4755
4756This may help improve your viewers watching experience, and allows you to use
4757your host privately.")
4758 (license license:gpl2+)))
4759
4760(define-public kvmfr-linux-module
4761 (package
4762 (name "kvmfr-linux-module")
4763 (version "B7")
4764 (source (origin
4765 (method url-fetch)
4766 (uri (string-append "https://looking-glass.io/artifact/" version
4767 "/source"))
4768 (file-name (string-append name "-" version ".tar.gz"))
4769 (sha256
4770 (base32
4771 "11crsvy783ig7kzmr2cr68wv9zsjkcbp1akcs28rc6yc1ik0dr89"))))
4772 (build-system linux-module-build-system)
4773 (inputs (list bash-minimal))
4774 (arguments
4775 (list
4776 #:tests? #f ;there are none.
4777 #:source-directory "module"))
4778 (home-page "https://looking-glass.io/")
4779 (synopsis
4780 "Linux Kernel module to interface with Looking Glass")
4781 (description
4782 "This kernel module implements a basic interface to the IVSHMEM device for
4783Looking Glass.")
4784 (license license:gpl2+)))
4785
4786(define-public obs-move-transition
4787 (package
4788 (name "obs-move-transition")
4789 (version "3.2.0")
4790 (source
4791 (origin
4792 (method url-fetch)
4793 (uri (string-append
4794 "https://github.com/exeldro/obs-move-transition/releases/download/"
4795 version "/move-transition-" version "-source.tar.xz"))
4796 (sha256
4797 (base32 "19p074vynv3a7zp97gck9chglryp15vybcs31an6bz8900bcz0qp"))))
4798 (build-system cmake-build-system)
4799 (arguments
4800 (list
4801 #:modules '((guix build cmake-build-system)
4802 (guix build utils))
4803 #:tests? #f ;no tests
4804 #:configure-flags
4805 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4806 #$(this-package-input "obs") "/lib")
4807 "-DBUILD_OUT_OF_TREE=On" ;build outside of OBS source tree
4808 "-Wno-dev")))
4809 (inputs (list obs qtbase simde))
4810 (home-page "https://github.com/exeldro/obs-move-transition")
4811 (synopsis "Move transition for OBS Studio")
4812 (description "Plugin for OBS Studio to move source to a new position
4813during scene transition.")
4814 (license license:gpl2)))
4815
4816(define-public obs-multi-rtmp
4817 (package
4818 (name "obs-multi-rtmp")
4819 (version "0.7.3.2")
4820 (source
4821 (origin
4822 (method git-fetch)
4823 (uri (git-reference
4824 (url "https://github.com/sorayuki/obs-multi-rtmp")
4825 (commit version)))
4826 (file-name (git-file-name name version))
4827 (sha256
4828 (base32
4829 "0bsj79nmvvr76q91qr2al34in1l0p2dk177il97ylkxc9r9lkn3r"))))
4830 (build-system cmake-build-system)
4831 (arguments
4832 (list
4833 #:tests? #f ;no tests
4834 #:generator "Ninja"
4835 #:configure-flags
4836 #~(list "-DENABLE_QT=ON" ;won't build with OFF
4837 "-DENABLE_FRONTEND_API=OFF" "-Wno-dev")))
4838 (inputs (list obs qtbase qtsvg simde))
4839 (home-page "https://github.com/sorayuki/obs-multi-rtmp")
4840 (synopsis "Multi-site simultaneous broadcast plugin for OBS Studio")
4841 (description
4842 "This is a plugin to streaming to multiple RTMP servers concurrently.
4843It's able to share encoders with main output of OBS to save CPU power.
4844It can also use standalone encoders with basic configuration (bitrate).")
4845 (license license:gpl2)))
4846
4847(define-public obs-pipewire-audio-capture
4848 (package
4849 (name "obs-pipewire-audio-capture")
4850 (version "1.2.1")
4851 (source
4852 (origin
4853 (method git-fetch)
4854 (uri (git-reference
4855 (url "https://github.com/dimtpap/obs-pipewire-audio-capture")
4856 (commit version)))
4857 (file-name (git-file-name name version))
4858 (sha256
4859 (base32 "092xv2azqs85lxnggx7q71ch0l5jbnay0737x1xhz99azf0fidqs"))))
4860 (build-system cmake-build-system)
4861 (arguments
4862 (list
4863 #:tests? #f ;no test target
4864 #:configure-flags
4865 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4866 #$(this-package-input "obs") "/lib")
4867 "-DBUILD_OUT_OF_TREE=On" "-Wno-dev")))
4868 (native-inputs (list libconfig pkg-config))
4869 (inputs (list obs pipewire wireplumber simde))
4870 (home-page
4871 "https://obsproject.com/forum/resources/pipewire-audio-capture.1458/")
4872 (synopsis
4873 "Audio device and application capture for OBS Studio using PipeWire")
4874 (description "This plugin adds 3 sources for capturing audio outputs,
4875inputs and applications using PipeWire.")
4876 (license license:gpl2+)))
4877
4878(define-public obs-shaderfilter
4879 (package
4880 (name "obs-shaderfilter")
4881 (version "2.6.0")
4882 (source
4883 (origin
4884 (method git-fetch)
4885 (uri (git-reference
4886 (url "https://github.com/exeldro/obs-shaderfilter")
4887 (commit version)))
4888 (file-name (git-file-name name version))
4889 (sha256
4890 (base32 "0cxk8aiiiamhg8r0rzv8lihrzjiid2g03ib68dn6xmskr367dhs0"))))
4891 (build-system cmake-build-system)
4892 (arguments
4893 (list
4894 #:modules '((guix build cmake-build-system)
4895 (guix build utils))
4896 #:tests? #f ;no tests
4897 #:configure-flags
4898 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4899 #$(this-package-input "obs") "/lib")
4900 "-DBUILD_OUT_OF_TREE=On" "-Wno-dev")))
4901 (inputs (list obs qtbase-5 simde))
4902 (home-page "https://github.com/exeldro/obs-shaderfilter")
4903 (synopsis "OBS filter for applying an arbitrary shader to a source")
4904 (description
4905 "Plugin for OBS Studio which is intended to allow users to
4906apply their own shaders to OBS sources. This theoretically makes possible
4907some simple effects like drop shadows that can be implemented strictly in
4908shader code.")
4909 (license license:gpl2)))
4910
4911(define-public obs-source-clone
4912 (package
4913 (name "obs-source-clone")
4914 (version "0.2.1")
4915 (source
4916 (origin
4917 (method git-fetch)
4918 (uri (git-reference
4919 (url "https://github.com/exeldro/obs-source-clone")
4920 (commit version)))
4921 (file-name (git-file-name name version))
4922 (sha256
4923 (base32 "1njm2gv26ygm38lkq7sig8nl7mib47f1nm636n03nmy0pcbx7pr2"))))
4924 (build-system cmake-build-system)
4925 (arguments
4926 (list
4927 #:modules '((guix build cmake-build-system)
4928 (guix build utils))
4929 #:tests? #f ;no tests
4930 #:configure-flags
4931 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4932 #$(this-package-input "obs") "/lib")
4933 "-DBUILD_OUT_OF_TREE=On" "-Wno-dev")))
4934 (inputs (list obs qtbase simde))
4935 (home-page "https://github.com/exeldro/obs-source-clone")
4936 (synopsis "Plugin for OBS Studio to clone sources")
4937 (description "Add source to OBS that lets you clone sources to allow
4938different filters than the original.")
4939 (license license:gpl2)))
4940
4941(define-public obs-source-copy
4942 (package
4943 (name "obs-source-copy")
4944 (version "0.3.0")
4945 (source
4946 (origin
4947 (method url-fetch)
4948 (uri (string-append
4949 "https://github.com/exeldro/obs-source-copy/releases/download/"
4950 version "/source-copy-" version "-source.tar.xz"))
4951 (sha256
4952 (base32 "0zr1yayzd4x3m108ji9c4xs7d7bavbz2hr81782l25kfhv3ry9f7"))))
4953 (build-system cmake-build-system)
4954 (arguments
4955 (list
4956 #:tests? #f ;no tests
4957 #:configure-flags
4958 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4959 #$(this-package-input "obs") "/lib")
4960 "-DBUILD_OUT_OF_TREE=On" "-Wno-dev")))
4961 (inputs (list obs qtbase simde))
4962 (home-page "https://github.com/exeldro/obs-source-copy")
4963 (synopsis "OBS plugin for copy and paste scenes, sources and filters")
4964 (description "This package provides an OBS plugin for copy and paste
4965scenes, sources and filters.")
4966 (license license:gpl2)))
4967
4968(define-public obs-source-record
4969 (package
4970 (name "obs-source-record")
4971 (version "0.4.6")
4972 (source
4973 (origin
4974 (method git-fetch)
4975 (uri (git-reference
4976 (url "https://github.com/exeldro/obs-source-record")
4977 (commit version)))
4978 (file-name (git-file-name name version))
4979 (sha256
4980 (base32 "1z762w7didd4m1n2b6wb26jywv1hipxw8z8wnnsq45zlv5kwnlws"))))
4981 (build-system cmake-build-system)
4982 (arguments
4983 (list
4984 #:tests? #f ;no tests
4985 #:configure-flags
4986 #~(list (string-append "-DLIBOBS_INCLUDE_DIR="
4987 #$(this-package-input "obs") "/lib")
4988 "-DBUILD_OUT_OF_TREE=On" "-Wno-dev")))
4989 (inputs (list obs simde))
4990 (home-page "https://github.com/exeldro/obs-source-record")
4991 (synopsis "OBS plugin for recording sources via a filter")
4992 (description "This package provides an OBS plugin for recording sources
4993via a filter.")
4994 (license license:gpl2)))
4995
4996(define-public obs-stroke-glow-shadow
4997 (package
4998 (name "obs-stroke-glow-shadow")
4999 (version "1.5.3")
5000 (source
5001 (origin
5002 (method git-fetch)
5003 (uri (git-reference
5004 (url
5005 "https://github.com/FiniteSingularity/obs-stroke-glow-shadow")
5006 (commit (string-append "v" version))))
5007 (file-name (git-file-name name version))
5008 (sha256
5009 (base32
5010 "1niiad93kh27vazqb9w95gvki1mraiyn6z6xwzg36czssrcpmcrx"))))
5011 (build-system cmake-build-system)
5012 (arguments
5013 (list
5014 #:tests? #f ;no tests
5015 #:generator "Ninja"
5016 #:configure-flags
5017 #~(list "-DBUILD_OUT_OF_TREE=ON" "-Wno-dev")))
5018 (inputs (list obs simde))
5019 (home-page "https://github.com/exeldro/obs-source-record")
5020 (synopsis "This OBS plugin provides stroke, glow and shadow effects")
5021 (description
5022 "This OBS plugin provides a stroke, glow and shadow effect
5023when applied to an OBS source. It's often used with the Advanced Mask plugin
5024to place drop shadows on sources, such as a webcam.")
5025 (license license:gpl2)))
5026
5027(define-public obs-wlrobs
5028 (package
5029 (name "obs-wlrobs")
5030 (version "1.2")
5031 (source
5032 (origin
5033 (method url-fetch)
5034 (uri (string-append "https://hg.sr.ht/~scoopta/wlrobs/archive/v"
5035 version ".tar.gz"))
5036 (file-name (string-append name "-" version ".tar.gz"))
5037 (sha256
5038 (base32 "1xn0jgkgpw3qpngr8111cdlymihqgzlf08ssz8j5mszrm1npkdq4"))))
5039 (build-system meson-build-system)
5040 (native-inputs (list pkg-config))
5041 (inputs (list libx11 obs simde wayland wayland-protocols))
5042 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
5043 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
5044 (description
5045 "This OBS plugin allows you to capture the screen on wlroots-based
5046Wayland compositors.")
5047 (license license:gpl3+)))
5048
5049(define-public obs-vkcapture
5050 (package
5051 (name "obs-vkcapture")
5052 (version "1.5.3")
5053 (source
5054 (origin
5055 (method git-fetch)
5056 (uri (git-reference
5057 (url "https://github.com/nowrep/obs-vkcapture")
5058 (commit (string-append "v" version))))
5059 (file-name (git-file-name name version))
5060 (sha256
5061 (base32 "14mmmylfjyx60xqfvr4izfkzgwr08ngyj0409g5g6l970rzvpdnf"))))
5062 (build-system cmake-build-system)
5063 (arguments
5064 '(#:tests? #f)) ;no tests
5065 (native-inputs (list pkg-config))
5066 (inputs (list mesa
5067 obs
5068 libx11
5069 libxcb
5070 simde
5071 vulkan-headers
5072 vulkan-loader
5073 wayland))
5074 (home-page "https://github.com/nowrep/obs-vkcapture")
5075 (synopsis "OBS plugin for Vulkan/OpenGL game capture on Linux")
5076 (description
5077 "This OBS plugin lets you record an OpenGL or Vulkan
5078game by adding the Game Capture source to your scene and starting an
5079application with @code{obs-gamecapture}.")
5080 (license license:gpl2)))
5081
5082(define-public libvdpau
5083 (package
5084 (name "libvdpau")
5085 (version "1.5")
5086 (source
5087 (origin
5088 (method git-fetch)
5089 (uri (git-reference
5090 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
5091 (commit version)))
5092 (file-name (git-file-name name version))
5093 (sha256
5094 (base32
5095 "1zfbh5q9adzlydpgwq7hl5w1j2b29j7zns6dxf9fp9pvkj23fz5l"))))
5096 (build-system meson-build-system)
5097 (native-inputs
5098 (list pkg-config))
5099 (inputs
5100 (list `(,libx11 "out") libxext xorgproto))
5101 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
5102 (synopsis "Video Decode and Presentation API")
5103 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
5104provides an interface to video decode acceleration and presentation hardware
5105present in modern GPUs.")
5106 (license (license:x11-style "file://COPYING"))))
5107
5108(define-public vdpauinfo
5109 (package
5110 (name "vdpauinfo")
5111 (version "1.5")
5112 (source
5113 (origin
5114 (method git-fetch)
5115 (uri (git-reference
5116 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
5117 (commit version)))
5118 (file-name (git-file-name name version))
5119 (sha256
5120 (base32 "01nkk8rixzvicrg0cr90mbxyd4vdyd0739ipywn0mx56xddambmx"))))
5121 (build-system gnu-build-system)
5122 (arguments
5123 `(#:phases
5124 (modify-phases %standard-phases
5125 (replace 'bootstrap
5126 ;; ./autogen.sh runs ./configure too soon.
5127 (lambda _
5128 (invoke "autoreconf" "-fiv"))))))
5129 (native-inputs
5130 (list autoconf automake libx11 pkg-config))
5131 (propagated-inputs
5132 (list libvdpau))
5133 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
5134 (synopsis "Tool to query the capabilities of a VDPAU implementation")
5135 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
5136implementation.")
5137 (license (license:x11-style "file://COPYING"))))
5138
5139(define-public libvdpau-va-gl
5140 (package
5141 (name "libvdpau-va-gl")
5142 (version "0.4.2")
5143 (source
5144 (origin
5145 (method url-fetch)
5146 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
5147 "releases/download/v" version "/libvdpau-va-gl-"
5148 version ".tar.gz"))
5149 (sha256
5150 (base32
5151 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
5152 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
5153 (modules '((guix build utils)))
5154 (snippet '(begin (delete-file-recursively "3rdparty")
5155 #t))))
5156 (build-system cmake-build-system)
5157 (arguments
5158 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
5159 (native-inputs
5160 (list libvdpau pkg-config))
5161 (inputs
5162 (list libva mesa))
5163 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
5164 (synopsis "VDPAU driver with VA-API/OpenGL backend")
5165 (description
5166 "Many applications can use VDPAU to accelerate portions of the video
5167decoding process and video post-processing to the GPU video hardware. Since
5168there is no VDPAU available on Intel chips, they fall back to different drawing
5169techniques. This driver uses OpenGL under the hood to accelerate drawing and
5170scaling and VA-API (if available) to accelerate video decoding.")
5171 (license license:expat)))
5172
5173(define-public recordmydesktop
5174 (package
5175 (name "recordmydesktop")
5176 (version "0.4.0")
5177 (source (origin
5178 (method url-fetch)
5179 (uri (string-append "https://github.com/Enselic/"
5180 name "/releases/download/v" version
5181 "/recordmydesktop-" version ".tar.gz"))
5182 (sha256
5183 (base32
5184 "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7"))))
5185 (build-system gnu-build-system)
5186 (inputs (list popt
5187 zlib
5188 libx11
5189 libice
5190 libsm
5191 libxfixes
5192 libxdamage
5193 libxext
5194 alsa-lib
5195 libvorbis
5196 libtheora))
5197 (home-page "https://enselic.github.io/recordmydesktop/")
5198 (synopsis "Desktop session video recorder")
5199 (description
5200 "recordMyDesktop is a command-line tool that captures the activity in
5201your graphical desktop and encodes it as a video. This is a useful tool for
5202making @dfn{screencasts}.")
5203 (license license:gpl2+)))
5204
5205(define-public simplescreenrecorder
5206 (package
5207 (name "simplescreenrecorder")
5208 (version "0.4.2")
5209 (source
5210 (origin
5211 (method git-fetch)
5212 (uri (git-reference
5213 (url "https://github.com/MaartenBaert/ssr")
5214 (commit version)))
5215 (file-name (git-file-name name version))
5216 (sha256
5217 (base32
5218 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
5219 (build-system cmake-build-system)
5220 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
5221 ;; README.md, the program builds and functions properly without them.
5222 ;; As a result, they are omitted. Please add them back if problems appear.
5223 (inputs
5224 (list alsa-lib
5225 ffmpeg-4
5226 glu
5227 jack-1
5228 libxi
5229 libxinerama
5230 pulseaudio
5231 qtbase-5
5232 qtx11extras))
5233 (native-inputs (list pkg-config))
5234 (arguments
5235 `(#:configure-flags
5236 (list "-DWITH_QT5=TRUE")
5237 #:tests? #f)) ; no test suite
5238 ;; Using HTTPS causes part of the page to be displayed improperly.
5239 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
5240 (synopsis "Screen recorder")
5241 (description "SimpleScreenRecorder is an easy to use screen recorder with
5242a graphical user interface. It supports recording the entire screen, or a
5243part of it, and allows encoding in many different codecs and file formats.
5244Other features include a live preview and live streaming.")
5245 (license (list license:gpl3+ ; most files
5246 license:zlib ; glinject/elfhacks.*
5247 license:isc ; glinject/*
5248 license:x11)))) ; build-aux/install-sh
5249
5250(define-public libsmpeg
5251 (package
5252 (name "libsmpeg")
5253 (version "0.4.5-401")
5254 (source (origin
5255 (method svn-fetch)
5256 (uri (svn-reference
5257 (url "svn://svn.icculus.org/smpeg/trunk/")
5258 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
5259 (file-name (string-append name "-" version "-checkout"))
5260 (sha256
5261 (base32
5262 "1srzyjks9s0g4k7ms8vc0hjby2g6shndnr552hl63pn90sgmwxs9"))))
5263 (build-system gnu-build-system)
5264 (arguments
5265 ;; libsmpeg fails to build with -std=c++11, which is the default with
5266 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
5267 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
5268 (native-inputs
5269 (list autoconf automake))
5270 (inputs
5271 `(("sdl" ,sdl2)))
5272 (home-page "https://icculus.org/smpeg/")
5273 (synopsis "SDL MPEG decoding library")
5274 (description
5275 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
5276with sound support. Video playback is based on the ubiquitous Berkeley MPEG
5277player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
5278library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
5279and MPEG system streams.")
5280 (license (list license:expat
5281 license:lgpl2.1
5282 license:lgpl2.1+
5283 license:gpl2))))
5284
5285;; for btanks
5286(define-public libsmpeg-with-sdl1
5287 (package (inherit libsmpeg)
5288 (name "libsmpeg")
5289 (version "0.4.5-399")
5290 (source (origin
5291 (method svn-fetch)
5292 (uri (svn-reference
5293 (url "svn://svn.icculus.org/smpeg/trunk/")
5294 (revision 399))) ; tagged release 0.4.5
5295 (file-name (string-append name "-" version "-checkout"))
5296 (sha256
5297 (base32
5298 "1jy9xqykhwfg8in0fxjcqcvwazii1ckzs39wp749b926q7ny5bwy"))))
5299 (inputs
5300 (list sdl))))
5301
5302(define-public libbdplus
5303 (package
5304 (name "libbdplus")
5305 (version "0.2.0")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
5310 version "/" name "-" version ".tar.bz2"))
5311 (sha256
5312 (base32 "0n0ayjq2ld7lfhrfcdj9bam96m2hih34phyjan8nwggkmqzflgmr"))))
5313 (build-system gnu-build-system)
5314 (inputs
5315 (list libgcrypt))
5316 (home-page "https://www.videolan.org/developers/libbdplus.html")
5317 (synopsis "Library for decrypting certain Blu-Ray discs")
5318 (description "libbdplus is a library which implements the BD+ System
5319specifications.")
5320 (license license:lgpl2.1+)))
5321
5322(define-public libaacs
5323 (package
5324 (name "libaacs")
5325 (version "0.11.1")
5326 (source
5327 (origin
5328 (method url-fetch)
5329 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
5330 version "/libaacs-" version ".tar.bz2"))
5331 (sha256
5332 (base32 "0f8ax9dp49mrm1484bl2df659b34xyrjmngzmvvpg2n9wkms12m8"))))
5333 (inputs
5334 (list libgcrypt))
5335 (native-inputs
5336 (list bison flex))
5337 (build-system gnu-build-system)
5338 (arguments (list #:configure-flags #~(list "--disable-static")))
5339 (home-page "https://www.videolan.org/developers/libaacs.html")
5340 (synopsis "Library for decrypting certain Blu-Ray discs")
5341 (description "libaacs is a library which implements the Advanced Access
5342Content System specification.")
5343 (license license:lgpl2.1+)))
5344
5345;;; Custom ffmpeg package used by Handbrake, which incorporates custom
5346;;; patches. Modification include APIs that have not been upstreamed.
5347(define ffmpeg-handbrake
5348 (let ((ffmpeg ffmpeg))
5349 (hidden-package
5350 (package
5351 (inherit ffmpeg)
5352 (version "7.1.1")
5353 (source
5354 (origin
5355 (method url-fetch)
5356 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
5357 version ".tar.bz2"))
5358 (sha256
5359 (base32
5360 "1fj3y70cfzh9z33l62zxdb8a2kdvynncn1y09w0ix83r2pqs538c"))
5361 (patches (search-patches "ffmpeg-svt-av1-v3.patch"))))
5362 (inputs (modify-inputs inputs
5363 (append zimg)
5364 (replace "svt-av1" svt-av1-3)))
5365 (arguments
5366 (substitute-keyword-arguments arguments
5367 ((#:configure-flags flags)
5368 #~(append #$flags
5369 (list "--enable-gpl"
5370 "--disable-doc"
5371 "--disable-programs"
5372 "--disable-avdevice"
5373 "--disable-network"
5374 "--disable-postproc"
5375 "--enable-libzimg")))
5376 ((#:phases phases)
5377 #~(modify-phases #$phases
5378 (add-after 'unpack 'apply-handbrake-patches
5379 (lambda _
5380 (mkdir-p "/tmp/handbrake")
5381 (with-directory-excursion "/tmp/handbrake"
5382 (invoke "tar" "xf" #$(package-source handbrake)
5383 (string-append "HandBrake-"
5384 #$(package-version handbrake)
5385 "/contrib/ffmpeg")))
5386 (for-each
5387 (lambda (patch)
5388 (invoke "patch" "--force" "--no-backup-if-mismatch"
5389 "-p1" "--input" patch))
5390 (find-files "/tmp/handbrake" "\\.patch$"))))))))))))
5391
5392;;; Custom x265 package used by Handbrake, which incorporates custom patches.
5393;;; Modification include APIs that have not been upstreamed.
5394(define x265-handbrake
5395 (let ((x265 x265-4))
5396 (hidden-package
5397 (package
5398 (inherit x265)
5399 (arguments
5400 (substitute-keyword-arguments arguments
5401 ((#:phases phases)
5402 #~(modify-phases #$phases
5403 (add-after 'unpack 'apply-handbrake-patches
5404 (lambda _
5405 (let ((patchdir "/tmp/hanbrake"))
5406 (mkdir-p patchdir)
5407 (with-directory-excursion patchdir
5408 (invoke "tar" "xf" #$(package-source handbrake)
5409 (string-append "HandBrake-"
5410 #$(package-version handbrake)
5411 "/contrib/x265")))
5412 (for-each
5413 (lambda (patch)
5414 (unless (or (string-suffix?
5415 "A06-Update-version-strings.patch"
5416 patch)
5417 (string-suffix?
5418 "A08-Fix-inconsistent-bitrate-in-second-pass.patch"
5419 patch))
5420 (invoke "patch" "--force" "--no-backup-if-mismatch"
5421 "-p1" "--input" patch)))
5422 (find-files patchdir "\\.patch$")))))))))))))
5423
5424(define-public gmmlib
5425 (package
5426 (name "gmmlib")
5427 (version "22.10.2")
5428 (source
5429 (origin
5430 (method git-fetch)
5431 (uri (git-reference
5432 (url "https://github.com/intel/gmmlib")
5433 (commit (string-append "intel-gmmlib-" version))))
5434 (file-name (git-file-name name version))
5435 (sha256
5436 (base32 "1yyykcmsd8n4wyj8g750rhygkgrbxjkirf3lzknkac5gdsavs59y"))))
5437 (build-system cmake-build-system)
5438 (home-page "https://github.com/intel/gmmlib")
5439 (synopsis "Intel Graphics Memory Management Library")
5440 (description
5441 "GmmLib provides device-specific and buffer management for the Intel
5442Graphics Compute Runtime for OpenCL and the Intel Media Driver for +VAAPI. It
5443is used by Intel's OpenCL and oneAPI Level Zero compute runtime
5444(intel-compute-runtime/NEO) as well as its media and 3D drivers.")
5445 (license license:expat)))
5446
5447(define-public handbrake
5448 (package
5449 (name "handbrake")
5450 (version "1.10.2")
5451 (source (origin
5452 (method url-fetch)
5453 (uri (string-append "https://github.com/HandBrake/HandBrake/"
5454 "releases/download/" version "/"
5455 "HandBrake-" version "-source.tar.bz2"))
5456 (sha256
5457 (base32
5458 "1nzqlpzgmkzs85c9lglqxj2z27p7c26w54kv20j6rhygz321qpn6"))
5459 (modules '((guix build utils)))
5460 (snippet
5461 '(begin
5462 (for-each delete-file-recursively
5463 ;; Remove source not needed for building/running
5464 ;; under a GNU environment.
5465 '("macosx" "win")))))) ; 11MiB, 5.9MiB resp.
5466 (build-system glib-or-gtk-build-system)
5467 (native-inputs
5468 (list autoconf
5469 automake
5470 intltool
5471 libtool
5472 meson
5473 ninja
5474 pkg-config
5475 python)) ; For configuration
5476 (inputs
5477 (list bzip2
5478 dav1d
5479 dbus-glib
5480 ffmpeg-handbrake
5481 fontconfig
5482 freetype
5483 glib
5484 gstreamer
5485 gst-plugins-base
5486 gtk
5487 jansson
5488 lame
5489 libass
5490 libbluray
5491 libdvdnav
5492 libdvdread
5493 libgudev
5494 libjpeg-turbo
5495 libmpeg2
5496 libnotify
5497 libogg
5498 libsamplerate
5499 libtheora
5500 libvorbis
5501 libvpx
5502 libxml2
5503 libx264
5504 numactl
5505 opus
5506 speex
5507 svt-av1-3
5508 x265-handbrake
5509 zimg
5510 zlib))
5511 (arguments
5512 `(#:tests? #f ;tests require Ruby and claim to be unsupported
5513 #:configure-flags
5514 (list "--disable-nvenc"
5515 (string-append "CPPFLAGS=-I"
5516 (assoc-ref %build-inputs "libxml2")
5517 "/include/libxml2")
5518 "LDFLAGS=-lx265")
5519 #:phases
5520 (modify-phases %standard-phases
5521 (add-before 'configure 'relax-reqs
5522 (lambda _
5523 (substitute* "make/configure.py"
5524 ;; cmake is checked for so that it can be used to build
5525 ;; contrib/harfbuzz and contrib/x265, but we get these as
5526 ;; inputs, so don't abort if it's not found. Similarly, meson
5527 ;; and ninja are only needed for contrib/libdav1d, and nasm
5528 ;; only for libvpx
5529 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
5530 (string-append & "False")))))
5531 (replace 'configure
5532 (lambda* (#:key outputs configure-flags #:allow-other-keys)
5533 ;; 'configure' is not an autoconf-generated script, and
5534 ;; errors on unrecognized arguments,
5535 ;; e.g. --enable-fast-install
5536 (let ((out (assoc-ref outputs "out")))
5537 (apply invoke "./configure"
5538 (string-append "--prefix=" out)
5539 (or configure-flags '())))))
5540 (add-after 'configure 'disable-contrib
5541 (lambda _
5542 (begin
5543 (substitute* "make/include/main.defs"
5544 ;; Disable unconditional inclusion of "contrib" libraries
5545 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
5546 ;; which would lead to fetching and building of these
5547 ;; libraries. Use our own instead.
5548 (("MODULES \\+= contrib" &) (string-append "# " &)))
5549 (substitute* "gtk/meson.build"
5550 ;; Disable unconditional inclusion of "contrib" headers
5551 (("^(hb_incdirs = .*),[^,]+'contrib/include'(.*)" _ < >)
5552 (string-append < >))))))
5553 (add-before 'build 'chdir-build
5554 (lambda _ (chdir "./build"))))))
5555 (home-page "https://handbrake.fr")
5556 (synopsis "Video transcoder")
5557 (description
5558 "HandBrake is a tool for converting video from any format to a selection
5559of modern, widely supported codecs.")
5560 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
5561 ;; Combination under GPLv2. See LICENSE.
5562 (license license:gpl2)))
5563
5564(define-public h264bitstream
5565 ;; Used as submodule in https://github.com/moonlight-stream/moonlight-qt
5566 (let ((commit "ae72f7395f328876199a7e928d3b4a6dc6a7ce14")
5567 (revision "1"))
5568 (package
5569 (name "h264bitstream")
5570 (version (git-version "0.2.0" revision commit))
5571 (source (origin
5572 (method git-fetch)
5573 (uri (git-reference
5574 (url "https://github.com/aizvorski/h264bitstream")
5575 (commit commit)))
5576 (file-name (git-file-name name version))
5577 (sha256
5578 (base32
5579 "0pqzfzkgqk5zjh5ywc7l7mffs2vh6wlzssvq2jxildygvqxs3pjp"))))
5580 (build-system gnu-build-system)
5581 (arguments
5582 (list #:tests? #f ;no test suite
5583 #:phases #~(modify-phases %standard-phases
5584 (add-after 'install 'fix-include-bs-h
5585 (lambda _
5586 (symlink (string-append #$output
5587 "/include/h264bitstream/bs.h")
5588 (string-append #$output "/include/bs.h")))))))
5589 (native-inputs (list autoconf automake libtool pkg-config))
5590 (inputs (list ffmpeg))
5591 (synopsis "Library to read and write H.264 video bitstreams")
5592 (description
5593 "This package provides the GameStream code shared between Moonlight clients.")
5594 (home-page "https://github.com/aizvorski/h264bitstream")
5595 (license license:lgpl2.1+))))
5596
5597(define-public intel-media-driver
5598 (package
5599 (name "intel-media-driver")
5600 (version "26.2.0")
5601 (source
5602 (origin
5603 (method git-fetch)
5604 (uri (git-reference
5605 (url "https://github.com/intel/media-driver")
5606 (commit (string-append "intel-media-" version))))
5607 (file-name (git-file-name name version))
5608 (sha256
5609 (base32 "0g27f6xq6ga7bdchj6ffblnwdmhpadqivjiwq7rh5mhmxvjyyf20"))))
5610 (build-system cmake-build-system)
5611 (inputs (list libva gmmlib))
5612 (native-inputs (list pkg-config))
5613 (arguments
5614 (list
5615 #:tests? #f ;Tests are run as part of the normal build step
5616 #:configure-flags
5617 #~(list "-DENABLE_NONFREE_KERNELS=OFF"
5618 (string-append "-DLIBVA_DRIVERS_PATH="
5619 #$output "/lib/dri"))))
5620 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to
5621 ;; add this to all VA-API back ends instead of once to libva.
5622 (native-search-paths
5623 (list (search-path-specification
5624 (variable "LIBVA_DRIVERS_PATH")
5625 (files '("lib/dri")))))
5626 (supported-systems '("i686-linux" "x86_64-linux"))
5627 (home-page "https://github.com/intel/media-driver")
5628 (synopsis "Intel Media Driver for VAAPI")
5629 (description
5630 "This package provides a VA-API user mode driver supporting hardware
5631accelerated decoding, encoding, and video post processing for the GEN based
5632graphics hardware.")
5633 (license (list license:expat license:bsd-3))))
5634
5635(define-public intel-vaapi-driver
5636 (package
5637 (name "intel-vaapi-driver")
5638 (version "2.4.1")
5639 (source
5640 (origin
5641 (method git-fetch)
5642 (uri (git-reference
5643 (url "https://github.com/intel/intel-vaapi-driver")
5644 (commit version)))
5645 (sha256
5646 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
5647 (file-name (git-file-name name version))))
5648 (build-system gnu-build-system)
5649 (native-inputs
5650 (list autoconf automake libtool pkg-config))
5651 (inputs
5652 (list libdrm libva libx11))
5653 (arguments
5654 `(#:phases
5655 (modify-phases %standard-phases
5656 (add-before 'configure 'set-target-directory
5657 (lambda* (#:key outputs #:allow-other-keys)
5658 (let ((out (assoc-ref outputs "out")))
5659 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
5660 #t))))))
5661 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
5662 ;; this to all VA-API back ends instead of once to libva.
5663 (native-search-paths
5664 (list (search-path-specification
5665 (variable "LIBVA_DRIVERS_PATH")
5666 (files '("lib/dri")))))
5667 (supported-systems '("i686-linux" "x86_64-linux"))
5668 (home-page "https://01.org/linuxmedia/vaapi")
5669 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
5670 (description
5671 "This is the @acronym{VA-API, Video Acceleration API} back end required for
5672hardware-accelerated video processing on Intel GEN Graphics devices supported by
5673the i915 driver, such as integrated Intel HD Graphics. It provides access to
5674both hardware and shader functionality for faster encoding, decoding, and
5675post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
5676 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
5677 license:expat)))) ; the rest, excluding the test suite
5678
5679(define-public openh264
5680 (package
5681 (name "openh264")
5682 (version "2.6.0")
5683 (source (origin
5684 (method git-fetch)
5685 (uri (git-reference
5686 (url "https://github.com/cisco/openh264")
5687 (commit (string-append "v" version))))
5688 (file-name (git-file-name name version))
5689 (sha256
5690 (base32
5691 "1n2x74h1j2sbljkqa0d810gkp7p81al8nv8lzcm4l2hk22gjbzdm"))))
5692 (build-system gnu-build-system)
5693 (native-inputs
5694 (list nasm python))
5695 (arguments
5696 (list
5697 #:make-flags
5698 #~(list (string-append "PREFIX=" #$output)
5699 (string-append "CC=" #$(cc-for-target)))
5700 #:test-target "test"
5701 #:phases
5702 #~(modify-phases %standard-phases
5703 ;; no configure script
5704 (delete 'configure))))
5705 (home-page "https://www.openh264.org/")
5706 (synopsis "H264 decoder library")
5707 (description
5708 "Openh264 is a library which can decode H264 video streams.")
5709 (license license:bsd-2)))
5710
5711(define-public opentimelineio
5712 (package
5713 (name "opentimelineio")
5714 (version "0.17.0")
5715 (source (origin
5716 (method git-fetch)
5717 (uri (git-reference
5718 (url "https://github.com/AcademySoftwareFoundation/OpenTimelineIO")
5719 (commit (string-append "v" version))))
5720 (file-name (git-file-name name version))
5721 (sha256
5722 (base32
5723 "0qram9cb77x0f29v6nbzwsd5mwdfw9m1k4d8pcny3ij7p26rfwp7"))
5724 (modules '((guix build utils)))
5725 (snippet
5726 '(begin
5727 (substitute* "CMakeLists.txt"
5728 (("add_subdirectory\\(src/deps\\)") ""))
5729 (substitute* "src/opentimelineio/serializableObject.h"
5730 (("#include \"ImathBox.h\"")
5731 "#include <Imath/ImathBox.h>"))
5732 (substitute* '("src/opentimelineio/mediaReference.h"
5733 "src/opentimelineio/composable.h")
5734 (("#include <ImathBox.h>")
5735 "#include <Imath/ImathBox.h>"))))))
5736 (build-system cmake-build-system)
5737 (arguments
5738 (list #:configure-flags
5739 '(list "-DOTIO_PYTHON_INSTALL=off"
5740 "-DOTIO_AUTOMATIC_SUBMODULES=off")
5741 #:phases
5742 #~(modify-phases %standard-phases
5743 (add-after 'install 'install-imath
5744 (lambda _
5745 (symlink (string-append
5746 #$(this-package-input "imath")
5747 "/include/Imath")
5748 (string-append
5749 #$output "/include/opentimelineio/deps")))))))
5750 (inputs (list imath rapidjson))
5751 (home-page "https://opentimeline.io")
5752 (synopsis "API and interchange format for editorial timeline information")
5753 (description "OpenTimelineIO is an interchange format and API for
5754editorial cut information. OTIO contains information about the order and
5755length of cuts and references to external media. It is not however, a
5756container format for media.
5757
5758For integration with applications, the core OTIO library is implemented in C++
5759and provides an in-memory data model, as well as library functions for
5760interpreting, manipulating, and serializing that data model. Within the core
5761is a dependency-less library for dealing strictly with time, @code{opentime}.")
5762 (license license:gpl2+)))
5763
5764(define-public libmp4v2
5765 (package
5766 (name "libmp4v2")
5767 (version "2.0.0")
5768 (source
5769 (origin
5770 (method url-fetch)
5771 ;; XXX: The new location of upstream is uncertain and will become relevant the
5772 ;; moment when the googlecode archive shuts down. It is past the date it
5773 ;; should've been turned off. I tried to communicate with upstream, but this
5774 ;; wasn't very responsive and not very helpful. The short summary is, it is
5775 ;; chaos when it comes to the amount of forks and only time will tell where
5776 ;; the new upstream location is.
5777 (uri (string-append "https://storage.googleapis.com/google-"
5778 "code-archive-downloads/v2/"
5779 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
5780 (file-name (string-append name "-" version ".tar.bz2"))
5781 (patches (search-patches "libmp4v2-c++11.patch"))
5782 (sha256
5783 (base32
5784 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
5785 (build-system gnu-build-system)
5786 (outputs '("out"
5787 "static")) ; 3.7MiB .a file
5788 (arguments
5789 `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
5790 #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
5791
5792 #:phases
5793 (modify-phases %standard-phases
5794 (add-after 'unpack 'remove-dates
5795 (lambda _
5796 ;; Make the build reproducible.
5797 (substitute* "configure"
5798 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
5799 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
5800 #t))
5801 (add-after 'install 'move-static-libraries
5802 (lambda* (#:key outputs #:allow-other-keys)
5803 ;; Move static libraries to the "static" output.
5804 (let* ((out (assoc-ref outputs "out"))
5805 (lib (string-append out "/lib"))
5806 (static (assoc-ref outputs "static"))
5807 (slib (string-append static "/lib")))
5808 (mkdir-p slib)
5809 (for-each (lambda (file)
5810 (install-file file slib)
5811 (delete-file file))
5812 (find-files lib "\\.a$"))
5813 #t))))))
5814 (native-inputs
5815 (list help2man dejagnu))
5816 (home-page "https://code.google.com/archive/p/mp4v2/")
5817 (synopsis "API to create and modify mp4 files")
5818 (description
5819 "The MP4v2 library provides an API to create and modify mp4 files as defined by
5820ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
5821file format that has been used as a multimedia file format in a variety of platforms and
5822applications. It is a very powerful and extensible format that can accommodate
5823practically any type of media.")
5824 (license license:mpl1.1)))
5825
5826(define-public libmediainfo
5827 (package
5828 (name "libmediainfo")
5829 (version "25.04")
5830 (source (origin
5831 (method url-fetch)
5832 (uri (string-append "https://mediaarea.net/download/source/"
5833 name "/" version "/"
5834 name "_" version ".tar.xz"))
5835 (sha256
5836 (base32
5837 "1cdvh4nsl2irwlkq39c3m26sl9lmmn5shp440fl7m05pkmyfsidd"))))
5838 ;; TODO add a Big Buck Bunny webm for tests.
5839 (native-inputs
5840 (list autoconf automake libtool pkg-config))
5841 (propagated-inputs
5842 (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc.
5843 libzen))
5844 (build-system gnu-build-system)
5845 (arguments
5846 '(#:tests? #f ; see above TODO
5847 #:configure-flags
5848 (list "--with-libcurl" "--with-libtinyxml2")
5849 #:phases
5850 ;; build scripts not in root of archive
5851 (modify-phases %standard-phases
5852 (add-after 'unpack 'change-to-build-dir
5853 (lambda _
5854 (chdir "Project/GNU/Library")
5855 ;; XXX Add a shebang to the script to avoid an error like:
5856 ;; "In execvp of ./autogen.sh: Exec format error"
5857 ;; The string replaced is just a code comment.
5858 ;; See the similar substitution made in mediainfo.
5859 (substitute* "autogen.sh"
5860 (("#libtoolize")
5861 "#!/bin/sh"))
5862 #t)))))
5863 (home-page "https://mediaarea.net/en/MediaInfo")
5864 (synopsis "Library for retrieving media metadata")
5865 (description "MediaInfo is a library used for retrieving technical
5866information and other metadata about audio or video files. A non-exhaustive
5867list of the information MediaInfo can retrieve from media files include:
5868
5869@itemize
5870@item General: title, author, director, album, track number, date, duration...
5871@item Video: codec, aspect, fps, bitrate...
5872@item Audio: codec, sample rate, channels, language, bitrate...
5873@item Text: language of subtitle
5874@item Chapters: number of chapters, list of chapters
5875@end itemize
5876
5877MediaInfo supports the following formats:
5878
5879@itemize
5880@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
5881MPEG-2, MPEG-4, DVD (VOB)...
5882@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
5883@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
5884@item Subtitles: SRT, SSA, ASS, SAMI...
5885@end itemize\n")
5886 (license license:bsd-2)))
5887
5888;; TODO also have a GUI version available
5889(define-public mediainfo
5890 (package
5891 (name "mediainfo")
5892 (version "25.04")
5893 (source (origin
5894 (method url-fetch)
5895 ;; Warning: This source has proved unreliable 1 time at least.
5896 ;; Consider an alternate source or report upstream if this
5897 ;; happens again.
5898 (uri (string-append "https://mediaarea.net/download/source/"
5899 name "/" version "/"
5900 name "_" version ".tar.xz"))
5901 (sha256
5902 (base32
5903 "1bikda1a9c6d04w8cnwc229x9x3sp2v63zm5mhxjscq4j7z569ab"))))
5904 (native-inputs
5905 (list autoconf automake libtool pkg-config))
5906 (inputs
5907 (list libmediainfo))
5908 (build-system gnu-build-system)
5909 (arguments
5910 '(#:tests? #f ; lacks tests
5911 #:phases
5912 ;; build scripts not in root of archive
5913 (modify-phases %standard-phases
5914 (add-after 'unpack 'change-to-build-dir
5915 (lambda _
5916 (chdir "Project/GNU/CLI")
5917 ;; XXX Add a shebang to the script to avoid an error like:
5918 ;; "In execvp of ./autogen.sh: Exec format error"
5919 ;; The string replaced is just a code comment.
5920 ;; See the similar substitution made in libmediainfo.
5921 (substitute* "autogen.sh"
5922 (("#libtoolize")
5923 "#!/bin/sh"))
5924 #t)))))
5925 (home-page "https://mediaarea.net/en/MediaInfo")
5926 (synopsis "Utility for reading media metadata")
5927 (description "MediaInfo is a utility used for retrieving technical
5928information and other metadata about audio or video files. It supports the
5929many codecs and formats supported by libmediainfo.")
5930 (license license:bsd-2)))
5931
5932(define-public atomicparsley
5933 (package
5934 (name "atomicparsley")
5935 (version "20240608.083822.1ed9031")
5936 (source
5937 (origin
5938 (method git-fetch)
5939 (uri (git-reference
5940 (url "https://github.com/wez/atomicparsley")
5941 (commit version)))
5942 (file-name (git-file-name name version))
5943 (sha256
5944 (base32
5945 "1y2p6al47w0hfdnkimdbjl11vj138ylhl7rpc96l6cldj4rcw6jn"))))
5946 (build-system cmake-build-system)
5947 (arguments
5948 (list
5949 #:tests? #f ; Tests not implemented in cmake yet.
5950 #:phases
5951 #~(modify-phases %standard-phases
5952 (replace 'install
5953 (lambda _
5954 (mkdir-p (string-append #$output "/bin"))
5955 (install-file "AtomicParsley"
5956 (string-append #$output "/bin")))))))
5957 (inputs
5958 (list zlib))
5959 (synopsis "Metadata editor for MPEG-4 files")
5960 (description "AtomicParsley is a lightweight command line program for
5961reading, parsing and setting metadata into MPEG-4 files, in particular,
5962iTunes-style metadata.")
5963 (home-page "https://github.com/wez/atomicparsley")
5964 (license license:gpl2+)))
5965
5966(define-public livemedia-utils
5967 (package
5968 (name "livemedia-utils")
5969 (version "2025.11.06")
5970 (source
5971 (origin
5972 (method url-fetch)
5973 ;; live555 home-page provides only the latest release; see
5974 ;; <http://lists.live555.com/pipermail/live-devel/2011-November/014131.html>.
5975 ;; Let's use a set of unofficial mirrors for now.
5976 (uri (string-append
5977 "https://download.videolan.org/contrib/live555/live."
5978 version ".tar.gz"))
5979 (sha256
5980 (base32
5981 "0z6iq7pvbb8d3gkh5fqf97jlzyr0q2hk0nkizm5v4q9y545gl53n"))))
5982 (build-system gnu-build-system)
5983 (arguments
5984 (list
5985 #:tests? #f ; No tests.
5986 #:make-flags
5987 #~(list (string-append "CC=" #$(cc-for-target))
5988 (string-append "CXX=" #$(cxx-for-target))
5989 "CXXFLAGS=-std=c++20" ; "test" field was added to
5990 ; std::atomic_flag in C++20
5991 (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
5992 (string-append "PREFIX=" #$output))
5993 #:phases
5994 #~(modify-phases %standard-phases
5995 (add-before 'configure 'fix-makefiles-generation
5996 (lambda _
5997 (substitute* "genMakefiles"
5998 (("/bin/rm") "rm"))
5999 #t))
6000 (replace 'configure
6001 (lambda _
6002 (invoke "./genMakefiles" "linux-with-shared-libraries"))))))
6003 (inputs
6004 (list openssl))
6005 (home-page "http://www.live555.com/liveMedia/")
6006 (synopsis "Set of C++ libraries for multimedia streaming")
6007 (description "This code forms a set of C++ libraries for multimedia
6008streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
6009can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
6010JPEG video, and several audio codecs. They can easily be extended to support
6011additional (audio and/or video) codecs, and can also be used to build basic
6012RTSP or SIP clients and servers.")
6013 (license license:lgpl3+)))
6014
6015(define-public mediaextract
6016 (package
6017 (name "mediaextract")
6018 (version "1.2.1")
6019 (source
6020 (origin
6021 (method git-fetch)
6022 (uri (git-reference
6023 (url "https://github.com/panzi/mediaextract")
6024 (commit (string-append "v" version))))
6025 (file-name (git-file-name name version))
6026 (sha256
6027 (base32 "0pvjn5hvviam7kfprsxh2dkm8ckx07aak5bv23fv1sd2syp80c05"))))
6028 (build-system gnu-build-system)
6029 (arguments
6030 (list #:tests? #f ;no tests
6031 #:make-flags #~(list (string-append "PREFIX=" #$output))
6032 #:phases #~(modify-phases %standard-phases
6033 (replace 'configure
6034 (lambda _
6035 (invoke "make" "builddir"))))))
6036 (native-inputs (list help2man))
6037 (home-page "https://panzi.github.io/mediaextract/")
6038 (synopsis "Extracts media files that are embedded within other files")
6039 (description
6040 "This package extracts media files that are embedded within other binary
6041formats. It supports video, audio, text, and music tracker files. It further
6042allows customization of which types are extracted via command line flags.")
6043 (license license:expat)))
6044
6045(define-public libdvbpsi
6046 (package
6047 (name "libdvbpsi")
6048 (version "1.3.3")
6049 (source (origin
6050 (method url-fetch)
6051 (uri (string-append
6052 "https://download.videolan.org/pub/libdvbpsi/"
6053 version "/libdvbpsi-" version ".tar.bz2"))
6054 (sha256
6055 (base32
6056 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
6057 (build-system gnu-build-system)
6058 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
6059 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
6060tables")
6061 (description "libdvbpsi is a simple library designed for decoding and
6062generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
6063and ITU-T H.222.0.")
6064 (license license:lgpl2.1)))
6065
6066(define-public ffms2
6067 (package
6068 (name "ffms2")
6069 (version "2.23")
6070 (home-page "https://github.com/FFMS/ffms2")
6071 (source (origin
6072 (method git-fetch)
6073 (uri (git-reference
6074 (url "https://github.com/FFMS/ffms2")
6075 (commit version)))
6076 (file-name (git-file-name name version))
6077 (sha256
6078 (base32
6079 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
6080 (build-system gnu-build-system)
6081 (arguments
6082 '(#:configure-flags
6083 (list "--enable-avresample")))
6084 (inputs
6085 (list zlib))
6086 (propagated-inputs
6087 (list ffmpeg-4))
6088 (native-inputs
6089 (list pkg-config))
6090 (synopsis "Cross-platform wrapper around ffmpeg/libav")
6091 (description
6092 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
6093programmers to access a standard API to open and decompress media files.")
6094 ;; sources are distributed under a different license that the binary.
6095 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
6096 (license license:gpl2+))); inherits from ffmpeg
6097
6098(define-public aegisub
6099 (package
6100 (name "aegisub")
6101 (version "3.4.2")
6102 (source
6103 (origin
6104 (method git-fetch)
6105 (uri (git-reference
6106 (url "https://github.com/TypesettingTools/Aegisub")
6107 (commit (string-append "v" version))))
6108 (file-name (git-file-name name version))
6109 (sha256
6110 (base32 "1wsksmxk6sgwy4hqag3j8gls77bbiaq0jflzc7i6c5glkqdqk3w6"))))
6111 (build-system meson-build-system)
6112 (arguments
6113 (list
6114 #:configure-flags
6115 #~(list "-Denable_update_checker=false"
6116 "-Dsystem_luajit=true"
6117 "-Dlocal_boost=false")
6118 #:phases
6119 #~(modify-phases %standard-phases
6120 (add-after 'unpack 'git-version-h
6121 (lambda _
6122 (call-with-output-file "git_version.h"
6123 (lambda (port)
6124 (format
6125 port
6126 "#define BUILD_GIT_VERSION_NUMBER ~d
6127#define BUILD_GIT_VERSION_STRING ~s
6128#define TAGGED_RELEASE 1
6129#define INSTALLER_VERSION ~s
6130#define RESOURCE_BASE_VERSION ~a"
6131 ;; lastSvnHash=16cd907fe7482cb54a7374cd28b8501f138116be
6132 ;; $(expr 6962 + $(git rev-list --count $lastSvnHash..HEAD))
6133 9426
6134 #$version
6135 #$version
6136 #$(string-replace-substring version "." ", ")))))))))
6137 (native-inputs
6138 (list gettext-minimal
6139 googletest
6140 pkg-config
6141 python))
6142 (inputs
6143 (list alsa-lib
6144 boost-1.83
6145 curl
6146 ffms2
6147 fftw
6148 hunspell
6149 icu4c
6150 libass
6151 libportal
6152 luajit-lua52-openresty
6153 mesa
6154 openal
6155 pulseaudio
6156 uchardet
6157 wxwidgets
6158 zlib))
6159 (home-page "https://www.aegisub.org/")
6160 (synopsis "Subtitle engine")
6161 (description
6162 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
6163it quick and easy to time subtitles to audio, and features many powerful
6164tools for styling them, including a built-in real-time video preview.")
6165 ;; See https://github.com/TypesettingTools/Aegisub/issues/271
6166 (license (list license:bsd-2
6167 license:bsd-3
6168 license:expat
6169 license:gpl2+
6170 license:isc
6171 license:public-domain))))
6172
6173(define-public pitivi
6174 (package
6175 (name "pitivi")
6176 (version "2023.03.0")
6177 (source
6178 (origin
6179 (method git-fetch)
6180 (uri (git-reference
6181 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
6182 (commit version)))
6183 (file-name (git-file-name name version))
6184 (sha256
6185 (base32 "12sbl9dlw9rh44mbyfx6pzan4jkhcxidrcbfqih10cyyv50cqjkb"))))
6186 (build-system meson-build-system)
6187 (native-inputs
6188 (list gettext-minimal
6189 `(,glib "bin")
6190 itstool
6191 pkg-config))
6192 (inputs
6193 (list bash-minimal
6194 glib
6195 gst-editing-services
6196 gstreamer
6197 gst-plugins-base
6198 gst-plugins-good
6199 (package
6200 (inherit (gst-plugins/selection
6201 gst-plugins-bad
6202 #:plugins '("debugutils" "opencv" "transcode")
6203 #:configure-flags
6204 #~'("-Dintrospection=enabled")))
6205 (inputs (modify-inputs inputs (prepend opencv))))
6206 gst-libav
6207 gsound
6208 gtk+
6209 libpeas
6210 libnotify
6211 pango
6212 python
6213 python-gst
6214 python-librosa
6215 python-numpy
6216 python-matplotlib
6217 python-pycairo
6218 python-pygobject-3.50)) ; bump along with libpeas
6219 ;; Propagate librsvg so that is is registered in GDK_PIXBUF_MODULE_FILE,
6220 ;; otherwise pitivi fails to launch.
6221 (propagated-inputs (list (librsvg-for-system)))
6222 (arguments
6223 `(#:glib-or-gtk? #t
6224 #:phases
6225 (modify-phases %standard-phases
6226 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
6227 (lambda* (#:key outputs #:allow-other-keys)
6228 (wrap-program (search-input-file outputs "bin/pitivi")
6229 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
6230 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
6231 ;; We've only added inputs for what Pitivi deems either
6232 ;; necessary or optional. Let the user's packages take
6233 ;; precedence in case they have e.g. the full gst-plugins-bad.
6234 `("GST_PLUGIN_SYSTEM_PATH" suffix
6235 (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))))))
6236 (home-page "https://www.pitivi.org")
6237 (synopsis "Video editor based on GStreamer Editing Services")
6238 (description "Pitivi is a video editor built upon the GStreamer Editing
6239Services. It aims to be an intuitive and flexible application that can appeal
6240to newbies and professionals alike.")
6241 (license license:lgpl2.1+)))
6242
6243(define-public gavl
6244 (package
6245 (name "gavl")
6246 (version "1.4.0")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (string-append "mirror://sourceforge/gmerlin/"
6251 name "/" version "/"
6252 name "-" version ".tar.gz"))
6253 (file-name (string-append name "-" version ".tar.gz"))
6254 (sha256
6255 (base32
6256 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
6257 (build-system gnu-build-system)
6258 (arguments
6259 '(#:configure-flags '("LIBS=-lm")))
6260 (native-inputs
6261 ;; Avoid gcc-14's: error: SSE register return with SSE disabled
6262 (list gcc-13 pkg-config doxygen))
6263 (home-page "https://gmerlin.sourceforge.net")
6264 (synopsis "Low level library for multimedia API building")
6265 (description
6266 "Gavl is short for Gmerlin Audio Video Library. It is a low level
6267library, upon which multimedia APIs can be built. Gavl handles all the
6268details of audio and video formats like colorspaces, sample rates,
6269multichannel configurations, etc. It provides standardized definitions for
6270those formats as well as container structures for carrying audio samples or
6271video images inside an application.
6272
6273In addition, it handles the sometimes ugly task of converting between all
6274these formats and provides some elementary operations (copying, scaling,
6275alpha blending etc).")
6276 (license license:gpl3)))
6277
6278(define-public frei0r
6279 (package
6280 (name "frei0r")
6281 (version "3.2.1")
6282 (source
6283 (origin
6284 (method git-fetch)
6285 (uri (git-reference
6286 (url "https://github.com/dyne/frei0r")
6287 (commit (string-append "v" version))))
6288 (sha256
6289 (base32 "1kc26ywv4n5i4k2pa3kw8pl891pz29x555shwlmsd65q9w89l5kq"))
6290 (file-name (git-file-name name version))
6291 (modules (list '(guix build utils)))
6292 (snippet
6293 #~(begin
6294 ;; Delete public api headers, as they are provided by frei0r-api.
6295 (delete-file "include/frei0r.h")
6296 (delete-file "include/frei0r.hpp")
6297 ;; Prevent installation of pkg-config file.
6298 (substitute* "CMakeLists.txt"
6299 (("^install .*/frei0r\\.pc.*/pkgconfig.*") ""))))))
6300 (build-system cmake-build-system)
6301 (arguments
6302 (list
6303 #:phases
6304 #~(modify-phases %standard-phases
6305 (add-after 'unpack 'substitute-opencv-paths
6306 (lambda* (#:key inputs #:allow-other-keys)
6307 (substitute* (list "src/filter/facebl0r/facebl0r.cpp"
6308 "src/filter/facedetect/facedetect.cpp")
6309 (("/usr/share/opencv")
6310 (string-append (assoc-ref inputs "opencv") "/share/opencv4"))))))))
6311 (inputs (list cairo gavl opencv))
6312 (native-inputs (list frei0r-api pkg-config))
6313 (home-page "https://dyne.org/software/frei0r/")
6314 (synopsis "Collection of free and portable video plugins")
6315 (description
6316 "Frei0r is a minimalistic plugin API and collection of video effects. The
6317main emphasis is on simplicity for an API that will round up the most common
6318video effects into simple filters, sources and mixers that can be controlled by
6319parameters. Frei0r wants to provide a way to share these simple effects between
6320many applications, avoiding their reimplementation by different projects. It
6321counts more than 100 plugins.")
6322 (license (list license:gpl2+
6323 ;; The following files are licensed as LGPL2.1+:
6324 ;; src/mixer2/sleid0r/sleid0r_wipe-up.c
6325 ;; src/mixer2/sleid0r/sleid0r_wipe-right.c
6326 ;; src/mixer2/sleid0r/sleid0r_wipe-rect.c
6327 ;; src/mixer2/sleid0r/sleid0r_wipe-left.c
6328 ;; src/mixer2/sleid0r/sleid0r_wipe-down.c
6329 ;; src/mixer2/sleid0r/sleid0r_wipe-circle.c
6330 ;; src/mixer2/sleid0r/sleid0r_wipe-barn-door-v.c
6331 ;; src/mixer2/sleid0r/sleid0r_wipe-barn-door-h.c
6332 ;; src/mixer2/sleid0r/sleid0r_push-up.c
6333 ;; src/mixer2/sleid0r/sleid0r_slide-up.c
6334 ;; src/mixer2/sleid0r/sleid0r_push-right.c
6335 ;; src/mixer2/sleid0r/sleid0r_slide-right.c
6336 ;; src/mixer2/sleid0r/sleid0r_push-left.c
6337 ;; src/mixer2/sleid0r/sleid0r_slide-left.c
6338 ;; src/mixer2/sleid0r/sleid0r_push-down.c
6339 ;; src/mixer2/sleid0r/sleid0r_slide-down.c
6340 ;; src/generator/onecol0r/onecol0r.cpp
6341 ;; src/generator/nois0r/nois0r.cpp
6342 ;; src/generator/lissajous0r/lissajous0r.cpp
6343 ;; src/generator/ising0r/ising0r.c
6344 ;; src/filter/ndvi/ndvi.cpp
6345 ;; src/filter/ndvi/gradientlut.hpp
6346 ;; src/filter/facedetect/facedetect.cpp
6347 license:lgpl2.1+))))
6348
6349;; XXX: Deprecated on 2026-05-18.
6350(define-deprecated-package frei0r-plugins frei0r)
6351
6352(define-public frei0r-api
6353 (package
6354 (name "frei0r-api")
6355 (version "1.2")
6356 (source
6357 (origin
6358 (method git-fetch)
6359 (file-name (git-file-name name version))
6360 (uri (git-reference
6361 (url "https://github.com/dyne/frei0r")
6362 ;; This release contains the latest version of the headers.
6363 ;; It should only be updated if the headers change.
6364 (commit "v3.0.0")))
6365 (sha256
6366 (base32 "1wgsja14b4ihcakm5w7ndn0dflsp8xyv7r90hi4x2yipc7gf46iy"))))
6367 (build-system copy-build-system)
6368 (arguments
6369 (list
6370 #:install-plan
6371 #~'(("include/frei0r.h" "include/")
6372 ("include/frei0r.hpp" "include/")
6373 ("frei0r.pc" "lib/pkgconfig/"))
6374 #:phases
6375 #~(modify-phases %standard-phases
6376 (add-after 'unpack 'write-pkg-config-file
6377 (lambda _
6378 (with-output-to-file "frei0r.pc"
6379 (lambda _
6380 (format #t
6381 "Name: frei0r
6382Description: minimalistic plugin API for video effects
6383Version: ~a
6384Libs:
6385Cflags: -I~a~%"
6386 #$(package-version this-package)
6387 (string-append #$output "/include")))))))))
6388 (home-page "https://frei0r.dyne.org/codedoc/html/")
6389 (synopsis "Public API of frei0r")
6390 (description
6391 "Public header files of frei0r, a large collection of free and portable
6392video plugins.")
6393 (license license:gpl2+)))
6394
6395(define-public motion
6396 (package
6397 (name "motion")
6398 (version "4.7.1")
6399 (home-page "https://motion-project.github.io/")
6400 (source (origin
6401 (method git-fetch)
6402 (uri (git-reference
6403 (url "https://github.com/Motion-Project/motion")
6404 (commit (string-append "release-" version))))
6405 (sha256
6406 (base32
6407 "1lsz0vc6wl3hrp47ixmmyqlh1rx2iqipr8l3c6iwzjlvclaxa31l"))
6408 (file-name (git-file-name name version))))
6409 (build-system gnu-build-system)
6410 (native-inputs
6411 (list autoconf automake gettext-minimal pkg-config))
6412 (inputs
6413 (list libjpeg-turbo ffmpeg libmicrohttpd sqlite))
6414 (arguments
6415 '(#:phases (modify-phases %standard-phases
6416 (replace 'bootstrap
6417 (lambda _
6418 (patch-shebang "scripts/version.sh")
6419 (invoke "autoreconf" "-vfi"))))
6420 #:configure-flags '("--sysconfdir=/etc")
6421 #:make-flags (list (string-append "sysconfdir="
6422 (assoc-ref %outputs "out")
6423 "/etc"))
6424
6425 #:tests? #f)) ; no 'check' target
6426 (synopsis "Detect motion from video signals")
6427 (description
6428 "Motion is a program that monitors the video signal from one or more
6429cameras and is able to detect if a significant part of the picture has
6430changed. Or in other words, it can detect motion.")
6431
6432 ;; Some files say "version 2" and others "version 2 or later".
6433 (license license:gpl2)))
6434
6435(define-public subdl
6436 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
6437 (revision "1"))
6438 (package
6439 (name "subdl")
6440 (version (git-version "1.0.3" revision commit))
6441 (source (origin
6442 (method git-fetch)
6443 (uri (git-reference
6444 (url "https://github.com/alexanderwink/subdl")
6445 (commit commit)))
6446 (file-name (git-file-name name version))
6447 (sha256
6448 (base32
6449 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
6450 (build-system trivial-build-system)
6451 (arguments
6452 `(#:modules ((guix build utils))
6453 #:builder (begin
6454 (use-modules (guix build utils))
6455 (let* ((out (assoc-ref %outputs "out"))
6456 (bin (string-append out "/bin"))
6457 (source (assoc-ref %build-inputs "source"))
6458 (python (assoc-ref %build-inputs "python")))
6459 (install-file (string-append source "/subdl") bin)
6460 (patch-shebang (string-append bin "/subdl")
6461 (list (string-append python "/bin")))))))
6462 (inputs (list python))
6463 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
6464 (description "Subdl is a command-line tool for downloading subtitles from
6465opensubtitles.org. By default, it will search for English subtitles, display
6466the results, download the highest-rated result in the requested language and
6467save it to the appropriate filename.")
6468 (license license:gpl3+)
6469 (home-page "https://github.com/alexanderwink/subdl"))))
6470
6471(define-public l-smash
6472 (package
6473 (name "l-smash")
6474 (version "2.14.5")
6475 (source (origin
6476 (method git-fetch)
6477 (uri (git-reference
6478 (url "https://github.com/l-smash/l-smash")
6479 (commit (string-append "v" version))))
6480 (file-name (git-file-name name version))
6481 (sha256
6482 (base32
6483 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
6484 (build-system gnu-build-system)
6485 (arguments
6486 `(#:tests? #f ;no tests
6487 #:make-flags
6488 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
6489 (assoc-ref %outputs "out") "/lib"))
6490 #:phases
6491 (modify-phases %standard-phases
6492 ;; configure fails if it is followed by CONFIG_SHELL
6493 (replace 'configure
6494 (lambda* (#:key outputs #:allow-other-keys)
6495 (let ((out (assoc-ref outputs "out")))
6496 (invoke "./configure" (string-append "--prefix=" out)
6497 "--disable-static")))))))
6498 (native-inputs
6499 (list which))
6500 (home-page "https://l-smash.github.io/l-smash/")
6501 (synopsis "MP4 multiplexer and demultiplexer library")
6502 (description
6503 "L-SMASH is a cross-platform library that handles the ISO base media file
6504format and some of its derived file formats, including MP4. It operates as a
6505multiplexer and demultiplexer, and can mux video and audio in several formats
6506using standalone executable files.")
6507 (license license:isc)))
6508
6509;; XXX: This project is not being maintained. Consider removal or patch merges.
6510(define-public qtfaststart
6511 (package
6512 (name "qtfaststart")
6513 (version "1.8.0")
6514 (source
6515 (origin
6516 (method git-fetch)
6517 (uri (git-reference
6518 (url "https://github.com/danielgtaylor/qtfaststart")
6519 (commit version)))
6520 (file-name (git-file-name name version))
6521 (sha256
6522 (base32 "0cgc92dn2r6qmqlvi6d63i0bzsvmcb82301jr1211gsiqi96wmwg"))))
6523 (build-system pyproject-build-system)
6524 (arguments (list #:tests? #f)) ; No test suite.
6525 (native-inputs (list python-setuptools))
6526 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
6527 (description
6528 "qtfaststart enables streaming and pseudo-streaming of QuickTime and MP4
6529files by moving metadata and offset information to the beginning of the file.
6530It can also print some useful information about the structure of the file.
6531This program is based on qt-faststart.c from the FFmpeg project, which is
6532released into the public domain, as well as ISO 14496-12:2005 (the official
6533spec for MP4), which can be obtained from the ISO or found online.")
6534 (home-page "https://github.com/danielgtaylor/qtfaststart")
6535 (license license:expat)))
6536
6537(define-public vidstab
6538 (package
6539 (name "vidstab")
6540 (version "1.1.1")
6541 (source (origin
6542 (method git-fetch)
6543 (uri (git-reference
6544 (url "https://github.com/georgmartius/vid.stab")
6545 (commit (string-append "v" version))))
6546 (file-name (git-file-name name version))
6547 (sha256
6548 (base32
6549 "19k822bwsnw58ikbfh4fhh97zpn89ji9k1gdvh9r2ljy82g52md7"))))
6550 (build-system cmake-build-system)
6551 (arguments
6552 '(#:tests? #f)) ; tests are not run as part of standard build process
6553 (home-page "http://public.hronopik.de/vid.stab/")
6554 (synopsis "Video stabilization library")
6555 (description "Vidstab is a video stabilization library which can be used
6556with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
6557vehicle typically suffers from undesirable shakes and jitters. Activities such
6558as surfing, skiing, riding and walking while shooting videos are especially
6559prone to erratic camera shakes. Vidstab targets these video contents to help
6560create smoother and stable videos.")
6561 (license license:gpl2+)))
6562
6563(define-public libopenshot
6564 (package
6565 (name "libopenshot")
6566 (version "1.0.0")
6567 (source (origin
6568 (method git-fetch)
6569 (uri (git-reference
6570 (url "https://github.com/OpenShot/libopenshot")
6571 (commit (string-append "v" version))))
6572 (file-name (git-file-name name version))
6573 (sha256
6574 (base32
6575 "0xd0044rbz9c8ijvdhkqvswi06rkk5kzdm57f4a6kfhhb6mlal65"))
6576 (modules '((guix build utils)))
6577 (snippet '(begin
6578 ;; Allow overriding of the python installation dir
6579 (substitute* "bindings/python/CMakeLists.txt"
6580 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
6581 (string-append set " CACHE PATH "
6582 "\"Python bindings directory\")")))
6583 (delete-file-recursively "thirdparty")))))
6584 (build-system qt-build-system)
6585 (native-inputs
6586 (list catch2
6587 pkg-config
6588 python
6589 swig-4.4
6590 unittest-cpp))
6591 (inputs
6592 (list alsa-lib opencv protobuf zlib))
6593 (propagated-inputs ;all referenced in installed headers
6594 (list cppzmq
6595 ffmpeg-4
6596 imagemagick
6597 jsoncpp
6598 libopenshot-audio
6599 qtbase
6600 qtmultimedia
6601 qtsvg
6602 zeromq))
6603 (arguments
6604 (list
6605 #:configure-flags
6606 #~(list (string-append "-DPYTHON_MODULE_PATH:PATH=" #$output "/lib/python"
6607 #$(version-major+minor (package-version python))
6608 "/site-packages")
6609 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
6610 #:phases
6611 #~(modify-phases %standard-phases
6612 (add-before 'configure 'set-vars
6613 (lambda* (#:key inputs #:allow-other-keys)
6614 (setenv "LIBOPENSHOT_AUDIO_DIR"
6615 #$(this-package-input "libopenshot-audio"))
6616 (setenv "ZMQDIR"
6617 #$(this-package-input "zeromq"))
6618 (setenv "UNITTEST_DIR"
6619 (search-input-directory inputs
6620 "include/UnitTest++")))))))
6621 (home-page "https://www.openshot.org")
6622 (synopsis "Video-editing, animation, and playback library")
6623 (description "OpenShot Library (libopenshot) is a powerful C++ video
6624editing library with a multi-threaded and feature rich video editing
6625API. It includes bindings for Python, Ruby, and other languages.")
6626 (license license:lgpl3+)))
6627
6628(define-public openshot
6629 (package
6630 (name "openshot")
6631 (version "4.0.0")
6632 (source
6633 (origin
6634 (method git-fetch)
6635 (uri (git-reference
6636 (url "https://github.com/OpenShot/openshot-qt")
6637 (commit (string-append "v" version))))
6638 (file-name (git-file-name name version))
6639 (sha256
6640 (base32 "1ngz9v1syclwg8z8wp8i0h2pn4qvz0ligz73w40hbznpn1pk48k9"))
6641 (modules '((guix build utils)))
6642 (snippet
6643 '(begin
6644 (delete-file-recursively "src/images/fonts")))))
6645 (build-system pyproject-build-system)
6646 (arguments
6647 (list
6648 #:test-flags
6649 #~(list "-k" (string-append
6650 "not "
6651 (string-join
6652 (list "test_properties_dock_reanchors_to_files_when_shown_after_view_removed_it"
6653 "test_application_filter_styles_future_message_boxes"
6654 "test_assigns_semantic_button_roles_and_removes_icons")
6655 " and not ")))
6656 #:phases
6657 #~(modify-phases %standard-phases
6658 (add-after 'unpack 'patch-font-location
6659 (lambda _
6660 (let ((font #$(this-package-input "font-dejavu")))
6661 (substitute* "src/classes/app.py"
6662 (("info.IMAGES_PATH")
6663 (string-append "\"" font "\""))
6664 (("fonts")
6665 "share/fonts/truetype")
6666 (("[A-Za-z_-]+.ttf")
6667 "DejaVuSans.ttf")))))
6668 (add-before 'install 'set-tmp-home
6669 (lambda _
6670 ;; src/classes/info.py "needs" to create several
6671 ;; directories in $HOME when loaded during build
6672 (setenv "HOME" "/tmp")))
6673 ;; Openshot imports 'qt_api.py' from site-packages/openshot_qt
6674 ;; and we need to pass it explicitly to both build ('install-qt-api)
6675 ;; and run ('wrap-qt-api) time.
6676 (add-after 'install 'install-qt-api
6677 (lambda _
6678 (setenv "PYTHONPATH"
6679 (string-append #$output
6680 "/lib/python"
6681 #$(version-major+minor
6682 (package-version python))
6683 "/site-packages/openshot_qt"))))
6684 (add-after 'wrap 'wrap-qt-api
6685 (lambda _
6686 (wrap-program (string-append #$output "/bin/openshot-qt")
6687 `("PYTHONPATH" =
6688 (,(string-append #$output "/lib/python"
6689 #$(version-major+minor
6690 (package-version python))
6691 "/site-packages/openshot_qt")))))))))
6692 ;; Project uses unittest but pytest makes it easier to skip tests.
6693 (native-inputs (list python-pytest))
6694 (inputs (list bash-minimal
6695 ffmpeg
6696 font-dejavu
6697 libopenshot
6698 python-pyqt-6
6699 python-pyqtwebengine-6
6700 python-pyzmq
6701 python-requests
6702 qtsvg
6703 qtwebengine))
6704 (home-page "https://www.openshot.org/")
6705 (synopsis "Video editor")
6706 (description
6707 "OpenShot takes your videos, photos, and music files and helps you create
6708the film you have always dreamed of. Easily add sub-titles, transitions, and
6709effects and then export your film to many common formats.")
6710 (license license:gpl3+)))
6711
6712(define-public shotcut
6713 (package
6714 (name "shotcut")
6715 (version "26.8.1")
6716 (source
6717 (origin
6718 (method git-fetch)
6719 (uri (git-reference
6720 (url "https://github.com/mltframework/shotcut")
6721 (commit (string-append "v" version))))
6722 (file-name (git-file-name name version))
6723 (sha256
6724 (base32 "0k6q6c502yyssl97g7c9v3vvp994kci4cadnxf1bh2j16807iwk5"))))
6725 (build-system qt-build-system)
6726 (arguments
6727 (list
6728 #:tests? #f ;there are no tests
6729 #:phases
6730 #~(modify-phases %standard-phases
6731 (add-after 'unpack 'patch-executable-paths
6732 (lambda _
6733 ;; Shotcut expects ffmpeg and melt executables in the shotcut
6734 ;; directory. Use full store paths.
6735 (let ((ffmpeg #$(this-package-input "ffmpeg"))
6736 (mlt #$(this-package-input "mlt")))
6737 (substitute* "src/jobs/ffmpegjob.cpp"
6738 (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
6739 (substitute* "src/jobs/meltjob.cpp"
6740 (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
6741 (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
6742 (add-after 'install 'wrap-executable
6743 (lambda _
6744 (let ((jack #$(this-package-input "jack"))
6745 (ladspa #$(this-package-input "ladspa"))
6746 (mlt #$(this-package-input "mlt"))
6747 (sdl2 #$(this-package-input "sdl2")))
6748 (wrap-program (string-append #$output "/bin/shotcut")
6749 `("LADSPA_PATH" ":" =
6750 (,(string-append ladspa "/lib/ladspa")))
6751 `("LD_LIBRARY_PATH" ":" prefix
6752 ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
6753 `("PATH" ":" prefix
6754 ,(list (string-append mlt "/bin"))))))))))
6755 (native-inputs
6756 (list frei0r-api pkg-config python-wrapper qttools vulkan-headers))
6757 (inputs
6758 (list bash-minimal
6759 ffmpeg
6760 fftw
6761 jack-1
6762 ladspa
6763 libxkbcommon
6764 mlt
6765 pulseaudio
6766 qtbase
6767 qtcharts
6768 qtdeclarative
6769 qtmultimedia
6770 qtwebsockets
6771 sdl2
6772 vulkan-loader))
6773 (native-search-paths
6774 (list (search-path-specification
6775 (variable "FREI0R_PATH")
6776 (files (list "lib/frei0r-1")))))
6777 (home-page "https://www.shotcut.org/")
6778 (synopsis "Video editor built on the MLT framework")
6779 (description
6780 "Shotcut is a video editor built on the MLT framework. Features include
6781a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
6782and audio capture, network stream playback, and many more.")
6783 (license license:gpl3+)))
6784
6785(define-public dav1d
6786 (package
6787 (name "dav1d")
6788 (version "1.5.1")
6789 (source
6790 (origin
6791 (method git-fetch)
6792 (uri (git-reference
6793 (url "https://code.videolan.org/videolan/dav1d.git")
6794 (commit version)))
6795 (file-name (git-file-name name version))
6796 (sha256
6797 (base32 "1n0b5m4srdjsqg15plc9fng5kjv14ygqahjxy8863fbzhr13vjx9"))))
6798 (build-system meson-build-system)
6799 (native-inputs
6800 (if (target-x86?)
6801 (list nasm)
6802 '()))
6803 (home-page "https://code.videolan.org/videolan/dav1d")
6804 (synopsis "AV1 decoder")
6805 (description "dav1d is a new AV1 cross-platform decoder, and focused on
6806speed and correctness.")
6807 (license license:bsd-2)))
6808
6809(define-public wlstream
6810 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
6811 (revision "1"))
6812 (package
6813 (name "wlstream")
6814 (version (git-version "0.0" revision commit))
6815 (source
6816 (origin
6817 (method git-fetch)
6818 (uri (git-reference
6819 (url "https://github.com/atomnuker/wlstream")
6820 (commit commit)))
6821 (file-name (git-file-name name version))
6822 (sha256
6823 (base32
6824 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
6825 (build-system meson-build-system)
6826 (native-inputs (list libdrm pkg-config))
6827 (inputs (list ffmpeg-4 pulseaudio wayland wayland-protocols))
6828 (home-page "https://github.com/atomnuker/wlstream")
6829 (synopsis "Screen capture tool for Wayland sessions")
6830 (description "Wlstream is a screen capture tool for recording audio and
6831video from a Wayland session.")
6832 (license license:lgpl2.1+))))
6833
6834(define-public gaupol
6835 (package
6836 (name "gaupol")
6837 (version "1.12")
6838 (source (origin
6839 (method git-fetch)
6840 (uri (git-reference
6841 (url "https://github.com/otsaloma/gaupol/")
6842 (commit version)))
6843 (file-name (git-file-name name version))
6844 (sha256
6845 (base32
6846 "1z9j3r9pm4rdynlmhgsgnwnnaqw5274yfy4kyillgd77msnpbhaw"))))
6847 (build-system pyproject-build-system)
6848 (native-inputs
6849 (list gettext-minimal pkg-config python-setuptools python-wheel))
6850 (inputs
6851 (list bash-minimal
6852 python-pygobject
6853 gtk+
6854 python-pycairo ; Required or else clicking on a subtitle line fails.
6855 python-chardet ; Optional: Character encoding detection.
6856 gtkspell3 ; Optional: Inline spell-checking.
6857 iso-codes/pinned ; Optional: Translations.
6858 gstreamer
6859 gst-libav
6860 gst-plugins-base
6861 gst-plugins-good
6862 gst-plugins-bad
6863 gst-plugins-ugly))
6864 (arguments
6865 `(#:tests? #f ; Tests seem to require networking.
6866 #:phases
6867 (modify-phases %standard-phases
6868 (add-after 'unpack 'disable-builtin-byte-compilation
6869 (lambda _
6870 ;; The setup.py script attempts to compile bytecode and fails.
6871 ;; We compile bytecode in a separate phase, so just disable it.
6872 (substitute* "setup.py"
6873 (("distutils\\.util\\.byte_compile\\(.*")
6874 ""))))
6875 (add-after 'install 'wrap-gaupol
6876 (lambda* (#:key outputs #:allow-other-keys)
6877 (let ((out (assoc-ref outputs "out"))
6878 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
6879 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
6880 (wrap-program (string-append out "/bin/gaupol")
6881 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
6882 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
6883 ;; Can't create a GtkStyleContext without a display connection
6884 (delete 'sanity-check)
6885 (add-after 'unpack 'patch-data-dir
6886 ;; Fix some path variables that setup.py seems to garble.
6887 (lambda* (#:key outputs #:allow-other-keys)
6888 (let ((out (assoc-ref outputs "out")))
6889 (substitute* "setup.py"
6890 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
6891 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
6892 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
6893 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
6894 (synopsis "Editor for text-based subtitles")
6895 (description
6896 "Gaupol supports multiple subtitle file formats and provides means of
6897creating subtitles, editing texts and timing subtitles to match video. The
6898user interface features a builtin video player and is designed with attention
6899to convenience of translating and batch processing of multiple documents.")
6900 (home-page "https://otsaloma.io/gaupol/")
6901 (license license:gpl3+)))
6902
6903(define-public theorafile
6904 (let ((commit "ea5fd6d34053ff72b0abe83fa4f2cd0771d92663"))
6905 (package
6906 (name "theorafile")
6907 (version (git-version "0.0.0" "2" commit))
6908 (source
6909 (origin
6910 (method git-fetch)
6911 (uri (git-reference
6912 (url "https://github.com/FNA-XNA/Theorafile")
6913 (commit commit)))
6914 (file-name (git-file-name name version))
6915 (sha256
6916 (base32 "0affdbs7vhi7apj5sc5mg815vqy1913zgymx3m1rsz8fhrcg3bvn"))))
6917 (build-system gnu-build-system)
6918 (arguments
6919 `(#:make-flags '(,(string-append "CC=" (cc-for-target)))
6920 #:test-target "test"
6921 #:phases
6922 (modify-phases %standard-phases
6923 (delete 'configure)
6924 (replace 'install
6925 (lambda* (#:key outputs #:allow-other-keys)
6926 (let ((out (assoc-ref outputs "out")))
6927 (install-file "libtheorafile.so" (string-append out "/lib"))
6928 (install-file "theorafile.h" (string-append out "/include"))))))))
6929 (native-inputs
6930 ;; For tests.
6931 (list sdl2))
6932 (home-page "https://github.com/FNA-XNA/Theorafile")
6933 (synopsis "Ogg Theora Video Decoder Library")
6934 (description "Theorafile is a library for quickly and easily decoding Ogg
6935Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
6936 (license license:zlib))))
6937
6938(define-public dvdbackup
6939 (package
6940 (name "dvdbackup")
6941 (version "0.4.2")
6942 (source
6943 (origin
6944 (method url-fetch)
6945 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
6946 "dvdbackup-" version "/"
6947 "dvdbackup-" version ".tar.xz"))
6948 (sha256
6949 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))
6950 ;; XXX: https://bugs.launchpad.net/dvdbackup/+bug/1869226
6951 (patches (search-patches "dvdbackup-with-libdvdread-6.1.0+.patch"))))
6952 (build-system gnu-build-system)
6953 (inputs
6954 (list libdvdcss libdvdread))
6955 (home-page "https://dvdbackup.sourceforge.net")
6956 (synopsis "DVD video ripper")
6957 (description
6958 "A simple command line tool to backup video from a DVD. Decrypts the
6959DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
6960transcode or reformat the videos in any way, producing perfect backups.")
6961 (license license:gpl3+)))
6962
6963(define-public svt-av1
6964 (package
6965 (name "svt-av1")
6966 (version "1.7.0")
6967 (source
6968 (origin
6969 (method git-fetch)
6970 (uri (git-reference
6971 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
6972 (commit (string-append "v" version))))
6973 (file-name (git-file-name name version))
6974 (sha256
6975 (base32 "1308g0nqxq65h76a7h91999cbglkwihgrpid64kdn0r9vh6399sq"))))
6976 (build-system cmake-build-system)
6977 (arguments
6978 ;; The test suite tries to download test data and git clone a 3rd-party
6979 ;; fork of libaom. Skip it.
6980 `(#:tests? #f
6981 #:phases
6982 (modify-phases %standard-phases
6983 (add-after 'install 'install-documentation
6984 (lambda* (#:key outputs #:allow-other-keys)
6985 (let* ((out (assoc-ref %outputs "out"))
6986 (doc (string-append out "/share/doc/svt-av1-" ,version)))
6987 (copy-recursively "../source/Docs" doc)
6988 #t))))))
6989 (native-inputs
6990 (list yasm))
6991 (synopsis "AV1 video codec")
6992 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
6993work-in-progress, aiming to support video-on-demand and live streaming
6994applications with high performance requirements. It mainly targets
6995Intel-compatible CPUs (x86), but has limited support for other architectures.")
6996 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
6997 (license license:bsd-2)))
6998
6999(define-public svt-av1-3
7000 (package/inherit svt-av1
7001 (version "3.1.2")
7002 (source
7003 (origin
7004 (method git-fetch)
7005 (uri (git-reference
7006 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
7007 (commit (string-append "v" version))))
7008 (file-name (git-file-name "svt-av1" version))
7009 (sha256
7010 (base32 "1ifvf4lmv92w87zc8si96rpcapn330iwkwywq7ysgql2vk2mqapw"))))))
7011
7012(define-public svt-vp9
7013 (package
7014 (name "svt-vp9")
7015 (version "0.3.0")
7016 (source (origin
7017 (method git-fetch)
7018 (uri (git-reference
7019 (url "https://github.com/OpenVisualCloud/SVT-VP9")
7020 (commit (string-append "v" version))))
7021 (file-name (git-file-name name version))
7022 (sha256
7023 (base32
7024 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
7025 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
7026 (supported-systems '("x86_64-linux"))
7027 (build-system cmake-build-system)
7028 (arguments
7029 `(#:tests? #f ; No test suite
7030 #:phases
7031 (modify-phases %standard-phases
7032 (add-after 'install 'install-documentation
7033 (lambda* (#:key outputs #:allow-other-keys)
7034 (let* ((out (assoc-ref %outputs "out"))
7035 (doc (string-append out "/share/doc/" ,name "-" ,version)))
7036 (copy-recursively "../source/Docs" doc)
7037 #t))))))
7038 (native-inputs
7039 (list yasm))
7040 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
7041 (synopsis "VP9 video encoder")
7042 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
7043on supporting video-on-demand and live encoding on Intel Xeon processors.")
7044 (license license:bsd-2)))
7045
7046(define-public w-scan
7047 (package
7048 (name "w-scan")
7049 (version "20170107")
7050 (source
7051 (origin
7052 (method url-fetch)
7053 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
7054 version ".tar.bz2"))
7055 (sha256
7056 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
7057 (build-system gnu-build-system)
7058 (arguments
7059 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
7060 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
7061 (description
7062 "This is a small command line utility used to perform frequency scans for
7063DVB and ATSC transmissions without initial tuning data. It can print the
7064result in several formats:
7065@itemize
7066@item VDR channels.conf,
7067@item czap/tzap/xine/mplayer channels.conf,
7068@item Gstreamer dvbsrc plugin,
7069@item VLC xspf playlist,
7070@item XML,
7071@item initial tuning data for scan or dvbv5-scan.
7072@end itemize\n")
7073 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
7074 (license license:gpl2+)))
7075
7076(define-public rav1e
7077 (package
7078 (name "rav1e")
7079 (version "0.7.1")
7080 (source
7081 (origin
7082 (method url-fetch)
7083 (uri (crate-uri "rav1e" version))
7084 (file-name (string-append name "-" version ".tar.gz"))
7085 (sha256
7086 (base32 "1sawva6nmj2fvynydbcirr3nb7wjyg0id2hz2771qnv6ly0cx1yd"))))
7087 (build-system cargo-build-system)
7088 (arguments
7089 `(#:install-source? #f
7090 #:phases
7091 (modify-phases %standard-phases
7092 (replace 'build
7093 (lambda* (#:key outputs #:allow-other-keys)
7094 (let ((out (assoc-ref outputs "out")))
7095 (invoke "cargo" "cinstall" "--release"
7096 ;; Only build the dynamic library.
7097 "--library-type" "cdylib"
7098 (string-append "--prefix=" out)))))
7099 (add-after 'install 'install-completions
7100 (lambda* (#:key native-inputs outputs #:allow-other-keys)
7101 (unless ,(%current-target-system)
7102 (let* ((out (assoc-ref outputs "out"))
7103 (share (string-append out "/share"))
7104 (bash-completions-dir
7105 (string-append out "/etc/bash_completion.d"))
7106 (zsh-completions-dir
7107 (string-append share "/zsh/site-functions"))
7108 (fish-completions-dir
7109 (string-append share "/fish/vendor_completions.d"))
7110 (elvish-completions-dir
7111 (string-append share "/elvish/lib"))
7112 (rav1e (string-append out "/bin/rav1e"))
7113 (common-flags '("-" "-o" "-" "advanced" "--completion")))
7114 (mkdir-p bash-completions-dir)
7115 (with-output-to-file
7116 (string-append bash-completions-dir "/rav1e")
7117 (lambda _ (apply invoke rav1e (append common-flags '("bash")))))
7118 (mkdir-p zsh-completions-dir)
7119 ;; This one currently fails to build.
7120 ;(with-output-to-file
7121 ; (string-append zsh-completions-dir "/_rav1e")
7122 ; (lambda _ (apply invoke rav1e (append common-flags '("zsh")))))
7123 (mkdir-p fish-completions-dir)
7124 (with-output-to-file
7125 (string-append fish-completions-dir "/rav1e.fish")
7126 (lambda _ (apply invoke rav1e (append common-flags '("fish")))))
7127 (mkdir-p elvish-completions-dir)
7128 (with-output-to-file
7129 (string-append elvish-completions-dir "/rav1e")
7130 (lambda _
7131 (apply invoke rav1e (append common-flags '("elvish"))))))))))))
7132 (native-inputs
7133 (append (if (target-x86?)
7134 (list nasm)
7135 '())
7136 (list pkg-config rust-cargo-c)))
7137 (inputs
7138 (cons* libgit2-1.9 zlib (cargo-inputs 'rav1e)))
7139 (home-page "https://github.com/xiph/rav1e/")
7140 (synopsis "Fast and safe AV1 encoder")
7141 (description "@code{rav1e} is an AV1 video encoder. It is designed to
7142eventually cover all use cases, though in its current form it is most suitable
7143for cases where libaom (the reference encoder) is too slow.")
7144 ;; This package shows a large speed boost when tuned for newer architectures.
7145 (properties `((tunable? . #t)))
7146 (license license:bsd-2)))
7147
7148(define-public peek
7149 (package
7150 (name "peek")
7151 (version "1.5.1")
7152 (source
7153 (origin
7154 (method git-fetch)
7155 (uri (git-reference
7156 (url "https://github.com/phw/peek")
7157 (commit version)))
7158 (file-name (git-file-name name version))
7159 (sha256
7160 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
7161 (build-system meson-build-system)
7162 (arguments '(#:glib-or-gtk? #t))
7163 (inputs
7164 (list gtk+ python-wrapper))
7165 (native-inputs
7166 (list desktop-file-utils ; for update-desktop-database
7167 gettext-minimal
7168 `(,glib "bin") ; for glib-compile-resources
7169 `(,gtk+ "bin") ; For gtk-update-icon-cache
7170 pkg-config
7171 vala))
7172 (home-page "https://github.com/phw/peek")
7173 (synopsis "Simple animated GIF screen recorder")
7174 (description
7175 "Peek makes it easy to create short screencasts of a screen area. It was
7176built for the specific use case of recording screen areas, e.g. for easily
7177showing UI features of your own apps or for showing a bug in bug reports.
7178With Peek, you simply place the Peek window over the area you want to record
7179and press \"Record\". Peek is optimized for generating animated GIFs, but you
7180can also directly record to WebM or MP4 if you prefer.")
7181 (license license:gpl3+)))
7182
7183(define-public python-screenkey
7184 (package
7185 (name "python-screenkey")
7186 (version "1.5")
7187 (source
7188 (origin
7189 (method git-fetch)
7190 (uri (git-reference
7191 (url "https://gitlab.com/screenkey/screenkey")
7192 (commit (string-append "v" version))))
7193 (file-name (git-file-name name version))
7194 (sha256
7195 (base32 "0j719kld4dr85d9lxn0d0b6156mcy09jm7arssfp2n3j6hmjssci"))))
7196 (build-system pyproject-build-system)
7197 (arguments
7198 (list
7199 #:tests? #f ; No tests.
7200 #:phases
7201 #~(modify-phases %standard-phases
7202 (add-after 'unpack 'fix-dlopen-paths
7203 (lambda* (#:key inputs #:allow-other-keys)
7204 (substitute* "Screenkey/xlib.py"
7205 (("(libXtst.so.6|libX11.so.6)" lib)
7206 (search-input-file inputs (string-append "/lib/" lib))))))
7207 (add-after 'install 'wrap-screenkey
7208 (lambda _
7209 (wrap-program (string-append #$output "/bin/screenkey")
7210 `("GUIX_PYTHONPATH" ":" prefix
7211 (,(getenv "GUIX_PYTHONPATH")))
7212 `("GI_TYPELIB_PATH" ":" prefix
7213 (,(getenv "GI_TYPELIB_PATH")))))))))
7214 (inputs (list bash-minimal
7215 gtk+
7216 libx11
7217 libxtst
7218 python-babel
7219 python-dbus
7220 python-pycairo
7221 python-pygobject
7222 slop))
7223 (native-inputs (list python-setuptools))
7224 (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
7225 (synopsis "Screencast tool to display pressed keys")
7226 (description
7227 "Screenkey is a screencast tool to display your keys inspired by
7228Screenflick.")
7229 (license license:gpl3+)))
7230
7231(define-public python-yewtube
7232 (package
7233 (name "python-yewtube")
7234 (version "2.13.1")
7235 (source
7236 (origin
7237 (method git-fetch)
7238 (uri (git-reference
7239 (url "https://github.com/mps-youtube/yewtube")
7240 (commit (string-append "v" version))))
7241 (file-name (git-file-name name version))
7242 (sha256
7243 (base32 "02z4z2a5wy3fz8819fd7k3r4vkjdii0li4x3nfdpx4jqdlr504k9"))))
7244 (build-system pyproject-build-system)
7245 (arguments
7246 (list
7247 #:phases
7248 #~(modify-phases %standard-phases
7249 (add-after 'unpack 'fix-entry-points
7250 (lambda _
7251 (substitute* "setup.py"
7252 ;; main.py is in a "mps_youtube" and not in
7253 ;; "mps_youtube/main", see:
7254 ;; <https://github.com/mps-youtube/yewtube/pull/1334>.
7255 (("yt = mps_youtube:main.main")
7256 "yt = mps_youtube.main:main"))))
7257 (add-after 'unpack 'relax-requirements
7258 (lambda _
7259 (substitute* "mps_youtube/__init__.py"
7260 (("from pip\\._vendor import pkg_resources.*")
7261 "")
7262 (("__version__ =.*")
7263 (format #f "__version__ = ~s~%" #$version)))
7264 (substitute* "requirements.txt"
7265 (("httpx<0.28") "httpx"))))
7266 (add-before 'sanity-check 'set-home
7267 (lambda _
7268 (setenv "HOME" "/tmp"))))))
7269 (native-inputs
7270 (list python-dbus
7271 python-pygobject
7272 python-pytest
7273 python-setuptools))
7274 (propagated-inputs
7275 (list python-pylast
7276 python-pyperclip
7277 python-requests
7278 python-yewtube-search
7279 yt-dlp))
7280 (home-page "https://github.com/mps-youtube/yewtube")
7281 (synopsis "Terminal based YouTube player and downloader")
7282 (description
7283 "This package provides a terminal based @code{YouTube} player and
7284downloader. It does not require a Youtube API key.")
7285 (license license:gpl3+)))
7286
7287(define-deprecated/public-alias mps-youtube python-yewtube)
7288
7289(define-public wf-recorder
7290 (package
7291 (name "wf-recorder")
7292 (version "0.6.0")
7293 (source (origin
7294 (method git-fetch)
7295 (uri (git-reference
7296 (url "https://github.com/ammen99/wf-recorder")
7297 (commit (string-append "v" version))))
7298 (file-name (git-file-name name version))
7299 (sha256
7300 (base32
7301 "14lzx6bz72j0ljw7jjqzqvflsyyvfwp137iwl8if8dcb5mr2k389"))))
7302 (build-system meson-build-system)
7303 (native-inputs
7304 (list pkg-config))
7305 (inputs
7306 (list ffmpeg-6 pipewire pulseaudio wayland wayland-protocols libx264 mesa))
7307 (home-page "https://github.com/ammen99/wf-recorder")
7308 (synopsis "Screen recorder for wlroots-based compositors")
7309 (description
7310 "@code{wf-recorder} is a utility program for screen recording of
7311wlroots-based compositors. More specifically, those that support
7312@code{wlr-screencopy-v1} and @code{xdg-output}.")
7313 (license license:expat)))
7314
7315(define-public guvcview
7316 (package
7317 (name "guvcview")
7318 (version "2.2.1")
7319 (source (origin
7320 (method url-fetch)
7321 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
7322 "src-" version ".tar.bz2"))
7323 (sha256
7324 (base32
7325 "1bz5mpvs590dwfvjwgigs6948l31mldm2sz1qd9yhq99fv7cgbfj"))))
7326 (build-system cmake-build-system)
7327 (arguments (list #:tests? #f)) ;There are no tests
7328 (native-inputs
7329 (list pkg-config intltool))
7330 (inputs
7331 (list gtk+
7332 eudev
7333 libusb
7334 v4l-utils ;libv4l2
7335 ;; Gentoo patch for ffmpeg-8 reported upstream:
7336 ;; https://sourceforge.net/p/guvcview/tickets/79/
7337 ffmpeg-6 ;libavcodec, libavutil
7338 sdl2
7339 gsl
7340 portaudio
7341 alsa-lib))
7342 (home-page "https://guvcview.sourceforge.net/")
7343 (synopsis "Control your webcam and capture videos and images")
7344 (description
7345 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
7346webcam accessible with Video4Linux (V4L2) and to capture videos and images.
7347It provides control over precise settings of the webcam such as exposure,
7348brightness, contrast, and frame rate.")
7349 (license license:gpl2+)))
7350
7351(define-public get-iplayer
7352 (package
7353 (name "get-iplayer")
7354 (version "3.35")
7355 (source
7356 (origin
7357 (method git-fetch)
7358 (uri (git-reference
7359 (url "https://github.com/get-iplayer/get_iplayer")
7360 (commit (string-append "v" version))))
7361 (file-name (git-file-name name version))
7362 (sha256
7363 (base32 "074a1aazryjps44qlmj2lqg7vnx559q4s6k1k1jvgjvadf1fpb3y"))))
7364 (build-system perl-build-system)
7365 (arguments
7366 `(#:tests? #f ; no tests
7367 #:phases
7368 (modify-phases %standard-phases
7369 (delete 'configure)
7370 (delete 'build)
7371 (replace 'install
7372 (lambda* (#:key outputs #:allow-other-keys)
7373 (let* ((out (assoc-ref outputs "out"))
7374 (bin (string-append out "/bin"))
7375 (man (string-append out "/share/man/man1")))
7376 (install-file "get_iplayer" bin)
7377 (install-file "get_iplayer.cgi" bin)
7378 (install-file "get_iplayer.1" man))))
7379 (add-after 'install 'wrap-program
7380 (lambda* (#:key inputs outputs #:allow-other-keys)
7381 (let* ((out (assoc-ref outputs "out"))
7382 (perllib (string-append out "/lib/perl5/site_perl/"
7383 ,(package-version perl))))
7384 (wrap-program (string-append out "/bin/get_iplayer")
7385 `("PERL5LIB" ":"
7386 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
7387 (wrap-program (string-append out "/bin/get_iplayer.cgi")
7388 `("PERL5LIB" ":"
7389 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))))))))
7390 (inputs
7391 (list bash-minimal
7392 perl-mojolicious
7393 perl-lwp-protocol-https
7394 perl-xml-libxml))
7395 (home-page "https://github.com/get-iplayer/get_iplayer")
7396 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
7397 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
7398TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
7399@code{get_iplayer} has three modes: recording a complete programme for later
7400playback, streaming a programme directly to a playback application, such as
7401mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
7402terms and recording programmes automatically. It can also stream or record live
7403BBC iPlayer output.")
7404 (license license:gpl3+)))
7405
7406(define-public libcaption
7407 (package
7408 (name "libcaption")
7409 (version "0.8")
7410 (source (origin
7411 (method git-fetch)
7412 (uri (git-reference
7413 (url "https://github.com/szatmary/libcaption")
7414 (commit (string-append "v" version))))
7415 (file-name (git-file-name name version))
7416 (sha256
7417 (base32
7418 "1m9rw3r502923sch8rz2s1v8wz2klgbi7hqd37l63l3plh837nzn"))))
7419 (build-system cmake-build-system)
7420 (arguments
7421 `(#:tests? #f ; Cannot figure out how to run the unit tests
7422 #:configure-flags '("-DBUILD_SHARED_LIBS=ON"
7423 "-DENABLE_RE2C=ON")))
7424 (native-inputs (list re2c))
7425 (synopsis "CEA608 / CEA708 closed-caption codec")
7426 (description "Libcaption creates and parses closed-caption data,
7427providing an encoder / decoder for the EIA608 and CEA708 closed-caption
7428standards.
7429
7430608 support is currently limited to encoding and decoding the necessary control
7431and preamble codes as well as support for the Basic North American, Special
7432North American and Extended Western European character sets.
7433
7434708 support is limited to encoding the 608 data in NTSC field 1 user data type
7435structure.
7436
7437In addition, utility functions to create h.264 SEI (Supplementary enhancement
7438information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
7439elementary stream are provided.")
7440 (home-page "https://github.com/szatmary/libcaption")
7441 (license license:expat)))
7442
7443(define-public video-contact-sheet
7444 (package
7445 (name "video-contact-sheet")
7446 (version "1.13.4")
7447 (source (origin
7448 (method url-fetch)
7449 (uri (string-append "https://github.com/outlyer-net/"
7450 "video-contact-sheet/releases/download/"
7451 version "/vcs-" version ".tar.gz"))
7452 (sha256
7453 (base32
7454 "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw"))))
7455 (build-system gnu-build-system)
7456 (arguments
7457 (list
7458 #:make-flags
7459 #~(list (string-append "prefix=" #$output))
7460 #:phases
7461 #~(modify-phases %standard-phases
7462 (delete 'configure)
7463 (delete 'build)
7464 (delete 'check)
7465 (add-after 'install 'wrap-program
7466 (lambda _
7467 (wrap-program (string-append #$output "/bin/vcs")
7468 `("PATH" ":" prefix
7469 ,(map (lambda (dir)
7470 (string-append dir "/bin"))
7471 (list #$(this-package-input "ffmpeg")
7472 #$(this-package-input "imagemagick"))))))))))
7473 (inputs
7474 (list bash-minimal ffmpeg imagemagick))
7475 (synopsis "Create contact sheets (preview images) from videos")
7476 (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to
7477create video contact sheets (previews) of videos. Any video supported by
7478MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools
7479VCS, by default, makes screenshots the same size as the video, see the manual
7480for details on how to change this.")
7481 (home-page "https://github.com/outlyer-net/video-contact-sheet")
7482 (license license:lgpl2.1+)))
7483
7484(define-public svtplay-dl
7485 (package
7486 (name "svtplay-dl")
7487 (version "4.173")
7488 (source
7489 (origin
7490 (method git-fetch)
7491 (uri (git-reference
7492 (url "https://github.com/spaam/svtplay-dl")
7493 (commit version)))
7494 (file-name (git-file-name name version))
7495 (sha256
7496 (base32 "1hz4qbsh46qbknmmmz38i2ag1nqfx74gy4izbk5wlhbxknfmd9kx"))))
7497 (build-system pyproject-build-system)
7498 (native-inputs (list python-pytest python-requests-mock python-setuptools))
7499 (inputs (list ffmpeg python-pyaml python-requests python-pysocks
7500 python-cryptography))
7501 (home-page "https://svtplay-dl.se/")
7502 (synopsis "Download or stream SVT Play's (and others) TV programmes")
7503 (description
7504 "@code{svtplay-dl} allows downloading TV programmes from various Swedish
7505broadcasters including SVT Play, Sveriges Radio, TV4 Play, along with many
7506others.")
7507 (license license:expat)))
7508
7509(define-public syncplay
7510 (package
7511 (name "syncplay")
7512 (version "1.7.3")
7513 (source
7514 (origin
7515 (method git-fetch)
7516 (uri (git-reference
7517 (url "https://github.com/Syncplay/syncplay")
7518 (commit (string-append "v" version))))
7519 (file-name (git-file-name name version))
7520 (sha256
7521 (base32 "08bgndszja4n2kql2qmzl6qrzawxvcwmywsc69lq0dzjnpdk96la"))
7522 ;; XXX: python-qt.py has to be unbundled too, with additional efforts.
7523 ;; Here, darkdetect is never reached and is thus easier to remove.
7524 (modules '((guix build utils)))
7525 (snippet #~(delete-file-recursively "syncplay/vendor/darkdetect"))))
7526 (build-system pyproject-build-system)
7527 (arguments
7528 (list
7529 #:tests? #f ; No tests.
7530 #:imported-modules `(,@%pyproject-build-system-modules
7531 (guix build qt-utils)
7532 (guix build utils))
7533 #:modules '((guix build pyproject-build-system)
7534 (guix build qt-utils)
7535 (guix build utils))
7536 #:phases
7537 #~(modify-phases %standard-phases
7538 (replace 'install
7539 (lambda _
7540 (invoke "make" "install" "DESTDIR="
7541 (string-append "PREFIX=" #$output))))
7542 (add-after 'install 'wrap-qt
7543 (lambda* (#:key inputs #:allow-other-keys)
7544 (wrap-qt-program "syncplay"
7545 #:output #$output
7546 #:inputs inputs
7547 #:qt-major-version "6"))))))
7548 (native-inputs (list python-pyside-6 python-setuptools))
7549 (inputs (list bash-minimal
7550 python-certifi
7551 python-idna
7552 python-service-identity
7553 python-twisted
7554 qtwayland))
7555 (home-page "https://syncplay.pl")
7556 (synopsis "Client/server to synchronize media playback on many computers")
7557 (description
7558 "Syncplay is a solution to synchronize video playback across multiple
7559instances of media players over the Internet. When one person pauses/unpauses
7560playback or skips to a position in the video, this is replicated across all
7561media players connected to the same server and in the same \"room\" (viewing
7562session). A built-in text chat for discussing the synced media is also
7563included for convenience.")
7564 (license license:asl2.0)))
7565
7566(define-public showmethekey
7567 (package
7568 (name "showmethekey")
7569 (version "1.21.0")
7570 (source
7571 (origin
7572 (method git-fetch)
7573 (uri (git-reference
7574 (url "https://github.com/AlynxZhou/showmethekey")
7575 (commit (string-append "v" version))))
7576 (file-name (git-file-name name version))
7577 (sha256
7578 (base32 "1zncwnv0w3khd3vc73r2zmhg3j96km021nlszgrmsj0xz5qnbi31"))))
7579 (build-system meson-build-system)
7580 (arguments
7581 (list
7582 #:glib-or-gtk? #t
7583 #:phases
7584 #~(modify-phases %standard-phases
7585 (add-after 'unpack 'setenv
7586 (lambda _
7587 (substitute* "meson.build"
7588 ;; We do that ourselves later--so replace by a dummy
7589 ;; command.
7590 (("gtk4-update-icon-cache")
7591 "true")))))))
7592 (native-inputs (list (list glib "bin") gettext-minimal pkg-config))
7593 (inputs (list libevdev
7594 eudev
7595 libinput
7596 glib
7597 libadwaita
7598 json-glib))
7599 (synopsis "Show keypresses on screen")
7600 (description
7601 "This package shows the keys that the user presses on the
7602screen.
7603
7604Presumably, that's because you are presenting the screen to someone else
7605that should see the keys.
7606
7607This package works in Xorg and Wayland since it directly reads the keys from
7608the evdev device via libinput.
7609
7610Users in group @code{wheel} can skip password authentication.")
7611 (home-page "https://github.com/AlynxZhou/showmethekey")
7612 (license license:asl2.0)))
7613
7614;;;
7615;;; Avoid adding new packages to the end of this file. To reduce the chances
7616;;; of a merge conflict, place them above by existing packages with similar
7617;;; functionality or similar names.
7618;;;