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