projects/guix·blob ruby-team · refs

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