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