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