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