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