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