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 © 2021 Alexey Abramov <levenson@mmer.org>
50 ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
51 ;;; Copyright © 2021 David Wilson <david@daviwil.com>
52 ;;; Copyright © 2021,2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
53 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
54 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
55 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
56 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
57 ;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
58 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
59 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
60 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
61 ;;; Copyright © 2022 Bird <birdsite@airmail.cc>
62 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
63 ;;; Copyright © 2022 Chadwain Holness <chadwainholness@gmail.com>
65 ;;; This file is part of GNU Guix.
67 ;;; GNU Guix is free software; you can redistribute it and/or modify it
68 ;;; under the terms of the GNU General Public License as published by
69 ;;; the Free Software Foundation; either version 3 of the License, or (at
70 ;;; your option) any later version.
72 ;;; GNU Guix is distributed in the hope that it will be useful, but
73 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
74 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75 ;;; GNU General Public License for more details.
77 ;;; You should have received a copy of the GNU General Public License
78 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
80 (define-module (gnu packages video)
81 #:use-module (ice-9 match)
82 #:use-module ((srfi srfi-1) #:hide (zip))
83 #:use-module (srfi srfi-26)
84 #:use-module ((guix licenses) #:prefix license:)
85 #:use-module (guix utils)
86 #:use-module (guix packages)
87 #:use-module (guix download)
88 #:use-module (guix gexp)
89 #:use-module (guix git-download)
90 #:use-module (guix svn-download)
91 #:use-module (guix hg-download)
92 #:use-module (guix build-system cargo)
93 #:use-module (guix build-system cmake)
94 #:use-module (guix build-system copy)
95 #:use-module (guix build-system gnu)
96 #:use-module (guix build-system glib-or-gtk)
97 #:use-module (guix build-system meson)
98 #:use-module (guix build-system perl)
99 #:use-module (guix build-system python)
100 #:use-module (guix build-system qt)
101 #:use-module (guix build-system waf)
102 #:use-module (guix build-system trivial)
103 #:use-module (gnu packages)
104 #:use-module (gnu packages algebra)
105 #:use-module (gnu packages assembly)
106 #:use-module (gnu packages audio)
107 #:use-module (gnu packages autotools)
108 #:use-module (gnu packages avahi)
109 #:use-module (gnu packages backup)
110 #:use-module (gnu packages base)
111 #:use-module (gnu packages bash)
112 #:use-module (gnu packages bison)
113 #:use-module (gnu packages boost)
114 #:use-module (gnu packages build-tools)
115 #:use-module (gnu packages cdrom)
116 #:use-module (gnu packages check)
117 #:use-module (gnu packages cmake)
118 #:use-module (gnu packages compression)
119 #:use-module (gnu packages cpp)
120 #:use-module (gnu packages crates-io)
121 #:use-module (gnu packages crates-graphics)
122 #:use-module (gnu packages curl)
123 #:use-module (gnu packages dejagnu)
124 #:use-module (gnu packages dns)
125 #:use-module (gnu packages docbook)
126 #:use-module (gnu packages documentation)
127 #:use-module (gnu packages elf)
128 #:use-module (gnu packages file)
129 #:use-module (gnu packages flex)
130 #:use-module (gnu packages fonts)
131 #:use-module (gnu packages fontutils)
132 #:use-module (gnu packages freedesktop)
133 #:use-module (gnu packages fribidi)
134 #:use-module (gnu packages gettext)
135 #:use-module (gnu packages ghostscript)
136 #:use-module (gnu packages gl)
137 #:use-module (gnu packages glib)
138 #:use-module (gnu packages guile)
139 #:use-module (gnu packages gnome)
140 #:use-module (gnu packages gnunet)
141 #:use-module (gnu packages gnupg)
142 #:use-module (gnu packages gstreamer)
143 #:use-module (gnu packages gtk)
144 #:use-module (gnu packages image)
145 #:use-module (gnu packages imagemagick)
146 #:use-module (gnu packages iso-codes)
147 #:use-module (gnu packages libidn)
148 #:use-module (gnu packages libreoffice)
149 #:use-module (gnu packages libusb)
150 #:use-module (gnu packages linux)
151 #:use-module (gnu packages llvm)
152 #:use-module (gnu packages lua)
153 #:use-module (gnu packages m4)
154 #:use-module (gnu packages man)
155 #:use-module (gnu packages markup)
156 #:use-module (gnu packages maths)
157 #:use-module (gnu packages music)
158 #:use-module (gnu packages mp3)
159 #:use-module (gnu packages ncurses)
160 #:use-module (gnu packages networking)
161 #:use-module (gnu packages ocr)
162 #:use-module (gnu packages pcre)
163 #:use-module (gnu packages perl)
164 #:use-module (gnu packages perl-check)
165 #:use-module (gnu packages perl-web)
166 #:use-module (gnu packages photo)
167 #:use-module (gnu packages pkg-config)
168 #:use-module (gnu packages popt)
169 #:use-module (gnu packages pretty-print)
170 #:use-module (gnu packages protobuf)
171 #:use-module (gnu packages pulseaudio)
172 #:use-module (gnu packages python)
173 #:use-module (gnu packages python-crypto)
174 #:use-module (gnu packages python-web)
175 #:use-module (gnu packages python-xyz)
176 #:use-module (gnu packages qt)
177 #:use-module (gnu packages rdesktop)
178 #:use-module (gnu packages re2c)
179 #:use-module (gnu packages ruby)
180 #:use-module (gnu packages rust-apps)
181 #:use-module (gnu packages samba)
182 #:use-module (gnu packages sdl)
183 #:use-module (gnu packages serialization)
184 #:use-module (gnu packages shells)
185 #:use-module (gnu packages sqlite)
186 #:use-module (gnu packages ssh)
187 #:use-module (gnu packages swig)
188 #:use-module (gnu packages texinfo)
189 #:use-module (gnu packages textutils)
190 #:use-module (gnu packages tls)
191 #:use-module (gnu packages time)
192 #:use-module (gnu packages upnp)
193 #:use-module (gnu packages vulkan)
194 #:use-module (gnu packages web)
195 #:use-module (gnu packages webkit)
196 #:use-module (gnu packages wget)
197 #:use-module (gnu packages wxwidgets)
198 #:use-module (gnu packages xdisorg)
199 #:use-module (gnu packages xiph)
200 #:use-module (gnu packages xml)
201 #:use-module (gnu packages xorg))
203 (define-public transcode
211 (string-append "https://sources.archlinux.org/other/community/"
212 name "/" name "-" version ".tar.bz2"))
214 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
216 (search-patches "transcode-ffmpeg.patch"))))
217 (build-system gnu-build-system)
221 "CFLAGS=-O2 -g -fcommon"
223 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
224 ;; "--enable-libv4l2"
226 "--enable-libmpeg2convert"
228 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
230 ;;; XXX: Not available.
235 ;;; XXX: Not available.
236 ;"--enable-libpostproc"
243 ;;; XXX: Not available.
246 "--enable-libquicktime"
251 ;;; XXX: Not available.
253 ;;"--enable-mjpegtools"
255 "--enable-imagemagick"
256 ;;; XXX: Not available.
257 ;"--enable-libjpegmmx"
258 "--enable-libjpeg")))
259 ;;; XXX: Not available.
290 ;; ("v4l-utils" ,v4l-utils)
299 (synopsis "Audio/Video Transcoder")
300 (description "Transcode is a fast, versatile and command-line based
301 audio/video everything to everything converter primarily focused on producing
302 AVI video files with MP3 audio, but also including a program to read all the
303 video and audio streams from a DVD.")
305 "http://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
306 (license license:gpl2+)))
308 (define-public svt-hevc
317 (url "https://github.com/OpenVisualCloud/SVT-HEVC")
318 (commit (string-append "v" version))))
319 (file-name (git-file-name name version))
321 (base32 "1cv6vcf5yxcwdvj5yqcckbixqrvvdxk7ibincnnv80pz6wh527sv"))))
322 (build-system cmake-build-system)
324 `(#:tests? #f)) ; Test script is stand-alone
327 (synopsis "SVT HEVC encoder")
328 (description "Scalable Video Technology (SVT) is a software-based video
329 coding technology that is highly optimized for Intel's Xeon processors. Using
330 the SVT-HEVC encoder, it is possible to spread video encoding processing across
331 multiple Intel's Xeon processors to achieve a real advantage of processing
333 (home-page "https://01.org/svt")
334 (license (license:non-copyleft "file:///LICENSE.md"))))
336 (define-public mediasdk
345 (url "https://github.com/Intel-Media-SDK/MediaSDK")
346 (commit (string-append "intel-" name "-" version))))
347 (file-name (git-file-name name version))
349 (base32 "0blwcxr5j8762nylx2cxrq0h53bpgnk859dbs6crq4wr9fcxlx9z"))))
350 (build-system cmake-build-system)
355 "-DENABLE_X11_DRI3=ON"
356 "-DENABLE_WAYLAND=ON"
357 "-DENABLE_TEXTLOG=ON"
361 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
362 (assoc-ref %outputs "out") "/lib"))))
364 `(("pkg-config" ,pkg-config)
365 ("python" ,python-wrapper)))
369 ("pciaccess" ,libpciaccess)
372 (synopsis "Intel Media SDK")
373 (description "MediaSDK provides a plain C API to access hardware-accelerated
374 video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
375 (home-page "http://mediasdk.intel.com/")
376 (license (license:non-copyleft "file:///LICENSE"))))
378 (define-public schroedinger
380 (name "schroedinger")
386 (string-append "https://launchpad.net/" name "/trunk/" version
387 "/+download/" name "-" version ".tar.gz"))
389 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
390 (build-system gnu-build-system)
391 (outputs '("out" "doc"))
394 (modify-phases %standard-phases
395 (add-after 'install 'move-docs
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let* ((out (assoc-ref outputs "out"))
398 (doc (assoc-ref outputs "doc")))
399 (mkdir-p (string-append doc "/share"))
401 (string-append out "/share/gtk-doc")
402 (string-append doc "/share/gtk-doc"))
405 (list dash gtk-doc/stable pkg-config))
411 (synopsis "Dirac video codec")
412 (description "Schroedinger is a project implementing the Dirac video codec in
413 ANSI C code. It is meant to be highly optimized and portable. It is developed
414 as a joint effort between the BBC and Fluendo.")
415 (home-page "https://launchpad.net/schroedinger")
417 ;; This library is licensed under 4 different licenses,
418 ;; and you can choose to use it under the terms of any one of them.
425 (define-public libquicktime
427 (name "libquicktime")
433 (string-append "https://sourceforge.net/projects/" name "/files/"
434 name "/" version "/" name "-" version ".tar.gz"))
436 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
438 (search-patches "libquicktime-ffmpeg.patch"))))
439 (build-system gnu-build-system)
441 (list gettext-minimal doxygen pkg-config))
457 (synopsis "Quick Time Library")
458 (description "The goal of this project is to enhance the quicktime4linux
460 (home-page "http://libquicktime.sourceforge.net/")
461 (license license:lgpl2.1+)))
463 (define-public mjpg-streamer
465 (name "mjpg-streamer")
470 (url "https://github.com/jacksonliam/mjpg-streamer")
471 (commit (string-append "v" version))))
472 (file-name (git-file-name name version))
475 "0w81pg228154blzbzr590xwhcll9baxyqxl6wxrgqsi9cd7pzq23"))
476 (modules '((guix build utils)))
479 (with-directory-excursion "mjpg-streamer-experimental/www"
480 (for-each delete-file-recursively
486 "jquery.ui.core.min.js"
487 "jquery.ui.custom.css"
488 "jquery.ui.tabs.min.js"
489 "jquery.ui.widget.min.js")))))))
490 (build-system cmake-build-system)
492 '(#:tests? #f ; no test suite
494 (modify-phases %standard-phases
495 (add-after 'unpack 'chdir
497 (chdir "mjpg-streamer-experimental"))))))
498 (inputs (list libjpeg-turbo))
499 (synopsis "Stream JPEG over IP network")
500 (description "Command line application that copies JPEG frames from one or
501 more input plugins to multiple output plugins. It can be used to stream JPEG
502 files over an IP-based network from a webcam to various types of viewers such
503 as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of
504 receiving MJPG streams.")
505 (home-page "https://github.com/jacksonliam/mjpg-streamer")
506 (license license:gpl2+)))
508 (define-public mjpegtools
516 (string-append "https://sourceforge.net/projects/mjpeg/files/"
517 name "/" version "/" name "-" version ".tar.gz"))
519 (base32 "16pl22ra3x2mkp8p3awslhlhj46b1nq9g89301gb0q4rgmnm705i"))))
520 (build-system gnu-build-system)
522 (list gtk+-2 libdv libjpeg-turbo libpng libquicktime sdl))
525 (synopsis "Tools for handling MPEG")
526 (description "Mjpeg tools is a suite of programs which support video capture,
527 editing, playback, and compression to MPEG of MJPEG video. Edit, play and
528 compression software is hardware independent.")
529 (home-page "http://mjpeg.sourceforge.net/")
530 (license license:gpl2+)))
532 (define-public libmms
540 (string-append "https://sourceforge.net/projects/" name "/files/"
541 name "/" version "/" name "-" version ".tar.gz"))
543 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
544 (build-system gnu-build-system)
545 (synopsis "MMS stream protocol library")
546 (description "Libmms is a library for streaming media files using the mmst
547 and mmsh protocols.")
548 (home-page "https://sourceforge.net/projects/libmms/")
549 (license license:lgpl2.1+)))
551 (define-public libvideogfx
560 (url "https://github.com/farindk/libvideogfx")
561 (commit (string-append "v" version))))
562 (file-name (git-file-name name version))
564 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
565 (build-system gnu-build-system)
568 (modify-phases %standard-phases
569 (add-after 'unpack 'fix-build-errors
571 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
572 (("av_close_input_file\\(")
573 "avformat_close_input(&"))
574 (substitute* "libvideogfx/graphics/fileio/png.cc"
575 (("is != NULL") "is.good()"))
578 (list autoconf automake libtool pkg-config))
580 `(("ffmpeg" ,ffmpeg-2.8)
581 ("jpeg" ,libjpeg-turbo)
585 (synopsis "Video processing library")
586 (description "LibVideoGfx is a C++ library for low-level video processing.
587 It aims at speeding up the development process for image and video processing
588 applications by providing high-level classes for commonly required tasks.")
589 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
590 (license license:lgpl2.1+)))
592 (define-public libde265
601 (url "https://github.com/strukturag/libde265")
602 (commit (string-append "v" version))))
603 (file-name (git-file-name name version))
605 (base32 "1dzflqbk248lz5ws0ni5acmf32b3rmnq5gsfaz7691qqjxkl1zml"))))
606 (build-system gnu-build-system)
609 (list "--disable-static")))
611 `(("autoconf" ,autoconf)
612 ("automake" ,automake)
614 ("pkg-config" ,pkg-config)
615 ("python" ,python-wrapper)))
617 `(;; XXX: Build fails with libvideogfx.
618 ;; ("libvideogfx" ,libvideogfx)
621 (synopsis "H.265 video codec implementation")
622 (description "Libde265 is an implementation of the h.265 video codec. It is
623 written from scratch and has a plain C API to enable a simple integration into
625 (home-page "https://www.libde265.org/")
642 (url "https://github.com/libts/tslib")
644 (file-name (git-file-name name version))
646 (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
647 (build-system gnu-build-system)
649 `(#:test-target "tests"
651 (list "--with-sdl2")))
653 (list autoconf automake libtool pkg-config))
656 (synopsis "Touchscreen access library")
657 (description "TSLib is a cross-platform library that provides access to
658 touchscreen devices and the ability to apply filters to their input events.")
659 (home-page "http://www.tslib.org/")
660 (license license:lgpl2.1+)))
662 (define-public libmpeg3
670 (string-append "https://sourceforge.net/projects/heroines/files/"
671 "releases/081108/" name "-" version "-src.tar.bz2"))
673 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
674 (build-system gnu-build-system)
676 `(#:test-target "test"
679 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
680 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
682 (modify-phases %standard-phases
683 (add-after 'unpack 'delete-bundled-a52dec
685 (delete-file-recursively "a52dec-0.7.3")
686 (substitute* "Makefile"
687 (("include Makefile\\.a52")
689 (("\\(A52DIR\\)/include")
690 "(A52DIR)/include/a52dec")
692 (string-append match "-la52 ")))
694 (add-before 'install 'create-destination-directory
695 (lambda* (#:key outputs #:allow-other-keys)
696 (let* ((out (string-append (assoc-ref outputs "out"))))
697 (mkdir-p (string-append out "/bin"))
703 (synopsis "Advanced MPEG editing and manipulation library")
704 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
705 and DVD footage in a single library. It supports many esoteric features like
706 parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
708 (home-page "http://heroinewarrior.com/libmpeg3.php")
709 (license license:gpl2+)))
717 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
718 version "/" name "-" version ".tar.gz"))
721 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
722 (build-system gnu-build-system)
725 ("makeinfo" ,texinfo)))
730 (modify-phases %standard-phases
731 (add-after 'unpack 'update-config-scripts
732 (lambda* (#:key inputs native-inputs #:allow-other-keys)
733 ;; Replace outdated config.guess and config.sub.
734 (for-each (lambda (file)
737 (or native-inputs inputs)
738 (string-append "/bin/" file)) "."))
739 '("config.guess" "config.sub"))))
741 (lambda* (#:key build inputs outputs #:allow-other-keys)
742 ;; This old `configure' script doesn't support
743 ;; variables passed as arguments.
744 (let ((out (assoc-ref outputs "out"))
745 (ncurses (assoc-ref inputs "ncurses")))
746 (setenv "CONFIG_SHELL" (which "bash"))
747 (invoke "./configure"
749 (string-append "--prefix=" out)
750 (string-append "--build=" build)
751 (string-append "--with-ncurses="
753 (home-page "http://aa-project.sourceforge.net/aalib/")
754 (synopsis "ASCII-art library")
756 "AA-lib is a low level gfx library which does not require graphics device.
757 In fact, there is no graphical output possible. AA-lib replaces those
758 old-fashioned output methods with powerful ascii-art renderer.")
759 (license license:lgpl2.0+)))
761 (define-public celluloid
768 (uri (string-append "https://github.com/celluloid-player/celluloid"
769 "/releases/download/v" version
770 "/celluloid-" version ".tar.xz"))
772 (base32 "0x23y09jwkg8wbb0yp5f03sj5hwjg3kyhbbww2y1a0izs1iijbdj"))))
773 (build-system glib-or-gtk-build-system)
775 (list intltool pkg-config))
777 (list gtk libepoxy mpv))
778 (home-page "https://github.com/celluloid-player/celluloid")
779 (synopsis "GTK+ frontend for the mpv media player")
780 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
781 It interacts with mpv via the client API exported by libmpv, allowing access to
782 mpv's powerful playback capabilities.")
783 (license license:gpl3+)))
785 (define-public liba52
792 ;; A mirror://sourceforge URI doesn't work, presumably
793 ;; because the SourceForge project is misconfigured.
794 "http://liba52.sourceforge.net/files/a52dec-" version
798 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
799 (patches (search-patches "liba52-enable-pic.patch"
800 "liba52-set-soname.patch"
801 "liba52-use-mtune-not-mcpu.patch"
802 "liba52-link-with-libm.patch"))))
803 (build-system gnu-build-system)
804 ;; XXX We need to run ./bootstrap because of the build system fixes above.
806 (list autoconf automake libtool))
807 (arguments `(#:configure-flags '("--enable-shared")
809 (modify-phases %standard-phases
810 ;; XXX We need to run ./bootstrap because of the build
811 ;; system fixes above.
813 (lambda _ (invoke "sh" "bootstrap"))))))
814 (home-page "http://liba52.sourceforge.net/")
815 (synopsis "ATSC A/52 audio stream decoder")
816 (description "liba52 is a library for decoding ATSC A/52 audio streams.
817 The A/52 standard is used in a variety of applications, including digital
818 television and DVD. It is also known as AC-3.")
819 (license license:gpl2+)))
821 (define-public libaom
828 (url "https://aomedia.googlesource.com/aom/")
829 (commit (string-append "v" version))))
830 (file-name (git-file-name name version))
833 "024vhsx7bw9kajk65hhh5vmqrja0h33rmlcpngsj3yg4p8l29943"))))
834 (build-system cmake-build-system)
836 (list perl pkg-config python)) ; to detect the version
838 `(#:tests? #f ; downloads many video clips
840 (list "-DBUILD_SHARED_LIBS=YES"
842 "-DAOM_TARGET_CPU=generic"
843 (string-append "-DCMAKE_INSTALL_PREFIX="
844 (assoc-ref %outputs "out")))
846 (modify-phases %standard-phases
847 (add-after 'install 'delete-static-libraries
848 (lambda* (#:key outputs #:allow-other-keys)
849 (let* ((out (assoc-ref outputs "out"))
850 (lib (string-append out "/lib")))
851 (for-each delete-file
852 (find-files lib "\\.a$"))))))))
853 (home-page "https://aomedia.googlesource.com/aom/")
854 (synopsis "AV1 video codec")
855 (description "Libaom is the reference implementation of AV1. It includes a
856 shared library and encoder and decoder command-line executables.")
857 (license license:bsd-2)))
859 (define-public libmpeg2
865 ;; A mirror://sourceforge URI doesn't work, presumably
866 ;; because the SourceForge project is misconfigured.
867 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
868 name "-" version ".tar.gz"))
869 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
870 "libmpeg2-global-symbol-test.patch"))
873 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
881 (build-system gnu-build-system)
882 (home-page "http://libmpeg2.sourceforge.net/")
883 (synopsis "MPEG1 and MPEG2 video decoder library")
885 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
886 (license license:gpl2+)))
888 (define-public libx264
889 ;; There are no tags in the repository, so we take the version number from
890 ;; the X264_BUILD variable defined in x264.h.
891 (let ((version "161")
892 (commit "4c2aafd864dd201832ec2be0fef4484925146650")
896 (version (git-version version revision commit))
900 (url "https://code.videolan.org/videolan/x264.git")
902 (file-name (git-file-name name version))
905 "1i6v9h3xx9pi0zmlj3anwwjxqa63sbhy9crrif8dphipwfn9hyg5"))))
906 (build-system gnu-build-system)
908 (list pkg-config nasm))
911 ;; TODO: Add gpac input
913 `(#:tests? #f ;no check target
914 #:configure-flags '("--enable-shared"
915 ;; Don't build the command-line program. If we
916 ;; want it later, we should do so in a different
917 ;; package to avoid a circular dependency (the x264
918 ;; program depends on ffmpeg and ffmpeg depends on
923 ;; On MIPS, we must pass "--disable-asm" or else
924 ;; configure fails after printing: "You specified a
925 ;; pre-MSA CPU in your CFLAGS. If you really want
926 ;; to run on such a CPU, configure with
928 ,@(if (string-prefix? "mips"
929 (or (%current-target-system)
934 (modify-phases %standard-phases
935 (add-after 'unpack 'update-config-scripts
936 (lambda* (#:key native-inputs inputs #:allow-other-keys)
937 (for-each (lambda (file)
940 (or native-inputs inputs)
941 (string-append "/bin/" file)) "."))
942 '("config.guess" "config.sub")))))))
943 (home-page "https://www.videolan.org/developers/x264.html")
944 (synopsis "H.264 video coding library")
945 (description "libx264 is an advanced encoding library for creating
946 H.264 (MPEG-4 AVC) video streams.")
947 (license (list license:gpl2+ ;most files
948 license:isc ;common/x86/x86inc.asm
949 license:lgpl2.1+ ;extras/getopt.c
950 license:bsd-3 ;extras/inttypes.h
951 (license:non-copyleft ;extras/cl*.h
953 "See extras/cl.h in the distribution."))))))
955 (define-public mkvtoolnix
962 (uri (string-append "https://mkvtoolnix.download/sources/"
963 "mkvtoolnix-" version ".tar.xz"))
965 (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s"))
966 (modules '((guix build utils)))
968 ;; Delete bundled libraries.
969 (for-each delete-file-recursively
977 (build-system gnu-build-system)
978 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
999 `(("docbook-xsl" ,docbook-xsl)
1000 ("gettext" ,gettext-minimal)
1001 ("googletest" ,googletest)
1002 ("libxslt" ,libxslt)
1003 ("json-modern-cxx" ,json-modern-cxx)
1005 ("pkg-config" ,pkg-config)
1007 ("qttools" ,qttools)
1011 (list (string-append "--with-boost="
1012 (assoc-ref %build-inputs "boost"))
1013 (string-append "--with-docbook-xsl-root="
1014 (assoc-ref %build-inputs "docbook-xsl")
1015 "/xml/xsl/docbook-xsl-"
1016 ,(package-version docbook-xsl))
1017 "--enable-update-check=no"
1018 "--enable-precompiled-headers=no")
1020 (modify-phases %standard-phases
1021 (add-after 'unpack 'patch-relative-file-names
1022 (lambda* (#:key outputs #:allow-other-keys)
1023 (let ((out (assoc-ref outputs "out")))
1024 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
1026 (string-append out "/bin/" match)))
1028 (add-before 'configure 'add-googletest
1029 (lambda* (#:key inputs #:allow-other-keys)
1030 (symlink (search-input-directory inputs "/include/gtest")
1034 (let ((-j (list "-j" (number->string (parallel-job-count)))))
1035 (apply invoke "rake" -j))))
1038 (invoke "rake" "tests/unit")))
1041 (invoke "rake" "install")))
1042 (add-after 'install 'post-install
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 ;; Move the Qt interface to "gui".
1045 (let* ((out (assoc-ref outputs "out"))
1046 (gui (assoc-ref outputs "gui"))
1047 (strip-store-dir (lambda (path)
1048 (substring path (string-prefix-length out path)))))
1051 (mkdir-p (string-append gui (dirname file)))
1052 (rename-file (string-append out file)
1053 (string-append gui file)))
1054 (append '("/bin/mkvtoolnix-gui"
1055 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
1056 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
1057 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
1058 (map strip-store-dir (find-files out "\\.ogg$"))
1059 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
1060 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
1063 (delete-file-recursively (string-append out file)))
1064 '("/share/applications"
1067 "/share/mkvtoolnix")))
1069 (home-page "https://mkvtoolnix.download")
1070 (synopsis "Tools to create, alter and inspect Matroska files")
1072 "MKVToolNix provides tools for getting information about Matroska files
1073 (@command{mkvinfo}), extracting tracks/data from Matroska files
1074 (@command{mkvextract}), and creating Matroska files from other media files
1075 (@command{mkvmerge}).")
1076 (license license:gpl2)))
1078 (define-public pipe-viewer
1080 (name "pipe-viewer")
1087 (url "https://github.com/trizen/pipe-viewer")
1089 (file-name (git-file-name name version))
1091 (base32 "19qfs0nv7l01468f14a5zbvaiff5hrsk3a4zqknh15014xnvw08s"))))
1092 (build-system perl-build-system)
1094 `(#:imported-modules
1095 ((guix build copy-build-system)
1096 ,@%perl-build-system-modules)
1098 (((guix build copy-build-system)
1100 (guix build perl-build-system)
1103 #:module-build-flags
1107 (modify-phases %standard-phases
1108 (add-after 'unpack 'patch-source
1109 (lambda* (#:key inputs #:allow-other-keys)
1110 (substitute* (find-files "lib" "\\.pm$")
1112 (format #f "\"~a/bin/youtube-dl\""
1113 (assoc-ref inputs "youtube-dl")))
1115 (format #f "\"~a/bin/yt-dlp\""
1116 (assoc-ref inputs "yt-dlp"))))
1117 (substitute* (find-files "bin" ".*-viewer$")
1119 (format #f "'~a/bin/ffmpeg'"
1120 (assoc-ref inputs "ffmpeg")))
1122 (format #f "'~a/bin/wget'"
1123 (assoc-ref inputs "wget")))
1125 (format #f "'~a/bin/xdg-open'"
1126 (assoc-ref inputs "xdg-utils")))
1128 (format #f "'~a/bin/youtube-dl'"
1129 (assoc-ref inputs "youtube-dl")))
1131 (format #f "'~a/bin/yt-dlp'"
1132 (assoc-ref inputs "yt-dlp"))))))
1133 (add-after 'install 'install-xdg
1135 (apply (assoc-ref copy:%standard-phases 'install)
1137 '(("share/icons" "share/pixmaps")
1138 ("share" "share/applications"
1139 #:include-regexp ("\\.desktop$")))
1141 (add-after 'install-xdg 'wrap-programs
1142 (lambda* (#:key outputs #:allow-other-keys)
1143 (let* ((out (assoc-ref outputs "out"))
1144 (bin-dir (string-append out "/bin/"))
1145 (site-dir (string-append out "/lib/perl5/site_perl/"))
1146 (perl-lib (getenv "PERL5LIB"))
1147 (gi-typelib (getenv "GI_TYPELIB_PATH")))
1149 (cut wrap-program <>
1150 `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
1151 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
1152 (find-files bin-dir))))))))
1154 (list perl-module-build perl-test-pod perl-test-simple))
1156 (list perl-data-dump
1168 perl-lwp-protocol-https
1169 perl-lwp-useragent-cached
1173 perl-scalar-list-utils
1176 perl-term-readline-gnu
1177 perl-text-parsewords
1179 perl-unicode-linebreak
1187 (home-page "https://github.com/trizen/pipe-viewer")
1188 (synopsis "CLI+GUI YouTube Client")
1189 (description "Pipe-Viewer is a lightweight application for searching and
1190 playing videos from YouTube. It parses the YouTube website directly and relies
1191 on the Invidious instances only as a fallback method.")
1192 (license license:artistic2.0)))
1194 (define-public straw-viewer
1195 (deprecated-package "straw-viewer" pipe-viewer))
1201 (outputs '("out" "static"))
1205 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
1206 "/downloads/x265_" version ".tar.gz")
1207 (string-append "https://download.videolan.org/videolan/x265/"
1208 "x265_" version ".tar.gz")))
1210 (base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
1211 (patches (search-patches "x265-arm-flags.patch"))
1212 (modules '((guix build utils)))
1214 (delete-file-recursively "source/compat/getopt")
1216 (build-system cmake-build-system)
1218 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1219 (if (string-prefix? "i686" (%current-system))
1223 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
1225 ;; Ensure position independent code for everyone.
1226 (list "-DENABLE_PIC=TRUE"
1228 '("-DENABLE_ASSEMBLY=OFF")
1230 (string-append "-DCMAKE_INSTALL_PREFIX="
1231 (assoc-ref %outputs "out")))
1233 (modify-phases %standard-phases
1234 (add-after 'unpack 'prepare-build
1236 (delete-file-recursively "build")
1239 (add-before 'configure 'build-12-bit
1240 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1241 (mkdir "../build-12bit")
1242 (with-directory-excursion "../build-12bit"
1245 "-DHIGH_BIT_DEPTH=ON"
1246 "-DEXPORT_C_API=OFF"
1250 (substitute* (cons "cmake_install.cmake"
1252 (find-files "CMakeFiles/x265-shared.dir" ".")
1253 (find-files "CMakeFiles/x265-static.dir" ".")))
1254 (("libx265") "libx265_main12"))
1256 (add-before 'configure 'build-10-bit
1257 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1258 (mkdir "../build-10bit")
1259 (with-directory-excursion "../build-10bit"
1262 "-DHIGH_BIT_DEPTH=ON"
1263 "-DEXPORT_C_API=OFF"
1266 (substitute* (cons "cmake_install.cmake"
1268 (find-files "CMakeFiles/x265-shared.dir" ".")
1269 (find-files "CMakeFiles/x265-static.dir" ".")))
1270 (("libx265") "libx265_main10"))
1272 (add-after 'install 'install-more-libs
1274 (with-directory-excursion "../build-12bit"
1275 (invoke "make" "install"))
1276 (with-directory-excursion "../build-10bit"
1277 (invoke "make" "install"))))
1278 (add-before 'strip 'move-static-libs
1279 (lambda* (#:key outputs #:allow-other-keys)
1280 (let ((out (assoc-ref outputs "out"))
1281 (static (assoc-ref outputs "static")))
1282 (mkdir-p (string-append static "/lib"))
1283 (with-directory-excursion
1284 (string-append out "/lib")
1288 (string-append static "/lib/" file)))
1289 (find-files "." "\\.a$"))))
1291 (home-page "http://x265.org/")
1292 (synopsis "Library for encoding h.265/HEVC video streams")
1293 (description "x265 is a H.265 / HEVC video encoder application library,
1294 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1295 (license license:gpl2+)))
1297 (define-public libass
1304 "https://github.com/libass/libass/releases/download/"
1305 version "/libass-" version ".tar.xz"))
1308 "0lwfmdizzrr4gcq3fgw4j8g9pkrqgx6h0f3pgrrnxc07s34kkp8w"))))
1309 (build-system gnu-build-system)
1311 '(#:configure-flags '("--disable-static")))
1313 (list pkg-config nasm))
1315 `(("freetype" ,freetype)
1316 ("fribidi" ,fribidi)
1317 ("fontconfig" ,fontconfig)
1318 ("harfbuzz" ,harfbuzz)))
1319 (home-page "https://github.com/libass/libass")
1320 (synopsis "Subtitle rendering library for the ASS/SSA format")
1321 (description "libass is a subtitle rendering library for the
1322 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1323 (license license:isc)))
1325 (define-public libcaca
1328 (version "0.99.beta19")
1331 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1335 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
1336 (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
1337 "libcaca-CVE-2021-3410-pt2.patch"))))
1338 (build-system gnu-build-system)
1340 '(#:configure-flags '("--disable-static")))
1341 (native-inputs (list pkg-config))
1350 (home-page "http://caca.zoy.org/wiki/libcaca")
1351 (synopsis "Colour ASCII-art library")
1352 (description "libcaca is a graphics library that outputs text instead of
1353 pixels, so that it can work on older video cards or text terminals. It
1354 supports Unicode, 2048 colors, dithering of color images, and advanced text
1355 canvas operations.")
1356 (license license:wtfpl2)))
1358 (define-public libdca
1365 "https://download.videolan.org/pub/videolan/libdca/"
1366 version "/libdca-" version ".tar.bz2"))
1369 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1370 (build-system gnu-build-system)
1372 (list autoconf automake libtool))
1373 (home-page "https://www.videolan.org/developers/libdca.html")
1374 (synopsis "DTS Coherent Acoustics decoder")
1375 (description "libdca is a library for decoding DTS Coherent Acoustics
1377 (license license:gpl2+)))
1379 (define-public libdv
1386 "mirror://sourceforge/libdv/libdv/"
1387 version "/libdv-" version ".tar.gz"))
1390 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1391 (build-system gnu-build-system)
1392 (native-inputs (list pkg-config))
1393 (inputs (list libxv))
1394 (home-page "http://libdv.sourceforge.net/")
1395 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1396 (description "The Quasar DV codec (libdv) is a software codec for DV
1397 video, the encoding format used by most digital camcorders, typically those
1398 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1399 developed according to the official standards for DV video: IEC 61834 and
1401 (license license:lgpl2.1+)))
1403 (define-public libmatroska
1405 (name "libmatroska")
1410 (uri (string-append "https://dl.matroska.org/downloads/"
1411 "libmatroska/libmatroska-" version ".tar.xz"))
1413 (base32 "06h81sxyz2riic0gpzik6ffcnq32wrqphi8c6k55glcdymiimyfs"))))
1414 (build-system cmake-build-system)
1419 (list "-DBUILD_SHARED_LIBS=YES")
1420 #:tests? #f)) ; no test suite
1421 (home-page "https://www.matroska.org")
1422 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1424 "Matroska aims to become the standard of multimedia container formats.
1425 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1426 of XML. EBML enables the Matroska Development Team to gain significant
1427 advantages in terms of future format extensibility, without breaking file
1428 support in old parsers.
1429 libebml is a C++ library to read and write EBML files.")
1430 (license license:lgpl2.1)))
1432 (define-public libplacebo
1440 (url "https://code.videolan.org/videolan/libplacebo")
1441 (commit (string-append "v" version))))
1442 (file-name (git-file-name name version))
1444 (base32 "08kqsd29h8wm0vz7698wh2mdgpwv6anqc5n7d1spnnamwyfwc64h"))))
1445 (build-system meson-build-system)
1448 `("-Dopengl=enabled"
1449 ,(string-append "-Dvulkan-registry="
1450 (assoc-ref %build-inputs "vulkan-headers")
1451 "/share/vulkan/registry/vk.xml"))))
1453 (list python-mako pkg-config))
1461 (home-page "https://code.videolan.org/videolan/libplacebo")
1462 (synopsis "GPU-accelerated image/video processing library")
1463 (description "libplacebo is, in a nutshell, the core rendering algorithms
1464 and ideas of mpv rewritten as an independent library. As of today, libplacebo
1465 contains a large assortment of video processing shaders, focusing on both
1466 quality and performance.")
1467 (license license:lgpl2.1+)))
1469 (define-public libva
1476 (uri (string-append "https://github.com/intel/libva/releases/download/"
1477 version "/libva-" version ".tar.bz2"))
1479 (base32 "0q6l193x9whd80sjd5mx8cb7c0fcljb19nhfpla5h49nkzrq7lzs"))))
1480 (build-system gnu-build-system)
1492 (modify-phases %standard-phases
1494 'build 'fix-dlopen-paths
1495 (lambda* (#:key outputs #:allow-other-keys)
1496 (let ((out (assoc-ref outputs "out")))
1497 (substitute* "va/drm/va_drm_auth_x11.c"
1498 (("\"libva-x11\\.so\\.%d\"")
1499 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
1501 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1502 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1504 (list (string-append "--with-drivers-path="
1505 (assoc-ref %build-inputs "mesa") "/lib/dri"))
1506 ;; However, we can't write to mesa's store directory, so override the
1507 ;; following make variable to install the dummy driver to libva's
1508 ;; $prefix/lib/dri directory.
1510 (list (string-append "dummy_drv_video_ladir="
1511 (assoc-ref %outputs "out") "/lib/dri"))))
1512 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1513 (synopsis "Video acceleration library")
1514 (description "The main motivation for VA-API (Video Acceleration API) is
1515 to enable hardware accelerated video decode/encode at various
1516 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1517 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1518 (license license:expat)))
1520 (define-public libva-utils
1522 (name "libva-utils")
1527 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1528 version "/libva-utils-" version ".tar.bz2"))
1530 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1531 (build-system gnu-build-system)
1534 (list "--enable-wayland"
1539 (list libdrm libva libx11 mesa wayland))
1540 (home-page "https://01.org/linuxmedia/vaapi")
1541 (synopsis "Collection of testing utilities for VA-API")
1543 "This is a collection of utilities to query and test the @acronym{VA-API,
1544 Video Acceleration API} implemented by the libva library.
1546 These tools require a supported graphics chip, driver, and VA-API back end to
1548 (license license:expat)))
1550 (define-public ffmpeg-5
1556 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1560 "0yq0jcdc4qm5znrzylj3dsicrkk2n3n8bv28vr0a506fb7iglbpg"))))
1561 (build-system gnu-build-system)
1564 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1565 ;; See also the related configure flag when changing this.
1566 (if (target-x86-64?) (list rav1e) '())
1609 #:test-target "fate"
1611 ;; possible additional inputs:
1612 ;; --enable-avisynth enable reading of AviSynth script
1614 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1615 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1616 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1617 ;; and libraw1394 [no]
1618 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1619 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1620 ;; --enable-libflite enable flite (voice synthesis) support via
1622 ;; --enable-libgme enable Game Music Emu via libgme [no]
1623 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1624 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1625 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1626 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1627 ;; --enable-libnut enable NUT (de)muxing via libnut,
1628 ;; native (de)muxer exists [no]
1629 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1630 ;; libopencore-amrnb [no]
1631 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1632 ;; libopencore-amrwb [no]
1633 ;; --enable-libopencv enable video filtering via libopencv [no]
1634 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1636 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1637 ;; --enable-libschroedinger enable Dirac de/encoding via
1638 ;; libschroedinger [no]
1639 ;; --enable-libshine enable fixed-point MP3 encoding via
1641 ;; --enable-libssh enable SFTP protocol via libssh [no]
1642 ;; (libssh2 does not work)
1643 ;; --enable-libstagefright-h264 enable H.264 decoding via
1644 ;; libstagefright [no]
1645 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1647 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1648 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1649 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1650 ;; libvo-amrwbenc [no]
1651 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1652 ;; --enable-libxavs enable AVS encoding via xavs [no]
1653 ;; --enable-libzmq enable message passing via libzmq [no]
1654 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1655 ;; --enable-opencl enable OpenCL code
1657 "--enable-gpl" ;enable optional gpl licensed parts
1660 "--enable-fontconfig"
1665 "--enable-libbluray"
1669 "--enable-libfreetype"
1670 "--enable-libmp3lame"
1673 #$@(if (target-x86-64?)
1674 '("--enable-librav1e")
1679 "--enable-libtheora"
1680 "--enable-libtwolame"
1681 "--enable-libvidstab"
1682 "--enable-libvorbis"
1692 "--enable-runtime-cpudetect"
1694 ;; The HTML pages take 7.2 MiB
1695 "--disable-htmlpages"
1697 ;; The static libraries are 23 MiB
1700 ;; Runtime cpu detection is not implemented on
1701 ;; MIPS, so we disable some features.
1702 "--disable-mips32r2"
1704 "--disable-mipsdspr2"
1705 "--disable-mipsfpu")
1707 #~(modify-phases %standard-phases
1709 ;; configure does not work followed by "SHELL=..." and
1710 ;; "CONFIG_SHELL=..."; set environment variables instead
1711 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1712 (let ((out (assoc-ref outputs "out")))
1713 (substitute* "configure"
1714 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1715 (setenv "SHELL" (which "bash"))
1716 (setenv "CONFIG_SHELL" (which "bash"))
1719 (string-append "--prefix=" out)
1720 ;; Add $libdir to the RUNPATH of all the binaries.
1721 (string-append "--extra-ldflags=-Wl,-rpath="
1724 (add-before 'check 'set-ld-library-path
1726 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1728 (let* ((dso (find-files "." "\\.so$"))
1729 (path (string-join (map dirname dso) ":")))
1730 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1731 (setenv "LD_LIBRARY_PATH" path)))))))
1732 (home-page "https://www.ffmpeg.org/")
1733 (synopsis "Audio and video framework")
1734 (description "FFmpeg is a complete, cross-platform solution to record,
1735 convert and stream audio and video. It includes the libavcodec
1736 audio/video codec library.")
1737 (license license:gpl2+)))
1739 (define-public ffmpeg-4
1745 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1749 "14xadxm1yaamp216nq09xwasxg5g133v86dbb33mdg5di1zrlhdg"))))
1751 (substitute-keyword-arguments (package-arguments ffmpeg-5)
1752 ((#:configure-flags flags ''())
1753 #~(cons "--enable-avresample" #$flags))))))
1755 (define-public ffmpeg-3.4
1761 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1765 "0d8nkd9c85rkjlgsq1hidmykkrksi883ygqzhhj6wh4nqflv8vs9"))))
1767 (substitute-keyword-arguments (package-arguments ffmpeg-4)
1768 ((#:modules modules %gnu-build-system-modules)
1771 ((#:configure-flags flags)
1772 #~(fold delete #$flags
1773 '("--enable-libdav1d"
1776 "--enable-libsrt")))))
1777 (inputs (modify-inputs (package-inputs ffmpeg-4)
1778 (delete "dav1d" "libaom" "rav1e" "srt")))))
1780 (define-public ffmpeg-2.8
1782 (inherit ffmpeg-3.4)
1786 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1790 "0k6dq7b8rpjvdl5ncf1135qwc36x0x9va8v83aggvbfhy5d97vwn"))))
1792 `(#:tests? #f ; XXX: Enable them later, if required
1797 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1799 (modify-phases %standard-phases
1801 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1802 (let ((out (assoc-ref outputs "out")))
1803 (substitute* "configure"
1804 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1805 ;; configure does not work followed by "SHELL=..." and
1806 ;; "CONFIG_SHELL=..."; set environment variables instead.
1807 (setenv "SHELL" (which "bash"))
1808 (setenv "CONFIG_SHELL" (which "bash"))
1811 (string-append "--prefix=" out)
1812 ;; Add $libdir to the RUNPATH of all the binaries.
1813 (string-append "--extra-ldflags=-Wl,-rpath="
1817 'check 'set-ld-library-path
1819 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1821 (let* ((dso (find-files "." "\\.so$"))
1822 (path (string-join (map dirname dso) ":")))
1823 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1824 (setenv "LD_LIBRARY_PATH" path)))))))))
1826 (define-public ffmpeg ffmpeg-4)
1828 (define-public ffmpeg-for-stepmania
1837 (url "https://github.com/stepmania/ffmpeg")
1838 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1840 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1841 (file-name (git-file-name "ffmpeg" version))))
1843 (substitute-keyword-arguments (package-arguments ffmpeg-4)
1844 ((#:configure-flags flags)
1845 #~(list "--disable-programs"
1848 "--disable-avdevice"
1849 "--disable-swresample"
1850 "--disable-postproc"
1851 "--disable-avfilter"
1853 "--enable-static"))))
1856 (define-public ffmpegthumbnailer
1858 (name "ffmpegthumbnailer")
1863 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
1865 (file-name (git-file-name name version))
1868 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1869 (build-system cmake-build-system)
1873 (list ffmpeg libjpeg-turbo libpng gvfs))
1875 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1876 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1877 (synopsis "Create thumbnails from video files")
1878 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1879 can be used by file managers to create thumbnails for your video files. The
1880 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1881 videoformats depend on the configuration flags of ffmpeg.")
1882 (license license:gpl2+)))
1887 (version "3.0.17.3")
1891 "https://download.videolan.org/pub/videolan/vlc/"
1892 (car (string-split version #\-))
1893 "/vlc-" version ".tar.xz"))
1896 "0510vqf35f0v9c498yki5441aig3fdqq3nv4vsb1vlvki7pr0zkg"))))
1897 (build-system gnu-build-system)
1901 ("gettext" ,gettext-minimal)
1902 ("pkg-config" ,pkg-config)))
1903 ;; FIXME: Add optional inputs once available.
1905 `(("alsa-lib" ,alsa-lib)
1912 ("fontconfig" ,fontconfig)
1913 ("freetype" ,freetype)
1914 ("fribidi" ,fribidi)
1917 ("libarchive" ,libarchive)
1919 ("libavc1394" ,libavc1394)
1920 ("libbluray" ,libbluray)
1921 ("libcaca" ,libcaca)
1922 ("libcddb" ,libcddb)
1924 ("libdvbpsi" ,libdvbpsi)
1925 ("libdvdnav" ,libdvdnav)
1926 ("libdvdread" ,libdvdread)
1927 ("libebml" ,libebml)
1928 ("libgcrypt" ,libgcrypt)
1930 ("libkate" ,libkate)
1932 ("libmatroska" ,libmatroska)
1933 ("libmicrodns" ,libmicrodns)
1934 ("libmodplug" ,libmodplug)
1935 ("libmpeg2" ,libmpeg2)
1938 ("libraw1394" ,libraw1394)
1939 ("librsvg" ,(librsvg-for-system))
1940 ("libsamplerate" ,libsamplerate)
1941 ("libsecret" ,libsecret)
1942 ("libssh2" ,libssh2)
1943 ("libupnp" ,libupnp)
1945 ("libvdpau" ,libvdpau)
1946 ("libvorbis" ,libvorbis)
1948 ("libtheora" ,libtheora)
1949 ("libx264" ,libx264)
1950 ("libxext" ,libxext)
1952 ("libxinerama" ,libxinerama)
1953 ("libxml2" ,libxml2)
1955 ("livemedia-utils" ,livemedia-utils)
1960 ("pulseaudio" ,pulseaudio)
1961 ("protobuf" ,protobuf)
1962 ("python" ,python-wrapper)
1963 ("qtbase" ,qtbase-5)
1965 ("qtx11extras" ,qtx11extras)
1968 ("sdl-image" ,sdl-image)
1970 ("speexdsp" ,speexdsp)
1971 ;; VLC is not yet compatible with SRT > 1.4.1.
1974 ("twolame" ,twolame)
1976 ("wayland" ,wayland)
1977 ("wayland-protocols" ,wayland-protocols)
1979 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1983 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1984 (assoc-ref %build-inputs "ffmpeg")
1985 "/lib")) ;needed for the tests
1988 (modify-phases %standard-phases
1989 (add-after 'unpack 'patch-source
1990 (lambda* (#:key inputs #:allow-other-keys)
1991 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1992 (substitute* "configure"
1993 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1994 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1995 ;; Some of the tests require using the display to test out VLC,
1996 ;; which fails in our sandboxed build system
1997 (substitute* "test/run_vlc.sh"
1998 (("./vlc --ignore-config") "echo"))
2000 (add-after 'strip 'regenerate-plugin-cache
2001 (lambda* (#:key outputs #:allow-other-keys)
2002 ;; The 'install-exec-hook' rule in the top-level Makefile.am
2003 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
2004 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
2005 ;; it references. Thus, we first reset the timestamps of all
2006 ;; these files, and then regenerate the cache such that the
2007 ;; mtimes it includes are always zero instead of being dependent
2008 ;; on the build time.
2009 (let* ((out (assoc-ref outputs "out"))
2010 (pkglibdir (string-append out "/lib/vlc"))
2011 (plugindir (string-append pkglibdir "/plugins"))
2012 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
2013 ;; TODO: Factorize 'reset-timestamps'.
2014 (for-each (lambda (file)
2015 (let ((s (lstat file)))
2016 (unless (eq? (stat:type s) 'symlink)
2018 (find-files plugindir))
2019 (invoke cachegen plugindir))))
2020 (add-after 'install 'wrap-executable
2021 (lambda* (#:key outputs #:allow-other-keys)
2022 (let ((out (assoc-ref outputs "out"))
2023 (plugin-path (getenv "QT_PLUGIN_PATH")))
2024 (wrap-program (string-append out "/bin/vlc")
2025 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
2027 (home-page "https://www.videolan.org/")
2028 (synopsis "Audio and video framework")
2029 (description "VLC is a cross-platform multimedia player and framework
2030 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
2031 streaming protocols.")
2032 (license license:gpl2+)))
2034 (define-public mplayer
2041 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
2045 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
2046 (build-system gnu-build-system)
2047 ;; FIXME: Add additional inputs once available.
2049 (list pkg-config yasm))
2051 `(("alsa-lib" ,alsa-lib)
2052 ("cdparanoia" ,cdparanoia)
2054 ("fontconfig" ,fontconfig)
2055 ("freetype" ,freetype)
2059 ("libdvdcss" ,libdvdcss)
2060 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
2061 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
2062 ("libjpeg" ,libjpeg-turbo)
2063 ("libmpeg2" ,libmpeg2)
2064 ("libmpg123" ,mpg123) ; audio codec for MP3
2066 ("libtheora" ,libtheora)
2067 ("libvdpau" ,libvdpau)
2068 ("libvorbis" ,libvorbis)
2070 ("libx264" ,libx264)
2071 ("libxinerama" ,libxinerama)
2073 ("libxxf86dga" ,libxxf86dga)
2077 ("pulseaudio" ,pulseaudio)
2078 ("python" ,python-wrapper)
2083 `(#:tests? #f ; no test target
2085 (modify-phases %standard-phases
2087 ;; configure does not work followed by "SHELL=..." and
2088 ;; "CONFIG_SHELL=..."; set environment variables instead
2089 (lambda* (#:key inputs outputs #:allow-other-keys)
2090 (let ((out (assoc-ref outputs "out"))
2091 (libx11 (assoc-ref inputs "libx11")))
2092 (substitute* "configure"
2093 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2094 (setenv "SHELL" (which "bash"))
2095 (setenv "CONFIG_SHELL" (which "bash"))
2096 (invoke "./configure"
2097 (string-append "--extra-cflags=-I"
2098 libx11 "/include") ; to detect libx11
2099 "--disable-ffmpeg_a" ; disables bundled ffmpeg
2100 (string-append "--prefix=" out)
2101 ;; Enable runtime cpu detection where supported,
2102 ;; and choose a suitable target.
2103 ,@(match (or (%current-target-system)
2106 '("--enable-runtime-cpudetection"
2107 "--target=x86_64-linux"))
2109 '("--enable-runtime-cpudetection"
2110 "--target=i686-linux"))
2112 '("--target=mips3-linux"))
2113 (_ (list (string-append
2115 (or (%current-target-system)
2116 (nix-system->gnu-triplet
2117 (%current-system)))))))
2118 "--disable-iwmmxt")))))))
2119 (home-page "https://www.mplayerhq.hu")
2120 (synopsis "Audio and video player")
2121 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
2122 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
2123 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
2124 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
2125 (license license:gpl2)))
2134 (url "https://github.com/mpv-player/mpv")
2135 (commit (string-append "v" version))))
2136 (file-name (git-file-name name version))
2138 (base32 "12qxwm1ww5vhjddl8yvj1xa0n1fi9z3lmzwhaiday2v59ca0qgsk"))))
2139 (build-system waf-build-system)
2141 (list perl ; for zsh completion file
2142 pkg-config python-docutils))
2143 ;; Missing features: libguess, V4L2
2145 `(("alsa-lib" ,alsa-lib)
2152 ("libbluray" ,libbluray)
2153 ("libcaca" ,libcaca)
2154 ("libbs2b" ,libbs2b)
2155 ("libcdio-paranoia" ,libcdio-paranoia)
2156 ("libdvdread" ,libdvdread)
2157 ("libdvdnav" ,libdvdnav)
2158 ("libjpeg" ,libjpeg-turbo)
2160 ("libvdpau" ,libvdpau)
2162 ("libxext" ,libxext)
2163 ("libxinerama" ,libxinerama)
2164 ("libxrandr" ,libxrandr)
2165 ("libxscrnsaver" ,libxscrnsaver)
2167 ;; XXX: lua > 5.2 is not currently supported; see
2168 ;; waftools/checks/custom.py
2172 ("pulseaudio" ,pulseaudio)
2174 ("shaderc" ,shaderc)
2175 ("vulkan-headers" ,vulkan-headers)
2176 ("vulkan-loader" ,vulkan-loader)
2178 ("wayland" ,wayland)
2179 ("wayland-protocols" ,wayland-protocols)
2180 ("libxkbcommon" ,libxkbcommon)
2185 (modify-phases %standard-phases
2186 (add-after 'unpack 'patch-paths
2187 (lambda* (#:key inputs #:allow-other-keys)
2188 (let ((ytdl (assoc-ref inputs "yt-dlp")))
2189 (substitute* "player/lua/ytdl_hook.lua"
2191 (string-append "\"" ytdl "/bin/yt-dlp\","))))))
2192 (add-before 'configure 'build-reproducibly
2194 ;; Somewhere in the build system library dependencies are enumerated
2195 ;; and passed as linker flags, but the order in which they are added
2196 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
2197 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
2198 (setenv "PYTHONHASHSEED" "1")
2201 'configure 'setup-waf
2202 (lambda* (#:key inputs #:allow-other-keys)
2203 (let ((waf (assoc-ref inputs "waf")))
2204 (copy-file (string-append waf "/bin/waf") "waf"))
2207 #:configure-flags (list "--enable-libmpv-shared"
2210 "--disable-build-date")
2211 ;; No check function defined.
2213 (home-page "https://mpv.io/")
2214 (synopsis "Audio and video player")
2215 (description "mpv is a general-purpose audio and video player. It is a
2216 fork of mplayer2 and MPlayer. It shares some features with the former
2217 projects while introducing many more.")
2218 (license license:gpl2+)))
2220 (define-public smplayer
2227 "mirror://sourceforge/smplayer/SMPlayer/" version
2228 "/smplayer-" version ".tar.bz2"))
2231 "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22rc"))))
2232 (build-system qt-build-system)
2236 (list bash-minimal qtbase-5 zlib mpv))
2238 (list #:tests? #false ; no tests
2239 #:make-flags #~(list (string-append "PREFIX=" #$output)
2240 (string-append "CC=" #+(cc-for-target))
2241 ;; A KLUDGE to turn off invoking lrelease on the
2242 ;; project for now, because it fails consistently
2243 ;; with "WARNING: Could not find qmake spec
2244 ;; 'default'". See below.
2247 #~(modify-phases %standard-phases
2249 ;; Due to the above, we must run lrelease separately on each .ts file
2250 ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
2251 ;; project, as the Makefile does normally without the above kludge).
2252 (add-after 'build 'compile-ts-files
2254 (for-each (lambda (file)
2255 (invoke "lrelease" file))
2256 (find-files "./" "\\.ts$"))))
2257 (add-after 'install 'wrap-executable
2258 (lambda* (#:key inputs outputs #:allow-other-keys)
2259 (let* ((out (assoc-ref outputs "out"))
2260 (mpv (assoc-ref inputs "mpv")))
2261 (wrap-program (string-append out "/bin/smplayer")
2263 ,(list (string-append mpv "/bin"))))))))))
2264 (home-page "https://www.smplayer.info")
2265 (synopsis "Complete front-end for MPlayer, a media player")
2266 (description "SMPlayer is a graphical user interface (GUI) for
2267 MPlayer, which is capable of playing almost all known video and audio
2268 formats. Apart from providing access for the most common and useful
2269 options of MPlayer, SMPlayer adds other interesting features like the
2270 possibility to play Youtube videos, download subtitles, remember
2271 the last played position, etc.")
2272 (license license:gpl2+)))
2274 (define-public gallery-dl
2280 (uri (string-append "https://github.com/mikf/gallery-dl"
2281 "/releases/download/v" version "/gallery_dl-"
2285 "0149hd4nh7bk2yqjdnvrkvag5mwgsb6gxrgfcd88q4cv3k2ji42h"))))
2286 (build-system python-build-system)
2287 (inputs (list python-requests ffmpeg))
2288 (home-page "https://github.com/mikf/gallery-dl")
2289 (synopsis "Command-line program to download images from several sites")
2290 (description "Gallery-dl is a command-line program that downloads image
2291 galleries and collections from several image hosting sites. While this package
2292 can use youtube-dl or yt-dlp packages to download videos, the focus is more on
2293 images and image hosting sites.")
2294 (license license:gpl2)))
2296 (define-public gnome-mpv
2297 (deprecated-package "gnome-mpv" celluloid))
2299 (define-public mpv-mpris
2307 (url "https://github.com/hoyon/mpv-mpris")
2309 (file-name (git-file-name name version))
2311 (base32 "03gldk149i2108w3ylyfmci77kdq4whdzfavh7hjviwyj534101r"))))
2312 (build-system copy-build-system)
2315 '(("mpris.so" "lib/"))
2317 (modify-phases %standard-phases
2318 (add-before 'install 'build
2320 (setenv "CC" (which "gcc"))
2321 (invoke "make"))))))
2326 (home-page "https://github.com/hoyon/mpv-mpris")
2327 (synopsis "MPRIS plugin for mpv")
2328 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2329 Interfacing Specification) plugin for the @code{mpv} media player. It implements
2330 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2333 To load this plugin, specify the following option when starting mpv:
2334 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2335 @file{$HOME/.config/mpv/scripts}.")
2336 (license license:expat)))
2338 (define-public libvpx
2345 (url "https://chromium.googlesource.com/webm/libvpx")
2346 (commit (string-append "v" version))))
2347 (file-name (git-file-name name version))
2350 "00f1jrclai2b6ys78dpsg6r1mvcyxlna93vxcz8zjyia24c2pjsb"))
2351 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
2352 (build-system gnu-build-system)
2354 `(#:configure-flags (list "--enable-shared"
2357 ;; Limit size to avoid CVE-2015-1258
2358 "--size-limit=16384x16384"
2359 (string-append "--prefix=" (assoc-ref %outputs "out")))
2360 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2361 (assoc-ref %outputs "out") "/lib"))
2362 #:phases (modify-phases %standard-phases
2364 (lambda* (#:key configure-flags #:allow-other-keys)
2365 ;; The configure script does not understand some of the GNU
2366 ;; options, so we only add the flags specified above.
2367 (apply invoke "./configure" configure-flags))))
2369 ;; XXX: The test suite wants to download 871 files from a cloud storage
2370 ;; service (see test/test-data.sha1). It is possible to specify a
2371 ;; custom directory, but there seems to be no tarball with all files.
2375 (synopsis "VP8/VP9 video codec")
2376 (description "libvpx is a codec for the VP8/VP9 video compression format.")
2377 (license license:bsd-3)
2378 (home-page "https://www.webmproject.org/")))
2380 (define-public youtube-dl
2383 (version "2021.12.17")
2386 (uri (string-append "https://youtube-dl.org/downloads/latest/"
2387 "youtube-dl-" version ".tar.gz"))
2390 "1prm84ci1n1kjzhikhrsbxbgziw6br822psjnijm2ibqnz49jfwz"))
2393 ;; Delete the pre-generated files, except for the man page
2394 ;; which requires 'pandoc' to build.
2395 (for-each delete-file '("youtube-dl"
2396 ;;pandoc is needed to generate
2398 "youtube-dl.bash-completion"
2400 "youtube-dl.zsh"))))))
2401 (build-system python-build-system)
2403 ;; The problem here is that the directory for the man page and completion
2404 ;; files is relative, and for some reason, setup.py uses the
2405 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2406 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2407 ;; completion file is called 'youtube-dl' rather than
2408 ;; 'youtube-dl.bash-completion'.
2409 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2410 #:phases (modify-phases %standard-phases
2411 (add-after 'unpack 'default-to-the-ffmpeg-input
2413 ;; See <https://issues.guix.gnu.org/43418#5>.
2414 ;; ffmpeg is big but required to request free formats
2415 ;; from, e.g., YouTube so pull it in unconditionally.
2416 ;; Continue respecting the --ffmpeg-location argument.
2417 (substitute* "youtube_dl/postprocessor/ffmpeg.py"
2418 (("\\.get\\('ffmpeg_location'\\)" match)
2419 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2420 (add-before 'build 'build-generated-files
2422 ;; Avoid the make targets that require pandoc.
2426 ;;"youtube-dl.1" ; needs pandoc
2427 "youtube-dl.bash-completion"
2429 "youtube-dl.fish")))
2430 (add-before 'install 'fix-the-data-directories
2431 (lambda* (#:key outputs #:allow-other-keys)
2432 (let ((prefix (assoc-ref outputs "out")))
2433 (mkdir "bash-completion")
2434 (rename-file "youtube-dl.bash-completion"
2435 "bash-completion/youtube-dl")
2436 (substitute* "setup.py"
2437 (("youtube-dl\\.bash-completion")
2438 "bash-completion/youtube-dl")
2440 (string-append "'" prefix "/etc/"))
2442 (string-append "'" prefix "/share/"))))))
2443 (add-after 'install 'install-completion
2444 (lambda* (#:key outputs #:allow-other-keys)
2445 (let* ((out (assoc-ref outputs "out"))
2446 (zsh (string-append out
2447 "/share/zsh/site-functions")))
2449 (copy-file "youtube-dl.zsh"
2450 (string-append zsh "/_youtube-dl"))))))))
2455 (synopsis "Download videos from YouTube.com and other sites")
2457 "Youtube-dl is a small command-line program to download videos from
2458 YouTube.com and many more sites.")
2459 (home-page "https://yt-dl.org")
2460 (properties '((release-monitoring-url . "https://yt-dl.org/downloads/")))
2461 (license license:public-domain)))
2463 (define-public yt-dlp
2464 (package/inherit youtube-dl
2466 (version "2022.05.18")
2469 (uri (string-append "https://github.com/yt-dlp/yt-dlp/"
2470 "releases/download/"
2471 version "/yt-dlp.tar.gz"))
2474 "0wiiwqj8m4z6lladmrsp9354ddwlhn2gf0b39j271001g6fyi82r"))
2477 ;; Delete the pre-generated files, except for the man page
2478 ;; which requires 'pandoc' to build.
2479 (for-each delete-file '("yt-dlp"
2480 ;;pandoc is needed to generate
2482 "completions/bash/yt-dlp"
2483 "completions/fish/yt-dlp.fish"
2484 "completions/zsh/_yt-dlp"))))))
2486 (substitute-keyword-arguments (package-arguments youtube-dl)
2489 `(modify-phases ,phases
2490 ;; See the comment for the corresponding phase in youtube-dl.
2491 (replace 'default-to-the-ffmpeg-input
2493 (substitute* "yt_dlp/postprocessor/ffmpeg.py"
2494 (("\\.get_param\\('ffmpeg_location'\\)" match)
2495 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2496 (replace 'build-generated-files
2498 ;; Avoid the yt-dlp.1 target, which requires pandoc.
2499 (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
2500 (replace 'fix-the-data-directories
2501 (lambda* (#:key outputs #:allow-other-keys)
2502 (let ((prefix (assoc-ref outputs "out")))
2503 (substitute* "setup.py"
2505 (string-append "'" prefix "/etc/"))
2507 (string-append "'" prefix "/share/"))))))
2508 (delete 'install-completion)
2510 (lambda* (#:key tests? #:allow-other-keys)
2512 (invoke "pytest" "-k" "not download"))))))))
2514 `(("python-brotli" ,python-brotli)
2515 ("python-certifi" ,python-certifi)
2516 ("python-mutagen" ,python-mutagen)
2517 ("python-pycryptodomex" ,python-pycryptodomex)
2518 ("python-websockets" ,python-websockets)
2519 ,@(package-inputs youtube-dl)))
2521 `(("python-pytest" ,python-pytest)
2522 ,@(package-native-inputs youtube-dl)))
2524 "yt-dlp is a small command-line program to download videos from
2525 YouTube.com and many more sites. It is a fork of youtube-dl with a
2526 focus on adding new features while keeping up-to-date with the
2528 (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/")))
2529 (home-page "https://github.com/yt-dlp/yt-dlp")))
2531 (define-public youtube-dl-gui
2533 (name "youtube-dl-gui")
2538 (uri (pypi-uri "Youtube-DLG" version))
2541 "1bvq2wyn6az59vpdy04dh68fs8m2qzz948xhphibbcpwpcdk00cd"))))
2542 (build-system python-build-system)
2544 ;; In Guix, wxpython has not yet been packaged for Python 3.
2545 `(#:python ,python-2
2546 ;; This package has no tests.
2549 (modify-phases %standard-phases
2550 (add-before 'build 'patch-source
2551 (lambda* (#:key inputs #:allow-other-keys)
2552 ;; The youtube-dl-gui program lets you configure options. Some of
2553 ;; them are problematic, so we change their defaults.
2554 (substitute* "youtube_dl_gui/optionsmanager.py"
2555 ;; When this is true, the builder process will try (and fail) to
2556 ;; write logs to the builder user's home directory.
2557 (("'enable_log': True") "'enable_log': False")
2558 ;; This determines which youtube-dl program youtube-dl-gui will
2559 ;; run. If we don't set this, then youtube-dl-gui might download
2560 ;; an arbitrary copy from the Internet into the user's home
2561 ;; directory and run it, so let's make sure youtube-dl-gui uses
2562 ;; the youtube-dl from the inputs by default.
2563 (("'youtubedl_path': self.config_path")
2564 (string-append "'youtubedl_path': '"
2565 (assoc-ref inputs "youtube-dl")
2567 ;; When this is True, when youtube-dl-gui is finished downloading
2568 ;; a file, it will try (and possibly fail) to open the directory
2569 ;; containing the downloaded file. This can fail because it
2570 ;; assumes that xdg-open is in PATH. Unfortunately, simply
2571 ;; adding xdg-utils to the propagated inputs is not enough to
2572 ;; make this work, so for now we set the default to False.
2573 (("'open_dl_dir': True") "'open_dl_dir': False"))
2574 ;; The youtube-dl program from the inputs is actually a wrapper
2575 ;; script written in bash, so attempting to invoke it as a python
2576 ;; script will fail.
2577 (substitute* "youtube_dl_gui/downloaders.py"
2578 (("cmd = \\['python', self\\.youtubedl_path\\]")
2579 "cmd = [self.youtubedl_path]"))
2580 ;; Use relative paths for installing data files so youtube-dl-gui
2581 ;; installs the files relative to its prefix in the store, rather
2582 ;; than relative to /. Also, instead of installing data files into
2583 ;; $prefix/usr/share, install them into $prefix/share for
2584 ;; consistency (see: (standards) Directory Variables).
2585 (substitute* "setup.py"
2586 (("= '/usr/share") "= 'share"))
2587 ;; Update get_locale_file() so it finds the installed localization
2589 (substitute* "youtube_dl_gui/utils.py"
2590 (("os\\.path\\.join\\('/usr', 'share'")
2591 (string-append "os.path.join('"
2592 (assoc-ref %outputs "out")
2595 (add-after 'install 'create-desktop-file
2596 (lambda* (#:key outputs #:allow-other-keys)
2597 (let* ((out (assoc-ref outputs "out"))
2598 (applications (string-append out "/share/applications")))
2599 (mkdir-p applications)
2600 (call-with-output-file
2601 (string-append applications "/youtube-dl-gui.desktop")
2606 Name=Youtube-dl GUI~@
2607 Comment=Graphical interface to download video with youtube-dl~@
2608 Exec=youtube-dl-gui~@
2609 TryExec=youtube-dl-gui~@
2611 Icon=youtube-dl-gui~@
2613 Categories=AudioVideo;Audio;Video;Network~%")))
2616 (list gettext-minimal))
2618 (list python2-twodict python2-wxpython youtube-dl))
2619 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
2621 "GUI (Graphical User Interface) for @command{youtube-dl}")
2623 "Youtube-dlG is a GUI (Graphical User Interface) for
2624 @command{youtube-dl}. You can use it to download videos from YouTube and any
2625 other site that youtube-dl supports.")
2626 (license license:unlicense)))
2628 (define-public you-get
2631 (version "0.4.1555")
2635 (url "https://github.com/soimort/you-get")
2636 (commit (string-append "v" version))))
2637 (file-name (git-file-name name version))
2640 "0gn86i6nfsw395r9a3i88nv2g08s5bgjps7w4qawb9gvk4h7zqap"))))
2641 (build-system python-build-system)
2643 (list ffmpeg)) ; for multi-part and >=1080p videos
2646 (modify-phases %standard-phases
2647 (add-after 'unpack 'qualify-input-references
2648 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2649 ;; happens to be in the user's $PATH at run time.
2650 (lambda* (#:key inputs #:allow-other-keys)
2651 (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
2652 (substitute* "src/you_get/processor/ffmpeg.py"
2653 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2654 ;; same string is also used when sniffing ffmpeg's output.
2655 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2656 (string-append prefix "'" ffmpeg "'")))))))
2657 #:tests? #f)) ; XXX some tests need Internet access
2658 (synopsis "Download videos, audio, or images from Web sites")
2660 "You-Get is a command-line utility to download media contents (videos,
2661 audio, images) from the Web. It can use either mpv or vlc for playback.")
2662 (home-page "https://you-get.org/")
2663 (license license:expat)))
2665 (define-public youtube-viewer
2667 (name "youtube-viewer")
2672 (url "https://github.com/trizen/youtube-viewer")
2674 (file-name (git-file-name name version))
2677 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
2678 (build-system perl-build-system)
2680 (list perl-module-build))
2682 (list perl-data-dump
2688 perl-lwp-protocol-https
2689 perl-lwp-useragent-cached
2692 perl-term-readline-gnu
2693 perl-unicode-linebreak
2695 ;; Some videos play without youtube-dl, but others silently fail to.
2698 `(#:modules ((guix build perl-build-system)
2701 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2702 ;; is broken without perl-gtk3.
2703 #:module-build-flags '("--gtk2")
2705 (modify-phases %standard-phases
2706 (add-after 'unpack 'refer-to-inputs
2707 (lambda* (#:key inputs #:allow-other-keys)
2708 (substitute* "lib/WWW/YoutubeViewer.pm"
2710 (format #f "'~a/bin/youtube-dl'"
2711 (assoc-ref inputs "youtube-dl"))))
2712 (substitute* '("bin/gtk2-youtube-viewer"
2713 "bin/gtk3-youtube-viewer")
2715 (format #f "'~a/bin/xdg-open'"
2716 (assoc-ref inputs "xdg-utils"))))
2718 (add-after 'install 'install-desktop
2719 (lambda* (#:key outputs #:allow-other-keys)
2720 (let* ((out (assoc-ref outputs "out"))
2721 (sharedir (string-append out "/share")))
2722 (install-file "share/gtk-youtube-viewer.desktop"
2723 (string-append sharedir "/applications"))
2724 (install-file "share/icons/gtk-youtube-viewer.png"
2725 (string-append sharedir "/pixmaps"))
2727 (add-after 'install 'wrap-program
2728 (lambda* (#:key outputs #:allow-other-keys)
2729 (let* ((out (assoc-ref outputs "out"))
2730 (bin-dir (string-append out "/bin/"))
2731 (site-dir (string-append out "/lib/perl5/site_perl/"))
2732 (lib-path (getenv "PERL5LIB")))
2733 (for-each (cut wrap-program <>
2734 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2735 (find-files bin-dir))
2738 "Lightweight application for searching and streaming videos from YouTube")
2740 "Youtube-viewer searches and plays YouTube videos in a native player.
2741 It comes with various search options; it can search for videos, playlists
2742 and/or channels. The videos are streamed directly in a selected video player
2743 at the best resolution (customizable) and with closed-captions (if available).
2744 Both command-line and GTK2 interface are available.")
2745 (home-page "https://github.com/trizen/youtube-viewer")
2746 (license license:perl-license)))
2748 (define-public libbluray
2754 (uri (string-append "https://download.videolan.org/videolan/"
2755 name "/" version "/"
2756 name "-" version ".tar.bz2"))
2759 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
2760 (build-system gnu-build-system)
2762 `(#:configure-flags '("--disable-bdjava-jar"
2765 (modify-phases %standard-phases
2766 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2767 ;; Avoid the need to propagate libxml2 by referring to it
2768 ;; directly, as is already done for fontconfig & freetype.
2769 (lambda* (#:key inputs #:allow-other-keys)
2770 (let ((libxml2 (assoc-ref inputs "libxml2")))
2771 (substitute* "configure"
2772 ((" libxml-2.0") ""))
2773 (substitute* "src/libbluray.pc.in"
2774 (("^Libs.private:" field)
2775 (string-append field " -L" libxml2 "/lib -lxml2")))
2777 (add-before 'build 'fix-dlopen-paths
2778 (lambda* (#:key inputs #:allow-other-keys)
2779 (let ((libaacs (assoc-ref inputs "libaacs"))
2780 (libbdplus (assoc-ref inputs "libbdplus")))
2781 (substitute* "src/libbluray/disc/aacs.c"
2783 (string-append "\"" libaacs "/lib/libaacs\"")))
2784 (substitute* "src/libbluray/disc/bdplus.c"
2786 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2788 (native-inputs (list pkg-config))
2790 `(("fontconfig" ,fontconfig)
2791 ("freetype" ,freetype)
2792 ("libaacs" ,libaacs)
2793 ("libbdplus" ,libbdplus)
2794 ("libxml2" ,libxml2)))
2795 (home-page "https://www.videolan.org/developers/libbluray.html")
2796 (synopsis "Blu-Ray Disc playback library")
2798 "libbluray is a library designed for Blu-Ray Disc playback for media
2799 players, like VLC or MPlayer.")
2800 (license license:lgpl2.1+)))
2802 (define-public libdvdread
2808 (uri (string-append "https://download.videolan.org/videolan/"
2809 "libdvdread/" version "/"
2810 "libdvdread-" version ".tar.bz2"))
2813 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
2814 (build-system gnu-build-system)
2816 `(#:configure-flags '("--with-libdvdcss=yes")))
2821 (home-page "http://dvdnav.mplayerhq.hu/")
2822 (synopsis "Library for reading video DVDs")
2824 "Libdvdread provides a simple foundation for reading DVD video
2825 disks. It provides the functionality that is required to access many
2826 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2827 authentication and descrambling (if an external libdvdcss library is
2829 (license license:gpl2+)))
2831 (define-public dvdauthor
2838 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2842 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2843 (build-system gnu-build-system)
2845 (list libdvdread libpng imagemagick libxml2 freetype))
2848 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2849 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2850 MPEG-2 stream containing VOB packets.")
2851 (home-page "http://dvdauthor.sourceforge.net")
2852 (license license:gpl3+)))
2854 (define-public libdvdnav
2860 (uri (string-append "https://download.videolan.org/videolan/"
2861 "libdvdnav/" version "/"
2862 "libdvdnav-" version ".tar.bz2"))
2865 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2866 (build-system gnu-build-system)
2871 (home-page "http://dvdnav.mplayerhq.hu/")
2872 (synopsis "Library for video DVD navigation features")
2874 "Libdvdnav is a library for developers of multimedia
2875 applications. It allows easy use of sophisticated DVD navigation features
2876 such as DVD menus, multiangle playback and even interactive DVD games. All
2877 this functionality is provided through a simple API which provides the DVD
2878 playback as a single logical stream of blocks, intermitted by special
2879 dvdnav events to report certain conditions. The main usage of libdvdnav is
2880 a loop regularly calling a function to get the next block, surrounded by
2881 additional calls to tell the library of user interaction. The whole
2882 DVD virtual machine and internal playback states are completely
2884 (license license:gpl2+)))
2886 (define-public libdvdcss
2892 (uri (string-append "https://download.videolan.org/pub/"
2893 name "/" version "/"
2894 name "-" version ".tar.bz2"))
2897 "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13"))))
2898 (build-system gnu-build-system)
2899 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2900 (synopsis "Library for accessing DVDs as block devices")
2902 "libdvdcss is a simple library designed for accessing DVDs like a block
2903 device without having to bother about the decryption.")
2904 (license license:gpl2+)))
2906 (define-public srt2vtt
2913 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2917 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
2918 (build-system gnu-build-system)
2921 (modify-phases %standard-phases
2922 (add-after 'install 'wrap-srt2vtt
2923 (lambda* (#:key outputs #:allow-other-keys)
2924 (let* ((out (assoc-ref outputs "out"))
2925 (bin (string-append out "/bin"))
2926 (version ,(let ((v (package-version guile-3.0)))
2927 (string-append (car (string-split v #\.))
2929 (site (string-append out "/share/guile/site/" version))
2930 (compiled (string-append
2931 out "/lib/guile/" version
2933 (wrap-program (string-append bin "/srt2vtt")
2934 `("GUILE_LOAD_PATH" ":" prefix (,site))
2935 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
2940 (synopsis "SubRip to WebVTT subtitle converter")
2941 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2942 for use with HTML5 video.")
2943 (home-page "https://dthompson.us/projects/srt2vtt.html")
2944 (license license:gpl3+)))
2946 (define-public avidemux
2953 "mirror://sourceforge/avidemux/avidemux/" version "/"
2954 "avidemux_" version ".tar.gz"))
2957 "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2"))
2958 (patches (search-patches "avidemux-install-to-lib.patch"))))
2959 (build-system cmake-build-system)
2962 ("pkg-config" ,pkg-config)
2963 ("python" ,python-wrapper)
2964 ("qttools" ,qttools)
2966 ;; FIXME: Once packaged, add libraries not found during the build.
2968 `(("alsa-lib" ,alsa-lib)
2969 ("fontconfig" ,fontconfig)
2970 ("freetype" ,freetype)
2971 ("fribidi" ,fribidi)
2977 ("libvdpau" ,libvdpau)
2978 ("libvorbis" ,libvorbis)
2981 ("pulseaudio" ,pulseaudio)
2982 ("qtbase" ,qtbase-5)
2986 `(#:tests? #f ; no check target
2988 ;; Make sure files inside the included ffmpeg tarball are
2990 (let ((ffmpeg "ffmpeg-4.2.4"))
2991 (modify-phases %standard-phases
2992 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2994 (with-directory-excursion "avidemux_core/ffmpeg_package"
2995 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2996 (delete-file (string-append ffmpeg ".tar.bz2")))
2998 (add-after 'patch-source-shebangs 'repack-ffmpeg
3000 (with-directory-excursion "avidemux_core/ffmpeg_package"
3001 (substitute* (string-append ffmpeg "/configure")
3002 (("#! /bin/sh") (string-append "#!" (which "sh"))))
3003 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
3004 ;; avoid non-determinism in the archive
3005 "--sort=name" "--mtime=@0"
3006 "--owner=root:0" "--group=root:0")
3007 (delete-file-recursively ffmpeg))
3011 ;; Copy-paste settings from the cmake build system.
3012 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
3013 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
3016 (lambda* (#:key inputs outputs #:allow-other-keys)
3017 (let* ((out (assoc-ref outputs "out"))
3018 (lib (string-append out "/lib"))
3021 (lambda* (component srcdir #:optional (args '()))
3022 (let ((builddir (string-append "build_" component)))
3024 (with-directory-excursion builddir
3025 (apply invoke "cmake"
3026 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
3027 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
3028 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
3029 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
3030 "\"-Wl,-rpath=" lib "\"")
3031 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
3032 (string-append "../" srcdir)
3036 (number->string (parallel-job-count)))
3037 (invoke "make" "install"))))))
3039 (build_component "core" "avidemux_core")
3040 (build_component "cli" "avidemux/cli")
3041 (build_component "qt4" "avidemux/qt4")
3042 (build_component "plugins_common" "avidemux_plugins"
3043 '("-DPLUGIN_UI=COMMON"))
3044 (build_component "plugins_cli" "avidemux_plugins"
3045 '("-DPLUGIN_UI=CLI"))
3046 (build_component "plugins_qt4" "avidemux_plugins"
3047 '("-DPLUGIN_UI=QT4"))
3048 (build_component "plugins_settings" "avidemux_plugins"
3049 '("-DPLUGIN_UI=SETTINGS"))
3050 ;; Remove .exe and .dll file.
3051 (delete-file-recursively
3052 (string-append out "/share/ADM6_addons"))
3054 (delete 'install)))))
3055 (home-page "http://fixounet.free.fr/avidemux/")
3056 (synopsis "Video editor")
3057 (description "Avidemux is a video editor designed for simple cutting,
3058 filtering and encoding tasks. It supports many file types, including AVI,
3059 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
3060 can be automated using projects, job queue and powerful scripting
3062 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
3063 ;; Software with various licenses is included, see License.txt.
3064 (license license:gpl2+)))
3066 (define-public vapoursynth
3068 (name "vapoursynth")
3073 (url "https://github.com/vapoursynth/vapoursynth")
3074 (commit (string-append "R" version))))
3075 (file-name (git-file-name name version))
3078 "0qcsfkpkry0cmvi60khjwvfz4fqhy23nqmn4pb9qrwll26sn9dcr"))))
3079 (build-system gnu-build-system)
3082 (modify-phases %standard-phases
3083 (add-after 'install 'wrap
3084 (lambda* (#:key outputs #:allow-other-keys)
3085 (let* ((out (assoc-ref outputs "out"))
3086 (site (string-append out "/lib/python"
3087 ,(version-major+minor
3088 (package-version python))
3090 (wrap-program (string-append out "/bin/vspipe")
3091 `("PYTHONPATH" ":" = (,site)))))))))
3093 `(("autoconf" ,autoconf)
3094 ("automake" ,automake)
3095 ("cython" ,python-cython)
3096 ("libtool" ,libtool)
3097 ("pkg-config" ,pkg-config)
3100 (list ffmpeg libass python tesseract-ocr zimg))
3101 (home-page "http://www.vapoursynth.com/")
3102 (synopsis "Video processing framework")
3103 (description "VapourSynth is a C++ library and Python module for video
3104 manipulation. It aims to be a modern rewrite of Avisynth, supporting
3105 multithreading, generalized colorspaces, per frame properties, and videos with
3107 ;; src/core/cpufeatures only allows x86, ARM or PPC
3108 (supported-systems (fold delete %supported-systems
3109 '("mips64el-linux" "aarch64-linux")))
3110 ;; As seen from the source files.
3111 (license license:lgpl2.1+)))
3120 "http://downloads.xvid.com/downloads/xvidcore-"
3121 version ".tar.bz2"))
3124 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
3125 (build-system gnu-build-system)
3126 (native-inputs (list yasm))
3129 (modify-phases %standard-phases
3130 (add-before 'configure 'pre-configure
3132 (chdir "build/generic")
3133 (substitute* "configure"
3134 (("#! /bin/sh") (string-append "#!" (which "sh"))))
3136 #:tests? #f)) ; no test suite
3137 (home-page "https://www.xvid.com/")
3138 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
3139 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
3140 codec library. It uses ASP features such as b-frames, global and quarter
3141 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
3142 and custom quantization matrices.")
3143 (license license:gpl2+)))
3145 (define-public streamlink
3152 (uri (pypi-uri "streamlink" version))
3155 "09nrspga15svzi0hmakcarbciav0nzf30hg1ff53gia473cd4w4p"))))
3156 (build-system python-build-system)
3158 `(#:phases (modify-phases %standard-phases
3160 (lambda* (#:key tests? #:allow-other-keys)
3162 (invoke "python" "-m" "pytest")))))))
3164 (list python-freezegun python-mock python-pytest
3165 python-requests-mock))
3167 (list python-pysocks
3168 python-websocket-client
3175 (home-page "https://github.com/streamlink/streamlink")
3176 (synopsis "Extract streams from various services")
3177 (description "Streamlink is command-line utility that extracts streams
3178 from sites like Twitch.tv and pipes them into a video player of choice.")
3179 (license license:bsd-2)))
3181 (define-public twitchy
3182 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
3185 (version (git-version "3.4" "1" commit))
3190 (url "https://github.com/BasioMeusPuga/twitchy")
3192 (file-name (git-file-name name version))
3195 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
3196 (build-system python-build-system)
3199 (modify-phases %standard-phases
3200 (add-after 'unpack 'patch-paths
3201 (lambda* (#:key inputs #:allow-other-keys)
3202 (substitute* "twitchy/twitchy_play.py"
3204 (string-append "\"" (assoc-ref inputs "streamlink")
3205 "/bin/streamlink ")))
3207 (add-before 'check 'check-setup
3209 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
3211 (add-after 'install 'install-rofi-plugin
3212 (lambda* (#:key outputs #:allow-other-keys)
3213 (install-file "plugins/rofi-twitchy"
3214 (string-append (assoc-ref outputs "out")
3218 (list python-requests streamlink))
3219 (home-page "https://github.com/BasioMeusPuga/twitchy")
3220 (synopsis "Command-line interface for Twitch.tv")
3222 "This package provides a command-line interface for Twitch.tv")
3223 (license license:gpl3+))))
3233 (url "https://github.com/mltframework/mlt")
3234 (commit (string-append "v" version))))
3235 (file-name (git-file-name name version))
3237 (base32 "1dj7jb5nk0qy28mlw0pcmj4nd607mgx229nhf14gjc0fq9gx71sd"))))
3238 (build-system cmake-build-system)
3241 #:tests? #f ;requires "Kwalify"
3243 #~(modify-phases %standard-phases
3244 (add-before 'configure 'override-LDFLAGS
3247 (string-append "-Wl,-rpath=" #$output "/lib"))))
3248 (add-after 'install 'wrap-executable
3250 (let* ((frei0r #$(this-package-input "frei0r-plugins"))
3251 (ladspa #$(this-package-input "ladspa"))
3252 ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep
3253 ;; compatibility with MLT 6 where it's only 'melt'.
3254 (major #$(version-major version))
3255 (exec (if (file-exists?
3256 (string-append #$output "/bin/melt-" major))
3257 (string-append "melt-" major)
3259 (wrap-program (string-append #$output "/bin/" exec)
3260 `("FREI0R_PATH" ":" =
3261 (,(string-append frei0r "/lib/frei0r-1")))
3262 `("LADSPA_PATH" ":" =
3263 (,(string-append ladspa "/lib/ladspa"))))))))))
3266 `(,alsa-plugins "pulseaudio")
3291 (home-page "https://www.mltframework.org/")
3292 (synopsis "Author, manage, and run multitrack audio/video compositions")
3294 "MLT is a multimedia framework, designed and developed for television
3295 broadcasting. It provides a toolkit for broadcasters, video editors, media
3296 players, transcoders, web streamers and many more types of applications. The
3297 functionality of the system is provided via an assortment of ready to use
3298 tools, XML authoring components, and an extensible plug-in based API.")
3299 (license license:lgpl2.1+)))
3301 (define-public mlt-6
3310 (url "https://github.com/mltframework/mlt")
3311 (commit (string-append "v" version))))
3312 (file-name (git-file-name name version))
3314 (base32 "1gz79xvs5jrzqhwhfk0dqdd3xiavnjp4q957h7nb02rij32byb39"))))
3317 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
3318 (assoc-ref %build-inputs "gtk+")
3319 "/lib/gtk-2.0/include")
3320 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
3321 (assoc-ref %build-inputs "glib")
3322 "/lib/glib-2.0/include"))
3323 ,@(package-arguments mlt)))
3325 (modify-inputs (package-inputs mlt)
3326 (replace "gtk+" gtk+-2)))))
3328 (define-public v4l-utils
3334 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
3335 "/v4l-utils-" version ".tar.bz2"))
3338 "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm"))))
3339 (build-system gnu-build-system)
3340 ;; Separate graphical tools in order to save almost 1 GiB on the closure
3341 ;; for the common case.
3342 (outputs '("out" "gui"))
3345 (list "--disable-static"
3346 (string-append "--with-udevdir="
3347 (assoc-ref %outputs "out")
3350 (modify-phases %standard-phases
3351 (add-after 'install 'split
3352 (lambda* (#:key outputs #:allow-other-keys)
3353 (let ((out (assoc-ref outputs "out"))
3354 (gui (assoc-ref outputs "gui")))
3355 (mkdir-p (string-append gui "/bin"))
3356 (mkdir-p (string-append gui "/share/man/man1"))
3357 (mkdir-p (string-append gui "/share/applications"))
3362 (rename-file (string-append out file)
3363 (string-append gui file)))
3365 (string-append "/bin/" prog)
3366 (string-append "/share/man/man1/" prog ".1")
3367 (string-append "/share/applications/" prog ".desktop"))))
3368 '("qv4l2" "qvidcap"))
3369 (copy-recursively (string-append out "/share/icons")
3370 (string-append gui "/share/icons"))
3371 (delete-file-recursively (string-append out "/share/icons"))
3372 (rmdir (string-append out "/share/applications"))
3375 (list perl pkg-config))
3377 `(("alsa-lib" ,alsa-lib)
3379 ("libjpeg" ,libjpeg-turbo)
3381 ("qtbase" ,qtbase-5)
3383 (synopsis "Realtime video capture utilities for Linux")
3384 (description "The v4l-utils provide a series of libraries and utilities to
3385 be used for realtime video capture via Linux-specific APIs.")
3386 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
3387 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
3388 (license (list license:lgpl2.1+ license:gpl2))))
3397 (url "https://github.com/obsproject/obs-studio")
3400 (file-name (git-file-name name version))
3403 "1ndiarr3d6qihymaigf34jjml0lrgbj640fnpnffz2ysj7276q0j"))
3405 (search-patches "obs-modules-location.patch"))))
3406 (build-system cmake-build-system)
3410 #~(list (string-append "-DOBS_VERSION_OVERRIDE=" #$version)
3411 "-DENABLE_UNIT_TESTS=TRUE"
3412 ;; Browser plugin requires cef, but it is not packaged yet.
3413 ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
3414 "-DBUILD_BROWSER=FALSE")
3416 #~(modify-phases %standard-phases
3417 (add-after 'install 'wrap-executable
3419 (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
3420 (wrap-program (string-append #$output "/bin/obs")
3421 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
3422 (native-search-paths
3423 (list (search-path-specification
3424 (variable "OBS_PLUGINS_DIRECTORY")
3425 (separator #f) ;single entry
3426 (files '("lib/obs-plugins")))
3427 (search-path-specification
3428 (variable "OBS_PLUGINS_DATA_DIRECTORY")
3429 (separator #f) ;single entry
3430 (files '("share/obs/obs-plugins")))))
3432 (list cmocka pkg-config))
3459 (synopsis "Live streaming software")
3460 (description "Open Broadcaster Software provides a graphical interface for
3461 video recording and live streaming. OBS supports capturing audio and video
3462 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3464 (home-page "https://obsproject.com")
3465 (license license:gpl2+)))
3467 (define-public obs-spectralizer
3469 (name "obs-spectralizer")
3475 (url "https://github.com/univrsal/spectralizer")
3476 (commit (string-append "v" version))))
3477 (file-name (git-file-name name version))
3479 ;; Remove bundled Windows DLLs.
3480 (snippet '(delete-file-recursively "fftw3"))
3481 (modules '((guix build utils)))
3485 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i"))))
3486 (build-system cmake-build-system)
3490 (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON")))
3491 (inputs (list obs fftw))
3492 (home-page "https://github.com/univrsal/spectralizer")
3493 (synopsis "OBS plugin for audio visualization")
3494 (description "This OBS plugins allows you to vizualize MPD and internal
3495 OBS audio sources.")
3496 (license license:gpl2)))
3498 (define-public obs-websocket
3500 (name "obs-websocket")
3506 (url "https://github.com/Palakis/obs-websocket")
3509 (file-name (git-file-name name version))
3511 (base32 "0giwhm0rbc578qng4invqqma935zzjlf05msz1gx986aqk654s7k"))))
3512 (build-system cmake-build-system)
3514 `(#:tests? #f ;no tests
3516 (modify-phases %standard-phases
3517 (add-after 'unpack 'remove-permission-change
3519 (substitute* "CMakeLists.txt"
3520 ;; Remove lines that set writeable permissions on outputs.
3521 (("PERMISSIONS [^)]*") "")
3522 (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
3523 ;; Ug^WClever hack to comment out the next line, which is ‘)’.
3524 (("(OWNER|GROUP|WORLD)_READ .*") "#")))))))
3526 (list obs qtbase-5))
3527 (home-page "https://github.com/Palakis/obs-websocket")
3528 (synopsis "OBS plugin for remote control via WebSockets")
3529 (description "This OBS plugin allows you to establish a WebSocket channel
3530 from within your running OBS instance so that you can control it remotely from
3531 programs on your current machine or on other machines.")
3532 (license license:gpl2+)))
3534 (define-public obs-wlrobs
3542 (url "https://hg.sr.ht/~scoopta/wlrobs")
3543 (changeset (string-append "v" version))))
3544 (file-name (git-file-name name version))
3547 "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
3548 (build-system meson-build-system)
3551 (propagated-inputs `() )
3553 `(,libx11 "out") wayland wayland-protocols))
3554 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
3555 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
3557 "This OBS plugin allows you to capture the screen on wlroots-based
3558 Wayland compositors.")
3559 (license license:gpl3+)))
3561 (define-public libvdpau
3569 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3571 (file-name (git-file-name name version))
3574 "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
3575 (build-system meson-build-system)
3579 (list `(,libx11 "out") libxext xorgproto))
3580 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3581 (synopsis "Video Decode and Presentation API")
3582 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3583 provides an interface to video decode acceleration and presentation hardware
3584 present in modern GPUs.")
3585 (license (license:x11-style "file://COPYING"))))
3587 (define-public vdpauinfo
3595 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
3597 (file-name (git-file-name name version))
3599 (base32 "0s84bavxr39w0r7zfaac7kpbfsg88hgymqyzcr0yvbj1yry3liz2"))))
3600 (build-system gnu-build-system)
3603 (modify-phases %standard-phases
3605 ;; ./autogen.sh runs ./configure too soon.
3607 (invoke "autoreconf" "-fiv"))))))
3609 (list autoconf automake libx11 pkg-config))
3612 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3613 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3614 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3616 (license (license:x11-style "file://COPYING"))))
3618 (define-public libvdpau-va-gl
3620 (name "libvdpau-va-gl")
3625 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3626 "releases/download/v" version "/libvdpau-va-gl-"
3630 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3631 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3632 (modules '((guix build utils)))
3633 (snippet '(begin (delete-file-recursively "3rdparty")
3635 (build-system cmake-build-system)
3637 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3639 (list libvdpau pkg-config))
3642 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3643 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3645 "Many applications can use VDPAU to accelerate portions of the video
3646 decoding process and video post-processing to the GPU video hardware. Since
3647 there is no VDPAU available on Intel chips, they fall back to different drawing
3648 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3649 scaling and VA-API (if available) to accelerate video decoding.")
3650 (license license:expat)))
3652 (define-public recordmydesktop
3654 (name "recordmydesktop")
3658 (uri (string-append "https://github.com/Enselic/"
3659 name "/releases/download/v" version
3660 "/recordmydesktop-" version ".tar.gz"))
3663 "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7"))))
3664 (build-system gnu-build-system)
3676 (home-page "https://enselic.github.io/recordmydesktop/")
3677 (synopsis "Desktop session video recorder")
3679 "recordMyDesktop is a command-line tool that captures the activity in
3680 your graphical desktop and encodes it as a video. This is a useful tool for
3681 making @dfn{screencasts}.")
3682 (license license:gpl2+)))
3684 (define-public simplescreenrecorder
3686 (name "simplescreenrecorder")
3692 (url "https://github.com/MaartenBaert/ssr")
3694 (file-name (git-file-name name version))
3697 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3698 (build-system cmake-build-system)
3699 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3700 ;; README.md, the program builds and functions properly without them.
3701 ;; As a result, they are omitted. Please add them back if problems appear.
3712 (native-inputs (list pkg-config))
3715 (list "-DWITH_QT5=TRUE")
3716 #:tests? #f)) ; no test suite
3717 ;; Using HTTPS causes part of the page to be displayed improperly.
3718 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3719 (synopsis "Screen recorder")
3720 (description "SimpleScreenRecorder is an easy to use screen recorder with
3721 a graphical user interface. It supports recording the entire screen, or a
3722 part of it, and allows encoding in many different codecs and file formats.
3723 Other features include a live preview and live streaming.")
3724 (license (list license:gpl3+ ; most files
3725 license:zlib ; glinject/elfhacks.*
3726 license:isc ; glinject/*
3727 license:x11)))) ; build-aux/install-sh
3729 (define-public libsmpeg
3732 (version "0.4.5-401")
3736 (url "svn://svn.icculus.org/smpeg/trunk/")
3737 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3738 (file-name (string-append name "-" version "-checkout"))
3741 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3742 (build-system gnu-build-system)
3744 ;; libsmpeg fails to build with -std=c++11, which is the default with
3745 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3746 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3748 (list autoconf automake))
3751 (home-page "https://icculus.org/smpeg/")
3752 (synopsis "SDL MPEG decoding library")
3754 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3755 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3756 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3757 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3758 and MPEG system streams.")
3759 (license (list license:expat
3765 (define-public libsmpeg-with-sdl1
3766 (package (inherit libsmpeg)
3768 (version "0.4.5-399")
3772 (url "svn://svn.icculus.org/smpeg/trunk/")
3773 (revision 399))) ; tagged release 0.4.5
3774 (file-name (string-append name "-" version "-checkout"))
3777 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3781 (define-public libbdplus
3788 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3789 version "/" name "-" version ".tar.bz2"))
3791 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3794 (build-system gnu-build-system)
3795 (home-page "https://www.videolan.org/developers/libbdplus.html")
3796 (synopsis "Library for decrypting certain Blu-Ray discs")
3797 (description "libbdplus is a library which implements the BD+ System
3799 (license license:lgpl2.1+)))
3801 (define-public libaacs
3808 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3809 version "/libaacs-" version ".tar.bz2"))
3811 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3816 (build-system gnu-build-system)
3817 (home-page "https://www.videolan.org/developers/libaacs.html")
3818 (synopsis "Library for decrypting certain Blu-Ray discs")
3819 (description "libaacs is a library which implements the Advanced Access
3820 Content System specification.")
3821 (license license:lgpl2.1+)))
3823 (define-public mps-youtube
3825 (name "mps-youtube")
3831 (url "https://github.com/mps-youtube/mps-youtube")
3832 (commit (string-append "v" version))))
3833 (file-name (git-file-name name version))
3836 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3837 (build-system python-build-system)
3839 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3840 ;; test suite results differ depending on the country and also introduce
3841 ;; non-determinism in the tests.
3842 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3844 #:phases (modify-phases %standard-phases
3845 ;; Loading this as a library will create cache directories,
3846 ;; etc; which fails in the build container.
3847 (delete 'sanity-check))))
3849 (list python-pafy python-pygobject)) ; For mpris2 support
3850 (home-page "https://github.com/mps-youtube/mps-youtube")
3851 (synopsis "Terminal based YouTube player and downloader")
3853 "@code{mps-youtube} is based on mps, a terminal based program to
3854 search, stream and download music. This implementation uses YouTube as
3855 a source of content and can play and download video as well as audio.
3856 It can use either mpv or mplayer for playback, and for conversion of
3857 formats ffmpeg or libav is used. Users should install one of the
3858 supported players in addition to this package.")
3859 (license license:gpl3+)))
3861 (define-public handbrake
3867 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3868 "releases/download/" version "/"
3869 "HandBrake-" version "-source.tar.bz2"))
3872 "1w1hjj6gvdydypw4mdn281w0x163is59cfm7k6bq371hsl3gx69r"))
3873 (modules '((guix build utils)))
3875 ;; Remove "contrib" and source not necessary for
3876 ;; building/running under a GNU environment.
3878 (for-each delete-file-recursively
3879 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3880 (substitute* "make/include/main.defs"
3881 ;; Disable unconditional inclusion of "contrib" libraries
3882 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3883 ;; which would lead to fetching and building of these
3884 ;; libraries. Use our own instead.
3885 (("MODULES \\+= contrib") "# MODULES += contrib"))))))
3886 (build-system glib-or-gtk-build-system)
3888 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3889 ("autoconf" ,autoconf)
3890 ("intltool" ,intltool)
3891 ("libtool" ,libtool)
3892 ("pkg-config" ,pkg-config)
3893 ("python" ,python-2))) ; For configuration
3896 ("dbus-glib" ,dbus-glib)
3898 ("fontconfig" ,fontconfig)
3899 ("freetype" ,freetype)
3901 ("gstreamer" ,gstreamer)
3902 ("gst-plugins-base" ,gst-plugins-base)
3904 ("jansson" ,jansson)
3907 ("libbluray" ,libbluray)
3909 ("libdvdnav" ,libdvdnav)
3910 ("libdvdread" ,libdvdread)
3911 ("libgudev" ,libgudev)
3912 ("libjpeg-turbo" ,libjpeg-turbo)
3913 ("libmpeg2" ,libmpeg2)
3914 ("libnotify" ,libnotify)
3915 ("libnuma" ,numactl)
3918 ("libsamplerate" ,libsamplerate)
3919 ("libtheora" ,libtheora)
3920 ("libvorbis" ,libvorbis)
3922 ("libxml2" ,libxml2)
3923 ("libx264" ,libx264)
3929 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3931 (list "--disable-gtk-update-checks"
3933 (string-append "CPPFLAGS=-I"
3934 (assoc-ref %build-inputs "libxml2")
3938 (modify-phases %standard-phases
3940 ;; Run bootstrap ahead of time so that shebangs get patched.
3942 (setenv "CONFIG_SHELL" (which "sh"))
3943 ;; Patch the Makefile so that it doesn't bootstrap again.
3944 (substitute* "gtk/module.rules"
3945 ((".*autoreconf.*") ""))
3946 (with-directory-excursion "gtk"
3947 (invoke "autoreconf" "-fiv"))))
3948 (add-before 'configure 'patch-SHELL
3950 (substitute* "gtk/po/Makefile.in.in"
3951 (("SHELL = /bin/sh") "SHELL = @SHELL@"))))
3952 (add-before 'configure 'relax-reqs
3954 (substitute* "make/configure.py"
3955 ;; cmake is checked for so that it can be used to build
3956 ;; contrib/harfbuzz and contrib/x265, but we get these as
3957 ;; inputs, so don't abort if it's not found. Similarly, meson
3958 ;; and ninja are only needed for contrib/libdav1d, and nasm
3960 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3961 (string-append & "False")))))
3963 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3964 ;; 'configure' is not an autoconf-generated script, and
3965 ;; errors on unrecognized arguments,
3966 ;; e.g. --enable-fast-install
3967 (let ((out (assoc-ref outputs "out")))
3968 (apply invoke "./configure"
3969 (string-append "--prefix=" out)
3970 (or configure-flags '())))))
3971 (add-after 'configure 'chdir-build
3972 (lambda _ (chdir "./build"))))))
3973 (home-page "https://handbrake.fr")
3974 (synopsis "Video transcoder")
3976 "HandBrake is a tool for converting video from any format to a selection
3977 of modern, widely supported codecs.")
3978 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3979 ;; Combination under GPLv2. See LICENSE.
3980 (license license:gpl2)))
3982 (define-public intel-vaapi-driver
3984 (name "intel-vaapi-driver")
3990 (url "https://github.com/intel/intel-vaapi-driver")
3993 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3994 (file-name (git-file-name name version))))
3995 (build-system gnu-build-system)
3997 (list autoconf automake libtool pkg-config))
3999 (list libdrm libva libx11))
4002 (modify-phases %standard-phases
4003 (add-before 'configure 'set-target-directory
4004 (lambda* (#:key outputs #:allow-other-keys)
4005 (let ((out (assoc-ref outputs "out")))
4006 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
4008 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
4009 ;; this to all VA-API back ends instead of once to libva.
4010 (native-search-paths
4011 (list (search-path-specification
4012 (variable "LIBVA_DRIVERS_PATH")
4013 (files '("lib/dri")))))
4014 (supported-systems '("i686-linux" "x86_64-linux"))
4015 (home-page "https://01.org/linuxmedia/vaapi")
4016 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
4018 "This is the @acronym{VA-API, Video Acceleration API} back end required for
4019 hardware-accelerated video processing on Intel GEN Graphics devices supported by
4020 the i915 driver, such as integrated Intel HD Graphics. It provides access to
4021 both hardware and shader functionality for faster encoding, decoding, and
4022 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
4023 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
4024 license:expat)))) ; the rest, excluding the test suite
4026 (define-public openh264
4033 (url "https://github.com/cisco/openh264")
4034 (commit (string-append "v" version))))
4035 (file-name (git-file-name name version))
4038 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
4039 (build-system gnu-build-system)
4043 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
4045 #:test-target "test"
4046 #:phases (modify-phases %standard-phases
4047 ;; no configure script
4048 (delete 'configure))))
4049 (home-page "https://www.openh264.org/")
4050 (synopsis "H264 decoder library")
4052 "Openh264 is a library which can decode H264 video streams.")
4053 (license license:bsd-2)))
4055 (define-public libmp4v2
4062 ;; XXX: The new location of upstream is uncertain and will become relevant the
4063 ;; moment when the googlecode archive shuts down. It is past the date it
4064 ;; should've been turned off. I tried to communicate with upstream, but this
4065 ;; wasn't very responsive and not very helpful. The short summary is, it is
4066 ;; chaos when it comes to the amount of forks and only time will tell where
4067 ;; the new upstream location is.
4068 (uri (string-append "https://storage.googleapis.com/google-"
4069 "code-archive-downloads/v2/"
4070 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
4071 (file-name (string-append name "-" version ".tar.bz2"))
4072 (patches (search-patches "libmp4v2-c++11.patch"))
4075 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
4076 (build-system gnu-build-system)
4078 "static")) ; 3.7MiB .a file
4080 `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
4081 #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
4084 (modify-phases %standard-phases
4085 (add-after 'unpack 'remove-dates
4087 ;; Make the build reproducible.
4088 (substitute* "configure"
4089 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
4090 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
4092 (add-after 'install 'move-static-libraries
4093 (lambda* (#:key outputs #:allow-other-keys)
4094 ;; Move static libraries to the "static" output.
4095 (let* ((out (assoc-ref outputs "out"))
4096 (lib (string-append out "/lib"))
4097 (static (assoc-ref outputs "static"))
4098 (slib (string-append static "/lib")))
4100 (for-each (lambda (file)
4101 (install-file file slib)
4103 (find-files lib "\\.a$"))
4106 (list help2man dejagnu))
4107 (home-page "https://code.google.com/archive/p/mp4v2/")
4108 (synopsis "API to create and modify mp4 files")
4110 "The MP4v2 library provides an API to create and modify mp4 files as defined by
4111 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
4112 file format that has been used as a multimedia file format in a variety of platforms and
4113 applications. It is a very powerful and extensible format that can accommodate
4114 practically any type of media.")
4115 (license license:mpl1.1)))
4117 (define-public libmediainfo
4119 (name "libmediainfo")
4123 (uri (string-append "https://mediaarea.net/download/source/"
4124 name "/" version "/"
4125 name "_" version ".tar.xz"))
4128 "1fc0ihj17cdv9zb346llwvbv0hn3sl3ax398ankgp74fcaxvll7w"))))
4129 ;; TODO add a Big Buck Bunny webm for tests.
4131 (list autoconf automake libtool pkg-config))
4133 (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc.
4135 (build-system gnu-build-system)
4137 '(#:tests? #f ; see above TODO
4139 (list "--with-libcurl" "--with-libtinyxml2")
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/Library")
4147 (home-page "https://mediaarea.net/en/MediaInfo")
4148 (synopsis "Library for retrieving media metadata")
4149 (description "MediaInfo is a library used for retrieving technical
4150 information and other metadata about audio or video files. A non-exhaustive
4151 list of the information MediaInfo can retrieve from media files include:
4154 @item General: title, author, director, album, track number, date, duration...
4155 @item Video: codec, aspect, fps, bitrate...
4156 @item Audio: codec, sample rate, channels, language, bitrate...
4157 @item Text: language of subtitle
4158 @item Chapters: number of chapters, list of chapters
4161 MediaInfo supports the following formats:
4164 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
4165 MPEG-2, MPEG-4, DVD (VOB)...
4166 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
4167 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
4168 @item Subtitles: SRT, SSA, ASS, SAMI...
4170 (license license:bsd-2)))
4172 ;; TODO also have a GUI version available
4173 (define-public mediainfo
4179 ;; Warning: This source has proved unreliable 1 time at least.
4180 ;; Consider an alternate source or report upstream if this
4182 (uri (string-append "https://mediaarea.net/download/source/"
4183 name "/" version "/"
4184 name "_" version ".tar.xz"))
4187 "1r1bh1lk2dsiv0j84whgca7qslxbibg6vsih7x5iga2p3lmgjdk2"))))
4189 (list autoconf automake libtool pkg-config))
4191 (list libmediainfo))
4192 (build-system gnu-build-system)
4194 '(#:tests? #f ; lacks tests
4196 ;; build scripts not in root of archive
4197 (modify-phases %standard-phases
4198 (add-after 'unpack 'change-to-build-dir
4200 (chdir "Project/GNU/CLI")
4202 (home-page "https://mediaarea.net/en/MediaInfo")
4203 (synopsis "Utility for reading media metadata")
4204 (description "MediaInfo is a utility used for retrieving technical
4205 information and other metadata about audio or video files. It supports the
4206 many codecs and formats supported by libmediainfo.")
4207 (license license:bsd-2)))
4209 (define-public atomicparsley
4211 (name "atomicparsley")
4212 (version "20200701.154658.b0d6223")
4216 (url "https://github.com/wez/atomicparsley")
4218 (file-name (git-file-name name version))
4221 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
4222 (build-system cmake-build-system)
4224 `(#:tests? #f ;; no tests included
4226 (modify-phases %standard-phases
4227 (add-before 'configure 'set-cmake-version
4229 (substitute* "CMakeLists.txt"
4230 ;; At the time of writing, Guix has CMake at 3.16, but
4231 ;; AtomicParsley uses 3.17. This brings the required CMake
4232 ;; version down to what Guix can afford.
4233 (("VERSION 3.17") "VERSION 3.16"))
4236 (lambda* (#:key outputs #:allow-other-keys)
4237 (let* ((out (assoc-ref outputs "out"))
4238 (bin (string-append out "/bin")))
4239 (install-file "AtomicParsley" bin))
4243 (synopsis "Metadata editor for MPEG-4 files")
4244 (description "AtomicParsley is a lightweight command line program for
4245 reading, parsing and setting metadata into MPEG-4 files, in particular,
4246 iTunes-style metadata.")
4247 (home-page "https://github.com/wez/atomicparsley")
4248 (license license:gpl2+)))
4250 (define-public livemedia-utils
4252 (name "livemedia-utils")
4253 (version "2020.11.19")
4257 "https://download.videolan.org/contrib/live555/live."
4261 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
4262 (build-system gnu-build-system)
4264 `(#:tests? #f ; no tests
4265 #:make-flags (list (string-append "CC=" ,(cc-for-target))
4266 (string-append "CXX=" ,(cxx-for-target))
4267 (string-append "LDFLAGS=-Wl,-rpath="
4268 (assoc-ref %outputs "out") "/lib")
4269 (string-append "PREFIX="
4270 (assoc-ref %outputs "out")))
4271 #:phases (modify-phases %standard-phases
4272 (add-before 'configure 'fix-makefiles-generation
4274 (substitute* "genMakefiles"
4279 (invoke "./genMakefiles"
4280 "linux-with-shared-libraries"))))))
4283 (home-page "http://www.live555.com/liveMedia/")
4284 (synopsis "Set of C++ libraries for multimedia streaming")
4285 (description "This code forms a set of C++ libraries for multimedia
4286 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
4287 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
4288 JPEG video, and several audio codecs. They can easily be extended to support
4289 additional (audio and/or video) codecs, and can also be used to build basic
4290 RTSP or SIP clients and servers.")
4291 (license license:lgpl3+)))
4293 (define-public libdvbpsi
4300 "https://download.videolan.org/pub/libdvbpsi/"
4301 version "/libdvbpsi-" version ".tar.bz2"))
4304 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
4305 (build-system gnu-build-system)
4306 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
4307 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
4309 (description "libdvbpsi is a simple library designed for decoding and
4310 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
4311 and ITU-T H.222.0.")
4312 (license license:lgpl2.1)))
4314 (define-public ffms2
4318 (home-page "https://github.com/FFMS/ffms2")
4322 (url "https://github.com/FFMS/ffms2")
4324 (file-name (git-file-name name version))
4327 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
4328 (build-system gnu-build-system)
4331 (list "--enable-avresample")))
4338 (synopsis "Cross-platform wrapper around ffmpeg/libav")
4340 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
4341 programmers to access a standard API to open and decompress media files.")
4342 ;; sources are distributed under a different license that the binary.
4343 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
4344 (license license:gpl2+))); inherits from ffmpeg
4346 (define-public aegisub
4353 "http://ftp.aegisub.org/pub/archives/releases/source/"
4354 name "-" version ".tar.xz"))
4357 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
4358 (patches (search-patches "aegisub-icu59-include-unistr.patch"
4359 "aegisub-make43.patch"
4360 "aegisub-boost68.patch"))))
4361 (build-system gnu-build-system)
4364 (list "--disable-update-checker"
4365 "--without-portaudio"
4368 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
4369 ;; tests require busted, a lua package we don't have yet
4372 (modify-phases %standard-phases
4373 (add-before 'configure 'fix-ldflags
4375 (setenv "LDFLAGS" "-pthread")
4377 (add-after 'unpack 'fix-boost-headers
4380 '("src/subtitles_provider_libass.cpp"
4381 "src/colour_button.cpp"
4382 "src/video_provider_dummy.cpp"
4383 "./src/video_frame.cpp")
4384 (("#include <boost/gil/gil_all.hpp>")
4385 "#include <boost/gil.hpp>"))
4400 (list intltool desktop-file-utils pkg-config))
4401 (home-page "http://www.aegisub.org/")
4402 (synopsis "Subtitle engine")
4404 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
4405 it quick and easy to time subtitles to audio, and features many powerful
4406 tools for styling them, including a built-in real-time video preview.")
4407 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
4408 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
4409 license:expat)))) ; and src/gl that is under a license similar
4410 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
4411 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
4412 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
4414 (define-public pitivi
4415 ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
4416 (let ((latest-semver "0.999.0")
4417 (%version "2021.05.0"))
4420 (version (string-append latest-semver "-" %version))
4425 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
4427 (file-name (git-file-name name version))
4428 (patches (search-patches "pitivi-fix-build-with-meson-0.60.patch"))
4430 (base32 "08x2fs2bak1fbmkvjijgx1dsawispv91bpv5j5gkqbv5dfgf7wah"))))
4431 (build-system meson-build-system)
4434 gst-editing-services
4438 (gst-plugins/selection gst-plugins-bad #:plugins
4439 '("debugutils" "transcode")
4441 '("-Dintrospection=enabled"))
4456 `(("gettext" ,gettext-minimal)
4457 ("glib:bin" ,glib "bin")
4458 ("itstool" ,itstool)
4459 ("pkg-config" ,pkg-config)))
4463 (modify-phases %standard-phases
4464 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
4465 (lambda* (#:key outputs #:allow-other-keys)
4466 (let ((prog (string-append (assoc-ref outputs "out")
4469 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
4470 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
4471 ;; We've only added inputs for what Pitivi deems either
4472 ;; necessary or optional. Let the user's packages take
4473 ;; precedence in case they have e.g. the full gst-plugins-bad.
4474 `("GST_PLUGIN_SYSTEM_PATH" suffix
4475 (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))))
4476 (home-page "http://www.pitivi.org")
4477 (synopsis "Video editor based on GStreamer Editing Services")
4478 (description "Pitivi is a video editor built upon the GStreamer Editing
4479 Services. It aims to be an intuitive and flexible application that can appeal
4480 to newbies and professionals alike.")
4481 (license license:lgpl2.1+))))
4490 (uri (string-append "mirror://sourceforge/gmerlin/"
4491 name "/" version "/"
4492 name "-" version ".tar.gz"))
4493 (file-name (string-append name "-" version ".tar.gz"))
4496 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
4497 (build-system gnu-build-system)
4499 '(#:configure-flags '("LIBS=-lm")))
4501 (list pkg-config doxygen))
4502 (home-page "http://gmerlin.sourceforge.net")
4503 (synopsis "Low level library for multimedia API building")
4505 "Gavl is short for Gmerlin Audio Video Library. It is a low level
4506 library, upon which multimedia APIs can be built. Gavl handles all the
4507 details of audio and video formats like colorspaces, sample rates,
4508 multichannel configurations, etc. It provides standardized definitions for
4509 those formats as well as container structures for carrying audio samples or
4510 video images inside an application.
4512 In addition, it handles the sometimes ugly task of converting between all
4513 these formats and provides some elementary operations (copying, scaling,
4514 alpha blending etc).")
4515 (license license:gpl3)))
4517 (define-public frei0r-plugins
4519 (name "frei0r-plugins")
4524 (uri (string-append "https://files.dyne.org/frei0r/"
4525 "frei0r-plugins-" version ".tar.gz"))
4528 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
4529 (build-system gnu-build-system)
4532 (modify-phases %standard-phases
4533 (add-after 'unpack 'patch-Makefile
4535 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
4536 ;; names in the tarball. Try removing this for future versions.
4537 (substitute* "Makefile.in"
4538 (("README\\.md ChangeLog TODO AUTHORS")
4539 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
4541 ;; TODO: opencv for additional face detection filters.
4546 (home-page "https://www.dyne.org/software/frei0r/")
4547 (synopsis "Minimalistic plugin API for video effects")
4549 "Frei0r is a minimalistic plugin API for video effects.
4550 The main emphasis is on simplicity for an API that will round up
4551 the most common video effects into simple filters, sources and
4552 mixers that can be controlled by parameters. Frei0r wants to
4553 provide a way to share these simple effects between many
4554 applications, avoiding their reimplementation by different projects.
4555 It counts more than 100 plugins.")
4556 (license (list license:gpl2+
4557 ;; The following files are licensed as LGPL2.1+:
4558 ;; src/generator/ising0r/ising0r.c
4559 ;; src/generator/onecol0r/onecol0r.cpp
4560 ;; src/generator/nois0r/nois0r.cpp
4561 ;; src/generator/lissajous0r/lissajous0r.cpp
4562 ;; src/filter/ndvi/gradientlut.hpp
4563 ;; src/filter/ndvi/ndvi.cpp
4564 ;; src/filter/facedetect/facedetect.cpp
4565 license:lgpl2.1+))))
4567 (define-public motion
4571 (home-page "https://motion-project.github.io/")
4575 (url "https://github.com/Motion-Project/motion")
4576 (commit (string-append "release-" version))))
4579 "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95"))
4580 (file-name (git-file-name name version))))
4581 (build-system gnu-build-system)
4583 `(("autoconf" ,autoconf)
4584 ("automake" ,automake)
4585 ("gettext" ,gettext-minimal)
4586 ("pkg-config" ,pkg-config)))
4588 `(("libjpeg" ,libjpeg-turbo)
4590 ("libmicrohttpd" ,libmicrohttpd)
4591 ("sqlite" ,sqlite)))
4593 '(#:phases (modify-phases %standard-phases
4596 (patch-shebang "scripts/version.sh")
4597 (invoke "autoreconf" "-vfi"))))
4598 #:configure-flags '("--sysconfdir=/etc")
4599 #:make-flags (list (string-append "sysconfdir="
4600 (assoc-ref %outputs "out")
4603 #:tests? #f)) ; no 'check' target
4604 (synopsis "Detect motion from video signals")
4606 "Motion is a program that monitors the video signal from one or more
4607 cameras and is able to detect if a significant part of the picture has
4608 changed. Or in other words, it can detect motion.")
4610 ;; Some files say "version 2" and others "version 2 or later".
4611 (license license:gpl2)))
4613 (define-public subdl
4614 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4618 (version (git-version "1.0.3" revision commit))
4622 (url "https://github.com/alexanderwink/subdl")
4624 (file-name (git-file-name name version))
4627 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4628 (build-system trivial-build-system)
4630 `(#:modules ((guix build utils))
4632 (use-modules (guix build utils))
4633 (let* ((out (assoc-ref %outputs "out"))
4634 (bin (string-append out "/bin"))
4635 (source (assoc-ref %build-inputs "source"))
4636 (python (assoc-ref %build-inputs "python")))
4637 (install-file (string-append source "/subdl") bin)
4638 (patch-shebang (string-append bin "/subdl")
4639 (list (string-append python "/bin")))))))
4640 (inputs (list python))
4641 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4642 (description "Subdl is a command-line tool for downloading subtitles from
4643 opensubtitles.org. By default, it will search for English subtitles, display
4644 the results, download the highest-rated result in the requested language and
4645 save it to the appropriate filename.")
4646 (license license:gpl3+)
4647 (home-page "https://github.com/alexanderwink/subdl"))))
4649 (define-public l-smash
4656 (url "https://github.com/l-smash/l-smash")
4657 (commit (string-append "v" version))))
4658 (file-name (git-file-name name version))
4661 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4662 (build-system gnu-build-system)
4664 `(#:tests? #f ;no tests
4666 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4667 (assoc-ref %outputs "out") "/lib"))
4669 (modify-phases %standard-phases
4670 ;; configure fails if it is followed by CONFIG_SHELL
4672 (lambda* (#:key outputs #:allow-other-keys)
4673 (let ((out (assoc-ref outputs "out")))
4674 (invoke "./configure" (string-append "--prefix=" out)
4675 "--disable-static")))))))
4678 (home-page "https://l-smash.github.io/l-smash/")
4679 (synopsis "MP4 multiplexer and demultiplexer library")
4681 "L-SMASH is a cross-platform library that handles the ISO base media file
4682 format and some of its derived file formats, including MP4. It operates as a
4683 multiplexer and demultiplexer, and can mux video and audio in several formats
4684 using standalone executable files.")
4685 (license license:isc)))
4687 (define-public qtfaststart
4689 (name "qtfaststart")
4693 (uri (pypi-uri "qtfaststart" version))
4696 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4697 (build-system python-build-system)
4699 '(#:tests? #f)) ; no test suite
4700 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4701 (description "qtfaststart enables streaming and pseudo-streaming of
4702 QuickTime and MP4 files by moving metadata and offset information to the
4703 beginning of the file. It can also print some useful information about the
4704 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4705 project, which is released into the public domain, as well as ISO 14496-12:2005
4706 (the official spec for MP4), which can be obtained from the ISO or found
4708 (home-page "https://github.com/danielgtaylor/qtfaststart")
4709 (license license:expat)))
4711 (define-public vidstab
4712 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4716 (version (git-version "1.1.0" revision commit))
4720 (url "https://github.com/georgmartius/vid.stab")
4722 (file-name (git-file-name name version))
4725 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4726 (build-system cmake-build-system)
4728 '(#:tests? #f)) ; tests are not run as part of standard build process
4729 (home-page "http://public.hronopik.de/vid.stab/")
4730 (synopsis "Video stabilization library")
4731 (description "Vidstab is a video stabilization library which can be used
4732 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4733 vehicle typically suffers from undesirable shakes and jitters. Activities such
4734 as surfing, skiing, riding and walking while shooting videos are especially
4735 prone to erratic camera shakes. Vidstab targets these video contents to help
4736 create smoother and stable videos.")
4737 (license license:gpl2+))))
4739 (define-public libopenshot
4741 (name "libopenshot")
4746 (url "https://github.com/OpenShot/libopenshot")
4747 (commit (string-append "v" version))))
4748 (file-name (git-file-name name version))
4751 "0i9bsn8gklm1mvj60l3d3xrxdgy8svpxjfqcwsr308j5zjn30pv8"))
4752 (modules '((guix build utils)))
4754 ;; Allow overriding of the python installation dir
4755 (substitute* "bindings/python/CMakeLists.txt"
4756 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4757 (string-append set " CACHE PATH "
4758 "\"Python bindings directory\")")))
4759 (delete-file-recursively "thirdparty")
4761 (build-system cmake-build-system)
4763 `(("pkg-config" ,pkg-config)
4766 ("unittest++" ,unittest-cpp)))
4768 (list alsa-lib zlib))
4769 (propagated-inputs ;all referenced in installed headers
4780 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4781 ,(version-major+minor (package-version python))
4783 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4785 (modify-phases %standard-phases
4786 (add-before 'configure 'set-vars
4787 (lambda* (#:key inputs #:allow-other-keys)
4788 (setenv "LIBOPENSHOT_AUDIO_DIR"
4789 (assoc-ref inputs "libopenshot-audio"))
4791 (assoc-ref inputs "zeromq"))
4792 (setenv "UNITTEST_DIR"
4793 (search-input-directory inputs
4794 "include/UnitTest++")))))))
4795 (home-page "https://openshot.org")
4796 (synopsis "Video-editing, animation, and playback library")
4797 (description "OpenShot Library (libopenshot) is a powerful C++ video
4798 editing library with a multi-threaded and feature rich video editing
4799 API. It includes bindings for Python, Ruby, and other languages.")
4800 (license license:lgpl3+)))
4802 (define-public openshot
4809 (url "https://github.com/OpenShot/openshot-qt")
4810 (commit (string-append "v" version))))
4811 (file-name (git-file-name name version))
4814 "0pa8iwl217503bjlqg2zlrw5lxyq5hvxrf5apxrh3843hj1w1myv"))
4815 (modules '((guix build utils)))
4818 ;; TODO: Unbundle jquery and others from src/timeline/media
4819 (delete-file-recursively "src/images/fonts") #t))))
4820 (build-system python-build-system)
4831 `(#:modules ((guix build python-build-system)
4832 (guix build qt-utils)
4834 #:imported-modules (,@%python-build-system-modules
4835 (guix build qt-utils))
4836 #:phases (modify-phases %standard-phases
4837 (delete 'build) ;install phase does all the work
4839 (lambda* (#:key tests? #:allow-other-keys)
4841 (setenv "QT_QPA_PLATFORM" "offscreen")
4842 (invoke "python" "src/tests/query_tests.py"))))
4843 (add-after 'unpack 'patch-font-location
4844 (lambda* (#:key inputs #:allow-other-keys)
4845 (let ((font (assoc-ref inputs "font-dejavu")))
4846 (substitute* "src/classes/app.py"
4847 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4848 (("fonts") "share/fonts/truetype")
4849 (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
4851 ;; https://github.com/OpenShot/openshot-qt/issues/4502
4852 (add-before 'ensure-no-mtimes-pre-1980 'fix-symbolic-link
4854 (delete-file "images/Humanity/actions/custom/razor_line_with_razor.png")
4855 (symlink "../../../../src/timeline/media/images/razor_line_with_razor.png"
4856 "images/Humanity/actions/custom/razor_line_with_razor.png")))
4857 (add-before 'install 'set-tmp-home
4859 ;; src/classes/info.py "needs" to create several
4860 ;; directories in $HOME when loaded during build
4861 (setenv "HOME" "/tmp")
4863 (add-after 'install 'wrap-program
4864 (lambda* (#:key outputs inputs #:allow-other-keys)
4865 (let ((out (assoc-ref outputs "out")))
4866 (wrap-qt-program "openshot-qt"
4867 #:output out #:inputs inputs))
4869 (home-page "https://www.openshot.org/")
4870 (synopsis "Video editor")
4871 (description "OpenShot takes your videos, photos, and music files and
4872 helps you create the film you have always dreamed of. Easily add sub-titles,
4873 transitions, and effects and then export your film to many common formats.")
4874 (license license:gpl3+)))
4876 (define-public shotcut
4879 (version "22.04.25")
4884 (url "https://github.com/mltframework/shotcut")
4885 (commit (string-append "v" version))))
4886 (file-name (git-file-name name version))
4888 (base32 "0ccbx2crqrnhl19d7267xc40vs0cjmps2cnhi1g1l6bqxbi7k88x"))))
4889 (build-system qt-build-system)
4891 `(#:tests? #f ;there are no tests
4893 (modify-phases %standard-phases
4894 (add-after 'unpack 'patch-executable-paths
4895 (lambda* (#:key inputs #:allow-other-keys)
4896 ;; Shotcut expects ffmpeg and melt executables in the shotcut
4897 ;; directory. Use full store paths.
4898 (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
4899 (mlt (assoc-ref inputs "mlt")))
4900 (substitute* "src/jobs/ffmpegjob.cpp"
4901 (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
4902 (substitute* "src/jobs/meltjob.cpp"
4903 (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
4904 (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
4906 (lambda* (#:key outputs #:allow-other-keys)
4907 (let* ((out (assoc-ref outputs "out")))
4909 (string-append "PREFIX=" out)
4910 "QMAKE_LRELEASE=lrelease"
4911 "QMAKE_LUPDATE=lupdate"
4913 (add-after 'install 'wrap-executable
4914 (lambda* (#:key inputs outputs #:allow-other-keys)
4915 (let* ((out (assoc-ref outputs "out"))
4916 (frei0r (assoc-ref inputs "frei0r-plugins"))
4917 (jack (assoc-ref inputs "jack"))
4918 (ladspa (assoc-ref inputs "ladspa"))
4919 (mlt (assoc-ref inputs "mlt"))
4920 (sdl2 (assoc-ref inputs "sdl2")))
4921 (wrap-program (string-append out "/bin/shotcut")
4922 `("FREI0R_PATH" ":" =
4923 (,(string-append frei0r "/lib/frei0r-1")))
4924 `("LADSPA_PATH" ":" =
4925 (,(string-append ladspa "/lib/ladspa")))
4926 `("LD_LIBRARY_PATH" ":" prefix
4927 ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
4929 ,(list (string-append mlt "/bin"))))))))))
4931 `(("pkg-config" ,pkg-config)
4932 ("python-wrapper" ,python-wrapper)
4933 ("qttools" ,qttools)))
4956 (home-page "https://www.shotcut.org/")
4957 (synopsis "Video editor built on the MLT framework")
4959 "Shotcut is a video editor built on the MLT framework. Features include
4960 a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
4961 and audio capture, network stream playback, and many more.")
4962 (license license:gpl3+)))
4964 (define-public dav1d
4972 (url "https://code.videolan.org/videolan/dav1d.git")
4974 (file-name (git-file-name name version))
4976 (base32 "0bkps488h9s15ylvkm4fmfywgrpbw570glawpnv6khpq9n223dzl"))))
4977 (build-system meson-build-system)
4978 (native-inputs (list nasm))
4979 (home-page "https://code.videolan.org/videolan/dav1d")
4980 (synopsis "AV1 decoder")
4981 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4982 speed and correctness.")
4983 (license license:bsd-2)))
4985 (define-public wlstream
4986 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4990 (version (git-version "0.0" revision commit))
4995 (url "https://github.com/atomnuker/wlstream")
4997 (file-name (git-file-name name version))
5000 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
5001 (build-system meson-build-system)
5002 (native-inputs (list libdrm pkg-config))
5003 (inputs (list ffmpeg pulseaudio wayland wayland-protocols))
5004 (home-page "https://github.com/atomnuker/wlstream")
5005 (synopsis "Screen capture tool for Wayland sessions")
5006 (description "Wlstream is a screen capture tool for recording audio and
5007 video from a Wayland session.")
5008 (license license:lgpl2.1+))))
5010 (define-public gaupol
5017 (url "https://github.com/otsaloma/gaupol/")
5019 (file-name (git-file-name name version))
5022 "1mmjg8nwhif2hmmp8i11643izwzdf839brqdai3ksfg0qkh8rnxk"))))
5023 (build-system python-build-system)
5025 `(("gettext" ,gettext-minimal)
5026 ("pkg-config" ,pkg-config)))
5028 (list python-pygobject
5030 python-pycairo ; Required or else clicking on a subtitle line fails.
5031 python-chardet ; Optional: Character encoding detection.
5032 gtkspell3 ; Optional: Inline spell-checking.
5033 iso-codes ; Optional: Translations.
5041 `(#:tests? #f ; Tests seem to require networking.
5043 (modify-phases %standard-phases
5044 (add-after 'unpack 'disable-builtin-byte-compilation
5046 ;; The setup.py script attempts to compile bytecode and fails.
5047 ;; We compile bytecode in a separate phase, so just disable it.
5048 (substitute* "setup.py"
5049 (("distutils\\.util\\.byte_compile\\(.*")
5051 ;; gaupol's setup.py script does not support one of the Python build
5052 ;; system's default flags, "--single-version-externally-managed".
5054 (lambda* (#:key outputs #:allow-other-keys)
5055 (invoke "python" "setup.py" "install"
5056 (string-append "--prefix=" (assoc-ref outputs "out"))
5058 (add-after 'install 'wrap-gaupol
5059 (lambda* (#:key outputs #:allow-other-keys)
5060 (let ((out (assoc-ref outputs "out"))
5061 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
5062 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
5063 (wrap-program (string-append out "/bin/gaupol")
5064 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
5065 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
5066 (add-after 'unpack 'patch-data-dir
5067 ;; Fix some path variables that setup.py seems to garble.
5068 (lambda* (#:key outputs #:allow-other-keys)
5069 (let ((out (assoc-ref outputs "out")))
5070 (substitute* "setup.py"
5071 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
5072 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
5073 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
5074 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
5075 (synopsis "Editor for text-based subtitles")
5077 "Gaupol supports multiple subtitle file formats and provides means of
5078 creating subtitles, editing texts and timing subtitles to match video. The
5079 user interface features a builtin video player and is designed with attention
5080 to convenience of translating and batch processing of multiple documents.")
5081 (home-page "https://otsaloma.io/gaupol/")
5082 (license license:gpl3+)))
5084 (define-public theorafile
5085 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
5088 (version (git-version "0.0.0" "1" commit))
5093 (url "https://github.com/FNA-XNA/Theorafile")
5095 (file-name (git-file-name name version))
5097 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
5098 (build-system gnu-build-system)
5100 '(#:make-flags '("CC=gcc")
5102 (modify-phases %standard-phases
5107 (invoke "make" "test")))
5109 (lambda* (#:key outputs #:allow-other-keys)
5110 (let ((out (assoc-ref outputs "out")))
5111 (install-file "libtheorafile.so" (string-append out "/lib"))
5112 (install-file "theorafile.h" (string-append out "/include")))
5117 (home-page "https://github.com/FNA-XNA/Theorafile")
5118 (synopsis "Ogg Theora Video Decoder Library")
5119 (description "Theorafile is a library for quickly and easily decoding Ogg
5120 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
5121 (license license:zlib))))
5123 (define-public dvdbackup
5130 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
5131 "dvdbackup-" version "/"
5132 "dvdbackup-" version ".tar.xz"))
5134 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
5135 (build-system gnu-build-system)
5137 (list libdvdcss libdvdread))
5138 (home-page "http://dvdbackup.sourceforge.net")
5139 (synopsis "DVD video ripper")
5141 "A simple command line tool to backup video from a DVD. Decrypts the
5142 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
5143 transcode or reformat the videos in any way, producing perfect backups.")
5144 (license license:gpl3+)))
5146 (define-public svt-av1
5154 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
5155 (commit (string-append "v" version))))
5156 (file-name (git-file-name name version))
5158 (base32 "02fchq2vlxcxzbrss72xl9vrxzysdy39d5i159bmg3qa45ngd2iw"))))
5159 (build-system cmake-build-system)
5160 ;; SVT-AV1 only supports 64-bit Intel-compatible CPUs.
5161 (supported-systems '("x86_64-linux"))
5163 ;; The test suite tries to download test data and git clone a 3rd-party
5164 ;; fork of libaom. Skip it.
5167 (modify-phases %standard-phases
5168 (add-after 'install 'install-documentation
5169 (lambda* (#:key outputs #:allow-other-keys)
5170 (let* ((out (assoc-ref %outputs "out"))
5171 (doc (string-append out "/share/doc/svt-av1-" ,version)))
5172 (copy-recursively "../source/Docs" doc)
5176 (synopsis "AV1 video codec")
5177 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
5178 work-in-progress, aiming to support video-on-demand and live streaming
5179 applications. It only supports Intel-compatible CPUs (x86).")
5180 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
5181 (license license:bsd-2)))
5183 (define-public svt-vp9
5190 (url "https://github.com/OpenVisualCloud/SVT-VP9")
5191 (commit (string-append "v" version))))
5192 (file-name (git-file-name name version))
5195 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
5196 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
5197 (supported-systems '("x86_64-linux"))
5198 (build-system cmake-build-system)
5200 `(#:tests? #f ; No test suite
5202 (modify-phases %standard-phases
5203 (add-after 'install 'install-documentation
5204 (lambda* (#:key outputs #:allow-other-keys)
5205 (let* ((out (assoc-ref %outputs "out"))
5206 (doc (string-append out "/share/doc/" ,name "-" ,version)))
5207 (copy-recursively "../source/Docs" doc)
5211 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
5212 (synopsis "VP9 video encoder")
5213 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
5214 on supporting video-on-demand and live encoding on Intel Xeon processors.")
5215 (license license:bsd-2)))
5217 (define-public w-scan
5220 (version "20170107")
5224 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
5225 version ".tar.bz2"))
5227 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
5228 (build-system gnu-build-system)
5230 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
5231 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
5233 "This is a small command line utility used to perform frequency scans for
5234 DVB and ATSC transmissions without initial tuning data. It can print the
5235 result in several formats:
5237 @item VDR channels.conf,
5238 @item czap/tzap/xine/mplayer channels.conf,
5239 @item Gstreamer dvbsrc plugin,
5240 @item VLC xspf playlist,
5242 @item initial tuning data for scan or dvbv5-scan.
5244 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
5245 (license license:gpl2+)))
5247 ;;; XXX: This crate is used only for rav1e and can be removed once the latter
5248 ;;; is updated. See <https://issues.guix.gnu.org/52837>.
5249 (define rust-dav1d-sys-0.3.2
5251 (name "rust-dav1d-sys")
5256 (uri (crate-uri "dav1d-sys" version))
5258 (string-append name "-" version ".tar.gz"))
5260 (base32 "1jdxhnlxcml6jd67lx78ifzkn1xm18zfk4li7vjdh3fa61i073kx"))))
5261 (build-system cargo-build-system)
5264 (("rust-bindgen" ,rust-bindgen-0.54)
5265 ("rust-metadeps" ,rust-metadeps-1))))
5269 (list dav1d clang llvm))
5270 (home-page "https://github.com/rust-av/dav1d-rs")
5271 (synopsis "FFI bindings to dav1d")
5272 (description "This package provides FFI bindings to dav1d.")
5273 (license license:expat)))
5275 (define-public rav1e
5282 (uri (crate-uri "rav1e" version))
5284 (string-append name "-" version ".tar.gz"))
5287 "006bfcmjwg0phg8gc25b1sl2ngjrb2bh1b3fd0s5gbf9nlkr8qsn"))))
5288 (build-system cargo-build-system)
5290 `(;; Strip the '--release' flag to work around the doctest failures with
5291 ;; Rust 1.57 (see: https://github.com/xiph/rav1e/issues/2851).
5292 #:cargo-test-flags '()
5294 (("rust-aom-sys" ,rust-aom-sys-0.3)
5295 ("rust-arbitrary" ,rust-arbitrary-0.4)
5296 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
5297 ("rust-arrayvec" ,rust-arrayvec-0.7)
5298 ("rust-av-metrics" ,rust-av-metrics-0.7)
5299 ("rust-backtrace" ,rust-backtrace-0.3)
5300 ("rust-bitstream-io" ,rust-bitstream-io-1)
5301 ("rust-byteorder" ,rust-byteorder-1)
5302 ("rust-cfg-if" ,rust-cfg-if-1)
5303 ("rust-clap" ,rust-clap-2)
5304 ("rust-console" ,rust-console-0.14)
5305 ("rust-crossbeam" ,rust-crossbeam-0.8)
5306 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
5307 ("rust-fern" ,rust-fern-0.6)
5308 ("rust-image" ,rust-image-0.23)
5309 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5310 ("rust-itertools" ,rust-itertools-0.10)
5311 ("rust-ivf" ,rust-ivf-0.1)
5312 ("rust-libc" ,rust-libc-0.2)
5313 ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
5314 ("rust-log" ,rust-log-0.4)
5315 ("rust-nasm-rs" ,rust-nasm-rs-0.2)
5316 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
5317 ("rust-num-derive" ,rust-num-derive-0.3)
5318 ("rust-num-traits" ,rust-num-traits-0.2)
5319 ("rust-paste" ,rust-paste-1)
5320 ("rust-rand" ,rust-rand-0.8)
5321 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5322 ("rust-rayon" ,rust-rayon-1)
5323 ("rust-regex" ,rust-regex-1)
5324 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
5325 ("rust-rustc-version" ,rust-rustc-version-0.4)
5326 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
5327 ("rust-serde" ,rust-serde-1)
5328 ("rust-signal-hook" ,rust-signal-hook-0.3)
5329 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
5330 ("rust-thiserror" ,rust-thiserror-1)
5331 ("rust-toml" ,rust-toml-0.5)
5332 ("rust-v-frame" ,rust-v-frame-0.2)
5333 ("rust-vergen" ,rust-vergen-3)
5334 ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
5335 ("rust-y4m" ,rust-y4m-0.7))
5336 #:cargo-development-inputs
5337 (("rust-assert-cmd" ,rust-assert-cmd-2)
5338 ("rust-cc" ,rust-cc-1)
5339 ("rust-criterion" ,rust-criterion-0.3)
5340 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5341 ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)
5342 ("rust-rand" ,rust-rand-0.8)
5343 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5344 ("rust-semver" ,rust-semver-1))
5346 (modify-phases %standard-phases
5347 (add-after 'unpack 'relax-versions
5349 (substitute* "Cargo.toml"
5350 ;; Allow using more recent versions of
5351 (("~3.1.2") "~3"))))
5353 (lambda* (#:key outputs #:allow-other-keys)
5354 (let ((out (assoc-ref outputs "out")))
5355 (invoke "cargo" "cinstall" "--release"
5356 (string-append "--prefix=" out)))))
5357 (add-after 'install 'delete-static-library
5358 (lambda* (#:key outputs #:allow-other-keys)
5359 ;; Delete 80 MiB (!) static library.
5360 (delete-file (string-append (assoc-ref outputs "out")
5361 "/lib/librav1e.a")))))))
5363 (list rust-cargo-c nasm))
5364 (home-page "https://github.com/xiph/rav1e/")
5365 (synopsis "Fast and safe AV1 encoder")
5366 (description "@code{rav1e} is an AV1 video encoder. It is designed to
5367 eventually cover all use cases, though in its current form it is most suitable
5368 for cases where libaom (the reference encoder) is too slow.")
5369 (license license:bsd-2)))
5379 (url "https://github.com/phw/peek")
5381 (file-name (git-file-name name version))
5383 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
5384 (build-system meson-build-system)
5385 (arguments '(#:glib-or-gtk? #t))
5388 ("python" ,python-wrapper)))
5390 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
5391 ("gettext" ,gettext-minimal)
5392 ("glib:bin" ,glib "bin") ; for glib-compile-resources
5393 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
5394 ("pkg-config" ,pkg-config)
5396 (home-page "https://github.com/phw/peek")
5397 (synopsis "Simple animated GIF screen recorder")
5399 "Peek makes it easy to create short screencasts of a screen area. It was
5400 built for the specific use case of recording screen areas, e.g. for easily
5401 showing UI features of your own apps or for showing a bug in bug reports.
5402 With Peek, you simply place the Peek window over the area you want to record
5403 and press \"Record\". Peek is optimized for generating animated GIFs, but you
5404 can also directly record to WebM or MP4 if you prefer.")
5405 (license license:gpl3+)))
5407 (define-public wf-recorder
5409 (name "wf-recorder")
5414 (url "https://github.com/ammen99/wf-recorder")
5415 (commit (string-append "v" version))))
5416 (file-name (git-file-name name version))
5419 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
5420 (build-system meson-build-system)
5424 (list ffmpeg pulseaudio wayland wayland-protocols libx264))
5425 (home-page "https://github.com/ammen99/wf-recorder")
5426 (synopsis "Screen recorder for wlroots-based compositors")
5428 "@code{wf-recorder} is a utility program for screen recording of
5429 wlroots-based compositors. More specifically, those that support
5430 @code{wlr-screencopy-v1} and @code{xdg-output}.")
5431 (license license:expat)))
5433 (define-public guvcview
5439 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
5440 "src-" version ".tar.gz"))
5443 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
5444 (build-system gnu-build-system)
5446 ;; There are no tests and "make check" would fail on an intltool error.
5449 (list pkg-config intltool))
5455 ffmpeg ;libavcodec, libavutil
5460 (home-page "http://guvcview.sourceforge.net/")
5461 (synopsis "Control your webcam and capture videos and images")
5463 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
5464 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
5465 It provides control over precise settings of the webcam such as exposure,
5466 brightness, contrast, and frame rate.")
5468 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
5469 (license license:gpl2+)))
5471 (define-public get-iplayer
5473 (name "get-iplayer")
5479 (url "https://github.com/get-iplayer/get_iplayer")
5480 (commit (string-append "v" version))))
5481 (file-name (git-file-name name version))
5483 (base32 "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi"))))
5484 (build-system perl-build-system)
5486 `(#:tests? #f ; no tests
5488 (modify-phases %standard-phases
5492 (lambda* (#:key outputs #:allow-other-keys)
5493 (let* ((out (assoc-ref outputs "out"))
5494 (bin (string-append out "/bin"))
5495 (man (string-append out "/share/man/man1")))
5496 (install-file "get_iplayer" bin)
5497 (install-file "get_iplayer.cgi" bin)
5498 (install-file "get_iplayer.1" man))
5500 (add-after 'install 'wrap-program
5501 (lambda* (#:key inputs outputs #:allow-other-keys)
5502 (let* ((out (assoc-ref outputs "out"))
5503 (perllib (string-append out "/lib/perl5/site_perl/"
5504 ,(package-version perl))))
5505 (wrap-program (string-append out "/bin/get_iplayer")
5507 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5508 (wrap-program (string-append out "/bin/get_iplayer.cgi")
5510 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5513 (list perl-mojolicious perl-lwp-protocol-https perl-xml-libxml))
5514 (home-page "https://github.com/get-iplayer/get_iplayer")
5515 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
5516 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
5517 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
5518 @code{get_iplayer} has three modes: recording a complete programme for later
5519 playback, streaming a programme directly to a playback application, such as
5520 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
5521 terms and recording programmes automatically. It can also stream or record live
5522 BBC iPlayer output.")
5523 (license license:gpl3+)))
5525 (define-public ogmtools
5531 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
5536 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
5537 (build-system gnu-build-system)
5539 (list libvorbis libdvdread))
5540 (synopsis "Information, extraction or creation for OGG media streams")
5542 "These tools allow information about (@code{ogminfo}) or extraction from
5543 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
5544 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
5545 (license license:gpl2)
5546 (home-page "https://www.bunkus.org/videotools/ogmtools/")))
5548 (define-public libcaption
5555 (url "https://github.com/szatmary/libcaption")
5557 (file-name (git-file-name name version))
5560 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
5561 (build-system cmake-build-system)
5563 `(#:tests? #f ; Cannot figure out how to run the unit tests
5564 #:configure-flags '("-DENABLE_RE2C=ON")))
5567 (synopsis "CEA608 / CEA708 closed-caption codec")
5568 (description "Libcaption creates and parses closed-caption data,
5569 providing an encoder / decoder for the EIA608 and CEA708 closed-caption
5572 608 support is currently limited to encoding and decoding the necessary control
5573 and preamble codes as well as support for the Basic North American, Special
5574 North American and Extended Western European character sets.
5576 708 support is limited to encoding the 608 data in NTSC field 1 user data type
5579 In addition, utility functions to create h.264 SEI (Supplementary enhancement
5580 information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
5581 elementary stream are provided.")
5582 (home-page "https://github.com/szatmary/libcaption")
5583 (license license:expat)))
5585 (define-public video-contact-sheet
5587 (name "video-contact-sheet")
5591 (uri (string-append "http://p.outlyer.net/vcs/files/vcs-" version
5595 "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw"))))
5596 (build-system gnu-build-system)
5600 #~(list (string-append "prefix=" #$output))
5602 #~(modify-phases %standard-phases
5606 (add-after 'install 'wrap-program
5608 (wrap-program (string-append #$output "/bin/vcs")
5611 (string-append dir "/bin"))
5612 (list #$(this-package-input "ffmpeg")
5613 #$(this-package-input "imagemagick"))))))))))
5615 (list bash-minimal ffmpeg imagemagick))
5616 (synopsis "Create contact sheets (preview images) from videos")
5617 (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to
5618 create video contact sheets (previews) of videos. Any video supported by
5619 MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools
5620 VCS, by default, makes screenshots the same size as the video, see the manual
5621 for details on how to change this.")
5622 (home-page "http://p.outlyer.net/vcs/")
5623 (license license:lgpl2.1+)))