1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2020 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
14 ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
15 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
16 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
17 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
19 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
20 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
21 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
22 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
23 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
24 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
25 ;;; Copyright © 2018-2022 Marius Bakke <marius@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
27 ;;; Copyright © 2018, 2019, 2020, 2022 Leo Famulari <leo@famulari.name>
28 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
29 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
30 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
31 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
32 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
33 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
34 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
35 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
36 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
37 ;;; Copyright © 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
38 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
39 ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
40 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
41 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
42 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
43 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
44 ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
45 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
46 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
47 ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
48 ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
49 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
50 ;;; Copyright © 2021 Alexey Abramov <levenson@mmer.org>
51 ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
52 ;;; Copyright © 2021 David Wilson <david@daviwil.com>
53 ;;; Copyright © 2021,2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
54 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
55 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
56 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
57 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
58 ;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
59 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
60 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
61 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
62 ;;; Copyright © 2022 Bird <birdsite@airmail.cc>
63 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
64 ;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
66 ;;; This file is part of GNU Guix.
68 ;;; GNU Guix is free software; you can redistribute it and/or modify it
69 ;;; under the terms of the GNU General Public License as published by
70 ;;; the Free Software Foundation; either version 3 of the License, or (at
71 ;;; your option) any later version.
73 ;;; GNU Guix is distributed in the hope that it will be useful, but
74 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
75 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
76 ;;; GNU General Public License for more details.
78 ;;; You should have received a copy of the GNU General Public License
79 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
81 (define-module (gnu packages video)
82 #:use-module (ice-9 match)
83 #:use-module ((srfi srfi-1) #:hide (zip))
84 #:use-module (srfi srfi-26)
85 #:use-module ((guix licenses) #:prefix license:)
86 #:use-module (guix utils)
87 #:use-module (guix packages)
88 #:use-module (guix download)
89 #:use-module (guix gexp)
90 #:use-module (guix git-download)
91 #:use-module (guix svn-download)
92 #:use-module (guix hg-download)
93 #:use-module (guix build-system cargo)
94 #:use-module (guix build-system cmake)
95 #:use-module (guix build-system copy)
96 #:use-module (guix build-system gnu)
97 #:use-module (guix build-system glib-or-gtk)
98 #:use-module (guix build-system meson)
99 #:use-module (guix build-system perl)
100 #:use-module (guix build-system python)
101 #:use-module (guix build-system qt)
102 #:use-module (guix build-system waf)
103 #:use-module (guix build-system trivial)
104 #:use-module (gnu packages)
105 #:use-module (gnu packages algebra)
106 #:use-module (gnu packages assembly)
107 #:use-module (gnu packages audio)
108 #:use-module (gnu packages autotools)
109 #:use-module (gnu packages avahi)
110 #:use-module (gnu packages backup)
111 #:use-module (gnu packages base)
112 #:use-module (gnu packages bash)
113 #:use-module (gnu packages bison)
114 #:use-module (gnu packages boost)
115 #:use-module (gnu packages build-tools)
116 #:use-module (gnu packages cdrom)
117 #:use-module (gnu packages check)
118 #:use-module (gnu packages cmake)
119 #:use-module (gnu packages compression)
120 #:use-module (gnu packages cpp)
121 #:use-module (gnu packages crates-io)
122 #:use-module (gnu packages crates-graphics)
123 #:use-module (gnu packages curl)
124 #:use-module (gnu packages dbm)
125 #:use-module (gnu packages dejagnu)
126 #:use-module (gnu packages dns)
127 #:use-module (gnu packages docbook)
128 #:use-module (gnu packages documentation)
129 #:use-module (gnu packages elf)
130 #:use-module (gnu packages file)
131 #:use-module (gnu packages flex)
132 #:use-module (gnu packages fonts)
133 #:use-module (gnu packages fontutils)
134 #:use-module (gnu packages freedesktop)
135 #:use-module (gnu packages fribidi)
136 #:use-module (gnu packages gettext)
137 #:use-module (gnu packages ghostscript)
138 #:use-module (gnu packages gl)
139 #:use-module (gnu packages glib)
140 #:use-module (gnu packages guile)
141 #:use-module (gnu packages gnome)
142 #:use-module (gnu packages gnunet)
143 #:use-module (gnu packages gnupg)
144 #:use-module (gnu packages gstreamer)
145 #:use-module (gnu packages gtk)
146 #:use-module (gnu packages haskell-xyz)
147 #:use-module (gnu packages image)
148 #:use-module (gnu packages imagemagick)
149 #:use-module (gnu packages iso-codes)
150 #:use-module (gnu packages libidn)
151 #:use-module (gnu packages libreoffice)
152 #:use-module (gnu packages libusb)
153 #:use-module (gnu packages linux)
154 #:use-module (gnu packages llvm)
155 #:use-module (gnu packages lua)
156 #:use-module (gnu packages m4)
157 #:use-module (gnu packages man)
158 #:use-module (gnu packages markup)
159 #:use-module (gnu packages maths)
160 #:use-module (gnu packages music)
161 #:use-module (gnu packages mp3)
162 #:use-module (gnu packages ncurses)
163 #:use-module (gnu packages networking)
164 #:use-module (gnu packages ocr)
165 #:use-module (gnu packages pcre)
166 #:use-module (gnu packages pciutils)
167 #:use-module (gnu packages perl)
168 #:use-module (gnu packages perl-check)
169 #:use-module (gnu packages perl-web)
170 #:use-module (gnu packages photo)
171 #:use-module (gnu packages pkg-config)
172 #:use-module (gnu packages popt)
173 #:use-module (gnu packages pretty-print)
174 #:use-module (gnu packages protobuf)
175 #:use-module (gnu packages pulseaudio)
176 #:use-module (gnu packages python)
177 #:use-module (gnu packages python-crypto)
178 #:use-module (gnu packages python-web)
179 #:use-module (gnu packages python-xyz)
180 #:use-module (gnu packages qt)
181 #:use-module (gnu packages rdesktop)
182 #:use-module (gnu packages re2c)
183 #:use-module (gnu packages ruby)
184 #:use-module (gnu packages rust-apps)
185 #:use-module (gnu packages samba)
186 #:use-module (gnu packages sdl)
187 #:use-module (gnu packages serialization)
188 #:use-module (gnu packages shells)
189 #:use-module (gnu packages sqlite)
190 #:use-module (gnu packages ssh)
191 #:use-module (gnu packages swig)
192 #:use-module (gnu packages texinfo)
193 #:use-module (gnu packages textutils)
194 #:use-module (gnu packages tls)
195 #:use-module (gnu packages time)
196 #:use-module (gnu packages upnp)
197 #:use-module (gnu packages vulkan)
198 #:use-module (gnu packages web)
199 #:use-module (gnu packages webkit)
200 #:use-module (gnu packages wget)
201 #:use-module (gnu packages wxwidgets)
202 #:use-module (gnu packages xdisorg)
203 #:use-module (gnu packages xiph)
204 #:use-module (gnu packages xml)
205 #:use-module (gnu packages xorg))
207 (define-public transcode
215 (string-append "https://sources.archlinux.org/other/community/"
216 name "/" name "-" version ".tar.bz2"))
218 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
220 (search-patches "transcode-ffmpeg.patch"))))
221 (build-system gnu-build-system)
225 "CFLAGS=-O2 -g -fcommon"
227 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
228 ;; "--enable-libv4l2"
230 "--enable-libmpeg2convert"
232 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
234 ;;; XXX: Not available.
239 ;;; XXX: Not available.
240 ;"--enable-libpostproc"
247 ;;; XXX: Not available.
250 "--enable-libquicktime"
254 ;;; XXX: Not available.
256 ;;"--enable-mjpegtools"
258 "--enable-imagemagick"
259 ;;; XXX: Not available.
260 ;"--enable-libjpegmmx"
261 "--enable-libjpeg")))
262 ;;; XXX: Not available.
292 ;; ("v4l-utils" ,v4l-utils)
301 (synopsis "Audio/Video Transcoder")
302 (description "Transcode is a fast, versatile and command-line based
303 audio/video everything to everything converter primarily focused on producing
304 AVI video files with MP3 audio, but also including a program to read all the
305 video and audio streams from a DVD.")
307 "http://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
308 (license license:gpl2+)))
310 (define-public svt-hevc
319 (url "https://github.com/OpenVisualCloud/SVT-HEVC")
320 (commit (string-append "v" version))))
321 (file-name (git-file-name name version))
323 (base32 "1cv6vcf5yxcwdvj5yqcckbixqrvvdxk7ibincnnv80pz6wh527sv"))))
324 (build-system cmake-build-system)
326 `(#:tests? #f)) ; Test script is stand-alone
329 (synopsis "SVT HEVC encoder")
330 (description "Scalable Video Technology (SVT) is a software-based video
331 coding technology that is highly optimized for Intel's Xeon processors. Using
332 the SVT-HEVC encoder, it is possible to spread video encoding processing across
333 multiple Intel's Xeon processors to achieve a real advantage of processing
335 (home-page "https://01.org/svt")
336 ;; Specifically targets x86_64 Intel hardware.
337 (supported-systems '("x86_64-linux"))
338 (license (license:non-copyleft "file:///LICENSE.md"))))
340 (define-public mediasdk
349 (url "https://github.com/Intel-Media-SDK/MediaSDK")
350 (commit (string-append "intel-" name "-" version))))
351 (file-name (git-file-name name version))
353 (base32 "18mrqringyv1drswm4m8ppw7sks6x4jzp6s0ag0h9hrpd15kn5rx"))))
354 (build-system cmake-build-system)
360 "-DENABLE_X11_DRI3=ON"
361 "-DENABLE_WAYLAND=ON"
362 "-DENABLE_TEXTLOG=ON"
366 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
369 #~(modify-phases %standard-phases
370 (add-after 'unpack 'do-not-embed-kernel-version
372 (substitute* "builder/FindGlobals.cmake"
373 (("set\\([[:blank:]]+?BUILD_INFO \"\\$\\{CMAKE_SYSTEM\\}\
374 \\$\\{CMAKE_SYSTEM_VERSION\\}")
375 "set( BUILD_INFO \"Linux")))))))
377 (list pkg-config python-wrapper))
379 (list libdrm libva libpciaccess wayland libx11))
380 (synopsis "Intel Media SDK")
381 (description "MediaSDK provides a plain C API to access hardware-accelerated
382 video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
383 (home-page "http://mediasdk.intel.com/")
384 (supported-systems '("x86_64-linux" "i686-linux"))
385 (license (license:non-copyleft "file:///LICENSE"))))
387 (define-public schroedinger
389 (name "schroedinger")
395 (string-append "https://launchpad.net/" name "/trunk/" version
396 "/+download/" name "-" version ".tar.gz"))
398 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
399 (build-system gnu-build-system)
400 (outputs '("out" "doc"))
403 (modify-phases %standard-phases
404 (add-after 'install 'move-docs
405 (lambda* (#:key outputs #:allow-other-keys)
406 (let* ((out (assoc-ref outputs "out"))
407 (doc (assoc-ref outputs "doc")))
408 (mkdir-p (string-append doc "/share"))
410 (string-append out "/share/gtk-doc")
411 (string-append doc "/share/gtk-doc"))
414 (list dash gtk-doc/stable pkg-config))
420 (synopsis "Dirac video codec")
421 (description "Schroedinger is a project implementing the Dirac video codec in
422 ANSI C code. It is meant to be highly optimized and portable. It is developed
423 as a joint effort between the BBC and Fluendo.")
424 (home-page "https://launchpad.net/schroedinger")
426 ;; This library is licensed under 4 different licenses,
427 ;; and you can choose to use it under the terms of any one of them.
434 (define-public libquicktime
436 (name "libquicktime")
442 (string-append "https://sourceforge.net/projects/" name "/files/"
443 name "/" version "/" name "-" version ".tar.gz"))
445 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
447 (search-patches "libquicktime-ffmpeg.patch"))))
448 (build-system gnu-build-system)
450 (list gettext-minimal doxygen pkg-config))
466 (synopsis "Quick Time Library")
467 (description "The goal of this project is to enhance the quicktime4linux
469 (home-page "http://libquicktime.sourceforge.net/")
470 (license license:lgpl2.1+)))
472 (define-public mjpg-streamer
474 (name "mjpg-streamer")
479 (url "https://github.com/jacksonliam/mjpg-streamer")
480 (commit (string-append "v" version))))
481 (file-name (git-file-name name version))
484 "0w81pg228154blzbzr590xwhcll9baxyqxl6wxrgqsi9cd7pzq23"))
485 (modules '((guix build utils)))
488 (with-directory-excursion "mjpg-streamer-experimental/www"
489 (for-each delete-file-recursively
495 "jquery.ui.core.min.js"
496 "jquery.ui.custom.css"
497 "jquery.ui.tabs.min.js"
498 "jquery.ui.widget.min.js")))))))
499 (build-system cmake-build-system)
501 '(#:tests? #f ; no test suite
503 (modify-phases %standard-phases
504 (add-after 'unpack 'chdir
506 (chdir "mjpg-streamer-experimental"))))))
507 (inputs (list libjpeg-turbo))
508 (synopsis "Stream JPEG over IP network")
509 (description "Command line application that copies JPEG frames from one or
510 more input plugins to multiple output plugins. It can be used to stream JPEG
511 files over an IP-based network from a webcam to various types of viewers such
512 as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of
513 receiving MJPG streams.")
514 (home-page "https://github.com/jacksonliam/mjpg-streamer")
515 (license license:gpl2+)))
517 (define-public mjpegtools
525 (string-append "https://sourceforge.net/projects/mjpeg/files/"
526 name "/" version "/" name "-" version ".tar.gz"))
528 (base32 "16pl22ra3x2mkp8p3awslhlhj46b1nq9g89301gb0q4rgmnm705i"))))
529 (build-system gnu-build-system)
531 (list gtk+-2 libdv libjpeg-turbo libpng libquicktime sdl))
534 (synopsis "Tools for handling MPEG")
535 (description "Mjpeg tools is a suite of programs which support video capture,
536 editing, playback, and compression to MPEG of MJPEG video. Edit, play and
537 compression software is hardware independent.")
538 (home-page "http://mjpeg.sourceforge.net/")
539 (license license:gpl2+)))
541 (define-public libmms
549 (string-append "https://sourceforge.net/projects/" name "/files/"
550 name "/" version "/" name "-" version ".tar.gz"))
552 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
553 (build-system gnu-build-system)
554 (synopsis "MMS stream protocol library")
555 (description "Libmms is a library for streaming media files using the mmst
556 and mmsh protocols.")
557 (home-page "https://sourceforge.net/projects/libmms/")
558 (license license:lgpl2.1+)))
560 (define-public libvideogfx
569 (url "https://github.com/farindk/libvideogfx")
570 (commit (string-append "v" version))))
571 (file-name (git-file-name name version))
573 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
574 (build-system gnu-build-system)
577 (modify-phases %standard-phases
578 (add-after 'unpack 'fix-build-errors
580 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
581 (("av_close_input_file\\(")
582 "avformat_close_input(&"))
583 (substitute* "libvideogfx/graphics/fileio/png.cc"
584 (("is != NULL") "is.good()"))
587 (list autoconf automake libtool pkg-config))
589 `(("ffmpeg" ,ffmpeg-2.8)
590 ("jpeg" ,libjpeg-turbo)
594 (synopsis "Video processing library")
595 (description "LibVideoGfx is a C++ library for low-level video processing.
596 It aims at speeding up the development process for image and video processing
597 applications by providing high-level classes for commonly required tasks.")
598 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
599 (license license:lgpl2.1+)))
601 (define-public libde265
610 (url "https://github.com/strukturag/libde265")
611 (commit (string-append "v" version))))
612 (file-name (git-file-name name version))
614 (base32 "1dzflqbk248lz5ws0ni5acmf32b3rmnq5gsfaz7691qqjxkl1zml"))))
615 (build-system gnu-build-system)
618 (list "--disable-static")))
620 `(("autoconf" ,autoconf)
621 ("automake" ,automake)
623 ("pkg-config" ,pkg-config)
624 ("python" ,python-wrapper)))
626 `(;; XXX: Build fails with libvideogfx.
627 ;; ("libvideogfx" ,libvideogfx)
630 (synopsis "H.265 video codec implementation")
631 (description "Libde265 is an implementation of the h.265 video codec. It is
632 written from scratch and has a plain C API to enable a simple integration into
634 (home-page "https://www.libde265.org/")
651 (url "https://github.com/libts/tslib")
653 (file-name (git-file-name name version))
655 (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
656 (build-system gnu-build-system)
658 `(#:test-target "tests"
660 (list "--with-sdl2")))
662 (list autoconf automake libtool pkg-config))
665 (synopsis "Touchscreen access library")
666 (description "TSLib is a cross-platform library that provides access to
667 touchscreen devices and the ability to apply filters to their input events.")
668 (home-page "http://www.tslib.org/")
669 (license license:lgpl2.1+)))
671 (define-public libmpeg3
679 (string-append "https://sourceforge.net/projects/heroines/files/"
680 "releases/081108/" name "-" version "-src.tar.bz2"))
682 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
683 (build-system gnu-build-system)
685 `(#:test-target "test"
688 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
689 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
691 (modify-phases %standard-phases
692 (add-after 'unpack 'delete-bundled-a52dec
694 (delete-file-recursively "a52dec-0.7.3")
695 (substitute* "Makefile"
696 (("include Makefile\\.a52")
698 (("\\(A52DIR\\)/include")
699 "(A52DIR)/include/a52dec")
701 (string-append match "-la52 ")))))
702 (add-after 'unpack 'preseed-cflags
705 (string-append "-D_FILE_OFFSET_BITS=64 "
706 "-D_LARGEFILE_SOURCE "
707 "-D_LARGEFILE64_SOURCE"))))
708 (add-before 'install 'create-destination-directory
709 (lambda* (#:key outputs #:allow-other-keys)
710 (let* ((out (string-append (assoc-ref outputs "out"))))
711 (mkdir-p (string-append out "/bin"))))))))
716 (synopsis "Advanced MPEG editing and manipulation library")
717 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
718 and DVD footage in a single library. It supports many esoteric features like
719 parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
721 (home-page "http://heroinewarrior.com/libmpeg3.php")
722 (license license:gpl2+)))
730 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
731 version "/" name "-" version ".tar.gz"))
734 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
735 (build-system gnu-build-system)
738 ("makeinfo" ,texinfo)))
743 (modify-phases %standard-phases
744 (add-after 'unpack 'update-config-scripts
745 (lambda* (#:key inputs native-inputs #:allow-other-keys)
746 ;; Replace outdated config.guess and config.sub.
747 (for-each (lambda (file)
750 (or native-inputs inputs)
751 (string-append "/bin/" file)) "."))
752 '("config.guess" "config.sub"))))
754 (lambda* (#:key build inputs outputs #:allow-other-keys)
755 ;; This old `configure' script doesn't support
756 ;; variables passed as arguments.
757 (let ((out (assoc-ref outputs "out"))
758 (ncurses (assoc-ref inputs "ncurses")))
759 (setenv "CONFIG_SHELL" (which "bash"))
760 (invoke "./configure"
762 (string-append "--prefix=" out)
763 (string-append "--build=" build)
764 (string-append "--with-ncurses="
766 (home-page "http://aa-project.sourceforge.net/aalib/")
767 (synopsis "ASCII-art library")
769 "AA-lib is a low level gfx library which does not require graphics device.
770 In fact, there is no graphical output possible. AA-lib replaces those
771 old-fashioned output methods with powerful ascii-art renderer.")
772 (license license:lgpl2.0+)))
774 (define-public celluloid
781 (uri (string-append "https://github.com/celluloid-player/celluloid"
782 "/releases/download/v" version
783 "/celluloid-" version ".tar.xz"))
785 (base32 "0ns9xh582c8kajw4v2x5ap5jfiba3gxywqc2klc0v6fc3id1gqii"))))
786 (build-system meson-build-system)
791 #~(modify-phases %standard-phases
792 (add-after 'unpack 'disable-postinstall-script
794 (setenv "DESTDIR" "/"))))))
798 `(,glib "bin") ; for glib-compile-resources
800 python-wrapper)) ; for generate-authors.py
802 (list gtk libadwaita libepoxy mpv))
803 (home-page "https://github.com/celluloid-player/celluloid")
804 (synopsis "GTK+ frontend for the mpv media player")
805 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
806 It interacts with mpv via the client API exported by libmpv, allowing access to
807 mpv's powerful playback capabilities.")
808 (license license:gpl3+)))
810 (define-public liba52
817 ;; A mirror://sourceforge URI doesn't work, presumably
818 ;; because the SourceForge project is misconfigured.
819 "http://liba52.sourceforge.net/files/a52dec-" version
823 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
824 (patches (search-patches "liba52-enable-pic.patch"
825 "liba52-set-soname.patch"
826 "liba52-use-mtune-not-mcpu.patch"
827 "liba52-link-with-libm.patch"))))
828 (build-system gnu-build-system)
829 ;; XXX We need to run ./bootstrap because of the build system fixes above.
831 (list autoconf automake libtool))
832 (arguments `(#:configure-flags '("--enable-shared")
834 (modify-phases %standard-phases
835 ;; XXX We need to run ./bootstrap because of the build
836 ;; system fixes above.
838 (lambda _ (invoke "sh" "bootstrap"))))))
839 (home-page "http://liba52.sourceforge.net/")
840 (synopsis "ATSC A/52 audio stream decoder")
841 (description "liba52 is a library for decoding ATSC A/52 audio streams.
842 The A/52 standard is used in a variety of applications, including digital
843 television and DVD. It is also known as AC-3.")
844 (license license:gpl2+)))
846 (define-public libaom
853 (url "https://aomedia.googlesource.com/aom/")
854 (commit (string-append "v" version))))
855 (file-name (git-file-name name version))
858 "024vhsx7bw9kajk65hhh5vmqrja0h33rmlcpngsj3yg4p8l29943"))))
859 (build-system cmake-build-system)
861 (list perl pkg-config python)) ; to detect the version
863 `(#:tests? #f ; downloads many video clips
865 (list "-DBUILD_SHARED_LIBS=YES"
867 "-DAOM_TARGET_CPU=generic"
868 (string-append "-DCMAKE_INSTALL_PREFIX="
869 (assoc-ref %outputs "out")))
871 (modify-phases %standard-phases
872 (add-after 'install 'delete-static-libraries
873 (lambda* (#:key outputs #:allow-other-keys)
874 (let* ((out (assoc-ref outputs "out"))
875 (lib (string-append out "/lib")))
876 (for-each delete-file
877 (find-files lib "\\.a$"))))))))
878 (home-page "https://aomedia.googlesource.com/aom/")
879 (synopsis "AV1 video codec")
880 (description "Libaom is the reference implementation of AV1. It includes a
881 shared library and encoder and decoder command-line executables.")
882 (license license:bsd-2)))
884 (define-public libmpeg2
890 ;; A mirror://sourceforge URI doesn't work, presumably
891 ;; because the SourceForge project is misconfigured.
892 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
893 name "-" version ".tar.gz"))
894 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
895 "libmpeg2-global-symbol-test.patch"))
898 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
906 (build-system gnu-build-system)
907 (home-page "http://libmpeg2.sourceforge.net/")
908 (synopsis "MPEG1 and MPEG2 video decoder library")
910 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
911 (license license:gpl2+)))
913 (define-public libx264
914 ;; There are no tags in the repository, so we take the version number from
915 ;; the X264_BUILD variable defined in x264.h.
916 (let ((version "161")
917 (commit "4c2aafd864dd201832ec2be0fef4484925146650")
921 (version (git-version version revision commit))
925 (url "https://code.videolan.org/videolan/x264.git")
927 (file-name (git-file-name name version))
930 "1i6v9h3xx9pi0zmlj3anwwjxqa63sbhy9crrif8dphipwfn9hyg5"))))
931 (build-system gnu-build-system)
933 (list pkg-config nasm))
936 ;; TODO: Add gpac input
938 `(#:tests? #f ;no check target
939 #:configure-flags '("--enable-shared"
940 ;; Don't build the command-line program. If we
941 ;; want it later, we should do so in a different
942 ;; package to avoid a circular dependency (the x264
943 ;; program depends on ffmpeg and ffmpeg depends on
948 ;; On MIPS, we must pass "--disable-asm" or else
949 ;; configure fails after printing: "You specified a
950 ;; pre-MSA CPU in your CFLAGS. If you really want
951 ;; to run on such a CPU, configure with
953 ,@(if (string-prefix? "mips"
954 (or (%current-target-system)
959 (modify-phases %standard-phases
960 (add-after 'unpack 'update-config-scripts
961 (lambda* (#:key native-inputs inputs #:allow-other-keys)
962 (for-each (lambda (file)
965 (or native-inputs inputs)
966 (string-append "/bin/" file)) "."))
967 '("config.guess" "config.sub")))))))
968 (home-page "https://www.videolan.org/developers/x264.html")
969 (synopsis "H.264 video coding library")
970 (description "libx264 is an advanced encoding library for creating
971 H.264 (MPEG-4 AVC) video streams.")
972 (license (list license:gpl2+ ;most files
973 license:isc ;common/x86/x86inc.asm
974 license:lgpl2.1+ ;extras/getopt.c
975 license:bsd-3 ;extras/inttypes.h
976 (license:non-copyleft ;extras/cl*.h
978 "See extras/cl.h in the distribution."))))))
980 (define-public mkvtoolnix
987 (uri (string-append "https://mkvtoolnix.download/sources/"
988 "mkvtoolnix-" version ".tar.xz"))
990 (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s"))
991 (modules '((guix build utils)))
993 ;; Delete bundled libraries.
994 (for-each delete-file-recursively
1002 (build-system gnu-build-system)
1003 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
1024 `(("docbook-xsl" ,docbook-xsl)
1025 ("gettext" ,gettext-minimal)
1026 ("googletest" ,googletest)
1027 ("libxslt" ,libxslt)
1028 ("json-modern-cxx" ,json-modern-cxx)
1030 ("pkg-config" ,pkg-config)
1032 ("qttools-5" ,qttools-5)
1036 (list (string-append "--with-boost="
1037 (assoc-ref %build-inputs "boost"))
1038 (string-append "--with-docbook-xsl-root="
1039 (assoc-ref %build-inputs "docbook-xsl")
1040 "/xml/xsl/docbook-xsl-"
1041 ,(package-version docbook-xsl))
1042 "--enable-update-check=no"
1043 "--enable-precompiled-headers=no")
1045 (modify-phases %standard-phases
1046 (add-after 'unpack 'patch-relative-file-names
1047 (lambda* (#:key outputs #:allow-other-keys)
1048 (let ((out (assoc-ref outputs "out")))
1049 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
1051 (string-append out "/bin/" match)))
1053 (add-before 'configure 'add-googletest
1054 (lambda* (#:key inputs #:allow-other-keys)
1055 (symlink (search-input-directory inputs "/include/gtest")
1059 (let ((-j (list "-j" (number->string (parallel-job-count)))))
1060 (apply invoke "rake" -j))))
1063 (invoke "rake" "tests/unit")))
1066 (invoke "rake" "install")))
1067 (add-after 'install 'post-install
1068 (lambda* (#:key outputs #:allow-other-keys)
1069 ;; Move the Qt interface to "gui".
1070 (let* ((out (assoc-ref outputs "out"))
1071 (gui (assoc-ref outputs "gui"))
1072 (strip-store-dir (lambda (path)
1073 (substring path (string-prefix-length out path)))))
1076 (mkdir-p (string-append gui (dirname file)))
1077 (rename-file (string-append out file)
1078 (string-append gui file)))
1079 (append '("/bin/mkvtoolnix-gui"
1080 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
1081 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
1082 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
1083 (map strip-store-dir (find-files out "\\.ogg$"))
1084 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
1085 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
1088 (delete-file-recursively (string-append out file)))
1089 '("/share/applications"
1092 "/share/mkvtoolnix")))
1094 (home-page "https://mkvtoolnix.download")
1095 (synopsis "Tools to create, alter and inspect Matroska files")
1097 "MKVToolNix provides tools for getting information about Matroska files
1098 (@command{mkvinfo}), extracting tracks/data from Matroska files
1099 (@command{mkvextract}), and creating Matroska files from other media files
1100 (@command{mkvmerge}).")
1101 (license license:gpl2)))
1103 (define-public pipe-viewer
1105 (name "pipe-viewer")
1112 (url "https://github.com/trizen/pipe-viewer")
1114 (file-name (git-file-name name version))
1116 (base32 "0c2v4pj86442sp71ndjmvd2bl1grp6g9ya2ywdaihq1f2djk6jxl"))))
1117 (build-system perl-build-system)
1119 `(#:imported-modules
1120 ((guix build copy-build-system)
1121 ,@%perl-build-system-modules)
1123 (((guix build copy-build-system)
1125 (guix build perl-build-system)
1128 #:module-build-flags
1132 (modify-phases %standard-phases
1133 (add-after 'unpack 'patch-source
1134 (lambda* (#:key inputs #:allow-other-keys)
1135 (substitute* (find-files "lib" "\\.pm$")
1137 (format #f "\"~a/bin/yt-dlp\""
1138 (assoc-ref inputs "yt-dlp"))))
1139 (substitute* (find-files "bin" ".*-viewer$")
1141 (format #f "'~a/bin/ffmpeg'"
1142 (assoc-ref inputs "ffmpeg")))
1144 (format #f "'~a/bin/wget'"
1145 (assoc-ref inputs "wget")))
1147 (format #f "'~a/bin/xdg-open'"
1148 (assoc-ref inputs "xdg-utils")))
1150 (format #f "'~a/bin/yt-dlp'"
1151 (assoc-ref inputs "yt-dlp"))))))
1152 (add-after 'install 'install-xdg
1154 (apply (assoc-ref copy:%standard-phases 'install)
1156 '(("share/icons" "share/pixmaps")
1157 ("share" "share/applications"
1158 #:include-regexp ("\\.desktop$")))
1160 (add-after 'install-xdg 'wrap-programs
1161 (lambda* (#:key outputs #:allow-other-keys)
1162 (let* ((out (assoc-ref outputs "out"))
1163 (bin-dir (string-append out "/bin/"))
1164 (site-dir (string-append out "/lib/perl5/site_perl/"))
1165 (perl-lib (getenv "PERL5LIB"))
1166 (gi-typelib (getenv "GI_TYPELIB_PATH")))
1168 (cut wrap-program <>
1169 `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
1170 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
1171 (find-files bin-dir))))))))
1173 (list perl-module-build perl-test-pod perl-test-simple))
1175 (list perl-data-dump
1187 perl-lwp-protocol-https
1188 perl-lwp-useragent-cached
1192 perl-scalar-list-utils
1195 perl-term-readline-gnu
1196 perl-text-parsewords
1198 perl-unicode-linebreak
1205 (home-page "https://github.com/trizen/pipe-viewer")
1206 (synopsis "CLI+GUI YouTube Client")
1207 (description "Pipe-Viewer is a lightweight application for searching and
1208 playing videos from YouTube. It parses the YouTube website directly and relies
1209 on the Invidious instances only as a fallback method.")
1210 (license license:artistic2.0)))
1212 (define-public straw-viewer
1213 (deprecated-package "straw-viewer" pipe-viewer))
1219 (outputs '("out" "static"))
1223 (uri (string-append "https://bitbucket.org/multicoreware/x265_git"
1224 "/downloads/x265_" version ".tar.gz"))
1226 (base32 "1s6afxj61jdwfjnn70dwiql34fbqsvn6zv10785vmjyar8sk62p7"))
1227 (patches (search-patches "x265-arm-flags.patch"))
1228 (modules '((guix build utils)))
1230 (delete-file-recursively "source/compat/getopt")))))
1231 (build-system cmake-build-system)
1233 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1234 (if (string-prefix? "i686" (%current-system))
1238 `(#:tests? #f ; tests are skipped if ENABLE_ASSEMBLY is TRUE.
1240 ;; Ensure position independent code for everyone.
1241 (list "-DENABLE_PIC=TRUE"
1242 (string-append "-DCMAKE_INSTALL_PREFIX="
1243 (assoc-ref %outputs "out")))
1245 (modify-phases %standard-phases
1246 (add-after 'unpack 'prepare-build
1248 (delete-file-recursively "build")
1250 ;; We're not building from a git or mercurial repository,
1251 ;; so help cmake find the version number.
1252 (substitute* "cmake/Version.cmake"
1253 (("if\\(X265_TAG_DISTANCE STREQUAL \"0\"\\)")
1254 (string-append "if(TRUE)\n"
1255 " set(X265_LATEST_TAG \"" ,version "\")\n")))))
1256 (add-before 'configure 'build-12-bit
1257 (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
1258 (mkdir "../build-12bit")
1259 (with-directory-excursion "../build-12bit"
1262 ,@(if (target-aarch64?)
1263 '("-DENABLE_ASSEMBLY=OFF")
1265 ;; Altivec code produces many build errors.
1266 ,@(if (target-ppc64le?)
1267 '("-DENABLE_ALTIVEC=OFF")
1269 "-DHIGH_BIT_DEPTH=ON"
1270 "-DEXPORT_C_API=OFF"
1274 (substitute* (cons "cmake_install.cmake"
1276 (find-files "CMakeFiles/x265-shared.dir")
1277 (find-files "CMakeFiles/x265-static.dir")))
1278 (("libx265") "libx265_main12"))
1279 ((assoc-ref %standard-phases 'build)))))
1280 (add-before 'configure 'build-10-bit
1281 (lambda* (#:key (configure-flags '()) #:allow-other-keys #:rest args)
1282 (mkdir "../build-10bit")
1283 (with-directory-excursion "../build-10bit"
1286 ,@(if (target-aarch64?)
1287 '("-DENABLE_ASSEMBLY=OFF")
1289 ;; Altivec code produces many build errors.
1290 ,@(if (target-ppc64le?)
1291 '("-DENABLE_ALTIVEC=OFF")
1293 "-DHIGH_BIT_DEPTH=ON"
1294 "-DEXPORT_C_API=OFF"
1297 (substitute* (cons "cmake_install.cmake"
1299 (find-files "CMakeFiles/x265-shared.dir")
1300 (find-files "CMakeFiles/x265-static.dir")))
1301 (("libx265") "libx265_main10"))
1302 ((assoc-ref %standard-phases 'build)))))
1303 (add-after 'install 'install-more-libs
1305 (with-directory-excursion "../build-12bit"
1306 ((assoc-ref %standard-phases 'install)))
1307 (with-directory-excursion "../build-10bit"
1308 ((assoc-ref %standard-phases 'install)))))
1309 (add-before 'strip 'move-static-libs
1310 (lambda* (#:key outputs #:allow-other-keys)
1311 (let ((out (assoc-ref outputs "out"))
1312 (static (assoc-ref outputs "static")))
1313 (mkdir-p (string-append static "/lib"))
1314 (with-directory-excursion
1315 (string-append out "/lib")
1319 (string-append static "/lib/" file)))
1320 (find-files "." "\\.a$")))))))))
1321 (home-page "http://x265.org/")
1322 (synopsis "Library for encoding h.265/HEVC video streams")
1323 (description "x265 is a H.265 / HEVC video encoder application library,
1324 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1325 (license license:gpl2+)))
1327 (define-public libass
1334 "https://github.com/libass/libass/releases/download/"
1335 version "/libass-" version ".tar.xz"))
1338 "0lwfmdizzrr4gcq3fgw4j8g9pkrqgx6h0f3pgrrnxc07s34kkp8w"))))
1339 (build-system gnu-build-system)
1341 '(#:configure-flags '("--disable-static")))
1343 (list pkg-config nasm))
1345 `(("freetype" ,freetype)
1346 ("fribidi" ,fribidi)
1347 ("fontconfig" ,fontconfig)
1348 ("harfbuzz" ,harfbuzz)))
1349 (home-page "https://github.com/libass/libass")
1350 (synopsis "Subtitle rendering library for the ASS/SSA format")
1351 (description "libass is a subtitle rendering library for the
1352 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1353 (license license:isc)))
1355 (define-public libcaca
1358 (version "0.99.beta19")
1361 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1365 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
1366 (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
1367 "libcaca-CVE-2021-3410-pt2.patch"))))
1368 (build-system gnu-build-system)
1370 '(#:configure-flags '("--disable-static")))
1371 (native-inputs (list pkg-config))
1380 (home-page "http://caca.zoy.org/wiki/libcaca")
1381 (synopsis "Colour ASCII-art library")
1382 (description "libcaca is a graphics library that outputs text instead of
1383 pixels, so that it can work on older video cards or text terminals. It
1384 supports Unicode, 2048 colors, dithering of color images, and advanced text
1385 canvas operations.")
1386 (license license:wtfpl2)))
1388 (define-public libdca
1395 "https://download.videolan.org/pub/videolan/libdca/"
1396 version "/libdca-" version ".tar.bz2"))
1399 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1400 (build-system gnu-build-system)
1402 (list autoconf automake libtool))
1403 (home-page "https://www.videolan.org/developers/libdca.html")
1404 (synopsis "DTS Coherent Acoustics decoder")
1405 (description "libdca is a library for decoding DTS Coherent Acoustics
1407 (license license:gpl2+)))
1409 (define-public libdv
1416 "mirror://sourceforge/libdv/libdv/"
1417 version "/libdv-" version ".tar.gz"))
1420 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1421 (build-system gnu-build-system)
1422 (native-inputs (list pkg-config))
1423 (inputs (list libxv))
1424 (home-page "http://libdv.sourceforge.net/")
1425 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1426 (description "The Quasar DV codec (libdv) is a software codec for DV
1427 video, the encoding format used by most digital camcorders, typically those
1428 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1429 developed according to the official standards for DV video: IEC 61834 and
1431 (license license:lgpl2.1+)))
1433 (define-public libmatroska
1435 (name "libmatroska")
1440 (uri (string-append "https://dl.matroska.org/downloads/"
1441 "libmatroska/libmatroska-" version ".tar.xz"))
1443 (base32 "06h81sxyz2riic0gpzik6ffcnq32wrqphi8c6k55glcdymiimyfs"))))
1444 (build-system cmake-build-system)
1449 (list "-DBUILD_SHARED_LIBS=YES")
1450 #:tests? #f)) ; no test suite
1451 (home-page "https://www.matroska.org")
1452 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1454 "Matroska aims to become the standard of multimedia container formats.
1455 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1456 of XML. EBML enables the Matroska Development Team to gain significant
1457 advantages in terms of future format extensibility, without breaking file
1458 support in old parsers.
1459 libebml is a C++ library to read and write EBML files.")
1460 (license license:lgpl2.1)))
1462 (define-public libplacebo
1470 (url "https://code.videolan.org/videolan/libplacebo.git")
1471 (commit (string-append "v" version))))
1472 (file-name (git-file-name name version))
1474 (base32 "161dp5781s74ca3gglaxlmchx7glyshf0wg43w98pl22n1jcm5qk"))))
1475 (build-system meson-build-system)
1478 `("-Dopengl=enabled"
1479 ,(string-append "-Dvulkan-registry="
1480 (assoc-ref %build-inputs "vulkan-headers")
1481 "/share/vulkan/registry/vk.xml"))))
1483 (list python python-mako pkg-config))
1491 (home-page "https://code.videolan.org/videolan/libplacebo")
1492 (synopsis "GPU-accelerated image/video processing library")
1493 (description "libplacebo is, in a nutshell, the core rendering algorithms
1494 and ideas of mpv rewritten as an independent library. As of today, libplacebo
1495 contains a large assortment of video processing shaders, focusing on both
1496 quality and performance.")
1497 (license license:lgpl2.1+)))
1499 (define-public libva
1506 (uri (string-append "https://github.com/intel/libva/releases/download/"
1507 version "/libva-" version ".tar.bz2"))
1509 (base32 "1jhy8qzfp4ydbxs9qd9km7k5wq8r4s2vq20r1q07lgld8l4x93i5"))))
1510 (build-system gnu-build-system)
1522 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1523 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1525 #~(list (string-append "--with-drivers-path="
1526 (search-input-directory %build-inputs "lib/dri")))
1527 ;; However, we can't write to mesa's store directory, so override the
1528 ;; following make variable to install the dummy driver to libva's
1529 ;; $prefix/lib/dri directory.
1531 #~(list (string-append "dummy_drv_video_ladir=" #$output "/lib/dri"))
1533 #~(modify-phases %standard-phases
1534 (add-before 'build 'fix-dlopen-paths
1536 (substitute* "va/drm/va_drm_auth_x11.c"
1537 (("\"libva-x11\\.so\\.%d\"")
1538 (string-append "\"" #$output "/lib/libva-x11.so.%d\""))))))))
1539 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1540 (synopsis "Video acceleration library")
1541 (description "The main motivation for VA-API (Video Acceleration API) is
1542 to enable hardware accelerated video decode/encode at various
1543 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1544 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1545 (license license:expat)))
1547 (define-public libva-utils
1549 (name "libva-utils")
1554 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1555 version "/libva-utils-" version ".tar.bz2"))
1557 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1558 (build-system gnu-build-system)
1561 (list "--enable-wayland"
1566 (list libdrm libva libx11 mesa wayland))
1567 (home-page "https://01.org/linuxmedia/vaapi")
1568 (synopsis "Collection of testing utilities for VA-API")
1570 "This is a collection of utilities to query and test the @acronym{VA-API,
1571 Video Acceleration API} implemented by the libva library.
1573 These tools require a supported graphics chip, driver, and VA-API back end to
1575 (license license:expat)))
1577 (define-public ffmpeg-5
1583 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1587 "1p7kxr0f9f9d0pyyxq9ciaj9ch2drmcw5p9jk22j111ccrnp17k1"))))
1588 (build-system gnu-build-system)
1591 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1592 ;; See also the related configure flag when changing this.
1593 (if (target-x86-64?) (list rav1e) '())
1636 #:test-target "fate"
1638 ;; possible additional inputs:
1639 ;; --enable-avisynth enable reading of AviSynth script
1641 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1642 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1643 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1644 ;; and libraw1394 [no]
1645 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1646 ;; --enable-libflite enable flite (voice synthesis) support via
1648 ;; --enable-libgme enable Game Music Emu via libgme [no]
1649 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1650 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1651 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1652 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1653 ;; --enable-libnut enable NUT (de)muxing via libnut,
1654 ;; native (de)muxer exists [no]
1655 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1656 ;; libopencore-amrnb [no]
1657 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1658 ;; libopencore-amrwb [no]
1659 ;; --enable-libopencv enable video filtering via libopencv [no]
1660 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1662 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1663 ;; --enable-libschroedinger enable Dirac de/encoding via
1664 ;; libschroedinger [no]
1665 ;; --enable-libshine enable fixed-point MP3 encoding via
1667 ;; --enable-libssh enable SFTP protocol via libssh [no]
1668 ;; (libssh2 does not work)
1669 ;; --enable-libstagefright-h264 enable H.264 decoding via
1670 ;; libstagefright [no]
1671 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1673 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1674 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1675 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1676 ;; libvo-amrwbenc [no]
1677 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1678 ;; --enable-libxavs enable AVS encoding via xavs [no]
1679 ;; --enable-libzmq enable message passing via libzmq [no]
1680 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1681 ;; --enable-opencl enable OpenCL code
1683 "--enable-gpl" ;enable optional gpl licensed parts
1686 "--enable-fontconfig"
1691 "--enable-libbluray"
1695 "--enable-libfreetype"
1696 "--enable-libmp3lame"
1699 #$@(if (target-x86-64?)
1700 '("--enable-librav1e")
1705 "--enable-libtheora"
1706 "--enable-libtwolame"
1707 "--enable-libvidstab"
1708 "--enable-libvorbis"
1718 "--enable-runtime-cpudetect"
1720 ;; The HTML pages take 7.2 MiB
1721 "--disable-htmlpages"
1723 ;; The static libraries are 23 MiB
1726 #$@(if (target-riscv64?)
1727 '("--extra-cflags=-fPIC")
1730 ;; Runtime cpu detection is not implemented on
1731 ;; MIPS, so we disable some features.
1732 "--disable-mips32r2"
1734 "--disable-mipsdspr2"
1735 "--disable-mipsfpu")
1737 #~(modify-phases %standard-phases
1739 ;; configure does not work followed by "SHELL=..." and
1740 ;; "CONFIG_SHELL=..."; set environment variables instead
1741 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1742 (let ((out (assoc-ref outputs "out")))
1743 (substitute* "configure"
1744 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1745 (setenv "SHELL" (which "bash"))
1746 (setenv "CONFIG_SHELL" (which "bash"))
1749 (string-append "--prefix=" out)
1750 ;; Add $libdir to the RUNPATH of all the binaries.
1751 (string-append "--extra-ldflags=-Wl,-rpath="
1754 (add-before 'check 'set-ld-library-path
1756 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1758 (let* ((dso (find-files "." "\\.so$"))
1759 (path (string-join (map dirname dso) ":")))
1760 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1761 (setenv "LD_LIBRARY_PATH" path)))))))
1762 (home-page "https://www.ffmpeg.org/")
1763 (synopsis "Audio and video framework")
1764 (description "FFmpeg is a complete, cross-platform solution to record,
1765 convert and stream audio and video. It includes the libavcodec
1766 audio/video codec library.")
1767 (license license:gpl2+)))
1769 (define-public ffmpeg-4
1775 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1779 "14xadxm1yaamp216nq09xwasxg5g133v86dbb33mdg5di1zrlhdg"))))
1780 (inputs (modify-inputs (package-inputs ffmpeg-5)
1781 (replace "sdl2" sdl2-2.0)))
1783 (substitute-keyword-arguments (package-arguments ffmpeg-5)
1784 ((#:configure-flags flags ''())
1785 #~(cons "--enable-avresample" #$flags))))))
1787 (define-public ffmpeg-3.4
1793 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1797 "1rijdvcx8xjqwh084qchwz91vcj8wsvb4diax0g8miywpir00ccw"))))
1799 (substitute-keyword-arguments (package-arguments ffmpeg-4)
1800 ((#:modules modules %gnu-build-system-modules)
1803 ((#:configure-flags flags)
1804 #~(fold delete #$flags
1805 '("--enable-libdav1d"
1808 "--enable-libsrt")))))
1809 (inputs (modify-inputs (package-inputs ffmpeg-4)
1810 (delete "dav1d" "libaom" "rav1e" "srt")))))
1812 (define-public ffmpeg-2.8
1814 (inherit ffmpeg-3.4)
1818 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1822 "1ivnfqmfnp3zmn1q2dxy4p85427y3r6d3jbnl5kprr7lqckf6rl5"))))
1824 `(#:tests? #f ; XXX: Enable them later, if required
1829 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1831 (modify-phases %standard-phases
1833 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1834 (let ((out (assoc-ref outputs "out")))
1835 (substitute* "configure"
1836 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1837 ;; configure does not work followed by "SHELL=..." and
1838 ;; "CONFIG_SHELL=..."; set environment variables instead.
1839 (setenv "SHELL" (which "bash"))
1840 (setenv "CONFIG_SHELL" (which "bash"))
1843 (string-append "--prefix=" out)
1844 ;; Add $libdir to the RUNPATH of all the binaries.
1845 (string-append "--extra-ldflags=-Wl,-rpath="
1849 'check 'set-ld-library-path
1851 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1853 (let* ((dso (find-files "." "\\.so$"))
1854 (path (string-join (map dirname dso) ":")))
1855 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1856 (setenv "LD_LIBRARY_PATH" path)))))))))
1858 (define-public ffmpeg ffmpeg-4)
1860 (define-public ffmpeg-for-stepmania
1869 (url "https://github.com/stepmania/ffmpeg")
1870 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1872 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1873 (file-name (git-file-name "ffmpeg" version))))
1875 (substitute-keyword-arguments (package-arguments ffmpeg-4)
1876 ((#:configure-flags flags)
1877 #~(list "--disable-programs"
1880 "--disable-avdevice"
1881 "--disable-swresample"
1882 "--disable-postproc"
1883 "--disable-avfilter"
1885 "--enable-static"))))
1888 (define-public ffmpegthumbnailer
1890 (name "ffmpegthumbnailer")
1895 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
1897 (file-name (git-file-name name version))
1900 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1901 (build-system cmake-build-system)
1905 (list ffmpeg libjpeg-turbo libpng gvfs))
1907 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1908 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1909 (synopsis "Create thumbnails from video files")
1910 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1911 can be used by file managers to create thumbnails for your video files. The
1912 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1913 videoformats depend on the configuration flags of ffmpeg.")
1914 (license license:gpl2+)))
1919 (version "3.0.17.4")
1923 "https://download.videolan.org/pub/videolan/vlc/"
1924 (car (string-split version #\-))
1925 "/vlc-" version ".tar.xz"))
1928 "0cs1vnv91mg7p6253v6wms3zlz91xzphpwaw14dmrd2gibc64nlc"))))
1929 (build-system gnu-build-system)
1931 (list flex bison gettext-minimal pkg-config))
1932 ;; FIXME: Add optional inputs once available.
1969 (librsvg-for-system)
2012 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
2013 (assoc-ref %build-inputs "ffmpeg")
2014 "/lib")) ;needed for the tests
2017 (modify-phases %standard-phases
2018 (add-after 'unpack 'patch-source
2019 (lambda* (#:key inputs #:allow-other-keys)
2020 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
2021 (substitute* "configure"
2022 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
2023 (string-append "LIVE555_PREFIX=" livemedia-utils)))
2024 ;; Some of the tests require using the display to test out VLC,
2025 ;; which fails in our sandboxed build system
2026 (substitute* "test/run_vlc.sh"
2027 (("./vlc --ignore-config") "echo"))
2029 (add-after 'strip 'regenerate-plugin-cache
2030 (lambda* (#:key outputs #:allow-other-keys)
2031 ;; The 'install-exec-hook' rule in the top-level Makefile.am
2032 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
2033 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
2034 ;; it references. Thus, we first reset the timestamps of all
2035 ;; these files, and then regenerate the cache such that the
2036 ;; mtimes it includes are always zero instead of being dependent
2037 ;; on the build time.
2038 (let* ((out (assoc-ref outputs "out"))
2039 (pkglibdir (string-append out "/lib/vlc"))
2040 (plugindir (string-append pkglibdir "/plugins"))
2041 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
2042 ;; TODO: Factorize 'reset-timestamps'.
2043 (for-each (lambda (file)
2044 (let ((s (lstat file)))
2045 (unless (eq? (stat:type s) 'symlink)
2047 (find-files plugindir))
2048 (invoke cachegen plugindir))))
2049 (add-after 'install 'wrap-executable
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 (let ((out (assoc-ref outputs "out"))
2052 (plugin-path (getenv "QT_PLUGIN_PATH")))
2053 (wrap-program (string-append out "/bin/vlc")
2054 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
2056 (home-page "https://www.videolan.org/")
2057 (synopsis "Audio and video framework")
2058 (description "VLC is a cross-platform multimedia player and framework
2059 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
2060 streaming protocols.")
2062 '((release-monitoring-url . "https://download.videolan.org/pub/videolan/vlc/last")))
2063 (license license:gpl2+)))
2065 (define-public mplayer
2072 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
2076 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
2077 (build-system gnu-build-system)
2078 ;; FIXME: Add additional inputs once available.
2080 (list pkg-config yasm))
2082 `(("alsa-lib" ,alsa-lib)
2083 ("cdparanoia" ,cdparanoia)
2085 ("fontconfig" ,fontconfig)
2086 ("freetype" ,freetype)
2090 ("libdvdcss" ,libdvdcss)
2091 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
2092 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
2093 ("libjpeg" ,libjpeg-turbo)
2094 ("libmpeg2" ,libmpeg2)
2095 ("libmpg123" ,mpg123) ; audio codec for MP3
2097 ("libtheora" ,libtheora)
2098 ("libvdpau" ,libvdpau)
2099 ("libvorbis" ,libvorbis)
2101 ("libx264" ,libx264)
2102 ("libxinerama" ,libxinerama)
2104 ("libxxf86dga" ,libxxf86dga)
2108 ("pulseaudio" ,pulseaudio)
2109 ("python" ,python-wrapper)
2114 `(#:tests? #f ; no test target
2116 (modify-phases %standard-phases
2118 ;; configure does not work followed by "SHELL=..." and
2119 ;; "CONFIG_SHELL=..."; set environment variables instead
2120 (lambda* (#:key inputs outputs #:allow-other-keys)
2121 (let ((out (assoc-ref outputs "out"))
2122 (libx11 (assoc-ref inputs "libx11")))
2123 (substitute* "configure"
2124 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2125 (setenv "SHELL" (which "bash"))
2126 (setenv "CONFIG_SHELL" (which "bash"))
2127 (invoke "./configure"
2128 (string-append "--extra-cflags=-I"
2129 libx11 "/include") ; to detect libx11
2130 "--disable-ffmpeg_a" ; disables bundled ffmpeg
2131 (string-append "--prefix=" out)
2132 ;; Enable runtime cpu detection where supported,
2133 ;; and choose a suitable target.
2134 ,@(match (or (%current-target-system)
2137 '("--enable-runtime-cpudetection"
2138 "--target=x86_64-linux"))
2140 '("--enable-runtime-cpudetection"
2141 "--target=i686-linux"))
2143 '("--target=mips3-linux"))
2144 (_ (list (string-append
2146 (or (%current-target-system)
2147 (nix-system->gnu-triplet
2148 (%current-system)))))))
2149 "--disable-iwmmxt")))))))
2150 (home-page "https://www.mplayerhq.hu")
2151 (synopsis "Audio and video player")
2152 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
2153 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
2154 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
2155 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
2156 (license license:gpl2)))
2165 (url "https://github.com/mpv-player/mpv")
2166 (commit (string-append "v" version))))
2167 (file-name (git-file-name name version))
2169 (base32 "12qxwm1ww5vhjddl8yvj1xa0n1fi9z3lmzwhaiday2v59ca0qgsk"))))
2170 (build-system waf-build-system)
2172 (list perl ; for zsh completion file
2173 pkg-config python-docutils))
2174 ;; Missing features: libguess, V4L2
2176 `(("alsa-lib" ,alsa-lib)
2183 ("libbluray" ,libbluray)
2184 ("libcaca" ,libcaca)
2185 ("libbs2b" ,libbs2b)
2186 ("libcdio-paranoia" ,libcdio-paranoia)
2187 ("libdvdread" ,libdvdread)
2188 ("libdvdnav" ,libdvdnav)
2189 ("libjpeg" ,libjpeg-turbo)
2191 ("libvdpau" ,libvdpau)
2193 ("libxext" ,libxext)
2194 ("libxinerama" ,libxinerama)
2195 ("libxrandr" ,libxrandr)
2196 ("libxscrnsaver" ,libxscrnsaver)
2198 ;; XXX: lua > 5.2 is not currently supported; see
2199 ;; waftools/checks/custom.py
2203 ("pulseaudio" ,pulseaudio)
2205 ("shaderc" ,shaderc)
2206 ("vulkan-headers" ,vulkan-headers)
2207 ("vulkan-loader" ,vulkan-loader)
2209 ("wayland" ,wayland)
2210 ("wayland-protocols" ,wayland-protocols)
2211 ("libxkbcommon" ,libxkbcommon)
2216 (modify-phases %standard-phases
2217 (add-after 'unpack 'patch-paths
2218 (lambda* (#:key inputs #:allow-other-keys)
2219 (let ((ytdl (assoc-ref inputs "yt-dlp")))
2220 (substitute* "player/lua/ytdl_hook.lua"
2222 (string-append "\"" ytdl "/bin/yt-dlp\","))))))
2223 (add-before 'configure 'build-reproducibly
2225 ;; Somewhere in the build system library dependencies are enumerated
2226 ;; and passed as linker flags, but the order in which they are added
2227 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
2228 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
2229 (setenv "PYTHONHASHSEED" "1")
2232 'configure 'setup-waf
2233 (lambda* (#:key inputs #:allow-other-keys)
2234 (let ((waf (assoc-ref inputs "waf")))
2235 (copy-file (string-append waf "/bin/waf") "waf"))
2238 #:configure-flags (list "--enable-libmpv-shared"
2241 "--disable-build-date")
2242 ;; No check function defined.
2244 (home-page "https://mpv.io/")
2245 (synopsis "Audio and video player")
2246 (description "mpv is a general-purpose audio and video player. It is a
2247 fork of mplayer2 and MPlayer. It shares some features with the former
2248 projects while introducing many more.")
2249 (license license:gpl2+)))
2251 (define-public smplayer
2258 "mirror://sourceforge/smplayer/SMPlayer/" version
2259 "/smplayer-" version ".tar.bz2"))
2262 "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22rc"))))
2263 (build-system qt-build-system)
2267 (list bash-minimal qtbase-5 zlib mpv))
2269 (list #:tests? #false ; no tests
2270 #:make-flags #~(list (string-append "PREFIX=" #$output)
2271 (string-append "CC=" #+(cc-for-target))
2272 ;; A KLUDGE to turn off invoking lrelease on the
2273 ;; project for now, because it fails consistently
2274 ;; with "WARNING: Could not find qmake spec
2275 ;; 'default'". See below.
2278 #~(modify-phases %standard-phases
2280 ;; Due to the above, we must run lrelease separately on each .ts file
2281 ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
2282 ;; project, as the Makefile does normally without the above kludge).
2283 (add-after 'build 'compile-ts-files
2285 (for-each (lambda (file)
2286 (invoke "lrelease" file))
2287 (find-files "./" "\\.ts$"))))
2288 (add-after 'install 'wrap-executable
2289 (lambda* (#:key inputs outputs #:allow-other-keys)
2290 (let* ((out (assoc-ref outputs "out"))
2291 (mpv (assoc-ref inputs "mpv")))
2292 (wrap-program (string-append out "/bin/smplayer")
2294 ,(list (string-append mpv "/bin"))))))))))
2295 (home-page "https://www.smplayer.info")
2296 (synopsis "Complete front-end for MPlayer, a media player")
2297 (description "SMPlayer is a graphical user interface (GUI) for
2298 MPlayer, which is capable of playing almost all known video and audio
2299 formats. Apart from providing access for the most common and useful
2300 options of MPlayer, SMPlayer adds other interesting features like the
2301 possibility to play Youtube videos, download subtitles, remember
2302 the last played position, etc.")
2303 (license license:gpl2+)))
2305 (define-public gallery-dl
2311 (uri (string-append "https://github.com/mikf/gallery-dl"
2312 "/releases/download/v" version "/gallery_dl-"
2316 "12rhzf8cwsvlg0vxzydgc7x04gmccxkjk8ghb5s8lk0gjp7ysqkh"))))
2317 (build-system python-build-system)
2318 (inputs (list python-requests ffmpeg))
2319 (home-page "https://github.com/mikf/gallery-dl")
2320 (synopsis "Command-line program to download images from several sites")
2321 (description "Gallery-dl is a command-line program that downloads image
2322 galleries and collections from several image hosting sites. While this package
2323 can use youtube-dl or yt-dlp packages to download videos, the focus is more on
2324 images and image hosting sites.")
2325 (license license:gpl2)))
2327 (define-public gnome-mpv
2328 (deprecated-package "gnome-mpv" celluloid))
2330 (define-public mpv-mpris
2338 (url "https://github.com/hoyon/mpv-mpris")
2340 (file-name (git-file-name name version))
2342 (base32 "03gldk149i2108w3ylyfmci77kdq4whdzfavh7hjviwyj534101r"))))
2343 (build-system copy-build-system)
2346 '(("mpris.so" "lib/"))
2348 (modify-phases %standard-phases
2349 (add-before 'install 'build
2351 (setenv "CC" (which "gcc"))
2352 (invoke "make"))))))
2357 (home-page "https://github.com/hoyon/mpv-mpris")
2358 (synopsis "MPRIS plugin for mpv")
2359 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2360 Interfacing Specification) plugin for the @code{mpv} media player. It implements
2361 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2364 To load this plugin, specify the following option when starting mpv:
2365 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2366 @file{$HOME/.config/mpv/scripts}.")
2367 (license license:expat)))
2369 (define-public libvpx
2376 (url "https://chromium.googlesource.com/webm/libvpx")
2377 (commit (string-append "v" version))))
2378 (file-name (git-file-name name version))
2381 "00f1jrclai2b6ys78dpsg6r1mvcyxlna93vxcz8zjyia24c2pjsb"))
2382 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
2383 (build-system gnu-build-system)
2385 `(#:configure-flags (list "--enable-shared"
2388 ;; Limit size to avoid CVE-2015-1258
2389 "--size-limit=16384x16384"
2390 (string-append "--prefix=" (assoc-ref %outputs "out")))
2391 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2392 (assoc-ref %outputs "out") "/lib"))
2393 #:phases (modify-phases %standard-phases
2395 (lambda* (#:key configure-flags #:allow-other-keys)
2396 ;; The configure script does not understand some of the GNU
2397 ;; options, so we only add the flags specified above.
2398 (apply invoke "./configure" configure-flags))))
2400 ;; XXX: The test suite wants to download 871 files from a cloud storage
2401 ;; service (see test/test-data.sha1). It is possible to specify a
2402 ;; custom directory, but there seems to be no tarball with all files.
2406 (synopsis "VP8/VP9 video codec")
2407 (description "libvpx is a codec for the VP8/VP9 video compression format.")
2408 (license license:bsd-3)
2409 (home-page "https://www.webmproject.org/")))
2411 (define-public youtube-dl
2414 (version "2021.12.17")
2417 (uri (string-append "https://youtube-dl.org/downloads/latest/"
2418 "youtube-dl-" version ".tar.gz"))
2421 "1prm84ci1n1kjzhikhrsbxbgziw6br822psjnijm2ibqnz49jfwz"))
2424 ;; Delete the pre-generated files, except for the man page
2425 ;; which requires 'pandoc' to build.
2426 (for-each delete-file '("youtube-dl"
2427 ;;pandoc is needed to generate
2429 "youtube-dl.bash-completion"
2431 "youtube-dl.zsh"))))))
2432 (build-system python-build-system)
2434 ;; The problem here is that the directory for the man page and completion
2435 ;; files is relative, and for some reason, setup.py uses the
2436 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2437 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2438 ;; completion file is called 'youtube-dl' rather than
2439 ;; 'youtube-dl.bash-completion'.
2440 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2441 #:phases (modify-phases %standard-phases
2442 (add-after 'unpack 'default-to-the-ffmpeg-input
2444 ;; See <https://issues.guix.gnu.org/43418#5>.
2445 ;; ffmpeg is big but required to request free formats
2446 ;; from, e.g., YouTube so pull it in unconditionally.
2447 ;; Continue respecting the --ffmpeg-location argument.
2448 (substitute* "youtube_dl/postprocessor/ffmpeg.py"
2449 (("\\.get\\('ffmpeg_location'\\)" match)
2450 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2451 (add-before 'build 'build-generated-files
2453 ;; Avoid the make targets that require pandoc.
2457 ;;"youtube-dl.1" ; needs pandoc
2458 "youtube-dl.bash-completion"
2460 "youtube-dl.fish")))
2461 (add-before 'install 'fix-the-data-directories
2462 (lambda* (#:key outputs #:allow-other-keys)
2463 (let ((prefix (assoc-ref outputs "out")))
2464 (mkdir "bash-completion")
2465 (rename-file "youtube-dl.bash-completion"
2466 "bash-completion/youtube-dl")
2467 (substitute* "setup.py"
2468 (("youtube-dl\\.bash-completion")
2469 "bash-completion/youtube-dl")
2471 (string-append "'" prefix "/etc/"))
2473 (string-append "'" prefix "/share/"))))))
2474 (add-after 'install 'install-completion
2475 (lambda* (#:key outputs #:allow-other-keys)
2476 (let* ((out (assoc-ref outputs "out"))
2477 (zsh (string-append out
2478 "/share/zsh/site-functions")))
2480 (copy-file "youtube-dl.zsh"
2481 (string-append zsh "/_youtube-dl"))))))))
2486 (synopsis "Download videos from YouTube.com and other sites")
2488 "Youtube-dl is a small command-line program to download videos from
2489 YouTube.com and many more sites.")
2490 (home-page "https://yt-dl.org")
2491 (properties '((release-monitoring-url . "https://yt-dl.org/downloads/")))
2492 (license license:public-domain)))
2494 (define-public yt-dlp
2495 (package/inherit youtube-dl
2497 (version "2022.09.01")
2502 (url "https://github.com/yt-dlp/yt-dlp/")
2504 (file-name (git-file-name name version))
2506 (base32 "0h46624zdqhjf79m78303v00m2r013yaccanv0010rls17v7y6pq"))))
2508 (substitute-keyword-arguments (package-arguments youtube-dl)
2509 ((#:tests? _) (not (%current-target-system)))
2511 #~(modify-phases #$phases
2512 ;; See the comment for the corresponding phase in youtube-dl.
2513 (replace 'default-to-the-ffmpeg-input
2515 (substitute* "yt_dlp/postprocessor/ffmpeg.py"
2516 (("\\.get_param\\('ffmpeg_location'\\)" match)
2517 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2518 (replace 'build-generated-files
2519 (lambda* (#:key inputs #:allow-other-keys)
2520 (if (assoc-ref inputs "pandoc")
2530 (replace 'fix-the-data-directories
2531 (lambda* (#:key outputs #:allow-other-keys)
2532 (let ((prefix (assoc-ref outputs "out")))
2533 (substitute* "setup.py"
2535 (string-append "'" prefix "/etc/"))
2537 (string-append "'" prefix "/share/"))))))
2538 (delete 'install-completion)
2540 (lambda* (#:key tests? #:allow-other-keys)
2542 (invoke "pytest" "-k" "not download"))))))))
2543 (inputs (modify-inputs (package-inputs youtube-dl)
2544 (append python-brotli
2547 python-pycryptodomex
2548 python-websockets)))
2551 ;; To generate the manpage.
2552 (if (member (%current-system)
2553 (package-transitive-supported-systems pandoc))
2556 (list python-pytest zip)))
2558 "yt-dlp is a small command-line program to download videos from
2559 YouTube.com and many more sites. It is a fork of youtube-dl with a
2560 focus on adding new features while keeping up-to-date with the
2562 (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/")))
2563 (home-page "https://github.com/yt-dlp/yt-dlp")))
2565 (define-public you-get
2568 (version "0.4.1555")
2572 (url "https://github.com/soimort/you-get")
2573 (commit (string-append "v" version))))
2574 (file-name (git-file-name name version))
2577 "0gn86i6nfsw395r9a3i88nv2g08s5bgjps7w4qawb9gvk4h7zqap"))))
2578 (build-system python-build-system)
2580 (list ffmpeg)) ; for multi-part and >=1080p videos
2583 (modify-phases %standard-phases
2584 (add-after 'unpack 'qualify-input-references
2585 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2586 ;; happens to be in the user's $PATH at run time.
2587 (lambda* (#:key inputs #:allow-other-keys)
2588 (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
2589 (substitute* "src/you_get/processor/ffmpeg.py"
2590 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2591 ;; same string is also used when sniffing ffmpeg's output.
2592 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2593 (string-append prefix "'" ffmpeg "'")))))))
2594 #:tests? #f)) ; XXX some tests need Internet access
2595 (synopsis "Download videos, audio, or images from Web sites")
2597 "You-Get is a command-line utility to download media contents (videos,
2598 audio, images) from the Web. It can use either mpv or vlc for playback.")
2599 (home-page "https://you-get.org/")
2600 (license license:expat)))
2602 (define-public youtube-viewer
2604 (name "youtube-viewer")
2609 (url "https://github.com/trizen/youtube-viewer")
2611 (file-name (git-file-name name version))
2614 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
2615 (build-system perl-build-system)
2617 (list perl-module-build))
2619 (list perl-data-dump
2625 perl-lwp-protocol-https
2626 perl-lwp-useragent-cached
2629 perl-term-readline-gnu
2630 perl-unicode-linebreak
2632 ;; Some videos play without youtube-dl, but others silently fail to.
2635 `(#:modules ((guix build perl-build-system)
2638 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2639 ;; is broken without perl-gtk3.
2640 #:module-build-flags '("--gtk2")
2642 (modify-phases %standard-phases
2643 (add-after 'unpack 'refer-to-inputs
2644 (lambda* (#:key inputs #:allow-other-keys)
2645 (substitute* "lib/WWW/YoutubeViewer.pm"
2647 (format #f "'~a/bin/youtube-dl'"
2648 (assoc-ref inputs "youtube-dl"))))
2649 (substitute* '("bin/gtk2-youtube-viewer"
2650 "bin/gtk3-youtube-viewer")
2652 (format #f "'~a/bin/xdg-open'"
2653 (assoc-ref inputs "xdg-utils"))))
2655 (add-after 'install 'install-desktop
2656 (lambda* (#:key outputs #:allow-other-keys)
2657 (let* ((out (assoc-ref outputs "out"))
2658 (sharedir (string-append out "/share")))
2659 (install-file "share/gtk-youtube-viewer.desktop"
2660 (string-append sharedir "/applications"))
2661 (install-file "share/icons/gtk-youtube-viewer.png"
2662 (string-append sharedir "/pixmaps"))
2664 (add-after 'install 'wrap-program
2665 (lambda* (#:key outputs #:allow-other-keys)
2666 (let* ((out (assoc-ref outputs "out"))
2667 (bin-dir (string-append out "/bin/"))
2668 (site-dir (string-append out "/lib/perl5/site_perl/"))
2669 (lib-path (getenv "PERL5LIB")))
2670 (for-each (cut wrap-program <>
2671 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2672 (find-files bin-dir))
2675 "Lightweight application for searching and streaming videos from YouTube")
2677 "Youtube-viewer searches and plays YouTube videos in a native player.
2678 It comes with various search options; it can search for videos, playlists
2679 and/or channels. The videos are streamed directly in a selected video player
2680 at the best resolution (customizable) and with closed-captions (if available).
2681 Both command-line and GTK2 interface are available.")
2682 (home-page "https://github.com/trizen/youtube-viewer")
2683 (license license:perl-license)))
2685 (define-public libbluray
2691 (uri (string-append "https://download.videolan.org/videolan/"
2692 name "/" version "/"
2693 name "-" version ".tar.bz2"))
2696 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
2697 (build-system gnu-build-system)
2699 `(#:configure-flags '("--disable-bdjava-jar"
2702 (modify-phases %standard-phases
2703 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2704 ;; Avoid the need to propagate libxml2 by referring to it
2705 ;; directly, as is already done for fontconfig & freetype.
2706 (lambda* (#:key inputs #:allow-other-keys)
2707 (let ((libxml2 (assoc-ref inputs "libxml2")))
2708 (substitute* "configure"
2709 ((" libxml-2.0") ""))
2710 (substitute* "src/libbluray.pc.in"
2711 (("^Libs.private:" field)
2712 (string-append field " -L" libxml2 "/lib -lxml2")))
2714 (add-before 'build 'fix-dlopen-paths
2715 (lambda* (#:key inputs #:allow-other-keys)
2716 (let ((libaacs (assoc-ref inputs "libaacs"))
2717 (libbdplus (assoc-ref inputs "libbdplus")))
2718 (substitute* "src/libbluray/disc/aacs.c"
2720 (string-append "\"" libaacs "/lib/libaacs\"")))
2721 (substitute* "src/libbluray/disc/bdplus.c"
2723 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2725 (native-inputs (list pkg-config))
2727 `(("fontconfig" ,fontconfig)
2728 ("freetype" ,freetype)
2729 ("libaacs" ,libaacs)
2730 ("libbdplus" ,libbdplus)
2731 ("libxml2" ,libxml2)))
2732 (home-page "https://www.videolan.org/developers/libbluray.html")
2733 (synopsis "Blu-Ray Disc playback library")
2735 "libbluray is a library designed for Blu-Ray Disc playback for media
2736 players, like VLC or MPlayer.")
2737 (license license:lgpl2.1+)))
2739 (define-public libdvdread
2745 (uri (string-append "https://download.videolan.org/videolan/"
2746 "libdvdread/" version "/"
2747 "libdvdread-" version ".tar.bz2"))
2750 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
2751 (build-system gnu-build-system)
2753 `(#:configure-flags '("--with-libdvdcss=yes")))
2758 (home-page "http://dvdnav.mplayerhq.hu/")
2759 (synopsis "Library for reading video DVDs")
2761 "Libdvdread provides a simple foundation for reading DVD video
2762 disks. It provides the functionality that is required to access many
2763 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2764 authentication and descrambling (if an external libdvdcss library is
2766 (license license:gpl2+)))
2768 (define-public dvdauthor
2775 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2779 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2780 (build-system gnu-build-system)
2782 (list libdvdread libpng imagemagick libxml2 freetype))
2785 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2786 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2787 MPEG-2 stream containing VOB packets.")
2788 (home-page "http://dvdauthor.sourceforge.net")
2789 (license license:gpl3+)))
2791 (define-public libdvdnav
2797 (uri (string-append "https://download.videolan.org/videolan/"
2798 "libdvdnav/" version "/"
2799 "libdvdnav-" version ".tar.bz2"))
2802 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2803 (build-system gnu-build-system)
2808 (home-page "http://dvdnav.mplayerhq.hu/")
2809 (synopsis "Library for video DVD navigation features")
2811 "Libdvdnav is a library for developers of multimedia
2812 applications. It allows easy use of sophisticated DVD navigation features
2813 such as DVD menus, multiangle playback and even interactive DVD games. All
2814 this functionality is provided through a simple API which provides the DVD
2815 playback as a single logical stream of blocks, intermitted by special
2816 dvdnav events to report certain conditions. The main usage of libdvdnav is
2817 a loop regularly calling a function to get the next block, surrounded by
2818 additional calls to tell the library of user interaction. The whole
2819 DVD virtual machine and internal playback states are completely
2821 (license license:gpl2+)))
2823 (define-public libdvdcss
2829 (uri (string-append "https://download.videolan.org/pub/"
2830 name "/" version "/"
2831 name "-" version ".tar.bz2"))
2834 "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13"))))
2835 (build-system gnu-build-system)
2836 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2837 (synopsis "Library for accessing DVDs as block devices")
2839 "libdvdcss is a simple library designed for accessing DVDs like a block
2840 device without having to bother about the decryption.")
2841 (license license:gpl2+)))
2843 (define-public srt2vtt
2850 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2854 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
2855 (build-system gnu-build-system)
2858 (modify-phases %standard-phases
2859 (add-after 'install 'wrap-srt2vtt
2860 (lambda* (#:key outputs #:allow-other-keys)
2861 (let* ((out (assoc-ref outputs "out"))
2862 (bin (string-append out "/bin"))
2863 (version ,(let ((v (package-version guile-3.0)))
2864 (string-append (car (string-split v #\.))
2866 (site (string-append out "/share/guile/site/" version))
2867 (compiled (string-append
2868 out "/lib/guile/" version
2870 (wrap-program (string-append bin "/srt2vtt")
2871 `("GUILE_LOAD_PATH" ":" prefix (,site))
2872 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
2877 (synopsis "SubRip to WebVTT subtitle converter")
2878 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2879 for use with HTML5 video.")
2880 (home-page "https://dthompson.us/projects/srt2vtt.html")
2881 (license license:gpl3+)))
2883 (define-public avidemux
2890 "mirror://sourceforge/avidemux/avidemux/" version "/"
2891 "avidemux_" version ".tar.gz"))
2894 "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2"))
2895 (patches (search-patches "avidemux-install-to-lib.patch"))))
2896 (build-system cmake-build-system)
2899 ("pkg-config" ,pkg-config)
2900 ("python" ,python-wrapper)
2901 ("qttools-5" ,qttools-5)
2903 ;; FIXME: Once packaged, add libraries not found during the build.
2905 `(("alsa-lib" ,alsa-lib)
2906 ("fontconfig" ,fontconfig)
2907 ("freetype" ,freetype)
2908 ("fribidi" ,fribidi)
2914 ("libvdpau" ,libvdpau)
2915 ("libvorbis" ,libvorbis)
2918 ("pulseaudio" ,pulseaudio)
2919 ("qtbase" ,qtbase-5)
2923 `(#:tests? #f ; no check target
2925 ;; Make sure files inside the included ffmpeg tarball are
2927 (let ((ffmpeg "ffmpeg-4.2.4"))
2928 (modify-phases %standard-phases
2929 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2931 (with-directory-excursion "avidemux_core/ffmpeg_package"
2932 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2933 (delete-file (string-append ffmpeg ".tar.bz2")))
2935 (add-after 'patch-source-shebangs 'repack-ffmpeg
2937 (with-directory-excursion "avidemux_core/ffmpeg_package"
2938 (substitute* (string-append ffmpeg "/configure")
2939 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2940 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2941 ;; avoid non-determinism in the archive
2942 "--sort=name" "--mtime=@0"
2943 "--owner=root:0" "--group=root:0")
2944 (delete-file-recursively ffmpeg))
2948 ;; Copy-paste settings from the cmake build system.
2949 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2950 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2953 (lambda* (#:key inputs outputs #:allow-other-keys)
2954 (let* ((out (assoc-ref outputs "out"))
2955 (lib (string-append out "/lib"))
2958 (lambda* (component srcdir #:optional (args '()))
2959 (let ((builddir (string-append "build_" component)))
2961 (with-directory-excursion builddir
2962 (apply invoke "cmake"
2963 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2964 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2965 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2966 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2967 "\"-Wl,-rpath=" lib "\"")
2968 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2969 (string-append "../" srcdir)
2973 (number->string (parallel-job-count)))
2974 (invoke "make" "install"))))))
2976 (build_component "core" "avidemux_core")
2977 (build_component "cli" "avidemux/cli")
2978 (build_component "qt4" "avidemux/qt4")
2979 (build_component "plugins_common" "avidemux_plugins"
2980 '("-DPLUGIN_UI=COMMON"))
2981 (build_component "plugins_cli" "avidemux_plugins"
2982 '("-DPLUGIN_UI=CLI"))
2983 (build_component "plugins_qt4" "avidemux_plugins"
2984 '("-DPLUGIN_UI=QT4"))
2985 (build_component "plugins_settings" "avidemux_plugins"
2986 '("-DPLUGIN_UI=SETTINGS"))
2987 ;; Remove .exe and .dll file.
2988 (delete-file-recursively
2989 (string-append out "/share/ADM6_addons"))
2991 (delete 'install)))))
2992 (home-page "http://fixounet.free.fr/avidemux/")
2993 (synopsis "Video editor")
2994 (description "Avidemux is a video editor designed for simple cutting,
2995 filtering and encoding tasks. It supports many file types, including AVI,
2996 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2997 can be automated using projects, job queue and powerful scripting
2999 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
3000 ;; Software with various licenses is included, see License.txt.
3001 (license license:gpl2+)))
3003 (define-public vapoursynth
3005 (name "vapoursynth")
3010 (url "https://github.com/vapoursynth/vapoursynth")
3011 (commit (string-append "R" version))))
3012 (file-name (git-file-name name version))
3015 "0qcsfkpkry0cmvi60khjwvfz4fqhy23nqmn4pb9qrwll26sn9dcr"))))
3016 (build-system gnu-build-system)
3019 (modify-phases %standard-phases
3020 (add-after 'install 'wrap
3021 (lambda* (#:key outputs #:allow-other-keys)
3022 (let* ((out (assoc-ref outputs "out"))
3023 (site (string-append out "/lib/python"
3024 ,(version-major+minor
3025 (package-version python))
3027 (wrap-program (string-append out "/bin/vspipe")
3028 `("PYTHONPATH" ":" = (,site)))))))))
3030 `(("autoconf" ,autoconf)
3031 ("automake" ,automake)
3032 ("cython" ,python-cython)
3033 ("libtool" ,libtool)
3034 ("pkg-config" ,pkg-config)
3037 (list ffmpeg libass python tesseract-ocr zimg))
3038 (home-page "http://www.vapoursynth.com/")
3039 (synopsis "Video processing framework")
3040 (description "VapourSynth is a C++ library and Python module for video
3041 manipulation. It aims to be a modern rewrite of Avisynth, supporting
3042 multithreading, generalized colorspaces, per frame properties, and videos with
3044 ;; src/core/cpufeatures only allows x86, ARM or PPC
3045 (supported-systems (fold delete %supported-systems
3046 '("mips64el-linux" "aarch64-linux")))
3047 ;; As seen from the source files.
3048 (license license:lgpl2.1+)))
3057 "http://downloads.xvid.com/downloads/xvidcore-"
3058 version ".tar.bz2"))
3061 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
3062 (build-system gnu-build-system)
3063 (native-inputs (list yasm))
3066 (modify-phases %standard-phases
3067 (add-before 'configure 'pre-configure
3069 (chdir "build/generic")
3070 (substitute* "configure"
3071 (("#! /bin/sh") (string-append "#!" (which "sh"))))
3073 #:tests? #f)) ; no test suite
3074 (home-page "https://www.xvid.com/")
3075 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
3076 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
3077 codec library. It uses ASP features such as b-frames, global and quarter
3078 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
3079 and custom quantization matrices.")
3080 (license license:gpl2+)))
3082 (define-public streamlink
3089 (uri (pypi-uri "streamlink" version))
3092 "09nrspga15svzi0hmakcarbciav0nzf30hg1ff53gia473cd4w4p"))))
3093 (build-system python-build-system)
3095 `(#:phases (modify-phases %standard-phases
3097 (lambda* (#:key tests? #:allow-other-keys)
3099 (invoke "python" "-m" "pytest")))))))
3101 (list python-freezegun python-mock python-pytest
3102 python-requests-mock))
3104 (list python-pysocks
3105 python-websocket-client
3112 (home-page "https://github.com/streamlink/streamlink")
3113 (synopsis "Extract streams from various services")
3114 (description "Streamlink is command-line utility that extracts streams
3115 from sites like Twitch.tv and pipes them into a video player of choice.")
3116 (license license:bsd-2)))
3118 (define-public twitchy
3119 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
3122 (version (git-version "3.4" "1" commit))
3127 (url "https://github.com/BasioMeusPuga/twitchy")
3129 (file-name (git-file-name name version))
3132 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
3133 (build-system python-build-system)
3136 (modify-phases %standard-phases
3137 (add-after 'unpack 'patch-paths
3138 (lambda* (#:key inputs #:allow-other-keys)
3139 (substitute* "twitchy/twitchy_play.py"
3141 (string-append "\"" (assoc-ref inputs "streamlink")
3142 "/bin/streamlink ")))
3144 (add-before 'check 'check-setup
3146 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
3148 (add-after 'install 'install-rofi-plugin
3149 (lambda* (#:key outputs #:allow-other-keys)
3150 (install-file "plugins/rofi-twitchy"
3151 (string-append (assoc-ref outputs "out")
3155 (list python-requests streamlink))
3156 (home-page "https://github.com/BasioMeusPuga/twitchy")
3157 (synopsis "Command-line interface for Twitch.tv")
3159 "This package provides a command-line interface for Twitch.tv")
3160 (license license:gpl3+))))
3170 (url "https://github.com/mltframework/mlt")
3171 (commit (string-append "v" version))))
3172 (file-name (git-file-name name version))
3174 (base32 "01589xpx1vgx1l1zjg553nbjks5wy31rdvyq1sjnbp9w7p7nzjdg"))))
3175 (build-system cmake-build-system)
3178 #:tests? #f ;requires "Kwalify"
3180 #~(modify-phases %standard-phases
3181 (add-before 'configure 'override-LDFLAGS
3184 (string-append "-Wl,-rpath=" #$output "/lib"))))
3185 (add-after 'install 'wrap-executable
3187 (let* ((frei0r #$(this-package-input "frei0r-plugins"))
3188 (ladspa #$(this-package-input "ladspa"))
3189 ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep
3190 ;; compatibility with MLT 6 where it's only 'melt'.
3191 (major #$(version-major version))
3192 (exec (if (file-exists?
3193 (string-append #$output "/bin/melt-" major))
3194 (string-append "melt-" major)
3196 (wrap-program (string-append #$output "/bin/" exec)
3197 `("FREI0R_PATH" ":" =
3198 (,(string-append frei0r "/lib/frei0r-1")))
3199 `("LADSPA_PATH" ":" =
3200 (,(string-append ladspa "/lib/ladspa"))))))))))
3203 `(,alsa-plugins "pulseaudio")
3228 (home-page "https://www.mltframework.org/")
3229 (synopsis "Author, manage, and run multitrack audio/video compositions")
3231 "MLT is a multimedia framework, designed and developed for television
3232 broadcasting. It provides a toolkit for broadcasters, video editors, media
3233 players, transcoders, web streamers and many more types of applications. The
3234 functionality of the system is provided via an assortment of ready to use
3235 tools, XML authoring components, and an extensible plug-in based API.")
3236 (license license:lgpl2.1+)))
3238 (define-public mlt-6
3247 (url "https://github.com/mltframework/mlt")
3248 (commit (string-append "v" version))))
3249 (file-name (git-file-name name version))
3251 (base32 "1gz79xvs5jrzqhwhfk0dqdd3xiavnjp4q957h7nb02rij32byb39"))))
3254 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
3255 (assoc-ref %build-inputs "gtk+")
3256 "/lib/gtk-2.0/include")
3257 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
3258 (assoc-ref %build-inputs "glib")
3259 "/lib/glib-2.0/include"))
3260 ,@(package-arguments mlt)))
3262 (modify-inputs (package-inputs mlt)
3263 (replace "gtk+" gtk+-2)))))
3265 (define-public v4l-utils
3271 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
3272 "/v4l-utils-" version ".tar.bz2"))
3275 "0cafp64b7ylxhjnp47hxm59r0b0v5hc2gc23qh2s2k5463lgpik5"))))
3276 (build-system gnu-build-system)
3277 ;; Separate graphical tools in order to save almost 1 GiB on the closure
3278 ;; for the common case.
3279 (outputs '("out" "gui"))
3282 (list "--disable-static"
3283 (string-append "--with-udevdir="
3284 (assoc-ref %outputs "out")
3287 (modify-phases %standard-phases
3288 (add-after 'install 'split
3289 (lambda* (#:key outputs #:allow-other-keys)
3290 (let ((out (assoc-ref outputs "out"))
3291 (gui (assoc-ref outputs "gui")))
3292 (mkdir-p (string-append gui "/bin"))
3293 (mkdir-p (string-append gui "/share/man/man1"))
3294 (mkdir-p (string-append gui "/share/applications"))
3299 (rename-file (string-append out file)
3300 (string-append gui file)))
3302 (string-append "/bin/" prog)
3303 (string-append "/share/man/man1/" prog ".1")
3304 (string-append "/share/applications/" prog ".desktop"))))
3305 '("qv4l2" "qvidcap"))
3306 (copy-recursively (string-append out "/share/icons")
3307 (string-append gui "/share/icons"))
3308 (delete-file-recursively (string-append out "/share/icons"))
3309 (rmdir (string-append out "/share/applications"))
3312 (list perl pkg-config))
3320 (synopsis "Realtime video capture utilities for Linux")
3321 (description "The v4l-utils provide a series of libraries and utilities to
3322 be used for realtime video capture via Linux-specific APIs.")
3323 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
3324 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
3325 (license (list license:lgpl2.1+ license:gpl2))))
3334 (url "https://github.com/obsproject/obs-studio")
3337 (file-name (git-file-name name version))
3340 "13bfzjqmvabli99yr1h0306w5lx72mbl5sxrnr46hjig1a6rw91s"))
3342 (search-patches "obs-modules-location.patch"))))
3343 (build-system cmake-build-system)
3347 #~(list (string-append "-DOBS_VERSION_OVERRIDE=" #$version)
3348 "-DENABLE_UNIT_TESTS=ON"
3349 ;; Browser plugin requires cef, but it is not packaged yet.
3350 ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
3351 "-DBUILD_BROWSER=OFF")
3353 #~(modify-phases %standard-phases
3354 (add-after 'install 'wrap-executable
3356 (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
3357 (wrap-program (string-append #$output "/bin/obs")
3358 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
3359 (native-search-paths
3360 (list (search-path-specification
3361 (variable "OBS_PLUGINS_DIRECTORY")
3362 (separator #f) ;single entry
3363 (files '("lib/obs-plugins")))
3364 (search-path-specification
3365 (variable "OBS_PLUGINS_DATA_DIRECTORY")
3366 (separator #f) ;single entry
3367 (files '("share/obs/obs-plugins")))))
3369 (list cmocka pkg-config swig))
3401 (synopsis "Live streaming software")
3402 (description "Open Broadcaster Software provides a graphical interface for
3403 video recording and live streaming. OBS supports capturing audio and video
3404 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3406 (home-page "https://obsproject.com")
3407 (license license:gpl2+)))
3409 (define-public obs-spectralizer
3411 (name "obs-spectralizer")
3417 (url "https://github.com/univrsal/spectralizer")
3418 (commit (string-append "v" version))))
3419 (file-name (git-file-name name version))
3421 ;; Remove bundled Windows DLLs.
3422 (snippet '(delete-file-recursively "fftw3"))
3423 (modules '((guix build utils)))
3427 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i"))))
3428 (build-system cmake-build-system)
3432 (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON")))
3433 (inputs (list obs fftw))
3434 (home-page "https://github.com/univrsal/spectralizer")
3435 (synopsis "OBS plugin for audio visualization")
3436 (description "This OBS plugins allows you to vizualize MPD and internal
3437 OBS audio sources.")
3438 (license license:gpl2)))
3440 (define-public obs-websocket
3442 (name "obs-websocket")
3448 (url "https://github.com/Palakis/obs-websocket")
3451 (file-name (git-file-name name version))
3453 (base32 "0giwhm0rbc578qng4invqqma935zzjlf05msz1gx986aqk654s7k"))))
3454 (build-system cmake-build-system)
3456 `(#:tests? #f ;no tests
3458 (modify-phases %standard-phases
3459 (add-after 'unpack 'remove-permission-change
3461 (substitute* "CMakeLists.txt"
3462 ;; Remove lines that set writeable permissions on outputs.
3463 (("PERMISSIONS [^)]*") "")
3464 (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
3465 ;; Ug^WClever hack to comment out the next line, which is ‘)’.
3466 (("(OWNER|GROUP|WORLD)_READ .*") "#")))))))
3468 (list obs qtbase-5))
3469 (home-page "https://github.com/Palakis/obs-websocket")
3470 (synopsis "OBS plugin for remote control via WebSockets")
3471 (description "This OBS plugin allows you to establish a WebSocket channel
3472 from within your running OBS instance so that you can control it remotely from
3473 programs on your current machine or on other machines.")
3474 (license license:gpl2+)))
3476 (define-public obs-wlrobs
3484 (url "https://hg.sr.ht/~scoopta/wlrobs")
3485 (changeset (string-append "v" version))))
3486 (file-name (git-file-name name version))
3489 "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
3490 (build-system meson-build-system)
3493 (propagated-inputs `() )
3495 `(,libx11 "out") wayland wayland-protocols))
3496 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
3497 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
3499 "This OBS plugin allows you to capture the screen on wlroots-based
3500 Wayland compositors.")
3501 (license license:gpl3+)))
3503 (define-public libvdpau
3511 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3513 (file-name (git-file-name name version))
3516 "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
3517 (build-system meson-build-system)
3521 (list `(,libx11 "out") libxext xorgproto))
3522 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3523 (synopsis "Video Decode and Presentation API")
3524 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3525 provides an interface to video decode acceleration and presentation hardware
3526 present in modern GPUs.")
3527 (license (license:x11-style "file://COPYING"))))
3529 (define-public vdpauinfo
3537 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
3539 (file-name (git-file-name name version))
3541 (base32 "0s84bavxr39w0r7zfaac7kpbfsg88hgymqyzcr0yvbj1yry3liz2"))))
3542 (build-system gnu-build-system)
3545 (modify-phases %standard-phases
3547 ;; ./autogen.sh runs ./configure too soon.
3549 (invoke "autoreconf" "-fiv"))))))
3551 (list autoconf automake libx11 pkg-config))
3554 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3555 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3556 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3558 (license (license:x11-style "file://COPYING"))))
3560 (define-public libvdpau-va-gl
3562 (name "libvdpau-va-gl")
3567 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3568 "releases/download/v" version "/libvdpau-va-gl-"
3572 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3573 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3574 (modules '((guix build utils)))
3575 (snippet '(begin (delete-file-recursively "3rdparty")
3577 (build-system cmake-build-system)
3579 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3581 (list libvdpau pkg-config))
3584 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3585 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3587 "Many applications can use VDPAU to accelerate portions of the video
3588 decoding process and video post-processing to the GPU video hardware. Since
3589 there is no VDPAU available on Intel chips, they fall back to different drawing
3590 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3591 scaling and VA-API (if available) to accelerate video decoding.")
3592 (license license:expat)))
3594 (define-public recordmydesktop
3596 (name "recordmydesktop")
3600 (uri (string-append "https://github.com/Enselic/"
3601 name "/releases/download/v" version
3602 "/recordmydesktop-" version ".tar.gz"))
3605 "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7"))))
3606 (build-system gnu-build-system)
3618 (home-page "https://enselic.github.io/recordmydesktop/")
3619 (synopsis "Desktop session video recorder")
3621 "recordMyDesktop is a command-line tool that captures the activity in
3622 your graphical desktop and encodes it as a video. This is a useful tool for
3623 making @dfn{screencasts}.")
3624 (license license:gpl2+)))
3626 (define-public simplescreenrecorder
3628 (name "simplescreenrecorder")
3634 (url "https://github.com/MaartenBaert/ssr")
3636 (file-name (git-file-name name version))
3639 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3640 (build-system cmake-build-system)
3641 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3642 ;; README.md, the program builds and functions properly without them.
3643 ;; As a result, they are omitted. Please add them back if problems appear.
3654 (native-inputs (list pkg-config))
3657 (list "-DWITH_QT5=TRUE")
3658 #:tests? #f)) ; no test suite
3659 ;; Using HTTPS causes part of the page to be displayed improperly.
3660 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3661 (synopsis "Screen recorder")
3662 (description "SimpleScreenRecorder is an easy to use screen recorder with
3663 a graphical user interface. It supports recording the entire screen, or a
3664 part of it, and allows encoding in many different codecs and file formats.
3665 Other features include a live preview and live streaming.")
3666 (license (list license:gpl3+ ; most files
3667 license:zlib ; glinject/elfhacks.*
3668 license:isc ; glinject/*
3669 license:x11)))) ; build-aux/install-sh
3671 (define-public libsmpeg
3674 (version "0.4.5-401")
3678 (url "svn://svn.icculus.org/smpeg/trunk/")
3679 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3680 (file-name (string-append name "-" version "-checkout"))
3683 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3684 (build-system gnu-build-system)
3686 ;; libsmpeg fails to build with -std=c++11, which is the default with
3687 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3688 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3690 (list autoconf automake))
3693 (home-page "https://icculus.org/smpeg/")
3694 (synopsis "SDL MPEG decoding library")
3696 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3697 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3698 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3699 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3700 and MPEG system streams.")
3701 (license (list license:expat
3707 (define-public libsmpeg-with-sdl1
3708 (package (inherit libsmpeg)
3710 (version "0.4.5-399")
3714 (url "svn://svn.icculus.org/smpeg/trunk/")
3715 (revision 399))) ; tagged release 0.4.5
3716 (file-name (string-append name "-" version "-checkout"))
3719 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3723 (define-public libbdplus
3730 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3731 version "/" name "-" version ".tar.bz2"))
3733 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3736 (build-system gnu-build-system)
3737 (home-page "https://www.videolan.org/developers/libbdplus.html")
3738 (synopsis "Library for decrypting certain Blu-Ray discs")
3739 (description "libbdplus is a library which implements the BD+ System
3741 (license license:lgpl2.1+)))
3743 (define-public libaacs
3750 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3751 version "/libaacs-" version ".tar.bz2"))
3753 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3758 (build-system gnu-build-system)
3759 (home-page "https://www.videolan.org/developers/libaacs.html")
3760 (synopsis "Library for decrypting certain Blu-Ray discs")
3761 (description "libaacs is a library which implements the Advanced Access
3762 Content System specification.")
3763 (license license:lgpl2.1+)))
3765 (define-public mps-youtube
3767 (name "mps-youtube")
3773 (url "https://github.com/mps-youtube/mps-youtube")
3774 (commit (string-append "v" version))))
3775 (file-name (git-file-name name version))
3778 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3779 (build-system python-build-system)
3781 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3782 ;; test suite results differ depending on the country and also introduce
3783 ;; non-determinism in the tests.
3784 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3786 #:phases (modify-phases %standard-phases
3787 ;; Loading this as a library will create cache directories,
3788 ;; etc; which fails in the build container.
3789 (delete 'sanity-check))))
3791 (list python-pafy python-pygobject)) ; For mpris2 support
3792 (home-page "https://github.com/mps-youtube/mps-youtube")
3793 (synopsis "Terminal based YouTube player and downloader")
3795 "@code{mps-youtube} is based on mps, a terminal based program to
3796 search, stream and download music. This implementation uses YouTube as
3797 a source of content and can play and download video as well as audio.
3798 It can use either mpv or mplayer for playback, and for conversion of
3799 formats ffmpeg or libav is used. Users should install one of the
3800 supported players in addition to this package.")
3801 (license license:gpl3+)))
3803 (define-public handbrake
3809 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3810 "releases/download/" version "/"
3811 "HandBrake-" version "-source.tar.bz2"))
3814 "1w1hjj6gvdydypw4mdn281w0x163is59cfm7k6bq371hsl3gx69r"))
3815 (modules '((guix build utils)))
3817 ;; Remove "contrib" and source not necessary for
3818 ;; building/running under a GNU environment.
3820 (for-each delete-file-recursively
3821 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3822 (substitute* "make/include/main.defs"
3823 ;; Disable unconditional inclusion of "contrib" libraries
3824 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3825 ;; which would lead to fetching and building of these
3826 ;; libraries. Use our own instead.
3827 (("MODULES \\+= contrib") "# MODULES += contrib"))))))
3828 (build-system glib-or-gtk-build-system)
3830 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3831 ("autoconf" ,autoconf)
3832 ("intltool" ,intltool)
3833 ("libtool" ,libtool)
3834 ("pkg-config" ,pkg-config)
3835 ("python" ,python-2))) ; For configuration
3838 ("dbus-glib" ,dbus-glib)
3840 ("fontconfig" ,fontconfig)
3841 ("freetype" ,freetype)
3843 ("gstreamer" ,gstreamer)
3844 ("gst-plugins-base" ,gst-plugins-base)
3846 ("jansson" ,jansson)
3849 ("libbluray" ,libbluray)
3851 ("libdvdnav" ,libdvdnav)
3852 ("libdvdread" ,libdvdread)
3853 ("libgudev" ,libgudev)
3854 ("libjpeg-turbo" ,libjpeg-turbo)
3855 ("libmpeg2" ,libmpeg2)
3856 ("libnotify" ,libnotify)
3857 ("libnuma" ,numactl)
3860 ("libsamplerate" ,libsamplerate)
3861 ("libtheora" ,libtheora)
3862 ("libvorbis" ,libvorbis)
3864 ("libxml2" ,libxml2)
3865 ("libx264" ,libx264)
3871 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3873 (list "--disable-gtk-update-checks"
3875 (string-append "CPPFLAGS=-I"
3876 (assoc-ref %build-inputs "libxml2")
3880 (modify-phases %standard-phases
3882 ;; Run bootstrap ahead of time so that shebangs get patched.
3884 (setenv "CONFIG_SHELL" (which "sh"))
3885 ;; Patch the Makefile so that it doesn't bootstrap again.
3886 (substitute* "gtk/module.rules"
3887 ((".*autoreconf.*") ""))
3888 (with-directory-excursion "gtk"
3889 (invoke "autoreconf" "-fiv"))))
3890 (add-before 'configure 'patch-SHELL
3892 (substitute* "gtk/po/Makefile.in.in"
3893 (("SHELL = /bin/sh") "SHELL = @SHELL@"))))
3894 (add-before 'configure 'relax-reqs
3896 (substitute* "make/configure.py"
3897 ;; cmake is checked for so that it can be used to build
3898 ;; contrib/harfbuzz and contrib/x265, but we get these as
3899 ;; inputs, so don't abort if it's not found. Similarly, meson
3900 ;; and ninja are only needed for contrib/libdav1d, and nasm
3902 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3903 (string-append & "False")))))
3905 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3906 ;; 'configure' is not an autoconf-generated script, and
3907 ;; errors on unrecognized arguments,
3908 ;; e.g. --enable-fast-install
3909 (let ((out (assoc-ref outputs "out")))
3910 (apply invoke "./configure"
3911 (string-append "--prefix=" out)
3912 (or configure-flags '())))))
3913 (add-after 'configure 'chdir-build
3914 (lambda _ (chdir "./build"))))))
3915 (home-page "https://handbrake.fr")
3916 (synopsis "Video transcoder")
3918 "HandBrake is a tool for converting video from any format to a selection
3919 of modern, widely supported codecs.")
3920 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3921 ;; Combination under GPLv2. See LICENSE.
3922 (license license:gpl2)))
3924 (define-public intel-vaapi-driver
3926 (name "intel-vaapi-driver")
3932 (url "https://github.com/intel/intel-vaapi-driver")
3935 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3936 (file-name (git-file-name name version))))
3937 (build-system gnu-build-system)
3939 (list autoconf automake libtool pkg-config))
3941 (list libdrm libva libx11))
3944 (modify-phases %standard-phases
3945 (add-before 'configure 'set-target-directory
3946 (lambda* (#:key outputs #:allow-other-keys)
3947 (let ((out (assoc-ref outputs "out")))
3948 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
3950 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
3951 ;; this to all VA-API back ends instead of once to libva.
3952 (native-search-paths
3953 (list (search-path-specification
3954 (variable "LIBVA_DRIVERS_PATH")
3955 (files '("lib/dri")))))
3956 (supported-systems '("i686-linux" "x86_64-linux"))
3957 (home-page "https://01.org/linuxmedia/vaapi")
3958 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
3960 "This is the @acronym{VA-API, Video Acceleration API} back end required for
3961 hardware-accelerated video processing on Intel GEN Graphics devices supported by
3962 the i915 driver, such as integrated Intel HD Graphics. It provides access to
3963 both hardware and shader functionality for faster encoding, decoding, and
3964 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
3965 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
3966 license:expat)))) ; the rest, excluding the test suite
3968 (define-public openh264
3975 (url "https://github.com/cisco/openh264")
3976 (commit (string-append "v" version))))
3977 (file-name (git-file-name name version))
3980 "1yr6nsjpnazq4z6dvjfyanljwgwnyjh3ddxa0sq6hl9qc59yq91r"))))
3981 (build-system gnu-build-system)
3987 #~(list (string-append "PREFIX=" #$output)
3989 #:test-target "test"
3991 #~(modify-phases %standard-phases
3992 ;; no configure script
3993 (delete 'configure))))
3994 (home-page "https://www.openh264.org/")
3995 (synopsis "H264 decoder library")
3997 "Openh264 is a library which can decode H264 video streams.")
3998 (license license:bsd-2)))
4000 (define-public libmp4v2
4007 ;; XXX: The new location of upstream is uncertain and will become relevant the
4008 ;; moment when the googlecode archive shuts down. It is past the date it
4009 ;; should've been turned off. I tried to communicate with upstream, but this
4010 ;; wasn't very responsive and not very helpful. The short summary is, it is
4011 ;; chaos when it comes to the amount of forks and only time will tell where
4012 ;; the new upstream location is.
4013 (uri (string-append "https://storage.googleapis.com/google-"
4014 "code-archive-downloads/v2/"
4015 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
4016 (file-name (string-append name "-" version ".tar.bz2"))
4017 (patches (search-patches "libmp4v2-c++11.patch"))
4020 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
4021 (build-system gnu-build-system)
4023 "static")) ; 3.7MiB .a file
4025 `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
4026 #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
4029 (modify-phases %standard-phases
4030 (add-after 'unpack 'remove-dates
4032 ;; Make the build reproducible.
4033 (substitute* "configure"
4034 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
4035 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
4037 (add-after 'install 'move-static-libraries
4038 (lambda* (#:key outputs #:allow-other-keys)
4039 ;; Move static libraries to the "static" output.
4040 (let* ((out (assoc-ref outputs "out"))
4041 (lib (string-append out "/lib"))
4042 (static (assoc-ref outputs "static"))
4043 (slib (string-append static "/lib")))
4045 (for-each (lambda (file)
4046 (install-file file slib)
4048 (find-files lib "\\.a$"))
4051 (list help2man dejagnu))
4052 (home-page "https://code.google.com/archive/p/mp4v2/")
4053 (synopsis "API to create and modify mp4 files")
4055 "The MP4v2 library provides an API to create and modify mp4 files as defined by
4056 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
4057 file format that has been used as a multimedia file format in a variety of platforms and
4058 applications. It is a very powerful and extensible format that can accommodate
4059 practically any type of media.")
4060 (license license:mpl1.1)))
4062 (define-public libmediainfo
4064 (name "libmediainfo")
4068 (uri (string-append "https://mediaarea.net/download/source/"
4069 name "/" version "/"
4070 name "_" version ".tar.xz"))
4073 "1fc0ihj17cdv9zb346llwvbv0hn3sl3ax398ankgp74fcaxvll7w"))))
4074 ;; TODO add a Big Buck Bunny webm for tests.
4076 (list autoconf automake libtool pkg-config))
4078 (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc.
4080 (build-system gnu-build-system)
4082 '(#:tests? #f ; see above TODO
4084 (list "--with-libcurl" "--with-libtinyxml2")
4086 ;; build scripts not in root of archive
4087 (modify-phases %standard-phases
4088 (add-after 'unpack 'change-to-build-dir
4090 (chdir "Project/GNU/Library")
4092 (home-page "https://mediaarea.net/en/MediaInfo")
4093 (synopsis "Library for retrieving media metadata")
4094 (description "MediaInfo is a library used for retrieving technical
4095 information and other metadata about audio or video files. A non-exhaustive
4096 list of the information MediaInfo can retrieve from media files include:
4099 @item General: title, author, director, album, track number, date, duration...
4100 @item Video: codec, aspect, fps, bitrate...
4101 @item Audio: codec, sample rate, channels, language, bitrate...
4102 @item Text: language of subtitle
4103 @item Chapters: number of chapters, list of chapters
4106 MediaInfo supports the following formats:
4109 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
4110 MPEG-2, MPEG-4, DVD (VOB)...
4111 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
4112 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
4113 @item Subtitles: SRT, SSA, ASS, SAMI...
4115 (license license:bsd-2)))
4117 ;; TODO also have a GUI version available
4118 (define-public mediainfo
4124 ;; Warning: This source has proved unreliable 1 time at least.
4125 ;; Consider an alternate source or report upstream if this
4127 (uri (string-append "https://mediaarea.net/download/source/"
4128 name "/" version "/"
4129 name "_" version ".tar.xz"))
4132 "1r1bh1lk2dsiv0j84whgca7qslxbibg6vsih7x5iga2p3lmgjdk2"))))
4134 (list autoconf automake libtool pkg-config))
4136 (list libmediainfo))
4137 (build-system gnu-build-system)
4139 '(#:tests? #f ; lacks tests
4141 ;; build scripts not in root of archive
4142 (modify-phases %standard-phases
4143 (add-after 'unpack 'change-to-build-dir
4145 (chdir "Project/GNU/CLI")
4147 (home-page "https://mediaarea.net/en/MediaInfo")
4148 (synopsis "Utility for reading media metadata")
4149 (description "MediaInfo is a utility used for retrieving technical
4150 information and other metadata about audio or video files. It supports the
4151 many codecs and formats supported by libmediainfo.")
4152 (license license:bsd-2)))
4154 (define-public atomicparsley
4156 (name "atomicparsley")
4157 (version "20200701.154658.b0d6223")
4161 (url "https://github.com/wez/atomicparsley")
4163 (file-name (git-file-name name version))
4166 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
4167 (build-system cmake-build-system)
4169 `(#:tests? #f ;; no tests included
4171 (modify-phases %standard-phases
4172 (add-before 'configure 'set-cmake-version
4174 (substitute* "CMakeLists.txt"
4175 ;; At the time of writing, Guix has CMake at 3.16, but
4176 ;; AtomicParsley uses 3.17. This brings the required CMake
4177 ;; version down to what Guix can afford.
4178 (("VERSION 3.17") "VERSION 3.16"))
4181 (lambda* (#:key outputs #:allow-other-keys)
4182 (let* ((out (assoc-ref outputs "out"))
4183 (bin (string-append out "/bin")))
4184 (install-file "AtomicParsley" bin))
4188 (synopsis "Metadata editor for MPEG-4 files")
4189 (description "AtomicParsley is a lightweight command line program for
4190 reading, parsing and setting metadata into MPEG-4 files, in particular,
4191 iTunes-style metadata.")
4192 (home-page "https://github.com/wez/atomicparsley")
4193 (license license:gpl2+)))
4195 (define-public livemedia-utils
4197 (name "livemedia-utils")
4198 (version "2020.11.19")
4202 "https://download.videolan.org/contrib/live555/live."
4206 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
4207 (build-system gnu-build-system)
4209 `(#:tests? #f ; no tests
4210 #:make-flags (list (string-append "CC=" ,(cc-for-target))
4211 (string-append "CXX=" ,(cxx-for-target))
4212 (string-append "LDFLAGS=-Wl,-rpath="
4213 (assoc-ref %outputs "out") "/lib")
4214 (string-append "PREFIX="
4215 (assoc-ref %outputs "out")))
4216 #:phases (modify-phases %standard-phases
4217 (add-before 'configure 'fix-makefiles-generation
4219 (substitute* "genMakefiles"
4224 (invoke "./genMakefiles"
4225 "linux-with-shared-libraries"))))))
4228 (home-page "http://www.live555.com/liveMedia/")
4229 (synopsis "Set of C++ libraries for multimedia streaming")
4230 (description "This code forms a set of C++ libraries for multimedia
4231 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
4232 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
4233 JPEG video, and several audio codecs. They can easily be extended to support
4234 additional (audio and/or video) codecs, and can also be used to build basic
4235 RTSP or SIP clients and servers.")
4236 (license license:lgpl3+)))
4238 (define-public libdvbpsi
4245 "https://download.videolan.org/pub/libdvbpsi/"
4246 version "/libdvbpsi-" version ".tar.bz2"))
4249 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
4250 (build-system gnu-build-system)
4251 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
4252 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
4254 (description "libdvbpsi is a simple library designed for decoding and
4255 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
4256 and ITU-T H.222.0.")
4257 (license license:lgpl2.1)))
4259 (define-public ffms2
4263 (home-page "https://github.com/FFMS/ffms2")
4267 (url "https://github.com/FFMS/ffms2")
4269 (file-name (git-file-name name version))
4272 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
4273 (build-system gnu-build-system)
4276 (list "--enable-avresample")))
4283 (synopsis "Cross-platform wrapper around ffmpeg/libav")
4285 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
4286 programmers to access a standard API to open and decompress media files.")
4287 ;; sources are distributed under a different license that the binary.
4288 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
4289 (license license:gpl2+))); inherits from ffmpeg
4291 (define-public aegisub
4298 "http://ftp.aegisub.org/pub/archives/releases/source/"
4299 name "-" version ".tar.xz"))
4302 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
4303 (patches (search-patches "aegisub-icu59-include-unistr.patch"
4304 "aegisub-make43.patch"
4305 "aegisub-boost68.patch"))))
4306 (build-system gnu-build-system)
4309 (list "--disable-update-checker"
4310 "--without-portaudio"
4313 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
4314 ;; tests require busted, a lua package we don't have yet
4317 (modify-phases %standard-phases
4318 (add-before 'configure 'fix-ldflags
4320 (setenv "LDFLAGS" "-pthread")
4322 (add-after 'unpack 'fix-boost-headers
4325 '("src/subtitles_provider_libass.cpp"
4326 "src/colour_button.cpp"
4327 "src/video_provider_dummy.cpp"
4328 "./src/video_frame.cpp")
4329 (("#include <boost/gil/gil_all.hpp>")
4330 "#include <boost/gil.hpp>"))
4345 (list intltool desktop-file-utils pkg-config))
4346 (home-page "http://www.aegisub.org/")
4347 (synopsis "Subtitle engine")
4349 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
4350 it quick and easy to time subtitles to audio, and features many powerful
4351 tools for styling them, including a built-in real-time video preview.")
4352 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
4353 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
4354 license:expat)))) ; and src/gl that is under a license similar
4355 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
4356 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
4357 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
4359 (define-public pitivi
4362 (version "2022.06.0")
4367 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
4369 (file-name (git-file-name name version))
4371 (base32 "1wgfi8srblqzd2y6528cyvn56rbdxpwlq0wmwqhabshdk28zyx8d"))))
4372 (build-system meson-build-system)
4374 (list gettext-minimal
4381 gst-editing-services
4385 ;; TODO: Add the 'cvtracker' plugin after our gstreamer packages
4386 ;; has been upgraded to version 1.20.
4387 (gst-plugins/selection gst-plugins-bad #:plugins
4388 '("debugutils" "transcode")
4390 #~'("-Dintrospection=enabled"))
4404 ;; Propagate librsvg so that is is registered in GDK_PIXBUF_MODULE_FILE,
4405 ;; otherwise pitivi fails to launch.
4406 (propagated-inputs (list librsvg))
4410 (modify-phases %standard-phases
4411 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
4412 (lambda* (#:key outputs #:allow-other-keys)
4413 (wrap-program (search-input-file outputs "bin/pitivi")
4414 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
4415 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
4416 ;; We've only added inputs for what Pitivi deems either
4417 ;; necessary or optional. Let the user's packages take
4418 ;; precedence in case they have e.g. the full gst-plugins-bad.
4419 `("GST_PLUGIN_SYSTEM_PATH" suffix
4420 (,(getenv "GST_PLUGIN_SYSTEM_PATH")))))))))
4421 (home-page "http://www.pitivi.org")
4422 (synopsis "Video editor based on GStreamer Editing Services")
4423 (description "Pitivi is a video editor built upon the GStreamer Editing
4424 Services. It aims to be an intuitive and flexible application that can appeal
4425 to newbies and professionals alike.")
4426 (license license:lgpl2.1+)))
4435 (uri (string-append "mirror://sourceforge/gmerlin/"
4436 name "/" version "/"
4437 name "-" version ".tar.gz"))
4438 (file-name (string-append name "-" version ".tar.gz"))
4441 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
4442 (build-system gnu-build-system)
4444 '(#:configure-flags '("LIBS=-lm")))
4446 (list pkg-config doxygen))
4447 (home-page "http://gmerlin.sourceforge.net")
4448 (synopsis "Low level library for multimedia API building")
4450 "Gavl is short for Gmerlin Audio Video Library. It is a low level
4451 library, upon which multimedia APIs can be built. Gavl handles all the
4452 details of audio and video formats like colorspaces, sample rates,
4453 multichannel configurations, etc. It provides standardized definitions for
4454 those formats as well as container structures for carrying audio samples or
4455 video images inside an application.
4457 In addition, it handles the sometimes ugly task of converting between all
4458 these formats and provides some elementary operations (copying, scaling,
4459 alpha blending etc).")
4460 (license license:gpl3)))
4462 (define-public frei0r-plugins
4464 (name "frei0r-plugins")
4469 (uri (string-append "https://files.dyne.org/frei0r/"
4470 "frei0r-plugins-" version ".tar.gz"))
4473 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
4474 (build-system gnu-build-system)
4477 (modify-phases %standard-phases
4478 (add-after 'unpack 'patch-Makefile
4480 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
4481 ;; names in the tarball. Try removing this for future versions.
4482 (substitute* "Makefile.in"
4483 (("README\\.md ChangeLog TODO AUTHORS")
4484 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
4486 ;; TODO: opencv for additional face detection filters.
4491 (home-page "https://www.dyne.org/software/frei0r/")
4492 (synopsis "Minimalistic plugin API for video effects")
4494 "Frei0r is a minimalistic plugin API for video effects.
4495 The main emphasis is on simplicity for an API that will round up
4496 the most common video effects into simple filters, sources and
4497 mixers that can be controlled by parameters. Frei0r wants to
4498 provide a way to share these simple effects between many
4499 applications, avoiding their reimplementation by different projects.
4500 It counts more than 100 plugins.")
4501 (license (list license:gpl2+
4502 ;; The following files are licensed as LGPL2.1+:
4503 ;; src/generator/ising0r/ising0r.c
4504 ;; src/generator/onecol0r/onecol0r.cpp
4505 ;; src/generator/nois0r/nois0r.cpp
4506 ;; src/generator/lissajous0r/lissajous0r.cpp
4507 ;; src/filter/ndvi/gradientlut.hpp
4508 ;; src/filter/ndvi/ndvi.cpp
4509 ;; src/filter/facedetect/facedetect.cpp
4510 license:lgpl2.1+))))
4512 (define-public motion
4516 (home-page "https://motion-project.github.io/")
4520 (url "https://github.com/Motion-Project/motion")
4521 (commit (string-append "release-" version))))
4524 "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95"))
4525 (file-name (git-file-name name version))))
4526 (build-system gnu-build-system)
4528 `(("autoconf" ,autoconf)
4529 ("automake" ,automake)
4530 ("gettext" ,gettext-minimal)
4531 ("pkg-config" ,pkg-config)))
4533 `(("libjpeg" ,libjpeg-turbo)
4535 ("libmicrohttpd" ,libmicrohttpd)
4536 ("sqlite" ,sqlite)))
4538 '(#:phases (modify-phases %standard-phases
4541 (patch-shebang "scripts/version.sh")
4542 (invoke "autoreconf" "-vfi"))))
4543 #:configure-flags '("--sysconfdir=/etc")
4544 #:make-flags (list (string-append "sysconfdir="
4545 (assoc-ref %outputs "out")
4548 #:tests? #f)) ; no 'check' target
4549 (synopsis "Detect motion from video signals")
4551 "Motion is a program that monitors the video signal from one or more
4552 cameras and is able to detect if a significant part of the picture has
4553 changed. Or in other words, it can detect motion.")
4555 ;; Some files say "version 2" and others "version 2 or later".
4556 (license license:gpl2)))
4558 (define-public subdl
4559 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4563 (version (git-version "1.0.3" revision commit))
4567 (url "https://github.com/alexanderwink/subdl")
4569 (file-name (git-file-name name version))
4572 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4573 (build-system trivial-build-system)
4575 `(#:modules ((guix build utils))
4577 (use-modules (guix build utils))
4578 (let* ((out (assoc-ref %outputs "out"))
4579 (bin (string-append out "/bin"))
4580 (source (assoc-ref %build-inputs "source"))
4581 (python (assoc-ref %build-inputs "python")))
4582 (install-file (string-append source "/subdl") bin)
4583 (patch-shebang (string-append bin "/subdl")
4584 (list (string-append python "/bin")))))))
4585 (inputs (list python))
4586 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4587 (description "Subdl is a command-line tool for downloading subtitles from
4588 opensubtitles.org. By default, it will search for English subtitles, display
4589 the results, download the highest-rated result in the requested language and
4590 save it to the appropriate filename.")
4591 (license license:gpl3+)
4592 (home-page "https://github.com/alexanderwink/subdl"))))
4594 (define-public l-smash
4601 (url "https://github.com/l-smash/l-smash")
4602 (commit (string-append "v" version))))
4603 (file-name (git-file-name name version))
4606 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4607 (build-system gnu-build-system)
4609 `(#:tests? #f ;no tests
4611 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4612 (assoc-ref %outputs "out") "/lib"))
4614 (modify-phases %standard-phases
4615 ;; configure fails if it is followed by CONFIG_SHELL
4617 (lambda* (#:key outputs #:allow-other-keys)
4618 (let ((out (assoc-ref outputs "out")))
4619 (invoke "./configure" (string-append "--prefix=" out)
4620 "--disable-static")))))))
4623 (home-page "https://l-smash.github.io/l-smash/")
4624 (synopsis "MP4 multiplexer and demultiplexer library")
4626 "L-SMASH is a cross-platform library that handles the ISO base media file
4627 format and some of its derived file formats, including MP4. It operates as a
4628 multiplexer and demultiplexer, and can mux video and audio in several formats
4629 using standalone executable files.")
4630 (license license:isc)))
4632 (define-public qtfaststart
4634 (name "qtfaststart")
4638 (uri (pypi-uri "qtfaststart" version))
4641 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4642 (build-system python-build-system)
4644 '(#:tests? #f)) ; no test suite
4645 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4646 (description "qtfaststart enables streaming and pseudo-streaming of
4647 QuickTime and MP4 files by moving metadata and offset information to the
4648 beginning of the file. It can also print some useful information about the
4649 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4650 project, which is released into the public domain, as well as ISO 14496-12:2005
4651 (the official spec for MP4), which can be obtained from the ISO or found
4653 (home-page "https://github.com/danielgtaylor/qtfaststart")
4654 (license license:expat)))
4656 (define-public vidstab
4657 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4661 (version (git-version "1.1.0" revision commit))
4665 (url "https://github.com/georgmartius/vid.stab")
4667 (file-name (git-file-name name version))
4670 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4671 (build-system cmake-build-system)
4673 '(#:tests? #f)) ; tests are not run as part of standard build process
4674 (home-page "http://public.hronopik.de/vid.stab/")
4675 (synopsis "Video stabilization library")
4676 (description "Vidstab is a video stabilization library which can be used
4677 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4678 vehicle typically suffers from undesirable shakes and jitters. Activities such
4679 as surfing, skiing, riding and walking while shooting videos are especially
4680 prone to erratic camera shakes. Vidstab targets these video contents to help
4681 create smoother and stable videos.")
4682 (license license:gpl2+))))
4684 (define-public libopenshot
4686 (name "libopenshot")
4691 (url "https://github.com/OpenShot/libopenshot")
4692 (commit (string-append "v" version))))
4693 (file-name (git-file-name name version))
4696 "0i9bsn8gklm1mvj60l3d3xrxdgy8svpxjfqcwsr308j5zjn30pv8"))
4697 (modules '((guix build utils)))
4699 ;; Allow overriding of the python installation dir
4700 (substitute* "bindings/python/CMakeLists.txt"
4701 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4702 (string-append set " CACHE PATH "
4703 "\"Python bindings directory\")")))
4704 (delete-file-recursively "thirdparty")
4706 (build-system cmake-build-system)
4708 `(("pkg-config" ,pkg-config)
4711 ("unittest++" ,unittest-cpp)))
4713 (list alsa-lib zlib))
4714 (propagated-inputs ;all referenced in installed headers
4725 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4726 ,(version-major+minor (package-version python))
4728 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4730 (modify-phases %standard-phases
4731 (add-before 'configure 'set-vars
4732 (lambda* (#:key inputs #:allow-other-keys)
4733 (setenv "LIBOPENSHOT_AUDIO_DIR"
4734 (assoc-ref inputs "libopenshot-audio"))
4736 (assoc-ref inputs "zeromq"))
4737 (setenv "UNITTEST_DIR"
4738 (search-input-directory inputs
4739 "include/UnitTest++")))))))
4740 (home-page "https://openshot.org")
4741 (synopsis "Video-editing, animation, and playback library")
4742 (description "OpenShot Library (libopenshot) is a powerful C++ video
4743 editing library with a multi-threaded and feature rich video editing
4744 API. It includes bindings for Python, Ruby, and other languages.")
4745 (license license:lgpl3+)))
4747 (define-public openshot
4754 (url "https://github.com/OpenShot/openshot-qt")
4755 (commit (string-append "v" version))))
4756 (file-name (git-file-name name version))
4759 "0pa8iwl217503bjlqg2zlrw5lxyq5hvxrf5apxrh3843hj1w1myv"))
4760 (modules '((guix build utils)))
4763 ;; TODO: Unbundle jquery and others from src/timeline/media
4764 (delete-file-recursively "src/images/fonts") #t))))
4765 (build-system python-build-system)
4776 `(#:modules ((guix build python-build-system)
4777 (guix build qt-utils)
4779 #:imported-modules (,@%python-build-system-modules
4780 (guix build qt-utils))
4781 #:phases (modify-phases %standard-phases
4782 (delete 'build) ;install phase does all the work
4784 (lambda* (#:key tests? #:allow-other-keys)
4786 (setenv "QT_QPA_PLATFORM" "offscreen")
4787 (invoke "python" "src/tests/query_tests.py"))))
4788 (add-after 'unpack 'patch-font-location
4789 (lambda* (#:key inputs #:allow-other-keys)
4790 (let ((font (assoc-ref inputs "font-dejavu")))
4791 (substitute* "src/classes/app.py"
4792 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4793 (("fonts") "share/fonts/truetype")
4794 (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
4796 ;; https://github.com/OpenShot/openshot-qt/issues/4502
4797 (add-before 'ensure-no-mtimes-pre-1980 'fix-symbolic-link
4799 (delete-file "images/Humanity/actions/custom/razor_line_with_razor.png")
4800 (symlink "../../../../src/timeline/media/images/razor_line_with_razor.png"
4801 "images/Humanity/actions/custom/razor_line_with_razor.png")))
4802 (add-before 'install 'set-tmp-home
4804 ;; src/classes/info.py "needs" to create several
4805 ;; directories in $HOME when loaded during build
4806 (setenv "HOME" "/tmp")
4808 (add-after 'install 'wrap-program
4809 (lambda* (#:key outputs inputs #:allow-other-keys)
4810 (let ((out (assoc-ref outputs "out")))
4811 (wrap-qt-program "openshot-qt"
4812 #:output out #:inputs inputs))
4814 (home-page "https://www.openshot.org/")
4815 (synopsis "Video editor")
4816 (description "OpenShot takes your videos, photos, and music files and
4817 helps you create the film you have always dreamed of. Easily add sub-titles,
4818 transitions, and effects and then export your film to many common formats.")
4819 (license license:gpl3+)))
4821 (define-public shotcut
4824 (version "22.06.23")
4829 (url "https://github.com/mltframework/shotcut")
4830 (commit (string-append "v" version))))
4831 (file-name (git-file-name name version))
4833 (base32 "1kvhcblzjdjiv3jggdx41djq9pz6a9hg4ilgcwin13gb19ir7dcc"))))
4834 (build-system qt-build-system)
4836 `(#:tests? #f ;there are no tests
4838 (modify-phases %standard-phases
4839 (add-after 'unpack 'patch-executable-paths
4840 (lambda* (#:key inputs #:allow-other-keys)
4841 ;; Shotcut expects ffmpeg and melt executables in the shotcut
4842 ;; directory. Use full store paths.
4843 (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
4844 (mlt (assoc-ref inputs "mlt")))
4845 (substitute* "src/jobs/ffmpegjob.cpp"
4846 (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
4847 (substitute* "src/jobs/meltjob.cpp"
4848 (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
4849 (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
4850 (add-after 'install 'wrap-executable
4851 (lambda* (#:key inputs outputs #:allow-other-keys)
4852 (let* ((out (assoc-ref outputs "out"))
4853 (frei0r (assoc-ref inputs "frei0r-plugins"))
4854 (jack (assoc-ref inputs "jack"))
4855 (ladspa (assoc-ref inputs "ladspa"))
4856 (mlt (assoc-ref inputs "mlt"))
4857 (sdl2 (assoc-ref inputs "sdl2")))
4858 (wrap-program (string-append out "/bin/shotcut")
4859 `("FREI0R_PATH" ":" =
4860 (,(string-append frei0r "/lib/frei0r-1")))
4861 `("LADSPA_PATH" ":" =
4862 (,(string-append ladspa "/lib/ladspa")))
4863 `("LD_LIBRARY_PATH" ":" prefix
4864 ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
4866 ,(list (string-append mlt "/bin"))))))))))
4868 `(("pkg-config" ,pkg-config)
4869 ("python-wrapper" ,python-wrapper)
4870 ("qttools-5" ,qttools-5)))
4894 (home-page "https://www.shotcut.org/")
4895 (synopsis "Video editor built on the MLT framework")
4897 "Shotcut is a video editor built on the MLT framework. Features include
4898 a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
4899 and audio capture, network stream playback, and many more.")
4900 (license license:gpl3+)))
4902 (define-public dav1d
4910 (url "https://code.videolan.org/videolan/dav1d.git")
4912 (file-name (git-file-name name version))
4914 (base32 "0bkps488h9s15ylvkm4fmfywgrpbw570glawpnv6khpq9n223dzl"))))
4915 (build-system meson-build-system)
4916 (native-inputs (list nasm))
4917 (home-page "https://code.videolan.org/videolan/dav1d")
4918 (synopsis "AV1 decoder")
4919 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4920 speed and correctness.")
4921 (license license:bsd-2)))
4923 (define-public wlstream
4924 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4928 (version (git-version "0.0" revision commit))
4933 (url "https://github.com/atomnuker/wlstream")
4935 (file-name (git-file-name name version))
4938 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
4939 (build-system meson-build-system)
4940 (native-inputs (list libdrm pkg-config))
4941 (inputs (list ffmpeg pulseaudio wayland wayland-protocols))
4942 (home-page "https://github.com/atomnuker/wlstream")
4943 (synopsis "Screen capture tool for Wayland sessions")
4944 (description "Wlstream is a screen capture tool for recording audio and
4945 video from a Wayland session.")
4946 (license license:lgpl2.1+))))
4948 (define-public gaupol
4955 (url "https://github.com/otsaloma/gaupol/")
4957 (file-name (git-file-name name version))
4960 "01qbhhycmy26b2mw2jlri321k478jhp7y0jzlcv87iaq05qr4pc8"))))
4961 (build-system python-build-system)
4963 `(("gettext" ,gettext-minimal)
4964 ("pkg-config" ,pkg-config)))
4966 (list python-pygobject
4968 python-pycairo ; Required or else clicking on a subtitle line fails.
4969 python-chardet ; Optional: Character encoding detection.
4970 gtkspell3 ; Optional: Inline spell-checking.
4971 iso-codes ; Optional: Translations.
4979 `(#:tests? #f ; Tests seem to require networking.
4981 (modify-phases %standard-phases
4982 (add-after 'unpack 'disable-builtin-byte-compilation
4984 ;; The setup.py script attempts to compile bytecode and fails.
4985 ;; We compile bytecode in a separate phase, so just disable it.
4986 (substitute* "setup.py"
4987 (("distutils\\.util\\.byte_compile\\(.*")
4989 ;; gaupol's setup.py script does not support one of the Python build
4990 ;; system's default flags, "--single-version-externally-managed".
4992 (lambda* (#:key outputs #:allow-other-keys)
4993 (invoke "python" "setup.py" "install"
4994 (string-append "--prefix=" (assoc-ref outputs "out"))
4996 (add-after 'install 'wrap-gaupol
4997 (lambda* (#:key outputs #:allow-other-keys)
4998 (let ((out (assoc-ref outputs "out"))
4999 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
5000 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
5001 (wrap-program (string-append out "/bin/gaupol")
5002 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
5003 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
5004 (add-after 'unpack 'patch-data-dir
5005 ;; Fix some path variables that setup.py seems to garble.
5006 (lambda* (#:key outputs #:allow-other-keys)
5007 (let ((out (assoc-ref outputs "out")))
5008 (substitute* "setup.py"
5009 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
5010 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
5011 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
5012 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
5013 (synopsis "Editor for text-based subtitles")
5015 "Gaupol supports multiple subtitle file formats and provides means of
5016 creating subtitles, editing texts and timing subtitles to match video. The
5017 user interface features a builtin video player and is designed with attention
5018 to convenience of translating and batch processing of multiple documents.")
5019 (home-page "https://otsaloma.io/gaupol/")
5020 (license license:gpl3+)))
5022 (define-public theorafile
5023 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
5026 (version (git-version "0.0.0" "1" commit))
5031 (url "https://github.com/FNA-XNA/Theorafile")
5033 (file-name (git-file-name name version))
5035 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
5036 (build-system gnu-build-system)
5038 '(#:make-flags '("CC=gcc")
5040 (modify-phases %standard-phases
5045 (invoke "make" "test")))
5047 (lambda* (#:key outputs #:allow-other-keys)
5048 (let ((out (assoc-ref outputs "out")))
5049 (install-file "libtheorafile.so" (string-append out "/lib"))
5050 (install-file "theorafile.h" (string-append out "/include")))
5055 (home-page "https://github.com/FNA-XNA/Theorafile")
5056 (synopsis "Ogg Theora Video Decoder Library")
5057 (description "Theorafile is a library for quickly and easily decoding Ogg
5058 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
5059 (license license:zlib))))
5061 (define-public dvdbackup
5068 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
5069 "dvdbackup-" version "/"
5070 "dvdbackup-" version ".tar.xz"))
5072 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
5073 (build-system gnu-build-system)
5075 (list libdvdcss libdvdread))
5076 (home-page "http://dvdbackup.sourceforge.net")
5077 (synopsis "DVD video ripper")
5079 "A simple command line tool to backup video from a DVD. Decrypts the
5080 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
5081 transcode or reformat the videos in any way, producing perfect backups.")
5082 (license license:gpl3+)))
5084 (define-public svt-av1
5092 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
5093 (commit (string-append "v" version))))
5094 (file-name (git-file-name name version))
5096 (base32 "02fchq2vlxcxzbrss72xl9vrxzysdy39d5i159bmg3qa45ngd2iw"))))
5097 (build-system cmake-build-system)
5098 ;; SVT-AV1 only supports 64-bit Intel-compatible CPUs.
5099 (supported-systems '("x86_64-linux"))
5101 ;; The test suite tries to download test data and git clone a 3rd-party
5102 ;; fork of libaom. Skip it.
5105 (modify-phases %standard-phases
5106 (add-after 'install 'install-documentation
5107 (lambda* (#:key outputs #:allow-other-keys)
5108 (let* ((out (assoc-ref %outputs "out"))
5109 (doc (string-append out "/share/doc/svt-av1-" ,version)))
5110 (copy-recursively "../source/Docs" doc)
5114 (synopsis "AV1 video codec")
5115 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
5116 work-in-progress, aiming to support video-on-demand and live streaming
5117 applications. It only supports Intel-compatible CPUs (x86).")
5118 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
5119 (license license:bsd-2)))
5121 (define-public svt-vp9
5128 (url "https://github.com/OpenVisualCloud/SVT-VP9")
5129 (commit (string-append "v" version))))
5130 (file-name (git-file-name name version))
5133 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
5134 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
5135 (supported-systems '("x86_64-linux"))
5136 (build-system cmake-build-system)
5138 `(#:tests? #f ; No test suite
5140 (modify-phases %standard-phases
5141 (add-after 'install 'install-documentation
5142 (lambda* (#:key outputs #:allow-other-keys)
5143 (let* ((out (assoc-ref %outputs "out"))
5144 (doc (string-append out "/share/doc/" ,name "-" ,version)))
5145 (copy-recursively "../source/Docs" doc)
5149 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
5150 (synopsis "VP9 video encoder")
5151 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
5152 on supporting video-on-demand and live encoding on Intel Xeon processors.")
5153 (license license:bsd-2)))
5155 (define-public w-scan
5158 (version "20170107")
5162 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
5163 version ".tar.bz2"))
5165 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
5166 (build-system gnu-build-system)
5168 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
5169 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
5171 "This is a small command line utility used to perform frequency scans for
5172 DVB and ATSC transmissions without initial tuning data. It can print the
5173 result in several formats:
5175 @item VDR channels.conf,
5176 @item czap/tzap/xine/mplayer channels.conf,
5177 @item Gstreamer dvbsrc plugin,
5178 @item VLC xspf playlist,
5180 @item initial tuning data for scan or dvbv5-scan.
5182 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
5183 (license license:gpl2+)))
5185 ;;; XXX: This crate is used only for rav1e and can be removed once the latter
5186 ;;; is updated. See <https://issues.guix.gnu.org/52837>.
5187 (define rust-dav1d-sys-0.3.2
5189 (name "rust-dav1d-sys")
5194 (uri (crate-uri "dav1d-sys" version))
5196 (string-append name "-" version ".tar.gz"))
5198 (base32 "1jdxhnlxcml6jd67lx78ifzkn1xm18zfk4li7vjdh3fa61i073kx"))))
5199 (build-system cargo-build-system)
5202 (("rust-bindgen" ,rust-bindgen-0.54)
5203 ("rust-metadeps" ,rust-metadeps-1))))
5207 (list dav1d clang llvm))
5208 (home-page "https://github.com/rust-av/dav1d-rs")
5209 (synopsis "FFI bindings to dav1d")
5210 (description "This package provides FFI bindings to dav1d.")
5211 (license license:expat)))
5213 (define-public rav1e
5220 (uri (crate-uri "rav1e" version))
5222 (string-append name "-" version ".tar.gz"))
5225 "006bfcmjwg0phg8gc25b1sl2ngjrb2bh1b3fd0s5gbf9nlkr8qsn"))
5226 (modules '((guix build utils)))
5228 '(substitute* "Cargo.toml"
5229 (("\\[package\\]" m)
5230 (string-append "cargo-features = [\"rust-version\"]\n" m))))))
5231 (build-system cargo-build-system)
5233 `(;; Strip the '--release' flag to work around the doctest failures with
5234 ;; Rust 1.57 (see: https://github.com/xiph/rav1e/issues/2851).
5235 #:cargo-test-flags '()
5237 (("rust-aom-sys" ,rust-aom-sys-0.3)
5238 ("rust-arbitrary" ,rust-arbitrary-0.4)
5239 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
5240 ("rust-arrayvec" ,rust-arrayvec-0.7)
5241 ("rust-av-metrics" ,rust-av-metrics-0.7)
5242 ("rust-backtrace" ,rust-backtrace-0.3)
5243 ("rust-bitstream-io" ,rust-bitstream-io-1)
5244 ("rust-byteorder" ,rust-byteorder-1)
5245 ("rust-cfg-if" ,rust-cfg-if-1)
5246 ("rust-clap" ,rust-clap-2)
5247 ("rust-console" ,rust-console-0.14)
5248 ("rust-crossbeam" ,rust-crossbeam-0.8)
5249 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
5250 ("rust-fern" ,rust-fern-0.6)
5251 ("rust-image" ,rust-image-0.23)
5252 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5253 ("rust-itertools" ,rust-itertools-0.10)
5254 ("rust-ivf" ,rust-ivf-0.1)
5255 ("rust-libc" ,rust-libc-0.2)
5256 ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
5257 ("rust-log" ,rust-log-0.4)
5258 ("rust-nasm-rs" ,rust-nasm-rs-0.2)
5259 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
5260 ("rust-num-derive" ,rust-num-derive-0.3)
5261 ("rust-num-traits" ,rust-num-traits-0.2)
5262 ("rust-paste" ,rust-paste-1)
5263 ("rust-rand" ,rust-rand-0.8)
5264 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5265 ("rust-rayon" ,rust-rayon-1)
5266 ("rust-regex" ,rust-regex-1)
5267 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
5268 ("rust-rustc-version" ,rust-rustc-version-0.4)
5269 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
5270 ("rust-serde" ,rust-serde-1)
5271 ("rust-signal-hook" ,rust-signal-hook-0.3)
5272 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
5273 ("rust-thiserror" ,rust-thiserror-1)
5274 ("rust-toml" ,rust-toml-0.5)
5275 ("rust-v-frame" ,rust-v-frame-0.2)
5276 ("rust-vergen" ,rust-vergen-3)
5277 ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
5278 ("rust-y4m" ,rust-y4m-0.7))
5279 #:cargo-development-inputs
5280 (("rust-assert-cmd" ,rust-assert-cmd-2)
5281 ("rust-cc" ,rust-cc-1)
5282 ("rust-criterion" ,rust-criterion-0.3)
5283 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5284 ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)
5285 ("rust-rand" ,rust-rand-0.8)
5286 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5287 ("rust-semver" ,rust-semver-1))
5289 (modify-phases %standard-phases
5290 (add-after 'unpack 'relax-versions
5292 (substitute* "Cargo.toml"
5293 ;; Allow using more recent versions of
5294 (("~3.1.2") "~3"))))
5295 (add-after 'configure 'force-rust-edition-2018
5296 (lambda* (#:key vendor-dir #:allow-other-keys)
5297 ;; Force all the dependencies to not be higher than edition 2018.
5298 (with-fluids ((%default-port-encoding #f))
5299 (substitute* (find-files vendor-dir "Cargo.toml")
5300 (("edition = \\\"2021\\\"") "edition = \"2018\"")))))
5302 (lambda* (#:key outputs #:allow-other-keys)
5303 (let ((out (assoc-ref outputs "out")))
5304 (invoke "cargo" "cinstall" "--release"
5305 (string-append "--prefix=" out)))))
5306 (add-after 'install 'delete-static-library
5307 (lambda* (#:key outputs #:allow-other-keys)
5308 ;; Delete 80 MiB (!) static library.
5309 (delete-file (string-append (assoc-ref outputs "out")
5310 "/lib/librav1e.a")))))))
5312 (list rust-cargo-c nasm))
5313 (home-page "https://github.com/xiph/rav1e/")
5314 (synopsis "Fast and safe AV1 encoder")
5315 (description "@code{rav1e} is an AV1 video encoder. It is designed to
5316 eventually cover all use cases, though in its current form it is most suitable
5317 for cases where libaom (the reference encoder) is too slow.")
5318 (license license:bsd-2)))
5328 (url "https://github.com/phw/peek")
5330 (file-name (git-file-name name version))
5332 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
5333 (build-system meson-build-system)
5334 (arguments '(#:glib-or-gtk? #t))
5337 ("python" ,python-wrapper)))
5339 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
5340 ("gettext" ,gettext-minimal)
5341 ("glib:bin" ,glib "bin") ; for glib-compile-resources
5342 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
5343 ("pkg-config" ,pkg-config)
5345 (home-page "https://github.com/phw/peek")
5346 (synopsis "Simple animated GIF screen recorder")
5348 "Peek makes it easy to create short screencasts of a screen area. It was
5349 built for the specific use case of recording screen areas, e.g. for easily
5350 showing UI features of your own apps or for showing a bug in bug reports.
5351 With Peek, you simply place the Peek window over the area you want to record
5352 and press \"Record\". Peek is optimized for generating animated GIFs, but you
5353 can also directly record to WebM or MP4 if you prefer.")
5354 (license license:gpl3+)))
5356 (define-public wf-recorder
5358 (name "wf-recorder")
5363 (url "https://github.com/ammen99/wf-recorder")
5364 (commit (string-append "v" version))))
5365 (file-name (git-file-name name version))
5368 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
5369 (build-system meson-build-system)
5373 (list ffmpeg pulseaudio wayland wayland-protocols libx264))
5374 (home-page "https://github.com/ammen99/wf-recorder")
5375 (synopsis "Screen recorder for wlroots-based compositors")
5377 "@code{wf-recorder} is a utility program for screen recording of
5378 wlroots-based compositors. More specifically, those that support
5379 @code{wlr-screencopy-v1} and @code{xdg-output}.")
5380 (license license:expat)))
5382 (define-public guvcview
5388 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
5389 "src-" version ".tar.bz2"))
5392 "108c4g0ns9i1wnxyalmpjqbhlflmrj855vxgggr6qrl6h924w7x2"))))
5393 (build-system gnu-build-system)
5395 ;; There are no tests and "make check" would fail on an intltool error.
5398 (list pkg-config intltool))
5406 ffmpeg ;libavcodec, libavutil
5411 (home-page "http://guvcview.sourceforge.net/")
5412 (synopsis "Control your webcam and capture videos and images")
5414 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
5415 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
5416 It provides control over precise settings of the webcam such as exposure,
5417 brightness, contrast, and frame rate.")
5419 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
5420 (license license:gpl2+)))
5422 (define-public get-iplayer
5424 (name "get-iplayer")
5430 (url "https://github.com/get-iplayer/get_iplayer")
5431 (commit (string-append "v" version))))
5432 (file-name (git-file-name name version))
5434 (base32 "1kzsdq1mhm5h83bbdbhh3jhpfvq4f13ly22mfd6vvmhj8mq084pi"))))
5435 (build-system perl-build-system)
5437 `(#:tests? #f ; no tests
5439 (modify-phases %standard-phases
5443 (lambda* (#:key outputs #:allow-other-keys)
5444 (let* ((out (assoc-ref outputs "out"))
5445 (bin (string-append out "/bin"))
5446 (man (string-append out "/share/man/man1")))
5447 (install-file "get_iplayer" bin)
5448 (install-file "get_iplayer.cgi" bin)
5449 (install-file "get_iplayer.1" man))))
5450 (add-after 'install 'wrap-program
5451 (lambda* (#:key inputs outputs #:allow-other-keys)
5452 (let* ((out (assoc-ref outputs "out"))
5453 (perllib (string-append out "/lib/perl5/site_perl/"
5454 ,(package-version perl))))
5455 (wrap-program (string-append out "/bin/get_iplayer")
5457 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5458 (wrap-program (string-append out "/bin/get_iplayer.cgi")
5460 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))))))))
5462 (list perl-mojolicious perl-lwp-protocol-https perl-xml-libxml))
5463 (home-page "https://github.com/get-iplayer/get_iplayer")
5464 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
5465 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
5466 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
5467 @code{get_iplayer} has three modes: recording a complete programme for later
5468 playback, streaming a programme directly to a playback application, such as
5469 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
5470 terms and recording programmes automatically. It can also stream or record live
5471 BBC iPlayer output.")
5472 (license license:gpl3+)))
5474 (define-public ogmtools
5480 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
5485 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
5486 (build-system gnu-build-system)
5488 (list libvorbis libdvdread))
5489 (synopsis "Information, extraction or creation for OGG media streams")
5491 "These tools allow information about (@code{ogminfo}) or extraction from
5492 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
5493 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
5494 (license license:gpl2)
5495 (home-page "https://www.bunkus.org/videotools/ogmtools/")))
5497 (define-public libcaption
5504 (url "https://github.com/szatmary/libcaption")
5506 (file-name (git-file-name name version))
5509 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
5510 (build-system cmake-build-system)
5512 `(#:tests? #f ; Cannot figure out how to run the unit tests
5513 #:configure-flags '("-DENABLE_RE2C=ON")))
5516 (synopsis "CEA608 / CEA708 closed-caption codec")
5517 (description "Libcaption creates and parses closed-caption data,
5518 providing an encoder / decoder for the EIA608 and CEA708 closed-caption
5521 608 support is currently limited to encoding and decoding the necessary control
5522 and preamble codes as well as support for the Basic North American, Special
5523 North American and Extended Western European character sets.
5525 708 support is limited to encoding the 608 data in NTSC field 1 user data type
5528 In addition, utility functions to create h.264 SEI (Supplementary enhancement
5529 information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
5530 elementary stream are provided.")
5531 (home-page "https://github.com/szatmary/libcaption")
5532 (license license:expat)))
5534 (define-public video-contact-sheet
5536 (name "video-contact-sheet")
5540 (uri (string-append "http://p.outlyer.net/vcs/files/vcs-" version
5544 "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw"))))
5545 (build-system gnu-build-system)
5549 #~(list (string-append "prefix=" #$output))
5551 #~(modify-phases %standard-phases
5555 (add-after 'install 'wrap-program
5557 (wrap-program (string-append #$output "/bin/vcs")
5560 (string-append dir "/bin"))
5561 (list #$(this-package-input "ffmpeg")
5562 #$(this-package-input "imagemagick"))))))))))
5564 (list bash-minimal ffmpeg imagemagick))
5565 (synopsis "Create contact sheets (preview images) from videos")
5566 (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to
5567 create video contact sheets (previews) of videos. Any video supported by
5568 MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools
5569 VCS, by default, makes screenshots the same size as the video, see the manual
5570 for details on how to change this.")
5571 (home-page "http://p.outlyer.net/vcs/")
5572 (license license:lgpl2.1+)))