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