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