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