gnu: fontconfig: Add replacement with font-dejavu instead of gs-fonts.
[jackhill/guix/guix.git] / gnu / packages / video.scm
CommitLineData
39efcc9b 1;;; GNU Guix --- Functional package management for GNU
71ee51a0 2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
945d985a 3;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
76277052 4;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
954b4c73 6;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
d4f86c8b 8;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
28cbf65c 9;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
2b841707 10;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
3c8ba11a 11;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
ed6ba9cc 12;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
4df07622 13;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
3c986a7d 14;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
adff7395 15;;; Copyright © 2016, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
590abe01 16;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
72fa6667 17;;; Copyright © 2017 Feng Shu <tumashu@163.com>
1aab0332 18;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
794223bc 19;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
b5b20bda 20;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
e0c40707 21;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
eb88e2c1 22;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
2973ebf5 23;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
394207c1 24;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
e21f3473 25;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
c0fe2e1f 26;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
97115892 27;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
554f5b62 28;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
dcfa0acd 29;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
0c85d2c6 30;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
18e56ad7 31;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
e7cdd311
MM
32;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
548642db 34;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
04b6e9c5 35;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
a7afa454 36;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
b9d8aa09 37;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
67f9f578 38;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
567a1453 39;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
4233e74b 40;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
2f095261 41;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
618819aa 42;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
58a361fe 43;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
39efcc9b
AE
44;;;
45;;; This file is part of GNU Guix.
46;;;
47;;; GNU Guix is free software; you can redistribute it and/or modify it
48;;; under the terms of the GNU General Public License as published by
49;;; the Free Software Foundation; either version 3 of the License, or (at
50;;; your option) any later version.
51;;;
52;;; GNU Guix is distributed in the hope that it will be useful, but
53;;; WITHOUT ANY WARRANTY; without even the implied warranty of
54;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55;;; GNU General Public License for more details.
56;;;
57;;; You should have received a copy of the GNU General Public License
58;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
59
60(define-module (gnu packages video)
fe138965 61 #:use-module (ice-9 match)
08858812 62 #:use-module (srfi srfi-1)
2b94c14c 63 #:use-module (srfi srfi-26)
ae0bdd81 64 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 65 #:use-module (guix utils)
39efcc9b
AE
66 #:use-module (guix packages)
67 #:use-module (guix download)
38829eac 68 #:use-module (guix git-download)
d8841cc5 69 #:use-module (guix svn-download)
ca4b5588 70 #:use-module (guix build-system cargo)
44726031 71 #:use-module (guix build-system cmake)
2a844af9 72 #:use-module (guix build-system copy)
39efcc9b 73 #:use-module (guix build-system gnu)
0e74bb5b 74 #:use-module (guix build-system glib-or-gtk)
635f981b 75 #:use-module (guix build-system meson)
6f45e45d 76 #:use-module (guix build-system perl)
615215a5 77 #:use-module (guix build-system python)
1c1178cd 78 #:use-module (guix build-system waf)
f27f264e 79 #:use-module (guix build-system trivial)
3b02429c 80 #:use-module (gnu packages)
39efcc9b 81 #:use-module (gnu packages algebra)
4fbcfc14 82 #:use-module (gnu packages assembly)
72bfebf5 83 #:use-module (gnu packages audio)
f1044010 84 #:use-module (gnu packages autotools)
d5a748e8 85 #:use-module (gnu packages avahi)
76277052 86 #:use-module (gnu packages backup)
38829eac 87 #:use-module (gnu packages base)
8dd6fc51 88 #:use-module (gnu packages bison)
2973ebf5 89 #:use-module (gnu packages boost)
d5a748e8 90 #:use-module (gnu packages cdrom)
2973ebf5 91 #:use-module (gnu packages check)
fe047e13 92 #:use-module (gnu packages cmake)
39efcc9b 93 #:use-module (gnu packages compression)
e0c40707 94 #:use-module (gnu packages cpp)
ca4b5588 95 #:use-module (gnu packages crates-io)
f464016d 96 #:use-module (gnu packages curl)
3a44c7bb 97 #:use-module (gnu packages dejagnu)
78d112c2 98 #:use-module (gnu packages dns)
2973ebf5 99 #:use-module (gnu packages docbook)
e37bdc0f 100 #:use-module (gnu packages documentation)
f22e0e26 101 #:use-module (gnu packages elf)
2973ebf5 102 #:use-module (gnu packages file)
8dd6fc51 103 #:use-module (gnu packages flex)
2afb7939 104 #:use-module (gnu packages fonts)
39efcc9b 105 #:use-module (gnu packages fontutils)
c161c22a 106 #:use-module (gnu packages freedesktop)
44726031
AE
107 #:use-module (gnu packages fribidi)
108 #:use-module (gnu packages gettext)
38829eac 109 #:use-module (gnu packages ghostscript)
d5a748e8
AE
110 #:use-module (gnu packages gl)
111 #:use-module (gnu packages glib)
2cd85cf9 112 #:use-module (gnu packages guile)
fe047e13 113 #:use-module (gnu packages gnome)
c3069cd1 114 #:use-module (gnu packages gnunet)
d5a748e8 115 #:use-module (gnu packages gnupg)
fe047e13 116 #:use-module (gnu packages gstreamer)
44726031 117 #:use-module (gnu packages gtk)
e55354b8 118 #:use-module (gnu packages image)
b5b20bda 119 #:use-module (gnu packages imagemagick)
f48feaa2 120 #:use-module (gnu packages iso-codes)
76277052 121 #:use-module (gnu packages libidn)
c812f460 122 #:use-module (gnu packages libreoffice)
d5a748e8
AE
123 #:use-module (gnu packages linux)
124 #:use-module (gnu packages lua)
fe047e13 125 #:use-module (gnu packages m4)
3a44c7bb 126 #:use-module (gnu packages man)
f3395a7b 127 #:use-module (gnu packages markup)
d5a748e8 128 #:use-module (gnu packages mp3)
4d94b93c 129 #:use-module (gnu packages ncurses)
579a9cde 130 #:use-module (gnu packages networking)
6f6c8b65 131 #:use-module (gnu packages ocr)
39efcc9b 132 #:use-module (gnu packages perl)
6c71d56d 133 #:use-module (gnu packages perl-check)
39efcc9b 134 #:use-module (gnu packages pkg-config)
a7d94b54 135 #:use-module (gnu packages popt)
f3395a7b 136 #:use-module (gnu packages pretty-print)
fc2982f7 137 #:use-module (gnu packages protobuf)
d5a748e8 138 #:use-module (gnu packages pulseaudio)
39efcc9b 139 #:use-module (gnu packages python)
f48feaa2 140 #:use-module (gnu packages python-crypto)
589e3f4e 141 #:use-module (gnu packages python-web)
44d10b1f 142 #:use-module (gnu packages python-xyz)
d5a748e8 143 #:use-module (gnu packages qt)
76277052 144 #:use-module (gnu packages rdesktop)
2973ebf5 145 #:use-module (gnu packages ruby)
ca4b5588 146 #:use-module (gnu packages rust-apps)
76277052 147 #:use-module (gnu packages samba)
d5a748e8 148 #:use-module (gnu packages sdl)
2973ebf5
GG
149 #:use-module (gnu packages serialization)
150 #:use-module (gnu packages shells)
cd0322a3 151 #:use-module (gnu packages sqlite)
d5a748e8 152 #:use-module (gnu packages ssh)
579a9cde 153 #:use-module (gnu packages swig)
6b2c6be0 154 #:use-module (gnu packages texinfo)
c426e61e 155 #:use-module (gnu packages textutils)
a7fd7b68 156 #:use-module (gnu packages tls)
1a291593 157 #:use-module (gnu packages time)
76277052 158 #:use-module (gnu packages upnp)
d5a748e8 159 #:use-module (gnu packages version-control)
870541d6 160 #:use-module (gnu packages vulkan)
bb470bd3 161 #:use-module (gnu packages web)
fe047e13 162 #:use-module (gnu packages webkit)
794223bc 163 #:use-module (gnu packages wxwidgets)
ee3b55ea 164 #:use-module (gnu packages xdisorg)
54ff0b7d 165 #:use-module (gnu packages xiph)
d5a748e8 166 #:use-module (gnu packages xml)
4fbcfc14 167 #:use-module (gnu packages xorg))
39efcc9b 168
6b2c6be0
SB
169(define-public aalib
170 (package
171 (name "aalib")
172 (version "1.4rc5")
173 (source (origin
174 (method url-fetch)
de67e922
LF
175 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
176 version "/" name "-" version ".tar.gz"))
6b2c6be0
SB
177 (sha256
178 (base32
179 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
180 (build-system gnu-build-system)
181 (native-inputs
182 `(("makeinfo" ,texinfo)))
183 (inputs
184 `(("ncurses" ,ncurses)))
185 (arguments
c437922a 186 `(#:phases
6b2c6be0 187 (modify-phases %standard-phases
3a4de6b2 188 (replace 'configure
014cbde6 189 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
190 ;; This old `configure' script doesn't support
191 ;; variables passed as arguments.
192 (let ((out (assoc-ref outputs "out"))
193 (ncurses (assoc-ref inputs "ncurses")))
194 (setenv "CONFIG_SHELL" (which "bash"))
3595e83d
MW
195 (invoke "./configure"
196 (string-append "--prefix=" out)
197 (string-append "--build=" build)
198 ;; The ancient config.guess is unable to
199 ;; guess the host triplet on mips64el.
200 ,@(if (string=? "mips64el-linux"
201 (%current-system))
202 '("--host=mips64el-unknown-linux-gnu")
203 '())
204 ;; The same is also true with aarch64.
205 ,@(if (string=? "aarch64-linux"
206 (%current-system))
207 '("--host=aarch64-unknown-linux-gnu")
208 '())
209 (string-append "--with-ncurses="
210 ncurses))))))))
6b2c6be0
SB
211 (home-page "http://aa-project.sourceforge.net/aalib/")
212 (synopsis "ASCII-art library")
213 (description
214 "AA-lib is a low level gfx library which does not require graphics device.
215In fact, there is no graphical output possible. AA-lib replaces those
216old-fashioned output methods with powerful ascii-art renderer.")
217 (license license:lgpl2.0+)))
218
b7f5fa82
TGR
219(define-public celluloid
220 (package
221 (name "celluloid")
ca708858 222 (version "0.19")
b7f5fa82
TGR
223 (source
224 (origin
225 (method url-fetch)
226 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
227 "/download/v" version "/celluloid-" version ".tar.xz"))
228 (sha256
ca708858 229 (base32 "1s3qkism96gi44incvsb6rqg255qcvjvw61ya7nw30md0sapj4sl"))))
b7f5fa82
TGR
230 (build-system glib-or-gtk-build-system)
231 (native-inputs
232 `(("intltool" ,intltool)
233 ("pkg-config" ,pkg-config)))
234 (inputs
235 `(("gtk+" ,gtk+)
236 ("libepoxy" ,libepoxy)
237 ("mpv" ,mpv)))
238 (home-page "https://github.com/celluloid-player/celluloid")
239 (synopsis "GTK+ frontend for the mpv media player")
240 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
241It interacts with mpv via the client API exported by libmpv, allowing access to
242mpv's powerful playback capabilities.")
243 (license license:gpl3+)))
244
cda163cd
TUBK
245(define-public liba52
246 (package
247 (name "liba52")
248 (version "0.7.4")
249 (source (origin
250 (method url-fetch)
8c056935
TUBK
251 (uri (string-append
252 ;; A mirror://sourceforge URI doesn't work, presumably
253 ;; because the SourceForge project is misconfigured.
254 "http://liba52.sourceforge.net/files/a52dec-" version
255 ".tar.gz"))
cda163cd
TUBK
256 (sha256
257 (base32
23da88f6 258 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
259 (patches (search-patches "liba52-enable-pic.patch"
260 "liba52-set-soname.patch"
261 "liba52-use-mtune-not-mcpu.patch"
262 "liba52-link-with-libm.patch"))))
cda163cd 263 (build-system gnu-build-system)
23da88f6
MW
264 ;; XXX We need to run ./bootstrap because of the build system fixes above.
265 (native-inputs
266 `(("autoconf" ,autoconf)
267 ("automake" ,automake)
268 ("libtool" ,libtool)))
412a2422 269 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
270 #:phases
271 (modify-phases %standard-phases
272 ;; XXX We need to run ./bootstrap because of the build
273 ;; system fixes above.
189be331 274 (replace 'bootstrap
78666a68 275 (lambda _ (invoke "sh" "bootstrap"))))))
cda163cd
TUBK
276 (home-page "http://liba52.sourceforge.net/")
277 (synopsis "ATSC A/52 stream decoder")
278 (description "liba52 is a library for decoding ATSC A/52 streams. The
279A/52 standard is used in a variety of applications, including digital
280television and DVD. It is also known as AC-3.")
ae0bdd81 281 (license license:gpl2+)))
cda163cd 282
a7afa454 283(define-public libaom
08cc1397
LF
284 (package
285 (name "libaom")
286 (version "1.0.0-errata1-avif")
287 (source (origin
288 (method git-fetch)
289 (uri (git-reference
290 (url "https://aomedia.googlesource.com/aom/")
291 (commit (string-append "v" version))))
292 (file-name (git-file-name name version))
293 (sha256
294 (base32
295 "169yfgh7zigc21h71qclfyr7s4wwp2i9vbr4z6pkabypvass4v7m"))))
296 (build-system cmake-build-system)
297 (native-inputs
298 `(("perl" ,perl)
299 ("pkg-config" ,pkg-config)
300 ("python" ,python))) ; to detect the version
301 (arguments
302 `(#:tests? #f ;no check target
303 #:configure-flags
304 ;; build dynamic library
305 (list "-DBUILD_SHARED_LIBS=YES"
306 "-DENABLE_PIC=TRUE"
307 "-DAOM_TARGET_CPU=generic"
308 (string-append "-DCMAKE_INSTALL_PREFIX="
309 (assoc-ref %outputs "out")))))
310 (home-page "https://aomedia.googlesource.com/aom/")
311 (synopsis "AV1 video codec")
312 (description "Libaom is the reference implementation of AV1. It includes a
313shared library and encoder and decoder command-line executables.")
314 (license license:bsd-2)))
a7afa454 315
e0884109
MW
316(define-public libmpeg2
317 (package
318 (name "libmpeg2")
319 (version "0.5.1")
320 (source (origin
321 (method url-fetch)
322 ;; A mirror://sourceforge URI doesn't work, presumably
323 ;; because the SourceForge project is misconfigured.
324 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
325 name "-" version ".tar.gz"))
c50b07dd
MB
326 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
327 "libmpeg2-global-symbol-test.patch"))
e0884109
MW
328 (sha256
329 (base32
330 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
331 (inputs
332 `(("libx11" ,libx11)
333 ("libxext" ,libxext)
334 ("libxv" ,libxv)
335 ("libsm" ,libsm)
336 ("libice" ,libice)
337 ("sdl" ,sdl)))
338 (build-system gnu-build-system)
339 (home-page "http://libmpeg2.sourceforge.net/")
340 (synopsis "MPEG1 and MPEG2 video decoder library")
341 (description
342 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
343 (license license:gpl2+)))
344
82712597 345(define-public libx264
c0fe2e1f
MB
346 ;; There are no tags in the repository, so we take the version number from
347 ;; the X264_BUILD variable defined in x264.h.
348 (let ((version "159")
349 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
350 (revision "0"))
351 (package
352 (name "libx264")
353 (version (git-version version revision commit))
354 (source (origin
355 (method git-fetch)
356 (uri (git-reference
357 (url "https://code.videolan.org/videolan/x264.git")
358 (commit commit)))
359 (file-name (git-file-name name version))
360 (sha256
361 (base32
362 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
363 (build-system gnu-build-system)
364 (native-inputs
365 `(("pkg-config" ,pkg-config)
366 ("nasm" ,nasm)))
367 ;; TODO: Add gpac input
368 (arguments
369 `(#:tests? #f ;no check target
370 #:configure-flags '("--enable-shared"
371 ;; Don't build the command-line program. If we
372 ;; want it later, we should do so in a different
373 ;; package to avoid a circular dependency (the x264
374 ;; program depends on ffmpeg and ffmpeg depends on
375 ;; libx264).
376 "--disable-cli"
cb50d0c2 377
c0fe2e1f
MB
378 ;; On MIPS, we must pass "--disable-asm" or else
379 ;; configure fails after printing: "You specified a
380 ;; pre-MSA CPU in your CFLAGS. If you really want
381 ;; to run on such a CPU, configure with
382 ;; --disable-asm."
383 ,@(if (string-prefix? "mips"
384 (or (%current-target-system)
385 (%current-system)))
386 '("--disable-asm")
387 '()))))
388 (home-page "https://www.videolan.org/developers/x264.html")
389 (synopsis "H.264 video coding library")
390 (description "libx264 is an advanced encoding library for creating
82712597 391H.264 (MPEG-4 AVC) video streams.")
c0fe2e1f
MB
392 (license (list license:gpl2+ ;most files
393 license:isc ;common/x86/x86inc.asm
394 license:lgpl2.1+ ;extras/getopt.c
395 license:bsd-3 ;extras/inttypes.h
396 (license:non-copyleft ;extras/cl*.h
397 "file://extras/cl.h"
398 "See extras/cl.h in the distribution."))))))
82712597 399
2973ebf5
GG
400(define-public mkvtoolnix
401 (package
402 (name "mkvtoolnix")
296b3de6 403 (version "37.0.0")
2973ebf5
GG
404 (source
405 (origin
406 (method url-fetch)
407 (uri (string-append "https://mkvtoolnix.download/sources/"
908d8bed 408 "mkvtoolnix-" version ".tar.xz"))
2973ebf5 409 (sha256
296b3de6 410 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
2973ebf5 411 (modules '((guix build utils)))
6cbee49d
MW
412 (snippet '(begin
413 ;; Delete bundled libraries.
414 (for-each delete-file-recursively
f3395a7b
EF
415 '("lib/fmt"
416 "lib/libebml"
6cbee49d
MW
417 "lib/libmatroska"
418 "lib/nlohmann-json"
419 "lib/pugixml"
420 "lib/utf8-cpp"))
421 #t))))
2973ebf5 422 (build-system gnu-build-system)
99d5e5df 423 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
2973ebf5
GG
424 (inputs
425 `(("boost" ,boost)
426 ("bzip2" ,bzip2)
f3395a7b 427 ("cmark" ,cmark)
2973ebf5 428 ("libebml" ,libebml)
2973ebf5 429 ("file" ,file)
f3395a7b
EF
430 ("flac" ,flac)
431 ("fmt" ,fmt)
2973ebf5
GG
432 ("libmatroska" ,libmatroska)
433 ("libogg" ,libogg)
434 ("libvorbis" ,libvorbis)
435 ("lzo" ,lzo)
436 ("pugixml" ,pugixml)
662ff659
EF
437 ("qtbase" ,qtbase)
438 ("qtmultimedia" ,qtmultimedia)
2973ebf5
GG
439 ("utfcpp" ,utfcpp)
440 ("zlib" ,zlib)))
441 (native-inputs
442 `(("docbook-xsl" ,docbook-xsl)
443 ("gettext" ,gettext-minimal)
444 ("googletest" ,googletest)
445 ("libxslt" ,libxslt)
936aa052 446 ("json-modern-cxx" ,json-modern-cxx)
2973ebf5
GG
447 ("perl" ,perl)
448 ("pkg-config" ,pkg-config)
449 ("po4a" ,po4a)
662ff659 450 ("qttools" ,qttools)
2973ebf5
GG
451 ("ruby" ,ruby)))
452 (arguments
453 `(#:configure-flags
454 (list (string-append "--with-boost="
455 (assoc-ref %build-inputs "boost"))
456 (string-append "--with-docbook-xsl-root="
457 (assoc-ref %build-inputs "docbook-xsl")
458 "/xml/xsl/docbook-xsl-"
459 ,(package-version docbook-xsl))
e7ed996c
EF
460 "--enable-update-check=no"
461 "--enable-precompiled-headers=no")
2973ebf5
GG
462 #:phases
463 (modify-phases %standard-phases
07272bd8
TGR
464 (add-after 'unpack 'patch-relative-file-names
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let ((out (assoc-ref outputs "out")))
467 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
468 (("mkvmerge" match)
469 (string-append out "/bin/" match)))
470 #t)))
2973ebf5 471 (add-before 'configure 'add-googletest
e7ed996c 472 (lambda* (#:key inputs #:allow-other-keys)
2973ebf5 473 (symlink
e7ed996c
EF
474 (string-append (assoc-ref inputs "googletest")
475 "/include/gtest") "lib/gtest")
2973ebf5
GG
476 #t))
477 (replace 'build
478 (lambda _
479 (let ((-j (list "-j" (number->string (parallel-job-count)))))
6c4d1413 480 (apply invoke "rake" -j))))
2973ebf5
GG
481 (replace 'check
482 (lambda _
6c4d1413 483 (invoke "rake" "tests/unit")))
2973ebf5
GG
484 (replace 'install
485 (lambda _
99d5e5df
PN
486 (invoke "rake" "install")))
487 (add-after 'install 'post-install
488 (lambda* (#:key outputs #:allow-other-keys)
489 ;; Move the Qt interface to "gui".
b55db494
PN
490 (let* ((out (assoc-ref outputs "out"))
491 (gui (assoc-ref outputs "gui"))
492 (strip-store-dir (lambda (path)
493 (substring path (string-prefix-length out path)))))
99d5e5df
PN
494 (for-each
495 (lambda (file)
496 (mkdir-p (string-append gui (dirname file)))
497 (rename-file (string-append out file)
498 (string-append gui file)))
b55db494
PN
499 (append '("/bin/mkvtoolnix-gui"
500 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
501 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
502 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
503 (map strip-store-dir (find-files out "\\.ogg$"))
504 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
505 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
506 (for-each
507 (lambda (file)
508 (delete-file-recursively (string-append out file)))
509 '("/share/applications"
510 "/share/metainfo"
511 "/share/mime"
512 "/share/mkvtoolnix")))
99d5e5df 513 #t)))))
2973ebf5
GG
514 (home-page "https://mkvtoolnix.download")
515 (synopsis "Tools to create, alter and inspect Matroska files")
516 (description
517 "MKVToolNix provides tools for getting information about Matroska files
df14dc48
TGR
518(@command{mkvinfo}), extracting tracks/data from Matroska files
519(@command{mkvextract}), and creating Matroska files from other media files
520(@command{mkvmerge}).")
2973ebf5
GG
521 (license license:gpl2)))
522
6c71d56d
TGR
523(define-public straw-viewer
524 (package
525 (name "straw-viewer")
526 (version "0.0.2")
527 (source
528 (origin
529 (method git-fetch)
530 (uri (git-reference
531 (url "https://github.com/trizen/straw-viewer")
532 (commit version)))
533 (file-name (git-file-name name version))
534 (sha256
535 (base32 "067j8wdfy29bi5ahky10xzzs8cr3mn95wl4kyqqjvjzri77a25j3"))))
536 (build-system perl-build-system)
537 (native-inputs
538 `(("perl-module-build" ,perl-module-build)
539 ("perl-test-pod" ,perl-test-pod)))
540 (inputs
541 `(("perl-data-dump" ,perl-data-dump)
542 ("perl-json" ,perl-json)
543 ("perl-libwww" ,perl-libwww)
544 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
545 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
546 ("perl-mozilla-ca" ,perl-mozilla-ca)
547 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
548 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
549 ("xdg-utils" ,xdg-utils)
550
551 ;; Some videos play without youtube-dl, but others silently fail to.
552 ("youtube-dl" ,youtube-dl)))
553
554 ;; Required only when building the graphical interface (--gtk).
555 ;;("perl-file-sharedir" ,perl-file-sharedir)
556 (arguments
557 `(#:modules ((guix build perl-build-system)
558 (guix build utils)
559 (srfi srfi-26))
560 #:phases
561 (modify-phases %standard-phases
562 (add-after 'unpack 'refer-to-inputs
563 (lambda* (#:key inputs #:allow-other-keys)
564 (substitute* "lib/WWW/StrawViewer.pm"
565 (("'youtube-dl'")
566 (format #f "'~a/bin/youtube-dl'"
567 (assoc-ref inputs "youtube-dl"))))
568 (substitute* "bin/gtk-straw-viewer"
569 (("'xdg-open'")
570 (format #f "'~a/bin/xdg-open'"
571 (assoc-ref inputs "xdg-utils"))))
572 #t))
573 (add-after 'install 'install-desktop
574 (lambda* (#:key outputs #:allow-other-keys)
575 (let* ((out (assoc-ref outputs "out"))
576 (sharedir (string-append out "/share")))
577 (install-file "share/gtk-straw-viewer.desktop"
578 (string-append sharedir "/applications"))
579 (install-file "share/icons/gtk-straw-viewer.png"
580 (string-append sharedir "/pixmaps"))
581 #t)))
582 (add-after 'install 'wrap-program
583 (lambda* (#:key outputs #:allow-other-keys)
584 (let* ((out (assoc-ref outputs "out"))
585 (bin-dir (string-append out "/bin/"))
586 (site-dir (string-append out "/lib/perl5/site_perl/"))
587 (lib-path (getenv "PERL5LIB")))
588 (for-each (cut wrap-program <>
589 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
590 (find-files bin-dir))
591 #t))))))
592 (synopsis
593 "Light-weight application for searching and streaming videos from YouTube")
594 (description
595 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
596invidio.us} and plays them locally in a native media player like @command{vlc}
597or @command{mpv}.
598
599You can search for videos, playlists, and/or channels. The videos are streamed
600directly to the player at the best chosen resolution and with closed captions if
601available.")
602 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
603 ;; Both a command-line and a graphical interface are available.
604 (home-page "https://github.com/trizen/youtube-viewer")
605 (license license:perl-license)))
606
7bc7ffc2
EF
607(define-public x265
608 (package
609 (name "x265")
0fc1feec 610 (version "3.3")
020d4d2c 611 (outputs '("out" "static"))
7bc7ffc2
EF
612 (source
613 (origin
614 (method url-fetch)
621ce95c
MB
615 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
616 "/downloads/x265_" version ".tar.gz")
617 (string-append "https://download.videolan.org/videolan/x265/"
618 "x265_" version ".tar.gz")))
7bc7ffc2 619 (sha256
0fc1feec 620 (base32 "170b61cgpcs5n35qps0p40dqs1q81vkgagzbs4zv7pzls6718vpj"))
23c25982 621 (patches (search-patches "x265-arm-flags.patch"))
7bc7ffc2 622 (modules '((guix build utils)))
6cbee49d
MW
623 (snippet '(begin
624 (delete-file-recursively "source/compat/getopt")
625 #t))))
7bc7ffc2
EF
626 (build-system cmake-build-system)
627 (arguments
628 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
bd606fb2
EF
629 #:configure-flags
630 ;; Ensure position independent code for everyone.
631 (list "-DENABLE_PIC=TRUE"
8e59c5fe
EF
632 ,@(if (string-prefix? "armhf" (or (%current-system)
633 (%current-target-system)))
634 '("-DENABLE_ASSEMBLY=OFF")
635 '())
bd606fb2
EF
636 (string-append "-DCMAKE_INSTALL_PREFIX="
637 (assoc-ref %outputs "out")))
7bc7ffc2
EF
638 #:phases
639 (modify-phases %standard-phases
bd606fb2 640 (add-after 'unpack 'prepare-build
7bc7ffc2
EF
641 (lambda _
642 (delete-file-recursively "build")
643 (chdir "source")
8e59c5fe
EF
644 ;; recognize armv8 in 32-bit mode as ARM
645 (substitute* "CMakeLists.txt"
646 (("armv6l") "armv8l"))
bd606fb2
EF
647 #t))
648 (add-before 'configure 'build-12-bit
649 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
650 (mkdir "../build-12bit")
651 (with-directory-excursion "../build-12bit"
652 (apply invoke
653 "cmake" "../source"
654 "-DHIGH_BIT_DEPTH=ON"
655 "-DEXPORT_C_API=OFF"
656 "-DENABLE_CLI=OFF"
657 "-DMAIN12=ON"
658 configure-flags)
659 (substitute* (cons "cmake_install.cmake"
660 (append
661 (find-files "CMakeFiles/x265-shared.dir" ".")
662 (find-files "CMakeFiles/x265-static.dir" ".")))
663 (("libx265") "libx265_main12"))
664 (invoke "make"))))
665 (add-before 'configure 'build-10-bit
666 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
667 (mkdir "../build-10bit")
668 (with-directory-excursion "../build-10bit"
669 (apply invoke
670 "cmake" "../source"
671 "-DHIGH_BIT_DEPTH=ON"
672 "-DEXPORT_C_API=OFF"
673 "-DENABLE_CLI=OFF"
674 configure-flags)
675 (substitute* (cons "cmake_install.cmake"
676 (append
677 (find-files "CMakeFiles/x265-shared.dir" ".")
678 (find-files "CMakeFiles/x265-static.dir" ".")))
679 (("libx265") "libx265_main10"))
680 (invoke "make"))))
681 (add-after 'install 'install-more-libs
682 (lambda _
683 (with-directory-excursion "../build-12bit"
684 (invoke "make" "install"))
685 (with-directory-excursion "../build-10bit"
020d4d2c
EF
686 (invoke "make" "install"))))
687 (add-before 'strip 'move-static-libs
688 (lambda* (#:key outputs #:allow-other-keys)
689 (let ((out (assoc-ref outputs "out"))
690 (static (assoc-ref outputs "static")))
691 (mkdir-p (string-append static "/lib"))
692 (with-directory-excursion
693 (string-append out "/lib")
694 (for-each
695 (lambda (file)
696 (rename-file file
697 (string-append static "/lib/" file)))
698 (find-files "." "\\.a$"))))
699 #t)))))
7bc7ffc2
EF
700 (home-page "http://x265.org/")
701 (synopsis "Library for encoding h.265/HEVC video streams")
702 (description "x265 is a H.265 / HEVC video encoder application library,
703designed to encode video or images into an H.265 / HEVC encoded bitstream.")
704 (license license:gpl2+)))
705
c426e61e
TUBK
706(define-public libass
707 (package
708 (name "libass")
449ad88b 709 (version "0.14.0")
c426e61e
TUBK
710 (source (origin
711 (method url-fetch)
712 (uri (string-append
713 "https://github.com/libass/libass/releases/download/"
714 version "/libass-" version ".tar.xz"))
715 (sha256
716 (base32
449ad88b 717 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
c426e61e
TUBK
718 (build-system gnu-build-system)
719 (native-inputs
720 `(("pkg-config" ,pkg-config)
449ad88b 721 ("nasm" ,nasm)))
c426e61e
TUBK
722 (propagated-inputs
723 `(("freetype" ,freetype)
724 ("fribidi" ,fribidi)
725 ("fontconfig" ,fontconfig)
726 ("harfbuzz" ,harfbuzz)
727 ("enca" ,enca)))
728 (home-page "https://github.com/libass/libass")
729 (synopsis "Subtitle rendering library for the ASS/SSA format")
730 (description "libass is a subtitle rendering library for the
731ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 732 (license license:isc)))
c426e61e 733
4d94b93c
TUBK
734(define-public libcaca
735 (package
736 (name "libcaca")
737 (version "0.99.beta19")
738 (source (origin
739 (method url-fetch)
740 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
741 version ".tar.gz"))
742 (sha256
743 (base32
744 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
745 (build-system gnu-build-system)
746 (native-inputs `(("pkg-config" ,pkg-config)))
747 (inputs
748 `(("freeglut" ,freeglut)
749 ("ftgl" ,ftgl)
43d51239 750 ("imlib2" ,imlib2)
4d94b93c
TUBK
751 ("libx11" ,libx11)
752 ("mesa" ,mesa)
753 ("ncurses" ,ncurses)
754 ("zlib" ,zlib)))
755 (home-page "http://caca.zoy.org/wiki/libcaca")
756 (synopsis "Colour ASCII-art library")
757 (description "libcaca is a graphics library that outputs text instead of
758pixels, so that it can work on older video cards or text terminals. It
759supports Unicode, 2048 colors, dithering of color images, and advanced text
760canvas operations.")
8506fce0 761 (license license:wtfpl2)))
4d94b93c 762
3bfb78dc
TUBK
763(define-public libdca
764 (package
765 (name "libdca")
fd13a65c 766 (version "0.0.7")
3bfb78dc
TUBK
767 (source (origin
768 (method url-fetch)
769 (uri (string-append
b8a31908 770 "https://download.videolan.org/pub/videolan/libdca/"
3bfb78dc
TUBK
771 version "/libdca-" version ".tar.bz2"))
772 (sha256
773 (base32
fd13a65c 774 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
3bfb78dc 775 (build-system gnu-build-system)
fd13a65c
TGR
776 (native-inputs
777 `(("autoconf" ,autoconf)
778 ("automake" ,automake)
779 ("libtool" ,libtool)))
b8a31908 780 (home-page "https://www.videolan.org/developers/libdca.html")
3bfb78dc
TUBK
781 (synopsis "DTS Coherent Acoustics decoder")
782 (description "libdca is a library for decoding DTS Coherent Acoustics
783streams.")
ae0bdd81 784 (license license:gpl2+)))
3bfb78dc 785
99d4c455
TUBK
786(define-public libdv
787 (package
788 (name "libdv")
789 (version "1.0.0")
790 (source (origin
791 (method url-fetch)
792 (uri (string-append
d2e1a0ac
TGR
793 "mirror://sourceforge/libdv/libdv/"
794 version "/libdv-" version ".tar.gz"))
99d4c455
TUBK
795 (sha256
796 (base32
797 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
798 (build-system gnu-build-system)
799 (native-inputs `(("pkg-config" ,pkg-config)))
800 (inputs `(("libxv" ,libxv)))
801 (home-page "http://libdv.sourceforge.net/")
802 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
803 (description "The Quasar DV codec (libdv) is a software codec for DV
804video, the encoding format used by most digital camcorders, typically those
805that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
806developed according to the official standards for DV video: IEC 61834 and
807SMPTE 314M.")
ae0bdd81 808 (license license:lgpl2.1+)))
99d4c455 809
15f1d02a
GG
810(define-public libmatroska
811 (package
812 (name "libmatroska")
ad8e5a53 813 (version "1.5.2")
15f1d02a
GG
814 (source
815 (origin
816 (method url-fetch)
817 (uri (string-append "https://dl.matroska.org/downloads/"
309f3408 818 "libmatroska/libmatroska-" version ".tar.xz"))
15f1d02a 819 (sha256
ad8e5a53 820 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
23e24ff6 821 (build-system cmake-build-system)
15f1d02a
GG
822 (inputs
823 `(("libebml" ,libebml)))
23e24ff6
TGR
824 (arguments
825 `(#:configure-flags
826 (list "-DBUILD_SHARED_LIBS=YES")
827 #:tests? #f)) ; no test suite
15f1d02a 828 (home-page "https://www.matroska.org")
cb778117 829 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
15f1d02a
GG
830 (description
831 "Matroska aims to become the standard of multimedia container formats.
cb778117 832It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
15f1d02a
GG
833of XML. EBML enables the Matroska Development Team to gain significant
834advantages in terms of future format extensibility, without breaking file
835support in old parsers.
836libebml is a C++ library to read and write EBML files.")
837 (license license:lgpl2.1)))
838
ee3b55ea
TUBK
839(define-public libva
840 (package
841 (name "libva")
fe19ab3f 842 (version "2.6.1")
ee3b55ea
TUBK
843 (source
844 (origin
845 (method url-fetch)
7035d2dd
MB
846 (uri (list
847 ;; Newer releases are only available on GitHub.
848 (string-append "https://github.com/01org/libva/releases/download/"
849 version "/libva-" version ".tar.bz2")
850 ;; Keep the old URL around for compatibility.
851 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
852 "libva/libva-" version "/libva-" version ".tar.bz2")))
ee3b55ea 853 (sha256
fe19ab3f 854 (base32 "19df3r02k1p4cbyvifkdjyc8q7hi23f5b3x3390z52l25mjfnmvc"))))
ee3b55ea
TUBK
855 (build-system gnu-build-system)
856 (native-inputs
857 `(("pkg-config" ,pkg-config)))
858 (inputs
859 `(("libdrm" ,libdrm)
860 ("libx11" ,libx11)
861 ("libxext" ,libxext)
862 ("libxfixes" ,libxfixes)
3ee7b4cc
EF
863 ("mesa" ,mesa)
864 ("wayland" ,wayland)))
372cf039
TUBK
865 (arguments
866 `(#:phases
867 (modify-phases %standard-phases
868 (add-before
869 'build 'fix-dlopen-paths
870 (lambda* (#:key outputs #:allow-other-keys)
871 (let ((out (assoc-ref outputs "out")))
872 (substitute* "va/drm/va_drm_auth_x11.c"
873 (("\"libva-x11\\.so\\.%d\"")
d5c88f16
MW
874 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
875 #t))))
372cf039
TUBK
876 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
877 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
878 #:configure-flags
879 (list (string-append "--with-drivers-path="
880 (assoc-ref %build-inputs "mesa") "/lib/dri"))
881 ;; However, we can't write to mesa's store directory, so override the
882 ;; following make variable to install the dummy driver to libva's
883 ;; $prefix/lib/dri directory.
884 #:make-flags
885 (list (string-append "dummy_drv_video_ladir="
886 (assoc-ref %outputs "out") "/lib/dri"))))
5c1c2254 887 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
888 (synopsis "Video acceleration library")
889 (description "The main motivation for VA-API (Video Acceleration API) is
890to enable hardware accelerated video decode/encode at various
891entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
892standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 893 (license license:expat)))
ee3b55ea 894
3563220e
TGR
895(define-public libva-utils
896 (package
897 (name "libva-utils")
898 (version "2.5.0")
899 (source
900 (origin
901 (method url-fetch)
902 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
903 version "/libva-utils-" version ".tar.bz2"))
904 (sha256
905 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
906 (build-system gnu-build-system)
907 (arguments
908 `(#:configure-flags
909 (list "--enable-wayland"
910 "--enable-x11")))
911 (native-inputs
912 `(("pkg-config" ,pkg-config)))
913 (inputs
914 `(("libdrm" ,libdrm)
915 ("libva" ,libva)
916 ("libx11" ,libx11)
917 ("mesa" ,mesa)
918 ("wayland" ,wayland)))
919 (home-page "https://01.org/linuxmedia/vaapi")
920 (synopsis "Collection of testing utilities for VA-API")
921 (description
922 "This is a collection of utilities to query and test the @acronym{VA-API,
923Video Acceleration API} implemented by the libva library.
924
925These tools require a supported graphics chip, driver, and VA-API back end to
926operate properly.")
927 (license license:expat)))
928
39efcc9b
AE
929(define-public ffmpeg
930 (package
931 (name "ffmpeg")
fd4b27e4 932 (version "4.2.2")
39efcc9b
AE
933 (source (origin
934 (method url-fetch)
a1121a7f
EF
935 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
936 version ".tar.xz"))
e401653b
LF
937 ;; See <https://issues.guix.gnu.org/issue/39719>
938 (patches (search-patches "ffmpeg-prefer-dav1d.patch"))
39efcc9b
AE
939 (sha256
940 (base32
fd4b27e4 941 "176jn1lcdf0gk7sa5l2mv0faqp5dsqdhx1gqcrgymqhfmdal4xfb"))))
39efcc9b
AE
942 (build-system gnu-build-system)
943 (inputs
86445c8e
RH
944 `(("dav1d" ,dav1d)
945 ("fontconfig" ,fontconfig)
39efcc9b 946 ("freetype" ,freetype)
8fd43200 947 ("frei0r-plugins" ,frei0r-plugins)
c8dab7f4 948 ("gnutls" ,gnutls)
e816b348 949 ("opus" ,opus)
71241192 950 ("ladspa" ,ladspa)
d4f12db8 951 ("lame" ,lame)
84eb265e 952 ("libaom" ,libaom)
c426e61e 953 ("libass" ,libass)
5d3609e4 954 ("libbluray" ,libbluray)
4d94b93c 955 ("libcaca" ,libcaca)
cc6c0170 956 ("libcdio-paranoia" ,libcdio-paranoia)
1f61cc10 957 ("libdrm" ,libdrm)
39efcc9b 958 ("libtheora" ,libtheora)
bb3df15e 959 ("libva" ,libva)
f88f0d20 960 ("libvdpau" ,libvdpau)
39efcc9b 961 ("libvorbis" ,libvorbis)
dc55b8b2 962 ("libvpx" ,libvpx)
f88f0d20 963 ("libx11" ,libx11)
549381d6 964 ("libx264" ,libx264)
f88f0d20 965 ("mesa" ,mesa)
71241192 966 ("openal" ,openal)
71241192 967 ("pulseaudio" ,pulseaudio)
85bc5434 968 ("sdl" ,sdl2)
72bfebf5 969 ("soxr" ,soxr)
c4c4cc05 970 ("speex" ,speex)
72bfebf5 971 ("twolame" ,twolame)
6d777ff9 972 ("vidstab" ,vidstab)
d505801a 973 ("x265" ,x265)
67932f86 974 ("xvid" ,xvid)
b3546174 975 ("zlib" ,zlib)))
c4c4cc05
JD
976 (native-inputs
977 `(("bc" ,bc)
39efcc9b
AE
978 ("perl" ,perl)
979 ("pkg-config" ,pkg-config)
824d9dc3 980 ("texinfo" ,texinfo)
39efcc9b
AE
981 ("python" ,python-2) ; scripts use interpreter python2
982 ("speex" ,speex)
c4c4cc05 983 ("yasm" ,yasm)))
39efcc9b 984 (arguments
31f9322e 985 `(#:test-target "fate"
12f92e38
AP
986 #:configure-flags
987 ;; possible additional inputs:
988 ;; --enable-avisynth enable reading of AviSynth script
989 ;; files [no]
12f92e38
AP
990 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
991 ;; --enable-libcelt enable CELT decoding via libcelt [no]
992 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
993 ;; and libraw1394 [no]
994 ;; --enable-libfaac enable AAC encoding via libfaac [no]
995 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
996 ;; --enable-libflite enable flite (voice synthesis) support via
997 ;; libflite [no]
998 ;; --enable-libgme enable Game Music Emu via libgme [no]
999 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1000 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1001 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1002 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1003 ;; --enable-libnut enable NUT (de)muxing via libnut,
1004 ;; native (de)muxer exists [no]
1005 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1006 ;; libopencore-amrnb [no]
1007 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1008 ;; libopencore-amrwb [no]
1009 ;; --enable-libopencv enable video filtering via libopencv [no]
1010 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1011 ;; OpenJPEG [no]
1012 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1013 ;; --enable-libschroedinger enable Dirac de/encoding via
1014 ;; libschroedinger [no]
1015 ;; --enable-libshine enable fixed-point MP3 encoding via
1016 ;; libshine [no]
1017 ;; --enable-libssh enable SFTP protocol via libssh [no]
1018 ;; (libssh2 does not work)
1019 ;; --enable-libstagefright-h264 enable H.264 decoding via
1020 ;; libstagefright [no]
1021 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1022 ;; libutvideo [no]
1023 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
12f92e38
AP
1024 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1025 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1026 ;; libvo-amrwbenc [no]
1027 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1028 ;; --enable-libxavs enable AVS encoding via xavs [no]
1029 ;; --enable-libzmq enable message passing via libzmq [no]
1030 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1031 ;; --enable-opencl enable OpenCL code
12f92e38
AP
1032 '("--enable-avresample"
1033 "--enable-gpl" ; enable optional gpl licensed parts
1034 "--enable-shared"
8fd43200 1035 "--enable-frei0r"
12f92e38 1036 "--enable-fontconfig"
c8dab7f4 1037 "--enable-gnutls"
12f92e38 1038 "--enable-ladspa"
84eb265e 1039 "--enable-libaom"
12f92e38
AP
1040 "--enable-libass"
1041 "--enable-libbluray"
1042 "--enable-libcaca"
1043 "--enable-libcdio"
86445c8e 1044 "--enable-libdav1d"
12f92e38
AP
1045 "--enable-libfreetype"
1046 "--enable-libmp3lame"
1047 "--enable-libopus"
1048 "--enable-libpulse"
12f92e38
AP
1049 "--enable-libsoxr"
1050 "--enable-libspeex"
1051 "--enable-libtheora"
1052 "--enable-libtwolame"
6d777ff9 1053 "--enable-libvidstab"
12f92e38
AP
1054 "--enable-libvorbis"
1055 "--enable-libvpx"
1056 "--enable-libxvid"
1057 "--enable-libx264"
d505801a 1058 "--enable-libx265"
12f92e38 1059 "--enable-openal"
f88f0d20 1060 "--enable-opengl"
1f61cc10 1061 "--enable-libdrm"
12f92e38
AP
1062
1063 "--enable-runtime-cpudetect"
1064
1e2a36e1
EF
1065 ;; The HTML pages take 7.2 MiB
1066 "--disable-htmlpages"
1067
1068 ;; The static libraries are 23 MiB
1069 "--disable-static"
1070
12f92e38
AP
1071 ;; Runtime cpu detection is not implemented on
1072 ;; MIPS, so we disable some features.
1073 "--disable-mips32r2"
c5e1fcd0 1074 "--disable-mipsdsp"
12f92e38
AP
1075 "--disable-mipsdspr2"
1076 "--disable-mipsfpu")
31f9322e 1077 #:phases
f2feb0ce
LC
1078 (modify-phases %standard-phases
1079 (replace
39efcc9b
AE
1080 'configure
1081 ;; configure does not work followed by "SHELL=..." and
1082 ;; "CONFIG_SHELL=..."; set environment variables instead
1083 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1084 (let ((out (assoc-ref outputs "out")))
1085 (substitute* "configure"
47734a56 1086 (("#! /bin/sh") (string-append "#!" (which "sh"))))
39efcc9b
AE
1087 (setenv "SHELL" (which "bash"))
1088 (setenv "CONFIG_SHELL" (which "bash"))
3918ed73
MW
1089 (apply invoke
1090 "./configure"
1091 (string-append "--prefix=" out)
1092 ;; Add $libdir to the RUNPATH of all the binaries.
1093 (string-append "--extra-ldflags=-Wl,-rpath="
1094 out "/lib")
1095 configure-flags))))
457e528e
LC
1096 (add-before
1097 'check 'set-ld-library-path
1098 (lambda _
1099 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1100 ;; running tests.
1101 (let* ((dso (find-files "." "\\.so$"))
1102 (path (string-join (map dirname dso) ":")))
1103 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1104 (setenv "LD_LIBRARY_PATH" path)
27350ef8 1105 #t))))))
702bfbf1 1106 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
1107 (synopsis "Audio and video framework")
1108 (description "FFmpeg is a complete, cross-platform solution to record,
1109convert and stream audio and video. It includes the libavcodec
1110audio/video codec library.")
ae0bdd81 1111 (license license:gpl2+)))
d5a748e8 1112
06079c19
RH
1113(define-public ffmpeg-3.4
1114 (package
1115 (inherit ffmpeg)
66c15f72 1116 (version "3.4.7")
06079c19
RH
1117 (source (origin
1118 (method url-fetch)
1119 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1120 version ".tar.xz"))
1121 (sha256
1122 (base32
66c15f72 1123 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
84eb265e
AB
1124 (arguments
1125 (substitute-keyword-arguments (package-arguments ffmpeg)
1126 ((#:configure-flags flags)
86445c8e
RH
1127 `(delete "--enable-libdav1d" (delete "--enable-libaom"
1128 ,flags)))))
1129 (inputs (alist-delete "dav1d" (alist-delete "libaom"
1130 (package-inputs ffmpeg))))))
06079c19 1131
1faf0a04
NG
1132(define-public ffmpeg-for-stepmania
1133 (hidden-package
1134 (package
1135 (inherit ffmpeg)
1136 (version "2.1.3")
1137 (source
1138 (origin
1139 (method git-fetch)
1140 (uri (git-reference
1141 (url "https://github.com/stepmania/ffmpeg.git")
1142 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1143 (sha256
1144 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1145 (file-name (git-file-name "ffmpeg" version))))
1146 (arguments
1147 (substitute-keyword-arguments (package-arguments ffmpeg)
1148 ((#:configure-flags flags)
1149 '(list "--disable-programs"
1150 "--disable-doc"
1151 "--disable-debug"
1152 "--disable-avdevice"
1153 "--disable-swresample"
1154 "--disable-postproc"
1155 "--disable-avfilter"
1156 "--disable-shared"
1157 "--enable-static"))))
1158 (inputs '()))))
940778c7 1159
4febfdd0
BT
1160(define-public ffmpegthumbnailer
1161 (package
1162 (name "ffmpegthumbnailer")
f1b8ed3f 1163 (version "2.2.2")
4febfdd0 1164 (source (origin
722e6ffe
RW
1165 (method git-fetch)
1166 (uri (git-reference
1167 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1168 (commit version)))
1169 (file-name (git-file-name name version))
4febfdd0
BT
1170 (sha256
1171 (base32
f1b8ed3f 1172 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
4febfdd0
BT
1173 (build-system cmake-build-system)
1174 (native-inputs
1175 `(("pkg-config" ,pkg-config)))
1176 (inputs
1177 `(("ffmpeg" ,ffmpeg)
1178 ("libjpeg-turbo" ,libjpeg-turbo)
1179 ("libpng" ,libpng)
1180 ("gvfs" ,gvfs)))
1181 (arguments
1182 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1183 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1184 (synopsis "Create thumbnails from video files")
1185 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1186can be used by file managers to create thumbnails for your video files. The
1187thumbnailer uses ffmpeg to decode frames from the video files, so supported
1188videoformats depend on the configuration flags of ffmpeg.")
1189 (license license:gpl2+)))
1190
d5a748e8
AE
1191(define-public vlc
1192 (package
1193 (name "vlc")
5af11086 1194 (version "3.0.10")
d5a748e8 1195 (source (origin
520b18e6
NG
1196 (method url-fetch)
1197 (uri (string-append
1198 "https://download.videolan.org/pub/videolan/vlc/"
1199 (car (string-split version #\-))
1200 "/vlc-" version ".tar.xz"))
1201 (sha256
1202 (base32
5af11086 1203 "0cackl1084hcmg4myf3kvjvd6sjxmzn0c0qkmanz6brvgzyanrm9"))))
d5a748e8
AE
1204 (build-system gnu-build-system)
1205 (native-inputs
76277052
MW
1206 `(("flex" ,flex)
1207 ("bison" ,bison)
1208 ("gettext" ,gettext-minimal)
520b18e6 1209 ("git" ,git) ; needed for a test
d5a748e8
AE
1210 ("pkg-config" ,pkg-config)))
1211 ;; FIXME: Add optional inputs once available.
1212 (inputs
1213 `(("alsa-lib" ,alsa-lib)
1214 ("avahi" ,avahi)
f08040c5
LF
1215 ;; XXX Try removing dav1d here and testing AV1 playback when FFmpeg 4.3
1216 ;; is released.
1217 ;; <https://issues.guix.gnu.org/issue/39719>
1218 ("dav1d" ,dav1d)
d5a748e8 1219 ("dbus" ,dbus)
76277052 1220 ("eudev" ,eudev)
d5a748e8 1221 ("flac" ,flac)
76277052 1222 ("ffmpeg" ,ffmpeg)
d5a748e8
AE
1223 ("fontconfig" ,fontconfig)
1224 ("freetype" ,freetype)
76277052 1225 ("fribidi" ,fribidi)
d5a748e8 1226 ("gnutls" ,gnutls)
8824da4c 1227 ("liba52" ,liba52)
76277052
MW
1228 ("libarchive" ,libarchive)
1229 ("libass" ,libass)
1230 ("libavc1394" ,libavc1394)
1231 ("libbluray" ,libbluray)
1232 ("libcaca" ,libcaca)
d5a748e8 1233 ("libcddb" ,libcddb)
76277052 1234 ("libdca" ,libdca)
72b6a894 1235 ("libdvbpsi" ,libdvbpsi)
76277052
MW
1236 ("libdvdnav" ,libdvdnav)
1237 ("libdvdread" ,libdvdread)
1238 ("libebml" ,libebml)
d5a748e8 1239 ("libgcrypt" ,libgcrypt)
76277052 1240 ("libidn" ,libidn)
d5a748e8
AE
1241 ("libkate" ,libkate)
1242 ("libmad" ,libmad)
76277052 1243 ("libmatroska" ,libmatroska)
78d112c2 1244 ("libmicrodns" ,libmicrodns)
76277052
MW
1245 ("libmodplug" ,libmodplug)
1246 ("libmpeg2" ,libmpeg2)
d5a748e8
AE
1247 ("libogg" ,libogg)
1248 ("libpng" ,libpng)
76277052
MW
1249 ("libraw1394" ,libraw1394)
1250 ("librsvg" ,librsvg)
d5a748e8 1251 ("libsamplerate" ,libsamplerate)
76277052 1252 ("libsecret" ,libsecret)
d5a748e8 1253 ("libssh2" ,libssh2)
76277052
MW
1254 ("libupnp" ,libupnp)
1255 ("libva" ,libva)
1256 ("libvdpau" ,libvdpau)
d5a748e8 1257 ("libvorbis" ,libvorbis)
26986544 1258 ("libvpx" ,libvpx)
d5a748e8 1259 ("libtheora" ,libtheora)
76277052 1260 ("libx264" ,libx264)
d5a748e8 1261 ("libxext" ,libxext)
c161c22a 1262 ("libxi" ,libxi)
d5a748e8
AE
1263 ("libxinerama" ,libxinerama)
1264 ("libxml2" ,libxml2)
1265 ("libxpm" ,libxpm)
2aaa5729 1266 ("livemedia-utils" ,livemedia-utils)
76277052 1267 ("lua" ,lua-5.2)
d5a748e8
AE
1268 ("mesa" ,mesa)
1269 ("opus" ,opus)
1270 ("perl" ,perl)
1271 ("pulseaudio" ,pulseaudio)
fc2982f7 1272 ("protobuf" ,protobuf)
d5a748e8 1273 ("python" ,python-wrapper)
552c3e95 1274 ("qtbase" ,qtbase)
76277052 1275 ("qtsvg" ,qtsvg)
552c3e95 1276 ("qtx11extras" ,qtx11extras)
76277052 1277 ("samba" ,samba)
d5a748e8
AE
1278 ("sdl" ,sdl)
1279 ("sdl-image" ,sdl-image)
1280 ("speex" ,speex)
76277052
MW
1281 ("speexdsp" ,speexdsp)
1282 ("taglib" ,taglib)
1283 ("twolame" ,twolame)
1284 ("unzip" ,unzip)
1285 ("wayland" ,wayland)
1286 ("wayland-protocols" ,wayland-protocols)
8f5f6c92 1287 ("x265" ,x265)
d5a748e8
AE
1288 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1289 (arguments
1290 `(#:configure-flags
0fe041bd 1291 `("BUILDCC=gcc"
d5a748e8
AE
1292 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1293 (assoc-ref %build-inputs "ffmpeg")
520b18e6 1294 "/lib")) ;needed for the tests
cd76fbde
LC
1295
1296 #:phases
1297 (modify-phases %standard-phases
2d2e97bd 1298 (add-after 'unpack 'patch-source
2aaa5729
CL
1299 (lambda* (#:key inputs #:allow-other-keys)
1300 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
2d2e97bd 1301 (substitute* "configure"
2aaa5729
CL
1302 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1303 (string-append "LIVE555_PREFIX=" livemedia-utils)))
2d2e97bd
MB
1304 ;; Some of the tests require using the display to test out VLC,
1305 ;; which fails in our sandboxed build system
1306 (substitute* "test/run_vlc.sh"
1307 (("./vlc --ignore-config") "echo"))
2aaa5729 1308 #t)))
76277052 1309 (add-after 'strip 'regenerate-plugin-cache
cd76fbde
LC
1310 (lambda* (#:key outputs #:allow-other-keys)
1311 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1312 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1313 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1314 ;; it references. Thus, we first reset the timestamps of all
1315 ;; these files, and then regenerate the cache such that the
1316 ;; mtimes it includes are always zero instead of being dependent
1317 ;; on the build time.
1318 (let* ((out (assoc-ref outputs "out"))
1319 (pkglibdir (string-append out "/lib/vlc"))
1320 (plugindir (string-append pkglibdir "/plugins"))
1321 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1322 ;; TODO: Factorize 'reset-timestamps'.
1323 (for-each (lambda (file)
1324 (let ((s (lstat file)))
1325 (unless (eq? (stat:type s) 'symlink)
76277052 1326 (utime file 1 1))))
cd76fbde 1327 (find-files plugindir))
76277052
MW
1328 (invoke cachegen plugindir))))
1329 (add-after 'install 'wrap-executable
1330 (lambda* (#:key outputs #:allow-other-keys)
520b18e6
NG
1331 (let ((out (assoc-ref outputs "out"))
1332 (plugin-path (getenv "QT_PLUGIN_PATH")))
1333 (wrap-program (string-append out "/bin/vlc")
1334 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1335 #t)))))
d5a748e8
AE
1336 (home-page "https://www.videolan.org/")
1337 (synopsis "Audio and video framework")
1338 (description "VLC is a cross-platform multimedia player and framework
1339that plays most multimedia files as well as DVD, Audio CD, VCD, and various
34a19d35 1340streaming protocols.")
ae0bdd81 1341 (license license:gpl2+)))
ace69243
AE
1342
1343(define-public mplayer
1344 (package
1345 (name "mplayer")
59ed95d6 1346 (version "1.4")
ace69243
AE
1347 (source (origin
1348 (method url-fetch)
1349 (uri (string-append
ebde7c7a 1350 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
1351 version ".tar.xz"))
1352 (sha256
1353 (base32
59ed95d6 1354 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
ace69243
AE
1355 (build-system gnu-build-system)
1356 ;; FIXME: Add additional inputs once available.
1357 (native-inputs
a5498025
EF
1358 `(("pkg-config" ,pkg-config)
1359 ("yasm" ,yasm)))
ace69243
AE
1360 (inputs
1361 `(("alsa-lib" ,alsa-lib)
1362 ("cdparanoia" ,cdparanoia)
59ed95d6 1363 ("ffmpeg" ,ffmpeg)
778a6a8b 1364 ("fontconfig" ,fontconfig)
ace69243 1365 ("freetype" ,freetype)
8480bdd3 1366 ("giflib" ,giflib)
ace69243 1367 ("lame" ,lame)
778a6a8b 1368 ("libass" ,libass)
b3546174 1369 ("libdvdcss" ,libdvdcss)
e46aacac
TGR
1370 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1371 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
4bd428a7 1372 ("libjpeg" ,libjpeg-turbo)
778a6a8b 1373 ("libmpeg2" ,libmpeg2)
59ed95d6 1374 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
1375 ("libpng" ,libpng)
1376 ("libtheora" ,libtheora)
778a6a8b 1377 ("libvdpau" ,libvdpau)
ace69243
AE
1378 ("libvorbis" ,libvorbis)
1379 ("libx11" ,libx11)
778a6a8b 1380 ("libx264" ,libx264)
ace69243
AE
1381 ("libxinerama" ,libxinerama)
1382 ("libxv" ,libxv)
778a6a8b 1383 ("libxxf86dga" ,libxxf86dga)
ace69243 1384 ("mesa" ,mesa)
778a6a8b 1385 ("opus" ,opus)
ace69243
AE
1386 ("perl" ,perl)
1387 ("pulseaudio" ,pulseaudio)
1388 ("python" ,python-wrapper)
1389 ("sdl" ,sdl)
1390 ("speex" ,speex)
ace69243
AE
1391 ("zlib" ,zlib)))
1392 (arguments
59ed95d6 1393 `(#:tests? #f ; no test target
ace69243 1394 #:phases
ebde7c7a
EF
1395 (modify-phases %standard-phases
1396 (replace 'configure
ace69243
AE
1397 ;; configure does not work followed by "SHELL=..." and
1398 ;; "CONFIG_SHELL=..."; set environment variables instead
1399 (lambda* (#:key inputs outputs #:allow-other-keys)
1400 (let ((out (assoc-ref outputs "out"))
1401 (libx11 (assoc-ref inputs "libx11")))
1402 (substitute* "configure"
2564b7c2 1403 (("#! /bin/sh") (string-append "#!" (which "sh"))))
ace69243
AE
1404 (setenv "SHELL" (which "bash"))
1405 (setenv "CONFIG_SHELL" (which "bash"))
1fe5791d 1406 (invoke "./configure"
ace69243
AE
1407 (string-append "--extra-cflags=-I"
1408 libx11 "/include") ; to detect libx11
ebde7c7a 1409 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 1410 (string-append "--prefix=" out)
fe138965
MW
1411 ;; Enable runtime cpu detection where supported,
1412 ;; and choose a suitable target.
1413 ,@(match (or (%current-target-system)
1414 (%current-system))
1415 ("x86_64-linux"
1416 '("--enable-runtime-cpudetection"
1417 "--target=x86_64-linux"))
1418 ("i686-linux"
1419 '("--enable-runtime-cpudetection"
1420 "--target=i686-linux"))
1421 ("mips64el-linux"
f0d6d835
MW
1422 '("--target=mips3-linux"))
1423 (_ (list (string-append
1424 "--target="
1425 (or (%current-target-system)
1426 (nix-system->gnu-triplet
1427 (%current-system)))))))
1fe5791d 1428 "--disable-iwmmxt")))))))
858b68e4 1429 (home-page "https://www.mplayerhq.hu")
ace69243
AE
1430 (synopsis "Audio and video player")
1431 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1432Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1433NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1434SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 1435 (license license:gpl2)))
d0ed39be 1436
1c1178cd
TUBK
1437(define-public mpv
1438 (package
1439 (name "mpv")
954b4c73 1440 (version "0.32.0")
1c1178cd 1441 (source (origin
ce4ac7d5
RW
1442 (method git-fetch)
1443 (uri (git-reference
1444 (url "https://github.com/mpv-player/mpv.git")
1445 (commit (string-append "v" version))))
1446 (file-name (git-file-name name version))
1c1178cd
TUBK
1447 (sha256
1448 (base32
954b4c73 1449 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1c1178cd
TUBK
1450 (build-system waf-build-system)
1451 (native-inputs
832d60dc 1452 `(("perl" ,perl) ; for zsh completion file
1c1178cd
TUBK
1453 ("pkg-config" ,pkg-config)
1454 ("python-docutils" ,python-docutils)))
3440f12a 1455 ;; Missing features: libguess, V4L2
1c1178cd
TUBK
1456 (inputs
1457 `(("alsa-lib" ,alsa-lib)
1458 ("enca" ,enca)
06079c19 1459 ("ffmpeg" ,ffmpeg)
2d8781a4 1460 ("jack" ,jack-1)
1c1178cd
TUBK
1461 ("ladspa" ,ladspa)
1462 ("lcms" ,lcms)
1463 ("libass" ,libass)
1464 ("libbluray" ,libbluray)
1465 ("libcaca" ,libcaca)
1466 ("libbs2b" ,libbs2b)
1467 ("libcdio-paranoia" ,libcdio-paranoia)
1468 ("libdvdread" ,libdvdread)
1469 ("libdvdnav" ,libdvdnav)
4bd428a7 1470 ("libjpeg" ,libjpeg-turbo)
1c1178cd 1471 ("libva" ,libva)
81c29ccc 1472 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
1473 ("libx11" ,libx11)
1474 ("libxext" ,libxext)
1475 ("libxinerama" ,libxinerama)
1476 ("libxrandr" ,libxrandr)
1477 ("libxscrnsaver" ,libxscrnsaver)
1478 ("libxv" ,libxv)
e66f0dd2
AP
1479 ;; XXX: lua > 5.2 is not currently supported; see
1480 ;; waftools/checks/custom.py
1481 ("lua" ,lua-5.2)
1c1178cd
TUBK
1482 ("mesa" ,mesa)
1483 ("mpg123" ,mpg123)
1484 ("pulseaudio" ,pulseaudio)
1485 ("rsound" ,rsound)
870541d6 1486 ("shaderc" ,shaderc)
08899ee9 1487 ("vulkan-headers" ,vulkan-headers)
e6fcf903 1488 ("vulkan-loader" ,vulkan-loader)
f0b8d83a 1489 ("waf" ,python-waf)
3440f12a 1490 ("wayland" ,wayland)
abc5ef5a 1491 ("wayland-protocols" ,wayland-protocols)
c695fb76 1492 ("libxkbcommon" ,libxkbcommon)
1c1178cd
TUBK
1493 ("youtube-dl" ,youtube-dl)
1494 ("zlib" ,zlib)))
1495 (arguments
1496 '(#:phases
1497 (modify-phases %standard-phases
3df69aaf
TE
1498 (add-after
1499 'unpack 'patch-paths
1500 (lambda* (#:key inputs #:allow-other-keys)
1501 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1502 (substitute* "player/lua/ytdl_hook.lua"
1503 (("\"youtube-dl\",")
1504 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1505 #t)))
1c1178cd 1506 (add-before
f8503e2b 1507 'configure 'setup-waf
1c1178cd 1508 (lambda* (#:key inputs #:allow-other-keys)
a2aa746c
EF
1509 (let ((waf (assoc-ref inputs "waf")))
1510 (copy-file (string-append waf "/bin/waf") "waf"))
d39260dc
MW
1511 (setenv "CC" "gcc")
1512 #t)))
98c8b963 1513 #:configure-flags (list "--enable-libmpv-shared"
43ba5dd4 1514 "--enable-cdda"
43ba5dd4 1515 "--enable-dvdnav"
98c8b963 1516 "--disable-build-date")
1c1178cd
TUBK
1517 ;; No check function defined.
1518 #:tests? #f))
581873b5 1519 (home-page "https://mpv.io/")
1c1178cd
TUBK
1520 (synopsis "Audio and video player")
1521 (description "mpv is a general-purpose audio and video player. It is a
1522fork of mplayer2 and MPlayer. It shares some features with the former
1523projects while introducing many more.")
ae0bdd81 1524 (license license:gpl2+)))
1c1178cd 1525
0e74bb5b 1526(define-public gnome-mpv
b7f5fa82 1527 (deprecated-package "gnome-mpv" celluloid))
0e74bb5b 1528
6ed192a2
EF
1529(define-public mpv-mpris
1530 (package
1531 (name "mpv-mpris")
b51a37b1 1532 (version "0.4")
6ed192a2
EF
1533 (source
1534 (origin
1535 (method git-fetch)
1536 (uri (git-reference
1537 (url "https://github.com/hoyon/mpv-mpris")
1538 (commit version)))
1539 (file-name (git-file-name name version))
1540 (sha256
1541 (base32
b51a37b1 1542 "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"))))
2a844af9 1543 (build-system copy-build-system)
6ed192a2 1544 (arguments
2a844af9
EF
1545 '(#:install-plan
1546 '(("mpris.so" "lib/"))
6ed192a2
EF
1547 #:phases
1548 (modify-phases %standard-phases
2a844af9
EF
1549 (add-before 'install 'build
1550 (lambda _
1551 (setenv "CC" (which "gcc"))
1552 (invoke "make"))))))
6ed192a2
EF
1553 (native-inputs
1554 `(("pkg-config" ,pkg-config)))
1555 (inputs
1556 `(("glib" ,glib)
1557 ("mpv" ,mpv)))
1558 (home-page "https://github.com/hoyon/mpv-mpris")
1559 (synopsis "MPRIS plugin for mpv")
1560 (description "This package provides an @dfn{MPRIS} (Media Player Remote
1561Interfacing Specification) plugin for the @code{mpv} media player. It implements
1562@code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
1563interfaces.
1564
1565To load this plugin, specify the following option when starting mpv:
1566@code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
1567@file{$HOME/.config/mpv/scripts}.")
1568 (license license:expat)))
1569
d0ed39be
DT
1570(define-public libvpx
1571 (package
1572 (name "libvpx")
0fd80a25 1573 (version "1.8.2")
d0ed39be 1574 (source (origin
8a464433
MB
1575 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1576 (method git-fetch)
1577 (uri (git-reference
1578 (url "https://chromium.googlesource.com/webm/libvpx")
1579 (commit (string-append "v" version))))
1580 (file-name (git-file-name name version))
d0ed39be
DT
1581 (sha256
1582 (base32
0fd80a25 1583 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
037d5913 1584 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
1585 (build-system gnu-build-system)
1586 (arguments
e896c227 1587 `(#:configure-flags (list "--enable-shared"
1e667df4 1588 "--disable-static"
0e47b4e7
EF
1589 "--as=yasm"
1590 ;; Limit size to avoid CVE-2015-1258
1591 "--size-limit=16384x16384"
e896c227
MB
1592 (string-append "--prefix=" (assoc-ref %outputs "out")))
1593 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1594 (assoc-ref %outputs "out") "/lib"))
1595 #:phases (modify-phases %standard-phases
1596 (replace 'configure
1597 (lambda* (#:key configure-flags #:allow-other-keys)
1598 ;; The configure script does not understand some of the GNU
1599 ;; options, so we only add the flags specified above.
1600 (apply invoke "./configure" configure-flags))))
4f8f15cd 1601 #:tests? #f)) ; no check target
d0ed39be
DT
1602 (native-inputs
1603 `(("perl" ,perl)
1604 ("yasm" ,yasm)))
1605 (synopsis "VP8/VP9 video codec")
1606 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 1607 (license license:bsd-3)
ad7664f6 1608 (home-page "https://www.webmproject.org/")))
615215a5
LC
1609
1610(define-public youtube-dl
1611 (package
1612 (name "youtube-dl")
eeebf572 1613 (version "2020.05.08")
615215a5
LC
1614 (source (origin
1615 (method url-fetch)
ff1d80f3
EF
1616 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1617 "releases/download/" version "/youtube-dl-"
615215a5
LC
1618 version ".tar.gz"))
1619 (sha256
1620 (base32
eeebf572 1621 "16zxa8ss2rka7cvkqyi67s8i1h9f4nxx88w9vjbxchbga6w0scc6"))))
615215a5 1622 (build-system python-build-system)
2ad9515c
AV
1623 (arguments
1624 ;; The problem here is that the directory for the man page and completion
1625 ;; files is relative, and for some reason, setup.py uses the
1626 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1627 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1628 ;; completion file is called 'youtube-dl' rather than
1629 ;; 'youtube-dl.bash-completion'.
31c58006
LF
1630 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1631 #:phases (modify-phases %standard-phases
2ad9515c
AV
1632 (add-before 'install 'fix-the-data-directories
1633 (lambda* (#:key outputs #:allow-other-keys)
1634 (let ((prefix (assoc-ref outputs "out")))
1635 (mkdir "bash-completion")
1636 (rename-file "youtube-dl.bash-completion"
1637 "bash-completion/youtube-dl")
1638 (substitute* "setup.py"
1639 (("youtube-dl\\.bash-completion")
1640 "bash-completion/youtube-dl")
1641 (("'etc/")
1642 (string-append "'" prefix "/etc/"))
1643 (("'share/")
caa8de70 1644 (string-append "'" prefix "/share/")))
4233e74b 1645 #t)))
7884fc43
BW
1646 (add-after 'install 'install-completion
1647 (lambda* (#:key outputs #:allow-other-keys)
1648 (let* ((out (assoc-ref outputs "out"))
1649 (zsh (string-append out
1650 "/share/zsh/site-functions")))
1651 (mkdir-p zsh)
1652 (copy-file "youtube-dl.zsh"
1653 (string-append zsh "/_youtube-dl"))
caa8de70 1654 #t))))))
615215a5
LC
1655 (synopsis "Download videos from YouTube.com and other sites")
1656 (description
b798dfde 1657 "Youtube-dl is a small command-line program to download videos from
1c911690 1658YouTube.com and many more sites.")
39dc7032 1659 (home-page "https://yt-dl.org")
ae0bdd81 1660 (license license:public-domain)))
e6bdb36a 1661
794223bc
CM
1662(define-public youtube-dl-gui
1663 (package
1664 (name "youtube-dl-gui")
1665 (version "0.3.8")
1666 (source
1667 (origin
1668 (method url-fetch)
1669 (uri (pypi-uri "Youtube-DLG" version))
1670 (sha256
1671 (base32
1672 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1673 (build-system python-build-system)
1674 (arguments
1675 ;; In Guix, wxpython has not yet been packaged for Python 3.
1676 `(#:python ,python-2
1677 ;; This package has no tests.
1678 #:tests? #f
1679 #:phases
1680 (modify-phases %standard-phases
1681 (add-before 'build 'patch-source
1682 (lambda* (#:key inputs #:allow-other-keys)
1683 ;; The youtube-dl-gui program lets you configure options. Some of
1684 ;; them are problematic, so we change their defaults.
1685 (substitute* "youtube_dl_gui/optionsmanager.py"
1686 ;; When this is true, the builder process will try (and fail) to
1687 ;; write logs to the builder user's home directory.
1688 (("'enable_log': True") "'enable_log': False")
1689 ;; This determines which youtube-dl program youtube-dl-gui will
1690 ;; run. If we don't set this, then youtube-dl-gui might download
1691 ;; an arbitrary copy from the Internet into the user's home
1692 ;; directory and run it, so let's make sure youtube-dl-gui uses
1693 ;; the youtube-dl from the inputs by default.
1694 (("'youtubedl_path': self.config_path")
1695 (string-append "'youtubedl_path': '"
1696 (assoc-ref inputs "youtube-dl")
1697 "/bin'"))
1698 ;; When this is True, when youtube-dl-gui is finished downloading
1699 ;; a file, it will try (and possibly fail) to open the directory
1700 ;; containing the downloaded file. This can fail because it
1701 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1702 ;; adding xdg-utils to the propagated inputs is not enough to
1703 ;; make this work, so for now we set the default to False.
1704 (("'open_dl_dir': True") "'open_dl_dir': False"))
1705 ;; The youtube-dl program from the inputs is actually a wrapper
1706 ;; script written in bash, so attempting to invoke it as a python
1707 ;; script will fail.
1708 (substitute* "youtube_dl_gui/downloaders.py"
1709 (("cmd = \\['python', self\\.youtubedl_path\\]")
1710 "cmd = [self.youtubedl_path]"))
1711 ;; Use relative paths for installing data files so youtube-dl-gui
1712 ;; installs the files relative to its prefix in the store, rather
1713 ;; than relative to /. Also, instead of installing data files into
1714 ;; $prefix/usr/share, install them into $prefix/share for
1715 ;; consistency (see: (standards) Directory Variables).
1716 (substitute* "setup.py"
1717 (("= '/usr/share") "= 'share"))
1718 ;; Update get_locale_file() so it finds the installed localization
1719 ;; files.
1720 (substitute* "youtube_dl_gui/utils.py"
1721 (("os\\.path\\.join\\('/usr', 'share'")
1722 (string-append "os.path.join('"
1723 (assoc-ref %outputs "out")
9dcfd6aa 1724 "', 'share'")))
db37dd91
TGR
1725 #t))
1726 (add-after 'install 'create-desktop-file
1727 (lambda* (#:key outputs #:allow-other-keys)
1728 (let* ((out (assoc-ref outputs "out"))
1729 (applications (string-append out "/share/applications")))
1730 (mkdir-p applications)
1731 (call-with-output-file
1732 (string-append applications "/youtube-dl-gui.desktop")
1733 (lambda (file)
1734 (format
1735 file
1736 "[Desktop Entry]~@
1737 Name=Youtube-dl GUI~@
1738 Comment=Graphical interface to download video with youtube-dl~@
1739 Exec=youtube-dl-gui~@
1740 TryExec=youtube-dl-gui~@
1741 Terminal=false~@
1742 Icon=youtube-dl-gui~@
1743 Type=Application~@
1744 Categories=AudioVideo;Audio;Video;Network~%")))
1745 #t))))))
794223bc
CM
1746 (inputs
1747 `(("python2-wxpython" ,python2-wxpython)
1748 ("youtube-dl" ,youtube-dl)))
1749 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1750 (synopsis
1751 "GUI (Graphical User Interface) for @command{youtube-dl}")
1752 (description
1753 "Youtube-dlG is a GUI (Graphical User Interface) for
1754@command{youtube-dl}. You can use it to download videos from YouTube and any
1755other site that youtube-dl supports.")
1756 (license license:unlicense)))
1757
72fa6667
FS
1758(define-public you-get
1759 (package
1760 (name "you-get")
ec63b5a4 1761 (version "0.4.1410")
72fa6667 1762 (source (origin
5d9e3edd
RW
1763 (method git-fetch)
1764 (uri (git-reference
1765 (url "https://github.com/soimort/you-get.git")
1766 (commit (string-append "v" version))))
1767 (file-name (git-file-name name version))
72fa6667
FS
1768 (sha256
1769 (base32
ec63b5a4 1770 "1v4lfldcijgngg0s4q5w4ixa0k8k75dwmkhf57pgb31bqlrr8h0s"))))
72fa6667 1771 (build-system python-build-system)
72fa6667 1772 (inputs
5e84eab0
TGR
1773 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1774 (arguments
1775 `(#:phases
1776 (modify-phases %standard-phases
1777 (add-after 'unpack 'qualify-input-references
1778 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1779 ;; happens to be in the user's $PATH at run time.
1780 (lambda* (#:key inputs #:allow-other-keys)
1781 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1782 "/bin/ffmpeg")))
1783 (substitute* "src/you_get/processor/ffmpeg.py"
1784 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1785 ;; same string is also used when sniffing ffmpeg's output.
1786 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1787 (string-append prefix "'" ffmpeg "'")))
1788 #t))))
1789 #:tests? #f)) ; XXX some tests need Internet access
817e91bc 1790 (synopsis "Download videos, audio, or images from Web sites")
72fa6667
FS
1791 (description
1792 "You-Get is a command-line utility to download media contents (videos,
1793audio, images) from the Web. It can use either mpv or vlc for playback.")
1794 (home-page "https://you-get.org/")
1795 (license license:expat)))
1796
6f45e45d
AV
1797(define-public youtube-viewer
1798 (package
1799 (name "youtube-viewer")
b5a26299 1800 (version "3.7.5")
6f45e45d 1801 (source (origin
6be44578
TGR
1802 (method git-fetch)
1803 (uri (git-reference
1804 (url "https://github.com/trizen/youtube-viewer.git")
1805 (commit version)))
1806 (file-name (git-file-name name version))
6f45e45d
AV
1807 (sha256
1808 (base32
b5a26299 1809 "1caz56sxy554avz2vdv9gm7gyqcq0gyixzrh5v9ixmg6vxif5d4f"))))
6f45e45d
AV
1810 (build-system perl-build-system)
1811 (native-inputs
1812 `(("perl-module-build" ,perl-module-build)))
6f45e45d
AV
1813 (inputs
1814 `(("perl-data-dump" ,perl-data-dump)
1815 ("perl-file-sharedir" ,perl-file-sharedir)
1816 ("perl-gtk2" ,perl-gtk2)
1817 ("perl-json" ,perl-json)
b5a26299 1818 ("perl-json-xs" ,perl-json-xs)
6f45e45d
AV
1819 ("perl-libwww" ,perl-libwww)
1820 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
adff7395 1821 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
6f45e45d 1822 ("perl-mozilla-ca" ,perl-mozilla-ca)
adff7395 1823 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
58637415 1824 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
adff7395 1825 ("xdg-utils" ,xdg-utils)
58637415
TGR
1826
1827 ;; Some videos play without youtube-dl, but others silently fail to.
1828 ("youtube-dl" ,youtube-dl)))
6f45e45d
AV
1829 (arguments
1830 `(#:modules ((guix build perl-build-system)
1831 (guix build utils)
1832 (srfi srfi-26))
619edce5
EF
1833 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
1834 ;; is broken without perl-gtk3.
315b98b9 1835 #:module-build-flags '("--gtk2")
63d99002
AV
1836 #:phases
1837 (modify-phases %standard-phases
58637415
TGR
1838 (add-after 'unpack 'refer-to-inputs
1839 (lambda* (#:key inputs #:allow-other-keys)
1840 (substitute* "lib/WWW/YoutubeViewer.pm"
1841 (("'youtube-dl'")
1842 (format #f "'~a/bin/youtube-dl'"
1843 (assoc-ref inputs "youtube-dl"))))
adff7395
EB
1844 (substitute* '("bin/gtk2-youtube-viewer"
1845 "bin/gtk3-youtube-viewer")
1846 (("'xdg-open'")
1847 (format #f "'~a/bin/xdg-open'"
1848 (assoc-ref inputs "xdg-utils"))))
58637415 1849 #t))
0dd8da0b
EB
1850 (add-after 'install 'install-desktop
1851 (lambda* (#:key outputs #:allow-other-keys)
1852 (let* ((out (assoc-ref outputs "out"))
1853 (sharedir (string-append out "/share")))
1854 (install-file "share/gtk-youtube-viewer.desktop"
1855 (string-append sharedir "/applications"))
1856 (install-file "share/icons/gtk-youtube-viewer.png"
1857 (string-append sharedir "/pixmaps"))
1858 #t)))
63d99002
AV
1859 (add-after 'install 'wrap-program
1860 (lambda* (#:key outputs #:allow-other-keys)
1861 (let* ((out (assoc-ref outputs "out"))
1862 (bin-dir (string-append out "/bin/"))
1863 (site-dir (string-append out "/lib/perl5/site_perl/"))
1864 (lib-path (getenv "PERL5LIB")))
1865 (for-each (cut wrap-program <>
1866 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1867 (find-files bin-dir))
1868 #t))))))
6f45e45d
AV
1869 (synopsis
1870 "Lightweight application for searching and streaming videos from YouTube")
1871 (description
1872 "Youtube-viewer searches and plays YouTube videos in a native player.
1873It comes with various search options; it can search for videos, playlists
1874and/or channels. The videos are streamed directly in a selected video player
1875at the best resolution (customizable) and with closed-captions (if available).
1876Both command-line and GTK2 interface are available.")
1877 (home-page "https://github.com/trizen/youtube-viewer")
1878 (license license:perl-license)))
1879
5d3609e4
TUBK
1880(define-public libbluray
1881 (package
1882 (name "libbluray")
004450f4 1883 (version "1.0.2")
5d3609e4
TUBK
1884 (source (origin
1885 (method url-fetch)
5e3f68e6 1886 (uri (string-append "https://download.videolan.org/videolan/"
5d3609e4
TUBK
1887 name "/" version "/"
1888 name "-" version ".tar.bz2"))
1889 (sha256
1890 (base32
004450f4 1891 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
5d3609e4 1892 (build-system gnu-build-system)
6c0cd765 1893 (arguments
d76e2634 1894 `(#:configure-flags '("--disable-bdjava-jar")
6c0cd765
AP
1895 #:phases
1896 (modify-phases %standard-phases
004450f4
TGR
1897 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1898 ;; Avoid the need to propagate libxml2 by referring to it
1899 ;; directly, as is already done for fontconfig & freetype.
1900 (lambda* (#:key inputs #:allow-other-keys)
1901 (let ((libxml2 (assoc-ref inputs "libxml2")))
1902 (substitute* "configure"
1903 ((" libxml-2.0") ""))
1904 (substitute* "src/libbluray.pc.in"
1905 (("^Libs.private:" field)
1906 (string-append field " -L" libxml2 "/lib -lxml2")))
1907 #t)))
6c0cd765
AP
1908 (add-before 'build 'fix-dlopen-paths
1909 (lambda* (#:key inputs #:allow-other-keys)
1910 (let ((libaacs (assoc-ref inputs "libaacs"))
1911 (libbdplus (assoc-ref inputs "libbdplus")))
1912 (substitute* "src/libbluray/disc/aacs.c"
1913 (("\"libaacs\"")
1914 (string-append "\"" libaacs "/lib/libaacs\"")))
1915 (substitute* "src/libbluray/disc/bdplus.c"
1916 (("\"libbdplus\"")
1917 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1918 #t))))))
2da45ebe 1919 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 1920 (inputs
71ee51a0 1921 `(("fontconfig" ,fontconfig)
5d3609e4 1922 ("freetype" ,freetype)
6c0cd765
AP
1923 ("libaacs" ,libaacs)
1924 ("libbdplus" ,libbdplus)
71ee51a0 1925 ("libxml2" ,libxml2)))
5e3f68e6 1926 (home-page "https://www.videolan.org/developers/libbluray.html")
5d3609e4
TUBK
1927 (synopsis "Blu-Ray Disc playback library")
1928 (description
1929 "libbluray is a library designed for Blu-Ray Disc playback for media
1930players, like VLC or MPlayer.")
ae0bdd81 1931 (license license:lgpl2.1+)))
5d3609e4 1932
e6bdb36a
AE
1933(define-public libdvdread
1934 (package
1935 (name "libdvdread")
29f62363 1936 (version "6.0.2")
e6bdb36a
AE
1937 (source (origin
1938 (method url-fetch)
b8a31908 1939 (uri (string-append "https://download.videolan.org/videolan/"
767b4427
TGR
1940 "libdvdread/" version "/"
1941 "libdvdread-" version ".tar.bz2"))
e6bdb36a
AE
1942 (sha256
1943 (base32
29f62363 1944 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
e6bdb36a 1945 (build-system gnu-build-system)
e21f3473
RJ
1946 (arguments
1947 `(#:configure-flags '("--with-libdvdcss=yes")))
1948 (native-inputs
1949 `(("pkg-config" ,pkg-config)))
1950 (propagated-inputs
1951 `(("libdvdcss" ,libdvdcss)))
e6bdb36a
AE
1952 (home-page "http://dvdnav.mplayerhq.hu/")
1953 (synopsis "Library for reading video DVDs")
1954 (description
1955 "Libdvdread provides a simple foundation for reading DVD video
1956disks. It provides the functionality that is required to access many
1957DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1958authentication and descrambling (if an external libdvdcss library is
1959installed).")
ae0bdd81 1960 (license license:gpl2+)))
b027d919 1961
b5b20bda
TD
1962(define-public dvdauthor
1963 (package
1964 (name "dvdauthor")
1965 (version "0.7.2")
1966 (source
1967 (origin
1968 (method url-fetch)
1969 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1970 version ".tar.gz"))
1971 (sha256
1972 (base32
1973 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1974 (build-system gnu-build-system)
1975 (inputs
1976 `(("libdvdread" ,libdvdread)
1977 ("libpng" ,libpng)
1978 ("imagemagick" ,imagemagick)
1979 ("libxml2" ,libxml2)
1980 ("freetype" ,freetype)))
1981 (native-inputs
1982 `(("pkg-config" ,pkg-config)))
1983 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1984 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1985MPEG-2 stream containing VOB packets.")
1986 (home-page "http://dvdauthor.sourceforge.net")
1987 (license license:gpl3+)))
1988
b027d919
AE
1989(define-public libdvdnav
1990 (package
1991 (name "libdvdnav")
059a6e9a 1992 (version "6.0.1")
b027d919
AE
1993 (source (origin
1994 (method url-fetch)
b8a31908 1995 (uri (string-append "https://download.videolan.org/videolan/"
0104ed80
TGR
1996 "libdvdnav/" version "/"
1997 "libdvdnav-" version ".tar.bz2"))
b027d919
AE
1998 (sha256
1999 (base32
059a6e9a 2000 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
b027d919
AE
2001 (build-system gnu-build-system)
2002 (native-inputs
2003 `(("pkg-config" ,pkg-config)))
2004 (inputs
2005 `(("libdvdread" ,libdvdread)))
2006 (home-page "http://dvdnav.mplayerhq.hu/")
2007 (synopsis "Library for video DVD navigation features")
2008 (description
2009 "Libdvdnav is a library for developers of multimedia
2010applications. It allows easy use of sophisticated DVD navigation features
2011such as DVD menus, multiangle playback and even interactive DVD games. All
2012this functionality is provided through a simple API which provides the DVD
2013playback as a single logical stream of blocks, intermitted by special
2014dvdnav events to report certain conditions. The main usage of libdvdnav is
2015a loop regularly calling a function to get the next block, surrounded by
2016additional calls to tell the library of user interaction. The whole
2017DVD virtual machine and internal playback states are completely
2018encapsulated.")
ae0bdd81 2019 (license license:gpl2+)))
2cd85cf9 2020
a6f710ec
TUBK
2021(define-public libdvdcss
2022 (package
2023 (name "libdvdcss")
c77fb2d6 2024 (version "1.4.2")
a6f710ec
TUBK
2025 (source (origin
2026 (method url-fetch)
b8a31908 2027 (uri (string-append "https://download.videolan.org/pub/"
a6f710ec
TUBK
2028 name "/" version "/"
2029 name "-" version ".tar.bz2"))
2030 (sha256
2031 (base32
c77fb2d6 2032 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
a6f710ec 2033 (build-system gnu-build-system)
b8a31908 2034 (home-page "https://www.videolan.org/developers/libdvdcss.html")
a6f710ec
TUBK
2035 (synopsis "Library for accessing DVDs as block devices")
2036 (description
2037 "libdvdcss is a simple library designed for accessing DVDs like a block
2038device without having to bother about the decryption.")
ae0bdd81 2039 (license license:gpl2+)))
a6f710ec 2040
2cd85cf9
DT
2041(define-public srt2vtt
2042 (package
2043 (name "srt2vtt")
2044 (version "0.1")
2045 (source (origin
2046 (method url-fetch)
2047 (uri (string-append
152fc959 2048 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2cd85cf9
DT
2049 version ".tar.gz"))
2050 (sha256
2051 (base32
2052 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
2053 (build-system gnu-build-system)
2054 (inputs
2055 `(("guile" ,guile-2.0)))
2056 (synopsis "SubRip to WebVTT subtitle converter")
2057 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2058for use with HTML5 video.")
373cc3b7 2059 (home-page "https://dthompson.us/projects/srt2vtt.html")
ae0bdd81 2060 (license license:gpl3+)))
44726031
AE
2061
2062(define-public avidemux
2063 (package
2064 (name "avidemux")
ce23c5ff 2065 (version "2.7.4")
44726031
AE
2066 (source (origin
2067 (method url-fetch)
2068 (uri (string-append
7d3ac6c0
TGR
2069 "mirror://sourceforge/avidemux/avidemux/" version "/"
2070 "avidemux_" version ".tar.gz"))
44726031
AE
2071 (sha256
2072 (base32
ce23c5ff 2073 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
fc1adab1 2074 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
2075 (build-system cmake-build-system)
2076 (native-inputs
4632e7c7
EF
2077 `(("perl" ,perl)
2078 ("pkg-config" ,pkg-config)
2079 ("python" ,python-wrapper)
2080 ("qttools" ,qttools)
2081 ("yasm" ,yasm)))
44726031
AE
2082 ;; FIXME: Once packaged, add libraries not found during the build.
2083 (inputs
2084 `(("alsa-lib" ,alsa-lib)
2085 ("fontconfig" ,fontconfig)
2086 ("freetype" ,freetype)
2087 ("fribidi" ,fribidi)
2088 ("glu" ,glu)
44726031
AE
2089 ("jack" ,jack-1)
2090 ("lame" ,lame)
4cafe8ad
EF
2091 ("libva" ,libva)
2092 ("libvdpau" ,libvdpau)
44726031
AE
2093 ("libvorbis" ,libvorbis)
2094 ("libvpx" ,libvpx)
2095 ("libxv" ,libxv)
44726031 2096 ("pulseaudio" ,pulseaudio)
3261a732 2097 ("qtbase" ,qtbase)
44726031 2098 ("sqlite" ,sqlite)
44726031
AE
2099 ("zlib" ,zlib)))
2100 (arguments
37f62896 2101 `(#:tests? #f ; no check target
44726031
AE
2102 #:phases
2103 ;; Make sure files inside the included ffmpeg tarball are
2104 ;; patch-shebanged.
ce23c5ff 2105 (let ((ffmpeg "ffmpeg-4.1.4"))
642de36b
TGR
2106 (modify-phases %standard-phases
2107 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2108 (lambda _
2109 (with-directory-excursion "avidemux_core/ffmpeg_package"
2110 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2111 (delete-file (string-append ffmpeg ".tar.bz2")))
2112 #t))
2113 (add-after 'patch-source-shebangs 'repack-ffmpeg
2114 (lambda _
2115 (with-directory-excursion "avidemux_core/ffmpeg_package"
2116 (substitute* (string-append ffmpeg "/configure")
2117 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2118 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2119 ;; avoid non-determinism in the archive
2120 "--sort=name" "--mtime=@0"
2121 "--owner=root:0" "--group=root:0")
2122 (delete-file-recursively ffmpeg))
2123 #t))
2124 (replace 'configure
2125 (lambda _
2126 ;; Copy-paste settings from the cmake build system.
2127 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2128 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2129 #t))
2130 (replace 'build
2131 (lambda* (#:key inputs outputs #:allow-other-keys)
2132 (let* ((out (assoc-ref outputs "out"))
2133 (lib (string-append out "/lib"))
2134 (top (getcwd))
642de36b
TGR
2135 (build_component
2136 (lambda* (component srcdir #:optional (args '()))
2137 (let ((builddir (string-append "build_" component)))
2138 (mkdir builddir)
2139 (with-directory-excursion builddir
2140 (apply invoke "cmake"
2141 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2142 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2143 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2144 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2145 "\"-Wl,-rpath=" lib "\"")
2146 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
642de36b
TGR
2147 (string-append "../" srcdir)
2148 "-DENABLE_QT5=True"
2149 args)
2150 (invoke "make" "-j"
2151 (number->string (parallel-job-count)))
2152 (invoke "make" "install"))))))
2153 (mkdir out)
2154 (build_component "core" "avidemux_core")
2155 (build_component "cli" "avidemux/cli")
2156 (build_component "qt4" "avidemux/qt4")
2157 (build_component "plugins_common" "avidemux_plugins"
2158 '("-DPLUGIN_UI=COMMON"))
2159 (build_component "plugins_cli" "avidemux_plugins"
2160 '("-DPLUGIN_UI=CLI"))
2161 (build_component "plugins_qt4" "avidemux_plugins"
2162 '("-DPLUGIN_UI=QT4"))
2163 (build_component "plugins_settings" "avidemux_plugins"
2164 '("-DPLUGIN_UI=SETTINGS"))
2165 ;; Remove .exe and .dll file.
2166 (delete-file-recursively
2167 (string-append out "/share/ADM6_addons"))
2168 #t)))
2169 (delete 'install)))))
44726031
AE
2170 (home-page "http://fixounet.free.fr/avidemux/")
2171 (synopsis "Video editor")
2172 (description "Avidemux is a video editor designed for simple cutting,
2173filtering and encoding tasks. It supports many file types, including AVI,
2174DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2175can be automated using projects, job queue and powerful scripting
2176capabilities.")
afd9ed5c 2177 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
44726031 2178 ;; Software with various licenses is included, see License.txt.
ae0bdd81 2179 (license license:gpl2+)))
44726031 2180
6f6c8b65
TUBK
2181(define-public vapoursynth
2182 (package
2183 (name "vapoursynth")
33abf95f 2184 (version "49")
6f6c8b65 2185 (source (origin
97ef6df5
RW
2186 (method git-fetch)
2187 (uri (git-reference
2188 (url "https://github.com/vapoursynth/vapoursynth.git")
2189 (commit (string-append "R" version))))
2190 (file-name (git-file-name name version))
6f6c8b65
TUBK
2191 (sha256
2192 (base32
33abf95f 2193 "1d298mlb24nlc2x7pixfbkd0qbpv4c706c32idsgpi96z1spkhvl"))))
6f6c8b65
TUBK
2194 (build-system gnu-build-system)
2195 (native-inputs
2196 `(("autoconf" ,autoconf)
2197 ("automake" ,automake)
2198 ("cython" ,python-cython)
2199 ("libtool" ,libtool)
2200 ("pkg-config" ,pkg-config)
2201 ("python" ,python)
2202 ("yasm" ,yasm)))
2203 (inputs
2204 `(("ffmpeg" ,ffmpeg)
2205 ("libass" ,libass)
f80d5fe0
EF
2206 ("tesseract-ocr" ,tesseract-ocr)
2207 ("zimg" ,zimg)))
6f6c8b65
TUBK
2208 (home-page "http://www.vapoursynth.com/")
2209 (synopsis "Video processing framework")
2210 (description "VapourSynth is a C++ library and Python module for video
2211manipulation. It aims to be a modern rewrite of Avisynth, supporting
2212multithreading, generalized colorspaces, per frame properties, and videos with
2213format changes.")
9a078f48 2214 ;; src/core/cpufeatures only allows x86, ARM or PPC
cda20ee8
EF
2215 (supported-systems (fold delete %supported-systems
2216 '("mips64el-linux" "aarch64-linux")))
6f6c8b65 2217 ;; As seen from the source files.
ae0bdd81 2218 (license license:lgpl2.1+)))
6f6c8b65 2219
67932f86
TUBK
2220(define-public xvid
2221 (package
2222 (name "xvid")
2a42629f 2223 (version "1.3.7")
67932f86
TUBK
2224 (source (origin
2225 (method url-fetch)
2226 (uri (string-append
e661d5c2 2227 "http://downloads.xvid.com/downloads/xvidcore-"
67932f86
TUBK
2228 version ".tar.bz2"))
2229 (sha256
2230 (base32
2a42629f 2231 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
67932f86
TUBK
2232 (build-system gnu-build-system)
2233 (native-inputs `(("yasm" ,yasm)))
2234 (arguments
2235 '(#:phases
62fe2d47 2236 (modify-phases %standard-phases
2a42629f 2237 (add-before 'configure 'pre-configure
62fe2d47
EF
2238 (lambda _
2239 (chdir "build/generic")
2240 (substitute* "configure"
9dcfd6aa
MW
2241 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2242 #t)))
2a42629f 2243 #:tests? #f)) ; no test suite
67932f86
TUBK
2244 (home-page "https://www.xvid.com/")
2245 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2246 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2247codec library. It uses ASP features such as b-frames, global and quarter
2248pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2249and custom quantization matrices.")
ae0bdd81 2250 (license license:gpl2+)))
e16fde14 2251
f48feaa2 2252(define-public streamlink
15b283e7
EF
2253 (package
2254 (name "streamlink")
567a1453 2255 (version "1.3.1")
15b283e7
EF
2256 (source
2257 (origin
2258 (method url-fetch)
2259 (uri (pypi-uri "streamlink" version))
2260 (sha256
2261 (base32
567a1453 2262 "0cnlg3ra3g6dml4xfy9ysy9b4qwyn458fadd8ac44cfwi3v4gq6y"))))
15b283e7
EF
2263 (build-system python-build-system)
2264 (home-page "https://github.com/streamlink/streamlink")
2265 (native-inputs
2266 `(("python-freezegun" ,python-freezegun)
2267 ("python-pytest" ,python-pytest)
2268 ("python-mock" ,python-mock)
2269 ("python-requests-mock" ,python-requests-mock)))
2270 (propagated-inputs
2271 `(("python-pysocks" ,python-pysocks)
2272 ("python-websocket-client" ,python-websocket-client)
2273 ("python-iso3166" ,python-iso3166)
2274 ("python-iso639" ,python-iso639)
b42b5afd 2275 ("python-isodate" ,python-isodate)
15b283e7
EF
2276 ("python-pycryptodome" ,python-pycryptodome)
2277 ("python-requests" ,python-requests)
2278 ("python-urllib3" ,python-urllib3)))
2279 (synopsis "Extract streams from various services")
2280 (description "Streamlink is command-line utility that extracts streams
f48feaa2 2281from sites like Twitch.tv and pipes them into a video player of choice.")
15b283e7 2282 (license license:bsd-2)))
f48feaa2 2283
e5e5eb1f 2284(define-public twitchy
04b6e9c5 2285 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
e5e5eb1f
OP
2286 (package
2287 (name "twitchy")
04b6e9c5 2288 (version (git-version "3.4" "1" commit))
e5e5eb1f
OP
2289 (source
2290 (origin
2291 (method git-fetch)
2292 (uri (git-reference
2293 (url "https://github.com/BasioMeusPuga/twitchy.git")
2294 (commit commit)))
2295 (file-name (git-file-name name version))
2296 (sha256
2297 (base32
04b6e9c5 2298 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
e5e5eb1f
OP
2299 (build-system python-build-system)
2300 (arguments
2301 '(#:phases
2302 (modify-phases %standard-phases
04b6e9c5
TE
2303 (add-after 'unpack 'patch-paths
2304 (lambda* (#:key inputs #:allow-other-keys)
2305 (substitute* "twitchy/twitchy_play.py"
2306 (("\"streamlink ")
2307 (string-append "\"" (assoc-ref inputs "streamlink")
2308 "/bin/streamlink ")))
2309 #t))
e5e5eb1f
OP
2310 (add-before 'check 'check-setup
2311 (lambda _
2312 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
ca82bdfd
OP
2313 #t))
2314 (add-after 'install 'install-rofi-plugin
2315 (lambda* (#:key outputs #:allow-other-keys)
2316 (install-file "plugins/rofi-twitchy"
2317 (string-append (assoc-ref outputs "out")
9dcfd6aa
MW
2318 "/bin"))
2319 #t)))))
e5e5eb1f
OP
2320 (inputs
2321 `(("python-requests" ,python-requests)
2322 ("streamlink" ,streamlink)))
2323 (home-page "https://github.com/BasioMeusPuga/twitchy")
2324 (synopsis "Command-line interface for Twitch.tv")
2325 (description
2326 "This package provides a command-line interface for Twitch.tv")
2327 (license license:gpl3+))))
2328
307ad140
RW
2329(define-public mlt
2330 (package
2331 (name "mlt")
3e1ccbef 2332 (version "6.18.0")
307ad140 2333 (source (origin
520b5d06
RW
2334 (method git-fetch)
2335 (uri (git-reference
2336 (url "https://github.com/mltframework/mlt.git")
2337 (commit (string-append "v" version))))
2338 (file-name (git-file-name name version))
307ad140
RW
2339 (sha256
2340 (base32
3e1ccbef 2341 "0iiqym15n8kbnjzj0asmm86gs23yykz0va5b475cc4v2vv5admgx"))))
307ad140
RW
2342 (build-system gnu-build-system)
2343 (arguments
7acc52f9 2344 `(#:tests? #f ; no tests
0fe041bd 2345 #:make-flags '("CC=gcc" "CXX=g++")
307ad140
RW
2346 #:configure-flags
2347 (list "--enable-gpl3"
2348 "--enable-gpl")
2349 #:phases
2350 (modify-phases %standard-phases
2351 (add-after
7acc52f9
TGR
2352 'configure 'override-LDFLAGS
2353 (lambda* (#:key outputs #:allow-other-keys)
2354 (substitute* "config.mak"
2355 (("LDFLAGS\\+=")
2356 (string-append "LDFLAGS+=-Wl,-rpath="
2357 (assoc-ref outputs "out")
2358 "/lib ")))
2359 #t)))))
307ad140
RW
2360 (inputs
2361 `(("alsa-lib" ,alsa-lib)
bb5c508c 2362 ("ffmpeg" ,ffmpeg-3.4)
307ad140 2363 ("fftw" ,fftw)
e7cdd311
MM
2364 ("frei0r-plugins" ,frei0r-plugins)
2365 ("gdk-pixbuf" ,gdk-pixbuf)
2366 ("gtk+" ,gtk+-2)
307ad140
RW
2367 ("libxml2" ,libxml2)
2368 ("jack" ,jack-1)
2369 ("ladspa" ,ladspa)
2370 ("libsamplerate" ,libsamplerate)
4c7729dc 2371 ("pulseaudio" ,pulseaudio)
e7cdd311
MM
2372 ("qtbase" ,qtbase)
2373 ("qtsvg" ,qtsvg)
307ad140
RW
2374 ("sdl" ,sdl)
2375 ("sox" ,sox)))
2376 (native-inputs
2377 `(("pkg-config" ,pkg-config)))
4c7729dc 2378 (home-page "https://www.mltframework.org/")
307ad140
RW
2379 (synopsis "Author, manage, and run multitrack audio/video compositions")
2380 (description
2381 "MLT is a multimedia framework, designed and developed for television
2382broadcasting. It provides a toolkit for broadcasters, video editors, media
2383players, transcoders, web streamers and many more types of applications. The
2384functionality of the system is provided via an assortment of ready to use
2385tools, XML authoring components, and an extensible plug-in based API.")
42b9541c 2386 (license license:gpl3)))
f464016d 2387
945d985a
DT
2388(define-public v4l-utils
2389 (package
2390 (name "v4l-utils")
fdf1108a 2391 (version "1.16.6")
945d985a
DT
2392 (source (origin
2393 (method url-fetch)
1d4ac724 2394 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
2395 "/v4l-utils-" version ".tar.bz2"))
2396 (sha256
2397 (base32
fdf1108a 2398 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
945d985a
DT
2399 (build-system gnu-build-system)
2400 (arguments
2401 '(#:configure-flags
2402 (list (string-append "--with-udevdir="
2403 (assoc-ref %outputs "out")
0fe041bd 2404 "/lib/udev"))))
945d985a 2405 (native-inputs
4ca077d5
TGR
2406 `(("perl" ,perl)
2407 ("pkg-config" ,pkg-config)))
945d985a
DT
2408 (inputs
2409 `(("alsa-lib" ,alsa-lib)
2410 ("glu" ,glu)
4bd428a7 2411 ("libjpeg" ,libjpeg-turbo)
945d985a 2412 ("libx11" ,libx11)
b37662e2 2413 ("qtbase" ,qtbase)
945d985a
DT
2414 ("eudev" ,eudev)))
2415 (synopsis "Realtime video capture utilities for Linux")
2416 (description "The v4l-utils provide a series of libraries and utilities to
2417be used for realtime video capture via Linux-specific APIs.")
2418 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2419 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2420 (license (list license:lgpl2.1+ license:gpl2))))
2421
f464016d
DT
2422(define-public obs
2423 (package
2424 (name "obs")
ce5f4701 2425 (version "25.0.7")
f464016d 2426 (source (origin
2f069a1f
RW
2427 (method git-fetch)
2428 (uri (git-reference
a42bdd1c 2429 (url "https://github.com/obsproject/obs-studio.git")
2f069a1f
RW
2430 (commit version)))
2431 (file-name (git-file-name name version))
f464016d
DT
2432 (sha256
2433 (base32
ce5f4701 2434 "02ppkp1j5yxnxv663nz5wv4vbcg3k53l43xq94d1p1b3j4wxwq8b"))))
f464016d 2435 (build-system cmake-build-system)
08858812 2436 (arguments
6854a5d5 2437 `(#:tests? #f)) ; no tests
f464016d
DT
2438 (native-inputs
2439 `(("pkg-config" ,pkg-config)))
2440 (inputs
4f98c3c5
EF
2441 `(("alsa-lib" ,alsa-lib)
2442 ("curl" ,curl)
f464016d
DT
2443 ("eudev" ,eudev)
2444 ("ffmpeg" ,ffmpeg)
4f98c3c5 2445 ("fontconfig" ,fontconfig)
f464016d
DT
2446 ("freetype" ,freetype)
2447 ("jack" ,jack-1)
2448 ("jansson" ,jansson)
2449 ("libx264" ,libx264)
2450 ("libxcomposite" ,libxcomposite)
2451 ("mesa" ,mesa)
2452 ("pulseaudio" ,pulseaudio)
90a2309b 2453 ("qtbase" ,qtbase)
900ddbf5 2454 ("qtsvg" ,qtsvg)
90a2309b 2455 ("qtx11extras" ,qtx11extras)
4f98c3c5 2456 ("speex" ,speex)
d4df2032 2457 ("v4l-utils" ,v4l-utils)
f464016d
DT
2458 ("zlib" ,zlib)))
2459 (synopsis "Live streaming software")
2460 (description "Open Broadcaster Software provides a graphical interface for
2461video recording and live streaming. OBS supports capturing audio and video
2462from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2463and JACK.")
2464 (home-page "https://obsproject.com")
f3bd1728 2465 (supported-systems '("x86_64-linux" "i686-linux"))
f464016d 2466 (license license:gpl2+)))
d5650f86
EF
2467
2468(define-public libvdpau
2469 (package
2470 (name "libvdpau")
65ff644e 2471 (version "1.3")
d5650f86
EF
2472 (source
2473 (origin
65ff644e
RH
2474 (method git-fetch)
2475 (uri (git-reference
2476 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2477 (commit version)))
2478 (file-name (git-file-name name version))
d5650f86
EF
2479 (sha256
2480 (base32
65ff644e
RH
2481 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2482 (build-system meson-build-system)
d5650f86
EF
2483 (native-inputs
2484 `(("pkg-config" ,pkg-config)))
2485 (inputs
3993a28a
MB
2486 `(("libx11" ,libx11 "out")
2487 ("libxext" ,libxext)
2488 ("xorgproto" ,xorgproto)))
d5650f86
EF
2489 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2490 (synopsis "Video Decode and Presentation API")
2491 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2492provides an interface to video decode acceleration and presentation hardware
2493present in modern GPUs.")
2494 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
2495
2496(define-public vdpauinfo
2497 (package
2498 (name "vdpauinfo")
2499 (version "1.0")
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2504 name "-" version ".tar.gz"))
2505 (sha256
2506 (base32
2507 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2508 (build-system gnu-build-system)
2509 (native-inputs
2510 `(("pkg-config" ,pkg-config)
2511 ("libx11" ,libx11)))
2512 (propagated-inputs
2513 `(("libvdpau" ,libvdpau)))
2514 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2515 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2516 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2517implementation.")
2518 (license (license:x11-style "file://COPYING"))))
a7d94b54 2519
67df7164
EF
2520(define-public libvdpau-va-gl
2521 (package
2522 (name "libvdpau-va-gl")
2523 (version "0.4.2")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2528 "releases/download/v" version "/libvdpau-va-gl-"
2529 version ".tar.gz"))
2530 (sha256
2531 (base32
2532 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2533 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2534 (modules '((guix build utils)))
6cbee49d
MW
2535 (snippet '(begin (delete-file-recursively "3rdparty")
2536 #t))))
67df7164
EF
2537 (build-system cmake-build-system)
2538 (arguments
2539 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2540 (native-inputs
2541 `(("libvdpau" ,libvdpau)
2542 ("pkg-config" ,pkg-config)))
2543 (inputs
2544 `(("libva" ,libva)
2545 ("mesa" ,mesa)))
2546 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2547 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2548 (description
2549 "Many applications can use VDPAU to accelerate portions of the video
2550decoding process and video post-processing to the GPU video hardware. Since
2551there is no VDPAU available on Intel chips, they fall back to different drawing
2552techniques. This driver uses OpenGL under the hood to accelerate drawing and
2553scaling and VA-API (if available) to accelerate video decoding.")
2554 (license license:expat)))
2555
a7d94b54
LC
2556(define-public recordmydesktop
2557 (package
2558 (name "recordmydesktop")
2559 (version "0.3.8.1")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2563 version "/recordmydesktop-" version ".tar.gz"))
2564 (sha256
2565 (base32
2566 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2567 (build-system gnu-build-system)
2568 (inputs `(("popt" ,popt)
2569 ("zlib" ,zlib)
2570 ("libx11" ,libx11)
2571 ("libice" ,libice)
2572 ("libsm" ,libsm)
2573 ("libxfixes" ,libxfixes)
2574 ("libxdamage" ,libxdamage)
2575 ("libxext" ,libxext)
ed6ba9cc 2576 ("alsa-lib" ,alsa-lib)
a7d94b54
LC
2577 ("libvorbis" ,libvorbis)
2578 ("libtheora" ,libtheora)))
2579 (home-page "http://recordmydesktop.sourceforge.net/")
2580 (synopsis "Desktop session video recorder")
2581 (description
2582 "recordMyDesktop is a command-line tool that captures the activity in
2583your graphical desktop and encodes it as a video. This is a useful tool for
2584making @dfn{screencasts}.")
2585 (license license:gpl2+)))
d8841cc5 2586
63cd4d53
AV
2587(define-public simplescreenrecorder
2588 (package
2589 (name "simplescreenrecorder")
8332ac03 2590 (version "0.3.11")
63cd4d53
AV
2591 (source
2592 (origin
21309b8b
RW
2593 (method git-fetch)
2594 (uri (git-reference
2595 (url "https://github.com/MaartenBaert/ssr.git")
2596 (commit version)))
2597 (file-name (git-file-name name version))
63cd4d53
AV
2598 (sha256
2599 (base32
21309b8b 2600 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
83c92882 2601 (build-system cmake-build-system)
63cd4d53
AV
2602 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2603 ;; README.md, the program builds and functions properly without them.
2604 ;; As a result, they are omitted. Please add them back if problems appear.
2605 (inputs
2606 `(("alsa-lib" ,alsa-lib)
8332ac03 2607 ("ffmpeg" ,ffmpeg)
63cd4d53
AV
2608 ("glu" ,glu)
2609 ("jack" ,jack-1)
2610 ("libxi" ,libxi)
2611 ("pulseaudio" ,pulseaudio)
91562061
MB
2612 ("qtbase" ,qtbase)
2613 ("qtx11extras" ,qtx11extras)))
63cd4d53 2614 (native-inputs `(("pkg-config" ,pkg-config)))
83c92882
TGR
2615 (arguments
2616 `(#:configure-flags
2617 (list "-DWITH_QT5=TRUE")
2618 #:tests? #f)) ; no test suite
63cd4d53 2619 ;; Using HTTPS causes part of the page to be displayed improperly.
10b52f46 2620 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
63cd4d53
AV
2621 (synopsis "Screen recorder")
2622 (description "SimpleScreenRecorder is an easy to use screen recorder with
2623a graphical user interface. It supports recording the entire screen, or a
2624part of it, and allows encoding in many different codecs and file formats.
2625Other features include a live preview and live streaming.")
2626 (license (list license:gpl3+ ; most files
2627 license:zlib ; glinject/elfhacks.*
2628 license:isc ; glinject/*
2629 license:x11)))) ; build-aux/install-sh
2630
d8841cc5
KK
2631(define-public libsmpeg
2632 (package
2633 (name "libsmpeg")
d7764d42 2634 (version "0.4.5-401")
d8841cc5
KK
2635 (source (origin
2636 (method svn-fetch)
2637 (uri (svn-reference
2638 (url "svn://svn.icculus.org/smpeg/trunk/")
2639 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
b9af0564 2640 (file-name (string-append name "-" version "-checkout"))
d8841cc5
KK
2641 (sha256
2642 (base32
2643 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2644 (build-system gnu-build-system)
27130ee8
LC
2645 (arguments
2646 ;; libsmpeg fails to build with -std=c++11, which is the default with
2647 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2648 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
d8841cc5
KK
2649 (native-inputs
2650 `(("autoconf" ,autoconf)
2651 ("automake" ,automake)))
2652 (inputs
2653 `(("sdl" ,sdl2)))
84f19b1d 2654 (home-page "https://icculus.org/smpeg/")
d8841cc5
KK
2655 (synopsis "SDL MPEG decoding library")
2656 (description
2657 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2658with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2659player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2660library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2661and MPEG system streams.")
2662 (license (list license:expat
2663 license:lgpl2.1
2664 license:lgpl2.1+
2665 license:gpl2))))
4df07622 2666
d7764d42
RW
2667;; for btanks
2668(define-public libsmpeg-with-sdl1
2669 (package (inherit libsmpeg)
2670 (name "libsmpeg")
2671 (version "0.4.5-399")
2672 (source (origin
2673 (method svn-fetch)
2674 (uri (svn-reference
2675 (url "svn://svn.icculus.org/smpeg/trunk/")
2676 (revision 399))) ; tagged release 0.4.5
2677 (file-name (string-append name "-" version "-checkout"))
2678 (sha256
2679 (base32
2680 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2681 (inputs
2682 `(("sdl" ,sdl)))))
2683
4df07622
AP
2684(define-public libbdplus
2685 (package
2686 (name "libbdplus")
2687 (version "0.1.2")
2688 (source
2689 (origin
2690 (method url-fetch)
6f13c4fd 2691 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
4df07622
AP
2692 version "/" name "-" version ".tar.bz2"))
2693 (sha256
2694 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2695 (inputs
2696 `(("libgcrypt" ,libgcrypt)))
2697 (build-system gnu-build-system)
b8a31908 2698 (home-page "https://www.videolan.org/developers/libbdplus.html")
4df07622
AP
2699 (synopsis "Library for decrypting certain Blu-Ray discs")
2700 (description "libbdplus is a library which implements the BD+ System
2701specifications.")
2702 (license license:lgpl2.1+)))
8dd6fc51
AP
2703
2704(define-public libaacs
2705 (package
2706 (name "libaacs")
ba58886a 2707 (version "0.9.0")
8dd6fc51
AP
2708 (source
2709 (origin
2710 (method url-fetch)
6c2481ef 2711 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
8dd6fc51
AP
2712 version "/" name "-" version ".tar.bz2"))
2713 (sha256
ba58886a 2714 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
8dd6fc51
AP
2715 (inputs
2716 `(("libgcrypt" ,libgcrypt)))
2717 (native-inputs
2718 `(("bison" ,bison)
2719 ("flex" ,flex)))
2720 (build-system gnu-build-system)
b8a31908 2721 (home-page "https://www.videolan.org/developers/libaacs.html")
8dd6fc51
AP
2722 (synopsis "Library for decrypting certain Blu-Ray discs")
2723 (description "libaacs is a library which implements the Advanced Access
2724Content System specification.")
2725 (license license:lgpl2.1+)))
05234973 2726
2727(define-public mps-youtube
2728 (package
2729 (name "mps-youtube")
c53fa8c8 2730 (version "0.2.8")
05234973 2731 (source
2732 (origin
e0a80ee4
RW
2733 (method git-fetch)
2734 (uri (git-reference
2735 (url "https://github.com/mps-youtube/mps-youtube.git")
2736 (commit (string-append "v" version))))
2737 (file-name (git-file-name name version))
05234973 2738 (sha256
2739 (base32
e0a80ee4 2740 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
05234973 2741 (build-system python-build-system)
175d6264 2742 (arguments
2743 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2744 ;; test suite results differ depending on the country and also introduce
2745 ;; non-determinism in the tests.
2746 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2747 `(#:tests? #f))
05234973 2748 (propagated-inputs
2749 `(("python-pafy" ,python-pafy)
2750 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2751 (home-page "https://github.com/mps-youtube/mps-youtube")
2752 (synopsis "Terminal based YouTube player and downloader")
2753 (description
2754 "@code{mps-youtube} is based on mps, a terminal based program to
2755search, stream and download music. This implementation uses YouTube as
2756a source of content and can play and download video as well as audio.
2757It can use either mpv or mplayer for playback, and for conversion of
2758formats ffmpeg or libav is used. Users should install one of the
2759supported players in addition to this package.")
2760 (license license:gpl3+)))
fe047e13
EB
2761
2762(define-public handbrake
2763 (package
2764 (name "handbrake")
147499a4 2765 (version "1.3.2")
fe047e13
EB
2766 (source (origin
2767 (method url-fetch)
147499a4
TGR
2768 (uri (string-append "https://github.com/HandBrake/HandBrake/"
2769 "releases/download/" version "/"
2770 "HandBrake-" version "-source.tar.bz2"))
fe047e13
EB
2771 (sha256
2772 (base32
147499a4 2773 "0w7jxjrccvxp7g15dv0spildg5apmqp4gwbcqmg58va2gylynvzc"))
fe047e13
EB
2774 (modules '((guix build utils)))
2775 (snippet
37b82ccc
EB
2776 ;; Remove "contrib" and source not necessary for
2777 ;; building/running under a GNU environment.
fe047e13 2778 '(begin
37b82ccc 2779 (for-each delete-file-recursively
dc3e62a4 2780 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
37b82ccc
EB
2781 (substitute* "make/include/main.defs"
2782 ;; Disable unconditional inclusion of "contrib" libraries
2783 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2784 ;; which would lead to fetching and building of these
2785 ;; libraries. Use our own instead.
2786 (("MODULES \\+= contrib") "# MODULES += contrib"))
dc3e62a4 2787 #t))))
fe047e13
EB
2788 (build-system glib-or-gtk-build-system)
2789 (native-inputs
dc3e62a4 2790 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
fe047e13 2791 ("autoconf" ,autoconf)
fe047e13
EB
2792 ("intltool" ,intltool)
2793 ("libtool" ,libtool)
2794 ("pkg-config" ,pkg-config)
dc3e62a4 2795 ("python" ,python-2))) ; For configuration
fe047e13
EB
2796 (inputs
2797 `(("bzip2" ,bzip2)
2798 ("dbus-glib" ,dbus-glib)
37b82ccc 2799 ("ffmpeg" ,ffmpeg)
fe047e13
EB
2800 ("fontconfig" ,fontconfig)
2801 ("freetype" ,freetype)
2802 ("glib" ,glib)
2803 ("gstreamer" ,gstreamer)
2804 ("gst-plugins-base" ,gst-plugins-base)
2805 ("gtk+" ,gtk+)
37b82ccc 2806 ("jansson" ,jansson)
fe047e13
EB
2807 ("lame" ,lame)
2808 ("libass" ,libass)
2809 ("libbluray" ,libbluray)
dc3e62a4 2810 ("libdav1d" ,dav1d)
fe047e13
EB
2811 ("libdvdnav" ,libdvdnav)
2812 ("libdvdread" ,libdvdread)
2813 ("libgudev" ,libgudev)
2814 ("libmpeg2" ,libmpeg2)
2815 ("libnotify" ,libnotify)
dc3e62a4 2816 ("libnuma" ,numactl)
fe047e13 2817 ("libogg" ,libogg)
37b82ccc 2818 ("libopus" ,opus)
fe047e13
EB
2819 ("libsamplerate" ,libsamplerate)
2820 ("libtheora" ,libtheora)
2821 ("libvorbis" ,libvorbis)
2822 ("libvpx" ,libvpx)
2823 ("libxml2" ,libxml2)
2824 ("libx264" ,libx264)
4bdd41bb 2825 ("speex" ,speex)
fe047e13
EB
2826 ("x265" ,x265)
2827 ("zlib" ,zlib)))
2828 (arguments
2829 `(#:tests? #f ;tests require Ruby and claim to be unsupported
37b82ccc 2830 #:configure-flags
4bdd41bb 2831 (list "--disable-gtk-update-checks"
dc3e62a4 2832 "--disable-nvenc"
4bdd41bb 2833 (string-append "CPPFLAGS=-I"
37b82ccc
EB
2834 (assoc-ref %build-inputs "libxml2")
2835 "/include/libxml2")
2836 "LDFLAGS=-lx265")
fe047e13
EB
2837 #:phases
2838 (modify-phases %standard-phases
189be331 2839 (replace 'bootstrap
fe047e13
EB
2840 ;; Run bootstrap ahead of time so that shebangs get patched.
2841 (lambda _
2842 (setenv "CONFIG_SHELL" (which "sh"))
fe047e13
EB
2843 ;; Patch the Makefile so that it doesn't bootstrap again.
2844 (substitute* "gtk/module.rules"
dc3e62a4
EB
2845 ((".*autoreconf.*") ""))
2846 (with-directory-excursion "gtk"
2847 (invoke "autoreconf" "-fiv"))))
2848 (add-before 'configure 'patch-SHELL
2849 (lambda _
2850 (substitute* "gtk/po/Makefile.in.in"
2851 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
2852 #t))
2853 (add-before 'configure 'relax-reqs
2854 (lambda _
2855 (substitute* "make/configure.py"
2856 ;; cmake is checked for so that it can be used to build
2857 ;; contrib/harfbuzz and contrib/x265, but we get these as
2858 ;; inputs, so don't abort if it's not found. Similarly, meson
2859 ;; and ninja are only needed for contrib/libdav1d, and nasm
2860 ;; only for libvpx
2861 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
2862 (string-append & "False")))
2863 #t))
fe047e13
EB
2864 (replace 'configure
2865 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2866 ;; 'configure' is not an autoconf-generated script, and
2867 ;; errors on unrecognized arguments,
2868 ;; e.g. --enable-fast-install
2869 (let ((out (assoc-ref outputs "out")))
da6f345c
TGR
2870 (apply invoke "./configure"
2871 (string-append "--prefix=" out)
2872 (or configure-flags '())))))
fe047e13
EB
2873 (add-after 'configure 'chdir-build
2874 (lambda _ (chdir "./build") #t)))))
2875 (home-page "https://handbrake.fr")
2876 (synopsis "Video transcoder")
2877 (description
2878 "HandBrake is a tool for converting video from any format to a selection
2879of modern, widely supported codecs.")
37b82ccc
EB
2880 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2881 ;; Combination under GPLv2. See LICENSE.
2882 (license license:gpl2)))
590abe01 2883
d8d7565b
TGR
2884(define-public intel-vaapi-driver
2885 (package
2886 (name "intel-vaapi-driver")
02d6e27e 2887 (version "2.4.0")
d8d7565b
TGR
2888 (source
2889 (origin
2890 (method url-fetch)
2891 (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
2892 "releases/download/" version "/intel-vaapi-driver-"
2893 version ".tar.bz2"))
2894 (sha256
02d6e27e 2895 (base32 "12fhydgwpvyh97gxqlgv77wsf9yax321h46vi49j4sxghpcxvqki"))))
d8d7565b
TGR
2896 (build-system gnu-build-system)
2897 (native-inputs
2898 `(("pkg-config" ,pkg-config)))
2899 (inputs
2900 `(("libdrm" ,libdrm)
2901 ("libva" ,libva)
2902 ("libx11" ,libx11)))
2903 (arguments
2904 `(#:phases
2905 (modify-phases %standard-phases
2906 (add-before 'configure 'set-target-directory
2907 (lambda* (#:key outputs #:allow-other-keys)
2908 (let ((out (assoc-ref outputs "out")))
2909 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2910 #t))))))
2911 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2912 ;; this to all VA-API back ends instead of once to libva.
2913 (native-search-paths
2914 (list (search-path-specification
2915 (variable "LIBVA_DRIVERS_PATH")
2916 (files '("lib/dri")))))
3935507f 2917 (supported-systems '("i686-linux" "x86_64-linux"))
d8d7565b
TGR
2918 (home-page "https://01.org/linuxmedia/vaapi")
2919 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2920 (description
2921 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2922hardware-accelerated video processing on Intel GEN Graphics devices supported by
2923the i915 driver, such as integrated Intel HD Graphics. It provides access to
2924both hardware and shader functionality for faster encoding, decoding, and
2925post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2926 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2927 license:expat)))) ; the rest, excluding the test suite
2928
590abe01
JN
2929(define-public openh264
2930 (package
2931 (name "openh264")
20ab6851 2932 (version "2.1.0")
590abe01 2933 (source (origin
20ab6851
MB
2934 (method git-fetch)
2935 (uri (git-reference
2936 (url "https://github.com/cisco/openh264")
2937 (commit (string-append "v" version))))
2938 (file-name (git-file-name name version))
590abe01
JN
2939 (sha256
2940 (base32
20ab6851 2941 "1wba260n1932vafd5ni2jqv9kzc7lj6a1asm1cqk8jv690m6zvpi"))))
590abe01
JN
2942 (build-system gnu-build-system)
2943 (native-inputs
2944 `(("nasm" ,nasm)
2945 ("python" ,python)))
2946 (arguments
8363a835
EF
2947 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2948 "CC=gcc")
590abe01
JN
2949 #:test-target "test"
2950 #:phases (modify-phases %standard-phases
2951 ;; no configure script
2952 (delete 'configure))))
e11639f3 2953 (home-page "https://www.openh264.org/")
590abe01
JN
2954 (synopsis "H264 decoder library")
2955 (description
2956 "Openh264 is a library which can decode H264 video streams.")
2957 (license license:bsd-2)))
3a44c7bb 2958
2959(define-public libmp4v2
2960 (package
2961 (name "libmp4v2")
2962 (version "2.0.0")
2963 (source
2964 (origin
2965 (method url-fetch)
2966 ;; XXX: The new location of upstream is uncertain and will become relevant the
2967 ;; moment when the googlecode archive shuts down. It is past the date it
2968 ;; should've been turned off. I tried to communicate with upstream, but this
2969 ;; wasn't very responsive and not very helpful. The short summary is, it is
2970 ;; chaos when it comes to the amount of forks and only time will tell where
2971 ;; the new upstream location is.
2972 (uri (string-append "https://storage.googleapis.com/google-"
2973 "code-archive-downloads/v2/"
2974 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2975 (file-name (string-append name "-" version ".tar.bz2"))
995c30d0 2976 (patches (search-patches "libmp4v2-c++11.patch"))
3a44c7bb 2977 (sha256
2978 (base32
2979 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2980 (build-system gnu-build-system)
2981 (outputs '("out"
2982 "static")) ; 3.7MiB .a file
2983 (arguments
2984 `(#:phases
2985 (modify-phases %standard-phases
2986 (add-after 'unpack 'remove-dates
2987 (lambda _
2988 ;; Make the build reproducible.
2989 (substitute* "configure"
2990 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2991 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2992 #t))
2993 (add-after 'install 'move-static-libraries
2994 (lambda* (#:key outputs #:allow-other-keys)
2995 ;; Move static libraries to the "static" output.
2996 (let* ((out (assoc-ref outputs "out"))
2997 (lib (string-append out "/lib"))
2998 (static (assoc-ref outputs "static"))
2999 (slib (string-append static "/lib")))
3000 (mkdir-p slib)
3001 (for-each (lambda (file)
3002 (install-file file slib)
3003 (delete-file file))
3004 (find-files lib "\\.a$"))
3005 #t))))))
3006 (native-inputs
3007 `(("help2man" ,help2man)
3008 ("dejagnu" ,dejagnu)))
3009 (home-page "https://code.google.com/archive/p/mp4v2/")
3010 (synopsis "API to create and modify mp4 files")
3011 (description
3012 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3013ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3014file format that has been used as a multimedia file format in a variety of platforms and
3015applications. It is a very powerful and extensible format that can accommodate
3016practically any type of media.")
3017 (license license:mpl1.1)))
e0c40707
EJ
3018
3019(define-public libmediainfo
3020 (package
3021 (name "libmediainfo")
3022 (version "0.7.95")
3023 (source (origin
3024 (method url-fetch)
3025 (uri (string-append "https://mediaarea.net/download/source/"
3026 name "/" version"/"
3027 name "_" version ".tar.bz2"))
3028 (sha256
3029 (base32
3030 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
3031 ;; TODO add a Big Buck Bunny webm for tests.
3032 (native-inputs
3033 `(("autoconf" ,autoconf)
3034 ("automake" ,automake)
3035 ("libtool" ,libtool)
3036 ("pkg-config" ,pkg-config)
3037 ("zlib" ,zlib)
3038 ("tinyxml2" ,tinyxml2)
3039 ("curl" ,curl)
3040 ("libzen" ,libzen)))
3041 (build-system gnu-build-system)
3042 (arguments
3043 '(#:tests? #f ; see above TODO
3044 #:phases
3045 ;; build scripts not in root of archive
3046 (modify-phases %standard-phases
0cae36b5 3047 (add-after 'unpack 'change-to-build-dir
e0c40707 3048 (lambda _
0cae36b5 3049 (chdir "Project/GNU/Library")
1d05b683 3050 #t)))))
e0c40707
EJ
3051 (home-page "https://mediaarea.net/en/MediaInfo")
3052 (synopsis "Library for retrieving media metadata")
3053 (description "MediaInfo is a library used for retrieving technical
3054information and other metadata about audio or video files. A non-exhaustive
3055list of the information MediaInfo can retrieve from media files include:
3056
3057@itemize
3058@item General: title, author, director, album, track number, date, duration...
3059@item Video: codec, aspect, fps, bitrate...
3060@item Audio: codec, sample rate, channels, language, bitrate...
3061@item Text: language of subtitle
3062@item Chapters: number of chapters, list of chapters
3063@end itemize
3064
3065MediaInfo supports the following formats:
3066
3067@itemize
3068@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3069MPEG-2, MPEG-4, DVD (VOB)...
3070@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3071@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3072@item Subtitles: SRT, SSA, ASS, SAMI...
3073@end itemize\n")
3074 (license license:bsd-2)))
3075
d5fa2777
EJ
3076;; TODO also have a GUI version available
3077(define-public mediainfo
3078 (package
3079 (name "mediainfo")
f528588a 3080 (version "18.12")
d5fa2777
EJ
3081 (source (origin
3082 (method url-fetch)
f528588a
PN
3083 ;; Warning: This source has proved unreliable 1 time at least.
3084 ;; Consider an alternate source or report upstream if this
3085 ;; happens again.
d5fa2777
EJ
3086 (uri (string-append "https://mediaarea.net/download/source/"
3087 name "/" version "/"
3088 name "_" version ".tar.bz2"))
3089 (sha256
3090 (base32
f528588a 3091 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
d5fa2777
EJ
3092 (native-inputs
3093 `(("autoconf" ,autoconf)
3094 ("automake" ,automake)
3095 ("libtool" ,libtool)
3096 ("pkg-config" ,pkg-config)
3097 ("zlib" ,zlib)
c695fb76 3098 ("libmediainfo" ,libmediainfo)
d5fa2777
EJ
3099 ("libzen" ,libzen)))
3100 (build-system gnu-build-system)
3101 (arguments
3102 '(#:tests? #f ; lacks tests
3103 #:phases
3104 ;; build scripts not in root of archive
3105 (modify-phases %standard-phases
2f17187f 3106 (add-after 'unpack 'change-to-build-dir
d5fa2777 3107 (lambda _
2f17187f 3108 (chdir "Project/GNU/CLI")
f528588a 3109 #t)))))
d5fa2777
EJ
3110 (home-page "https://mediaarea.net/en/MediaInfo")
3111 (synopsis "Utility for reading media metadata")
3112 (description "MediaInfo is a utility used for retrieving technical
3113information and other metadata about audio or video files. It supports the
3114many codecs and formats supported by libmediainfo.")
3115 (license license:bsd-2)))
fa379a5b
CL
3116
3117(define-public livemedia-utils
3118 (package
3119 (name "livemedia-utils")
ecdc2f82 3120 (version "2019.05.29")
fa379a5b
CL
3121 (source (origin
3122 (method url-fetch)
3123 (uri (string-append
517c66c0 3124 "https://download.videolan.org/contrib/live555/live."
fa379a5b
CL
3125 version ".tar.gz"))
3126 (sha256
3127 (base32
ecdc2f82 3128 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
fa379a5b
CL
3129 (build-system gnu-build-system)
3130 (arguments
ecdc2f82 3131 '(#:tests? #f ; no tests
fa379a5b
CL
3132 #:make-flags (list "CC=gcc"
3133 (string-append "LDFLAGS=-Wl,-rpath="
3134 (assoc-ref %outputs "out") "/lib")
3135 (string-append "PREFIX="
3136 (assoc-ref %outputs "out")))
3137 #:phases (modify-phases %standard-phases
3138 (add-before 'configure 'fix-makefiles-generation
3139 (lambda _
3140 (substitute* "genMakefiles"
3141 (("/bin/rm") "rm"))
3142 #t))
3143 (replace 'configure
3144 (lambda _
6b677bb0
TGR
3145 (invoke "./genMakefiles"
3146 "linux-with-shared-libraries"))))))
fa379a5b
CL
3147 (home-page "http://www.live555.com/liveMedia/")
3148 (synopsis "Set of C++ libraries for multimedia streaming")
3149 (description "This code forms a set of C++ libraries for multimedia
3150streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3151can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3152JPEG video, and several audio codecs. They can easily be extended to support
3153additional (audio and/or video) codecs, and can also be used to build basic
3154RTSP or SIP clients and servers.")
3155 (license license:lgpl3+)))
0dff4dd9
CL
3156
3157(define-public libdvbpsi
3158 (package
3159 (name "libdvbpsi")
1cb256ab 3160 (version "1.3.3")
0dff4dd9
CL
3161 (source (origin
3162 (method url-fetch)
3163 (uri (string-append
3164 "https://download.videolan.org/pub/libdvbpsi/"
3165 version "/libdvbpsi-" version ".tar.bz2"))
3166 (sha256
3167 (base32
1cb256ab 3168 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
0dff4dd9
CL
3169 (build-system gnu-build-system)
3170 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3171 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3172tables")
3173 (description "libdvbpsi is a simple library designed for decoding and
3174generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3175and ITU-T H.222.0.")
3176 (license license:lgpl2.1)))
6779ae27
JL
3177
3178(define-public ffms2
3179 (package
3180 (name "ffms2")
3181 (version "2.23")
b1eaede0 3182 (home-page "https://github.com/FFMS/ffms2")
6779ae27 3183 (source (origin
940fdd0c
RW
3184 (method git-fetch)
3185 (uri (git-reference
3186 (url "https://github.com/FFMS/ffms2.git")
3187 (commit version)))
3188 (file-name (git-file-name name version))
6779ae27
JL
3189 (sha256
3190 (base32
940fdd0c 3191 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
6779ae27
JL
3192 (build-system gnu-build-system)
3193 (arguments
3194 '(#:configure-flags
3195 (list "--enable-avresample")))
3196 (inputs
3197 `(("zlib" ,zlib)))
3198 (propagated-inputs
3199 `(("ffmpeg" ,ffmpeg)))
3200 (native-inputs
3201 `(("pkg-config" ,pkg-config)))
3202 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3203 (description
3204 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3205programmers to access a standard API to open and decompress media files.")
3206 ;; sources are distributed under a different license that the binary.
3207 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3208 (license license:gpl2+))); inherits from ffmpeg
c812f460
JL
3209
3210(define-public aegisub
3211 (package
3212 (name "aegisub")
3213 (version "3.2.2")
3214 (source (origin
3215 (method url-fetch)
3216 (uri (string-append
3217 "http://ftp.aegisub.org/pub/archives/releases/source/"
3218 name "-" version ".tar.xz"))
3219 (sha256
3220 (base32
18e56ad7 3221 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
644af6c8 3222 (patches (search-patches "aegisub-icu59-include-unistr.patch"
e43e980f 3223 "aegisub-make43.patch"
644af6c8 3224 "aegisub-boost68.patch"))))
c812f460
JL
3225 (build-system gnu-build-system)
3226 (arguments
3227 `(#:configure-flags
3228 (list "--disable-update-checker"
3229 "--without-portaudio"
3230 "--without-openal"
18e56ad7
BH
3231 "--without-oss"
3232 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
c812f460
JL
3233 ;; tests require busted, a lua package we don't have yet
3234 #:tests? #f
3235 #:phases
3236 (modify-phases %standard-phases
3237 (add-before 'configure 'fix-ldflags
3238 (lambda _
18e56ad7 3239 (setenv "LDFLAGS" "-pthread")
f6974e15
BH
3240 #t))
3241 (add-after 'unpack 'fix-boost-headers
3242 (lambda _
3243 (substitute*
3244 '("src/subtitles_provider_libass.cpp"
3245 "src/colour_button.cpp"
3246 "src/video_provider_dummy.cpp"
3247 "./src/video_frame.cpp")
3248 (("#include <boost/gil/gil_all.hpp>")
3249 "#include <boost/gil.hpp>"))
3250 #t)))))
c812f460
JL
3251 (inputs
3252 `(("boost" ,boost)
c812f460
JL
3253 ("ffms2" ,ffms2)
3254 ("fftw" ,fftw)
3255 ("hunspell" ,hunspell)
3256 ("mesa" ,mesa)
3257 ("libass" ,libass)
3258 ("alsa-lib" ,alsa-lib)
3259 ("pulseaudio" ,pulseaudio)
3260 ("libx11" ,libx11)
3261 ("freetype" ,freetype)
3262 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3263 (native-inputs
3264 `(("intltool" ,intltool)
2f095261 3265 ("desktop-file-utils" ,desktop-file-utils)
c812f460
JL
3266 ("pkg-config" ,pkg-config)))
3267 (home-page "http://www.aegisub.org/")
3268 (synopsis "Subtitle engine")
3269 (description
3270 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3271it quick and easy to time subtitles to audio, and features many powerful
3272tools for styling them, including a built-in real-time video preview.")
3273 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3274 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3275 license:expat)))) ; and src/gl that is under a license similar
3276 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3277 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3278 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3279
635f981b 3280(define-public gst-transcoder
3281 (package
3282 (name "gst-transcoder")
3283 (version "1.12.2")
3284 (source
3285 (origin
e7c7b10d
RW
3286 (method git-fetch)
3287 (uri (git-reference
3288 (url "https://github.com/pitivi/gst-transcoder.git")
3289 (commit version)))
3290 (file-name (git-file-name name version))
635f981b 3291 (sha256
3292 (base32
e7c7b10d 3293 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
635f981b 3294 (build-system meson-build-system)
3295 (inputs
3296 `(("gobject-introspection" ,gobject-introspection)
3297 ("glib" ,glib)
3298 ("gstreamer" ,gstreamer)
3299 ("gst-plugins-base" ,gst-plugins-base)))
3300 (native-inputs
3301 `(("python" ,python)
3302 ("pkg-config" ,pkg-config)))
3303 (home-page "https://github.com/pitivi/gst-transcoder/")
3304 (synopsis "GStreamer Transcoding API")
3305 (description "GStreamer Transcoding API")
3306 (license license:lgpl2.1)))
e37bdc0f 3307
3308(define-public gavl
3309 (package
3310 (name "gavl")
3311 (version "1.4.0")
3312 (source
3313 (origin
3314 (method url-fetch)
3315 (uri (string-append "mirror://sourceforge/gmerlin/"
3316 name "/" version "/"
3317 name "-" version ".tar.gz"))
3318 (file-name (string-append name "-" version ".tar.gz"))
3319 (sha256
3320 (base32
3321 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3322 (build-system gnu-build-system)
c178aa34
EF
3323 (arguments
3324 '(#:configure-flags '("LIBS=-lm")))
e37bdc0f 3325 (native-inputs
3326 `(("pkg-config" ,pkg-config)
3327 ("doxygen" ,doxygen)))
3328 (home-page "http://gmerlin.sourceforge.net")
3329 (synopsis "Low level library for multimedia API building")
3330 (description
3331 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3332library, upon which multimedia APIs can be built. Gavl handles all the
3333details of audio and video formats like colorspaces, sample rates,
3334multichannel configurations, etc. It provides standardized definitions for
3335those formats as well as container structures for carrying audio samples or
3336video images inside an application.
3337
3338In addition, it handles the sometimes ugly task of converting between all
3339these formats and provides some elementary operations (copying, scaling,
3340alpha blending etc).")
3341 (license license:gpl3)))
49e1d76d 3342
3343(define-public frei0r-plugins
3344 (package
3345 (name "frei0r-plugins")
1debba19 3346 (version "1.7.0")
49e1d76d 3347 (source
3348 (origin
3349 (method url-fetch)
3350 (uri (string-append "https://files.dyne.org/frei0r/"
3351 "frei0r-plugins-" version ".tar.gz"))
3352 (sha256
3353 (base32
1debba19 3354 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
49e1d76d 3355 (build-system gnu-build-system)
3356 (arguments
3357 `(#:phases
3358 (modify-phases %standard-phases
1debba19 3359 (add-after 'unpack 'patch-Makefile
49e1d76d 3360 (lambda _
1debba19
MB
3361 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3362 ;; names in the tarball. Try removing this for future versions.
3363 (substitute* "Makefile.in"
3364 (("README\\.md ChangeLog TODO AUTHORS")
3365 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3366 #t)))))
63181c85 3367 ;; TODO: opencv for additional face detection filters.
49e1d76d 3368 (inputs
3369 `(("gavl" ,gavl)
3370 ("cairo" ,cairo)))
3371 (native-inputs
1debba19 3372 `(("pkg-config" ,pkg-config)))
49e1d76d 3373 (home-page "https://www.dyne.org/software/frei0r/")
3374 (synopsis "Minimalistic plugin API for video effects")
3375 (description
3376 "Frei0r is a minimalistic plugin API for video effects.
3377The main emphasis is on simplicity for an API that will round up
3378the most common video effects into simple filters, sources and
3379mixers that can be controlled by parameters. Frei0r wants to
3380provide a way to share these simple effects between many
3381applications, avoiding their reimplementation by different projects.
3382It counts more than 100 plugins.")
3383 (license (list license:gpl2+
3384 ;; The following files are licensed as LGPL2.1+:
3385 ;; src/generator/ising0r/ising0r.c
3386 ;; src/generator/onecol0r/onecol0r.cpp
3387 ;; src/generator/nois0r/nois0r.cpp
3388 ;; src/generator/lissajous0r/lissajous0r.cpp
3389 ;; src/filter/ndvi/gradientlut.hpp
3390 ;; src/filter/ndvi/ndvi.cpp
3391 ;; src/filter/facedetect/facedetect.cpp
3392 license:lgpl2.1+))))
eb3e41c9
LC
3393
3394(define-public motion
3395 (package
3396 (name "motion")
a9e9c738 3397 (version "4.2.2")
eb3e41c9
LC
3398 (home-page "https://motion-project.github.io/")
3399 (source (origin
2ea678fa
TGR
3400 (method git-fetch)
3401 (uri (git-reference
3402 (url "https://github.com/Motion-Project/motion.git")
3403 (commit (string-append "release-" version))))
eb3e41c9
LC
3404 (sha256
3405 (base32
a9e9c738 3406 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
2ea678fa 3407 (file-name (git-file-name name version))))
eb3e41c9
LC
3408 (build-system gnu-build-system)
3409 (native-inputs
464f5447 3410 `(("autoconf" ,autoconf-wrapper)
eb3e41c9 3411 ("automake" ,automake)
33bddd30 3412 ("gettext" ,gettext-minimal)
eb3e41c9
LC
3413 ("pkg-config" ,pkg-config)))
3414 (inputs
4bd428a7 3415 `(("libjpeg" ,libjpeg-turbo)
bb5c508c 3416 ("ffmpeg" ,ffmpeg-3.4)
c3069cd1 3417 ("libmicrohttpd" ,libmicrohttpd)
eb3e41c9
LC
3418 ("sqlite" ,sqlite)))
3419 (arguments
3420 '(#:phases (modify-phases %standard-phases
189be331 3421 (replace 'bootstrap
eb3e41c9
LC
3422 (lambda _
3423 (patch-shebang "version.sh")
3424 (invoke "autoreconf" "-vfi"))))
3425 #:configure-flags '("--sysconfdir=/etc")
3426 #:make-flags (list (string-append "sysconfdir="
3427 (assoc-ref %outputs "out")
3428 "/etc"))
3429
a9e9c738 3430 #:tests? #f)) ; no 'check' target
eb3e41c9
LC
3431 (synopsis "Detect motion from video signals")
3432 (description
3433 "Motion is a program that monitors the video signal from one or more
3434cameras and is able to detect if a significant part of the picture has
3435changed. Or in other words, it can detect motion.")
3436
3437 ;; Some files say "version 2" and others "version 2 or later".
3438 (license license:gpl2)))
f27f264e
PN
3439
3440(define-public subdl
3441 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3442 (revision "1"))
3443 (package
3444 (name "subdl")
3445 (version (git-version "1.0.3" revision commit))
3446 (source (origin
3447 (method git-fetch)
3448 (uri (git-reference
3449 (url "https://github.com/alexanderwink/subdl.git")
3450 (commit commit)))
3451 (file-name (git-file-name name version))
3452 (sha256
3453 (base32
3454 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3455 (build-system trivial-build-system)
3456 (arguments
3457 `(#:modules ((guix build utils))
3458 #:builder (begin
3459 (use-modules (guix build utils))
3460 (let* ((out (assoc-ref %outputs "out"))
3461 (bin (string-append out "/bin"))
3462 (source (assoc-ref %build-inputs "source"))
3463 (python (assoc-ref %build-inputs "python")))
3464 (install-file (string-append source "/subdl") bin)
3465 (patch-shebang (string-append bin "/subdl")
3466 (list (string-append python "/bin")))))))
3467 (inputs `(("python" ,python)))
3468 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3469 (description "Subdl is a command-line tool for downloading subtitles from
3470opensubtitles.org. By default, it will search for English subtitles, display
3471the results, download the highest-rated result in the requested language and
3472save it to the appropriate filename.")
3473 (license license:gpl3+)
3474 (home-page "https://github.com/alexanderwink/subdl"))))
eb88e2c1
CL
3475
3476(define-public l-smash
3477 (package
3478 (name "l-smash")
3479 (version "2.14.5")
3480 (source (origin
45b2eff0
RW
3481 (method git-fetch)
3482 (uri (git-reference
3483 (url "https://github.com/l-smash/l-smash.git")
3484 (commit (string-append "v" version))))
3485 (file-name (git-file-name name version))
eb88e2c1
CL
3486 (sha256
3487 (base32
45b2eff0 3488 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
eb88e2c1
CL
3489 (build-system gnu-build-system)
3490 (arguments
3491 `(#:tests? #f ;no tests
3492 #:make-flags
3493 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3494 (assoc-ref %outputs "out") "/lib"))
3495 #:phases
3496 (modify-phases %standard-phases
3497 ;; configure fails if it is followed by CONFIG_SHELL
3498 (replace 'configure
3499 (lambda* (#:key outputs #:allow-other-keys)
3500 (let ((out (assoc-ref outputs "out")))
3501 (invoke "./configure" (string-append "--prefix=" out)
3502 "--disable-static")))))))
3503 (native-inputs
3504 `(("which" ,which)))
3505 (home-page "https://l-smash.github.io/l-smash/")
3506 (synopsis "MP4 multiplexer and demultiplexer library")
3507 (description
3508 "L-SMASH is a cross-platform library that handles the ISO base media file
3509format and some of its derived file formats, including MP4. It operates as a
3510multiplexer and demultiplexer, and can mux video and audio in several formats
3511using standalone executable files.")
3512 (license license:isc)))
a0135eee
LF
3513
3514(define-public qtfaststart
3515 (package
3516 (name "qtfaststart")
3517 (version "1.8")
3518 (source (origin
3519 (method url-fetch)
3520 (uri (pypi-uri "qtfaststart" version))
3521 (sha256
3522 (base32
3523 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3524 (build-system python-build-system)
3525 (arguments
3526 '(#:tests? #f)) ; no test suite
3527 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3528 (description "qtfaststart enables streaming and pseudo-streaming of
3529QuickTime and MP4 files by moving metadata and offset information to the
3530beginning of the file. It can also print some useful information about the
3531structure of the file. This program is based on qt-faststart.c from the FFmpeg
3532project, which is released into the public domain, as well as ISO 14496-12:2005
3533(the official spec for MP4), which can be obtained from the ISO or found
3534online.")
3535 (home-page "https://github.com/danielgtaylor/qtfaststart")
3536 (license license:expat)))
485638cd
LF
3537
3538(define-public vidstab
ad64f271
LF
3539 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3540 (revision "0"))
3541 (package
3542 (name "vidstab")
3543 (version (git-version "1.1.0" revision commit))
3544 (source (origin
3545 (method git-fetch)
3546 (uri (git-reference
3547 (url "https://github.com/georgmartius/vid.stab.git")
3548 (commit commit)))
3549 (file-name (git-file-name name version))
3550 (sha256
3551 (base32
3552 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3553 (build-system cmake-build-system)
3554 (arguments
3555 '(#:tests? #f)) ; tests are not run as part of standard build process
3556 (home-page "http://public.hronopik.de/vid.stab/")
3557 (synopsis "Video stabilization library")
3558 (description "Vidstab is a video stabilization library which can be used
485638cd
LF
3559with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3560vehicle typically suffers from undesirable shakes and jitters. Activities such
3561as surfing, skiing, riding and walking while shooting videos are especially
3562prone to erratic camera shakes. Vidstab targets these video contents to help
3563create smoother and stable videos.")
ad64f271 3564 (license license:gpl2+))))
579a9cde
EB
3565
3566(define-public libopenshot
3567 (package
3568 (name "libopenshot")
747953c4 3569 (version "0.2.5")
579a9cde
EB
3570 (source (origin
3571 (method git-fetch)
3572 (uri (git-reference
3573 (url "https://github.com/OpenShot/libopenshot")
3574 (commit (string-append "v" version))))
3575 (file-name (git-file-name name version))
3576 (sha256
3577 (base32
747953c4 3578 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
579a9cde
EB
3579 (modules '((guix build utils)))
3580 (snippet '(begin
3581 ;; Allow overriding of the python installation dir
3582 (substitute* "src/bindings/python/CMakeLists.txt"
3583 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3584 (string-append set " CACHE PATH "
3585 "\"Python bindings directory\")")))
277becbb 3586 (delete-file-recursively "thirdparty")
4994174f 3587 #t))))
579a9cde
EB
3588 (build-system cmake-build-system)
3589 (native-inputs
3590 `(("pkg-config" ,pkg-config)
3591 ("python" ,python)
3592 ("swig" ,swig)
3593 ("unittest++" ,unittest-cpp)))
3594 (propagated-inputs ;all referenced in installed headers
3595 `(("cppzmq" ,cppzmq)
3596 ("ffmpeg" ,ffmpeg)
3597 ("imagemagick" ,imagemagick)
3598 ("jsoncpp" ,jsoncpp)
3599 ("libopenshot-audio" ,libopenshot-audio)
ad656e70
EF
3600 ("qtbase" ,qtbase)
3601 ("qtmultimedia" ,qtmultimedia)
579a9cde
EB
3602 ("zeromq" ,zeromq)))
3603 (arguments
3604 `(#:configure-flags
3605 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3606 ,(version-major+minor (package-version python))
3607 "/site-packages")
3608 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3609 #:phases
3610 (modify-phases %standard-phases
3611 (add-before 'configure 'set-vars
3612 (lambda* (#:key inputs #:allow-other-keys)
3613 (setenv "LIBOPENSHOT_AUDIO_DIR"
3614 (assoc-ref inputs "libopenshot-audio"))
3615 (setenv "ZMQDIR"
3616 (assoc-ref inputs "zeromq"))
3617 (setenv "UNITTEST_DIR"
3618 (string-append (assoc-ref inputs "unittest++")
3619 "/include/UnitTest++"))
3620 #t)))))
3621 (home-page "https://openshot.org")
3622 (synopsis "Video-editing, animation, and playback library")
3623 (description "OpenShot Library (libopenshot) is a powerful C++ video
3624editing library with a multi-threaded and feature rich video editing
3625API. It includes bindings for Python, Ruby, and other languages.")
3626 (license license:lgpl3+)))
69a3fcc0
EB
3627
3628(define-public openshot
3629 (package
3630 (name "openshot")
5020a263 3631 (version "2.5.1")
69a3fcc0
EB
3632 (source (origin
3633 (method git-fetch)
3634 (uri (git-reference
3635 (url "https://github.com/OpenShot/openshot-qt")
3636 (commit (string-append "v" version))))
3637 (file-name (git-file-name name version))
3638 (sha256
3639 (base32
5020a263 3640 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
2afb7939
EF
3641 (modules '((guix build utils)))
3642 (snippet
3643 '(begin
5020a263 3644 ;; TODO: Unbundle jquery and others from src/timeline/media
2afb7939 3645 (delete-file-recursively "src/images/fonts") #t))))
69a3fcc0
EB
3646 (build-system python-build-system)
3647 (inputs
3648 `(("ffmpeg" ,ffmpeg)
2afb7939 3649 ("font-ubuntu" ,font-ubuntu)
69a3fcc0
EB
3650 ("libopenshot" ,libopenshot)
3651 ("python" ,python)
3652 ("python-pyqt" ,python-pyqt)
3653 ("python-pyzmq" ,python-pyzmq)
3654 ("python-requests" ,python-requests)
3655 ("qtsvg" ,qtsvg)))
3656 (arguments
e7228f0c 3657 `(#:modules ((guix build python-build-system)
a512aa91
EF
3658 (guix build qt-utils)
3659 (guix build utils))
3660 #:imported-modules (,@%python-build-system-modules
3661 (guix build qt-utils))
69a3fcc0
EB
3662 #:phases (modify-phases %standard-phases
3663 (delete 'build) ;install phase does all the work
e7228f0c
EF
3664 (replace 'check
3665 (lambda _
3666 (setenv "QT_QPA_PLATFORM" "offscreen")
3667 (invoke "python" "src/tests/query_tests.py")))
2afb7939
EF
3668 (add-after 'unpack 'patch-font-location
3669 (lambda* (#:key inputs #:allow-other-keys)
3670 (let ((font (assoc-ref inputs "font-ubuntu")))
3671 (substitute* "src/classes/app.py"
3672 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3673 (("fonts") "share/fonts/truetype")))
3674 #t))
69a3fcc0
EB
3675 (add-before 'install 'set-tmp-home
3676 (lambda _
3677 ;; src/classes/info.py "needs" to create several
3678 ;; directories in $HOME when loaded during build
3679 (setenv "HOME" "/tmp")
3680 #t))
3681 (add-after 'install 'wrap-program
a512aa91
EF
3682 (lambda* (#:key outputs #:allow-other-keys)
3683 (let ((out (assoc-ref outputs "out")))
3684 (wrap-qt-program out "openshot-qt"))
3685 #t)))))
5020a263 3686 (home-page "https://www.openshot.org/")
69a3fcc0
EB
3687 (synopsis "Video editor")
3688 (description "OpenShot takes your videos, photos, and music files and
3689helps you create the film you have always dreamed of. Easily add sub-titles,
3690transitions, and effects and then export your film to many common formats.")
3691 (license license:gpl3+)))
8c380a01
EF
3692
3693(define-public dav1d
3694 (package
3695 (name "dav1d")
1912ea50 3696 (version "0.6.0")
8c380a01
EF
3697 (source
3698 (origin
3699 (method url-fetch)
10f2ae01
MB
3700 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3701 "/dav1d/" version "/dav1d-" version ".tar.xz"))
8c380a01 3702 (sha256
89ccc9ce 3703 (base32
1912ea50 3704 "0w5k572jzxp7zwdbsa0jgjzri6hsrkydawzzilrw46nxpcak37q9"))))
8c380a01
EF
3705 (build-system meson-build-system)
3706 (native-inputs `(("nasm" ,nasm)))
3707 (home-page "https://code.videolan.org/videolan/dav1d")
3708 (synopsis "AV1 decoder")
3709 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3710speed and correctness.")
3711 (license license:bsd-2)))
20b4aa6b
RH
3712
3713(define-public wlstream
3714 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3715 (revision "1"))
3716 (package
3717 (name "wlstream")
3718 (version (git-version "0.0" revision commit))
3719 (source
1d591432
RH
3720 (origin
3721 (method git-fetch)
3722 (uri (git-reference
3723 (url "https://github.com/atomnuker/wlstream.git")
3724 (commit commit)))
3725 (file-name (git-file-name name version))
3726 (sha256
3727 (base32
3728 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
20b4aa6b
RH
3729 (build-system meson-build-system)
3730 (native-inputs `(("libdrm" ,libdrm)
3731 ("pkg-config" ,pkg-config)))
3732 (inputs `(("ffmpeg" ,ffmpeg)
3733 ("pulseaudio" ,pulseaudio)
3734 ("wayland" ,wayland)
3735 ("wayland-protocols" ,wayland-protocols)))
3736 (home-page "https://github.com/atomnuker/wlstream")
3737 (synopsis "Screen capture tool for Wayland sessions")
3738 (description "Wlstream is a screen capture tool for recording audio and
3739video from a Wayland session.")
3740 (license license:lgpl2.1+))))
08486153
PN
3741
3742(define-public gaupol
3743 (package
3744 (name "gaupol")
ce5b71f9 3745 (version "1.7")
08486153
PN
3746 (source (origin
3747 (method git-fetch)
3748 (uri (git-reference
3749 (url "https://github.com/otsaloma/gaupol/")
3750 (commit version)))
3751 (file-name (git-file-name name version))
3752 (sha256
3753 (base32
ce5b71f9 3754 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
08486153
PN
3755 (build-system python-build-system)
3756 (native-inputs
3757 `(("gettext" ,gettext-minimal)
3758 ("pkg-config" ,pkg-config)))
3759 (inputs
3760 `(("python-pygobject" ,python-pygobject)
3761 ("gtk+" ,gtk+)
3762 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3763 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3764 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3765 ("iso-codes" ,iso-codes) ; Optional: Translations.
3766 ("gstreamer" ,gstreamer)
3767 ("gst-libav" ,gst-libav)
3768 ("gst-plugins-base" ,gst-plugins-base)
3769 ("gst-plugins-good" ,gst-plugins-good)
3770 ("gst-plugins-bad" ,gst-plugins-bad)
3771 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3772 (arguments
3773 `(#:tests? #f ; Tests seem to require networking.
3774 #:phases
3775 (modify-phases %standard-phases
3776 ;; gaupol's setup.py script does not support one of the Python build
3777 ;; system's default flags, "--single-version-externally-managed".
3778 (replace 'install
3779 (lambda* (#:key outputs #:allow-other-keys)
3780 (invoke "python" "setup.py" "install"
3781 (string-append "--prefix=" (assoc-ref outputs "out"))
3782 "--root=/")))
3783 (add-after 'install 'wrap-gaupol
3784 (lambda* (#:key outputs #:allow-other-keys)
3785 (let ((out (assoc-ref outputs "out"))
3786 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3787 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3788 (wrap-program (string-append out "/bin/gaupol")
3789 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3790 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3791 #t))
3792 (add-after 'unpack 'patch-data-dir
3793 ;; Fix some path variables that setup.py seems to garble.
3794 (lambda* (#:key outputs #:allow-other-keys)
3795 (let ((out (assoc-ref outputs "out")))
3796 (substitute* "setup.py"
3797 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3798 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3799 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3800 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3801 #t))))))
3802 (synopsis "Editor for text-based subtitles")
3803 (description
3804 "Gaupol supports multiple subtitle file formats and provides means of
3805creating subtitles, editing texts and timing subtitles to match video. The
3806user interface features a builtin video player and is designed with attention
3807to convenience of translating and batch processing of multiple documents.")
3808 (home-page "https://otsaloma.io/gaupol/")
3809 (license license:gpl3+)))
97115892
PN
3810
3811(define-public theorafile
3812 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
3813 (package
3814 (name "theorafile")
3815 (version (git-version "0.0.0" "1" commit))
3816 (source
3817 (origin
3818 (method git-fetch)
3819 (uri (git-reference
3820 (url "https://github.com/FNA-XNA/Theorafile.git")
3821 (commit commit)))
3822 (file-name (git-file-name name version))
3823 (sha256
3824 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
3825 (build-system gnu-build-system)
3826 (arguments
3827 '(#:make-flags '("CC=gcc")
3828 #:phases
3829 (modify-phases %standard-phases
3830 (delete 'configure)
3831 (replace 'check
3832 (lambda _
3833 (setenv "CC" "gcc")
3834 (invoke "make" "test")))
3835 (replace 'install
3836 (lambda* (#:key outputs #:allow-other-keys)
3837 (let ((out (assoc-ref outputs "out")))
3838 (install-file "libtheorafile.so" (string-append out "/lib"))
3839 (install-file "theorafile.h" (string-append out "/include")))
3840 #t)))))
3841 (native-inputs
3842 ;; For tests.
3843 `(("sdl2" ,sdl2)))
3844 (home-page "https://github.com/FNA-XNA/Theorafile")
3845 (synopsis "Ogg Theora Video Decoder Library")
3846 (description "Theorafile is a library for quickly and easily decoding Ogg
3847Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
3848 (license license:zlib))))
b9d8aa09
RV
3849
3850(define-public dvdbackup
3851 (package
3852 (name "dvdbackup")
3853 (version "0.4.2")
3854 (source
3855 (origin
3856 (method url-fetch)
3857 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
3858 "dvdbackup-" version "/"
3859 "dvdbackup-" version ".tar.xz"))
3860 (sha256
3861 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
3862 (build-system gnu-build-system)
3863 (inputs
3864 `(("libdvdcss" ,libdvdcss)
3865 ("libdvdread" ,libdvdread)))
3866 (home-page "http://dvdbackup.sourceforge.net")
3867 (synopsis "DVD video ripper")
3868 (description
3869 "A simple command line tool to backup video from a DVD. Decrypts the
3870DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
3871transcode or reformat the videos in any way, producing perfect backups.")
3872 (license license:gpl3+)))
554f5b62
LF
3873
3874(define-public svt-av1
3875 (package
3876 (name "svt-av1")
2e59ae23 3877 (version "0.8.3")
554f5b62
LF
3878 (source (origin
3879 (method git-fetch)
3880 (uri (git-reference
3881 (url "https://github.com/OpenVisualCloud/SVT-AV1.git")
3882 (commit (string-append "v" version))))
3883 (file-name (git-file-name name version))
3884 (sha256
3885 (base32
2e59ae23 3886 "1rh4sz1bmrsxyxfxajsffw5jd17djcrymhwsi877v02fgln027qr"))))
554f5b62
LF
3887 (build-system cmake-build-system)
3888 ;; SVT-AV1 only supports Intel-compatible CPUs.
3889 (supported-systems '("x86_64-linux" "i686-linux"))
3890 (arguments
3891 ;; The test suite tries to download test data and git clone a 3rd-party
3892 ;; fork of libaom. Skip it.
3893 `(#:tests? #f
3894 #:phases
3895 (modify-phases %standard-phases
3896 (add-after 'install 'install-documentation
3897 (lambda* (#:key outputs #:allow-other-keys)
3898 (let* ((out (assoc-ref %outputs "out"))
3899 (doc (string-append out "/share/doc/svt-av1-" ,version)))
3900 (copy-recursively "../source/Docs" doc)
3901 #t))))))
3902 (native-inputs
3903 `(("yasm" ,yasm)))
3904 (synopsis "AV1 video codec")
3905 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
3906work-in-progress, aiming to support video-on-demand and live streaming
3907applications. It only supports Intel-compatible CPUs (x86).")
3908 (home-page "https://github.com/OpenVisualCloud/SVT-AV1")
3909 (license license:bsd-2)))
618819aa
GLV
3910
3911(define-public w-scan
3912 (package
3913 (name "w-scan")
3914 (version "20170107")
3915 (source
3916 (origin
3917 (method url-fetch)
3918 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
3919 version ".tar.bz2"))
3920 (sha256
3921 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
3922 (build-system gnu-build-system)
3923 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
3924 (description
3925 "This is a small command line utility used to perform frequency scans for
3926DVB and ATSC transmissions without initial tuning data. It can print the
3927result in several formats:
3928@itemize
3929@item VDR channels.conf,
3930@item czap/tzap/xine/mplayer channels.conf,
3931@item Gstreamer dvbsrc plugin,
3932@item VLC xspf playlist,
3933@item XML,
3934@item initial tuning data for scan or dvbv5-scan.
3935@end itemize\n")
3936 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
3937 (license license:gpl2+)))
ca4b5588
LF
3938
3939(define-public rav1e
3940 (package
3941 (name "rav1e")
3942 (version "0.3.0")
3943 (source
3944 (origin
3945 (method url-fetch)
3946 (uri (crate-uri "rav1e" version))
3947 (file-name
3948 (string-append name "-" version ".tar.gz"))
3949 (sha256
3950 (base32
3951 "1bsmj8kqzs5pf8dl98rsl6a67cljj1gkj3b5hmd8hn8wdy4ya173"))))
3952 (build-system cargo-build-system)
3953 (arguments
3954 `(#:cargo-inputs
3955 (("rust-simd-helpers" ,rust-simd-helpers-0.1)
3956 ("rust-ivf" ,rust-ivf-0.1)
3957 ("rust-cfg-if" ,rust-cfg-if-0.1)
3958 ("rust-paste" ,rust-paste-0.1)
3959 ("rust-signal-hook" ,rust-signal-hook-0.1)
3960 ("rust-aom-sys" ,rust-aom-sys-0.1)
3961 ("rust-nasm-rs" ,rust-nasm-rs-0.1)
3962 ("rust-arbitrary" ,rust-arbitrary-0.2)
3963 ("rust-better-panic" ,rust-better-panic-0.2)
3964 ("rust-noop-proc-macro"
3965 ,rust-noop-proc-macro-0.2)
3966 ("rust-num-traits" ,rust-num-traits-0.2)
3967 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
3968 ("rust-err-derive" ,rust-err-derive-0.2)
3969 ("rust-interpolate-name"
3970 ,rust-interpolate-name-0.2)
3971 ("rust-rustc-version" ,rust-rustc-version-0.2)
3972 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
3973 ("rust-libc" ,rust-libc-0.2)
3974 ("rust-image" ,rust-image-0.22)
3975 ("rust-arg-enum-proc-macro"
3976 ,rust-arg-enum-proc-macro-0.3)
3977 ("rust-num-derive" ,rust-num-derive-0.3)
3978 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
3979 ("rust-backtrace" ,rust-backtrace-0.3)
3980 ("rust-log" ,rust-log-0.4)
3981 ("rust-y4m" ,rust-y4m-0.5)
3982 ("rust-arrayvec" ,rust-arrayvec-0.5)
3983 ("rust-toml" ,rust-toml-0.5)
3984 ("rust-fern" ,rust-fern-0.5)
3985 ("rust-rust-hawktracer"
3986 ,rust-rust-hawktracer-0.7)
3987 ("rust-rand" ,rust-rand-0.7)
3988 ("rust-itertools" ,rust-itertools-0.8)
3989 ("rust-bitstream-io" ,rust-bitstream-io-0.8)
3990 ("rust-console" ,rust-console-0.9)
3991 ("rust-serde" ,rust-serde-1.0)
3992 ("rust-cc" ,rust-cc-1.0)
3993 ("rust-rayon" ,rust-rayon-1.3)
3994 ("rust-byteorder" ,rust-byteorder-1.3)
3995 ("rust-clap" ,rust-clap-2)
3996 ("rust-vergen" ,rust-vergen-3.1))
3997 #:cargo-development-inputs
3998 (("rust-rand-chacha" ,rust-rand-chacha-0.2)
3999 ("rust-interpolate-name"
4000 ,rust-interpolate-name-0.2)
4001 ("rust-criterion" ,rust-criterion-0.3)
4002 ("rust-pretty-assertions"
4003 ,rust-pretty-assertions-0.6)
4004 ("rust-rand" ,rust-rand-0.7)
4005 ("rust-semver" ,rust-semver-0.9))
4006 #:phases
4007 (modify-phases %standard-phases
4008 (replace 'build
4009 (lambda* (#:key outputs #:allow-other-keys)
4010 (let ((out (assoc-ref outputs "out")))
4011 (invoke "cargo" "cinstall" "--release"
4012 (string-append "--prefix=" out))))))))
4013 (native-inputs
4014 `(("cargo-c" ,rust-cargo-c)))
4015 (inputs
4016 `(("nasm" ,nasm)))
4017 (home-page "https://github.com/xiph/rav1e/")
4018 (synopsis "The fastest and safest AV1 encoder")
4019 (description
4020 "The fastest and safest AV1 encoder.")
4021 (license license:bsd-2)))
d4f86c8b
RW
4022
4023(define-public peek
4024 (package
4025 (name "peek")
4026 (version "1.5.1")
4027 (source
4028 (origin
4029 (method git-fetch)
4030 (uri (git-reference
4031 (url "https://github.com/phw/peek.git")
4032 (commit version)))
4033 (file-name (git-file-name name version))
4034 (sha256
4035 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4036 (build-system meson-build-system)
4037 (arguments '(#:glib-or-gtk? #t))
4038 (inputs
4039 `(("gtk+" ,gtk+)))
4040 (native-inputs
4041 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4042 ("gettext" ,gettext-minimal)
4043 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4044 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4045 ("pkg-config" ,pkg-config)
4046 ("vala" ,vala)))
4047 (home-page "https://github.com/phw/peek")
4048 (synopsis "Simple animated GIF screen recorder")
4049 (description
4050 "Peek makes it easy to create short screencasts of a screen area. It was
4051built for the specific use case of recording screen areas, e.g. for easily
4052showing UI features of your own apps or for showing a bug in bug reports.
4053With Peek, you simply place the Peek window over the area you want to record
4054and press \"Record\". Peek is optimized for generating animated GIFs, but you
4055can also directly record to WebM or MP4 if you prefer.")
4056 (license license:gpl3+)))
58a361fe
AM
4057
4058(define-public wf-recorder
4059 (package
4060 (name "wf-recorder")
4061 (version "0.2.1")
4062 (source (origin
4063 (method git-fetch)
4064 (uri (git-reference
4065 (url "https://github.com/ammen99/wf-recorder.git")
4066 (commit (string-append "v" version))))
4067 (file-name (git-file-name name version))
4068 (sha256
4069 (base32
4070 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4071 (build-system meson-build-system)
4072 (native-inputs
4073 `(("pkg-config" ,pkg-config)))
4074 (inputs
4075 `(("ffmpeg" ,ffmpeg)
4076 ("pulseaudio" ,pulseaudio)
4077 ("wayland" ,wayland)
4078 ("wayland-protocols" ,wayland-protocols)
4079 ("libx264" ,libx264)))
4080 (home-page "https://github.com/ammen99/wf-recorder")
4081 (synopsis "Screen recorder for wlroots-based compositors")
4082 (description
4083 "@code{wf-recorder} is a utility program for screen recording of
4084wlroots-based compositors. More specifically, those that support
4085@code{wlr-screencopy-v1} and @code{xdg-output}.")
4086 (license license:expat)))