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