gnu: avidemux: Factorise ffmpeg version.
[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")
d835652a 675 (version "2.3.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
d835652a 687 (base32 "1r6wiw4k044cpb39rfqqdw6qmzw0268whpz124hywck9v980x130"))))
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")
129294e7 1415 (version "2019.03.09")
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
129294e7 1423 "1g46mrmzr31b2r6x0g6wmg3j00qc8l6cbzmdik0l5vwjfcrdvghf"))))
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")
a9644c5a 1534 (version "0.4.1270")
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
a9644c5a 1543 "123g6x8sh32v4yn4ss55lfw7j79hgl3l6aiwgrk4ndq7dzhnz46q"))))
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
7d3ac6c0
TGR
1823 "mirror://sourceforge/avidemux/avidemux/" version "/"
1824 "avidemux_" 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.
642de36b
TGR
1860 (let ((ffmpeg "ffmpeg-3.3.7"))
1861 (modify-phases %standard-phases
1862 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1863 (lambda _
1864 (with-directory-excursion "avidemux_core/ffmpeg_package"
1865 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
1866 (delete-file (string-append ffmpeg ".tar.bz2")))
1867 #t))
1868 (add-after 'patch-source-shebangs 'repack-ffmpeg
1869 (lambda _
1870 (with-directory-excursion "avidemux_core/ffmpeg_package"
1871 (substitute* (string-append ffmpeg "/configure")
1872 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1873 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
1874 ;; avoid non-determinism in the archive
1875 "--sort=name" "--mtime=@0"
1876 "--owner=root:0" "--group=root:0")
1877 (delete-file-recursively ffmpeg))
1878 #t))
1879 (replace 'configure
1880 (lambda _
1881 ;; Copy-paste settings from the cmake build system.
1882 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1883 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
1884 #t))
1885 (replace 'build
1886 (lambda* (#:key inputs outputs #:allow-other-keys)
1887 (let* ((out (assoc-ref outputs "out"))
1888 (lib (string-append out "/lib"))
1889 (top (getcwd))
1890 (sdl (assoc-ref inputs "sdl"))
1891 (build_component
1892 (lambda* (component srcdir #:optional (args '()))
1893 (let ((builddir (string-append "build_" component)))
1894 (mkdir builddir)
1895 (with-directory-excursion builddir
1896 (apply invoke "cmake"
1897 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1898 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1899 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1900 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1901 "\"-Wl,-rpath=" lib "\"")
1902 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1903 (string-append "-DSDL_INCLUDE_DIR="
1904 sdl "/include/SDL")
1905 (string-append "../" srcdir)
1906 "-DENABLE_QT5=True"
1907 args)
1908 (invoke "make" "-j"
1909 (number->string (parallel-job-count)))
1910 (invoke "make" "install"))))))
1911 (mkdir out)
1912 (build_component "core" "avidemux_core")
1913 (build_component "cli" "avidemux/cli")
1914 (build_component "qt4" "avidemux/qt4")
1915 (build_component "plugins_common" "avidemux_plugins"
1916 '("-DPLUGIN_UI=COMMON"))
1917 (build_component "plugins_cli" "avidemux_plugins"
1918 '("-DPLUGIN_UI=CLI"))
1919 (build_component "plugins_qt4" "avidemux_plugins"
1920 '("-DPLUGIN_UI=QT4"))
1921 (build_component "plugins_settings" "avidemux_plugins"
1922 '("-DPLUGIN_UI=SETTINGS"))
1923 ;; Remove .exe and .dll file.
1924 (delete-file-recursively
1925 (string-append out "/share/ADM6_addons"))
1926 #t)))
1927 (delete 'install)))))
44726031
AE
1928 (home-page "http://fixounet.free.fr/avidemux/")
1929 (synopsis "Video editor")
1930 (description "Avidemux is a video editor designed for simple cutting,
1931filtering and encoding tasks. It supports many file types, including AVI,
1932DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1933can be automated using projects, job queue and powerful scripting
1934capabilities.")
afd9ed5c 1935 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
44726031 1936 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1937 (license license:gpl2+)))
44726031 1938
6f6c8b65
TUBK
1939(define-public vapoursynth
1940 (package
1941 (name "vapoursynth")
4f7a9e0b 1942 (version "37")
6f6c8b65 1943 (source (origin
97ef6df5
RW
1944 (method git-fetch)
1945 (uri (git-reference
1946 (url "https://github.com/vapoursynth/vapoursynth.git")
1947 (commit (string-append "R" version))))
1948 (file-name (git-file-name name version))
6f6c8b65
TUBK
1949 (sha256
1950 (base32
97ef6df5 1951 "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
6f6c8b65
TUBK
1952 (build-system gnu-build-system)
1953 (native-inputs
1954 `(("autoconf" ,autoconf)
1955 ("automake" ,automake)
1956 ("cython" ,python-cython)
1957 ("libtool" ,libtool)
1958 ("pkg-config" ,pkg-config)
1959 ("python" ,python)
1960 ("yasm" ,yasm)))
1961 (inputs
1962 `(("ffmpeg" ,ffmpeg)
1963 ("libass" ,libass)
f80d5fe0
EF
1964 ("tesseract-ocr" ,tesseract-ocr)
1965 ("zimg" ,zimg)))
6f6c8b65
TUBK
1966 (arguments
1967 '(#:phases
1968 (modify-phases %standard-phases
52fb5b3a
TGR
1969 (add-after 'unpack 'autogen
1970 (lambda _
1971 (invoke "sh" "autogen.sh"))))))
6f6c8b65
TUBK
1972 (home-page "http://www.vapoursynth.com/")
1973 (synopsis "Video processing framework")
1974 (description "VapourSynth is a C++ library and Python module for video
1975manipulation. It aims to be a modern rewrite of Avisynth, supporting
1976multithreading, generalized colorspaces, per frame properties, and videos with
1977format changes.")
9a078f48 1978 ;; src/core/cpufeatures only allows x86, ARM or PPC
cda20ee8
EF
1979 (supported-systems (fold delete %supported-systems
1980 '("mips64el-linux" "aarch64-linux")))
6f6c8b65 1981 ;; As seen from the source files.
ae0bdd81 1982 (license license:lgpl2.1+)))
6f6c8b65 1983
67932f86
TUBK
1984(define-public xvid
1985 (package
1986 (name "xvid")
e05035c7 1987 (version "1.3.4")
67932f86
TUBK
1988 (source (origin
1989 (method url-fetch)
1990 (uri (string-append
1991 "http://downloads.xvid.org/downloads/xvidcore-"
1992 version ".tar.bz2"))
1993 (sha256
1994 (base32
e05035c7 1995 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
67932f86
TUBK
1996 (build-system gnu-build-system)
1997 (native-inputs `(("yasm" ,yasm)))
1998 (arguments
1999 '(#:phases
62fe2d47
EF
2000 (modify-phases %standard-phases
2001 (add-before
2002 'configure 'pre-configure
2003 (lambda _
2004 (chdir "build/generic")
2005 (substitute* "configure"
9dcfd6aa
MW
2006 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2007 #t)))
67932f86
TUBK
2008 ;; No 'check' target.
2009 #:tests? #f))
2010 (home-page "https://www.xvid.com/")
2011 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2012 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2013codec library. It uses ASP features such as b-frames, global and quarter
2014pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2015and custom quantization matrices.")
ae0bdd81 2016 (license license:gpl2+)))
e16fde14 2017
f48feaa2 2018(define-public streamlink
15b283e7
EF
2019 (package
2020 (name "streamlink")
2021 (version "0.14.2")
2022 (source
2023 (origin
2024 (method url-fetch)
2025 (uri (pypi-uri "streamlink" version))
2026 (sha256
2027 (base32
87fd7a35
EF
2028 "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))
2029 (patches (search-patches "streamlink-update-test.patch"))))
15b283e7
EF
2030 (build-system python-build-system)
2031 (home-page "https://github.com/streamlink/streamlink")
2032 (native-inputs
2033 `(("python-freezegun" ,python-freezegun)
2034 ("python-pytest" ,python-pytest)
2035 ("python-mock" ,python-mock)
2036 ("python-requests-mock" ,python-requests-mock)))
2037 (propagated-inputs
2038 `(("python-pysocks" ,python-pysocks)
2039 ("python-websocket-client" ,python-websocket-client)
2040 ("python-iso3166" ,python-iso3166)
2041 ("python-iso639" ,python-iso639)
b42b5afd 2042 ("python-isodate" ,python-isodate)
15b283e7
EF
2043 ("python-pycryptodome" ,python-pycryptodome)
2044 ("python-requests" ,python-requests)
2045 ("python-urllib3" ,python-urllib3)))
2046 (synopsis "Extract streams from various services")
2047 (description "Streamlink is command-line utility that extracts streams
f48feaa2 2048from sites like Twitch.tv and pipes them into a video player of choice.")
15b283e7 2049 (license license:bsd-2)))
f48feaa2 2050
d84e2257
OP
2051(define-public livestreamer
2052 (deprecated-package "livestreamer" streamlink))
2053
e5e5eb1f 2054(define-public twitchy
04b6e9c5 2055 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
e5e5eb1f
OP
2056 (package
2057 (name "twitchy")
04b6e9c5 2058 (version (git-version "3.4" "1" commit))
e5e5eb1f
OP
2059 (source
2060 (origin
2061 (method git-fetch)
2062 (uri (git-reference
2063 (url "https://github.com/BasioMeusPuga/twitchy.git")
2064 (commit commit)))
2065 (file-name (git-file-name name version))
2066 (sha256
2067 (base32
04b6e9c5 2068 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
e5e5eb1f
OP
2069 (build-system python-build-system)
2070 (arguments
2071 '(#:phases
2072 (modify-phases %standard-phases
04b6e9c5
TE
2073 (add-after 'unpack 'patch-paths
2074 (lambda* (#:key inputs #:allow-other-keys)
2075 (substitute* "twitchy/twitchy_play.py"
2076 (("\"streamlink ")
2077 (string-append "\"" (assoc-ref inputs "streamlink")
2078 "/bin/streamlink ")))
2079 #t))
e5e5eb1f
OP
2080 (add-before 'check 'check-setup
2081 (lambda _
2082 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
ca82bdfd
OP
2083 #t))
2084 (add-after 'install 'install-rofi-plugin
2085 (lambda* (#:key outputs #:allow-other-keys)
2086 (install-file "plugins/rofi-twitchy"
2087 (string-append (assoc-ref outputs "out")
9dcfd6aa
MW
2088 "/bin"))
2089 #t)))))
e5e5eb1f
OP
2090 (inputs
2091 `(("python-requests" ,python-requests)
2092 ("streamlink" ,streamlink)))
2093 (home-page "https://github.com/BasioMeusPuga/twitchy")
2094 (synopsis "Command-line interface for Twitch.tv")
2095 (description
2096 "This package provides a command-line interface for Twitch.tv")
2097 (license license:gpl3+))))
2098
307ad140
RW
2099(define-public mlt
2100 (package
2101 (name "mlt")
7acc52f9 2102 (version "6.12.0")
307ad140 2103 (source (origin
520b5d06
RW
2104 (method git-fetch)
2105 (uri (git-reference
2106 (url "https://github.com/mltframework/mlt.git")
2107 (commit (string-append "v" version))))
2108 (file-name (git-file-name name version))
307ad140
RW
2109 (sha256
2110 (base32
7acc52f9 2111 "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w"))))
307ad140
RW
2112 (build-system gnu-build-system)
2113 (arguments
7acc52f9 2114 `(#:tests? #f ; no tests
e7cdd311 2115 #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
307ad140
RW
2116 #:configure-flags
2117 (list "--enable-gpl3"
2118 "--enable-gpl")
2119 #:phases
2120 (modify-phases %standard-phases
2121 (add-after
7acc52f9
TGR
2122 'configure 'override-LDFLAGS
2123 (lambda* (#:key outputs #:allow-other-keys)
2124 (substitute* "config.mak"
2125 (("LDFLAGS\\+=")
2126 (string-append "LDFLAGS+=-Wl,-rpath="
2127 (assoc-ref outputs "out")
2128 "/lib ")))
2129 #t)))))
307ad140
RW
2130 (inputs
2131 `(("alsa-lib" ,alsa-lib)
bb5c508c 2132 ("ffmpeg" ,ffmpeg-3.4)
307ad140 2133 ("fftw" ,fftw)
e7cdd311
MM
2134 ("frei0r-plugins" ,frei0r-plugins)
2135 ("gdk-pixbuf" ,gdk-pixbuf)
2136 ("gtk+" ,gtk+-2)
307ad140
RW
2137 ("libxml2" ,libxml2)
2138 ("jack" ,jack-1)
2139 ("ladspa" ,ladspa)
2140 ("libsamplerate" ,libsamplerate)
4c7729dc 2141 ("pulseaudio" ,pulseaudio)
e7cdd311
MM
2142 ("qtbase" ,qtbase)
2143 ("qtsvg" ,qtsvg)
307ad140
RW
2144 ("sdl" ,sdl)
2145 ("sox" ,sox)))
2146 (native-inputs
2147 `(("pkg-config" ,pkg-config)))
4c7729dc 2148 (home-page "https://www.mltframework.org/")
307ad140
RW
2149 (synopsis "Author, manage, and run multitrack audio/video compositions")
2150 (description
2151 "MLT is a multimedia framework, designed and developed for television
2152broadcasting. It provides a toolkit for broadcasters, video editors, media
2153players, transcoders, web streamers and many more types of applications. The
2154functionality of the system is provided via an assortment of ready to use
2155tools, XML authoring components, and an extensible plug-in based API.")
42b9541c 2156 (license license:gpl3)))
f464016d 2157
945d985a
DT
2158(define-public v4l-utils
2159 (package
2160 (name "v4l-utils")
f1d1ef71 2161 (version "1.12.5")
945d985a
DT
2162 (source (origin
2163 (method url-fetch)
1d4ac724 2164 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
2165 "/v4l-utils-" version ".tar.bz2"))
2166 (sha256
2167 (base32
f1d1ef71 2168 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
945d985a
DT
2169 (build-system gnu-build-system)
2170 (arguments
2171 '(#:configure-flags
2172 (list (string-append "--with-udevdir="
2173 (assoc-ref %outputs "out")
2cef0f7c
DC
2174 "/lib/udev")
2175 "CXXFLAGS=-std=gnu++11")))
945d985a 2176 (native-inputs
4ca077d5
TGR
2177 `(("perl" ,perl)
2178 ("pkg-config" ,pkg-config)))
945d985a
DT
2179 (inputs
2180 `(("alsa-lib" ,alsa-lib)
2181 ("glu" ,glu)
2182 ("libjpeg" ,libjpeg)
2183 ("libx11" ,libx11)
b37662e2 2184 ("qtbase" ,qtbase)
945d985a
DT
2185 ("eudev" ,eudev)))
2186 (synopsis "Realtime video capture utilities for Linux")
2187 (description "The v4l-utils provide a series of libraries and utilities to
2188be used for realtime video capture via Linux-specific APIs.")
2189 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2190 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2191 (license (list license:lgpl2.1+ license:gpl2))))
2192
f464016d
DT
2193(define-public obs
2194 (package
2195 (name "obs")
a42bdd1c 2196 (version "22.0.3")
f464016d 2197 (source (origin
2f069a1f
RW
2198 (method git-fetch)
2199 (uri (git-reference
a42bdd1c 2200 (url "https://github.com/obsproject/obs-studio.git")
2f069a1f
RW
2201 (commit version)))
2202 (file-name (git-file-name name version))
f464016d
DT
2203 (sha256
2204 (base32
a42bdd1c 2205 "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i"))))
f464016d 2206 (build-system cmake-build-system)
08858812 2207 (arguments
f3bd1728 2208 `(#:tests? #f)) ; no tests
f464016d
DT
2209 (native-inputs
2210 `(("pkg-config" ,pkg-config)))
2211 (inputs
4f98c3c5
EF
2212 `(("alsa-lib" ,alsa-lib)
2213 ("curl" ,curl)
f464016d
DT
2214 ("eudev" ,eudev)
2215 ("ffmpeg" ,ffmpeg)
4f98c3c5 2216 ("fontconfig" ,fontconfig)
f464016d
DT
2217 ("freetype" ,freetype)
2218 ("jack" ,jack-1)
2219 ("jansson" ,jansson)
2220 ("libx264" ,libx264)
2221 ("libxcomposite" ,libxcomposite)
2222 ("mesa" ,mesa)
2223 ("pulseaudio" ,pulseaudio)
90a2309b
EF
2224 ("qtbase" ,qtbase)
2225 ("qtx11extras" ,qtx11extras)
4f98c3c5 2226 ("speex" ,speex)
d4df2032 2227 ("v4l-utils" ,v4l-utils)
f464016d
DT
2228 ("zlib" ,zlib)))
2229 (synopsis "Live streaming software")
2230 (description "Open Broadcaster Software provides a graphical interface for
2231video recording and live streaming. OBS supports capturing audio and video
2232from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2233and JACK.")
2234 (home-page "https://obsproject.com")
f3bd1728 2235 (supported-systems '("x86_64-linux" "i686-linux"))
f464016d 2236 (license license:gpl2+)))
d5650f86
EF
2237
2238(define-public libvdpau
2239 (package
2240 (name "libvdpau")
2241 (version "1.1.1")
2242 (source
2243 (origin
2244 (method url-fetch)
2245 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2246 name "-" version ".tar.bz2"))
2247 (sha256
2248 (base32
2249 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
2250 (build-system gnu-build-system)
2251 (native-inputs
2252 `(("pkg-config" ,pkg-config)))
2253 (inputs
3993a28a
MB
2254 `(("libx11" ,libx11 "out")
2255 ("libxext" ,libxext)
2256 ("xorgproto" ,xorgproto)))
d5650f86
EF
2257 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2258 (synopsis "Video Decode and Presentation API")
2259 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2260provides an interface to video decode acceleration and presentation hardware
2261present in modern GPUs.")
2262 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
2263
2264(define-public vdpauinfo
2265 (package
2266 (name "vdpauinfo")
2267 (version "1.0")
2268 (source
2269 (origin
2270 (method url-fetch)
2271 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2272 name "-" version ".tar.gz"))
2273 (sha256
2274 (base32
2275 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2276 (build-system gnu-build-system)
2277 (native-inputs
2278 `(("pkg-config" ,pkg-config)
2279 ("libx11" ,libx11)))
2280 (propagated-inputs
2281 `(("libvdpau" ,libvdpau)))
2282 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2283 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2284 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2285implementation.")
2286 (license (license:x11-style "file://COPYING"))))
a7d94b54 2287
67df7164
EF
2288(define-public libvdpau-va-gl
2289 (package
2290 (name "libvdpau-va-gl")
2291 (version "0.4.2")
2292 (source
2293 (origin
2294 (method url-fetch)
2295 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2296 "releases/download/v" version "/libvdpau-va-gl-"
2297 version ".tar.gz"))
2298 (sha256
2299 (base32
2300 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2301 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2302 (modules '((guix build utils)))
6cbee49d
MW
2303 (snippet '(begin (delete-file-recursively "3rdparty")
2304 #t))))
67df7164
EF
2305 (build-system cmake-build-system)
2306 (arguments
2307 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2308 (native-inputs
2309 `(("libvdpau" ,libvdpau)
2310 ("pkg-config" ,pkg-config)))
2311 (inputs
2312 `(("libva" ,libva)
2313 ("mesa" ,mesa)))
2314 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2315 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2316 (description
2317 "Many applications can use VDPAU to accelerate portions of the video
2318decoding process and video post-processing to the GPU video hardware. Since
2319there is no VDPAU available on Intel chips, they fall back to different drawing
2320techniques. This driver uses OpenGL under the hood to accelerate drawing and
2321scaling and VA-API (if available) to accelerate video decoding.")
2322 (license license:expat)))
2323
a7d94b54
LC
2324(define-public recordmydesktop
2325 (package
2326 (name "recordmydesktop")
2327 (version "0.3.8.1")
2328 (source (origin
2329 (method url-fetch)
2330 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2331 version "/recordmydesktop-" version ".tar.gz"))
2332 (sha256
2333 (base32
2334 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2335 (build-system gnu-build-system)
2336 (inputs `(("popt" ,popt)
2337 ("zlib" ,zlib)
2338 ("libx11" ,libx11)
2339 ("libice" ,libice)
2340 ("libsm" ,libsm)
2341 ("libxfixes" ,libxfixes)
2342 ("libxdamage" ,libxdamage)
2343 ("libxext" ,libxext)
ed6ba9cc 2344 ("alsa-lib" ,alsa-lib)
a7d94b54
LC
2345 ("libvorbis" ,libvorbis)
2346 ("libtheora" ,libtheora)))
2347 (home-page "http://recordmydesktop.sourceforge.net/")
2348 (synopsis "Desktop session video recorder")
2349 (description
2350 "recordMyDesktop is a command-line tool that captures the activity in
2351your graphical desktop and encodes it as a video. This is a useful tool for
2352making @dfn{screencasts}.")
2353 (license license:gpl2+)))
d8841cc5 2354
63cd4d53
AV
2355(define-public simplescreenrecorder
2356 (package
2357 (name "simplescreenrecorder")
8332ac03 2358 (version "0.3.11")
63cd4d53
AV
2359 (source
2360 (origin
21309b8b
RW
2361 (method git-fetch)
2362 (uri (git-reference
2363 (url "https://github.com/MaartenBaert/ssr.git")
2364 (commit version)))
2365 (file-name (git-file-name name version))
63cd4d53
AV
2366 (sha256
2367 (base32
21309b8b 2368 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
83c92882 2369 (build-system cmake-build-system)
63cd4d53
AV
2370 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2371 ;; README.md, the program builds and functions properly without them.
2372 ;; As a result, they are omitted. Please add them back if problems appear.
2373 (inputs
2374 `(("alsa-lib" ,alsa-lib)
8332ac03 2375 ("ffmpeg" ,ffmpeg)
63cd4d53
AV
2376 ("glu" ,glu)
2377 ("jack" ,jack-1)
2378 ("libxi" ,libxi)
2379 ("pulseaudio" ,pulseaudio)
91562061
MB
2380 ("qtbase" ,qtbase)
2381 ("qtx11extras" ,qtx11extras)))
63cd4d53 2382 (native-inputs `(("pkg-config" ,pkg-config)))
83c92882
TGR
2383 (arguments
2384 `(#:configure-flags
2385 (list "-DWITH_QT5=TRUE")
2386 #:tests? #f)) ; no test suite
63cd4d53
AV
2387 ;; Using HTTPS causes part of the page to be displayed improperly.
2388 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2389 (synopsis "Screen recorder")
2390 (description "SimpleScreenRecorder is an easy to use screen recorder with
2391a graphical user interface. It supports recording the entire screen, or a
2392part of it, and allows encoding in many different codecs and file formats.
2393Other features include a live preview and live streaming.")
2394 (license (list license:gpl3+ ; most files
2395 license:zlib ; glinject/elfhacks.*
2396 license:isc ; glinject/*
2397 license:x11)))) ; build-aux/install-sh
2398
d8841cc5
KK
2399(define-public libsmpeg
2400 (package
2401 (name "libsmpeg")
d7764d42 2402 (version "0.4.5-401")
d8841cc5
KK
2403 (source (origin
2404 (method svn-fetch)
2405 (uri (svn-reference
2406 (url "svn://svn.icculus.org/smpeg/trunk/")
2407 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
b9af0564 2408 (file-name (string-append name "-" version "-checkout"))
d8841cc5
KK
2409 (sha256
2410 (base32
2411 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2412 (build-system gnu-build-system)
2413 (arguments
e6269846
TGR
2414 `(#:phases
2415 (modify-phases %standard-phases
2416 (add-after 'unpack 'autogen.sh
2417 (lambda _
2418 (invoke "sh" "autogen.sh"))))))
d8841cc5
KK
2419 (native-inputs
2420 `(("autoconf" ,autoconf)
2421 ("automake" ,automake)))
2422 (inputs
2423 `(("sdl" ,sdl2)))
2424 (home-page "http://icculus.org/smpeg/")
2425 (synopsis "SDL MPEG decoding library")
2426 (description
2427 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2428with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2429player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2430library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2431and MPEG system streams.")
2432 (license (list license:expat
2433 license:lgpl2.1
2434 license:lgpl2.1+
2435 license:gpl2))))
4df07622 2436
d7764d42
RW
2437;; for btanks
2438(define-public libsmpeg-with-sdl1
2439 (package (inherit libsmpeg)
2440 (name "libsmpeg")
2441 (version "0.4.5-399")
2442 (source (origin
2443 (method svn-fetch)
2444 (uri (svn-reference
2445 (url "svn://svn.icculus.org/smpeg/trunk/")
2446 (revision 399))) ; tagged release 0.4.5
2447 (file-name (string-append name "-" version "-checkout"))
2448 (sha256
2449 (base32
2450 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2451 (inputs
2452 `(("sdl" ,sdl)))))
2453
4df07622
AP
2454(define-public libbdplus
2455 (package
2456 (name "libbdplus")
2457 (version "0.1.2")
2458 (source
2459 (origin
2460 (method url-fetch)
6f13c4fd 2461 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
4df07622
AP
2462 version "/" name "-" version ".tar.bz2"))
2463 (sha256
2464 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2465 (inputs
2466 `(("libgcrypt" ,libgcrypt)))
2467 (build-system gnu-build-system)
b8a31908 2468 (home-page "https://www.videolan.org/developers/libbdplus.html")
4df07622
AP
2469 (synopsis "Library for decrypting certain Blu-Ray discs")
2470 (description "libbdplus is a library which implements the BD+ System
2471specifications.")
2472 (license license:lgpl2.1+)))
8dd6fc51
AP
2473
2474(define-public libaacs
2475 (package
2476 (name "libaacs")
ba58886a 2477 (version "0.9.0")
8dd6fc51
AP
2478 (source
2479 (origin
2480 (method url-fetch)
6c2481ef 2481 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
8dd6fc51
AP
2482 version "/" name "-" version ".tar.bz2"))
2483 (sha256
ba58886a 2484 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
8dd6fc51
AP
2485 (inputs
2486 `(("libgcrypt" ,libgcrypt)))
2487 (native-inputs
2488 `(("bison" ,bison)
2489 ("flex" ,flex)))
2490 (build-system gnu-build-system)
b8a31908 2491 (home-page "https://www.videolan.org/developers/libaacs.html")
8dd6fc51
AP
2492 (synopsis "Library for decrypting certain Blu-Ray discs")
2493 (description "libaacs is a library which implements the Advanced Access
2494Content System specification.")
2495 (license license:lgpl2.1+)))
05234973 2496
2497(define-public mps-youtube
2498 (package
2499 (name "mps-youtube")
c53fa8c8 2500 (version "0.2.8")
05234973 2501 (source
2502 (origin
e0a80ee4
RW
2503 (method git-fetch)
2504 (uri (git-reference
2505 (url "https://github.com/mps-youtube/mps-youtube.git")
2506 (commit (string-append "v" version))))
2507 (file-name (git-file-name name version))
05234973 2508 (sha256
2509 (base32
e0a80ee4 2510 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
05234973 2511 (build-system python-build-system)
175d6264 2512 (arguments
2513 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2514 ;; test suite results differ depending on the country and also introduce
2515 ;; non-determinism in the tests.
2516 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2517 `(#:tests? #f))
05234973 2518 (propagated-inputs
2519 `(("python-pafy" ,python-pafy)
2520 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2521 (home-page "https://github.com/mps-youtube/mps-youtube")
2522 (synopsis "Terminal based YouTube player and downloader")
2523 (description
2524 "@code{mps-youtube} is based on mps, a terminal based program to
2525search, stream and download music. This implementation uses YouTube as
2526a source of content and can play and download video as well as audio.
2527It can use either mpv or mplayer for playback, and for conversion of
2528formats ffmpeg or libav is used. Users should install one of the
2529supported players in addition to this package.")
2530 (license license:gpl3+)))
fe047e13
EB
2531
2532(define-public handbrake
2533 (package
2534 (name "handbrake")
37b82ccc 2535 (version "1.1.2")
fe047e13
EB
2536 (source (origin
2537 (method url-fetch)
37b82ccc
EB
2538 (uri (string-append "https://download.handbrake.fr/releases/"
2539 version "/HandBrake-" version "-source.tar.bz2"))
fe047e13
EB
2540 (sha256
2541 (base32
37b82ccc 2542 "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms"))
fe047e13
EB
2543 (modules '((guix build utils)))
2544 (snippet
37b82ccc
EB
2545 ;; Remove "contrib" and source not necessary for
2546 ;; building/running under a GNU environment.
fe047e13 2547 '(begin
37b82ccc
EB
2548 (for-each delete-file-recursively
2549 '("contrib" "macosx" "win"))
2550 (substitute* "make/include/main.defs"
2551 ;; Disable unconditional inclusion of "contrib" libraries
2552 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2553 ;; which would lead to fetching and building of these
2554 ;; libraries. Use our own instead.
2555 (("MODULES \\+= contrib") "# MODULES += contrib"))
fe047e13
EB
2556 #t))))
2557 (build-system glib-or-gtk-build-system)
2558 (native-inputs
2559 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2560 ("autoconf" ,autoconf)
2561 ("curl" ,curl) ;not actually used, but tested for
2562 ("intltool" ,intltool)
2563 ("libtool" ,libtool)
2564 ("pkg-config" ,pkg-config)
2565 ("python" ,python-2))) ;for configuration
2566 (inputs
2567 `(("bzip2" ,bzip2)
2568 ("dbus-glib" ,dbus-glib)
37b82ccc 2569 ("ffmpeg" ,ffmpeg)
fe047e13
EB
2570 ("fontconfig" ,fontconfig)
2571 ("freetype" ,freetype)
2572 ("glib" ,glib)
2573 ("gstreamer" ,gstreamer)
2574 ("gst-plugins-base" ,gst-plugins-base)
2575 ("gtk+" ,gtk+)
37b82ccc 2576 ("jansson" ,jansson)
fe047e13
EB
2577 ("lame" ,lame)
2578 ("libass" ,libass)
2579 ("libbluray" ,libbluray)
2580 ("libdvdnav" ,libdvdnav)
2581 ("libdvdread" ,libdvdread)
2582 ("libgudev" ,libgudev)
2583 ("libmpeg2" ,libmpeg2)
2584 ("libnotify" ,libnotify)
2585 ("libogg" ,libogg)
37b82ccc 2586 ("libopus" ,opus)
fe047e13
EB
2587 ("libsamplerate" ,libsamplerate)
2588 ("libtheora" ,libtheora)
2589 ("libvorbis" ,libvorbis)
2590 ("libvpx" ,libvpx)
2591 ("libxml2" ,libxml2)
2592 ("libx264" ,libx264)
2593 ("x265" ,x265)
2594 ("zlib" ,zlib)))
2595 (arguments
2596 `(#:tests? #f ;tests require Ruby and claim to be unsupported
37b82ccc
EB
2597 #:configure-flags
2598 (list (string-append "CPPFLAGS=-I"
2599 (assoc-ref %build-inputs "libxml2")
2600 "/include/libxml2")
2601 "LDFLAGS=-lx265")
fe047e13
EB
2602 #:phases
2603 (modify-phases %standard-phases
189be331 2604 (replace 'bootstrap
fe047e13
EB
2605 ;; Run bootstrap ahead of time so that shebangs get patched.
2606 (lambda _
2607 (setenv "CONFIG_SHELL" (which "sh"))
2608 (setenv "NOCONFIGURE" "1")
2609 ;; Patch the Makefile so that it doesn't bootstrap again.
2610 (substitute* "gtk/module.rules"
2611 ((".*autogen\\.sh.*") ""))
da6f345c 2612 (invoke "sh" "./gtk/autogen.sh")))
fe047e13
EB
2613 (replace 'configure
2614 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2615 ;; 'configure' is not an autoconf-generated script, and
2616 ;; errors on unrecognized arguments,
2617 ;; e.g. --enable-fast-install
2618 (let ((out (assoc-ref outputs "out")))
da6f345c
TGR
2619 (apply invoke "./configure"
2620 (string-append "--prefix=" out)
2621 (or configure-flags '())))))
fe047e13
EB
2622 (add-after 'configure 'chdir-build
2623 (lambda _ (chdir "./build") #t)))))
2624 (home-page "https://handbrake.fr")
2625 (synopsis "Video transcoder")
2626 (description
2627 "HandBrake is a tool for converting video from any format to a selection
2628of modern, widely supported codecs.")
37b82ccc
EB
2629 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2630 ;; Combination under GPLv2. See LICENSE.
2631 (license license:gpl2)))
590abe01
JN
2632
2633(define-public openh264
2634 (package
2635 (name "openh264")
03229b36 2636 (version "1.8.0")
590abe01
JN
2637 (source (origin
2638 (method url-fetch)
2639 (uri (string-append "https://github.com/cisco/"
03229b36
MB
2640 name "/releases/download/v"
2641 version "/Source.Code.tar.gz.gz"))
590abe01
JN
2642 (file-name (string-append name "-" version ".tar.gz"))
2643 (sha256
2644 (base32
03229b36 2645 "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
590abe01
JN
2646 (build-system gnu-build-system)
2647 (native-inputs
2648 `(("nasm" ,nasm)
2649 ("python" ,python)))
2650 (arguments
8363a835
EF
2651 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2652 "CC=gcc")
590abe01
JN
2653 #:test-target "test"
2654 #:phases (modify-phases %standard-phases
2655 ;; no configure script
2656 (delete 'configure))))
2657 (home-page "http://www.openh264.org/")
2658 (synopsis "H264 decoder library")
2659 (description
2660 "Openh264 is a library which can decode H264 video streams.")
2661 (license license:bsd-2)))
3a44c7bb 2662
2663(define-public libmp4v2
2664 (package
2665 (name "libmp4v2")
2666 (version "2.0.0")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 ;; XXX: The new location of upstream is uncertain and will become relevant the
2671 ;; moment when the googlecode archive shuts down. It is past the date it
2672 ;; should've been turned off. I tried to communicate with upstream, but this
2673 ;; wasn't very responsive and not very helpful. The short summary is, it is
2674 ;; chaos when it comes to the amount of forks and only time will tell where
2675 ;; the new upstream location is.
2676 (uri (string-append "https://storage.googleapis.com/google-"
2677 "code-archive-downloads/v2/"
2678 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2679 (file-name (string-append name "-" version ".tar.bz2"))
2680 (sha256
2681 (base32
2682 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2683 (build-system gnu-build-system)
2684 (outputs '("out"
2685 "static")) ; 3.7MiB .a file
2686 (arguments
2687 `(#:phases
2688 (modify-phases %standard-phases
2689 (add-after 'unpack 'remove-dates
2690 (lambda _
2691 ;; Make the build reproducible.
2692 (substitute* "configure"
2693 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2694 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2695 #t))
2696 (add-after 'install 'move-static-libraries
2697 (lambda* (#:key outputs #:allow-other-keys)
2698 ;; Move static libraries to the "static" output.
2699 (let* ((out (assoc-ref outputs "out"))
2700 (lib (string-append out "/lib"))
2701 (static (assoc-ref outputs "static"))
2702 (slib (string-append static "/lib")))
2703 (mkdir-p slib)
2704 (for-each (lambda (file)
2705 (install-file file slib)
2706 (delete-file file))
2707 (find-files lib "\\.a$"))
2708 #t))))))
2709 (native-inputs
2710 `(("help2man" ,help2man)
2711 ("dejagnu" ,dejagnu)))
2712 (home-page "https://code.google.com/archive/p/mp4v2/")
2713 (synopsis "API to create and modify mp4 files")
2714 (description
2715 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2716ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2717file format that has been used as a multimedia file format in a variety of platforms and
2718applications. It is a very powerful and extensible format that can accommodate
2719practically any type of media.")
2720 (license license:mpl1.1)))
e0c40707
EJ
2721
2722(define-public libmediainfo
2723 (package
2724 (name "libmediainfo")
2725 (version "0.7.95")
2726 (source (origin
2727 (method url-fetch)
2728 (uri (string-append "https://mediaarea.net/download/source/"
2729 name "/" version"/"
2730 name "_" version ".tar.bz2"))
2731 (sha256
2732 (base32
2733 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2734 ;; TODO add a Big Buck Bunny webm for tests.
2735 (native-inputs
2736 `(("autoconf" ,autoconf)
2737 ("automake" ,automake)
2738 ("libtool" ,libtool)
2739 ("pkg-config" ,pkg-config)
2740 ("zlib" ,zlib)
2741 ("tinyxml2" ,tinyxml2)
2742 ("curl" ,curl)
2743 ("libzen" ,libzen)))
2744 (build-system gnu-build-system)
2745 (arguments
2746 '(#:tests? #f ; see above TODO
2747 #:phases
2748 ;; build scripts not in root of archive
2749 (modify-phases %standard-phases
0cae36b5 2750 (add-after 'unpack 'change-to-build-dir
e0c40707 2751 (lambda _
0cae36b5
EF
2752 (chdir "Project/GNU/Library")
2753 #t))
2754 (add-after 'change-to-build-dir 'autogen
e0c40707 2755 (lambda _
bf6edb95 2756 (invoke "sh" "autogen.sh"))))))
e0c40707
EJ
2757 (home-page "https://mediaarea.net/en/MediaInfo")
2758 (synopsis "Library for retrieving media metadata")
2759 (description "MediaInfo is a library used for retrieving technical
2760information and other metadata about audio or video files. A non-exhaustive
2761list of the information MediaInfo can retrieve from media files include:
2762
2763@itemize
2764@item General: title, author, director, album, track number, date, duration...
2765@item Video: codec, aspect, fps, bitrate...
2766@item Audio: codec, sample rate, channels, language, bitrate...
2767@item Text: language of subtitle
2768@item Chapters: number of chapters, list of chapters
2769@end itemize
2770
2771MediaInfo supports the following formats:
2772
2773@itemize
2774@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2775MPEG-2, MPEG-4, DVD (VOB)...
2776@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2777@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2778@item Subtitles: SRT, SSA, ASS, SAMI...
2779@end itemize\n")
2780 (license license:bsd-2)))
2781
d5fa2777
EJ
2782;; TODO also have a GUI version available
2783(define-public mediainfo
2784 (package
2785 (name "mediainfo")
f528588a 2786 (version "18.12")
d5fa2777
EJ
2787 (source (origin
2788 (method url-fetch)
f528588a
PN
2789 ;; Warning: This source has proved unreliable 1 time at least.
2790 ;; Consider an alternate source or report upstream if this
2791 ;; happens again.
d5fa2777
EJ
2792 (uri (string-append "https://mediaarea.net/download/source/"
2793 name "/" version "/"
2794 name "_" version ".tar.bz2"))
2795 (sha256
2796 (base32
f528588a 2797 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
d5fa2777
EJ
2798 (native-inputs
2799 `(("autoconf" ,autoconf)
2800 ("automake" ,automake)
2801 ("libtool" ,libtool)
2802 ("pkg-config" ,pkg-config)
2803 ("zlib" ,zlib)
c695fb76 2804 ("libmediainfo" ,libmediainfo)
d5fa2777
EJ
2805 ("libzen" ,libzen)))
2806 (build-system gnu-build-system)
2807 (arguments
2808 '(#:tests? #f ; lacks tests
2809 #:phases
2810 ;; build scripts not in root of archive
2811 (modify-phases %standard-phases
2f17187f 2812 (add-after 'unpack 'change-to-build-dir
d5fa2777 2813 (lambda _
2f17187f 2814 (chdir "Project/GNU/CLI")
f528588a 2815 #t)))))
d5fa2777
EJ
2816 (home-page "https://mediaarea.net/en/MediaInfo")
2817 (synopsis "Utility for reading media metadata")
2818 (description "MediaInfo is a utility used for retrieving technical
2819information and other metadata about audio or video files. It supports the
2820many codecs and formats supported by libmediainfo.")
2821 (license license:bsd-2)))
fa379a5b
CL
2822
2823(define-public livemedia-utils
2824 (package
2825 (name "livemedia-utils")
318ec0a8 2826 (version "2018.10.17")
fa379a5b
CL
2827 (source (origin
2828 (method url-fetch)
2829 (uri (string-append
517c66c0 2830 "https://download.videolan.org/contrib/live555/live."
fa379a5b
CL
2831 version ".tar.gz"))
2832 (sha256
2833 (base32
318ec0a8 2834 "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
156c14c1 2835 (modules '((guix build utils)))
6cbee49d
MW
2836 (snippet '(begin
2837 ;; As of glibc 2.26, <xlocale.h> no longer is.
2838 (substitute* "liveMedia/include/Locale.hh"
2857e527
MW
2839 (("xlocale\\.h") "locale.h"))
2840 #t))))
fa379a5b
CL
2841 (build-system gnu-build-system)
2842 (arguments
2843 '(#:tests? #f ; no tests
2844 #:make-flags (list "CC=gcc"
2845 (string-append "LDFLAGS=-Wl,-rpath="
2846 (assoc-ref %outputs "out") "/lib")
2847 (string-append "PREFIX="
2848 (assoc-ref %outputs "out")))
2849 #:phases (modify-phases %standard-phases
2850 (add-before 'configure 'fix-makefiles-generation
2851 (lambda _
2852 (substitute* "genMakefiles"
2853 (("/bin/rm") "rm"))
2854 #t))
2855 (replace 'configure
2856 (lambda _
6b677bb0
TGR
2857 (invoke "./genMakefiles"
2858 "linux-with-shared-libraries"))))))
fa379a5b
CL
2859 (home-page "http://www.live555.com/liveMedia/")
2860 (synopsis "Set of C++ libraries for multimedia streaming")
2861 (description "This code forms a set of C++ libraries for multimedia
2862streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2863can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2864JPEG video, and several audio codecs. They can easily be extended to support
2865additional (audio and/or video) codecs, and can also be used to build basic
2866RTSP or SIP clients and servers.")
2867 (license license:lgpl3+)))
0dff4dd9
CL
2868
2869(define-public libdvbpsi
2870 (package
2871 (name "libdvbpsi")
74b977d7 2872 (version "1.3.2")
0dff4dd9
CL
2873 (source (origin
2874 (method url-fetch)
2875 (uri (string-append
2876 "https://download.videolan.org/pub/libdvbpsi/"
2877 version "/libdvbpsi-" version ".tar.bz2"))
2878 (sha256
2879 (base32
74b977d7 2880 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
0dff4dd9
CL
2881 (build-system gnu-build-system)
2882 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2883 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2884tables")
2885 (description "libdvbpsi is a simple library designed for decoding and
2886generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2887and ITU-T H.222.0.")
2888 (license license:lgpl2.1)))
6779ae27
JL
2889
2890(define-public ffms2
2891 (package
2892 (name "ffms2")
2893 (version "2.23")
b1eaede0 2894 (home-page "https://github.com/FFMS/ffms2")
6779ae27 2895 (source (origin
940fdd0c
RW
2896 (method git-fetch)
2897 (uri (git-reference
2898 (url "https://github.com/FFMS/ffms2.git")
2899 (commit version)))
2900 (file-name (git-file-name name version))
6779ae27
JL
2901 (sha256
2902 (base32
940fdd0c 2903 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
6779ae27
JL
2904 (build-system gnu-build-system)
2905 (arguments
2906 '(#:configure-flags
2907 (list "--enable-avresample")))
2908 (inputs
2909 `(("zlib" ,zlib)))
2910 (propagated-inputs
2911 `(("ffmpeg" ,ffmpeg)))
2912 (native-inputs
2913 `(("pkg-config" ,pkg-config)))
2914 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2915 (description
2916 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2917programmers to access a standard API to open and decompress media files.")
2918 ;; sources are distributed under a different license that the binary.
2919 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2920 (license license:gpl2+))); inherits from ffmpeg
c812f460
JL
2921
2922(define-public aegisub
2923 (package
2924 (name "aegisub")
2925 (version "3.2.2")
2926 (source (origin
2927 (method url-fetch)
2928 (uri (string-append
2929 "http://ftp.aegisub.org/pub/archives/releases/source/"
2930 name "-" version ".tar.xz"))
2931 (sha256
2932 (base32
18e56ad7 2933 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
644af6c8
BH
2934 (patches (search-patches "aegisub-icu59-include-unistr.patch"
2935 "aegisub-boost68.patch"))))
c812f460
JL
2936 (build-system gnu-build-system)
2937 (arguments
2938 `(#:configure-flags
2939 (list "--disable-update-checker"
2940 "--without-portaudio"
2941 "--without-openal"
18e56ad7
BH
2942 "--without-oss"
2943 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
c812f460
JL
2944 ;; tests require busted, a lua package we don't have yet
2945 #:tests? #f
2946 #:phases
2947 (modify-phases %standard-phases
2948 (add-before 'configure 'fix-ldflags
2949 (lambda _
18e56ad7 2950 (setenv "LDFLAGS" "-pthread")
f6974e15
BH
2951 #t))
2952 (add-after 'unpack 'fix-boost-headers
2953 (lambda _
2954 (substitute*
2955 '("src/subtitles_provider_libass.cpp"
2956 "src/colour_button.cpp"
2957 "src/video_provider_dummy.cpp"
2958 "./src/video_frame.cpp")
2959 (("#include <boost/gil/gil_all.hpp>")
2960 "#include <boost/gil.hpp>"))
2961 #t)))))
c812f460
JL
2962 (inputs
2963 `(("boost" ,boost)
2964 ("desktop-file-utils" ,desktop-file-utils)
2965 ("ffms2" ,ffms2)
2966 ("fftw" ,fftw)
2967 ("hunspell" ,hunspell)
2968 ("mesa" ,mesa)
2969 ("libass" ,libass)
2970 ("alsa-lib" ,alsa-lib)
2971 ("pulseaudio" ,pulseaudio)
2972 ("libx11" ,libx11)
2973 ("freetype" ,freetype)
2974 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2975 (native-inputs
2976 `(("intltool" ,intltool)
2977 ("pkg-config" ,pkg-config)))
2978 (home-page "http://www.aegisub.org/")
2979 (synopsis "Subtitle engine")
2980 (description
2981 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2982it quick and easy to time subtitles to audio, and features many powerful
2983tools for styling them, including a built-in real-time video preview.")
2984 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2985 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2986 license:expat)))) ; and src/gl that is under a license similar
2987 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2988 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2989 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2990
635f981b 2991(define-public gst-transcoder
2992 (package
2993 (name "gst-transcoder")
2994 (version "1.12.2")
2995 (source
2996 (origin
e7c7b10d
RW
2997 (method git-fetch)
2998 (uri (git-reference
2999 (url "https://github.com/pitivi/gst-transcoder.git")
3000 (commit version)))
3001 (file-name (git-file-name name version))
635f981b 3002 (sha256
3003 (base32
e7c7b10d 3004 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
635f981b 3005 (build-system meson-build-system)
3006 (inputs
3007 `(("gobject-introspection" ,gobject-introspection)
3008 ("glib" ,glib)
3009 ("gstreamer" ,gstreamer)
3010 ("gst-plugins-base" ,gst-plugins-base)))
3011 (native-inputs
3012 `(("python" ,python)
3013 ("pkg-config" ,pkg-config)))
3014 (home-page "https://github.com/pitivi/gst-transcoder/")
3015 (synopsis "GStreamer Transcoding API")
3016 (description "GStreamer Transcoding API")
3017 (license license:lgpl2.1)))
e37bdc0f 3018
3019(define-public gavl
3020 (package
3021 (name "gavl")
3022 (version "1.4.0")
3023 (source
3024 (origin
3025 (method url-fetch)
3026 (uri (string-append "mirror://sourceforge/gmerlin/"
3027 name "/" version "/"
3028 name "-" version ".tar.gz"))
3029 (file-name (string-append name "-" version ".tar.gz"))
3030 (sha256
3031 (base32
3032 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3033 (build-system gnu-build-system)
c178aa34
EF
3034 (arguments
3035 '(#:configure-flags '("LIBS=-lm")))
e37bdc0f 3036 (native-inputs
3037 `(("pkg-config" ,pkg-config)
3038 ("doxygen" ,doxygen)))
3039 (home-page "http://gmerlin.sourceforge.net")
3040 (synopsis "Low level library for multimedia API building")
3041 (description
3042 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3043library, upon which multimedia APIs can be built. Gavl handles all the
3044details of audio and video formats like colorspaces, sample rates,
3045multichannel configurations, etc. It provides standardized definitions for
3046those formats as well as container structures for carrying audio samples or
3047video images inside an application.
3048
3049In addition, it handles the sometimes ugly task of converting between all
3050these formats and provides some elementary operations (copying, scaling,
3051alpha blending etc).")
3052 (license license:gpl3)))
49e1d76d 3053
3054(define-public frei0r-plugins
3055 (package
3056 (name "frei0r-plugins")
3057 (version "1.6.1")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (string-append "https://files.dyne.org/frei0r/"
3062 "frei0r-plugins-" version ".tar.gz"))
3063 (sha256
3064 (base32
3065 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
3066 (build-system gnu-build-system)
3067 (arguments
3068 `(#:phases
3069 (modify-phases %standard-phases
3070 (add-after 'unpack 'autotools
3071 (lambda _
63181c85
TGR
3072 (invoke "sh" "autogen.sh"))))))
3073 ;; TODO: opencv for additional face detection filters.
49e1d76d 3074 (inputs
3075 `(("gavl" ,gavl)
3076 ("cairo" ,cairo)))
3077 (native-inputs
3078 `(("pkg-config" ,pkg-config)
3079 ("libtool" ,libtool)
3080 ("automake" ,automake)
3081 ("autoconf" ,autoconf)))
3082 (home-page "https://www.dyne.org/software/frei0r/")
3083 (synopsis "Minimalistic plugin API for video effects")
3084 (description
3085 "Frei0r is a minimalistic plugin API for video effects.
3086The main emphasis is on simplicity for an API that will round up
3087the most common video effects into simple filters, sources and
3088mixers that can be controlled by parameters. Frei0r wants to
3089provide a way to share these simple effects between many
3090applications, avoiding their reimplementation by different projects.
3091It counts more than 100 plugins.")
3092 (license (list license:gpl2+
3093 ;; The following files are licensed as LGPL2.1+:
3094 ;; src/generator/ising0r/ising0r.c
3095 ;; src/generator/onecol0r/onecol0r.cpp
3096 ;; src/generator/nois0r/nois0r.cpp
3097 ;; src/generator/lissajous0r/lissajous0r.cpp
3098 ;; src/filter/ndvi/gradientlut.hpp
3099 ;; src/filter/ndvi/ndvi.cpp
3100 ;; src/filter/facedetect/facedetect.cpp
3101 license:lgpl2.1+))))
eb3e41c9
LC
3102
3103(define-public motion
3104 (package
3105 (name "motion")
a9e9c738 3106 (version "4.2.2")
eb3e41c9
LC
3107 (home-page "https://motion-project.github.io/")
3108 (source (origin
2ea678fa
TGR
3109 (method git-fetch)
3110 (uri (git-reference
3111 (url "https://github.com/Motion-Project/motion.git")
3112 (commit (string-append "release-" version))))
eb3e41c9
LC
3113 (sha256
3114 (base32
a9e9c738 3115 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
2ea678fa 3116 (file-name (git-file-name name version))))
eb3e41c9
LC
3117 (build-system gnu-build-system)
3118 (native-inputs
464f5447 3119 `(("autoconf" ,autoconf-wrapper)
eb3e41c9 3120 ("automake" ,automake)
33bddd30 3121 ("gettext" ,gettext-minimal)
eb3e41c9
LC
3122 ("pkg-config" ,pkg-config)))
3123 (inputs
3124 `(("libjpeg" ,libjpeg)
bb5c508c 3125 ("ffmpeg" ,ffmpeg-3.4)
c3069cd1 3126 ("libmicrohttpd" ,libmicrohttpd)
eb3e41c9
LC
3127 ("sqlite" ,sqlite)))
3128 (arguments
3129 '(#:phases (modify-phases %standard-phases
189be331 3130 (replace 'bootstrap
eb3e41c9
LC
3131 (lambda _
3132 (patch-shebang "version.sh")
3133 (invoke "autoreconf" "-vfi"))))
3134 #:configure-flags '("--sysconfdir=/etc")
3135 #:make-flags (list (string-append "sysconfdir="
3136 (assoc-ref %outputs "out")
3137 "/etc"))
3138
a9e9c738 3139 #:tests? #f)) ; no 'check' target
eb3e41c9
LC
3140 (synopsis "Detect motion from video signals")
3141 (description
3142 "Motion is a program that monitors the video signal from one or more
3143cameras and is able to detect if a significant part of the picture has
3144changed. Or in other words, it can detect motion.")
3145
3146 ;; Some files say "version 2" and others "version 2 or later".
3147 (license license:gpl2)))
f27f264e
PN
3148
3149(define-public subdl
3150 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3151 (revision "1"))
3152 (package
3153 (name "subdl")
3154 (version (git-version "1.0.3" revision commit))
3155 (source (origin
3156 (method git-fetch)
3157 (uri (git-reference
3158 (url "https://github.com/alexanderwink/subdl.git")
3159 (commit commit)))
3160 (file-name (git-file-name name version))
3161 (sha256
3162 (base32
3163 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3164 (build-system trivial-build-system)
3165 (arguments
3166 `(#:modules ((guix build utils))
3167 #:builder (begin
3168 (use-modules (guix build utils))
3169 (let* ((out (assoc-ref %outputs "out"))
3170 (bin (string-append out "/bin"))
3171 (source (assoc-ref %build-inputs "source"))
3172 (python (assoc-ref %build-inputs "python")))
3173 (install-file (string-append source "/subdl") bin)
3174 (patch-shebang (string-append bin "/subdl")
3175 (list (string-append python "/bin")))))))
3176 (inputs `(("python" ,python)))
3177 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3178 (description "Subdl is a command-line tool for downloading subtitles from
3179opensubtitles.org. By default, it will search for English subtitles, display
3180the results, download the highest-rated result in the requested language and
3181save it to the appropriate filename.")
3182 (license license:gpl3+)
3183 (home-page "https://github.com/alexanderwink/subdl"))))
eb88e2c1
CL
3184
3185(define-public l-smash
3186 (package
3187 (name "l-smash")
3188 (version "2.14.5")
3189 (source (origin
45b2eff0
RW
3190 (method git-fetch)
3191 (uri (git-reference
3192 (url "https://github.com/l-smash/l-smash.git")
3193 (commit (string-append "v" version))))
3194 (file-name (git-file-name name version))
eb88e2c1
CL
3195 (sha256
3196 (base32
45b2eff0 3197 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
eb88e2c1
CL
3198 (build-system gnu-build-system)
3199 (arguments
3200 `(#:tests? #f ;no tests
3201 #:make-flags
3202 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3203 (assoc-ref %outputs "out") "/lib"))
3204 #:phases
3205 (modify-phases %standard-phases
3206 ;; configure fails if it is followed by CONFIG_SHELL
3207 (replace 'configure
3208 (lambda* (#:key outputs #:allow-other-keys)
3209 (let ((out (assoc-ref outputs "out")))
3210 (invoke "./configure" (string-append "--prefix=" out)
3211 "--disable-static")))))))
3212 (native-inputs
3213 `(("which" ,which)))
3214 (home-page "https://l-smash.github.io/l-smash/")
3215 (synopsis "MP4 multiplexer and demultiplexer library")
3216 (description
3217 "L-SMASH is a cross-platform library that handles the ISO base media file
3218format and some of its derived file formats, including MP4. It operates as a
3219multiplexer and demultiplexer, and can mux video and audio in several formats
3220using standalone executable files.")
3221 (license license:isc)))
a0135eee
LF
3222
3223(define-public qtfaststart
3224 (package
3225 (name "qtfaststart")
3226 (version "1.8")
3227 (source (origin
3228 (method url-fetch)
3229 (uri (pypi-uri "qtfaststart" version))
3230 (sha256
3231 (base32
3232 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3233 (build-system python-build-system)
3234 (arguments
3235 '(#:tests? #f)) ; no test suite
3236 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3237 (description "qtfaststart enables streaming and pseudo-streaming of
3238QuickTime and MP4 files by moving metadata and offset information to the
3239beginning of the file. It can also print some useful information about the
3240structure of the file. This program is based on qt-faststart.c from the FFmpeg
3241project, which is released into the public domain, as well as ISO 14496-12:2005
3242(the official spec for MP4), which can be obtained from the ISO or found
3243online.")
3244 (home-page "https://github.com/danielgtaylor/qtfaststart")
3245 (license license:expat)))
485638cd
LF
3246
3247(define-public vidstab
3248 (package
3249 (name "vidstab")
3250 (version "1.1.0")
3251 (source (origin
d61236df
RW
3252 (method git-fetch)
3253 (uri (git-reference
3254 (url "https://github.com/georgmartius/vid.stab.git")
3255 (commit (string-append "v" version))))
3256 (file-name (git-file-name name version))
485638cd
LF
3257 (sha256
3258 (base32
d61236df 3259 "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
485638cd
LF
3260 (build-system cmake-build-system)
3261 (arguments
3262 '(#:tests? #f)) ; tests are not run as part of standard build process
3263 (home-page "http://public.hronopik.de/vid.stab/")
3264 (synopsis "Video stabilization library")
3265 (description "Vidstab is a video stabilization library which can be used
3266with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3267vehicle typically suffers from undesirable shakes and jitters. Activities such
3268as surfing, skiing, riding and walking while shooting videos are especially
3269prone to erratic camera shakes. Vidstab targets these video contents to help
3270create smoother and stable videos.")
3271 (license license:gpl2+)))
579a9cde
EB
3272
3273(define-public libopenshot
3274 (package
3275 (name "libopenshot")
3276 (version "0.2.2")
3277 (source (origin
3278 (method git-fetch)
3279 (uri (git-reference
3280 (url "https://github.com/OpenShot/libopenshot")
3281 (commit (string-append "v" version))))
3282 (file-name (git-file-name name version))
3283 (sha256
3284 (base32
3285 "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
3286 (modules '((guix build utils)))
3287 (snippet '(begin
3288 ;; Allow overriding of the python installation dir
3289 (substitute* "src/bindings/python/CMakeLists.txt"
3290 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3291 (string-append set " CACHE PATH "
3292 "\"Python bindings directory\")")))
277becbb 3293 (delete-file-recursively "thirdparty")
579a9cde 3294 #t))
4f889375
EF
3295 (patches (search-patches "libopenshot-fixup-tests.patch"
3296 "libopenshot-tests-with-system-libs.patch"))))
579a9cde
EB
3297 (build-system cmake-build-system)
3298 (native-inputs
3299 `(("pkg-config" ,pkg-config)
3300 ("python" ,python)
3301 ("swig" ,swig)
3302 ("unittest++" ,unittest-cpp)))
3303 (propagated-inputs ;all referenced in installed headers
3304 `(("cppzmq" ,cppzmq)
3305 ("ffmpeg" ,ffmpeg)
3306 ("imagemagick" ,imagemagick)
3307 ("jsoncpp" ,jsoncpp)
3308 ("libopenshot-audio" ,libopenshot-audio)
ad656e70
EF
3309 ("qtbase" ,qtbase)
3310 ("qtmultimedia" ,qtmultimedia)
579a9cde
EB
3311 ("zeromq" ,zeromq)))
3312 (arguments
3313 `(#:configure-flags
3314 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3315 ,(version-major+minor (package-version python))
3316 "/site-packages")
3317 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3318 #:phases
3319 (modify-phases %standard-phases
3320 (add-before 'configure 'set-vars
3321 (lambda* (#:key inputs #:allow-other-keys)
3322 (setenv "LIBOPENSHOT_AUDIO_DIR"
3323 (assoc-ref inputs "libopenshot-audio"))
3324 (setenv "ZMQDIR"
3325 (assoc-ref inputs "zeromq"))
3326 (setenv "UNITTEST_DIR"
3327 (string-append (assoc-ref inputs "unittest++")
3328 "/include/UnitTest++"))
3329 #t)))))
3330 (home-page "https://openshot.org")
3331 (synopsis "Video-editing, animation, and playback library")
3332 (description "OpenShot Library (libopenshot) is a powerful C++ video
3333editing library with a multi-threaded and feature rich video editing
3334API. It includes bindings for Python, Ruby, and other languages.")
3335 (license license:lgpl3+)))
69a3fcc0
EB
3336
3337(define-public openshot
3338 (package
3339 (name "openshot")
3340 (version "2.4.3")
3341 (source (origin
3342 (method git-fetch)
3343 (uri (git-reference
3344 (url "https://github.com/OpenShot/openshot-qt")
3345 (commit (string-append "v" version))))
3346 (file-name (git-file-name name version))
3347 (sha256
3348 (base32
3349 "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
3350 (build-system python-build-system)
3351 (inputs
3352 `(("ffmpeg" ,ffmpeg)
3353 ("libopenshot" ,libopenshot)
3354 ("python" ,python)
3355 ("python-pyqt" ,python-pyqt)
3356 ("python-pyzmq" ,python-pyzmq)
3357 ("python-requests" ,python-requests)
3358 ("qtsvg" ,qtsvg)))
3359 (arguments
3360 `(#:tests? #f ;no tests
3361 #:phases (modify-phases %standard-phases
3362 (delete 'build) ;install phase does all the work
3363 (add-before 'install 'set-tmp-home
3364 (lambda _
3365 ;; src/classes/info.py "needs" to create several
3366 ;; directories in $HOME when loaded during build
3367 (setenv "HOME" "/tmp")
3368 #t))
3369 (add-after 'install 'wrap-program
3370 (lambda* (#:key inputs outputs #:allow-other-keys)
3371 (wrap-program (string-append (assoc-ref outputs "out")
3372 "/bin/openshot-qt")
3373 `("QT_PLUGIN_PATH" prefix
3374 ,(list (string-append (assoc-ref inputs "qtsvg")
3375 "/lib/qt5/plugins/")))))))))
3376 (home-page "https://openshot.org")
3377 (synopsis "Video editor")
3378 (description "OpenShot takes your videos, photos, and music files and
3379helps you create the film you have always dreamed of. Easily add sub-titles,
3380transitions, and effects and then export your film to many common formats.")
3381 (license license:gpl3+)))
8c380a01
EF
3382
3383(define-public dav1d
3384 (package
3385 (name "dav1d")
5f7c036c 3386 (version "0.2.0")
8c380a01
EF
3387 (source
3388 (origin
3389 (method url-fetch)
5f7c036c
LF
3390 (uri (list ;; The canonical download site
3391 (string-append "https://downloads.videolan.org/pub/videolan/"
3392 "dav1d/" version "/dav1d-" version ".tar.xz")
3393
3394 ;; Auto-generated tarballs from the Git repo?
3395 (string-append "https://code.videolan.org/videolan/dav1d/-/"
3396 "archive/" version "/dav1d-" version ".tar.bz2")))
8c380a01
EF
3397 (sha256
3398 (base32
5f7c036c 3399 "0q0dbbl91syjnkygz268gh4b7mdcgl6hldj300a4cbqidsadpl5p"))))
8c380a01
EF
3400 (build-system meson-build-system)
3401 (native-inputs `(("nasm" ,nasm)))
3402 (home-page "https://code.videolan.org/videolan/dav1d")
3403 (synopsis "AV1 decoder")
3404 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3405speed and correctness.")
3406 (license license:bsd-2)))
20b4aa6b
RH
3407
3408(define-public wlstream
3409 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3410 (revision "1"))
3411 (package
3412 (name "wlstream")
3413 (version (git-version "0.0" revision commit))
3414 (source
1d591432
RH
3415 (origin
3416 (method git-fetch)
3417 (uri (git-reference
3418 (url "https://github.com/atomnuker/wlstream.git")
3419 (commit commit)))
3420 (file-name (git-file-name name version))
3421 (sha256
3422 (base32
3423 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
20b4aa6b
RH
3424 (build-system meson-build-system)
3425 (native-inputs `(("libdrm" ,libdrm)
3426 ("pkg-config" ,pkg-config)))
3427 (inputs `(("ffmpeg" ,ffmpeg)
3428 ("pulseaudio" ,pulseaudio)
3429 ("wayland" ,wayland)
3430 ("wayland-protocols" ,wayland-protocols)))
3431 (home-page "https://github.com/atomnuker/wlstream")
3432 (synopsis "Screen capture tool for Wayland sessions")
3433 (description "Wlstream is a screen capture tool for recording audio and
3434video from a Wayland session.")
3435 (license license:lgpl2.1+))))