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