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