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