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