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