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