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