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