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