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