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