1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016, 2018, 2020 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015, 2016 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
14 ;;; Copyright © 2016, 2018, 2019, 2020, 2021 Eric Bavier <bavier@posteo.net>
15 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
16 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
17 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
19 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
20 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
21 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
22 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
23 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
24 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
25 ;;; Copyright © 2018-2022 Marius Bakke <marius@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
27 ;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
28 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
29 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
30 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
31 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
32 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
33 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
34 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
35 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
36 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
37 ;;; Copyright © 2020, 2021 Oleg Pykhalov <go.wigust@gmail.com>
38 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
39 ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re>
40 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
41 ;;; Copyright © 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
42 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
43 ;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
44 ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
45 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
46 ;;; Copyright © 2020 Alexandru-Sergiu Marton <brown121407@posteo.ro>
47 ;;; Copyright © 2020 Ivan Kozlov <kanichos@yandex.ru>
48 ;;; Copyright © 2020 Antoine Côté <antoine.cote@posteo.net>
49 ;;; Copyright © 2021 Alexey Abramov <levenson@mmer.org>
50 ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in>
51 ;;; Copyright © 2021 David Wilson <david@daviwil.com>
52 ;;; Copyright © 2021,2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
53 ;;; Copyright © 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
54 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
55 ;;; Copyright © 2021 Thiago Jung Bauermann <bauermann@kolabnow.com>
56 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
57 ;;; Copyright © 2021 Robin Templeton <robin@terpri.org>
58 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
59 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
60 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
61 ;;; Copyright © 2022 Bird <birdsite@airmail.cc>
62 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
64 ;;; This file is part of GNU Guix.
66 ;;; GNU Guix is free software; you can redistribute it and/or modify it
67 ;;; under the terms of the GNU General Public License as published by
68 ;;; the Free Software Foundation; either version 3 of the License, or (at
69 ;;; your option) any later version.
71 ;;; GNU Guix is distributed in the hope that it will be useful, but
72 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
73 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
74 ;;; GNU General Public License for more details.
76 ;;; You should have received a copy of the GNU General Public License
77 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
79 (define-module (gnu packages video)
80 #:use-module (ice-9 match)
81 #:use-module ((srfi srfi-1) #:hide (zip))
82 #:use-module (srfi srfi-26)
83 #:use-module ((guix licenses) #:prefix license:)
84 #:use-module (guix utils)
85 #:use-module (guix packages)
86 #:use-module (guix download)
87 #:use-module (guix gexp)
88 #:use-module (guix git-download)
89 #:use-module (guix svn-download)
90 #:use-module (guix hg-download)
91 #:use-module (guix build-system cargo)
92 #:use-module (guix build-system cmake)
93 #:use-module (guix build-system copy)
94 #:use-module (guix build-system gnu)
95 #:use-module (guix build-system glib-or-gtk)
96 #:use-module (guix build-system meson)
97 #:use-module (guix build-system perl)
98 #:use-module (guix build-system python)
99 #:use-module (guix build-system qt)
100 #:use-module (guix build-system waf)
101 #:use-module (guix build-system trivial)
102 #:use-module (gnu packages)
103 #:use-module (gnu packages algebra)
104 #:use-module (gnu packages assembly)
105 #:use-module (gnu packages audio)
106 #:use-module (gnu packages autotools)
107 #:use-module (gnu packages avahi)
108 #:use-module (gnu packages backup)
109 #:use-module (gnu packages base)
110 #:use-module (gnu packages bash)
111 #:use-module (gnu packages bison)
112 #:use-module (gnu packages boost)
113 #:use-module (gnu packages build-tools)
114 #:use-module (gnu packages cdrom)
115 #:use-module (gnu packages check)
116 #:use-module (gnu packages cmake)
117 #:use-module (gnu packages compression)
118 #:use-module (gnu packages cpp)
119 #:use-module (gnu packages crates-io)
120 #:use-module (gnu packages crates-graphics)
121 #:use-module (gnu packages curl)
122 #:use-module (gnu packages dejagnu)
123 #:use-module (gnu packages dns)
124 #:use-module (gnu packages docbook)
125 #:use-module (gnu packages documentation)
126 #:use-module (gnu packages elf)
127 #:use-module (gnu packages file)
128 #:use-module (gnu packages flex)
129 #:use-module (gnu packages fonts)
130 #:use-module (gnu packages fontutils)
131 #:use-module (gnu packages freedesktop)
132 #:use-module (gnu packages fribidi)
133 #:use-module (gnu packages gettext)
134 #:use-module (gnu packages ghostscript)
135 #:use-module (gnu packages gl)
136 #:use-module (gnu packages glib)
137 #:use-module (gnu packages guile)
138 #:use-module (gnu packages gnome)
139 #:use-module (gnu packages gnunet)
140 #:use-module (gnu packages gnupg)
141 #:use-module (gnu packages gstreamer)
142 #:use-module (gnu packages gtk)
143 #:use-module (gnu packages image)
144 #:use-module (gnu packages imagemagick)
145 #:use-module (gnu packages iso-codes)
146 #:use-module (gnu packages libidn)
147 #:use-module (gnu packages libreoffice)
148 #:use-module (gnu packages libusb)
149 #:use-module (gnu packages linux)
150 #:use-module (gnu packages llvm)
151 #:use-module (gnu packages lua)
152 #:use-module (gnu packages m4)
153 #:use-module (gnu packages man)
154 #:use-module (gnu packages markup)
155 #:use-module (gnu packages maths)
156 #:use-module (gnu packages music)
157 #:use-module (gnu packages mp3)
158 #:use-module (gnu packages ncurses)
159 #:use-module (gnu packages networking)
160 #:use-module (gnu packages ocr)
161 #:use-module (gnu packages pcre)
162 #:use-module (gnu packages perl)
163 #:use-module (gnu packages perl-check)
164 #:use-module (gnu packages perl-web)
165 #:use-module (gnu packages photo)
166 #:use-module (gnu packages pkg-config)
167 #:use-module (gnu packages popt)
168 #:use-module (gnu packages pretty-print)
169 #:use-module (gnu packages protobuf)
170 #:use-module (gnu packages pulseaudio)
171 #:use-module (gnu packages python)
172 #:use-module (gnu packages python-crypto)
173 #:use-module (gnu packages python-web)
174 #:use-module (gnu packages python-xyz)
175 #:use-module (gnu packages qt)
176 #:use-module (gnu packages rdesktop)
177 #:use-module (gnu packages re2c)
178 #:use-module (gnu packages ruby)
179 #:use-module (gnu packages rust-apps)
180 #:use-module (gnu packages samba)
181 #:use-module (gnu packages sdl)
182 #:use-module (gnu packages serialization)
183 #:use-module (gnu packages shells)
184 #:use-module (gnu packages sqlite)
185 #:use-module (gnu packages ssh)
186 #:use-module (gnu packages swig)
187 #:use-module (gnu packages texinfo)
188 #:use-module (gnu packages textutils)
189 #:use-module (gnu packages tls)
190 #:use-module (gnu packages time)
191 #:use-module (gnu packages upnp)
192 #:use-module (gnu packages vulkan)
193 #:use-module (gnu packages web)
194 #:use-module (gnu packages webkit)
195 #:use-module (gnu packages wget)
196 #:use-module (gnu packages wxwidgets)
197 #:use-module (gnu packages xdisorg)
198 #:use-module (gnu packages xiph)
199 #:use-module (gnu packages xml)
200 #:use-module (gnu packages xorg))
202 (define-public transcode
210 (string-append "https://sources.archlinux.org/other/community/"
211 name "/" name "-" version ".tar.bz2"))
213 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
215 (search-patches "transcode-ffmpeg.patch"))))
216 (build-system gnu-build-system)
220 "CFLAGS=-O2 -g -fcommon"
222 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
223 ;; "--enable-libv4l2"
225 "--enable-libmpeg2convert"
227 ;; Undeclared variables 'sys_nerr' and 'sys_errlist'.
229 ;;; XXX: Not available.
234 ;;; XXX: Not available.
235 ;"--enable-libpostproc"
242 ;;; XXX: Not available.
245 "--enable-libquicktime"
250 ;;; XXX: Not available.
252 ;;"--enable-mjpegtools"
254 "--enable-imagemagick"
255 ;;; XXX: Not available.
256 ;"--enable-libjpegmmx"
257 "--enable-libjpeg")))
258 ;;; XXX: Not available.
289 ;; ("v4l-utils" ,v4l-utils)
298 (synopsis "Audio/Video Transcoder")
299 (description "Transcode is a fast, versatile and command-line based
300 audio/video everything to everything converter primarily focused on producing
301 AVI video files with MP3 audio, but also including a program to read all the
302 video and audio streams from a DVD.")
304 "http://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
305 (license license:gpl2+)))
307 (define-public svt-hevc
316 (url "https://github.com/OpenVisualCloud/SVT-HEVC")
317 (commit (string-append "v" version))))
318 (file-name (git-file-name name version))
320 (base32 "1cv6vcf5yxcwdvj5yqcckbixqrvvdxk7ibincnnv80pz6wh527sv"))))
321 (build-system cmake-build-system)
323 `(#:tests? #f)) ; Test script is stand-alone
326 (synopsis "SVT HEVC encoder")
327 (description "Scalable Video Technology (SVT) is a software-based video
328 coding technology that is highly optimized for Intel's Xeon processors. Using
329 the SVT-HEVC encoder, it is possible to spread video encoding processing across
330 multiple Intel's Xeon processors to achieve a real advantage of processing
332 (home-page "https://01.org/svt")
333 (license (license:non-copyleft "file:///LICENSE.md"))))
335 (define-public mediasdk
344 (url "https://github.com/Intel-Media-SDK/MediaSDK")
345 (commit (string-append "intel-" name "-" version))))
346 (file-name (git-file-name name version))
348 (base32 "0blwcxr5j8762nylx2cxrq0h53bpgnk859dbs6crq4wr9fcxlx9z"))))
349 (build-system cmake-build-system)
354 "-DENABLE_X11_DRI3=ON"
355 "-DENABLE_WAYLAND=ON"
356 "-DENABLE_TEXTLOG=ON"
360 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
361 (assoc-ref %outputs "out") "/lib"))))
363 `(("pkg-config" ,pkg-config)
364 ("python" ,python-wrapper)))
368 ("pciaccess" ,libpciaccess)
371 (synopsis "Intel Media SDK")
372 (description "MediaSDK provides a plain C API to access hardware-accelerated
373 video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
374 (home-page "http://mediasdk.intel.com/")
375 (license (license:non-copyleft "file:///LICENSE"))))
377 (define-public schroedinger
379 (name "schroedinger")
385 (string-append "https://launchpad.net/" name "/trunk/" version
386 "/+download/" name "-" version ".tar.gz"))
388 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
389 (build-system gnu-build-system)
390 (outputs '("out" "doc"))
393 (modify-phases %standard-phases
394 (add-after 'install 'move-docs
395 (lambda* (#:key outputs #:allow-other-keys)
396 (let* ((out (assoc-ref outputs "out"))
397 (doc (assoc-ref outputs "doc")))
398 (mkdir-p (string-append doc "/share"))
400 (string-append out "/share/gtk-doc")
401 (string-append doc "/share/gtk-doc"))
404 (list dash gtk-doc/stable pkg-config))
410 (synopsis "Dirac video codec")
411 (description "Schroedinger is a project implementing the Dirac video codec in
412 ANSI C code. It is meant to be highly optimized and portable. It is developed
413 as a joint effort between the BBC and Fluendo.")
414 (home-page "https://launchpad.net/schroedinger")
416 ;; This library is licensed under 4 different licenses,
417 ;; and you can choose to use it under the terms of any one of them.
424 (define-public libquicktime
426 (name "libquicktime")
432 (string-append "https://sourceforge.net/projects/" name "/files/"
433 name "/" version "/" name "-" version ".tar.gz"))
435 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
437 (search-patches "libquicktime-ffmpeg.patch"))))
438 (build-system gnu-build-system)
440 (list gettext-minimal doxygen pkg-config))
456 (synopsis "Quick Time Library")
457 (description "The goal of this project is to enhance the quicktime4linux
459 (home-page "http://libquicktime.sourceforge.net/")
460 (license license:lgpl2.1+)))
462 (define-public mjpg-streamer
464 (name "mjpg-streamer")
469 (url "https://github.com/jacksonliam/mjpg-streamer")
470 (commit (string-append "v" version))))
471 (file-name (git-file-name name version))
474 "0w81pg228154blzbzr590xwhcll9baxyqxl6wxrgqsi9cd7pzq23"))
475 (modules '((guix build utils)))
478 (with-directory-excursion "mjpg-streamer-experimental/www"
479 (for-each delete-file-recursively
485 "jquery.ui.core.min.js"
486 "jquery.ui.custom.css"
487 "jquery.ui.tabs.min.js"
488 "jquery.ui.widget.min.js")))))))
489 (build-system cmake-build-system)
491 '(#:tests? #f ; no test suite
493 (modify-phases %standard-phases
494 (add-after 'unpack 'chdir
496 (chdir "mjpg-streamer-experimental"))))))
497 (inputs (list libjpeg-turbo))
498 (synopsis "Stream JPEG over IP network")
499 (description "Command line application that copies JPEG frames from one or
500 more input plugins to multiple output plugins. It can be used to stream JPEG
501 files over an IP-based network from a webcam to various types of viewers such
502 as Chrome, Firefox, Cambozola, VLC, mplayer, and other software capable of
503 receiving MJPG streams.")
504 (home-page "https://github.com/jacksonliam/mjpg-streamer")
505 (license license:gpl2+)))
507 (define-public mjpegtools
515 (string-append "https://sourceforge.net/projects/mjpeg/files/"
516 name "/" version "/" name "-" version ".tar.gz"))
518 (base32 "16pl22ra3x2mkp8p3awslhlhj46b1nq9g89301gb0q4rgmnm705i"))))
519 (build-system gnu-build-system)
521 (list gtk+-2 libdv libjpeg-turbo libpng libquicktime sdl))
524 (synopsis "Tools for handling MPEG")
525 (description "Mjpeg tools is a suite of programs which support video capture,
526 editing, playback, and compression to MPEG of MJPEG video. Edit, play and
527 compression software is hardware independent.")
528 (home-page "http://mjpeg.sourceforge.net/")
529 (license license:gpl2+)))
531 (define-public libmms
539 (string-append "https://sourceforge.net/projects/" name "/files/"
540 name "/" version "/" name "-" version ".tar.gz"))
542 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
543 (build-system gnu-build-system)
544 (synopsis "MMS stream protocol library")
545 (description "Libmms is a library for streaming media files using the mmst
546 and mmsh protocols.")
547 (home-page "https://sourceforge.net/projects/libmms/")
548 (license license:lgpl2.1+)))
550 (define-public libvideogfx
559 (url "https://github.com/farindk/libvideogfx")
560 (commit (string-append "v" version))))
561 (file-name (git-file-name name version))
563 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
564 (build-system gnu-build-system)
567 (modify-phases %standard-phases
568 (add-after 'unpack 'fix-build-errors
570 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
571 (("av_close_input_file\\(")
572 "avformat_close_input(&"))
573 (substitute* "libvideogfx/graphics/fileio/png.cc"
574 (("is != NULL") "is.good()"))
577 (list autoconf automake libtool pkg-config))
579 `(("ffmpeg" ,ffmpeg-2.8)
580 ("jpeg" ,libjpeg-turbo)
584 (synopsis "Video processing library")
585 (description "LibVideoGfx is a C++ library for low-level video processing.
586 It aims at speeding up the development process for image and video processing
587 applications by providing high-level classes for commonly required tasks.")
588 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
589 (license license:lgpl2.1+)))
591 (define-public libde265
600 (url "https://github.com/strukturag/libde265")
601 (commit (string-append "v" version))))
602 (file-name (git-file-name name version))
604 (base32 "1dzflqbk248lz5ws0ni5acmf32b3rmnq5gsfaz7691qqjxkl1zml"))))
605 (build-system gnu-build-system)
608 (list "--disable-static")))
610 `(("autoconf" ,autoconf)
611 ("automake" ,automake)
613 ("pkg-config" ,pkg-config)
614 ("python" ,python-wrapper)))
616 `(;; XXX: Build fails with libvideogfx.
617 ;; ("libvideogfx" ,libvideogfx)
620 (synopsis "H.265 video codec implementation")
621 (description "Libde265 is an implementation of the h.265 video codec. It is
622 written from scratch and has a plain C API to enable a simple integration into
624 (home-page "https://www.libde265.org/")
641 (url "https://github.com/libts/tslib")
643 (file-name (git-file-name name version))
645 (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
646 (build-system gnu-build-system)
648 `(#:test-target "tests"
650 (list "--with-sdl2")))
652 (list autoconf automake libtool pkg-config))
655 (synopsis "Touchscreen access library")
656 (description "TSLib is a cross-platform library that provides access to
657 touchscreen devices and the ability to apply filters to their input events.")
658 (home-page "http://www.tslib.org/")
659 (license license:lgpl2.1+)))
661 (define-public libmpeg3
669 (string-append "https://sourceforge.net/projects/heroines/files/"
670 "releases/081108/" name "-" version "-src.tar.bz2"))
672 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
673 (build-system gnu-build-system)
675 `(#:test-target "test"
678 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
679 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
681 (modify-phases %standard-phases
682 (add-after 'unpack 'delete-bundled-a52dec
684 (delete-file-recursively "a52dec-0.7.3")
685 (substitute* "Makefile"
686 (("include Makefile\\.a52")
688 (("\\(A52DIR\\)/include")
689 "(A52DIR)/include/a52dec")
691 (string-append match "-la52 ")))
693 (add-before 'install 'create-destination-directory
694 (lambda* (#:key outputs #:allow-other-keys)
695 (let* ((out (string-append (assoc-ref outputs "out"))))
696 (mkdir-p (string-append out "/bin"))
702 (synopsis "Advanced MPEG editing and manipulation library")
703 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
704 and DVD footage in a single library. It supports many esoteric features like
705 parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
707 (home-page "http://heroinewarrior.com/libmpeg3.php")
708 (license license:gpl2+)))
716 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
717 version "/" name "-" version ".tar.gz"))
720 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
721 (build-system gnu-build-system)
724 ("makeinfo" ,texinfo)))
729 (modify-phases %standard-phases
730 (add-after 'unpack 'update-config-scripts
731 (lambda* (#:key inputs native-inputs #:allow-other-keys)
732 ;; Replace outdated config.guess and config.sub.
733 (for-each (lambda (file)
736 (or native-inputs inputs)
737 (string-append "/bin/" file)) "."))
738 '("config.guess" "config.sub"))))
740 (lambda* (#:key build inputs outputs #:allow-other-keys)
741 ;; This old `configure' script doesn't support
742 ;; variables passed as arguments.
743 (let ((out (assoc-ref outputs "out"))
744 (ncurses (assoc-ref inputs "ncurses")))
745 (setenv "CONFIG_SHELL" (which "bash"))
746 (invoke "./configure"
747 (string-append "--prefix=" out)
748 (string-append "--build=" build)
749 (string-append "--with-ncurses="
751 (home-page "http://aa-project.sourceforge.net/aalib/")
752 (synopsis "ASCII-art library")
754 "AA-lib is a low level gfx library which does not require graphics device.
755 In fact, there is no graphical output possible. AA-lib replaces those
756 old-fashioned output methods with powerful ascii-art renderer.")
757 (license license:lgpl2.0+)))
759 (define-public celluloid
766 (uri (string-append "https://github.com/celluloid-player/celluloid"
767 "/releases/download/v" version
768 "/celluloid-" version ".tar.xz"))
770 (base32 "18g596ja8g0fy79pmxqdlzqzb0f9xq69ik4bah8g2ppipfvxbpjz"))))
771 (build-system glib-or-gtk-build-system)
773 (list intltool pkg-config))
775 (list gtk libepoxy mpv))
776 (home-page "https://github.com/celluloid-player/celluloid")
777 (synopsis "GTK+ frontend for the mpv media player")
778 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
779 It interacts with mpv via the client API exported by libmpv, allowing access to
780 mpv's powerful playback capabilities.")
781 (license license:gpl3+)))
783 (define-public liba52
790 ;; A mirror://sourceforge URI doesn't work, presumably
791 ;; because the SourceForge project is misconfigured.
792 "http://liba52.sourceforge.net/files/a52dec-" version
796 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
797 (patches (search-patches "liba52-enable-pic.patch"
798 "liba52-set-soname.patch"
799 "liba52-use-mtune-not-mcpu.patch"
800 "liba52-link-with-libm.patch"))))
801 (build-system gnu-build-system)
802 ;; XXX We need to run ./bootstrap because of the build system fixes above.
804 (list autoconf automake libtool))
805 (arguments `(#:configure-flags '("--enable-shared")
807 (modify-phases %standard-phases
808 ;; XXX We need to run ./bootstrap because of the build
809 ;; system fixes above.
811 (lambda _ (invoke "sh" "bootstrap"))))))
812 (home-page "http://liba52.sourceforge.net/")
813 (synopsis "ATSC A/52 audio stream decoder")
814 (description "liba52 is a library for decoding ATSC A/52 audio streams.
815 The A/52 standard is used in a variety of applications, including digital
816 television and DVD. It is also known as AC-3.")
817 (license license:gpl2+)))
819 (define-public libaom
826 (url "https://aomedia.googlesource.com/aom/")
827 (commit (string-append "v" version))))
828 (file-name (git-file-name name version))
831 "024vhsx7bw9kajk65hhh5vmqrja0h33rmlcpngsj3yg4p8l29943"))))
832 (build-system cmake-build-system)
834 (list perl pkg-config python)) ; to detect the version
836 `(#:tests? #f ; downloads many video clips
838 (list "-DBUILD_SHARED_LIBS=YES"
840 "-DAOM_TARGET_CPU=generic"
841 (string-append "-DCMAKE_INSTALL_PREFIX="
842 (assoc-ref %outputs "out")))
844 (modify-phases %standard-phases
845 (add-after 'install 'delete-static-libraries
846 (lambda* (#:key outputs #:allow-other-keys)
847 (let* ((out (assoc-ref outputs "out"))
848 (lib (string-append out "/lib")))
849 (for-each delete-file
850 (find-files lib "\\.a$"))))))))
851 (home-page "https://aomedia.googlesource.com/aom/")
852 (synopsis "AV1 video codec")
853 (description "Libaom is the reference implementation of AV1. It includes a
854 shared library and encoder and decoder command-line executables.")
855 (license license:bsd-2)))
857 (define-public libmpeg2
863 ;; A mirror://sourceforge URI doesn't work, presumably
864 ;; because the SourceForge project is misconfigured.
865 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
866 name "-" version ".tar.gz"))
867 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
868 "libmpeg2-global-symbol-test.patch"))
871 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
879 (build-system gnu-build-system)
880 (home-page "http://libmpeg2.sourceforge.net/")
881 (synopsis "MPEG1 and MPEG2 video decoder library")
883 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
884 (license license:gpl2+)))
886 (define-public libx264
887 ;; There are no tags in the repository, so we take the version number from
888 ;; the X264_BUILD variable defined in x264.h.
889 (let ((version "161")
890 (commit "4c2aafd864dd201832ec2be0fef4484925146650")
894 (version (git-version version revision commit))
898 (url "https://code.videolan.org/videolan/x264.git")
900 (file-name (git-file-name name version))
903 "1i6v9h3xx9pi0zmlj3anwwjxqa63sbhy9crrif8dphipwfn9hyg5"))))
904 (build-system gnu-build-system)
906 (list pkg-config nasm))
909 ;; TODO: Add gpac input
911 `(#:tests? #f ;no check target
912 #:configure-flags '("--enable-shared"
913 ;; Don't build the command-line program. If we
914 ;; want it later, we should do so in a different
915 ;; package to avoid a circular dependency (the x264
916 ;; program depends on ffmpeg and ffmpeg depends on
921 ;; On MIPS, we must pass "--disable-asm" or else
922 ;; configure fails after printing: "You specified a
923 ;; pre-MSA CPU in your CFLAGS. If you really want
924 ;; to run on such a CPU, configure with
926 ,@(if (string-prefix? "mips"
927 (or (%current-target-system)
932 (modify-phases %standard-phases
933 (add-after 'unpack 'update-config-scripts
934 (lambda* (#:key native-inputs inputs #:allow-other-keys)
935 (for-each (lambda (file)
938 (or native-inputs inputs)
939 (string-append "/bin/" file)) "."))
940 '("config.guess" "config.sub")))))))
941 (home-page "https://www.videolan.org/developers/x264.html")
942 (synopsis "H.264 video coding library")
943 (description "libx264 is an advanced encoding library for creating
944 H.264 (MPEG-4 AVC) video streams.")
945 (license (list license:gpl2+ ;most files
946 license:isc ;common/x86/x86inc.asm
947 license:lgpl2.1+ ;extras/getopt.c
948 license:bsd-3 ;extras/inttypes.h
949 (license:non-copyleft ;extras/cl*.h
951 "See extras/cl.h in the distribution."))))))
953 (define-public mkvtoolnix
960 (uri (string-append "https://mkvtoolnix.download/sources/"
961 "mkvtoolnix-" version ".tar.xz"))
963 (base32 "15y7ahlifsclnkl70wn5w34dil8nwcwcjnw3k2ydqc6dz4vb0j5s"))
964 (modules '((guix build utils)))
966 ;; Delete bundled libraries.
967 (for-each delete-file-recursively
975 (build-system gnu-build-system)
976 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
997 `(("docbook-xsl" ,docbook-xsl)
998 ("gettext" ,gettext-minimal)
999 ("googletest" ,googletest)
1000 ("libxslt" ,libxslt)
1001 ("json-modern-cxx" ,json-modern-cxx)
1003 ("pkg-config" ,pkg-config)
1005 ("qttools" ,qttools)
1009 (list (string-append "--with-boost="
1010 (assoc-ref %build-inputs "boost"))
1011 (string-append "--with-docbook-xsl-root="
1012 (assoc-ref %build-inputs "docbook-xsl")
1013 "/xml/xsl/docbook-xsl-"
1014 ,(package-version docbook-xsl))
1015 "--enable-update-check=no"
1016 "--enable-precompiled-headers=no")
1018 (modify-phases %standard-phases
1019 (add-after 'unpack 'patch-relative-file-names
1020 (lambda* (#:key outputs #:allow-other-keys)
1021 (let ((out (assoc-ref outputs "out")))
1022 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
1024 (string-append out "/bin/" match)))
1026 (add-before 'configure 'add-googletest
1027 (lambda* (#:key inputs #:allow-other-keys)
1028 (symlink (search-input-directory inputs "/include/gtest")
1032 (let ((-j (list "-j" (number->string (parallel-job-count)))))
1033 (apply invoke "rake" -j))))
1036 (invoke "rake" "tests/unit")))
1039 (invoke "rake" "install")))
1040 (add-after 'install 'post-install
1041 (lambda* (#:key outputs #:allow-other-keys)
1042 ;; Move the Qt interface to "gui".
1043 (let* ((out (assoc-ref outputs "out"))
1044 (gui (assoc-ref outputs "gui"))
1045 (strip-store-dir (lambda (path)
1046 (substring path (string-prefix-length out path)))))
1049 (mkdir-p (string-append gui (dirname file)))
1050 (rename-file (string-append out file)
1051 (string-append gui file)))
1052 (append '("/bin/mkvtoolnix-gui"
1053 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
1054 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
1055 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
1056 (map strip-store-dir (find-files out "\\.ogg$"))
1057 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
1058 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
1061 (delete-file-recursively (string-append out file)))
1062 '("/share/applications"
1065 "/share/mkvtoolnix")))
1067 (home-page "https://mkvtoolnix.download")
1068 (synopsis "Tools to create, alter and inspect Matroska files")
1070 "MKVToolNix provides tools for getting information about Matroska files
1071 (@command{mkvinfo}), extracting tracks/data from Matroska files
1072 (@command{mkvextract}), and creating Matroska files from other media files
1073 (@command{mkvmerge}).")
1074 (license license:gpl2)))
1076 (define-public pipe-viewer
1078 (name "pipe-viewer")
1085 (url "https://github.com/trizen/pipe-viewer")
1087 (file-name (git-file-name name version))
1089 (base32 "1fh8b77vchpsar88dszsz5h1gzd4jz0v902igp2880vnpvacmfi9"))))
1090 (build-system perl-build-system)
1092 `(#:imported-modules
1093 ((guix build copy-build-system)
1094 ,@%perl-build-system-modules)
1096 (((guix build copy-build-system)
1098 (guix build perl-build-system)
1101 #:module-build-flags
1105 (modify-phases %standard-phases
1106 (add-after 'unpack 'patch-source
1107 (lambda* (#:key inputs #:allow-other-keys)
1108 (substitute* (find-files "lib" "\\.pm$")
1110 (format #f "\"~a/bin/youtube-dl\""
1111 (assoc-ref inputs "youtube-dl")))
1113 (format #f "\"~a/bin/yt-dlp\""
1114 (assoc-ref inputs "yt-dlp"))))
1115 (substitute* (find-files "bin" ".*-viewer$")
1117 (format #f "'~a/bin/ffmpeg'"
1118 (assoc-ref inputs "ffmpeg")))
1120 (format #f "'~a/bin/wget'"
1121 (assoc-ref inputs "wget")))
1123 (format #f "'~a/bin/xdg-open'"
1124 (assoc-ref inputs "xdg-utils")))
1126 (format #f "'~a/bin/youtube-dl'"
1127 (assoc-ref inputs "youtube-dl")))
1129 (format #f "'~a/bin/yt-dlp'"
1130 (assoc-ref inputs "yt-dlp"))))))
1131 (add-after 'install 'install-xdg
1133 (apply (assoc-ref copy:%standard-phases 'install)
1135 '(("share/icons" "share/pixmaps")
1136 ("share" "share/applications"
1137 #:include-regexp ("\\.desktop$")))
1139 (add-after 'install-xdg 'wrap-programs
1140 (lambda* (#:key outputs #:allow-other-keys)
1141 (let* ((out (assoc-ref outputs "out"))
1142 (bin-dir (string-append out "/bin/"))
1143 (site-dir (string-append out "/lib/perl5/site_perl/"))
1144 (perl-lib (getenv "PERL5LIB"))
1145 (gi-typelib (getenv "GI_TYPELIB_PATH")))
1147 (cut wrap-program <>
1148 `("PERL5LIB" ":" prefix (,perl-lib ,site-dir))
1149 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib)))
1150 (find-files bin-dir))))))))
1152 (list perl-module-build perl-test-pod perl-test-simple))
1154 (list perl-data-dump
1166 perl-lwp-protocol-https
1167 perl-lwp-useragent-cached
1171 perl-scalar-list-utils
1174 perl-term-readline-gnu
1175 perl-text-parsewords
1177 perl-unicode-linebreak
1185 (home-page "https://github.com/trizen/pipe-viewer")
1186 (synopsis "CLI+GUI YouTube Client")
1187 (description "Pipe-Viewer is a lightweight application for searching and
1188 playing videos from YouTube. It parses the YouTube website directly and relies
1189 on the Invidious instances only as a fallback method.")
1190 (license license:artistic2.0)))
1192 (define-public straw-viewer
1193 (deprecated-package "straw-viewer" pipe-viewer))
1199 (outputs '("out" "static"))
1203 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
1204 "/downloads/x265_" version ".tar.gz")
1205 (string-append "https://download.videolan.org/videolan/x265/"
1206 "x265_" version ".tar.gz")))
1208 (base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
1209 (patches (search-patches "x265-arm-flags.patch"))
1210 (modules '((guix build utils)))
1212 (delete-file-recursively "source/compat/getopt")
1214 (build-system cmake-build-system)
1216 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1217 (if (string-prefix? "i686" (%current-system))
1221 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
1223 ;; Ensure position independent code for everyone.
1224 (list "-DENABLE_PIC=TRUE"
1226 '("-DENABLE_ASSEMBLY=OFF")
1228 (string-append "-DCMAKE_INSTALL_PREFIX="
1229 (assoc-ref %outputs "out")))
1231 (modify-phases %standard-phases
1232 (add-after 'unpack 'prepare-build
1234 (delete-file-recursively "build")
1237 (add-before 'configure 'build-12-bit
1238 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1239 (mkdir "../build-12bit")
1240 (with-directory-excursion "../build-12bit"
1243 "-DHIGH_BIT_DEPTH=ON"
1244 "-DEXPORT_C_API=OFF"
1248 (substitute* (cons "cmake_install.cmake"
1250 (find-files "CMakeFiles/x265-shared.dir" ".")
1251 (find-files "CMakeFiles/x265-static.dir" ".")))
1252 (("libx265") "libx265_main12"))
1254 (add-before 'configure 'build-10-bit
1255 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1256 (mkdir "../build-10bit")
1257 (with-directory-excursion "../build-10bit"
1260 "-DHIGH_BIT_DEPTH=ON"
1261 "-DEXPORT_C_API=OFF"
1264 (substitute* (cons "cmake_install.cmake"
1266 (find-files "CMakeFiles/x265-shared.dir" ".")
1267 (find-files "CMakeFiles/x265-static.dir" ".")))
1268 (("libx265") "libx265_main10"))
1270 (add-after 'install 'install-more-libs
1272 (with-directory-excursion "../build-12bit"
1273 (invoke "make" "install"))
1274 (with-directory-excursion "../build-10bit"
1275 (invoke "make" "install"))))
1276 (add-before 'strip 'move-static-libs
1277 (lambda* (#:key outputs #:allow-other-keys)
1278 (let ((out (assoc-ref outputs "out"))
1279 (static (assoc-ref outputs "static")))
1280 (mkdir-p (string-append static "/lib"))
1281 (with-directory-excursion
1282 (string-append out "/lib")
1286 (string-append static "/lib/" file)))
1287 (find-files "." "\\.a$"))))
1289 (home-page "http://x265.org/")
1290 (synopsis "Library for encoding h.265/HEVC video streams")
1291 (description "x265 is a H.265 / HEVC video encoder application library,
1292 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1293 (license license:gpl2+)))
1295 (define-public libass
1302 "https://github.com/libass/libass/releases/download/"
1303 version "/libass-" version ".tar.xz"))
1306 "0lwfmdizzrr4gcq3fgw4j8g9pkrqgx6h0f3pgrrnxc07s34kkp8w"))))
1307 (build-system gnu-build-system)
1309 '(#:configure-flags '("--disable-static")))
1311 (list pkg-config nasm))
1313 `(("freetype" ,freetype)
1314 ("fribidi" ,fribidi)
1315 ("fontconfig" ,fontconfig)
1316 ("harfbuzz" ,harfbuzz)))
1317 (home-page "https://github.com/libass/libass")
1318 (synopsis "Subtitle rendering library for the ASS/SSA format")
1319 (description "libass is a subtitle rendering library for the
1320 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1321 (license license:isc)))
1323 (define-public libcaca
1326 (version "0.99.beta19")
1329 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1333 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))
1334 (patches (search-patches "libcaca-CVE-2021-3410-pt1.patch"
1335 "libcaca-CVE-2021-3410-pt2.patch"))))
1336 (build-system gnu-build-system)
1338 '(#:configure-flags '("--disable-static")))
1339 (native-inputs (list pkg-config))
1348 (home-page "http://caca.zoy.org/wiki/libcaca")
1349 (synopsis "Colour ASCII-art library")
1350 (description "libcaca is a graphics library that outputs text instead of
1351 pixels, so that it can work on older video cards or text terminals. It
1352 supports Unicode, 2048 colors, dithering of color images, and advanced text
1353 canvas operations.")
1354 (license license:wtfpl2)))
1356 (define-public libdca
1363 "https://download.videolan.org/pub/videolan/libdca/"
1364 version "/libdca-" version ".tar.bz2"))
1367 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1368 (build-system gnu-build-system)
1370 (list autoconf automake libtool))
1371 (home-page "https://www.videolan.org/developers/libdca.html")
1372 (synopsis "DTS Coherent Acoustics decoder")
1373 (description "libdca is a library for decoding DTS Coherent Acoustics
1375 (license license:gpl2+)))
1377 (define-public libdv
1384 "mirror://sourceforge/libdv/libdv/"
1385 version "/libdv-" version ".tar.gz"))
1388 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1389 (build-system gnu-build-system)
1390 (native-inputs (list pkg-config))
1391 (inputs (list libxv))
1392 (home-page "http://libdv.sourceforge.net/")
1393 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1394 (description "The Quasar DV codec (libdv) is a software codec for DV
1395 video, the encoding format used by most digital camcorders, typically those
1396 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1397 developed according to the official standards for DV video: IEC 61834 and
1399 (license license:lgpl2.1+)))
1401 (define-public libmatroska
1403 (name "libmatroska")
1408 (uri (string-append "https://dl.matroska.org/downloads/"
1409 "libmatroska/libmatroska-" version ".tar.xz"))
1411 (base32 "06h81sxyz2riic0gpzik6ffcnq32wrqphi8c6k55glcdymiimyfs"))))
1412 (build-system cmake-build-system)
1417 (list "-DBUILD_SHARED_LIBS=YES")
1418 #:tests? #f)) ; no test suite
1419 (home-page "https://www.matroska.org")
1420 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1422 "Matroska aims to become the standard of multimedia container formats.
1423 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1424 of XML. EBML enables the Matroska Development Team to gain significant
1425 advantages in terms of future format extensibility, without breaking file
1426 support in old parsers.
1427 libebml is a C++ library to read and write EBML files.")
1428 (license license:lgpl2.1)))
1430 (define-public libplacebo
1438 (url "https://code.videolan.org/videolan/libplacebo")
1439 (commit (string-append "v" version))))
1440 (file-name (git-file-name name version))
1442 (base32 "08kqsd29h8wm0vz7698wh2mdgpwv6anqc5n7d1spnnamwyfwc64h"))))
1443 (build-system meson-build-system)
1446 `("-Dopengl=enabled"
1447 ,(string-append "-Dvulkan-registry="
1448 (assoc-ref %build-inputs "vulkan-headers")
1449 "/share/vulkan/registry/vk.xml"))))
1451 (list python-mako pkg-config))
1459 (home-page "https://code.videolan.org/videolan/libplacebo")
1460 (synopsis "GPU-accelerated image/video processing library")
1461 (description "libplacebo is, in a nutshell, the core rendering algorithms
1462 and ideas of mpv rewritten as an independent library. As of today, libplacebo
1463 contains a large assortment of video processing shaders, focusing on both
1464 quality and performance.")
1465 (license license:lgpl2.1+)))
1467 (define-public libva
1474 (uri (string-append "https://github.com/intel/libva/releases/download/"
1475 version "/libva-" version ".tar.bz2"))
1477 (base32 "0q6l193x9whd80sjd5mx8cb7c0fcljb19nhfpla5h49nkzrq7lzs"))))
1478 (build-system gnu-build-system)
1490 (modify-phases %standard-phases
1492 'build 'fix-dlopen-paths
1493 (lambda* (#:key outputs #:allow-other-keys)
1494 (let ((out (assoc-ref outputs "out")))
1495 (substitute* "va/drm/va_drm_auth_x11.c"
1496 (("\"libva-x11\\.so\\.%d\"")
1497 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
1499 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1500 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1502 (list (string-append "--with-drivers-path="
1503 (assoc-ref %build-inputs "mesa") "/lib/dri"))
1504 ;; However, we can't write to mesa's store directory, so override the
1505 ;; following make variable to install the dummy driver to libva's
1506 ;; $prefix/lib/dri directory.
1508 (list (string-append "dummy_drv_video_ladir="
1509 (assoc-ref %outputs "out") "/lib/dri"))))
1510 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1511 (synopsis "Video acceleration library")
1512 (description "The main motivation for VA-API (Video Acceleration API) is
1513 to enable hardware accelerated video decode/encode at various
1514 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1515 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1516 (license license:expat)))
1518 (define-public libva-utils
1520 (name "libva-utils")
1525 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1526 version "/libva-utils-" version ".tar.bz2"))
1528 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1529 (build-system gnu-build-system)
1532 (list "--enable-wayland"
1537 (list libdrm libva libx11 mesa wayland))
1538 (home-page "https://01.org/linuxmedia/vaapi")
1539 (synopsis "Collection of testing utilities for VA-API")
1541 "This is a collection of utilities to query and test the @acronym{VA-API,
1542 Video Acceleration API} implemented by the libva library.
1544 These tools require a supported graphics chip, driver, and VA-API back end to
1546 (license license:expat)))
1548 (define-public ffmpeg
1554 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1558 "00hfwd8ld6jnd26pl9f0wcd2mag4zacxxgqgabsja2xkkagavnza"))))
1559 (build-system gnu-build-system)
1562 ("fontconfig" ,fontconfig)
1563 ("freetype" ,freetype)
1564 ("frei0r-plugins" ,frei0r-plugins)
1571 ("libbluray" ,libbluray)
1572 ("libcaca" ,libcaca)
1573 ("libcdio-paranoia" ,libcdio-paranoia)
1575 ("libtheora" ,libtheora)
1577 ("libvdpau" ,libvdpau)
1578 ("libvorbis" ,libvorbis)
1581 ("libx264" ,libx264)
1584 ("pulseaudio" ,pulseaudio)
1585 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1586 ;; See also the related configure flag when changing this.
1587 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1595 ("twolame" ,twolame)
1596 ("vidstab" ,vidstab)
1608 `(#:test-target "fate"
1610 ;; possible additional inputs:
1611 ;; --enable-avisynth enable reading of AviSynth script
1613 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1614 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1615 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1616 ;; and libraw1394 [no]
1617 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1618 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1619 ;; --enable-libflite enable flite (voice synthesis) support via
1621 ;; --enable-libgme enable Game Music Emu via libgme [no]
1622 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1623 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1624 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1625 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1626 ;; --enable-libnut enable NUT (de)muxing via libnut,
1627 ;; native (de)muxer exists [no]
1628 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1629 ;; libopencore-amrnb [no]
1630 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1631 ;; libopencore-amrwb [no]
1632 ;; --enable-libopencv enable video filtering via libopencv [no]
1633 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1635 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1636 ;; --enable-libschroedinger enable Dirac de/encoding via
1637 ;; libschroedinger [no]
1638 ;; --enable-libshine enable fixed-point MP3 encoding via
1640 ;; --enable-libssh enable SFTP protocol via libssh [no]
1641 ;; (libssh2 does not work)
1642 ;; --enable-libstagefright-h264 enable H.264 decoding via
1643 ;; libstagefright [no]
1644 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1646 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1647 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1648 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1649 ;; libvo-amrwbenc [no]
1650 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1651 ;; --enable-libxavs enable AVS encoding via xavs [no]
1652 ;; --enable-libzmq enable message passing via libzmq [no]
1653 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1654 ;; --enable-opencl enable OpenCL code
1655 '("--enable-avresample"
1656 "--enable-gpl" ; enable optional gpl licensed parts
1659 "--enable-fontconfig"
1664 "--enable-libbluray"
1668 "--enable-libfreetype"
1669 "--enable-libmp3lame"
1672 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
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
1710 ;; configure does not work followed by "SHELL=..." and
1711 ;; "CONFIG_SHELL=..."; set environment variables instead
1712 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1713 (let ((out (assoc-ref outputs "out")))
1714 (substitute* "configure"
1715 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1716 (setenv "SHELL" (which "bash"))
1717 (setenv "CONFIG_SHELL" (which "bash"))
1720 (string-append "--prefix=" out)
1721 ;; Add $libdir to the RUNPATH of all the binaries.
1722 (string-append "--extra-ldflags=-Wl,-rpath="
1726 'check 'set-ld-library-path
1728 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1730 (let* ((dso (find-files "." "\\.so$"))
1731 (path (string-join (map dirname dso) ":")))
1732 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1733 (setenv "LD_LIBRARY_PATH" path)
1735 (home-page "https://www.ffmpeg.org/")
1736 (synopsis "Audio and video framework")
1737 (description "FFmpeg is a complete, cross-platform solution to record,
1738 convert and stream audio and video. It includes the libavcodec
1739 audio/video codec library.")
1740 (license license:gpl2+)))
1742 (define-public ffmpeg-3.4
1748 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1752 "0d8nkd9c85rkjlgsq1hidmykkrksi883ygqzhhj6wh4nqflv8vs9"))))
1754 (substitute-keyword-arguments (package-arguments ffmpeg)
1755 ((#:modules modules %gnu-build-system-modules)
1758 ((#:configure-flags flags)
1761 '("--enable-libdav1d"
1764 "--enable-libsrt")))))
1765 (inputs (modify-inputs (package-inputs ffmpeg)
1766 (delete "dav1d" "libaom" "rav1e" "srt")))))
1768 (define-public ffmpeg-2.8
1774 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1778 "0k6dq7b8rpjvdl5ncf1135qwc36x0x9va8v83aggvbfhy5d97vwn"))))
1780 `(#:tests? #f ; XXX: Enable them later, if required
1785 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1787 (modify-phases %standard-phases
1789 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1790 (let ((out (assoc-ref outputs "out")))
1791 (substitute* "configure"
1792 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1793 ;; configure does not work followed by "SHELL=..." and
1794 ;; "CONFIG_SHELL=..."; set environment variables instead.
1795 (setenv "SHELL" (which "bash"))
1796 (setenv "CONFIG_SHELL" (which "bash"))
1799 (string-append "--prefix=" out)
1800 ;; Add $libdir to the RUNPATH of all the binaries.
1801 (string-append "--extra-ldflags=-Wl,-rpath="
1805 'check 'set-ld-library-path
1807 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1809 (let* ((dso (find-files "." "\\.so$"))
1810 (path (string-join (map dirname dso) ":")))
1811 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1812 (setenv "LD_LIBRARY_PATH" path)
1814 (inputs (modify-inputs (package-inputs ffmpeg)
1815 (delete "dav1d" "libaom" "rav1e" "srt")))))
1817 (define-public ffmpeg-for-stepmania
1826 (url "https://github.com/stepmania/ffmpeg")
1827 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1829 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1830 (file-name (git-file-name "ffmpeg" version))))
1832 (substitute-keyword-arguments (package-arguments ffmpeg)
1833 ((#:configure-flags flags)
1834 '(list "--disable-programs"
1837 "--disable-avdevice"
1838 "--disable-swresample"
1839 "--disable-postproc"
1840 "--disable-avfilter"
1842 "--enable-static"))))
1845 (define-public ffmpegthumbnailer
1847 (name "ffmpegthumbnailer")
1852 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
1854 (file-name (git-file-name name version))
1857 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1858 (build-system cmake-build-system)
1862 (list ffmpeg libjpeg-turbo libpng gvfs))
1864 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1865 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1866 (synopsis "Create thumbnails from video files")
1867 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1868 can be used by file managers to create thumbnails for your video files. The
1869 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1870 videoformats depend on the configuration flags of ffmpeg.")
1871 (license license:gpl2+)))
1880 "https://download.videolan.org/pub/videolan/vlc/"
1881 (car (string-split version #\-))
1882 "/vlc-" version ".tar.xz"))
1885 "1xhhjhwihkz74dag25r5fscvw1v2byy4c8qxaxsw29gncky3bbpz"))))
1886 (build-system gnu-build-system)
1890 ("gettext" ,gettext-minimal)
1891 ("pkg-config" ,pkg-config)))
1892 ;; FIXME: Add optional inputs once available.
1894 `(("alsa-lib" ,alsa-lib)
1901 ("fontconfig" ,fontconfig)
1902 ("freetype" ,freetype)
1903 ("fribidi" ,fribidi)
1906 ("libarchive" ,libarchive)
1908 ("libavc1394" ,libavc1394)
1909 ("libbluray" ,libbluray)
1910 ("libcaca" ,libcaca)
1911 ("libcddb" ,libcddb)
1913 ("libdvbpsi" ,libdvbpsi)
1914 ("libdvdnav" ,libdvdnav)
1915 ("libdvdread" ,libdvdread)
1916 ("libebml" ,libebml)
1917 ("libgcrypt" ,libgcrypt)
1919 ("libkate" ,libkate)
1921 ("libmatroska" ,libmatroska)
1922 ("libmicrodns" ,libmicrodns)
1923 ("libmodplug" ,libmodplug)
1924 ("libmpeg2" ,libmpeg2)
1927 ("libraw1394" ,libraw1394)
1928 ("librsvg" ,(librsvg-for-system))
1929 ("libsamplerate" ,libsamplerate)
1930 ("libsecret" ,libsecret)
1931 ("libssh2" ,libssh2)
1932 ("libupnp" ,libupnp)
1934 ("libvdpau" ,libvdpau)
1935 ("libvorbis" ,libvorbis)
1937 ("libtheora" ,libtheora)
1938 ("libx264" ,libx264)
1939 ("libxext" ,libxext)
1941 ("libxinerama" ,libxinerama)
1942 ("libxml2" ,libxml2)
1944 ("livemedia-utils" ,livemedia-utils)
1949 ("pulseaudio" ,pulseaudio)
1950 ("protobuf" ,protobuf)
1951 ("python" ,python-wrapper)
1952 ("qtbase" ,qtbase-5)
1954 ("qtx11extras" ,qtx11extras)
1957 ("sdl-image" ,sdl-image)
1959 ("speexdsp" ,speexdsp)
1960 ;; VLC is not yet compatible with SRT > 1.4.1.
1963 ("twolame" ,twolame)
1965 ("wayland" ,wayland)
1966 ("wayland-protocols" ,wayland-protocols)
1968 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1972 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1973 (assoc-ref %build-inputs "ffmpeg")
1974 "/lib")) ;needed for the tests
1977 (modify-phases %standard-phases
1978 (add-after 'unpack 'patch-source
1979 (lambda* (#:key inputs #:allow-other-keys)
1980 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1981 (substitute* "configure"
1982 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1983 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1984 ;; Some of the tests require using the display to test out VLC,
1985 ;; which fails in our sandboxed build system
1986 (substitute* "test/run_vlc.sh"
1987 (("./vlc --ignore-config") "echo"))
1989 (add-after 'strip 'regenerate-plugin-cache
1990 (lambda* (#:key outputs #:allow-other-keys)
1991 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1992 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1993 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1994 ;; it references. Thus, we first reset the timestamps of all
1995 ;; these files, and then regenerate the cache such that the
1996 ;; mtimes it includes are always zero instead of being dependent
1997 ;; on the build time.
1998 (let* ((out (assoc-ref outputs "out"))
1999 (pkglibdir (string-append out "/lib/vlc"))
2000 (plugindir (string-append pkglibdir "/plugins"))
2001 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
2002 ;; TODO: Factorize 'reset-timestamps'.
2003 (for-each (lambda (file)
2004 (let ((s (lstat file)))
2005 (unless (eq? (stat:type s) 'symlink)
2007 (find-files plugindir))
2008 (invoke cachegen plugindir))))
2009 (add-after 'install 'wrap-executable
2010 (lambda* (#:key outputs #:allow-other-keys)
2011 (let ((out (assoc-ref outputs "out"))
2012 (plugin-path (getenv "QT_PLUGIN_PATH")))
2013 (wrap-program (string-append out "/bin/vlc")
2014 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
2016 (home-page "https://www.videolan.org/")
2017 (synopsis "Audio and video framework")
2018 (description "VLC is a cross-platform multimedia player and framework
2019 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
2020 streaming protocols.")
2021 (license license:gpl2+)))
2023 (define-public mplayer
2030 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
2034 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
2035 (build-system gnu-build-system)
2036 ;; FIXME: Add additional inputs once available.
2038 (list pkg-config yasm))
2040 `(("alsa-lib" ,alsa-lib)
2041 ("cdparanoia" ,cdparanoia)
2043 ("fontconfig" ,fontconfig)
2044 ("freetype" ,freetype)
2048 ("libdvdcss" ,libdvdcss)
2049 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
2050 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
2051 ("libjpeg" ,libjpeg-turbo)
2052 ("libmpeg2" ,libmpeg2)
2053 ("libmpg123" ,mpg123) ; audio codec for MP3
2055 ("libtheora" ,libtheora)
2056 ("libvdpau" ,libvdpau)
2057 ("libvorbis" ,libvorbis)
2059 ("libx264" ,libx264)
2060 ("libxinerama" ,libxinerama)
2062 ("libxxf86dga" ,libxxf86dga)
2066 ("pulseaudio" ,pulseaudio)
2067 ("python" ,python-wrapper)
2072 `(#:tests? #f ; no test target
2074 (modify-phases %standard-phases
2076 ;; configure does not work followed by "SHELL=..." and
2077 ;; "CONFIG_SHELL=..."; set environment variables instead
2078 (lambda* (#:key inputs outputs #:allow-other-keys)
2079 (let ((out (assoc-ref outputs "out"))
2080 (libx11 (assoc-ref inputs "libx11")))
2081 (substitute* "configure"
2082 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2083 (setenv "SHELL" (which "bash"))
2084 (setenv "CONFIG_SHELL" (which "bash"))
2085 (invoke "./configure"
2086 (string-append "--extra-cflags=-I"
2087 libx11 "/include") ; to detect libx11
2088 "--disable-ffmpeg_a" ; disables bundled ffmpeg
2089 (string-append "--prefix=" out)
2090 ;; Enable runtime cpu detection where supported,
2091 ;; and choose a suitable target.
2092 ,@(match (or (%current-target-system)
2095 '("--enable-runtime-cpudetection"
2096 "--target=x86_64-linux"))
2098 '("--enable-runtime-cpudetection"
2099 "--target=i686-linux"))
2101 '("--target=mips3-linux"))
2102 (_ (list (string-append
2104 (or (%current-target-system)
2105 (nix-system->gnu-triplet
2106 (%current-system)))))))
2107 "--disable-iwmmxt")))))))
2108 (home-page "https://www.mplayerhq.hu")
2109 (synopsis "Audio and video player")
2110 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
2111 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
2112 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
2113 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
2114 (license license:gpl2)))
2123 (url "https://github.com/mpv-player/mpv")
2124 (commit (string-append "v" version))))
2125 (file-name (git-file-name name version))
2127 (base32 "12qxwm1ww5vhjddl8yvj1xa0n1fi9z3lmzwhaiday2v59ca0qgsk"))))
2128 (build-system waf-build-system)
2130 (list perl ; for zsh completion file
2131 pkg-config python-docutils))
2132 ;; Missing features: libguess, V4L2
2134 `(("alsa-lib" ,alsa-lib)
2141 ("libbluray" ,libbluray)
2142 ("libcaca" ,libcaca)
2143 ("libbs2b" ,libbs2b)
2144 ("libcdio-paranoia" ,libcdio-paranoia)
2145 ("libdvdread" ,libdvdread)
2146 ("libdvdnav" ,libdvdnav)
2147 ("libjpeg" ,libjpeg-turbo)
2149 ("libvdpau" ,libvdpau)
2151 ("libxext" ,libxext)
2152 ("libxinerama" ,libxinerama)
2153 ("libxrandr" ,libxrandr)
2154 ("libxscrnsaver" ,libxscrnsaver)
2156 ;; XXX: lua > 5.2 is not currently supported; see
2157 ;; waftools/checks/custom.py
2161 ("pulseaudio" ,pulseaudio)
2163 ("shaderc" ,shaderc)
2164 ("vulkan-headers" ,vulkan-headers)
2165 ("vulkan-loader" ,vulkan-loader)
2167 ("wayland" ,wayland)
2168 ("wayland-protocols" ,wayland-protocols)
2169 ("libxkbcommon" ,libxkbcommon)
2174 (modify-phases %standard-phases
2175 (add-after 'unpack 'patch-paths
2176 (lambda* (#:key inputs #:allow-other-keys)
2177 (let ((ytdl (assoc-ref inputs "yt-dlp")))
2178 (substitute* "player/lua/ytdl_hook.lua"
2180 (string-append "\"" ytdl "/bin/yt-dlp\","))))))
2181 (add-before 'configure 'build-reproducibly
2183 ;; Somewhere in the build system library dependencies are enumerated
2184 ;; and passed as linker flags, but the order in which they are added
2185 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
2186 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
2187 (setenv "PYTHONHASHSEED" "1")
2190 'configure 'setup-waf
2191 (lambda* (#:key inputs #:allow-other-keys)
2192 (let ((waf (assoc-ref inputs "waf")))
2193 (copy-file (string-append waf "/bin/waf") "waf"))
2196 #:configure-flags (list "--enable-libmpv-shared"
2199 "--disable-build-date")
2200 ;; No check function defined.
2202 (home-page "https://mpv.io/")
2203 (synopsis "Audio and video player")
2204 (description "mpv is a general-purpose audio and video player. It is a
2205 fork of mplayer2 and MPlayer. It shares some features with the former
2206 projects while introducing many more.")
2207 (license license:gpl2+)))
2209 (define-public smplayer
2216 "mirror://sourceforge/smplayer/SMPlayer/" version
2217 "/smplayer-" version ".tar.bz2"))
2220 "12nvcl0cfix1xay9hfi7856vg4lpv8y5b0a22212bsjbvl5g22rc"))))
2221 (build-system qt-build-system)
2225 (list bash-minimal qtbase-5 zlib mpv))
2227 (list #:tests? #false ; no tests
2228 #:make-flags #~(list (string-append "PREFIX=" #$output)
2229 (string-append "CC=" #+(cc-for-target))
2230 ;; A KLUDGE to turn off invoking lrelease on the
2231 ;; project for now, because it fails consistently
2232 ;; with "WARNING: Could not find qmake spec
2233 ;; 'default'". See below.
2236 #~(modify-phases %standard-phases
2238 ;; Due to the above, we must run lrelease separately on each .ts file
2239 ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
2240 ;; project, as the Makefile does normally without the above kludge).
2241 (add-after 'build 'compile-ts-files
2243 (for-each (lambda (file)
2244 (invoke "lrelease" file))
2245 (find-files "./" "\\.ts$"))))
2246 (add-after 'install 'wrap-executable
2247 (lambda* (#:key inputs outputs #:allow-other-keys)
2248 (let* ((out (assoc-ref outputs "out"))
2249 (mpv (assoc-ref inputs "mpv")))
2250 (wrap-program (string-append out "/bin/smplayer")
2252 ,(list (string-append mpv "/bin"))))))))))
2253 (home-page "https://www.smplayer.info")
2254 (synopsis "Complete front-end for MPlayer, a media player")
2255 (description "SMPlayer is a graphical user interface (GUI) for
2256 MPlayer, which is capable of playing almost all known video and audio
2257 formats. Apart from providing access for the most common and useful
2258 options of MPlayer, SMPlayer adds other interesting features like the
2259 possibility to play Youtube videos, download subtitles, remember
2260 the last played position, etc.")
2261 (license license:gpl2+)))
2263 (define-public gallery-dl
2269 (uri (string-append "https://github.com/mikf/gallery-dl"
2270 "/releases/download/v" version "/gallery_dl-"
2274 "0149hd4nh7bk2yqjdnvrkvag5mwgsb6gxrgfcd88q4cv3k2ji42h"))))
2275 (build-system python-build-system)
2276 (inputs (list python-requests ffmpeg))
2277 (home-page "https://github.com/mikf/gallery-dl")
2278 (synopsis "Command-line program to download images from several sites")
2279 (description "Gallery-dl is a command-line program that downloads image
2280 galleries and collections from several image hosting sites. While this package
2281 can use youtube-dl or yt-dlp packages to download videos, the focus is more on
2282 images and image hosting sites.")
2283 (license license:gpl2)))
2285 (define-public gnome-mpv
2286 (deprecated-package "gnome-mpv" celluloid))
2288 (define-public mpv-mpris
2296 (url "https://github.com/hoyon/mpv-mpris")
2298 (file-name (git-file-name name version))
2300 (base32 "03gldk149i2108w3ylyfmci77kdq4whdzfavh7hjviwyj534101r"))))
2301 (build-system copy-build-system)
2304 '(("mpris.so" "lib/"))
2306 (modify-phases %standard-phases
2307 (add-before 'install 'build
2309 (setenv "CC" (which "gcc"))
2310 (invoke "make"))))))
2315 (home-page "https://github.com/hoyon/mpv-mpris")
2316 (synopsis "MPRIS plugin for mpv")
2317 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2318 Interfacing Specification) plugin for the @code{mpv} media player. It implements
2319 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2322 To load this plugin, specify the following option when starting mpv:
2323 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2324 @file{$HOME/.config/mpv/scripts}.")
2325 (license license:expat)))
2327 (define-public libvpx
2334 (url "https://chromium.googlesource.com/webm/libvpx")
2335 (commit (string-append "v" version))))
2336 (file-name (git-file-name name version))
2339 "00f1jrclai2b6ys78dpsg6r1mvcyxlna93vxcz8zjyia24c2pjsb"))
2340 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
2341 (build-system gnu-build-system)
2343 `(#:configure-flags (list "--enable-shared"
2346 ;; Limit size to avoid CVE-2015-1258
2347 "--size-limit=16384x16384"
2348 (string-append "--prefix=" (assoc-ref %outputs "out")))
2349 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2350 (assoc-ref %outputs "out") "/lib"))
2351 #:phases (modify-phases %standard-phases
2353 (lambda* (#:key configure-flags #:allow-other-keys)
2354 ;; The configure script does not understand some of the GNU
2355 ;; options, so we only add the flags specified above.
2356 (apply invoke "./configure" configure-flags))))
2358 ;; XXX: The test suite wants to download 871 files from a cloud storage
2359 ;; service (see test/test-data.sha1). It is possible to specify a
2360 ;; custom directory, but there seems to be no tarball with all files.
2364 (synopsis "VP8/VP9 video codec")
2365 (description "libvpx is a codec for the VP8/VP9 video compression format.")
2366 (license license:bsd-3)
2367 (home-page "https://www.webmproject.org/")))
2369 (define-public youtube-dl
2372 (version "2021.12.17")
2375 (uri (string-append "https://youtube-dl.org/downloads/latest/"
2376 "youtube-dl-" version ".tar.gz"))
2379 "1prm84ci1n1kjzhikhrsbxbgziw6br822psjnijm2ibqnz49jfwz"))
2382 ;; Delete the pre-generated files, except for the man page
2383 ;; which requires 'pandoc' to build.
2384 (for-each delete-file '("youtube-dl"
2385 ;;pandoc is needed to generate
2387 "youtube-dl.bash-completion"
2389 "youtube-dl.zsh"))))))
2390 (build-system python-build-system)
2392 ;; The problem here is that the directory for the man page and completion
2393 ;; files is relative, and for some reason, setup.py uses the
2394 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2395 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2396 ;; completion file is called 'youtube-dl' rather than
2397 ;; 'youtube-dl.bash-completion'.
2398 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2399 #:phases (modify-phases %standard-phases
2400 (add-after 'unpack 'default-to-the-ffmpeg-input
2402 ;; See <https://issues.guix.gnu.org/43418#5>.
2403 ;; ffmpeg is big but required to request free formats
2404 ;; from, e.g., YouTube so pull it in unconditionally.
2405 ;; Continue respecting the --ffmpeg-location argument.
2406 (substitute* "youtube_dl/postprocessor/ffmpeg.py"
2407 (("\\.get\\('ffmpeg_location'\\)" match)
2408 (format #f "~a or '~a'" match (which "ffmpeg"))))))
2409 (add-before 'build 'build-generated-files
2411 ;; Avoid the make targets that require pandoc.
2415 ;;"youtube-dl.1" ; needs pandoc
2416 "youtube-dl.bash-completion"
2418 "youtube-dl.fish")))
2419 (add-before 'install 'fix-the-data-directories
2420 (lambda* (#:key outputs #:allow-other-keys)
2421 (let ((prefix (assoc-ref outputs "out")))
2422 (mkdir "bash-completion")
2423 (rename-file "youtube-dl.bash-completion"
2424 "bash-completion/youtube-dl")
2425 (substitute* "setup.py"
2426 (("youtube-dl\\.bash-completion")
2427 "bash-completion/youtube-dl")
2429 (string-append "'" prefix "/etc/"))
2431 (string-append "'" prefix "/share/"))))))
2432 (add-after 'install 'install-completion
2433 (lambda* (#:key outputs #:allow-other-keys)
2434 (let* ((out (assoc-ref outputs "out"))
2435 (zsh (string-append out
2436 "/share/zsh/site-functions")))
2438 (copy-file "youtube-dl.zsh"
2439 (string-append zsh "/_youtube-dl"))))))))
2444 (synopsis "Download videos from YouTube.com and other sites")
2446 "Youtube-dl is a small command-line program to download videos from
2447 YouTube.com and many more sites.")
2448 (home-page "https://yt-dl.org")
2449 (properties '((release-monitoring-url . "https://yt-dl.org/downloads/")))
2450 (license license:public-domain)))
2452 (define-public yt-dlp
2453 (package/inherit youtube-dl
2455 (version "2022.02.04")
2458 (uri (string-append "https://github.com/yt-dlp/yt-dlp/"
2459 "releases/download/"
2460 version "/yt-dlp.tar.gz"))
2463 "1qx8sx47lzyrcl00r2657zjaq0mwfbzjyfnv5lr5dlm552f13pf8"))
2466 ;; Delete the pre-generated files, except for the man page
2467 ;; which requires 'pandoc' to build.
2468 (for-each delete-file '("yt-dlp"
2469 ;;pandoc is needed to generate
2471 "completions/bash/yt-dlp"
2472 "completions/fish/yt-dlp.fish"
2473 "completions/zsh/_yt-dlp"))
2476 (substitute-keyword-arguments (package-arguments youtube-dl)
2479 `(modify-phases ,phases
2480 ;; See the comment for the corresponding phase in youtube-dl.
2481 (replace 'default-to-the-ffmpeg-input
2483 (substitute* "yt_dlp/postprocessor/ffmpeg.py"
2484 (("\\.get_param\\('ffmpeg_location'\\)" match)
2485 (format #f "~a or '~a'" match (which "ffmpeg"))))
2487 (replace 'build-generated-files
2489 ;; Avoid the yt-dlp.1 target, which requires pandoc.
2490 (invoke "make" "PYTHON=python" "yt-dlp" "completions")))
2491 (replace 'fix-the-data-directories
2492 (lambda* (#:key outputs #:allow-other-keys)
2493 (let ((prefix (assoc-ref outputs "out")))
2494 (substitute* "setup.py"
2496 (string-append "'" prefix "/etc/"))
2498 (string-append "'" prefix "/share/"))))
2500 (delete 'install-completion)
2502 (lambda* (#:key tests? #:allow-other-keys)
2504 (invoke "pytest" "-k" "not download"))))))))
2506 `(("python-mutagen" ,python-mutagen)
2507 ("python-pycryptodomex" ,python-pycryptodomex)
2508 ("python-websockets" ,python-websockets)
2509 ,@(package-inputs youtube-dl)))
2511 `(("python-pytest" ,python-pytest)
2512 ,@(package-native-inputs youtube-dl)))
2514 "yt-dlp is a small command-line program to download videos from
2515 YouTube.com and many more sites. It is a fork of youtube-dl with a
2516 focus on adding new features while keeping up-to-date with the
2518 (properties '((release-monitoring-url . "https://pypi.org/project/yt-dlp/")))
2519 (home-page "https://github.com/yt-dlp/yt-dlp")))
2521 (define-public youtube-dl-gui
2523 (name "youtube-dl-gui")
2528 (uri (pypi-uri "Youtube-DLG" version))
2531 "1bvq2wyn6az59vpdy04dh68fs8m2qzz948xhphibbcpwpcdk00cd"))))
2532 (build-system python-build-system)
2534 ;; In Guix, wxpython has not yet been packaged for Python 3.
2535 `(#:python ,python-2
2536 ;; This package has no tests.
2539 (modify-phases %standard-phases
2540 (add-before 'build 'patch-source
2541 (lambda* (#:key inputs #:allow-other-keys)
2542 ;; The youtube-dl-gui program lets you configure options. Some of
2543 ;; them are problematic, so we change their defaults.
2544 (substitute* "youtube_dl_gui/optionsmanager.py"
2545 ;; When this is true, the builder process will try (and fail) to
2546 ;; write logs to the builder user's home directory.
2547 (("'enable_log': True") "'enable_log': False")
2548 ;; This determines which youtube-dl program youtube-dl-gui will
2549 ;; run. If we don't set this, then youtube-dl-gui might download
2550 ;; an arbitrary copy from the Internet into the user's home
2551 ;; directory and run it, so let's make sure youtube-dl-gui uses
2552 ;; the youtube-dl from the inputs by default.
2553 (("'youtubedl_path': self.config_path")
2554 (string-append "'youtubedl_path': '"
2555 (assoc-ref inputs "youtube-dl")
2557 ;; When this is True, when youtube-dl-gui is finished downloading
2558 ;; a file, it will try (and possibly fail) to open the directory
2559 ;; containing the downloaded file. This can fail because it
2560 ;; assumes that xdg-open is in PATH. Unfortunately, simply
2561 ;; adding xdg-utils to the propagated inputs is not enough to
2562 ;; make this work, so for now we set the default to False.
2563 (("'open_dl_dir': True") "'open_dl_dir': False"))
2564 ;; The youtube-dl program from the inputs is actually a wrapper
2565 ;; script written in bash, so attempting to invoke it as a python
2566 ;; script will fail.
2567 (substitute* "youtube_dl_gui/downloaders.py"
2568 (("cmd = \\['python', self\\.youtubedl_path\\]")
2569 "cmd = [self.youtubedl_path]"))
2570 ;; Use relative paths for installing data files so youtube-dl-gui
2571 ;; installs the files relative to its prefix in the store, rather
2572 ;; than relative to /. Also, instead of installing data files into
2573 ;; $prefix/usr/share, install them into $prefix/share for
2574 ;; consistency (see: (standards) Directory Variables).
2575 (substitute* "setup.py"
2576 (("= '/usr/share") "= 'share"))
2577 ;; Update get_locale_file() so it finds the installed localization
2579 (substitute* "youtube_dl_gui/utils.py"
2580 (("os\\.path\\.join\\('/usr', 'share'")
2581 (string-append "os.path.join('"
2582 (assoc-ref %outputs "out")
2585 (add-after 'install 'create-desktop-file
2586 (lambda* (#:key outputs #:allow-other-keys)
2587 (let* ((out (assoc-ref outputs "out"))
2588 (applications (string-append out "/share/applications")))
2589 (mkdir-p applications)
2590 (call-with-output-file
2591 (string-append applications "/youtube-dl-gui.desktop")
2596 Name=Youtube-dl GUI~@
2597 Comment=Graphical interface to download video with youtube-dl~@
2598 Exec=youtube-dl-gui~@
2599 TryExec=youtube-dl-gui~@
2601 Icon=youtube-dl-gui~@
2603 Categories=AudioVideo;Audio;Video;Network~%")))
2606 (list gettext-minimal))
2608 (list python2-twodict python2-wxpython youtube-dl))
2609 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
2611 "GUI (Graphical User Interface) for @command{youtube-dl}")
2613 "Youtube-dlG is a GUI (Graphical User Interface) for
2614 @command{youtube-dl}. You can use it to download videos from YouTube and any
2615 other site that youtube-dl supports.")
2616 (license license:unlicense)))
2618 (define-public you-get
2621 (version "0.4.1555")
2625 (url "https://github.com/soimort/you-get")
2626 (commit (string-append "v" version))))
2627 (file-name (git-file-name name version))
2630 "0gn86i6nfsw395r9a3i88nv2g08s5bgjps7w4qawb9gvk4h7zqap"))))
2631 (build-system python-build-system)
2633 (list ffmpeg)) ; for multi-part and >=1080p videos
2636 (modify-phases %standard-phases
2637 (add-after 'unpack 'qualify-input-references
2638 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2639 ;; happens to be in the user's $PATH at run time.
2640 (lambda* (#:key inputs #:allow-other-keys)
2641 (let ((ffmpeg (search-input-file inputs "/bin/ffmpeg")))
2642 (substitute* "src/you_get/processor/ffmpeg.py"
2643 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2644 ;; same string is also used when sniffing ffmpeg's output.
2645 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2646 (string-append prefix "'" ffmpeg "'")))))))
2647 #:tests? #f)) ; XXX some tests need Internet access
2648 (synopsis "Download videos, audio, or images from Web sites")
2650 "You-Get is a command-line utility to download media contents (videos,
2651 audio, images) from the Web. It can use either mpv or vlc for playback.")
2652 (home-page "https://you-get.org/")
2653 (license license:expat)))
2655 (define-public youtube-viewer
2657 (name "youtube-viewer")
2662 (url "https://github.com/trizen/youtube-viewer")
2664 (file-name (git-file-name name version))
2667 "0xdybiihd66b79rbsawjhxs9snm78gld5ziz3gnp8vdcw0bshwz7"))))
2668 (build-system perl-build-system)
2670 (list perl-module-build))
2672 (list perl-data-dump
2678 perl-lwp-protocol-https
2679 perl-lwp-useragent-cached
2682 perl-term-readline-gnu
2683 perl-unicode-linebreak
2685 ;; Some videos play without youtube-dl, but others silently fail to.
2688 `(#:modules ((guix build perl-build-system)
2691 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2692 ;; is broken without perl-gtk3.
2693 #:module-build-flags '("--gtk2")
2695 (modify-phases %standard-phases
2696 (add-after 'unpack 'refer-to-inputs
2697 (lambda* (#:key inputs #:allow-other-keys)
2698 (substitute* "lib/WWW/YoutubeViewer.pm"
2700 (format #f "'~a/bin/youtube-dl'"
2701 (assoc-ref inputs "youtube-dl"))))
2702 (substitute* '("bin/gtk2-youtube-viewer"
2703 "bin/gtk3-youtube-viewer")
2705 (format #f "'~a/bin/xdg-open'"
2706 (assoc-ref inputs "xdg-utils"))))
2708 (add-after 'install 'install-desktop
2709 (lambda* (#:key outputs #:allow-other-keys)
2710 (let* ((out (assoc-ref outputs "out"))
2711 (sharedir (string-append out "/share")))
2712 (install-file "share/gtk-youtube-viewer.desktop"
2713 (string-append sharedir "/applications"))
2714 (install-file "share/icons/gtk-youtube-viewer.png"
2715 (string-append sharedir "/pixmaps"))
2717 (add-after 'install 'wrap-program
2718 (lambda* (#:key outputs #:allow-other-keys)
2719 (let* ((out (assoc-ref outputs "out"))
2720 (bin-dir (string-append out "/bin/"))
2721 (site-dir (string-append out "/lib/perl5/site_perl/"))
2722 (lib-path (getenv "PERL5LIB")))
2723 (for-each (cut wrap-program <>
2724 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2725 (find-files bin-dir))
2728 "Lightweight application for searching and streaming videos from YouTube")
2730 "Youtube-viewer searches and plays YouTube videos in a native player.
2731 It comes with various search options; it can search for videos, playlists
2732 and/or channels. The videos are streamed directly in a selected video player
2733 at the best resolution (customizable) and with closed-captions (if available).
2734 Both command-line and GTK2 interface are available.")
2735 (home-page "https://github.com/trizen/youtube-viewer")
2736 (license license:perl-license)))
2738 (define-public libbluray
2744 (uri (string-append "https://download.videolan.org/videolan/"
2745 name "/" version "/"
2746 name "-" version ".tar.bz2"))
2749 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
2750 (build-system gnu-build-system)
2752 `(#:configure-flags '("--disable-bdjava-jar"
2755 (modify-phases %standard-phases
2756 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2757 ;; Avoid the need to propagate libxml2 by referring to it
2758 ;; directly, as is already done for fontconfig & freetype.
2759 (lambda* (#:key inputs #:allow-other-keys)
2760 (let ((libxml2 (assoc-ref inputs "libxml2")))
2761 (substitute* "configure"
2762 ((" libxml-2.0") ""))
2763 (substitute* "src/libbluray.pc.in"
2764 (("^Libs.private:" field)
2765 (string-append field " -L" libxml2 "/lib -lxml2")))
2767 (add-before 'build 'fix-dlopen-paths
2768 (lambda* (#:key inputs #:allow-other-keys)
2769 (let ((libaacs (assoc-ref inputs "libaacs"))
2770 (libbdplus (assoc-ref inputs "libbdplus")))
2771 (substitute* "src/libbluray/disc/aacs.c"
2773 (string-append "\"" libaacs "/lib/libaacs\"")))
2774 (substitute* "src/libbluray/disc/bdplus.c"
2776 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2778 (native-inputs (list pkg-config))
2780 `(("fontconfig" ,fontconfig)
2781 ("freetype" ,freetype)
2782 ("libaacs" ,libaacs)
2783 ("libbdplus" ,libbdplus)
2784 ("libxml2" ,libxml2)))
2785 (home-page "https://www.videolan.org/developers/libbluray.html")
2786 (synopsis "Blu-Ray Disc playback library")
2788 "libbluray is a library designed for Blu-Ray Disc playback for media
2789 players, like VLC or MPlayer.")
2790 (license license:lgpl2.1+)))
2792 (define-public libdvdread
2798 (uri (string-append "https://download.videolan.org/videolan/"
2799 "libdvdread/" version "/"
2800 "libdvdread-" version ".tar.bz2"))
2803 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
2804 (build-system gnu-build-system)
2806 `(#:configure-flags '("--with-libdvdcss=yes")))
2811 (home-page "http://dvdnav.mplayerhq.hu/")
2812 (synopsis "Library for reading video DVDs")
2814 "Libdvdread provides a simple foundation for reading DVD video
2815 disks. It provides the functionality that is required to access many
2816 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2817 authentication and descrambling (if an external libdvdcss library is
2819 (license license:gpl2+)))
2821 (define-public dvdauthor
2828 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2832 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2833 (build-system gnu-build-system)
2835 (list libdvdread libpng imagemagick libxml2 freetype))
2838 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2839 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2840 MPEG-2 stream containing VOB packets.")
2841 (home-page "http://dvdauthor.sourceforge.net")
2842 (license license:gpl3+)))
2844 (define-public libdvdnav
2850 (uri (string-append "https://download.videolan.org/videolan/"
2851 "libdvdnav/" version "/"
2852 "libdvdnav-" version ".tar.bz2"))
2855 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2856 (build-system gnu-build-system)
2861 (home-page "http://dvdnav.mplayerhq.hu/")
2862 (synopsis "Library for video DVD navigation features")
2864 "Libdvdnav is a library for developers of multimedia
2865 applications. It allows easy use of sophisticated DVD navigation features
2866 such as DVD menus, multiangle playback and even interactive DVD games. All
2867 this functionality is provided through a simple API which provides the DVD
2868 playback as a single logical stream of blocks, intermitted by special
2869 dvdnav events to report certain conditions. The main usage of libdvdnav is
2870 a loop regularly calling a function to get the next block, surrounded by
2871 additional calls to tell the library of user interaction. The whole
2872 DVD virtual machine and internal playback states are completely
2874 (license license:gpl2+)))
2876 (define-public libdvdcss
2882 (uri (string-append "https://download.videolan.org/pub/"
2883 name "/" version "/"
2884 name "-" version ".tar.bz2"))
2887 "0y800y33spblb20s1lsjbaiybknmwwmmiczmjqx5s760blpwjg13"))))
2888 (build-system gnu-build-system)
2889 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2890 (synopsis "Library for accessing DVDs as block devices")
2892 "libdvdcss is a simple library designed for accessing DVDs like a block
2893 device without having to bother about the decryption.")
2894 (license license:gpl2+)))
2896 (define-public srt2vtt
2903 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2907 "1ravl635x81fcai4h2xnsn926i69pafgr6zkghq6319iprkw8ffv"))))
2908 (build-system gnu-build-system)
2911 (modify-phases %standard-phases
2912 (add-after 'install 'wrap-srt2vtt
2913 (lambda* (#:key outputs #:allow-other-keys)
2914 (let* ((out (assoc-ref outputs "out"))
2915 (bin (string-append out "/bin"))
2916 (version ,(let ((v (package-version guile-3.0)))
2917 (string-append (car (string-split v #\.))
2919 (site (string-append out "/share/guile/site/" version))
2920 (compiled (string-append
2921 out "/lib/guile/" version
2923 (wrap-program (string-append bin "/srt2vtt")
2924 `("GUILE_LOAD_PATH" ":" prefix (,site))
2925 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,compiled)))))))))
2930 (synopsis "SubRip to WebVTT subtitle converter")
2931 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2932 for use with HTML5 video.")
2933 (home-page "https://dthompson.us/projects/srt2vtt.html")
2934 (license license:gpl3+)))
2936 (define-public avidemux
2943 "mirror://sourceforge/avidemux/avidemux/" version "/"
2944 "avidemux_" version ".tar.gz"))
2947 "00blv5455ry3bb86zyzk1xmq3rbqmbif62khc0kq3whza97l12k2"))
2948 (patches (search-patches "avidemux-install-to-lib.patch"))))
2949 (build-system cmake-build-system)
2952 ("pkg-config" ,pkg-config)
2953 ("python" ,python-wrapper)
2954 ("qttools" ,qttools)
2956 ;; FIXME: Once packaged, add libraries not found during the build.
2958 `(("alsa-lib" ,alsa-lib)
2959 ("fontconfig" ,fontconfig)
2960 ("freetype" ,freetype)
2961 ("fribidi" ,fribidi)
2967 ("libvdpau" ,libvdpau)
2968 ("libvorbis" ,libvorbis)
2971 ("pulseaudio" ,pulseaudio)
2972 ("qtbase" ,qtbase-5)
2976 `(#:tests? #f ; no check target
2978 ;; Make sure files inside the included ffmpeg tarball are
2980 (let ((ffmpeg "ffmpeg-4.2.4"))
2981 (modify-phases %standard-phases
2982 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2984 (with-directory-excursion "avidemux_core/ffmpeg_package"
2985 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2986 (delete-file (string-append ffmpeg ".tar.bz2")))
2988 (add-after 'patch-source-shebangs 'repack-ffmpeg
2990 (with-directory-excursion "avidemux_core/ffmpeg_package"
2991 (substitute* (string-append ffmpeg "/configure")
2992 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2993 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2994 ;; avoid non-determinism in the archive
2995 "--sort=name" "--mtime=@0"
2996 "--owner=root:0" "--group=root:0")
2997 (delete-file-recursively ffmpeg))
3001 ;; Copy-paste settings from the cmake build system.
3002 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
3003 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
3006 (lambda* (#:key inputs outputs #:allow-other-keys)
3007 (let* ((out (assoc-ref outputs "out"))
3008 (lib (string-append out "/lib"))
3011 (lambda* (component srcdir #:optional (args '()))
3012 (let ((builddir (string-append "build_" component)))
3014 (with-directory-excursion builddir
3015 (apply invoke "cmake"
3016 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
3017 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
3018 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
3019 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
3020 "\"-Wl,-rpath=" lib "\"")
3021 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
3022 (string-append "../" srcdir)
3026 (number->string (parallel-job-count)))
3027 (invoke "make" "install"))))))
3029 (build_component "core" "avidemux_core")
3030 (build_component "cli" "avidemux/cli")
3031 (build_component "qt4" "avidemux/qt4")
3032 (build_component "plugins_common" "avidemux_plugins"
3033 '("-DPLUGIN_UI=COMMON"))
3034 (build_component "plugins_cli" "avidemux_plugins"
3035 '("-DPLUGIN_UI=CLI"))
3036 (build_component "plugins_qt4" "avidemux_plugins"
3037 '("-DPLUGIN_UI=QT4"))
3038 (build_component "plugins_settings" "avidemux_plugins"
3039 '("-DPLUGIN_UI=SETTINGS"))
3040 ;; Remove .exe and .dll file.
3041 (delete-file-recursively
3042 (string-append out "/share/ADM6_addons"))
3044 (delete 'install)))))
3045 (home-page "http://fixounet.free.fr/avidemux/")
3046 (synopsis "Video editor")
3047 (description "Avidemux is a video editor designed for simple cutting,
3048 filtering and encoding tasks. It supports many file types, including AVI,
3049 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
3050 can be automated using projects, job queue and powerful scripting
3052 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
3053 ;; Software with various licenses is included, see License.txt.
3054 (license license:gpl2+)))
3056 (define-public vapoursynth
3058 (name "vapoursynth")
3063 (url "https://github.com/vapoursynth/vapoursynth")
3064 (commit (string-append "R" version))))
3065 (file-name (git-file-name name version))
3068 "0qcsfkpkry0cmvi60khjwvfz4fqhy23nqmn4pb9qrwll26sn9dcr"))))
3069 (build-system gnu-build-system)
3072 (modify-phases %standard-phases
3073 (add-after 'install 'wrap
3074 (lambda* (#:key outputs #:allow-other-keys)
3075 (let* ((out (assoc-ref outputs "out"))
3076 (site (string-append out "/lib/python"
3077 ,(version-major+minor
3078 (package-version python))
3080 (wrap-program (string-append out "/bin/vspipe")
3081 `("PYTHONPATH" ":" = (,site)))))))))
3083 `(("autoconf" ,autoconf)
3084 ("automake" ,automake)
3085 ("cython" ,python-cython)
3086 ("libtool" ,libtool)
3087 ("pkg-config" ,pkg-config)
3090 (list ffmpeg libass python tesseract-ocr zimg))
3091 (home-page "http://www.vapoursynth.com/")
3092 (synopsis "Video processing framework")
3093 (description "VapourSynth is a C++ library and Python module for video
3094 manipulation. It aims to be a modern rewrite of Avisynth, supporting
3095 multithreading, generalized colorspaces, per frame properties, and videos with
3097 ;; src/core/cpufeatures only allows x86, ARM or PPC
3098 (supported-systems (fold delete %supported-systems
3099 '("mips64el-linux" "aarch64-linux")))
3100 ;; As seen from the source files.
3101 (license license:lgpl2.1+)))
3110 "http://downloads.xvid.com/downloads/xvidcore-"
3111 version ".tar.bz2"))
3114 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
3115 (build-system gnu-build-system)
3116 (native-inputs (list yasm))
3119 (modify-phases %standard-phases
3120 (add-before 'configure 'pre-configure
3122 (chdir "build/generic")
3123 (substitute* "configure"
3124 (("#! /bin/sh") (string-append "#!" (which "sh"))))
3126 #:tests? #f)) ; no test suite
3127 (home-page "https://www.xvid.com/")
3128 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
3129 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
3130 codec library. It uses ASP features such as b-frames, global and quarter
3131 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
3132 and custom quantization matrices.")
3133 (license license:gpl2+)))
3135 (define-public streamlink
3142 (uri (pypi-uri "streamlink" version))
3145 "1nv2kj1k42a1b20ws8sdzlxk3wh1qz6pg5mxp75433b3c7lxksn0"))))
3146 (build-system python-build-system)
3147 (home-page "https://github.com/streamlink/streamlink")
3149 (list python-freezegun python-pytest python-mock
3150 python-requests-mock))
3152 (list python-pysocks
3153 python-websocket-client
3160 (synopsis "Extract streams from various services")
3161 (description "Streamlink is command-line utility that extracts streams
3162 from sites like Twitch.tv and pipes them into a video player of choice.")
3163 (license license:bsd-2)))
3165 (define-public twitchy
3166 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
3169 (version (git-version "3.4" "1" commit))
3174 (url "https://github.com/BasioMeusPuga/twitchy")
3176 (file-name (git-file-name name version))
3179 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
3180 (build-system python-build-system)
3183 (modify-phases %standard-phases
3184 (add-after 'unpack 'patch-paths
3185 (lambda* (#:key inputs #:allow-other-keys)
3186 (substitute* "twitchy/twitchy_play.py"
3188 (string-append "\"" (assoc-ref inputs "streamlink")
3189 "/bin/streamlink ")))
3191 (add-before 'check 'check-setup
3193 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
3195 (add-after 'install 'install-rofi-plugin
3196 (lambda* (#:key outputs #:allow-other-keys)
3197 (install-file "plugins/rofi-twitchy"
3198 (string-append (assoc-ref outputs "out")
3202 (list python-requests streamlink))
3203 (home-page "https://github.com/BasioMeusPuga/twitchy")
3204 (synopsis "Command-line interface for Twitch.tv")
3206 "This package provides a command-line interface for Twitch.tv")
3207 (license license:gpl3+))))
3217 (url "https://github.com/mltframework/mlt")
3218 (commit (string-append "v" version))))
3219 (file-name (git-file-name name version))
3221 (base32 "132y3niv9p1pwms1d5dr0w1jifvr52yfjy6zza3g7qaha0yzfh0c"))))
3222 (build-system cmake-build-system)
3225 #:tests? #f ;requires "Kwalify"
3227 #~(modify-phases %standard-phases
3228 (add-before 'configure 'override-LDFLAGS
3231 (string-append "-Wl,-rpath=" #$output "/lib"))))
3232 (add-after 'install 'wrap-executable
3234 (let* ((frei0r #$(this-package-input "frei0r-plugins"))
3235 (ladspa #$(this-package-input "ladspa"))
3236 ;; In MLT 7, 'melt' symlinks to 'melt-7'. Try to keep
3237 ;; compatibility with MLT 6 where it's only 'melt'.
3238 (major #$(version-major version))
3239 (exec (if (file-exists?
3240 (string-append #$output "/bin/melt-" major))
3241 (string-append "melt-" major)
3243 (wrap-program (string-append #$output "/bin/" exec)
3244 `("FREI0R_PATH" ":" =
3245 (,(string-append frei0r "/lib/frei0r-1")))
3246 `("LADSPA_PATH" ":" =
3247 (,(string-append ladspa "/lib/ladspa"))))))))))
3250 `(,alsa-plugins "pulseaudio")
3275 (home-page "https://www.mltframework.org/")
3276 (synopsis "Author, manage, and run multitrack audio/video compositions")
3278 "MLT is a multimedia framework, designed and developed for television
3279 broadcasting. It provides a toolkit for broadcasters, video editors, media
3280 players, transcoders, web streamers and many more types of applications. The
3281 functionality of the system is provided via an assortment of ready to use
3282 tools, XML authoring components, and an extensible plug-in based API.")
3283 (license license:lgpl2.1+)))
3285 (define-public mlt-6
3294 (url "https://github.com/mltframework/mlt")
3295 (commit (string-append "v" version))))
3296 (file-name (git-file-name name version))
3298 (base32 "1gz79xvs5jrzqhwhfk0dqdd3xiavnjp4q957h7nb02rij32byb39"))))
3301 (list (string-append "-DGTK2_GDKCONFIG_INCLUDE_DIR="
3302 (assoc-ref %build-inputs "gtk+")
3303 "/lib/gtk-2.0/include")
3304 (string-append "-DGTK2_GLIBCONFIG_INCLUDE_DIR="
3305 (assoc-ref %build-inputs "glib")
3306 "/lib/glib-2.0/include"))
3307 ,@(package-arguments mlt)))
3309 (modify-inputs (package-inputs mlt)
3310 (replace "gtk+" gtk+-2)))))
3312 (define-public v4l-utils
3318 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
3319 "/v4l-utils-" version ".tar.bz2"))
3322 "1xr66y6w422hil6s7n8d61a2vhwh4im8l267amf41jvw7xqihqcm"))))
3323 (build-system gnu-build-system)
3324 ;; Separate graphical tools in order to save almost 1 GiB on the closure
3325 ;; for the common case.
3326 (outputs '("out" "gui"))
3329 (list "--disable-static"
3330 (string-append "--with-udevdir="
3331 (assoc-ref %outputs "out")
3334 (modify-phases %standard-phases
3335 (add-after 'install 'split
3336 (lambda* (#:key outputs #:allow-other-keys)
3337 (let ((out (assoc-ref outputs "out"))
3338 (gui (assoc-ref outputs "gui")))
3339 (mkdir-p (string-append gui "/bin"))
3340 (mkdir-p (string-append gui "/share/man/man1"))
3341 (mkdir-p (string-append gui "/share/applications"))
3346 (rename-file (string-append out file)
3347 (string-append gui file)))
3349 (string-append "/bin/" prog)
3350 (string-append "/share/man/man1/" prog ".1")
3351 (string-append "/share/applications/" prog ".desktop"))))
3352 '("qv4l2" "qvidcap"))
3353 (copy-recursively (string-append out "/share/icons")
3354 (string-append gui "/share/icons"))
3355 (delete-file-recursively (string-append out "/share/icons"))
3356 (rmdir (string-append out "/share/applications"))
3359 (list perl pkg-config))
3361 `(("alsa-lib" ,alsa-lib)
3363 ("libjpeg" ,libjpeg-turbo)
3365 ("qtbase" ,qtbase-5)
3367 (synopsis "Realtime video capture utilities for Linux")
3368 (description "The v4l-utils provide a series of libraries and utilities to
3369 be used for realtime video capture via Linux-specific APIs.")
3370 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
3371 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
3372 (license (list license:lgpl2.1+ license:gpl2))))
3381 (url "https://github.com/obsproject/obs-studio")
3384 (file-name (git-file-name name version))
3387 "1ndiarr3d6qihymaigf34jjml0lrgbj640fnpnffz2ysj7276q0j"))
3389 (search-patches "obs-modules-location.patch"))))
3390 (build-system cmake-build-system)
3394 #~(list (string-append "-DOBS_VERSION_OVERRIDE=" #$version)
3395 "-DENABLE_UNIT_TESTS=TRUE"
3396 ;; Browser plugin requires cef, but it is not packaged yet.
3397 ;; <https://bitbucket.org/chromiumembedded/cef/src/master/>
3398 "-DBUILD_BROWSER=FALSE")
3400 #~(modify-phases %standard-phases
3401 (add-after 'install 'wrap-executable
3403 (let ((plugin-path (getenv "QT_PLUGIN_PATH")))
3404 (wrap-program (string-append #$output "/bin/obs")
3405 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))))))))
3406 (native-search-paths
3407 (list (search-path-specification
3408 (variable "OBS_PLUGINS_DIRECTORY")
3409 (separator #f) ;single entry
3410 (files '("lib/obs-plugins")))
3411 (search-path-specification
3412 (variable "OBS_PLUGINS_DATA_DIRECTORY")
3413 (separator #f) ;single entry
3414 (files '("share/obs/obs-plugins")))))
3416 (list cmocka pkg-config))
3443 (synopsis "Live streaming software")
3444 (description "Open Broadcaster Software provides a graphical interface for
3445 video recording and live streaming. OBS supports capturing audio and video
3446 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3448 (home-page "https://obsproject.com")
3449 (license license:gpl2+)))
3451 (define-public obs-spectralizer
3453 (name "obs-spectralizer")
3459 (url "https://github.com/univrsal/spectralizer")
3460 (commit (string-append "v" version))))
3461 (file-name (git-file-name name version))
3463 ;; Remove bundled Windows DLLs.
3464 (snippet '(delete-file-recursively "fftw3"))
3465 (modules '((guix build utils)))
3469 "0q75cnyqydpvfda51zm9gxqj3wqr99ad0lxzjhw0ld67qvj1ag6i"))))
3470 (build-system cmake-build-system)
3474 (list "-DGLOBAL_INSTALLATION=ON" "-DUSE_CMAKE_LIBDIR=ON")))
3475 (inputs (list obs fftw))
3476 (home-page "https://github.com/univrsal/spectralizer")
3477 (synopsis "OBS plugin for audio visualization")
3478 (description "This OBS plugins allows you to vizualize MPD and internal
3479 OBS audio sources.")
3480 (license license:gpl2)))
3482 (define-public obs-websocket
3484 (name "obs-websocket")
3490 (url "https://github.com/Palakis/obs-websocket")
3493 (file-name (git-file-name name version))
3495 (base32 "1r47861ma1s3998clahbnbc216wcf706b1ps514k5p28h511l5w0"))))
3496 (build-system cmake-build-system)
3498 `(#:tests? #f ;no tests
3500 (modify-phases %standard-phases
3501 (add-after 'unpack 'remove-permission-change
3503 (substitute* "CMakeLists.txt"
3504 ;; Remove lines that set writeable permissions on outputs.
3505 (("set\\(CMAKE_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS") "")
3506 (("OWNER_READ.*\\)") "")
3507 (("PERMISSIONS") ")"))
3510 (list obs qtbase-5))
3511 (home-page "https://github.com/Palakis/obs-websocket")
3512 (synopsis "OBS plugin for remote control via WebSockets")
3513 (description "This OBS plugin allows you to establish a WebSocket channel
3514 from within your running OBS instance so that you can control it remotely from
3515 programs on your current machine or on other machines.")
3516 (license license:gpl2+)))
3518 (define-public obs-wlrobs
3526 (url "https://hg.sr.ht/~scoopta/wlrobs")
3527 (changeset (string-append "v" version))))
3528 (file-name (git-file-name name version))
3531 "1faiq2gdb7qis3m1hilm4pz8lkmkab75vzm608dbiazahhybf96p"))))
3532 (build-system meson-build-system)
3535 (propagated-inputs `() )
3537 `(,libx11 "out") wayland wayland-protocols))
3538 (home-page "https://hg.sr.ht/~scoopta/wlrobs")
3539 (synopsis "OBS plugin for Wayland (wlroots) screen capture")
3541 "This OBS plugin allows you to capture the screen on wlroots-based
3542 Wayland compositors.")
3543 (license license:gpl3+)))
3545 (define-public libvdpau
3553 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3555 (file-name (git-file-name name version))
3558 "1hc4mcrbr1yhfiy4zfd8wc2iiqbp90z6jswap0jia20vmyk5lqld"))))
3559 (build-system meson-build-system)
3563 (list `(,libx11 "out") libxext xorgproto))
3564 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3565 (synopsis "Video Decode and Presentation API")
3566 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3567 provides an interface to video decode acceleration and presentation hardware
3568 present in modern GPUs.")
3569 (license (license:x11-style "file://COPYING"))))
3571 (define-public vdpauinfo
3579 (url "https://gitlab.freedesktop.org/vdpau/vdpauinfo")
3581 (file-name (git-file-name name version))
3583 (base32 "0s84bavxr39w0r7zfaac7kpbfsg88hgymqyzcr0yvbj1yry3liz2"))))
3584 (build-system gnu-build-system)
3587 (modify-phases %standard-phases
3589 ;; ./autogen.sh runs ./configure too soon.
3591 (invoke "autoreconf" "-fiv"))))))
3593 (list autoconf automake libx11 pkg-config))
3596 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3597 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3598 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3600 (license (license:x11-style "file://COPYING"))))
3602 (define-public libvdpau-va-gl
3604 (name "libvdpau-va-gl")
3609 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3610 "releases/download/v" version "/libvdpau-va-gl-"
3614 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3615 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3616 (modules '((guix build utils)))
3617 (snippet '(begin (delete-file-recursively "3rdparty")
3619 (build-system cmake-build-system)
3621 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3623 (list libvdpau pkg-config))
3626 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3627 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3629 "Many applications can use VDPAU to accelerate portions of the video
3630 decoding process and video post-processing to the GPU video hardware. Since
3631 there is no VDPAU available on Intel chips, they fall back to different drawing
3632 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3633 scaling and VA-API (if available) to accelerate video decoding.")
3634 (license license:expat)))
3636 (define-public recordmydesktop
3638 (name "recordmydesktop")
3642 (uri (string-append "https://github.com/Enselic/"
3643 name "/releases/download/v" version
3644 "/recordmydesktop-" version ".tar.gz"))
3647 "17kjgmkl45zma64a5dg1hyvnjkzk4vl8milgi6ic7hlsbmywpig7"))))
3648 (build-system gnu-build-system)
3660 (home-page "https://enselic.github.io/recordmydesktop/")
3661 (synopsis "Desktop session video recorder")
3663 "recordMyDesktop is a command-line tool that captures the activity in
3664 your graphical desktop and encodes it as a video. This is a useful tool for
3665 making @dfn{screencasts}.")
3666 (license license:gpl2+)))
3668 (define-public simplescreenrecorder
3670 (name "simplescreenrecorder")
3676 (url "https://github.com/MaartenBaert/ssr")
3678 (file-name (git-file-name name version))
3681 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3682 (build-system cmake-build-system)
3683 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3684 ;; README.md, the program builds and functions properly without them.
3685 ;; As a result, they are omitted. Please add them back if problems appear.
3696 (native-inputs (list pkg-config))
3699 (list "-DWITH_QT5=TRUE")
3700 #:tests? #f)) ; no test suite
3701 ;; Using HTTPS causes part of the page to be displayed improperly.
3702 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3703 (synopsis "Screen recorder")
3704 (description "SimpleScreenRecorder is an easy to use screen recorder with
3705 a graphical user interface. It supports recording the entire screen, or a
3706 part of it, and allows encoding in many different codecs and file formats.
3707 Other features include a live preview and live streaming.")
3708 (license (list license:gpl3+ ; most files
3709 license:zlib ; glinject/elfhacks.*
3710 license:isc ; glinject/*
3711 license:x11)))) ; build-aux/install-sh
3713 (define-public libsmpeg
3716 (version "0.4.5-401")
3720 (url "svn://svn.icculus.org/smpeg/trunk/")
3721 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3722 (file-name (string-append name "-" version "-checkout"))
3725 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3726 (build-system gnu-build-system)
3728 ;; libsmpeg fails to build with -std=c++11, which is the default with
3729 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3730 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3732 (list autoconf automake))
3735 (home-page "https://icculus.org/smpeg/")
3736 (synopsis "SDL MPEG decoding library")
3738 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3739 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3740 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3741 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3742 and MPEG system streams.")
3743 (license (list license:expat
3749 (define-public libsmpeg-with-sdl1
3750 (package (inherit libsmpeg)
3752 (version "0.4.5-399")
3756 (url "svn://svn.icculus.org/smpeg/trunk/")
3757 (revision 399))) ; tagged release 0.4.5
3758 (file-name (string-append name "-" version "-checkout"))
3761 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3765 (define-public libbdplus
3772 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3773 version "/" name "-" version ".tar.bz2"))
3775 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3778 (build-system gnu-build-system)
3779 (home-page "https://www.videolan.org/developers/libbdplus.html")
3780 (synopsis "Library for decrypting certain Blu-Ray discs")
3781 (description "libbdplus is a library which implements the BD+ System
3783 (license license:lgpl2.1+)))
3785 (define-public libaacs
3792 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3793 version "/libaacs-" version ".tar.bz2"))
3795 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3800 (build-system gnu-build-system)
3801 (home-page "https://www.videolan.org/developers/libaacs.html")
3802 (synopsis "Library for decrypting certain Blu-Ray discs")
3803 (description "libaacs is a library which implements the Advanced Access
3804 Content System specification.")
3805 (license license:lgpl2.1+)))
3807 (define-public mps-youtube
3809 (name "mps-youtube")
3815 (url "https://github.com/mps-youtube/mps-youtube")
3816 (commit (string-append "v" version))))
3817 (file-name (git-file-name name version))
3820 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3821 (build-system python-build-system)
3823 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3824 ;; test suite results differ depending on the country and also introduce
3825 ;; non-determinism in the tests.
3826 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3828 #:phases (modify-phases %standard-phases
3829 ;; Loading this as a library will create cache directories,
3830 ;; etc; which fails in the build container.
3831 (delete 'sanity-check))))
3833 (list python-pafy python-pygobject)) ; For mpris2 support
3834 (home-page "https://github.com/mps-youtube/mps-youtube")
3835 (synopsis "Terminal based YouTube player and downloader")
3837 "@code{mps-youtube} is based on mps, a terminal based program to
3838 search, stream and download music. This implementation uses YouTube as
3839 a source of content and can play and download video as well as audio.
3840 It can use either mpv or mplayer for playback, and for conversion of
3841 formats ffmpeg or libav is used. Users should install one of the
3842 supported players in addition to this package.")
3843 (license license:gpl3+)))
3845 (define-public handbrake
3851 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3852 "releases/download/" version "/"
3853 "HandBrake-" version "-source.tar.bz2"))
3856 "1w1hjj6gvdydypw4mdn281w0x163is59cfm7k6bq371hsl3gx69r"))
3857 (modules '((guix build utils)))
3859 ;; Remove "contrib" and source not necessary for
3860 ;; building/running under a GNU environment.
3862 (for-each delete-file-recursively
3863 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3864 (substitute* "make/include/main.defs"
3865 ;; Disable unconditional inclusion of "contrib" libraries
3866 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3867 ;; which would lead to fetching and building of these
3868 ;; libraries. Use our own instead.
3869 (("MODULES \\+= contrib") "# MODULES += contrib"))))))
3870 (build-system glib-or-gtk-build-system)
3872 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3873 ("autoconf" ,autoconf)
3874 ("intltool" ,intltool)
3875 ("libtool" ,libtool)
3876 ("pkg-config" ,pkg-config)
3877 ("python" ,python-2))) ; For configuration
3880 ("dbus-glib" ,dbus-glib)
3882 ("fontconfig" ,fontconfig)
3883 ("freetype" ,freetype)
3885 ("gstreamer" ,gstreamer)
3886 ("gst-plugins-base" ,gst-plugins-base)
3888 ("jansson" ,jansson)
3891 ("libbluray" ,libbluray)
3893 ("libdvdnav" ,libdvdnav)
3894 ("libdvdread" ,libdvdread)
3895 ("libgudev" ,libgudev)
3896 ("libjpeg-turbo" ,libjpeg-turbo)
3897 ("libmpeg2" ,libmpeg2)
3898 ("libnotify" ,libnotify)
3899 ("libnuma" ,numactl)
3902 ("libsamplerate" ,libsamplerate)
3903 ("libtheora" ,libtheora)
3904 ("libvorbis" ,libvorbis)
3906 ("libxml2" ,libxml2)
3907 ("libx264" ,libx264)
3913 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3915 (list "--disable-gtk-update-checks"
3917 (string-append "CPPFLAGS=-I"
3918 (assoc-ref %build-inputs "libxml2")
3922 (modify-phases %standard-phases
3924 ;; Run bootstrap ahead of time so that shebangs get patched.
3926 (setenv "CONFIG_SHELL" (which "sh"))
3927 ;; Patch the Makefile so that it doesn't bootstrap again.
3928 (substitute* "gtk/module.rules"
3929 ((".*autoreconf.*") ""))
3930 (with-directory-excursion "gtk"
3931 (invoke "autoreconf" "-fiv"))))
3932 (add-before 'configure 'patch-SHELL
3934 (substitute* "gtk/po/Makefile.in.in"
3935 (("SHELL = /bin/sh") "SHELL = @SHELL@"))))
3936 (add-before 'configure 'relax-reqs
3938 (substitute* "make/configure.py"
3939 ;; cmake is checked for so that it can be used to build
3940 ;; contrib/harfbuzz and contrib/x265, but we get these as
3941 ;; inputs, so don't abort if it's not found. Similarly, meson
3942 ;; and ninja are only needed for contrib/libdav1d, and nasm
3944 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3945 (string-append & "False")))))
3947 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3948 ;; 'configure' is not an autoconf-generated script, and
3949 ;; errors on unrecognized arguments,
3950 ;; e.g. --enable-fast-install
3951 (let ((out (assoc-ref outputs "out")))
3952 (apply invoke "./configure"
3953 (string-append "--prefix=" out)
3954 (or configure-flags '())))))
3955 (add-after 'configure 'chdir-build
3956 (lambda _ (chdir "./build"))))))
3957 (home-page "https://handbrake.fr")
3958 (synopsis "Video transcoder")
3960 "HandBrake is a tool for converting video from any format to a selection
3961 of modern, widely supported codecs.")
3962 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3963 ;; Combination under GPLv2. See LICENSE.
3964 (license license:gpl2)))
3966 (define-public intel-vaapi-driver
3968 (name "intel-vaapi-driver")
3974 (url "https://github.com/intel/intel-vaapi-driver")
3977 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3978 (file-name (git-file-name name version))))
3979 (build-system gnu-build-system)
3981 (list autoconf automake libtool pkg-config))
3983 (list libdrm libva libx11))
3986 (modify-phases %standard-phases
3987 (add-before 'configure 'set-target-directory
3988 (lambda* (#:key outputs #:allow-other-keys)
3989 (let ((out (assoc-ref outputs "out")))
3990 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
3992 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
3993 ;; this to all VA-API back ends instead of once to libva.
3994 (native-search-paths
3995 (list (search-path-specification
3996 (variable "LIBVA_DRIVERS_PATH")
3997 (files '("lib/dri")))))
3998 (supported-systems '("i686-linux" "x86_64-linux"))
3999 (home-page "https://01.org/linuxmedia/vaapi")
4000 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
4002 "This is the @acronym{VA-API, Video Acceleration API} back end required for
4003 hardware-accelerated video processing on Intel GEN Graphics devices supported by
4004 the i915 driver, such as integrated Intel HD Graphics. It provides access to
4005 both hardware and shader functionality for faster encoding, decoding, and
4006 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
4007 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
4008 license:expat)))) ; the rest, excluding the test suite
4010 (define-public openh264
4017 (url "https://github.com/cisco/openh264")
4018 (commit (string-append "v" version))))
4019 (file-name (git-file-name name version))
4022 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
4023 (build-system gnu-build-system)
4027 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
4029 #:test-target "test"
4030 #:phases (modify-phases %standard-phases
4031 ;; no configure script
4032 (delete 'configure))))
4033 (home-page "https://www.openh264.org/")
4034 (synopsis "H264 decoder library")
4036 "Openh264 is a library which can decode H264 video streams.")
4037 (license license:bsd-2)))
4039 (define-public libmp4v2
4046 ;; XXX: The new location of upstream is uncertain and will become relevant the
4047 ;; moment when the googlecode archive shuts down. It is past the date it
4048 ;; should've been turned off. I tried to communicate with upstream, but this
4049 ;; wasn't very responsive and not very helpful. The short summary is, it is
4050 ;; chaos when it comes to the amount of forks and only time will tell where
4051 ;; the new upstream location is.
4052 (uri (string-append "https://storage.googleapis.com/google-"
4053 "code-archive-downloads/v2/"
4054 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
4055 (file-name (string-append name "-" version ".tar.bz2"))
4056 (patches (search-patches "libmp4v2-c++11.patch"))
4059 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
4060 (build-system gnu-build-system)
4062 "static")) ; 3.7MiB .a file
4064 `(;; Build as C++2003 to avoid C++11 "narrowing conversion" errors.
4065 #:configure-flags '("CXXFLAGS=-O2 -g -std=c++03")
4068 (modify-phases %standard-phases
4069 (add-after 'unpack 'remove-dates
4071 ;; Make the build reproducible.
4072 (substitute* "configure"
4073 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
4074 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
4076 (add-after 'install 'move-static-libraries
4077 (lambda* (#:key outputs #:allow-other-keys)
4078 ;; Move static libraries to the "static" output.
4079 (let* ((out (assoc-ref outputs "out"))
4080 (lib (string-append out "/lib"))
4081 (static (assoc-ref outputs "static"))
4082 (slib (string-append static "/lib")))
4084 (for-each (lambda (file)
4085 (install-file file slib)
4087 (find-files lib "\\.a$"))
4090 (list help2man dejagnu))
4091 (home-page "https://code.google.com/archive/p/mp4v2/")
4092 (synopsis "API to create and modify mp4 files")
4094 "The MP4v2 library provides an API to create and modify mp4 files as defined by
4095 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
4096 file format that has been used as a multimedia file format in a variety of platforms and
4097 applications. It is a very powerful and extensible format that can accommodate
4098 practically any type of media.")
4099 (license license:mpl1.1)))
4101 (define-public libmediainfo
4103 (name "libmediainfo")
4107 (uri (string-append "https://mediaarea.net/download/source/"
4108 name "/" version "/"
4109 name "_" version ".tar.xz"))
4112 "1fc0ihj17cdv9zb346llwvbv0hn3sl3ax398ankgp74fcaxvll7w"))))
4113 ;; TODO add a Big Buck Bunny webm for tests.
4115 (list autoconf automake libtool pkg-config))
4117 (list zlib tinyxml2 curl ; In Requires.private of libmediainfo.pc.
4119 (build-system gnu-build-system)
4121 '(#:tests? #f ; see above TODO
4123 (list "--with-libcurl" "--with-libtinyxml2")
4125 ;; build scripts not in root of archive
4126 (modify-phases %standard-phases
4127 (add-after 'unpack 'change-to-build-dir
4129 (chdir "Project/GNU/Library")
4131 (home-page "https://mediaarea.net/en/MediaInfo")
4132 (synopsis "Library for retrieving media metadata")
4133 (description "MediaInfo is a library used for retrieving technical
4134 information and other metadata about audio or video files. A non-exhaustive
4135 list of the information MediaInfo can retrieve from media files include:
4138 @item General: title, author, director, album, track number, date, duration...
4139 @item Video: codec, aspect, fps, bitrate...
4140 @item Audio: codec, sample rate, channels, language, bitrate...
4141 @item Text: language of subtitle
4142 @item Chapters: number of chapters, list of chapters
4145 MediaInfo supports the following formats:
4148 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
4149 MPEG-2, MPEG-4, DVD (VOB)...
4150 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
4151 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
4152 @item Subtitles: SRT, SSA, ASS, SAMI...
4154 (license license:bsd-2)))
4156 ;; TODO also have a GUI version available
4157 (define-public mediainfo
4163 ;; Warning: This source has proved unreliable 1 time at least.
4164 ;; Consider an alternate source or report upstream if this
4166 (uri (string-append "https://mediaarea.net/download/source/"
4167 name "/" version "/"
4168 name "_" version ".tar.xz"))
4171 "07h2a1lbw5ak6c9bcn8qydchl0wpgk945rf9sfcqjyv05h5wll6y"))))
4173 (list autoconf automake libtool pkg-config))
4175 (list libmediainfo))
4176 (build-system gnu-build-system)
4178 '(#:tests? #f ; lacks tests
4180 ;; build scripts not in root of archive
4181 (modify-phases %standard-phases
4182 (add-after 'unpack 'change-to-build-dir
4184 (chdir "Project/GNU/CLI")
4186 (home-page "https://mediaarea.net/en/MediaInfo")
4187 (synopsis "Utility for reading media metadata")
4188 (description "MediaInfo is a utility used for retrieving technical
4189 information and other metadata about audio or video files. It supports the
4190 many codecs and formats supported by libmediainfo.")
4191 (license license:bsd-2)))
4193 (define-public atomicparsley
4195 (name "atomicparsley")
4196 (version "20200701.154658.b0d6223")
4200 (url "https://github.com/wez/atomicparsley")
4202 (file-name (git-file-name name version))
4205 "1kym2l5y34nmbrrlkfmxsf1cwrvch64kb34jp0hpa0b89idbhwqh"))))
4206 (build-system cmake-build-system)
4208 `(#:tests? #f ;; no tests included
4210 (modify-phases %standard-phases
4211 (add-before 'configure 'set-cmake-version
4213 (substitute* "CMakeLists.txt"
4214 ;; At the time of writing, Guix has CMake at 3.16, but
4215 ;; AtomicParsley uses 3.17. This brings the required CMake
4216 ;; version down to what Guix can afford.
4217 (("VERSION 3.17") "VERSION 3.16"))
4220 (lambda* (#:key outputs #:allow-other-keys)
4221 (let* ((out (assoc-ref outputs "out"))
4222 (bin (string-append out "/bin")))
4223 (install-file "AtomicParsley" bin))
4227 (synopsis "Metadata editor for MPEG-4 files")
4228 (description "AtomicParsley is a lightweight command line program for
4229 reading, parsing and setting metadata into MPEG-4 files, in particular,
4230 iTunes-style metadata.")
4231 (home-page "https://github.com/wez/atomicparsley")
4232 (license license:gpl2+)))
4234 (define-public livemedia-utils
4236 (name "livemedia-utils")
4237 (version "2020.11.19")
4241 "https://download.videolan.org/contrib/live555/live."
4245 "16w6yxdbmjdhvffnrb752dn4llf3l0wb00dgdkyia0vqsv2qqyn7"))))
4246 (build-system gnu-build-system)
4248 `(#:tests? #f ; no tests
4249 #:make-flags (list (string-append "CC=" ,(cc-for-target))
4250 (string-append "CXX=" ,(cxx-for-target))
4251 (string-append "LDFLAGS=-Wl,-rpath="
4252 (assoc-ref %outputs "out") "/lib")
4253 (string-append "PREFIX="
4254 (assoc-ref %outputs "out")))
4255 #:phases (modify-phases %standard-phases
4256 (add-before 'configure 'fix-makefiles-generation
4258 (substitute* "genMakefiles"
4263 (invoke "./genMakefiles"
4264 "linux-with-shared-libraries"))))))
4267 (home-page "http://www.live555.com/liveMedia/")
4268 (synopsis "Set of C++ libraries for multimedia streaming")
4269 (description "This code forms a set of C++ libraries for multimedia
4270 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
4271 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
4272 JPEG video, and several audio codecs. They can easily be extended to support
4273 additional (audio and/or video) codecs, and can also be used to build basic
4274 RTSP or SIP clients and servers.")
4275 (license license:lgpl3+)))
4277 (define-public libdvbpsi
4284 "https://download.videolan.org/pub/libdvbpsi/"
4285 version "/libdvbpsi-" version ".tar.bz2"))
4288 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
4289 (build-system gnu-build-system)
4290 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
4291 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
4293 (description "libdvbpsi is a simple library designed for decoding and
4294 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
4295 and ITU-T H.222.0.")
4296 (license license:lgpl2.1)))
4298 (define-public ffms2
4302 (home-page "https://github.com/FFMS/ffms2")
4306 (url "https://github.com/FFMS/ffms2")
4308 (file-name (git-file-name name version))
4311 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
4312 (build-system gnu-build-system)
4315 (list "--enable-avresample")))
4322 (synopsis "Cross-platform wrapper around ffmpeg/libav")
4324 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
4325 programmers to access a standard API to open and decompress media files.")
4326 ;; sources are distributed under a different license that the binary.
4327 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
4328 (license license:gpl2+))); inherits from ffmpeg
4330 (define-public aegisub
4337 "http://ftp.aegisub.org/pub/archives/releases/source/"
4338 name "-" version ".tar.xz"))
4341 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
4342 (patches (search-patches "aegisub-icu59-include-unistr.patch"
4343 "aegisub-make43.patch"
4344 "aegisub-boost68.patch"))))
4345 (build-system gnu-build-system)
4348 (list "--disable-update-checker"
4349 "--without-portaudio"
4352 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
4353 ;; tests require busted, a lua package we don't have yet
4356 (modify-phases %standard-phases
4357 (add-before 'configure 'fix-ldflags
4359 (setenv "LDFLAGS" "-pthread")
4361 (add-after 'unpack 'fix-boost-headers
4364 '("src/subtitles_provider_libass.cpp"
4365 "src/colour_button.cpp"
4366 "src/video_provider_dummy.cpp"
4367 "./src/video_frame.cpp")
4368 (("#include <boost/gil/gil_all.hpp>")
4369 "#include <boost/gil.hpp>"))
4384 (list intltool desktop-file-utils pkg-config))
4385 (home-page "http://www.aegisub.org/")
4386 (synopsis "Subtitle engine")
4388 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
4389 it quick and easy to time subtitles to audio, and features many powerful
4390 tools for styling them, including a built-in real-time video preview.")
4391 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
4392 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
4393 license:expat)))) ; and src/gl that is under a license similar
4394 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
4395 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
4396 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
4398 (define-public pitivi
4399 ;; Pitivi switched to a non-semantic versioning scheme close before 1.0
4400 (let ((latest-semver "0.999.0")
4401 (%version "2021.05.0"))
4404 (version (string-append latest-semver "-" %version))
4409 (url "https://gitlab.gnome.org/GNOME/pitivi.git")
4411 (file-name (git-file-name name version))
4412 (patches (search-patches "pitivi-fix-build-with-meson-0.60.patch"))
4414 (base32 "08x2fs2bak1fbmkvjijgx1dsawispv91bpv5j5gkqbv5dfgf7wah"))))
4415 (build-system meson-build-system)
4418 gst-editing-services
4422 (gst-plugins/selection gst-plugins-bad #:plugins
4423 '("debugutils" "transcode")
4425 '("-Dintrospection=enabled"))
4440 `(("gettext" ,gettext-minimal)
4441 ("glib:bin" ,glib "bin")
4442 ("itstool" ,itstool)
4443 ("pkg-config" ,pkg-config)))
4447 (modify-phases %standard-phases
4448 (add-after 'glib-or-gtk-wrap 'wrap-other-dependencies
4449 (lambda* (#:key outputs #:allow-other-keys)
4450 (let ((prog (string-append (assoc-ref outputs "out")
4453 `("GUIX_PYTHONPATH" = (,(getenv "GUIX_PYTHONPATH")))
4454 `("GI_TYPELIB_PATH" = (,(getenv "GI_TYPELIB_PATH")))
4455 ;; We've only added inputs for what Pitivi deems either
4456 ;; necessary or optional. Let the user's packages take
4457 ;; precedence in case they have e.g. the full gst-plugins-bad.
4458 `("GST_PLUGIN_SYSTEM_PATH" suffix
4459 (,(getenv "GST_PLUGIN_SYSTEM_PATH"))))))))))
4460 (home-page "http://www.pitivi.org")
4461 (synopsis "Video editor based on GStreamer Editing Services")
4462 (description "Pitivi is a video editor built upon the GStreamer Editing
4463 Services. It aims to be an intuitive and flexible application that can appeal
4464 to newbies and professionals alike.")
4465 (license license:lgpl2.1+))))
4474 (uri (string-append "mirror://sourceforge/gmerlin/"
4475 name "/" version "/"
4476 name "-" version ".tar.gz"))
4477 (file-name (string-append name "-" version ".tar.gz"))
4480 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
4481 (build-system gnu-build-system)
4483 '(#:configure-flags '("LIBS=-lm")))
4485 (list pkg-config doxygen))
4486 (home-page "http://gmerlin.sourceforge.net")
4487 (synopsis "Low level library for multimedia API building")
4489 "Gavl is short for Gmerlin Audio Video Library. It is a low level
4490 library, upon which multimedia APIs can be built. Gavl handles all the
4491 details of audio and video formats like colorspaces, sample rates,
4492 multichannel configurations, etc. It provides standardized definitions for
4493 those formats as well as container structures for carrying audio samples or
4494 video images inside an application.
4496 In addition, it handles the sometimes ugly task of converting between all
4497 these formats and provides some elementary operations (copying, scaling,
4498 alpha blending etc).")
4499 (license license:gpl3)))
4501 (define-public frei0r-plugins
4503 (name "frei0r-plugins")
4508 (uri (string-append "https://files.dyne.org/frei0r/"
4509 "frei0r-plugins-" version ".tar.gz"))
4512 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
4513 (build-system gnu-build-system)
4516 (modify-phases %standard-phases
4517 (add-after 'unpack 'patch-Makefile
4519 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
4520 ;; names in the tarball. Try removing this for future versions.
4521 (substitute* "Makefile.in"
4522 (("README\\.md ChangeLog TODO AUTHORS")
4523 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
4525 ;; TODO: opencv for additional face detection filters.
4530 (home-page "https://www.dyne.org/software/frei0r/")
4531 (synopsis "Minimalistic plugin API for video effects")
4533 "Frei0r is a minimalistic plugin API for video effects.
4534 The main emphasis is on simplicity for an API that will round up
4535 the most common video effects into simple filters, sources and
4536 mixers that can be controlled by parameters. Frei0r wants to
4537 provide a way to share these simple effects between many
4538 applications, avoiding their reimplementation by different projects.
4539 It counts more than 100 plugins.")
4540 (license (list license:gpl2+
4541 ;; The following files are licensed as LGPL2.1+:
4542 ;; src/generator/ising0r/ising0r.c
4543 ;; src/generator/onecol0r/onecol0r.cpp
4544 ;; src/generator/nois0r/nois0r.cpp
4545 ;; src/generator/lissajous0r/lissajous0r.cpp
4546 ;; src/filter/ndvi/gradientlut.hpp
4547 ;; src/filter/ndvi/ndvi.cpp
4548 ;; src/filter/facedetect/facedetect.cpp
4549 license:lgpl2.1+))))
4551 (define-public motion
4555 (home-page "https://motion-project.github.io/")
4559 (url "https://github.com/Motion-Project/motion")
4560 (commit (string-append "release-" version))))
4563 "09xs815jsivcilpmnrx2jkcxirj4lg5kp99fkr0p2sdxw03myi95"))
4564 (file-name (git-file-name name version))))
4565 (build-system gnu-build-system)
4567 `(("autoconf" ,autoconf)
4568 ("automake" ,automake)
4569 ("gettext" ,gettext-minimal)
4570 ("pkg-config" ,pkg-config)))
4572 `(("libjpeg" ,libjpeg-turbo)
4574 ("libmicrohttpd" ,libmicrohttpd)
4575 ("sqlite" ,sqlite)))
4577 '(#:phases (modify-phases %standard-phases
4580 (patch-shebang "scripts/version.sh")
4581 (invoke "autoreconf" "-vfi"))))
4582 #:configure-flags '("--sysconfdir=/etc")
4583 #:make-flags (list (string-append "sysconfdir="
4584 (assoc-ref %outputs "out")
4587 #:tests? #f)) ; no 'check' target
4588 (synopsis "Detect motion from video signals")
4590 "Motion is a program that monitors the video signal from one or more
4591 cameras and is able to detect if a significant part of the picture has
4592 changed. Or in other words, it can detect motion.")
4594 ;; Some files say "version 2" and others "version 2 or later".
4595 (license license:gpl2)))
4597 (define-public subdl
4598 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4602 (version (git-version "1.0.3" revision commit))
4606 (url "https://github.com/alexanderwink/subdl")
4608 (file-name (git-file-name name version))
4611 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4612 (build-system trivial-build-system)
4614 `(#:modules ((guix build utils))
4616 (use-modules (guix build utils))
4617 (let* ((out (assoc-ref %outputs "out"))
4618 (bin (string-append out "/bin"))
4619 (source (assoc-ref %build-inputs "source"))
4620 (python (assoc-ref %build-inputs "python")))
4621 (install-file (string-append source "/subdl") bin)
4622 (patch-shebang (string-append bin "/subdl")
4623 (list (string-append python "/bin")))))))
4624 (inputs (list python))
4625 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4626 (description "Subdl is a command-line tool for downloading subtitles from
4627 opensubtitles.org. By default, it will search for English subtitles, display
4628 the results, download the highest-rated result in the requested language and
4629 save it to the appropriate filename.")
4630 (license license:gpl3+)
4631 (home-page "https://github.com/alexanderwink/subdl"))))
4633 (define-public l-smash
4640 (url "https://github.com/l-smash/l-smash")
4641 (commit (string-append "v" version))))
4642 (file-name (git-file-name name version))
4645 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4646 (build-system gnu-build-system)
4648 `(#:tests? #f ;no tests
4650 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4651 (assoc-ref %outputs "out") "/lib"))
4653 (modify-phases %standard-phases
4654 ;; configure fails if it is followed by CONFIG_SHELL
4656 (lambda* (#:key outputs #:allow-other-keys)
4657 (let ((out (assoc-ref outputs "out")))
4658 (invoke "./configure" (string-append "--prefix=" out)
4659 "--disable-static")))))))
4662 (home-page "https://l-smash.github.io/l-smash/")
4663 (synopsis "MP4 multiplexer and demultiplexer library")
4665 "L-SMASH is a cross-platform library that handles the ISO base media file
4666 format and some of its derived file formats, including MP4. It operates as a
4667 multiplexer and demultiplexer, and can mux video and audio in several formats
4668 using standalone executable files.")
4669 (license license:isc)))
4671 (define-public qtfaststart
4673 (name "qtfaststart")
4677 (uri (pypi-uri "qtfaststart" version))
4680 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4681 (build-system python-build-system)
4683 '(#:tests? #f)) ; no test suite
4684 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4685 (description "qtfaststart enables streaming and pseudo-streaming of
4686 QuickTime and MP4 files by moving metadata and offset information to the
4687 beginning of the file. It can also print some useful information about the
4688 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4689 project, which is released into the public domain, as well as ISO 14496-12:2005
4690 (the official spec for MP4), which can be obtained from the ISO or found
4692 (home-page "https://github.com/danielgtaylor/qtfaststart")
4693 (license license:expat)))
4695 (define-public vidstab
4696 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4700 (version (git-version "1.1.0" revision commit))
4704 (url "https://github.com/georgmartius/vid.stab")
4706 (file-name (git-file-name name version))
4709 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4710 (build-system cmake-build-system)
4712 '(#:tests? #f)) ; tests are not run as part of standard build process
4713 (home-page "http://public.hronopik.de/vid.stab/")
4714 (synopsis "Video stabilization library")
4715 (description "Vidstab is a video stabilization library which can be used
4716 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4717 vehicle typically suffers from undesirable shakes and jitters. Activities such
4718 as surfing, skiing, riding and walking while shooting videos are especially
4719 prone to erratic camera shakes. Vidstab targets these video contents to help
4720 create smoother and stable videos.")
4721 (license license:gpl2+))))
4723 (define-public libopenshot
4725 (name "libopenshot")
4730 (url "https://github.com/OpenShot/libopenshot")
4731 (commit (string-append "v" version))))
4732 (file-name (git-file-name name version))
4735 "0i9bsn8gklm1mvj60l3d3xrxdgy8svpxjfqcwsr308j5zjn30pv8"))
4736 (modules '((guix build utils)))
4738 ;; Allow overriding of the python installation dir
4739 (substitute* "bindings/python/CMakeLists.txt"
4740 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4741 (string-append set " CACHE PATH "
4742 "\"Python bindings directory\")")))
4743 (delete-file-recursively "thirdparty")
4745 (build-system cmake-build-system)
4747 `(("pkg-config" ,pkg-config)
4750 ("unittest++" ,unittest-cpp)))
4752 (list alsa-lib zlib))
4753 (propagated-inputs ;all referenced in installed headers
4764 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4765 ,(version-major+minor (package-version python))
4767 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4769 (modify-phases %standard-phases
4770 (add-before 'configure 'set-vars
4771 (lambda* (#:key inputs #:allow-other-keys)
4772 (setenv "LIBOPENSHOT_AUDIO_DIR"
4773 (assoc-ref inputs "libopenshot-audio"))
4775 (assoc-ref inputs "zeromq"))
4776 (setenv "UNITTEST_DIR"
4777 (search-input-directory inputs
4778 "include/UnitTest++")))))))
4779 (home-page "https://openshot.org")
4780 (synopsis "Video-editing, animation, and playback library")
4781 (description "OpenShot Library (libopenshot) is a powerful C++ video
4782 editing library with a multi-threaded and feature rich video editing
4783 API. It includes bindings for Python, Ruby, and other languages.")
4784 (license license:lgpl3+)))
4786 (define-public openshot
4793 (url "https://github.com/OpenShot/openshot-qt")
4794 (commit (string-append "v" version))))
4795 (file-name (git-file-name name version))
4798 "0pa8iwl217503bjlqg2zlrw5lxyq5hvxrf5apxrh3843hj1w1myv"))
4799 (modules '((guix build utils)))
4802 ;; TODO: Unbundle jquery and others from src/timeline/media
4803 (delete-file-recursively "src/images/fonts") #t))))
4804 (build-system python-build-system)
4815 `(#:modules ((guix build python-build-system)
4816 (guix build qt-utils)
4818 #:imported-modules (,@%python-build-system-modules
4819 (guix build qt-utils))
4820 #:phases (modify-phases %standard-phases
4821 (delete 'build) ;install phase does all the work
4823 (lambda* (#:key tests? #:allow-other-keys)
4825 (setenv "QT_QPA_PLATFORM" "offscreen")
4826 (invoke "python" "src/tests/query_tests.py"))))
4827 (add-after 'unpack 'patch-font-location
4828 (lambda* (#:key inputs #:allow-other-keys)
4829 (let ((font (assoc-ref inputs "font-dejavu")))
4830 (substitute* "src/classes/app.py"
4831 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4832 (("fonts") "share/fonts/truetype")
4833 (("[A-Za-z_-]+.ttf") "DejaVuSans.ttf")))
4835 ;; https://github.com/OpenShot/openshot-qt/issues/4502
4836 (add-before 'ensure-no-mtimes-pre-1980 'fix-symbolic-link
4838 (delete-file "images/Humanity/actions/custom/razor_line_with_razor.png")
4839 (symlink "../../../../src/timeline/media/images/razor_line_with_razor.png"
4840 "images/Humanity/actions/custom/razor_line_with_razor.png")))
4841 (add-before 'install 'set-tmp-home
4843 ;; src/classes/info.py "needs" to create several
4844 ;; directories in $HOME when loaded during build
4845 (setenv "HOME" "/tmp")
4847 (add-after 'install 'wrap-program
4848 (lambda* (#:key outputs inputs #:allow-other-keys)
4849 (let ((out (assoc-ref outputs "out")))
4850 (wrap-qt-program "openshot-qt"
4851 #:output out #:inputs inputs))
4853 (home-page "https://www.openshot.org/")
4854 (synopsis "Video editor")
4855 (description "OpenShot takes your videos, photos, and music files and
4856 helps you create the film you have always dreamed of. Easily add sub-titles,
4857 transitions, and effects and then export your film to many common formats.")
4858 (license license:gpl3+)))
4860 (define-public shotcut
4863 (version "22.01.30")
4868 (url "https://github.com/mltframework/shotcut")
4869 (commit (string-append "v" version))))
4870 (file-name (git-file-name name version))
4872 (base32 "0azbzaml743vlpay5dz8i0k66hw4idnambi49wj2yprw7z3skdql"))))
4873 (build-system qt-build-system)
4875 `(#:tests? #f ;there are no tests
4877 (modify-phases %standard-phases
4878 (add-after 'unpack 'patch-executable-paths
4879 (lambda* (#:key inputs #:allow-other-keys)
4880 ;; Shotcut expects ffmpeg and melt executables in the shotcut
4881 ;; directory. Use full store paths.
4882 (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
4883 (mlt (assoc-ref inputs "mlt")))
4884 (substitute* "src/jobs/ffmpegjob.cpp"
4885 (("\"ffmpeg\"") (string-append "\"" ffmpeg "/bin/ffmpeg\"")))
4886 (substitute* "src/jobs/meltjob.cpp"
4887 (("\"melt\"") (string-append "\"" mlt "/bin/melt\""))
4888 (("\"melt-7\"") (string-append "\"" mlt "/bin/melt-7\""))))))
4890 (lambda* (#:key outputs #:allow-other-keys)
4891 (let* ((out (assoc-ref outputs "out")))
4893 (string-append "PREFIX=" out)
4894 "QMAKE_LRELEASE=lrelease"
4895 "QMAKE_LUPDATE=lupdate"
4897 (add-after 'install 'wrap-executable
4898 (lambda* (#:key inputs outputs #:allow-other-keys)
4899 (let* ((out (assoc-ref outputs "out"))
4900 (frei0r (assoc-ref inputs "frei0r-plugins"))
4901 (jack (assoc-ref inputs "jack"))
4902 (ladspa (assoc-ref inputs "ladspa"))
4903 (mlt (assoc-ref inputs "mlt"))
4904 (sdl2 (assoc-ref inputs "sdl2")))
4905 (wrap-program (string-append out "/bin/shotcut")
4906 `("FREI0R_PATH" ":" =
4907 (,(string-append frei0r "/lib/frei0r-1")))
4908 `("LADSPA_PATH" ":" =
4909 (,(string-append ladspa "/lib/ladspa")))
4910 `("LD_LIBRARY_PATH" ":" prefix
4911 ,(list (string-append jack "/lib" ":" sdl2 "/lib")))
4913 ,(list (string-append mlt "/bin"))))))))))
4915 `(("pkg-config" ,pkg-config)
4916 ("python-wrapper" ,python-wrapper)
4917 ("qttools" ,qttools)))
4940 (home-page "https://www.shotcut.org/")
4941 (synopsis "Video editor built on the MLT framework")
4943 "Shotcut is a video editor built on the MLT framework. Features include
4944 a wide range of formats through @code{ffmpeg}, 4k resolution support, webcam
4945 and audio capture, network stream playback, and many more.")
4946 (license license:gpl3+)))
4948 (define-public dav1d
4956 (url "https://code.videolan.org/videolan/dav1d.git")
4958 (file-name (git-file-name name version))
4960 (base32 "0bkps488h9s15ylvkm4fmfywgrpbw570glawpnv6khpq9n223dzl"))))
4961 (build-system meson-build-system)
4962 (native-inputs (list nasm))
4963 (home-page "https://code.videolan.org/videolan/dav1d")
4964 (synopsis "AV1 decoder")
4965 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4966 speed and correctness.")
4967 (license license:bsd-2)))
4969 (define-public wlstream
4970 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4974 (version (git-version "0.0" revision commit))
4979 (url "https://github.com/atomnuker/wlstream")
4981 (file-name (git-file-name name version))
4984 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
4985 (build-system meson-build-system)
4986 (native-inputs (list libdrm pkg-config))
4987 (inputs (list ffmpeg pulseaudio wayland wayland-protocols))
4988 (home-page "https://github.com/atomnuker/wlstream")
4989 (synopsis "Screen capture tool for Wayland sessions")
4990 (description "Wlstream is a screen capture tool for recording audio and
4991 video from a Wayland session.")
4992 (license license:lgpl2.1+))))
4994 (define-public gaupol
5001 (url "https://github.com/otsaloma/gaupol/")
5003 (file-name (git-file-name name version))
5006 "1mmjg8nwhif2hmmp8i11643izwzdf839brqdai3ksfg0qkh8rnxk"))))
5007 (build-system python-build-system)
5009 `(("gettext" ,gettext-minimal)
5010 ("pkg-config" ,pkg-config)))
5012 (list python-pygobject
5014 python-pycairo ; Required or else clicking on a subtitle line fails.
5015 python-chardet ; Optional: Character encoding detection.
5016 gtkspell3 ; Optional: Inline spell-checking.
5017 iso-codes ; Optional: Translations.
5025 `(#:tests? #f ; Tests seem to require networking.
5027 (modify-phases %standard-phases
5028 (add-after 'unpack 'disable-builtin-byte-compilation
5030 ;; The setup.py script attempts to compile bytecode and fails.
5031 ;; We compile bytecode in a separate phase, so just disable it.
5032 (substitute* "setup.py"
5033 (("distutils\\.util\\.byte_compile\\(.*")
5035 ;; gaupol's setup.py script does not support one of the Python build
5036 ;; system's default flags, "--single-version-externally-managed".
5038 (lambda* (#:key outputs #:allow-other-keys)
5039 (invoke "python" "setup.py" "install"
5040 (string-append "--prefix=" (assoc-ref outputs "out"))
5042 (add-after 'install 'wrap-gaupol
5043 (lambda* (#:key outputs #:allow-other-keys)
5044 (let ((out (assoc-ref outputs "out"))
5045 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
5046 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
5047 (wrap-program (string-append out "/bin/gaupol")
5048 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
5049 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
5050 (add-after 'unpack 'patch-data-dir
5051 ;; Fix some path variables that setup.py seems to garble.
5052 (lambda* (#:key outputs #:allow-other-keys)
5053 (let ((out (assoc-ref outputs "out")))
5054 (substitute* "setup.py"
5055 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
5056 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
5057 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
5058 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))))))))
5059 (synopsis "Editor for text-based subtitles")
5061 "Gaupol supports multiple subtitle file formats and provides means of
5062 creating subtitles, editing texts and timing subtitles to match video. The
5063 user interface features a builtin video player and is designed with attention
5064 to convenience of translating and batch processing of multiple documents.")
5065 (home-page "https://otsaloma.io/gaupol/")
5066 (license license:gpl3+)))
5068 (define-public theorafile
5069 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
5072 (version (git-version "0.0.0" "1" commit))
5077 (url "https://github.com/FNA-XNA/Theorafile")
5079 (file-name (git-file-name name version))
5081 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
5082 (build-system gnu-build-system)
5084 '(#:make-flags '("CC=gcc")
5086 (modify-phases %standard-phases
5091 (invoke "make" "test")))
5093 (lambda* (#:key outputs #:allow-other-keys)
5094 (let ((out (assoc-ref outputs "out")))
5095 (install-file "libtheorafile.so" (string-append out "/lib"))
5096 (install-file "theorafile.h" (string-append out "/include")))
5101 (home-page "https://github.com/FNA-XNA/Theorafile")
5102 (synopsis "Ogg Theora Video Decoder Library")
5103 (description "Theorafile is a library for quickly and easily decoding Ogg
5104 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
5105 (license license:zlib))))
5107 (define-public dvdbackup
5114 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
5115 "dvdbackup-" version "/"
5116 "dvdbackup-" version ".tar.xz"))
5118 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
5119 (build-system gnu-build-system)
5121 (list libdvdcss libdvdread))
5122 (home-page "http://dvdbackup.sourceforge.net")
5123 (synopsis "DVD video ripper")
5125 "A simple command line tool to backup video from a DVD. Decrypts the
5126 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
5127 transcode or reformat the videos in any way, producing perfect backups.")
5128 (license license:gpl3+)))
5130 (define-public svt-av1
5138 (url "https://gitlab.com/AOMediaCodec/SVT-AV1.git")
5139 (commit (string-append "v" version))))
5140 (file-name (git-file-name name version))
5142 (base32 "02fchq2vlxcxzbrss72xl9vrxzysdy39d5i159bmg3qa45ngd2iw"))))
5143 (build-system cmake-build-system)
5144 ;; SVT-AV1 only supports 64-bit Intel-compatible CPUs.
5145 (supported-systems '("x86_64-linux"))
5147 ;; The test suite tries to download test data and git clone a 3rd-party
5148 ;; fork of libaom. Skip it.
5151 (modify-phases %standard-phases
5152 (add-after 'install 'install-documentation
5153 (lambda* (#:key outputs #:allow-other-keys)
5154 (let* ((out (assoc-ref %outputs "out"))
5155 (doc (string-append out "/share/doc/svt-av1-" ,version)))
5156 (copy-recursively "../source/Docs" doc)
5160 (synopsis "AV1 video codec")
5161 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
5162 work-in-progress, aiming to support video-on-demand and live streaming
5163 applications. It only supports Intel-compatible CPUs (x86).")
5164 (home-page "https://gitlab.com/AOMediaCodec/SVT-AV1")
5165 (license license:bsd-2)))
5167 (define-public svt-vp9
5174 (url "https://github.com/OpenVisualCloud/SVT-VP9")
5175 (commit (string-append "v" version))))
5176 (file-name (git-file-name name version))
5179 "1ypdiw4cq22llvm8jyszxdq6r1aydkj80dsxjarjn5b7c1f2q3ar"))))
5180 ;; SVT-VP9 only supports 64-bit Intel-compatible CPUs.
5181 (supported-systems '("x86_64-linux"))
5182 (build-system cmake-build-system)
5184 `(#:tests? #f ; No test suite
5186 (modify-phases %standard-phases
5187 (add-after 'install 'install-documentation
5188 (lambda* (#:key outputs #:allow-other-keys)
5189 (let* ((out (assoc-ref %outputs "out"))
5190 (doc (string-append out "/share/doc/" ,name "-" ,version)))
5191 (copy-recursively "../source/Docs" doc)
5195 (home-page "https://github.com/OpenVisualCloud/SVT-VP9")
5196 (synopsis "VP9 video encoder")
5197 (description "SVT-VP9 is a VP9 video encoder implementation. It is focused
5198 on supporting video-on-demand and live encoding on Intel Xeon processors.")
5199 (license license:bsd-2)))
5201 (define-public w-scan
5204 (version "20170107")
5208 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
5209 version ".tar.bz2"))
5211 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
5212 (build-system gnu-build-system)
5214 `(#:configure-flags '("CFLAGS=-O2 -g -fcommon")))
5215 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
5217 "This is a small command line utility used to perform frequency scans for
5218 DVB and ATSC transmissions without initial tuning data. It can print the
5219 result in several formats:
5221 @item VDR channels.conf,
5222 @item czap/tzap/xine/mplayer channels.conf,
5223 @item Gstreamer dvbsrc plugin,
5224 @item VLC xspf playlist,
5226 @item initial tuning data for scan or dvbv5-scan.
5228 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
5229 (license license:gpl2+)))
5231 ;;; XXX: This crate is used only for rav1e and can be removed once the latter
5232 ;;; is updated. See <https://issues.guix.gnu.org/52837>.
5233 (define rust-dav1d-sys-0.3.2
5235 (name "rust-dav1d-sys")
5240 (uri (crate-uri "dav1d-sys" version))
5242 (string-append name "-" version ".tar.gz"))
5244 (base32 "1jdxhnlxcml6jd67lx78ifzkn1xm18zfk4li7vjdh3fa61i073kx"))))
5245 (build-system cargo-build-system)
5248 (("rust-bindgen" ,rust-bindgen-0.54)
5249 ("rust-metadeps" ,rust-metadeps-1))))
5253 (list dav1d clang llvm))
5254 (home-page "https://github.com/rust-av/dav1d-rs")
5255 (synopsis "FFI bindings to dav1d")
5256 (description "This package provides FFI bindings to dav1d.")
5257 (license license:expat)))
5259 (define-public rav1e
5266 (uri (crate-uri "rav1e" version))
5268 (string-append name "-" version ".tar.gz"))
5271 "006bfcmjwg0phg8gc25b1sl2ngjrb2bh1b3fd0s5gbf9nlkr8qsn"))))
5272 (build-system cargo-build-system)
5274 `(;; Strip the '--release' flag to work around the doctest failures with
5275 ;; Rust 1.57 (see: https://github.com/xiph/rav1e/issues/2851).
5276 #:cargo-test-flags '()
5278 (("rust-aom-sys" ,rust-aom-sys-0.3)
5279 ("rust-arbitrary" ,rust-arbitrary-0.4)
5280 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
5281 ("rust-arrayvec" ,rust-arrayvec-0.7)
5282 ("rust-av-metrics" ,rust-av-metrics-0.7)
5283 ("rust-backtrace" ,rust-backtrace-0.3)
5284 ("rust-bitstream-io" ,rust-bitstream-io-1)
5285 ("rust-byteorder" ,rust-byteorder-1)
5286 ("rust-cfg-if" ,rust-cfg-if-1)
5287 ("rust-clap" ,rust-clap-2)
5288 ("rust-console" ,rust-console-0.14)
5289 ("rust-crossbeam" ,rust-crossbeam-0.8)
5290 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
5291 ("rust-fern" ,rust-fern-0.6)
5292 ("rust-image" ,rust-image-0.23)
5293 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5294 ("rust-itertools" ,rust-itertools-0.10)
5295 ("rust-ivf" ,rust-ivf-0.1)
5296 ("rust-libc" ,rust-libc-0.2)
5297 ("rust-libfuzzer-sys" ,rust-libfuzzer-sys-0.3)
5298 ("rust-log" ,rust-log-0.4)
5299 ("rust-nasm-rs" ,rust-nasm-rs-0.2)
5300 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.3)
5301 ("rust-num-derive" ,rust-num-derive-0.3)
5302 ("rust-num-traits" ,rust-num-traits-0.2)
5303 ("rust-paste" ,rust-paste-1)
5304 ("rust-rand" ,rust-rand-0.8)
5305 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5306 ("rust-rayon" ,rust-rayon-1)
5307 ("rust-regex" ,rust-regex-1)
5308 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
5309 ("rust-rustc-version" ,rust-rustc-version-0.4)
5310 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
5311 ("rust-serde" ,rust-serde-1)
5312 ("rust-signal-hook" ,rust-signal-hook-0.3)
5313 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
5314 ("rust-thiserror" ,rust-thiserror-1)
5315 ("rust-toml" ,rust-toml-0.5)
5316 ("rust-v-frame" ,rust-v-frame-0.2)
5317 ("rust-vergen" ,rust-vergen-3)
5318 ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2)
5319 ("rust-y4m" ,rust-y4m-0.7))
5320 #:cargo-development-inputs
5321 (("rust-assert-cmd" ,rust-assert-cmd-2)
5322 ("rust-cc" ,rust-cc-1)
5323 ("rust-criterion" ,rust-criterion-0.3)
5324 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
5325 ("rust-pretty-assertions" ,rust-pretty-assertions-0.7)
5326 ("rust-rand" ,rust-rand-0.8)
5327 ("rust-rand-chacha" ,rust-rand-chacha-0.3)
5328 ("rust-semver" ,rust-semver-1))
5330 (modify-phases %standard-phases
5331 (add-after 'unpack 'relax-versions
5333 (substitute* "Cargo.toml"
5334 ;; Allow using more recent versions of
5335 (("~3.1.2") "~3"))))
5337 (lambda* (#:key outputs #:allow-other-keys)
5338 (let ((out (assoc-ref outputs "out")))
5339 (invoke "cargo" "cinstall" "--release"
5340 (string-append "--prefix=" out)))))
5341 (add-after 'install 'delete-static-library
5342 (lambda* (#:key outputs #:allow-other-keys)
5343 ;; Delete 80 MiB (!) static library.
5344 (delete-file (string-append (assoc-ref outputs "out")
5345 "/lib/librav1e.a")))))))
5347 (list rust-cargo-c nasm))
5348 (home-page "https://github.com/xiph/rav1e/")
5349 (synopsis "Fast and safe AV1 encoder")
5350 (description "@code{rav1e} is an AV1 video encoder. It is designed to
5351 eventually cover all use cases, though in its current form it is most suitable
5352 for cases where libaom (the reference encoder) is too slow.")
5353 (license license:bsd-2)))
5363 (url "https://github.com/phw/peek")
5365 (file-name (git-file-name name version))
5367 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
5368 (build-system meson-build-system)
5369 (arguments '(#:glib-or-gtk? #t))
5372 ("python" ,python-wrapper)))
5374 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
5375 ("gettext" ,gettext-minimal)
5376 ("glib:bin" ,glib "bin") ; for glib-compile-resources
5377 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
5378 ("pkg-config" ,pkg-config)
5380 (home-page "https://github.com/phw/peek")
5381 (synopsis "Simple animated GIF screen recorder")
5383 "Peek makes it easy to create short screencasts of a screen area. It was
5384 built for the specific use case of recording screen areas, e.g. for easily
5385 showing UI features of your own apps or for showing a bug in bug reports.
5386 With Peek, you simply place the Peek window over the area you want to record
5387 and press \"Record\". Peek is optimized for generating animated GIFs, but you
5388 can also directly record to WebM or MP4 if you prefer.")
5389 (license license:gpl3+)))
5391 (define-public wf-recorder
5393 (name "wf-recorder")
5398 (url "https://github.com/ammen99/wf-recorder")
5399 (commit (string-append "v" version))))
5400 (file-name (git-file-name name version))
5403 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
5404 (build-system meson-build-system)
5408 (list ffmpeg pulseaudio wayland wayland-protocols libx264))
5409 (home-page "https://github.com/ammen99/wf-recorder")
5410 (synopsis "Screen recorder for wlroots-based compositors")
5412 "@code{wf-recorder} is a utility program for screen recording of
5413 wlroots-based compositors. More specifically, those that support
5414 @code{wlr-screencopy-v1} and @code{xdg-output}.")
5415 (license license:expat)))
5417 (define-public guvcview
5423 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
5424 "src-" version ".tar.gz"))
5427 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
5428 (build-system gnu-build-system)
5430 ;; There are no tests and "make check" would fail on an intltool error.
5433 (list pkg-config intltool))
5439 ffmpeg ;libavcodec, libavutil
5444 (home-page "http://guvcview.sourceforge.net/")
5445 (synopsis "Control your webcam and capture videos and images")
5447 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
5448 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
5449 It provides control over precise settings of the webcam such as exposure,
5450 brightness, contrast, and frame rate.")
5452 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
5453 (license license:gpl2+)))
5455 (define-public get-iplayer
5457 (name "get-iplayer")
5463 (url "https://github.com/get-iplayer/get_iplayer")
5464 (commit (string-append "v" version))))
5465 (file-name (git-file-name name version))
5467 (base32 "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi"))))
5468 (build-system perl-build-system)
5470 `(#:tests? #f ; no tests
5472 (modify-phases %standard-phases
5476 (lambda* (#:key outputs #:allow-other-keys)
5477 (let* ((out (assoc-ref outputs "out"))
5478 (bin (string-append out "/bin"))
5479 (man (string-append out "/share/man/man1")))
5480 (install-file "get_iplayer" bin)
5481 (install-file "get_iplayer.cgi" bin)
5482 (install-file "get_iplayer.1" man))
5484 (add-after 'install 'wrap-program
5485 (lambda* (#:key inputs outputs #:allow-other-keys)
5486 (let* ((out (assoc-ref outputs "out"))
5487 (perllib (string-append out "/lib/perl5/site_perl/"
5488 ,(package-version perl))))
5489 (wrap-program (string-append out "/bin/get_iplayer")
5491 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5492 (wrap-program (string-append out "/bin/get_iplayer.cgi")
5494 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
5497 (list perl-mojolicious perl-lwp-protocol-https perl-xml-libxml))
5498 (home-page "https://github.com/get-iplayer/get_iplayer")
5499 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
5500 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
5501 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
5502 @code{get_iplayer} has three modes: recording a complete programme for later
5503 playback, streaming a programme directly to a playback application, such as
5504 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
5505 terms and recording programmes automatically. It can also stream or record live
5506 BBC iPlayer output.")
5507 (license license:gpl3+)))
5509 (define-public ogmtools
5515 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
5520 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
5521 (build-system gnu-build-system)
5523 (list libvorbis libdvdread))
5524 (synopsis "Information, extraction or creation for OGG media streams")
5526 "These tools allow information about (@code{ogminfo}) or extraction from
5527 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
5528 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
5529 (license license:gpl2)
5530 (home-page "https://www.bunkus.org/videotools/ogmtools/")))
5532 (define-public libcaption
5539 (url "https://github.com/szatmary/libcaption")
5541 (file-name (git-file-name name version))
5544 "16mhw8wpl7wdjj4n7rd1c294p1r8r322plj7z91crla5aah726rq"))))
5545 (build-system cmake-build-system)
5547 `(#:tests? #f ; Cannot figure out how to run the unit tests
5548 #:configure-flags '("-DENABLE_RE2C=ON")))
5551 (synopsis "CEA608 / CEA708 closed-caption codec")
5552 (description "Libcaption creates and parses closed-caption data,
5553 providing an encoder / decoder for the EIA608 and CEA708 closed-caption
5556 608 support is currently limited to encoding and decoding the necessary control
5557 and preamble codes as well as support for the Basic North American, Special
5558 North American and Extended Western European character sets.
5560 708 support is limited to encoding the 608 data in NTSC field 1 user data type
5563 In addition, utility functions to create h.264 SEI (Supplementary enhancement
5564 information) NALUs (Network Abstraction Layer Unit) for inclusion into an h.264
5565 elementary stream are provided.")
5566 (home-page "https://github.com/szatmary/libcaption")
5567 (license license:expat)))
5569 (define-public video-contact-sheet
5571 (name "video-contact-sheet")
5575 (uri (string-append "http://p.outlyer.net/vcs/files/vcs-" version
5579 "0jsl93r0rnybjcipqbww5hwsr9ln6kz1qnf32qfxdvhfw52n27fw"))))
5580 (build-system gnu-build-system)
5584 #~(list (string-append "prefix=" #$output))
5586 #~(modify-phases %standard-phases
5590 (add-after 'install 'wrap-program
5592 (wrap-program (string-append #$output "/bin/vcs")
5595 (string-append dir "/bin"))
5596 (list #$(this-package-input "ffmpeg")
5597 #$(this-package-input "imagemagick"))))))))))
5599 (list bash-minimal ffmpeg imagemagick))
5600 (synopsis "Create contact sheets (preview images) from videos")
5601 (description "@acronym{VCS, Video Contact Sheet} is a Bash script meant to
5602 create video contact sheets (previews) of videos. Any video supported by
5603 MPlayer and FFmpeg can be used. A note of warning: Unlike most similar tools
5604 VCS, by default, makes screenshots the same size as the video, see the manual
5605 for details on how to change this.")
5606 (home-page "http://p.outlyer.net/vcs/")
5607 (license license:lgpl2.1+)))