gnu: mlt: 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 git-fetch)
1460 (uri (git-reference
1461 (url "https://github.com/soimort/you-get.git")
1462 (commit (string-append "v" version))))
1463 (file-name (git-file-name name version))
1464 (sha256
1465 (base32
1466 "1rwkn3wb3r70b8cqj40qdknkg9kqbgzkvi901hbpy2a8s1b7858n"))))
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 git-fetch)
1858 (uri (git-reference
1859 (url "https://github.com/vapoursynth/vapoursynth.git")
1860 (commit (string-append "R" version))))
1861 (file-name (git-file-name name version))
1862 (sha256
1863 (base32
1864 "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
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 git-fetch)
2008 (uri (git-reference
2009 (url "https://github.com/mltframework/mlt.git")
2010 (commit (string-append "v" version))))
2011 (file-name (git-file-name name version))
2012 (sha256
2013 (base32
2014 "0ki86yslr5ywa6sz8pjrgd9a4rn2rr4mss2zkmqi7pq8prgsm1fr"))
2015 (modules '((guix build utils)))
2016 (snippet '(begin
2017 ;; As of glibc 2.26, <xlocale.h> no longer is.
2018 (substitute* "src/framework/mlt_property.h"
2019 (("xlocale\\.h") "locale.h"))
2020 #t))))
2021 (build-system gnu-build-system)
2022 (arguments
2023 `(#:tests? #f ; no tests
2024 #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
2025 #:configure-flags
2026 (list "--enable-gpl3"
2027 "--enable-gpl")
2028 #:phases
2029 (modify-phases %standard-phases
2030 (add-after
2031 'configure 'override-LDFLAGS
2032 (lambda* (#:key outputs #:allow-other-keys)
2033 (substitute* "config.mak"
2034 (("LDFLAGS\\+=")
2035 (string-append "LDFLAGS+=-Wl,-rpath="
2036 (assoc-ref outputs "out")
2037 "/lib ")))
2038 #t)))))
2039 (inputs
2040 `(("alsa-lib" ,alsa-lib)
2041 ("ffmpeg" ,ffmpeg-3.4)
2042 ("fftw" ,fftw)
2043 ("frei0r-plugins" ,frei0r-plugins)
2044 ("gdk-pixbuf" ,gdk-pixbuf)
2045 ("gtk+" ,gtk+-2)
2046 ("libxml2" ,libxml2)
2047 ("jack" ,jack-1)
2048 ("ladspa" ,ladspa)
2049 ("libsamplerate" ,libsamplerate)
2050 ("pulseaudio" ,pulseaudio)
2051 ("qtbase" ,qtbase)
2052 ("qtsvg" ,qtsvg)
2053 ("sdl" ,sdl)
2054 ("sox" ,sox)))
2055 (native-inputs
2056 `(("pkg-config" ,pkg-config)))
2057 (home-page "https://www.mltframework.org/")
2058 (synopsis "Author, manage, and run multitrack audio/video compositions")
2059 (description
2060 "MLT is a multimedia framework, designed and developed for television
2061 broadcasting. It provides a toolkit for broadcasters, video editors, media
2062 players, transcoders, web streamers and many more types of applications. The
2063 functionality of the system is provided via an assortment of ready to use
2064 tools, XML authoring components, and an extensible plug-in based API.")
2065 (license license:gpl3)))
2066
2067 (define-public v4l-utils
2068 (package
2069 (name "v4l-utils")
2070 (version "1.12.5")
2071 (source (origin
2072 (method url-fetch)
2073 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2074 "/v4l-utils-" version ".tar.bz2"))
2075 (sha256
2076 (base32
2077 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
2078 (build-system gnu-build-system)
2079 (arguments
2080 '(#:configure-flags
2081 (list (string-append "--with-udevdir="
2082 (assoc-ref %outputs "out")
2083 "/lib/udev")
2084 "CXXFLAGS=-std=gnu++11")))
2085 (native-inputs
2086 `(("perl" ,perl)
2087 ("pkg-config" ,pkg-config)))
2088 (inputs
2089 `(("alsa-lib" ,alsa-lib)
2090 ("glu" ,glu)
2091 ("libjpeg" ,libjpeg)
2092 ("libx11" ,libx11)
2093 ("qtbase" ,qtbase)
2094 ("eudev" ,eudev)))
2095 (synopsis "Realtime video capture utilities for Linux")
2096 (description "The v4l-utils provide a series of libraries and utilities to
2097 be used for realtime video capture via Linux-specific APIs.")
2098 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2099 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2100 (license (list license:lgpl2.1+ license:gpl2))))
2101
2102 (define-public obs
2103 (package
2104 (name "obs")
2105 (version "20.1.3")
2106 (source (origin
2107 (method url-fetch)
2108 (uri (string-append "https://github.com/jp9000/obs-studio"
2109 "/archive/" version ".tar.gz"))
2110 (file-name (string-append name "-" version ".tar.gz"))
2111 (sha256
2112 (base32
2113 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
2114 (build-system cmake-build-system)
2115 (arguments
2116 `(#:tests? #f)) ; no tests
2117 (native-inputs
2118 `(("pkg-config" ,pkg-config)))
2119 (inputs
2120 `(("alsa-lib" ,alsa-lib)
2121 ("curl" ,curl)
2122 ("eudev" ,eudev)
2123 ("ffmpeg" ,ffmpeg)
2124 ("fontconfig" ,fontconfig)
2125 ("freetype" ,freetype)
2126 ("jack" ,jack-1)
2127 ("jansson" ,jansson)
2128 ("libx264" ,libx264)
2129 ("libxcomposite" ,libxcomposite)
2130 ("mesa" ,mesa)
2131 ("pulseaudio" ,pulseaudio)
2132 ("qtbase" ,qtbase)
2133 ("qtx11extras" ,qtx11extras)
2134 ("speex" ,speex)
2135 ("v4l-utils" ,v4l-utils)
2136 ("zlib" ,zlib)))
2137 (synopsis "Live streaming software")
2138 (description "Open Broadcaster Software provides a graphical interface for
2139 video recording and live streaming. OBS supports capturing audio and video
2140 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2141 and JACK.")
2142 (home-page "https://obsproject.com")
2143 (supported-systems '("x86_64-linux" "i686-linux"))
2144 (license license:gpl2+)))
2145
2146 (define-public libvdpau
2147 (package
2148 (name "libvdpau")
2149 (version "1.1.1")
2150 (source
2151 (origin
2152 (method url-fetch)
2153 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2154 name "-" version ".tar.bz2"))
2155 (sha256
2156 (base32
2157 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
2158 (build-system gnu-build-system)
2159 (native-inputs
2160 `(("pkg-config" ,pkg-config)))
2161 (inputs
2162 `(("libx11" ,libx11 "out")
2163 ("libxext" ,libxext)
2164 ("xorgproto" ,xorgproto)))
2165 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2166 (synopsis "Video Decode and Presentation API")
2167 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2168 provides an interface to video decode acceleration and presentation hardware
2169 present in modern GPUs.")
2170 (license (license:x11-style "file://COPYING"))))
2171
2172 (define-public vdpauinfo
2173 (package
2174 (name "vdpauinfo")
2175 (version "1.0")
2176 (source
2177 (origin
2178 (method url-fetch)
2179 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2180 name "-" version ".tar.gz"))
2181 (sha256
2182 (base32
2183 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2184 (build-system gnu-build-system)
2185 (native-inputs
2186 `(("pkg-config" ,pkg-config)
2187 ("libx11" ,libx11)))
2188 (propagated-inputs
2189 `(("libvdpau" ,libvdpau)))
2190 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2191 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2192 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2193 implementation.")
2194 (license (license:x11-style "file://COPYING"))))
2195
2196 (define-public libvdpau-va-gl
2197 (package
2198 (name "libvdpau-va-gl")
2199 (version "0.4.2")
2200 (source
2201 (origin
2202 (method url-fetch)
2203 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2204 "releases/download/v" version "/libvdpau-va-gl-"
2205 version ".tar.gz"))
2206 (sha256
2207 (base32
2208 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2209 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2210 (modules '((guix build utils)))
2211 (snippet '(begin (delete-file-recursively "3rdparty")
2212 #t))))
2213 (build-system cmake-build-system)
2214 (arguments
2215 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2216 (native-inputs
2217 `(("libvdpau" ,libvdpau)
2218 ("pkg-config" ,pkg-config)))
2219 (inputs
2220 `(("libva" ,libva)
2221 ("mesa" ,mesa)))
2222 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2223 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2224 (description
2225 "Many applications can use VDPAU to accelerate portions of the video
2226 decoding process and video post-processing to the GPU video hardware. Since
2227 there is no VDPAU available on Intel chips, they fall back to different drawing
2228 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2229 scaling and VA-API (if available) to accelerate video decoding.")
2230 (license license:expat)))
2231
2232 (define-public recordmydesktop
2233 (package
2234 (name "recordmydesktop")
2235 (version "0.3.8.1")
2236 (source (origin
2237 (method url-fetch)
2238 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2239 version "/recordmydesktop-" version ".tar.gz"))
2240 (sha256
2241 (base32
2242 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2243 (build-system gnu-build-system)
2244 (inputs `(("popt" ,popt)
2245 ("zlib" ,zlib)
2246 ("libx11" ,libx11)
2247 ("libice" ,libice)
2248 ("libsm" ,libsm)
2249 ("libxfixes" ,libxfixes)
2250 ("libxdamage" ,libxdamage)
2251 ("libxext" ,libxext)
2252 ("alsa-lib" ,alsa-lib)
2253 ("libvorbis" ,libvorbis)
2254 ("libtheora" ,libtheora)))
2255 (home-page "http://recordmydesktop.sourceforge.net/")
2256 (synopsis "Desktop session video recorder")
2257 (description
2258 "recordMyDesktop is a command-line tool that captures the activity in
2259 your graphical desktop and encodes it as a video. This is a useful tool for
2260 making @dfn{screencasts}.")
2261 (license license:gpl2+)))
2262
2263 (define-public simplescreenrecorder
2264 (package
2265 (name "simplescreenrecorder")
2266 (version "0.3.11")
2267 (source
2268 (origin
2269 (method url-fetch)
2270 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2271 version ".tar.gz"))
2272 (file-name (string-append name "-" version ".tar.gz"))
2273 (sha256
2274 (base32
2275 "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal"))))
2276 (build-system cmake-build-system)
2277 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2278 ;; README.md, the program builds and functions properly without them.
2279 ;; As a result, they are omitted. Please add them back if problems appear.
2280 (inputs
2281 `(("alsa-lib" ,alsa-lib)
2282 ("ffmpeg" ,ffmpeg)
2283 ("glu" ,glu)
2284 ("jack" ,jack-1)
2285 ("libxi" ,libxi)
2286 ("pulseaudio" ,pulseaudio)
2287 ("qtbase" ,qtbase)
2288 ("qtx11extras" ,qtx11extras)))
2289 (native-inputs `(("pkg-config" ,pkg-config)))
2290 (arguments
2291 `(#:configure-flags
2292 (list "-DWITH_QT5=TRUE")
2293 #:tests? #f)) ; no test suite
2294 ;; Using HTTPS causes part of the page to be displayed improperly.
2295 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2296 (synopsis "Screen recorder")
2297 (description "SimpleScreenRecorder is an easy to use screen recorder with
2298 a graphical user interface. It supports recording the entire screen, or a
2299 part of it, and allows encoding in many different codecs and file formats.
2300 Other features include a live preview and live streaming.")
2301 (license (list license:gpl3+ ; most files
2302 license:zlib ; glinject/elfhacks.*
2303 license:isc ; glinject/*
2304 license:x11)))) ; build-aux/install-sh
2305
2306 (define-public libsmpeg
2307 (package
2308 (name "libsmpeg")
2309 (version "0.4.5")
2310 (source (origin
2311 (method svn-fetch)
2312 (uri (svn-reference
2313 (url "svn://svn.icculus.org/smpeg/trunk/")
2314 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2315 (file-name (string-append name "-" version "-checkout"))
2316 (sha256
2317 (base32
2318 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2319 (build-system gnu-build-system)
2320 (arguments
2321 `(#:phases
2322 (modify-phases %standard-phases
2323 (add-after 'unpack 'autogen.sh
2324 (lambda _
2325 (invoke "sh" "autogen.sh"))))))
2326 (native-inputs
2327 `(("autoconf" ,autoconf)
2328 ("automake" ,automake)))
2329 (inputs
2330 `(("sdl" ,sdl2)))
2331 (home-page "http://icculus.org/smpeg/")
2332 (synopsis "SDL MPEG decoding library")
2333 (description
2334 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2335 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2336 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2337 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2338 and MPEG system streams.")
2339 (license (list license:expat
2340 license:lgpl2.1
2341 license:lgpl2.1+
2342 license:gpl2))))
2343
2344 (define-public libbdplus
2345 (package
2346 (name "libbdplus")
2347 (version "0.1.2")
2348 (source
2349 (origin
2350 (method url-fetch)
2351 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2352 version "/" name "-" version ".tar.bz2"))
2353 (sha256
2354 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2355 (inputs
2356 `(("libgcrypt" ,libgcrypt)))
2357 (build-system gnu-build-system)
2358 (home-page "https://www.videolan.org/developers/libbdplus.html")
2359 (synopsis "Library for decrypting certain Blu-Ray discs")
2360 (description "libbdplus is a library which implements the BD+ System
2361 specifications.")
2362 (license license:lgpl2.1+)))
2363
2364 (define-public libaacs
2365 (package
2366 (name "libaacs")
2367 (version "0.9.0")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2372 version "/" name "-" version ".tar.bz2"))
2373 (sha256
2374 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2375 (inputs
2376 `(("libgcrypt" ,libgcrypt)))
2377 (native-inputs
2378 `(("bison" ,bison)
2379 ("flex" ,flex)))
2380 (build-system gnu-build-system)
2381 (home-page "https://www.videolan.org/developers/libaacs.html")
2382 (synopsis "Library for decrypting certain Blu-Ray discs")
2383 (description "libaacs is a library which implements the Advanced Access
2384 Content System specification.")
2385 (license license:lgpl2.1+)))
2386
2387 (define-public mps-youtube
2388 (package
2389 (name "mps-youtube")
2390 (version "0.2.8")
2391 (source
2392 (origin
2393 (method url-fetch)
2394 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2395 "archive/v" version ".tar.gz"))
2396 (file-name (string-append name "-" version ".tar.gz"))
2397 (sha256
2398 (base32
2399 "0x7cmfh199q9j396v7bz81nnvanfllhsg86489i5dw2p3yyc9wnm"))))
2400 (build-system python-build-system)
2401 (arguments
2402 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2403 ;; test suite results differ depending on the country and also introduce
2404 ;; non-determinism in the tests.
2405 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2406 `(#:tests? #f))
2407 (propagated-inputs
2408 `(("python-pafy" ,python-pafy)
2409 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2410 (home-page "https://github.com/mps-youtube/mps-youtube")
2411 (synopsis "Terminal based YouTube player and downloader")
2412 (description
2413 "@code{mps-youtube} is based on mps, a terminal based program to
2414 search, stream and download music. This implementation uses YouTube as
2415 a source of content and can play and download video as well as audio.
2416 It can use either mpv or mplayer for playback, and for conversion of
2417 formats ffmpeg or libav is used. Users should install one of the
2418 supported players in addition to this package.")
2419 (license license:gpl3+)))
2420
2421 (define-public handbrake
2422 (package
2423 (name "handbrake")
2424 (version "0.10.5")
2425 (source (origin
2426 (method url-fetch)
2427 (uri (string-append "https://handbrake.fr/rotation.php?file="
2428 "HandBrake-" version ".tar.bz2"))
2429 (file-name (string-append "handbrake-" version ".tar.bz2"))
2430 (sha256
2431 (base32
2432 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2433 (patches (search-patches "handbrake-pkg-config-path.patch"))
2434 (modules '((guix build utils)))
2435 (snippet
2436 ;; Remove bundled libraries and source not necessary for
2437 ;; running under a GNU environment.
2438 '(begin
2439 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2440 #t))))
2441 (build-system glib-or-gtk-build-system)
2442 (native-inputs
2443 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2444 ("autoconf" ,autoconf)
2445 ("curl" ,curl) ;not actually used, but tested for
2446 ("intltool" ,intltool)
2447 ("libtool" ,libtool)
2448 ("pkg-config" ,pkg-config)
2449 ("python" ,python-2))) ;for configuration
2450 (inputs
2451 `(("bzip2" ,bzip2)
2452 ("dbus-glib" ,dbus-glib)
2453 ("ffmpeg" ,ffmpeg-3.4) ;compilation errors with ffmpeg-4
2454 ("fontconfig" ,fontconfig)
2455 ("freetype" ,freetype)
2456 ("glib" ,glib)
2457 ("gstreamer" ,gstreamer)
2458 ("gst-plugins-base" ,gst-plugins-base)
2459 ("gtk+" ,gtk+)
2460 ("lame" ,lame)
2461 ("libass" ,libass)
2462 ("libbluray" ,libbluray)
2463 ("libdvdnav" ,libdvdnav)
2464 ("libdvdread" ,libdvdread)
2465 ("libgudev" ,libgudev)
2466 ("libmpeg2" ,libmpeg2)
2467 ("libnotify" ,libnotify)
2468 ("libogg" ,libogg)
2469 ("libsamplerate" ,libsamplerate)
2470 ("libtheora" ,libtheora)
2471 ("libvorbis" ,libvorbis)
2472 ("libvpx" ,libvpx)
2473 ("libxml2" ,libxml2)
2474 ("libx264" ,libx264)
2475 ("x265" ,x265)
2476 ("zlib" ,zlib)))
2477 (arguments
2478 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2479 #:phases
2480 (modify-phases %standard-phases
2481 (replace 'bootstrap
2482 ;; Run bootstrap ahead of time so that shebangs get patched.
2483 (lambda _
2484 (setenv "CONFIG_SHELL" (which "sh"))
2485 (setenv "NOCONFIGURE" "1")
2486 ;; Patch the Makefile so that it doesn't bootstrap again.
2487 (substitute* "gtk/module.rules"
2488 ((".*autogen\\.sh.*") ""))
2489 (invoke "sh" "./gtk/autogen.sh")))
2490 (add-before 'configure 'disable-contrib
2491 (lambda _
2492 (substitute* "make/include/main.defs"
2493 ;; Disable unconditional inclusion of some "contrib"
2494 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2495 ;; and libbluray), which would lead to fetching and
2496 ;; building of these libraries. Use our own instead.
2497 (("MODULES \\+= contrib") "# MODULES += contrib"))
2498 #t))
2499 (add-before 'configure 'fix-x265-linking
2500 (lambda _
2501 (substitute* "test/module.defs"
2502 ;; Fix missing library during linking error
2503 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2504 #t))
2505 (replace 'configure
2506 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2507 ;; 'configure' is not an autoconf-generated script, and
2508 ;; errors on unrecognized arguments,
2509 ;; e.g. --enable-fast-install
2510 (let ((out (assoc-ref outputs "out")))
2511 (apply invoke "./configure"
2512 (string-append "--prefix=" out)
2513 (or configure-flags '())))))
2514 (add-after 'configure 'chdir-build
2515 (lambda _ (chdir "./build") #t)))))
2516 (home-page "https://handbrake.fr")
2517 (synopsis "Video transcoder")
2518 (description
2519 "HandBrake is a tool for converting video from any format to a selection
2520 of modern, widely supported codecs.")
2521 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2522 (license (list license:gpl2+ license:bsd-3))))
2523
2524 (define-public openh264
2525 (package
2526 (name "openh264")
2527 (version "1.8.0")
2528 (source (origin
2529 (method url-fetch)
2530 (uri (string-append "https://github.com/cisco/"
2531 name "/releases/download/v"
2532 version "/Source.Code.tar.gz.gz"))
2533 (file-name (string-append name "-" version ".tar.gz"))
2534 (sha256
2535 (base32
2536 "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
2537 (build-system gnu-build-system)
2538 (native-inputs
2539 `(("nasm" ,nasm)
2540 ("python" ,python)))
2541 (arguments
2542 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2543 "CC=gcc")
2544 #:test-target "test"
2545 #:phases (modify-phases %standard-phases
2546 ;; no configure script
2547 (delete 'configure))))
2548 (home-page "http://www.openh264.org/")
2549 (synopsis "H264 decoder library")
2550 (description
2551 "Openh264 is a library which can decode H264 video streams.")
2552 (license license:bsd-2)))
2553
2554 (define-public libmp4v2
2555 (package
2556 (name "libmp4v2")
2557 (version "2.0.0")
2558 (source
2559 (origin
2560 (method url-fetch)
2561 ;; XXX: The new location of upstream is uncertain and will become relevant the
2562 ;; moment when the googlecode archive shuts down. It is past the date it
2563 ;; should've been turned off. I tried to communicate with upstream, but this
2564 ;; wasn't very responsive and not very helpful. The short summary is, it is
2565 ;; chaos when it comes to the amount of forks and only time will tell where
2566 ;; the new upstream location is.
2567 (uri (string-append "https://storage.googleapis.com/google-"
2568 "code-archive-downloads/v2/"
2569 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2570 (file-name (string-append name "-" version ".tar.bz2"))
2571 (sha256
2572 (base32
2573 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2574 (build-system gnu-build-system)
2575 (outputs '("out"
2576 "static")) ; 3.7MiB .a file
2577 (arguments
2578 `(#:phases
2579 (modify-phases %standard-phases
2580 (add-after 'unpack 'remove-dates
2581 (lambda _
2582 ;; Make the build reproducible.
2583 (substitute* "configure"
2584 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2585 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2586 #t))
2587 (add-after 'install 'move-static-libraries
2588 (lambda* (#:key outputs #:allow-other-keys)
2589 ;; Move static libraries to the "static" output.
2590 (let* ((out (assoc-ref outputs "out"))
2591 (lib (string-append out "/lib"))
2592 (static (assoc-ref outputs "static"))
2593 (slib (string-append static "/lib")))
2594 (mkdir-p slib)
2595 (for-each (lambda (file)
2596 (install-file file slib)
2597 (delete-file file))
2598 (find-files lib "\\.a$"))
2599 #t))))))
2600 (native-inputs
2601 `(("help2man" ,help2man)
2602 ("dejagnu" ,dejagnu)))
2603 (home-page "https://code.google.com/archive/p/mp4v2/")
2604 (synopsis "API to create and modify mp4 files")
2605 (description
2606 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2607 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2608 file format that has been used as a multimedia file format in a variety of platforms and
2609 applications. It is a very powerful and extensible format that can accommodate
2610 practically any type of media.")
2611 (license license:mpl1.1)))
2612
2613 (define-public libmediainfo
2614 (package
2615 (name "libmediainfo")
2616 (version "0.7.95")
2617 (source (origin
2618 (method url-fetch)
2619 (uri (string-append "https://mediaarea.net/download/source/"
2620 name "/" version"/"
2621 name "_" version ".tar.bz2"))
2622 (sha256
2623 (base32
2624 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2625 ;; TODO add a Big Buck Bunny webm for tests.
2626 (native-inputs
2627 `(("autoconf" ,autoconf)
2628 ("automake" ,automake)
2629 ("libtool" ,libtool)
2630 ("pkg-config" ,pkg-config)
2631 ("zlib" ,zlib)
2632 ("tinyxml2" ,tinyxml2)
2633 ("curl" ,curl)
2634 ("libzen" ,libzen)))
2635 (build-system gnu-build-system)
2636 (arguments
2637 '(#:tests? #f ; see above TODO
2638 #:phases
2639 ;; build scripts not in root of archive
2640 (modify-phases %standard-phases
2641 (add-after 'unpack 'change-to-build-dir
2642 (lambda _
2643 (chdir "Project/GNU/Library")
2644 #t))
2645 (add-after 'change-to-build-dir 'autogen
2646 (lambda _
2647 (invoke "sh" "autogen.sh"))))))
2648 (home-page "https://mediaarea.net/en/MediaInfo")
2649 (synopsis "Library for retrieving media metadata")
2650 (description "MediaInfo is a library used for retrieving technical
2651 information and other metadata about audio or video files. A non-exhaustive
2652 list of the information MediaInfo can retrieve from media files include:
2653
2654 @itemize
2655 @item General: title, author, director, album, track number, date, duration...
2656 @item Video: codec, aspect, fps, bitrate...
2657 @item Audio: codec, sample rate, channels, language, bitrate...
2658 @item Text: language of subtitle
2659 @item Chapters: number of chapters, list of chapters
2660 @end itemize
2661
2662 MediaInfo supports the following formats:
2663
2664 @itemize
2665 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2666 MPEG-2, MPEG-4, DVD (VOB)...
2667 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2668 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2669 @item Subtitles: SRT, SSA, ASS, SAMI...
2670 @end itemize\n")
2671 (license license:bsd-2)))
2672
2673 ;; TODO also have a GUI version available
2674 (define-public mediainfo
2675 (package
2676 (name "mediainfo")
2677 (version "0.7.95")
2678 (source (origin
2679 (method url-fetch)
2680 (uri (string-append "https://mediaarea.net/download/source/"
2681 name "/" version "/"
2682 name "_" version ".tar.bz2"))
2683 (sha256
2684 (base32
2685 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2686 (native-inputs
2687 `(("autoconf" ,autoconf)
2688 ("automake" ,automake)
2689 ("libtool" ,libtool)
2690 ("pkg-config" ,pkg-config)
2691 ("zlib" ,zlib)
2692 ("libmediainfo" ,libmediainfo)
2693 ("libzen" ,libzen)))
2694 (build-system gnu-build-system)
2695 (arguments
2696 '(#:tests? #f ; lacks tests
2697 #:phases
2698 ;; build scripts not in root of archive
2699 (modify-phases %standard-phases
2700 (add-after 'unpack 'change-to-build-dir
2701 (lambda _
2702 (chdir "Project/GNU/CLI")
2703 #t))
2704 (add-after 'change-to-build-dir 'autogen
2705 (lambda _
2706 (invoke "sh" "autogen.sh"))))))
2707 (home-page "https://mediaarea.net/en/MediaInfo")
2708 (synopsis "Utility for reading media metadata")
2709 (description "MediaInfo is a utility used for retrieving technical
2710 information and other metadata about audio or video files. It supports the
2711 many codecs and formats supported by libmediainfo.")
2712 (license license:bsd-2)))
2713
2714 (define-public livemedia-utils
2715 (package
2716 (name "livemedia-utils")
2717 (version "2018.10.17")
2718 (source (origin
2719 (method url-fetch)
2720 (uri (string-append
2721 "https://download.videolan.org/contrib/live555/live."
2722 version ".tar.gz"))
2723 (sha256
2724 (base32
2725 "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
2726 (modules '((guix build utils)))
2727 (snippet '(begin
2728 ;; As of glibc 2.26, <xlocale.h> no longer is.
2729 (substitute* "liveMedia/include/Locale.hh"
2730 (("xlocale\\.h") "locale.h"))
2731 #t))))
2732 (build-system gnu-build-system)
2733 (arguments
2734 '(#:tests? #f ; no tests
2735 #:make-flags (list "CC=gcc"
2736 (string-append "LDFLAGS=-Wl,-rpath="
2737 (assoc-ref %outputs "out") "/lib")
2738 (string-append "PREFIX="
2739 (assoc-ref %outputs "out")))
2740 #:phases (modify-phases %standard-phases
2741 (add-before 'configure 'fix-makefiles-generation
2742 (lambda _
2743 (substitute* "genMakefiles"
2744 (("/bin/rm") "rm"))
2745 #t))
2746 (replace 'configure
2747 (lambda _
2748 (invoke "./genMakefiles"
2749 "linux-with-shared-libraries"))))))
2750 (home-page "http://www.live555.com/liveMedia/")
2751 (synopsis "Set of C++ libraries for multimedia streaming")
2752 (description "This code forms a set of C++ libraries for multimedia
2753 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2754 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2755 JPEG video, and several audio codecs. They can easily be extended to support
2756 additional (audio and/or video) codecs, and can also be used to build basic
2757 RTSP or SIP clients and servers.")
2758 (license license:lgpl3+)))
2759
2760 (define-public libdvbpsi
2761 (package
2762 (name "libdvbpsi")
2763 (version "1.3.2")
2764 (source (origin
2765 (method url-fetch)
2766 (uri (string-append
2767 "https://download.videolan.org/pub/libdvbpsi/"
2768 version "/libdvbpsi-" version ".tar.bz2"))
2769 (sha256
2770 (base32
2771 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2772 (build-system gnu-build-system)
2773 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2774 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2775 tables")
2776 (description "libdvbpsi is a simple library designed for decoding and
2777 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2778 and ITU-T H.222.0.")
2779 (license license:lgpl2.1)))
2780
2781 (define-public ffms2
2782 (package
2783 (name "ffms2")
2784 (version "2.23")
2785 (home-page "https://github.com/FFMS/ffms2")
2786 (source (origin
2787 (method url-fetch)
2788 (uri (string-append home-page "/archive/" version ".tar.gz"))
2789 (file-name (string-append name "-" version ".tar.gz"))
2790 (sha256
2791 (base32
2792 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2793 (build-system gnu-build-system)
2794 (arguments
2795 '(#:configure-flags
2796 (list "--enable-avresample")))
2797 (inputs
2798 `(("zlib" ,zlib)))
2799 (propagated-inputs
2800 `(("ffmpeg" ,ffmpeg)))
2801 (native-inputs
2802 `(("pkg-config" ,pkg-config)))
2803 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2804 (description
2805 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2806 programmers to access a standard API to open and decompress media files.")
2807 ;; sources are distributed under a different license that the binary.
2808 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2809 (license license:gpl2+))); inherits from ffmpeg
2810
2811 (define-public aegisub
2812 (package
2813 (name "aegisub")
2814 (version "3.2.2")
2815 (source (origin
2816 (method url-fetch)
2817 (uri (string-append
2818 "http://ftp.aegisub.org/pub/archives/releases/source/"
2819 name "-" version ".tar.xz"))
2820 (sha256
2821 (base32
2822 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
2823 (patches (search-patches "aegisub-icu59-include-unistr.patch"))))
2824 (build-system gnu-build-system)
2825 (arguments
2826 `(#:configure-flags
2827 (list "--disable-update-checker"
2828 "--without-portaudio"
2829 "--without-openal"
2830 "--without-oss"
2831 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
2832 ;; tests require busted, a lua package we don't have yet
2833 #:tests? #f
2834 #:phases
2835 (modify-phases %standard-phases
2836 (add-before 'configure 'fix-ldflags
2837 (lambda _
2838 (setenv "LDFLAGS" "-pthread")
2839 #t)))))
2840 (inputs
2841 `(("boost" ,boost)
2842 ("desktop-file-utils" ,desktop-file-utils)
2843 ("ffms2" ,ffms2)
2844 ("fftw" ,fftw)
2845 ("hunspell" ,hunspell)
2846 ("mesa" ,mesa)
2847 ("libass" ,libass)
2848 ("alsa-lib" ,alsa-lib)
2849 ("pulseaudio" ,pulseaudio)
2850 ("libx11" ,libx11)
2851 ("freetype" ,freetype)
2852 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2853 (native-inputs
2854 `(("intltool" ,intltool)
2855 ("pkg-config" ,pkg-config)))
2856 (home-page "http://www.aegisub.org/")
2857 (synopsis "Subtitle engine")
2858 (description
2859 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2860 it quick and easy to time subtitles to audio, and features many powerful
2861 tools for styling them, including a built-in real-time video preview.")
2862 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2863 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2864 license:expat)))) ; and src/gl that is under a license similar
2865 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2866 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2867 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2868
2869 (define-public gst-transcoder
2870 (package
2871 (name "gst-transcoder")
2872 (version "1.12.2")
2873 (source
2874 (origin
2875 (method git-fetch)
2876 (uri (git-reference
2877 (url "https://github.com/pitivi/gst-transcoder.git")
2878 (commit version)))
2879 (file-name (git-file-name name version))
2880 (sha256
2881 (base32
2882 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
2883 (build-system meson-build-system)
2884 (inputs
2885 `(("gobject-introspection" ,gobject-introspection)
2886 ("glib" ,glib)
2887 ("gstreamer" ,gstreamer)
2888 ("gst-plugins-base" ,gst-plugins-base)))
2889 (native-inputs
2890 `(("python" ,python)
2891 ("pkg-config" ,pkg-config)))
2892 (home-page "https://github.com/pitivi/gst-transcoder/")
2893 (synopsis "GStreamer Transcoding API")
2894 (description "GStreamer Transcoding API")
2895 (license license:lgpl2.1)))
2896
2897 (define-public gavl
2898 (package
2899 (name "gavl")
2900 (version "1.4.0")
2901 (source
2902 (origin
2903 (method url-fetch)
2904 (uri (string-append "mirror://sourceforge/gmerlin/"
2905 name "/" version "/"
2906 name "-" version ".tar.gz"))
2907 (file-name (string-append name "-" version ".tar.gz"))
2908 (sha256
2909 (base32
2910 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2911 (build-system gnu-build-system)
2912 (arguments
2913 '(#:configure-flags '("LIBS=-lm")))
2914 (native-inputs
2915 `(("pkg-config" ,pkg-config)
2916 ("doxygen" ,doxygen)))
2917 (home-page "http://gmerlin.sourceforge.net")
2918 (synopsis "Low level library for multimedia API building")
2919 (description
2920 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2921 library, upon which multimedia APIs can be built. Gavl handles all the
2922 details of audio and video formats like colorspaces, sample rates,
2923 multichannel configurations, etc. It provides standardized definitions for
2924 those formats as well as container structures for carrying audio samples or
2925 video images inside an application.
2926
2927 In addition, it handles the sometimes ugly task of converting between all
2928 these formats and provides some elementary operations (copying, scaling,
2929 alpha blending etc).")
2930 (license license:gpl3)))
2931
2932 (define-public frei0r-plugins
2933 (package
2934 (name "frei0r-plugins")
2935 (version "1.6.1")
2936 (source
2937 (origin
2938 (method url-fetch)
2939 (uri (string-append "https://files.dyne.org/frei0r/"
2940 "frei0r-plugins-" version ".tar.gz"))
2941 (sha256
2942 (base32
2943 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2944 (build-system gnu-build-system)
2945 (arguments
2946 `(#:phases
2947 (modify-phases %standard-phases
2948 (add-after 'unpack 'autotools
2949 (lambda _
2950 (invoke "sh" "autogen.sh"))))))
2951 ;; TODO: opencv for additional face detection filters.
2952 (inputs
2953 `(("gavl" ,gavl)
2954 ("cairo" ,cairo)))
2955 (native-inputs
2956 `(("pkg-config" ,pkg-config)
2957 ("libtool" ,libtool)
2958 ("automake" ,automake)
2959 ("autoconf" ,autoconf)))
2960 (home-page "https://www.dyne.org/software/frei0r/")
2961 (synopsis "Minimalistic plugin API for video effects")
2962 (description
2963 "Frei0r is a minimalistic plugin API for video effects.
2964 The main emphasis is on simplicity for an API that will round up
2965 the most common video effects into simple filters, sources and
2966 mixers that can be controlled by parameters. Frei0r wants to
2967 provide a way to share these simple effects between many
2968 applications, avoiding their reimplementation by different projects.
2969 It counts more than 100 plugins.")
2970 (license (list license:gpl2+
2971 ;; The following files are licensed as LGPL2.1+:
2972 ;; src/generator/ising0r/ising0r.c
2973 ;; src/generator/onecol0r/onecol0r.cpp
2974 ;; src/generator/nois0r/nois0r.cpp
2975 ;; src/generator/lissajous0r/lissajous0r.cpp
2976 ;; src/filter/ndvi/gradientlut.hpp
2977 ;; src/filter/ndvi/ndvi.cpp
2978 ;; src/filter/facedetect/facedetect.cpp
2979 license:lgpl2.1+))))
2980
2981 (define-public motion
2982 (package
2983 (name "motion")
2984 (version "4.2")
2985 (home-page "https://motion-project.github.io/")
2986 (source (origin
2987 (method git-fetch)
2988 (uri (git-reference
2989 (url "https://github.com/Motion-Project/motion.git")
2990 (commit (string-append "release-" version))))
2991 (sha256
2992 (base32
2993 "0c0q6dl4v561m5y8bp0c0h4p3s52fjgcdnsrrf5ygdi288d3rfxv"))
2994 (file-name (git-file-name name version))))
2995 (build-system gnu-build-system)
2996 (native-inputs
2997 `(("autoconf" ,autoconf-wrapper)
2998 ("automake" ,automake)
2999 ("gettext" ,gettext-minimal)
3000 ("pkg-config" ,pkg-config)))
3001 (inputs
3002 `(("libjpeg" ,libjpeg)
3003 ("ffmpeg" ,ffmpeg-3.4)
3004 ("libmicrohttpd" ,libmicrohttpd)
3005 ("sqlite" ,sqlite)))
3006 (arguments
3007 '(#:phases (modify-phases %standard-phases
3008 (replace 'bootstrap
3009 (lambda _
3010 (patch-shebang "version.sh")
3011 (invoke "autoreconf" "-vfi"))))
3012 #:configure-flags '("--sysconfdir=/etc")
3013 #:make-flags (list (string-append "sysconfdir="
3014 (assoc-ref %outputs "out")
3015 "/etc"))
3016
3017 #:tests? #f)) ;no 'check' target
3018 (synopsis "Detect motion from video signals")
3019 (description
3020 "Motion is a program that monitors the video signal from one or more
3021 cameras and is able to detect if a significant part of the picture has
3022 changed. Or in other words, it can detect motion.")
3023
3024 ;; Some files say "version 2" and others "version 2 or later".
3025 (license license:gpl2)))
3026
3027 (define-public subdl
3028 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3029 (revision "1"))
3030 (package
3031 (name "subdl")
3032 (version (git-version "1.0.3" revision commit))
3033 (source (origin
3034 (method git-fetch)
3035 (uri (git-reference
3036 (url "https://github.com/alexanderwink/subdl.git")
3037 (commit commit)))
3038 (file-name (git-file-name name version))
3039 (sha256
3040 (base32
3041 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3042 (build-system trivial-build-system)
3043 (arguments
3044 `(#:modules ((guix build utils))
3045 #:builder (begin
3046 (use-modules (guix build utils))
3047 (let* ((out (assoc-ref %outputs "out"))
3048 (bin (string-append out "/bin"))
3049 (source (assoc-ref %build-inputs "source"))
3050 (python (assoc-ref %build-inputs "python")))
3051 (install-file (string-append source "/subdl") bin)
3052 (patch-shebang (string-append bin "/subdl")
3053 (list (string-append python "/bin")))))))
3054 (inputs `(("python" ,python)))
3055 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3056 (description "Subdl is a command-line tool for downloading subtitles from
3057 opensubtitles.org. By default, it will search for English subtitles, display
3058 the results, download the highest-rated result in the requested language and
3059 save it to the appropriate filename.")
3060 (license license:gpl3+)
3061 (home-page "https://github.com/alexanderwink/subdl"))))
3062
3063 (define-public l-smash
3064 (package
3065 (name "l-smash")
3066 (version "2.14.5")
3067 (source (origin
3068 (method git-fetch)
3069 (uri (git-reference
3070 (url "https://github.com/l-smash/l-smash.git")
3071 (commit (string-append "v" version))))
3072 (file-name (git-file-name name version))
3073 (sha256
3074 (base32
3075 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3076 (build-system gnu-build-system)
3077 (arguments
3078 `(#:tests? #f ;no tests
3079 #:make-flags
3080 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3081 (assoc-ref %outputs "out") "/lib"))
3082 #:phases
3083 (modify-phases %standard-phases
3084 ;; configure fails if it is followed by CONFIG_SHELL
3085 (replace 'configure
3086 (lambda* (#:key outputs #:allow-other-keys)
3087 (let ((out (assoc-ref outputs "out")))
3088 (invoke "./configure" (string-append "--prefix=" out)
3089 "--disable-static")))))))
3090 (native-inputs
3091 `(("which" ,which)))
3092 (home-page "https://l-smash.github.io/l-smash/")
3093 (synopsis "MP4 multiplexer and demultiplexer library")
3094 (description
3095 "L-SMASH is a cross-platform library that handles the ISO base media file
3096 format and some of its derived file formats, including MP4. It operates as a
3097 multiplexer and demultiplexer, and can mux video and audio in several formats
3098 using standalone executable files.")
3099 (license license:isc)))
3100
3101 (define-public qtfaststart
3102 (package
3103 (name "qtfaststart")
3104 (version "1.8")
3105 (source (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "qtfaststart" version))
3108 (sha256
3109 (base32
3110 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3111 (build-system python-build-system)
3112 (arguments
3113 '(#:tests? #f)) ; no test suite
3114 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3115 (description "qtfaststart enables streaming and pseudo-streaming of
3116 QuickTime and MP4 files by moving metadata and offset information to the
3117 beginning of the file. It can also print some useful information about the
3118 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3119 project, which is released into the public domain, as well as ISO 14496-12:2005
3120 (the official spec for MP4), which can be obtained from the ISO or found
3121 online.")
3122 (home-page "https://github.com/danielgtaylor/qtfaststart")
3123 (license license:expat)))
3124
3125 (define-public vidstab
3126 (package
3127 (name "vidstab")
3128 (version "1.1.0")
3129 (source (origin
3130 (method git-fetch)
3131 (uri (git-reference
3132 (url "https://github.com/georgmartius/vid.stab.git")
3133 (commit (string-append "v" version))))
3134 (file-name (git-file-name name version))
3135 (sha256
3136 (base32
3137 "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
3138 (build-system cmake-build-system)
3139 (arguments
3140 '(#:tests? #f)) ; tests are not run as part of standard build process
3141 (home-page "http://public.hronopik.de/vid.stab/")
3142 (synopsis "Video stabilization library")
3143 (description "Vidstab is a video stabilization library which can be used
3144 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3145 vehicle typically suffers from undesirable shakes and jitters. Activities such
3146 as surfing, skiing, riding and walking while shooting videos are especially
3147 prone to erratic camera shakes. Vidstab targets these video contents to help
3148 create smoother and stable videos.")
3149 (license license:gpl2+)))
3150
3151 (define-public libopenshot
3152 (package
3153 (name "libopenshot")
3154 (version "0.2.2")
3155 (source (origin
3156 (method git-fetch)
3157 (uri (git-reference
3158 (url "https://github.com/OpenShot/libopenshot")
3159 (commit (string-append "v" version))))
3160 (file-name (git-file-name name version))
3161 (sha256
3162 (base32
3163 "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
3164 (modules '((guix build utils)))
3165 (snippet '(begin
3166 ;; Allow overriding of the python installation dir
3167 (substitute* "src/bindings/python/CMakeLists.txt"
3168 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3169 (string-append set " CACHE PATH "
3170 "\"Python bindings directory\")")))
3171 #t))
3172 (patches (search-patches "libopenshot-tests-with-system-libs.patch"))))
3173 (build-system cmake-build-system)
3174 (native-inputs
3175 `(("pkg-config" ,pkg-config)
3176 ("python" ,python)
3177 ("swig" ,swig)
3178 ("unittest++" ,unittest-cpp)))
3179 (propagated-inputs ;all referenced in installed headers
3180 `(("cppzmq" ,cppzmq)
3181 ("ffmpeg" ,ffmpeg)
3182 ("imagemagick" ,imagemagick)
3183 ("jsoncpp" ,jsoncpp)
3184 ("libopenshot-audio" ,libopenshot-audio)
3185 ("qt" ,qt) ;widgets, core, gui, multimedia, and multimediawidgets
3186 ("zeromq" ,zeromq)))
3187 (arguments
3188 `(#:configure-flags
3189 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3190 ,(version-major+minor (package-version python))
3191 "/site-packages")
3192 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3193 #:phases
3194 (modify-phases %standard-phases
3195 (add-before 'configure 'set-vars
3196 (lambda* (#:key inputs #:allow-other-keys)
3197 (setenv "LIBOPENSHOT_AUDIO_DIR"
3198 (assoc-ref inputs "libopenshot-audio"))
3199 (setenv "ZMQDIR"
3200 (assoc-ref inputs "zeromq"))
3201 (setenv "UNITTEST_DIR"
3202 (string-append (assoc-ref inputs "unittest++")
3203 "/include/UnitTest++"))
3204 #t)))))
3205 (home-page "https://openshot.org")
3206 (synopsis "Video-editing, animation, and playback library")
3207 (description "OpenShot Library (libopenshot) is a powerful C++ video
3208 editing library with a multi-threaded and feature rich video editing
3209 API. It includes bindings for Python, Ruby, and other languages.")
3210 (license license:lgpl3+)))
3211
3212 (define-public openshot
3213 (package
3214 (name "openshot")
3215 (version "2.4.3")
3216 (source (origin
3217 (method git-fetch)
3218 (uri (git-reference
3219 (url "https://github.com/OpenShot/openshot-qt")
3220 (commit (string-append "v" version))))
3221 (file-name (git-file-name name version))
3222 (sha256
3223 (base32
3224 "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
3225 (build-system python-build-system)
3226 (inputs
3227 `(("ffmpeg" ,ffmpeg)
3228 ("libopenshot" ,libopenshot)
3229 ("python" ,python)
3230 ("python-pyqt" ,python-pyqt)
3231 ("python-pyzmq" ,python-pyzmq)
3232 ("python-requests" ,python-requests)
3233 ("qtsvg" ,qtsvg)))
3234 (arguments
3235 `(#:tests? #f ;no tests
3236 #:phases (modify-phases %standard-phases
3237 (delete 'build) ;install phase does all the work
3238 (add-before 'install 'set-tmp-home
3239 (lambda _
3240 ;; src/classes/info.py "needs" to create several
3241 ;; directories in $HOME when loaded during build
3242 (setenv "HOME" "/tmp")
3243 #t))
3244 (add-after 'install 'wrap-program
3245 (lambda* (#:key inputs outputs #:allow-other-keys)
3246 (wrap-program (string-append (assoc-ref outputs "out")
3247 "/bin/openshot-qt")
3248 `("QT_PLUGIN_PATH" prefix
3249 ,(list (string-append (assoc-ref inputs "qtsvg")
3250 "/lib/qt5/plugins/")))))))))
3251 (home-page "https://openshot.org")
3252 (synopsis "Video editor")
3253 (description "OpenShot takes your videos, photos, and music files and
3254 helps you create the film you have always dreamed of. Easily add sub-titles,
3255 transitions, and effects and then export your film to many common formats.")
3256 (license license:gpl3+)))