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