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>
40 ;;; This file is part of GNU Guix.
42 ;;; GNU Guix is free software; you can redistribute it and/or modify it
43 ;;; under the terms of the GNU General Public License as published by
44 ;;; the Free Software Foundation; either version 3 of the License, or (at
45 ;;; your option) any later version.
47 ;;; GNU Guix is distributed in the hope that it will be useful, but
48 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
49 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
50 ;;; GNU General Public License for more details.
52 ;;; You should have received a copy of the GNU General Public License
53 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
55 (define-module (gnu packages video)
56 #:use-module (ice-9 match)
57 #:use-module (srfi srfi-1)
58 #:use-module (srfi srfi-26)
59 #:use-module ((guix licenses) #:prefix license:)
60 #:use-module (guix utils)
61 #:use-module (guix packages)
62 #:use-module (guix download)
63 #:use-module (guix git-download)
64 #:use-module (guix svn-download)
65 #:use-module (guix build-system cmake)
66 #:use-module (guix build-system gnu)
67 #:use-module (guix build-system glib-or-gtk)
68 #:use-module (guix build-system meson)
69 #:use-module (guix build-system perl)
70 #:use-module (guix build-system python)
71 #:use-module (guix build-system waf)
72 #:use-module (guix build-system trivial)
73 #:use-module (gnu packages)
74 #:use-module (gnu packages algebra)
75 #:use-module (gnu packages assembly)
76 #:use-module (gnu packages audio)
77 #:use-module (gnu packages autotools)
78 #:use-module (gnu packages avahi)
79 #:use-module (gnu packages backup)
80 #:use-module (gnu packages base)
81 #:use-module (gnu packages bison)
82 #:use-module (gnu packages boost)
83 #:use-module (gnu packages cdrom)
84 #:use-module (gnu packages check)
85 #:use-module (gnu packages cmake)
86 #:use-module (gnu packages compression)
87 #:use-module (gnu packages cpp)
88 #:use-module (gnu packages curl)
89 #:use-module (gnu packages dejagnu)
90 #:use-module (gnu packages dns)
91 #:use-module (gnu packages docbook)
92 #:use-module (gnu packages documentation)
93 #:use-module (gnu packages elf)
94 #:use-module (gnu packages file)
95 #:use-module (gnu packages flex)
96 #:use-module (gnu packages fonts)
97 #:use-module (gnu packages fontutils)
98 #:use-module (gnu packages freedesktop)
99 #:use-module (gnu packages fribidi)
100 #:use-module (gnu packages gettext)
101 #:use-module (gnu packages ghostscript)
102 #:use-module (gnu packages gl)
103 #:use-module (gnu packages glib)
104 #:use-module (gnu packages guile)
105 #:use-module (gnu packages gnome)
106 #:use-module (gnu packages gnunet)
107 #:use-module (gnu packages gnupg)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages image)
111 #:use-module (gnu packages imagemagick)
112 #:use-module (gnu packages iso-codes)
113 #:use-module (gnu packages libidn)
114 #:use-module (gnu packages libreoffice)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages lua)
117 #:use-module (gnu packages m4)
118 #:use-module (gnu packages man)
119 #:use-module (gnu packages markup)
120 #:use-module (gnu packages mp3)
121 #:use-module (gnu packages ncurses)
122 #:use-module (gnu packages networking)
123 #:use-module (gnu packages ocr)
124 #:use-module (gnu packages perl)
125 #:use-module (gnu packages pkg-config)
126 #:use-module (gnu packages popt)
127 #:use-module (gnu packages pretty-print)
128 #:use-module (gnu packages protobuf)
129 #:use-module (gnu packages pulseaudio)
130 #:use-module (gnu packages python)
131 #:use-module (gnu packages python-crypto)
132 #:use-module (gnu packages python-web)
133 #:use-module (gnu packages python-xyz)
134 #:use-module (gnu packages qt)
135 #:use-module (gnu packages rdesktop)
136 #:use-module (gnu packages ruby)
137 #:use-module (gnu packages samba)
138 #:use-module (gnu packages sdl)
139 #:use-module (gnu packages serialization)
140 #:use-module (gnu packages shells)
141 #:use-module (gnu packages sqlite)
142 #:use-module (gnu packages ssh)
143 #:use-module (gnu packages swig)
144 #:use-module (gnu packages texinfo)
145 #:use-module (gnu packages textutils)
146 #:use-module (gnu packages tls)
147 #:use-module (gnu packages time)
148 #:use-module (gnu packages upnp)
149 #:use-module (gnu packages version-control)
150 #:use-module (gnu packages vulkan)
151 #:use-module (gnu packages web)
152 #:use-module (gnu packages webkit)
153 #:use-module (gnu packages wxwidgets)
154 #:use-module (gnu packages xdisorg)
155 #:use-module (gnu packages xiph)
156 #:use-module (gnu packages xml)
157 #:use-module (gnu packages xorg))
165 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
166 version "/" name "-" version ".tar.gz"))
169 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
170 (build-system gnu-build-system)
172 `(("makeinfo" ,texinfo)))
174 `(("ncurses" ,ncurses)))
177 (modify-phases %standard-phases
179 (lambda* (#:key build inputs outputs #:allow-other-keys)
180 ;; This old `configure' script doesn't support
181 ;; variables passed as arguments.
182 (let ((out (assoc-ref outputs "out"))
183 (ncurses (assoc-ref inputs "ncurses")))
184 (setenv "CONFIG_SHELL" (which "bash"))
185 (invoke "./configure"
186 (string-append "--prefix=" out)
187 (string-append "--build=" build)
188 ;; The ancient config.guess is unable to
189 ;; guess the host triplet on mips64el.
190 ,@(if (string=? "mips64el-linux"
192 '("--host=mips64el-unknown-linux-gnu")
194 ;; The same is also true with aarch64.
195 ,@(if (string=? "aarch64-linux"
197 '("--host=aarch64-unknown-linux-gnu")
199 (string-append "--with-ncurses="
201 (home-page "http://aa-project.sourceforge.net/aalib/")
202 (synopsis "ASCII-art library")
204 "AA-lib is a low level gfx library which does not require graphics device.
205 In fact, there is no graphical output possible. AA-lib replaces those
206 old-fashioned output methods with powerful ascii-art renderer.")
207 (license license:lgpl2.0+)))
209 (define-public celluloid
216 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
217 "/download/v" version "/celluloid-" version ".tar.xz"))
219 (base32 "0gmscx9zb8ppfjlnmgbcmhknhawa05sdhxi7dv5wjapjq0glq481"))))
220 (build-system glib-or-gtk-build-system)
222 `(("intltool" ,intltool)
223 ("pkg-config" ,pkg-config)))
226 ("libepoxy" ,libepoxy)
228 (home-page "https://github.com/celluloid-player/celluloid")
229 (synopsis "GTK+ frontend for the mpv media player")
230 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
231 It interacts with mpv via the client API exported by libmpv, allowing access to
232 mpv's powerful playback capabilities.")
233 (license license:gpl3+)))
235 (define-public liba52
242 ;; A mirror://sourceforge URI doesn't work, presumably
243 ;; because the SourceForge project is misconfigured.
244 "http://liba52.sourceforge.net/files/a52dec-" version
248 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
249 (patches (search-patches "liba52-enable-pic.patch"
250 "liba52-set-soname.patch"
251 "liba52-use-mtune-not-mcpu.patch"
252 "liba52-link-with-libm.patch"))))
253 (build-system gnu-build-system)
254 ;; XXX We need to run ./bootstrap because of the build system fixes above.
256 `(("autoconf" ,autoconf)
257 ("automake" ,automake)
258 ("libtool" ,libtool)))
259 (arguments `(#:configure-flags '("--enable-shared")
261 (modify-phases %standard-phases
262 ;; XXX We need to run ./bootstrap because of the build
263 ;; system fixes above.
265 (lambda _ (invoke "sh" "bootstrap"))))))
266 (home-page "http://liba52.sourceforge.net/")
267 (synopsis "ATSC A/52 stream decoder")
268 (description "liba52 is a library for decoding ATSC A/52 streams. The
269 A/52 standard is used in a variety of applications, including digital
270 television and DVD. It is also known as AC-3.")
271 (license license:gpl2+)))
273 (define-public libaom
274 ;; The 1.0.0-errata1 release installs a broken pkg-config .pc file. This
275 ;; is fixed in libaom commit 0ddc150, but we use an even later commit.
276 (let ((commit "22b150bf040608028a56d8bf39e72f771383d836")
280 (version (git-version "1.0.0-errata1" revision commit))
284 (url "https://aomedia.googlesource.com/aom/")
286 (file-name (git-file-name name version))
289 "1pdd5h3n42607n6qmggz4yv8izhjr2kl6knb3kh7gh4v0vy47h1r"))))
290 (build-system cmake-build-system)
293 ("pkg-config" ,pkg-config)
294 ("python" ,python))) ; to detect the version
296 `(#:tests? #f ;no check target
298 ;; build dynamic library
299 (list "-DBUILD_SHARED_LIBS=YES"
301 "-DAOM_TARGET_CPU=generic"
302 (string-append "-DCMAKE_INSTALL_PREFIX="
303 (assoc-ref %outputs "out")))))
304 (home-page "https://aomedia.googlesource.com/aom/")
305 (synopsis "AV1 video codec")
306 (description "Libaom is the reference implementation of AV1. It includes
307 a shared library and encoder and decoder command-line executables.")
308 (license license:bsd-2))))
310 (define-public libmpeg2
316 ;; A mirror://sourceforge URI doesn't work, presumably
317 ;; because the SourceForge project is misconfigured.
318 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
319 name "-" version ".tar.gz"))
320 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
321 "libmpeg2-global-symbol-test.patch"))
324 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
332 (build-system gnu-build-system)
333 (home-page "http://libmpeg2.sourceforge.net/")
334 (synopsis "MPEG1 and MPEG2 video decoder library")
336 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
337 (license license:gpl2+)))
339 (define-public libx264
340 ;; There are no tags in the repository, so we take the version number from
341 ;; the X264_BUILD variable defined in x264.h.
342 (let ((version "159")
343 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
347 (version (git-version version revision commit))
351 (url "https://code.videolan.org/videolan/x264.git")
353 (file-name (git-file-name name version))
356 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
357 (build-system gnu-build-system)
359 `(("pkg-config" ,pkg-config)
361 ;; TODO: Add gpac input
363 `(#:tests? #f ;no check target
364 #:configure-flags '("--enable-shared"
365 ;; Don't build the command-line program. If we
366 ;; want it later, we should do so in a different
367 ;; package to avoid a circular dependency (the x264
368 ;; program depends on ffmpeg and ffmpeg depends on
372 ;; On MIPS, we must pass "--disable-asm" or else
373 ;; configure fails after printing: "You specified a
374 ;; pre-MSA CPU in your CFLAGS. If you really want
375 ;; to run on such a CPU, configure with
377 ,@(if (string-prefix? "mips"
378 (or (%current-target-system)
382 (home-page "https://www.videolan.org/developers/x264.html")
383 (synopsis "H.264 video coding library")
384 (description "libx264 is an advanced encoding library for creating
385 H.264 (MPEG-4 AVC) video streams.")
386 (license (list license:gpl2+ ;most files
387 license:isc ;common/x86/x86inc.asm
388 license:lgpl2.1+ ;extras/getopt.c
389 license:bsd-3 ;extras/inttypes.h
390 (license:non-copyleft ;extras/cl*.h
392 "See extras/cl.h in the distribution."))))))
394 (define-public mkvtoolnix
401 (uri (string-append "https://mkvtoolnix.download/sources/"
402 "mkvtoolnix-" version ".tar.xz"))
404 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
405 (modules '((guix build utils)))
407 ;; Delete bundled libraries.
408 (for-each delete-file-recursively
416 (build-system gnu-build-system)
417 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
426 ("libmatroska" ,libmatroska)
428 ("libvorbis" ,libvorbis)
432 ("qtmultimedia" ,qtmultimedia)
436 `(("docbook-xsl" ,docbook-xsl)
437 ("gettext" ,gettext-minimal)
438 ("googletest" ,googletest)
440 ("json-modern-cxx" ,json-modern-cxx)
442 ("pkg-config" ,pkg-config)
448 (list (string-append "--with-boost="
449 (assoc-ref %build-inputs "boost"))
450 (string-append "--with-docbook-xsl-root="
451 (assoc-ref %build-inputs "docbook-xsl")
452 "/xml/xsl/docbook-xsl-"
453 ,(package-version docbook-xsl))
454 "--enable-update-check=no"
455 "--enable-precompiled-headers=no")
457 (modify-phases %standard-phases
458 (add-after 'unpack 'patch-relative-file-names
459 (lambda* (#:key outputs #:allow-other-keys)
460 (let ((out (assoc-ref outputs "out")))
461 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
463 (string-append out "/bin/" match)))
465 (add-before 'configure 'add-googletest
466 (lambda* (#:key inputs #:allow-other-keys)
468 (string-append (assoc-ref inputs "googletest")
469 "/include/gtest") "lib/gtest")
473 (let ((-j (list "-j" (number->string (parallel-job-count)))))
474 (apply invoke "rake" -j))))
477 (invoke "rake" "tests/unit")))
480 (invoke "rake" "install")))
481 (add-after 'install 'post-install
482 (lambda* (#:key outputs #:allow-other-keys)
483 ;; Move the Qt interface to "gui".
484 (let* ((out (assoc-ref outputs "out"))
485 (gui (assoc-ref outputs "gui"))
486 (strip-store-dir (lambda (path)
487 (substring path (string-prefix-length out path)))))
490 (mkdir-p (string-append gui (dirname file)))
491 (rename-file (string-append out file)
492 (string-append gui file)))
493 (append '("/bin/mkvtoolnix-gui"
494 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
495 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
496 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
497 (map strip-store-dir (find-files out "\\.ogg$"))
498 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
499 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
502 (delete-file-recursively (string-append out file)))
503 '("/share/applications"
506 "/share/mkvtoolnix")))
508 (home-page "https://mkvtoolnix.download")
509 (synopsis "Tools to create, alter and inspect Matroska files")
511 "MKVToolNix provides tools for getting information about Matroska files
512 (@command{mkvinfo}), extracting tracks/data from Matroska files
513 (@command{mkvextract}), and creating Matroska files from other media files
514 (@command{mkvmerge}).")
515 (license license:gpl2)))
521 (outputs '("out" "static"))
525 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
526 "/downloads/x265_" version ".tar.gz")
527 (string-append "https://download.videolan.org/videolan/x265/"
528 "x265_" version ".tar.gz")))
530 (base32 "1k5vijsy6cgcghw69f5275xfmbjjx7js0nlbgxbd6krnjb7sv6zv"))
531 (patches (search-patches "x265-arm-flags.patch"))
532 (modules '((guix build utils)))
534 (delete-file-recursively "source/compat/getopt")
536 (build-system cmake-build-system)
538 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
540 ;; Ensure position independent code for everyone.
541 (list "-DENABLE_PIC=TRUE"
542 ,@(if (string-prefix? "armhf" (or (%current-system)
543 (%current-target-system)))
544 '("-DENABLE_ASSEMBLY=OFF")
546 (string-append "-DCMAKE_INSTALL_PREFIX="
547 (assoc-ref %outputs "out")))
549 (modify-phases %standard-phases
550 (add-after 'unpack 'prepare-build
552 (delete-file-recursively "build")
554 ;; recognize armv8 in 32-bit mode as ARM
555 (substitute* "CMakeLists.txt"
556 (("armv6l") "armv8l"))
558 (add-before 'configure 'build-12-bit
559 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
560 (mkdir "../build-12bit")
561 (with-directory-excursion "../build-12bit"
564 "-DHIGH_BIT_DEPTH=ON"
569 (substitute* (cons "cmake_install.cmake"
571 (find-files "CMakeFiles/x265-shared.dir" ".")
572 (find-files "CMakeFiles/x265-static.dir" ".")))
573 (("libx265") "libx265_main12"))
575 (add-before 'configure 'build-10-bit
576 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
577 (mkdir "../build-10bit")
578 (with-directory-excursion "../build-10bit"
581 "-DHIGH_BIT_DEPTH=ON"
585 (substitute* (cons "cmake_install.cmake"
587 (find-files "CMakeFiles/x265-shared.dir" ".")
588 (find-files "CMakeFiles/x265-static.dir" ".")))
589 (("libx265") "libx265_main10"))
591 (add-after 'install 'install-more-libs
593 (with-directory-excursion "../build-12bit"
594 (invoke "make" "install"))
595 (with-directory-excursion "../build-10bit"
596 (invoke "make" "install"))))
597 (add-before 'strip 'move-static-libs
598 (lambda* (#:key outputs #:allow-other-keys)
599 (let ((out (assoc-ref outputs "out"))
600 (static (assoc-ref outputs "static")))
601 (mkdir-p (string-append static "/lib"))
602 (with-directory-excursion
603 (string-append out "/lib")
607 (string-append static "/lib/" file)))
608 (find-files "." "\\.a$"))))
610 (home-page "http://x265.org/")
611 (synopsis "Library for encoding h.265/HEVC video streams")
612 (description "x265 is a H.265 / HEVC video encoder application library,
613 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
614 (license license:gpl2+)))
616 (define-public libass
623 "https://github.com/libass/libass/releases/download/"
624 version "/libass-" version ".tar.xz"))
627 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
628 (build-system gnu-build-system)
630 `(("pkg-config" ,pkg-config)
633 `(("freetype" ,freetype)
635 ("fontconfig" ,fontconfig)
636 ("harfbuzz" ,harfbuzz)
638 (home-page "https://github.com/libass/libass")
639 (synopsis "Subtitle rendering library for the ASS/SSA format")
640 (description "libass is a subtitle rendering library for the
641 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
642 (license license:isc)))
644 (define-public libcaca
647 (version "0.99.beta19")
650 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
654 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
655 (build-system gnu-build-system)
656 (native-inputs `(("pkg-config" ,pkg-config)))
658 `(("freeglut" ,freeglut)
665 (home-page "http://caca.zoy.org/wiki/libcaca")
666 (synopsis "Colour ASCII-art library")
667 (description "libcaca is a graphics library that outputs text instead of
668 pixels, so that it can work on older video cards or text terminals. It
669 supports Unicode, 2048 colors, dithering of color images, and advanced text
671 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
673 (define-public libdca
680 "https://download.videolan.org/pub/videolan/libdca/"
681 version "/libdca-" version ".tar.bz2"))
684 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
685 (build-system gnu-build-system)
686 (home-page "https://www.videolan.org/developers/libdca.html")
687 (synopsis "DTS Coherent Acoustics decoder")
688 (description "libdca is a library for decoding DTS Coherent Acoustics
690 (license license:gpl2+)))
699 "mirror://sourceforge/libdv/libdv/"
700 version "/libdv-" version ".tar.gz"))
703 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
704 (build-system gnu-build-system)
705 (native-inputs `(("pkg-config" ,pkg-config)))
706 (inputs `(("libxv" ,libxv)))
707 (home-page "http://libdv.sourceforge.net/")
708 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
709 (description "The Quasar DV codec (libdv) is a software codec for DV
710 video, the encoding format used by most digital camcorders, typically those
711 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
712 developed according to the official standards for DV video: IEC 61834 and
714 (license license:lgpl2.1+)))
716 (define-public libmatroska
723 (uri (string-append "https://dl.matroska.org/downloads/"
724 "libmatroska/libmatroska-" version ".tar.xz"))
726 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
727 (build-system cmake-build-system)
729 `(("libebml" ,libebml)))
732 (list "-DBUILD_SHARED_LIBS=YES")
733 #:tests? #f)) ; no test suite
734 (home-page "https://www.matroska.org")
735 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
737 "Matroska aims to become the standard of multimedia container formats.
738 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
739 of XML. EBML enables the Matroska Development Team to gain significant
740 advantages in terms of future format extensibility, without breaking file
741 support in old parsers.
742 libebml is a C++ library to read and write EBML files.")
743 (license license:lgpl2.1)))
753 ;; Newer releases are only available on GitHub.
754 (string-append "https://github.com/01org/libva/releases/download/"
755 version "/libva-" version ".tar.bz2")
756 ;; Keep the old URL around for compatibility.
757 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
758 "libva/libva-" version "/libva-" version ".tar.bz2")))
760 (base32 "19df3r02k1p4cbyvifkdjyc8q7hi23f5b3x3390z52l25mjfnmvc"))))
761 (build-system gnu-build-system)
763 `(("pkg-config" ,pkg-config)))
768 ("libxfixes" ,libxfixes)
770 ("wayland" ,wayland)))
773 (modify-phases %standard-phases
775 'build 'fix-dlopen-paths
776 (lambda* (#:key outputs #:allow-other-keys)
777 (let ((out (assoc-ref outputs "out")))
778 (substitute* "va/drm/va_drm_auth_x11.c"
779 (("\"libva-x11\\.so\\.%d\"")
780 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
782 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
783 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
785 (list (string-append "--with-drivers-path="
786 (assoc-ref %build-inputs "mesa") "/lib/dri"))
787 ;; However, we can't write to mesa's store directory, so override the
788 ;; following make variable to install the dummy driver to libva's
789 ;; $prefix/lib/dri directory.
791 (list (string-append "dummy_drv_video_ladir="
792 (assoc-ref %outputs "out") "/lib/dri"))))
793 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
794 (synopsis "Video acceleration library")
795 (description "The main motivation for VA-API (Video Acceleration API) is
796 to enable hardware accelerated video decode/encode at various
797 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
798 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
799 (license license:expat)))
801 (define-public libva-utils
808 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
809 version "/libva-utils-" version ".tar.bz2"))
811 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
812 (build-system gnu-build-system)
815 (list "--enable-wayland"
818 `(("pkg-config" ,pkg-config)))
824 ("wayland" ,wayland)))
825 (home-page "https://01.org/linuxmedia/vaapi")
826 (synopsis "Collection of testing utilities for VA-API")
828 "This is a collection of utilities to query and test the @acronym{VA-API,
829 Video Acceleration API} implemented by the libva library.
831 These tools require a supported graphics chip, driver, and VA-API back end to
833 (license license:expat)))
835 (define-public ffmpeg
841 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
845 "176jn1lcdf0gk7sa5l2mv0faqp5dsqdhx1gqcrgymqhfmdal4xfb"))))
846 (build-system gnu-build-system)
849 ("fontconfig" ,fontconfig)
850 ("freetype" ,freetype)
851 ("frei0r-plugins" ,frei0r-plugins)
858 ("libbluray" ,libbluray)
860 ("libcdio-paranoia" ,libcdio-paranoia)
862 ("libtheora" ,libtheora)
864 ("libvdpau" ,libvdpau)
865 ("libvorbis" ,libvorbis)
871 ("pulseaudio" ,pulseaudio)
883 ("pkg-config" ,pkg-config)
885 ("python" ,python-2) ; scripts use interpreter python2
889 `(#:test-target "fate"
891 ;; possible additional inputs:
892 ;; --enable-avisynth enable reading of AviSynth script
894 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
895 ;; --enable-libcelt enable CELT decoding via libcelt [no]
896 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
897 ;; and libraw1394 [no]
898 ;; --enable-libfaac enable AAC encoding via libfaac [no]
899 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
900 ;; --enable-libflite enable flite (voice synthesis) support via
902 ;; --enable-libgme enable Game Music Emu via libgme [no]
903 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
904 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
905 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
906 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
907 ;; --enable-libnut enable NUT (de)muxing via libnut,
908 ;; native (de)muxer exists [no]
909 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
910 ;; libopencore-amrnb [no]
911 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
912 ;; libopencore-amrwb [no]
913 ;; --enable-libopencv enable video filtering via libopencv [no]
914 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
916 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
917 ;; --enable-libschroedinger enable Dirac de/encoding via
918 ;; libschroedinger [no]
919 ;; --enable-libshine enable fixed-point MP3 encoding via
921 ;; --enable-libssh enable SFTP protocol via libssh [no]
922 ;; (libssh2 does not work)
923 ;; --enable-libstagefright-h264 enable H.264 decoding via
924 ;; libstagefright [no]
925 ;; --enable-libutvideo enable Ut Video encoding and decoding via
927 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
928 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
929 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
930 ;; libvo-amrwbenc [no]
931 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
932 ;; --enable-libxavs enable AVS encoding via xavs [no]
933 ;; --enable-libzmq enable message passing via libzmq [no]
934 ;; --enable-libzvbi enable teletext support via libzvbi [no]
935 ;; --enable-opencl enable OpenCL code
936 '("--enable-avresample"
937 "--enable-gpl" ; enable optional gpl licensed parts
940 "--enable-fontconfig"
949 "--enable-libfreetype"
950 "--enable-libmp3lame"
956 "--enable-libtwolame"
957 "--enable-libvidstab"
967 "--enable-runtime-cpudetect"
969 ;; The HTML pages take 7.2 MiB
970 "--disable-htmlpages"
972 ;; The static libraries are 23 MiB
975 ;; Runtime cpu detection is not implemented on
976 ;; MIPS, so we disable some features.
979 "--disable-mipsdspr2"
982 (modify-phases %standard-phases
985 ;; configure does not work followed by "SHELL=..." and
986 ;; "CONFIG_SHELL=..."; set environment variables instead
987 (lambda* (#:key outputs configure-flags #:allow-other-keys)
988 (let ((out (assoc-ref outputs "out")))
989 (substitute* "configure"
990 (("#! /bin/sh") (string-append "#!" (which "sh"))))
991 (setenv "SHELL" (which "bash"))
992 (setenv "CONFIG_SHELL" (which "bash"))
995 (string-append "--prefix=" out)
996 ;; Add $libdir to the RUNPATH of all the binaries.
997 (string-append "--extra-ldflags=-Wl,-rpath="
1001 'check 'set-ld-library-path
1003 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1005 (let* ((dso (find-files "." "\\.so$"))
1006 (path (string-join (map dirname dso) ":")))
1007 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1008 (setenv "LD_LIBRARY_PATH" path)
1010 (home-page "https://www.ffmpeg.org/")
1011 (synopsis "Audio and video framework")
1012 (description "FFmpeg is a complete, cross-platform solution to record,
1013 convert and stream audio and video. It includes the libavcodec
1014 audio/video codec library.")
1015 (license license:gpl2+)))
1017 (define-public ffmpeg-3.4
1023 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1027 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1029 (substitute-keyword-arguments (package-arguments ffmpeg)
1030 ((#:configure-flags flags)
1031 `(delete "--enable-libdav1d" (delete "--enable-libaom"
1033 (inputs (alist-delete "dav1d" (alist-delete "libaom"
1034 (package-inputs ffmpeg))))))
1036 (define-public ffmpeg-for-stepmania
1045 (url "https://github.com/stepmania/ffmpeg.git")
1046 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1048 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1049 (file-name (git-file-name "ffmpeg" version))))
1051 (substitute-keyword-arguments (package-arguments ffmpeg)
1052 ((#:configure-flags flags)
1053 '(list "--disable-programs"
1056 "--disable-avdevice"
1057 "--disable-swresample"
1058 "--disable-postproc"
1059 "--disable-avfilter"
1061 "--enable-static"))))
1064 (define-public ffmpegthumbnailer
1066 (name "ffmpegthumbnailer")
1071 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1073 (file-name (git-file-name name version))
1076 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1077 (build-system cmake-build-system)
1079 `(("pkg-config" ,pkg-config)))
1081 `(("ffmpeg" ,ffmpeg)
1082 ("libjpeg-turbo" ,libjpeg-turbo)
1086 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1087 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1088 (synopsis "Create thumbnails from video files")
1089 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1090 can be used by file managers to create thumbnails for your video files. The
1091 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1092 videoformats depend on the configuration flags of ffmpeg.")
1093 (license license:gpl2+)))
1102 "https://download.videolan.org/pub/videolan/vlc/"
1103 (car (string-split version #\-))
1104 "/vlc-" version ".tar.xz"))
1107 "1xmxjpyzdhabchwncz6lvx3kzvl7fz9c42bkv3nbj68albs9w570"))
1110 ;; TODO: The test "libvlc_slaves" fails. Applied upstream as
1111 ;; <https://git.videolan.org/?p=vlc.git;a=commit;h=4186c94104ee528abd6860611b49515f3e6ec644>.
1112 ;; Try removing it in 3.0.9.
1113 "vlc-fix-test_libvlc_slaves.patch"))))
1114 (build-system gnu-build-system)
1118 ("gettext" ,gettext-minimal)
1119 ("git" ,git) ; needed for a test
1120 ("pkg-config" ,pkg-config)))
1121 ;; FIXME: Add optional inputs once available.
1123 `(("alsa-lib" ,alsa-lib)
1129 ("fontconfig" ,fontconfig)
1130 ("freetype" ,freetype)
1131 ("fribidi" ,fribidi)
1134 ("libarchive" ,libarchive)
1136 ("libavc1394" ,libavc1394)
1137 ("libbluray" ,libbluray)
1138 ("libcaca" ,libcaca)
1139 ("libcddb" ,libcddb)
1141 ("libdvbpsi" ,libdvbpsi)
1142 ("libdvdnav" ,libdvdnav)
1143 ("libdvdread" ,libdvdread)
1144 ("libebml" ,libebml)
1145 ("libgcrypt" ,libgcrypt)
1147 ("libkate" ,libkate)
1149 ("libmatroska" ,libmatroska)
1150 ("libmicrodns" ,libmicrodns)
1151 ("libmodplug" ,libmodplug)
1152 ("libmpeg2" ,libmpeg2)
1155 ("libraw1394" ,libraw1394)
1156 ("librsvg" ,librsvg)
1157 ("libsamplerate" ,libsamplerate)
1158 ("libsecret" ,libsecret)
1159 ("libssh2" ,libssh2)
1160 ("libupnp" ,libupnp)
1162 ("libvdpau" ,libvdpau)
1163 ("libvorbis" ,libvorbis)
1165 ("libtheora" ,libtheora)
1166 ("libx264" ,libx264)
1167 ("libxext" ,libxext)
1169 ("libxinerama" ,libxinerama)
1170 ("libxml2" ,libxml2)
1172 ("livemedia-utils" ,livemedia-utils)
1177 ("pulseaudio" ,pulseaudio)
1178 ("protobuf" ,protobuf)
1179 ("python" ,python-wrapper)
1182 ("qtx11extras" ,qtx11extras)
1185 ("sdl-image" ,sdl-image)
1187 ("speexdsp" ,speexdsp)
1189 ("twolame" ,twolame)
1191 ("wayland" ,wayland)
1192 ("wayland-protocols" ,wayland-protocols)
1194 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1198 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1199 (assoc-ref %build-inputs "ffmpeg")
1200 "/lib")) ;needed for the tests
1203 (modify-phases %standard-phases
1204 (add-after 'unpack 'patch-source
1205 (lambda* (#:key inputs #:allow-other-keys)
1206 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1207 (substitute* "configure"
1208 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1209 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1210 ;; Some of the tests require using the display to test out VLC,
1211 ;; which fails in our sandboxed build system
1212 (substitute* "test/run_vlc.sh"
1213 (("./vlc --ignore-config") "echo"))
1215 ;; modules/text_renderer/freetype/text_layout.c uses a
1216 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1217 ;; from fribidi.h, so for now we enable the use of deprecated
1218 ;; fribidi interfaces from this file.
1219 ;; FIXME: Try removing this for vlc >= 3.0.3.
1220 (substitute* "modules/text_renderer/freetype/text_layout.c"
1221 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1223 ;; Fix build with libssh2 > 1.8.0:
1224 ;; <https://trac.videolan.org/vlc/ticket/22060>
1225 ;; <https://git.videolan.org/?p=vlc.git;a=commit;h=11449b5cd8b415768e010d9b7c1d6ba3cea21f82>
1226 (substitute* "modules/access/sftp.c"
1227 (("010801") "010900"))
1229 (add-after 'strip 'regenerate-plugin-cache
1230 (lambda* (#:key outputs #:allow-other-keys)
1231 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1232 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1233 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1234 ;; it references. Thus, we first reset the timestamps of all
1235 ;; these files, and then regenerate the cache such that the
1236 ;; mtimes it includes are always zero instead of being dependent
1237 ;; on the build time.
1238 (let* ((out (assoc-ref outputs "out"))
1239 (pkglibdir (string-append out "/lib/vlc"))
1240 (plugindir (string-append pkglibdir "/plugins"))
1241 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1242 ;; TODO: Factorize 'reset-timestamps'.
1243 (for-each (lambda (file)
1244 (let ((s (lstat file)))
1245 (unless (eq? (stat:type s) 'symlink)
1247 (find-files plugindir))
1248 (invoke cachegen plugindir))))
1249 (add-after 'install 'wrap-executable
1250 (lambda* (#:key outputs #:allow-other-keys)
1251 (let ((out (assoc-ref outputs "out"))
1252 (plugin-path (getenv "QT_PLUGIN_PATH")))
1253 (wrap-program (string-append out "/bin/vlc")
1254 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1256 (home-page "https://www.videolan.org/")
1257 (synopsis "Audio and video framework")
1258 (description "VLC is a cross-platform multimedia player and framework
1259 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1260 streaming protocols.")
1261 (license license:gpl2+)))
1263 (define-public mplayer
1270 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1274 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
1275 (build-system gnu-build-system)
1276 ;; FIXME: Add additional inputs once available.
1278 `(("pkg-config" ,pkg-config)
1281 `(("alsa-lib" ,alsa-lib)
1282 ("cdparanoia" ,cdparanoia)
1283 ("ffmpeg" ,ffmpeg-3.4)
1284 ("fontconfig" ,fontconfig)
1285 ("freetype" ,freetype)
1286 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
1289 ("libdvdcss" ,libdvdcss)
1290 ("libdvdnav" ,libdvdnav)
1291 ("libjpeg" ,libjpeg-turbo)
1292 ("libmpeg2" ,libmpeg2)
1293 ("libmpg123" ,mpg123) ; audio codec for MP3
1295 ("libtheora" ,libtheora)
1296 ("libvdpau" ,libvdpau)
1297 ("libvorbis" ,libvorbis)
1299 ("libx264" ,libx264)
1300 ("libxinerama" ,libxinerama)
1302 ("libxxf86dga" ,libxxf86dga)
1306 ("pulseaudio" ,pulseaudio)
1307 ("python" ,python-wrapper)
1312 `(#:tests? #f ; no test target
1314 (modify-phases %standard-phases
1316 ;; configure does not work followed by "SHELL=..." and
1317 ;; "CONFIG_SHELL=..."; set environment variables instead
1318 (lambda* (#:key inputs outputs #:allow-other-keys)
1319 (let ((out (assoc-ref outputs "out"))
1320 (libx11 (assoc-ref inputs "libx11")))
1321 (substitute* "configure"
1322 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1323 (setenv "SHELL" (which "bash"))
1324 (setenv "CONFIG_SHELL" (which "bash"))
1325 (invoke "./configure"
1326 (string-append "--extra-cflags=-I"
1327 libx11 "/include") ; to detect libx11
1328 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1329 (string-append "--prefix=" out)
1330 ;; Enable runtime cpu detection where supported,
1331 ;; and choose a suitable target.
1332 ,@(match (or (%current-target-system)
1335 '("--enable-runtime-cpudetection"
1336 "--target=x86_64-linux"))
1338 '("--enable-runtime-cpudetection"
1339 "--target=i686-linux"))
1341 '("--target=mips3-linux"))
1342 (_ (list (string-append
1344 (or (%current-target-system)
1345 (nix-system->gnu-triplet
1346 (%current-system)))))))
1347 "--disable-iwmmxt")))))))
1348 (home-page "https://www.mplayerhq.hu/design7/news.html")
1349 (synopsis "Audio and video player")
1350 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1351 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1352 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1353 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1354 (license license:gpl2)))
1363 (url "https://github.com/mpv-player/mpv.git")
1364 (commit (string-append "v" version))))
1365 (file-name (git-file-name name version))
1368 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1369 (build-system waf-build-system)
1371 `(("perl" ,perl) ; for zsh completion file
1372 ("pkg-config" ,pkg-config)
1373 ("python-docutils" ,python-docutils)))
1374 ;; Missing features: libguess, V4L2
1376 `(("alsa-lib" ,alsa-lib)
1383 ("libbluray" ,libbluray)
1384 ("libcaca" ,libcaca)
1385 ("libbs2b" ,libbs2b)
1386 ("libcdio-paranoia" ,libcdio-paranoia)
1387 ("libdvdread" ,libdvdread)
1388 ("libdvdnav" ,libdvdnav)
1389 ("libjpeg" ,libjpeg-turbo)
1391 ("libvdpau" ,libvdpau)
1393 ("libxext" ,libxext)
1394 ("libxinerama" ,libxinerama)
1395 ("libxrandr" ,libxrandr)
1396 ("libxscrnsaver" ,libxscrnsaver)
1398 ;; XXX: lua > 5.2 is not currently supported; see
1399 ;; waftools/checks/custom.py
1403 ("pulseaudio" ,pulseaudio)
1405 ("shaderc" ,shaderc)
1406 ("vulkan-headers" ,vulkan-headers)
1407 ("vulkan-loader" ,vulkan-loader)
1409 ("wayland" ,wayland)
1410 ("wayland-protocols" ,wayland-protocols)
1411 ("libxkbcommon" ,libxkbcommon)
1412 ("youtube-dl" ,youtube-dl)
1416 (modify-phases %standard-phases
1418 'unpack 'patch-paths
1419 (lambda* (#:key inputs #:allow-other-keys)
1420 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1421 (substitute* "player/lua/ytdl_hook.lua"
1422 (("\"youtube-dl\",")
1423 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1426 'configure 'setup-waf
1427 (lambda* (#:key inputs #:allow-other-keys)
1428 (let ((waf (assoc-ref inputs "waf")))
1429 (copy-file (string-append waf "/bin/waf") "waf"))
1432 #:configure-flags (list "--enable-libmpv-shared"
1435 "--disable-build-date")
1436 ;; No check function defined.
1438 (home-page "https://mpv.io/")
1439 (synopsis "Audio and video player")
1440 (description "mpv is a general-purpose audio and video player. It is a
1441 fork of mplayer2 and MPlayer. It shares some features with the former
1442 projects while introducing many more.")
1443 (license license:gpl2+)))
1445 (define-public gnome-mpv
1446 (deprecated-package "gnome-mpv" celluloid))
1448 (define-public mpv-mpris
1456 (url "https://github.com/hoyon/mpv-mpris")
1458 (file-name (git-file-name name version))
1461 "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx"))))
1462 (build-system gnu-build-system)
1464 '(#:tests? #f ; no tests
1465 #:make-flags '("CC=gcc")
1467 (modify-phases %standard-phases
1468 (delete 'configure) ; no configure script
1470 (lambda* (#:key outputs #:allow-other-keys)
1471 (let ((out (assoc-ref outputs "out")))
1472 (install-file "mpris.so" (string-append out "/lib")))
1475 `(("pkg-config" ,pkg-config)))
1479 (home-page "https://github.com/hoyon/mpv-mpris")
1480 (synopsis "MPRIS plugin for mpv")
1481 (description "This package provides an @dfn{MPRIS} (Media Player Remote
1482 Interfacing Specification) plugin for the @code{mpv} media player. It implements
1483 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
1486 To load this plugin, specify the following option when starting mpv:
1487 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
1488 @file{$HOME/.config/mpv/scripts}.")
1489 (license license:expat)))
1491 (define-public libvpx
1496 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1499 (url "https://chromium.googlesource.com/webm/libvpx")
1500 (commit (string-append "v" version))))
1501 (file-name (git-file-name name version))
1504 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
1505 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1506 (build-system gnu-build-system)
1508 `(#:configure-flags (list "--enable-shared"
1511 ;; Limit size to avoid CVE-2015-1258
1512 "--size-limit=16384x16384"
1513 (string-append "--prefix=" (assoc-ref %outputs "out")))
1514 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1515 (assoc-ref %outputs "out") "/lib"))
1516 #:phases (modify-phases %standard-phases
1518 (lambda* (#:key configure-flags #:allow-other-keys)
1519 ;; The configure script does not understand some of the GNU
1520 ;; options, so we only add the flags specified above.
1521 (apply invoke "./configure" configure-flags))))
1522 #:tests? #f)) ; no check target
1526 (synopsis "VP8/VP9 video codec")
1527 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1528 (license license:bsd-3)
1529 (home-page "https://www.webmproject.org/")))
1531 ;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
1532 (define-public libvpx-1.7
1537 (inherit (package-source libvpx))
1539 (url "https://chromium.googlesource.com/webm/libvpx")
1540 (commit (string-append "v" version))))
1541 (file-name (git-file-name "libvpx" version))
1544 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1547 (origin-patches (package-source libvpx))
1548 (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
1550 (define-public youtube-dl
1553 (version "2020.01.24")
1556 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1557 "releases/download/" version "/youtube-dl-"
1561 "1zrnbjnwv315f9a83lk5c0gl4ianvp6q2kinxvqlv604sabcq78b"))))
1562 (build-system python-build-system)
1564 ;; The problem here is that the directory for the man page and completion
1565 ;; files is relative, and for some reason, setup.py uses the
1566 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1567 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1568 ;; completion file is called 'youtube-dl' rather than
1569 ;; 'youtube-dl.bash-completion'.
1570 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1571 #:phases (modify-phases %standard-phases
1572 (add-before 'install 'fix-the-data-directories
1573 (lambda* (#:key outputs #:allow-other-keys)
1574 (let ((prefix (assoc-ref outputs "out")))
1575 (mkdir "bash-completion")
1576 (rename-file "youtube-dl.bash-completion"
1577 "bash-completion/youtube-dl")
1578 (substitute* "setup.py"
1579 (("youtube-dl\\.bash-completion")
1580 "bash-completion/youtube-dl")
1582 (string-append "'" prefix "/etc/"))
1584 (string-append "'" prefix "/share/")))
1586 (synopsis "Download videos from YouTube.com and other sites")
1588 "Youtube-dl is a small command-line program to download videos from
1589 YouTube.com and many more sites.")
1590 (home-page "https://yt-dl.org")
1591 (license license:public-domain)))
1593 (define-public youtube-dl-gui
1595 (name "youtube-dl-gui")
1600 (uri (pypi-uri "Youtube-DLG" version))
1603 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1604 (build-system python-build-system)
1606 ;; In Guix, wxpython has not yet been packaged for Python 3.
1607 `(#:python ,python-2
1608 ;; This package has no tests.
1611 (modify-phases %standard-phases
1612 (add-before 'build 'patch-source
1613 (lambda* (#:key inputs #:allow-other-keys)
1614 ;; The youtube-dl-gui program lets you configure options. Some of
1615 ;; them are problematic, so we change their defaults.
1616 (substitute* "youtube_dl_gui/optionsmanager.py"
1617 ;; When this is true, the builder process will try (and fail) to
1618 ;; write logs to the builder user's home directory.
1619 (("'enable_log': True") "'enable_log': False")
1620 ;; This determines which youtube-dl program youtube-dl-gui will
1621 ;; run. If we don't set this, then youtube-dl-gui might download
1622 ;; an arbitrary copy from the Internet into the user's home
1623 ;; directory and run it, so let's make sure youtube-dl-gui uses
1624 ;; the youtube-dl from the inputs by default.
1625 (("'youtubedl_path': self.config_path")
1626 (string-append "'youtubedl_path': '"
1627 (assoc-ref inputs "youtube-dl")
1629 ;; When this is True, when youtube-dl-gui is finished downloading
1630 ;; a file, it will try (and possibly fail) to open the directory
1631 ;; containing the downloaded file. This can fail because it
1632 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1633 ;; adding xdg-utils to the propagated inputs is not enough to
1634 ;; make this work, so for now we set the default to False.
1635 (("'open_dl_dir': True") "'open_dl_dir': False"))
1636 ;; The youtube-dl program from the inputs is actually a wrapper
1637 ;; script written in bash, so attempting to invoke it as a python
1638 ;; script will fail.
1639 (substitute* "youtube_dl_gui/downloaders.py"
1640 (("cmd = \\['python', self\\.youtubedl_path\\]")
1641 "cmd = [self.youtubedl_path]"))
1642 ;; Use relative paths for installing data files so youtube-dl-gui
1643 ;; installs the files relative to its prefix in the store, rather
1644 ;; than relative to /. Also, instead of installing data files into
1645 ;; $prefix/usr/share, install them into $prefix/share for
1646 ;; consistency (see: (standards) Directory Variables).
1647 (substitute* "setup.py"
1648 (("= '/usr/share") "= 'share"))
1649 ;; Update get_locale_file() so it finds the installed localization
1651 (substitute* "youtube_dl_gui/utils.py"
1652 (("os\\.path\\.join\\('/usr', 'share'")
1653 (string-append "os.path.join('"
1654 (assoc-ref %outputs "out")
1657 (add-after 'install 'create-desktop-file
1658 (lambda* (#:key outputs #:allow-other-keys)
1659 (let* ((out (assoc-ref outputs "out"))
1660 (applications (string-append out "/share/applications")))
1661 (mkdir-p applications)
1662 (call-with-output-file
1663 (string-append applications "/youtube-dl-gui.desktop")
1668 Name=Youtube-dl GUI~@
1669 Comment=Graphical interface to download video with youtube-dl~@
1670 Exec=youtube-dl-gui~@
1671 TryExec=youtube-dl-gui~@
1673 Icon=youtube-dl-gui~@
1675 Categories=AudioVideo;Audio;Video;Network~%")))
1678 `(("python2-wxpython" ,python2-wxpython)
1679 ("youtube-dl" ,youtube-dl)))
1680 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1682 "GUI (Graphical User Interface) for @command{youtube-dl}")
1684 "Youtube-dlG is a GUI (Graphical User Interface) for
1685 @command{youtube-dl}. You can use it to download videos from YouTube and any
1686 other site that youtube-dl supports.")
1687 (license license:unlicense)))
1689 (define-public you-get
1692 (version "0.4.1355")
1696 (url "https://github.com/soimort/you-get.git")
1697 (commit (string-append "v" version))))
1698 (file-name (git-file-name name version))
1701 "0xq7z04hvw3b3npiahlpzhbxsjvam9n9dynplyrkn84dx6k9ajbj"))))
1702 (build-system python-build-system)
1704 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1707 (modify-phases %standard-phases
1708 (add-after 'unpack 'qualify-input-references
1709 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1710 ;; happens to be in the user's $PATH at run time.
1711 (lambda* (#:key inputs #:allow-other-keys)
1712 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1714 (substitute* "src/you_get/processor/ffmpeg.py"
1715 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1716 ;; same string is also used when sniffing ffmpeg's output.
1717 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1718 (string-append prefix "'" ffmpeg "'")))
1720 #:tests? #f)) ; XXX some tests need Internet access
1721 (synopsis "Download videos, audio, or images from Web sites")
1723 "You-Get is a command-line utility to download media contents (videos,
1724 audio, images) from the Web. It can use either mpv or vlc for playback.")
1725 (home-page "https://you-get.org/")
1726 (license license:expat)))
1728 (define-public youtube-viewer
1730 (name "youtube-viewer")
1735 (url "https://github.com/trizen/youtube-viewer.git")
1737 (file-name (git-file-name name version))
1740 "1h0m8rn7najdrzvg5md9albiax287273b40ncrihh9amsvvb47c9"))))
1741 (build-system perl-build-system)
1743 `(("perl-module-build" ,perl-module-build)))
1745 `(("perl-data-dump" ,perl-data-dump)
1746 ("perl-file-sharedir" ,perl-file-sharedir)
1747 ("perl-gtk2" ,perl-gtk2)
1748 ("perl-json" ,perl-json)
1749 ("perl-libwww" ,perl-libwww)
1750 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1751 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1752 ("perl-mozilla-ca" ,perl-mozilla-ca)
1753 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1754 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1755 ("xdg-utils" ,xdg-utils)
1757 ;; Some videos play without youtube-dl, but others silently fail to.
1758 ("youtube-dl" ,youtube-dl)))
1760 `(#:modules ((guix build perl-build-system)
1763 #:module-build-flags '("--gtk")
1765 (modify-phases %standard-phases
1766 (add-after 'unpack 'refer-to-inputs
1767 (lambda* (#:key inputs #:allow-other-keys)
1768 (substitute* "lib/WWW/YoutubeViewer.pm"
1770 (format #f "'~a/bin/youtube-dl'"
1771 (assoc-ref inputs "youtube-dl"))))
1772 (substitute* '("bin/gtk2-youtube-viewer"
1773 "bin/gtk3-youtube-viewer")
1775 (format #f "'~a/bin/xdg-open'"
1776 (assoc-ref inputs "xdg-utils"))))
1778 (add-after 'install 'install-desktop
1779 (lambda* (#:key outputs #:allow-other-keys)
1780 (let* ((out (assoc-ref outputs "out"))
1781 (sharedir (string-append out "/share")))
1782 (install-file "share/gtk-youtube-viewer.desktop"
1783 (string-append sharedir "/applications"))
1784 (install-file "share/icons/gtk-youtube-viewer.png"
1785 (string-append sharedir "/pixmaps"))
1787 (add-after 'install 'wrap-program
1788 (lambda* (#:key outputs #:allow-other-keys)
1789 (let* ((out (assoc-ref outputs "out"))
1790 (bin-dir (string-append out "/bin/"))
1791 (site-dir (string-append out "/lib/perl5/site_perl/"))
1792 (lib-path (getenv "PERL5LIB")))
1793 (for-each (cut wrap-program <>
1794 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1795 (find-files bin-dir))
1798 "Lightweight application for searching and streaming videos from YouTube")
1800 "Youtube-viewer searches and plays YouTube videos in a native player.
1801 It comes with various search options; it can search for videos, playlists
1802 and/or channels. The videos are streamed directly in a selected video player
1803 at the best resolution (customizable) and with closed-captions (if available).
1804 Both command-line and GTK2 interface are available.")
1805 (home-page "https://github.com/trizen/youtube-viewer")
1806 (license license:perl-license)))
1808 (define-public libbluray
1814 (uri (string-append "https://download.videolan.org/videolan/"
1815 name "/" version "/"
1816 name "-" version ".tar.bz2"))
1819 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1820 (build-system gnu-build-system)
1822 `(#:configure-flags '("--disable-bdjava-jar")
1824 (modify-phases %standard-phases
1825 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1826 ;; Avoid the need to propagate libxml2 by referring to it
1827 ;; directly, as is already done for fontconfig & freetype.
1828 (lambda* (#:key inputs #:allow-other-keys)
1829 (let ((libxml2 (assoc-ref inputs "libxml2")))
1830 (substitute* "configure"
1831 ((" libxml-2.0") ""))
1832 (substitute* "src/libbluray.pc.in"
1833 (("^Libs.private:" field)
1834 (string-append field " -L" libxml2 "/lib -lxml2")))
1836 (add-before 'build 'fix-dlopen-paths
1837 (lambda* (#:key inputs #:allow-other-keys)
1838 (let ((libaacs (assoc-ref inputs "libaacs"))
1839 (libbdplus (assoc-ref inputs "libbdplus")))
1840 (substitute* "src/libbluray/disc/aacs.c"
1842 (string-append "\"" libaacs "/lib/libaacs\"")))
1843 (substitute* "src/libbluray/disc/bdplus.c"
1845 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1847 (native-inputs `(("pkg-config" ,pkg-config)))
1849 `(("fontconfig" ,fontconfig)
1850 ("freetype" ,freetype)
1851 ("libaacs" ,libaacs)
1852 ("libbdplus" ,libbdplus)
1853 ("libxml2" ,libxml2)))
1854 (home-page "https://www.videolan.org/developers/libbluray.html")
1855 (synopsis "Blu-Ray Disc playback library")
1857 "libbluray is a library designed for Blu-Ray Disc playback for media
1858 players, like VLC or MPlayer.")
1859 (license license:lgpl2.1+)))
1861 (define-public libdvdread
1867 (uri (string-append "https://download.videolan.org/videolan/"
1868 "libdvdread/" version "/"
1869 "libdvdread-" version ".tar.bz2"))
1872 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
1873 (build-system gnu-build-system)
1875 `(#:configure-flags '("--with-libdvdcss=yes")))
1877 `(("pkg-config" ,pkg-config)))
1879 `(("libdvdcss" ,libdvdcss)))
1880 (home-page "http://dvdnav.mplayerhq.hu/")
1881 (synopsis "Library for reading video DVDs")
1883 "Libdvdread provides a simple foundation for reading DVD video
1884 disks. It provides the functionality that is required to access many
1885 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1886 authentication and descrambling (if an external libdvdcss library is
1888 (license license:gpl2+)))
1890 (define-public dvdauthor
1897 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1901 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1902 (build-system gnu-build-system)
1904 `(("libdvdread" ,libdvdread)
1906 ("imagemagick" ,imagemagick)
1907 ("libxml2" ,libxml2)
1908 ("freetype" ,freetype)))
1910 `(("pkg-config" ,pkg-config)))
1911 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1912 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1913 MPEG-2 stream containing VOB packets.")
1914 (home-page "http://dvdauthor.sourceforge.net")
1915 (license license:gpl3+)))
1917 (define-public libdvdnav
1923 (uri (string-append "https://download.videolan.org/videolan/"
1924 "libdvdnav/" version "/"
1925 "libdvdnav-" version ".tar.bz2"))
1928 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
1929 (build-system gnu-build-system)
1931 `(("pkg-config" ,pkg-config)))
1933 `(("libdvdread" ,libdvdread)))
1934 (home-page "http://dvdnav.mplayerhq.hu/")
1935 (synopsis "Library for video DVD navigation features")
1937 "Libdvdnav is a library for developers of multimedia
1938 applications. It allows easy use of sophisticated DVD navigation features
1939 such as DVD menus, multiangle playback and even interactive DVD games. All
1940 this functionality is provided through a simple API which provides the DVD
1941 playback as a single logical stream of blocks, intermitted by special
1942 dvdnav events to report certain conditions. The main usage of libdvdnav is
1943 a loop regularly calling a function to get the next block, surrounded by
1944 additional calls to tell the library of user interaction. The whole
1945 DVD virtual machine and internal playback states are completely
1947 (license license:gpl2+)))
1949 (define-public libdvdcss
1955 (uri (string-append "https://download.videolan.org/pub/"
1956 name "/" version "/"
1957 name "-" version ".tar.bz2"))
1960 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1961 (build-system gnu-build-system)
1962 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1963 (synopsis "Library for accessing DVDs as block devices")
1965 "libdvdcss is a simple library designed for accessing DVDs like a block
1966 device without having to bother about the decryption.")
1967 (license license:gpl2+)))
1969 (define-public srt2vtt
1976 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1980 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1981 (build-system gnu-build-system)
1983 `(("guile" ,guile-2.0)))
1984 (synopsis "SubRip to WebVTT subtitle converter")
1985 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1986 for use with HTML5 video.")
1987 (home-page "https://dthompson.us/projects/srt2vtt.html")
1988 (license license:gpl3+)))
1990 (define-public avidemux
1997 "mirror://sourceforge/avidemux/avidemux/" version "/"
1998 "avidemux_" version ".tar.gz"))
2001 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
2002 (patches (search-patches "avidemux-install-to-lib.patch"))))
2003 (build-system cmake-build-system)
2006 ("pkg-config" ,pkg-config)
2007 ("python" ,python-wrapper)
2008 ("qttools" ,qttools)
2010 ;; FIXME: Once packaged, add libraries not found during the build.
2012 `(("alsa-lib" ,alsa-lib)
2013 ("fontconfig" ,fontconfig)
2014 ("freetype" ,freetype)
2015 ("fribidi" ,fribidi)
2020 ("libvdpau" ,libvdpau)
2021 ("libvorbis" ,libvorbis)
2024 ("pulseaudio" ,pulseaudio)
2029 `(#:tests? #f ; no check target
2031 ;; Make sure files inside the included ffmpeg tarball are
2033 (let ((ffmpeg "ffmpeg-4.1.4"))
2034 (modify-phases %standard-phases
2035 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2037 (with-directory-excursion "avidemux_core/ffmpeg_package"
2038 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2039 (delete-file (string-append ffmpeg ".tar.bz2")))
2041 (add-after 'patch-source-shebangs 'repack-ffmpeg
2043 (with-directory-excursion "avidemux_core/ffmpeg_package"
2044 (substitute* (string-append ffmpeg "/configure")
2045 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2046 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2047 ;; avoid non-determinism in the archive
2048 "--sort=name" "--mtime=@0"
2049 "--owner=root:0" "--group=root:0")
2050 (delete-file-recursively ffmpeg))
2054 ;; Copy-paste settings from the cmake build system.
2055 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2056 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2059 (lambda* (#:key inputs outputs #:allow-other-keys)
2060 (let* ((out (assoc-ref outputs "out"))
2061 (lib (string-append out "/lib"))
2064 (lambda* (component srcdir #:optional (args '()))
2065 (let ((builddir (string-append "build_" component)))
2067 (with-directory-excursion builddir
2068 (apply invoke "cmake"
2069 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2070 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2071 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2072 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2073 "\"-Wl,-rpath=" lib "\"")
2074 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2075 (string-append "../" srcdir)
2079 (number->string (parallel-job-count)))
2080 (invoke "make" "install"))))))
2082 (build_component "core" "avidemux_core")
2083 (build_component "cli" "avidemux/cli")
2084 (build_component "qt4" "avidemux/qt4")
2085 (build_component "plugins_common" "avidemux_plugins"
2086 '("-DPLUGIN_UI=COMMON"))
2087 (build_component "plugins_cli" "avidemux_plugins"
2088 '("-DPLUGIN_UI=CLI"))
2089 (build_component "plugins_qt4" "avidemux_plugins"
2090 '("-DPLUGIN_UI=QT4"))
2091 (build_component "plugins_settings" "avidemux_plugins"
2092 '("-DPLUGIN_UI=SETTINGS"))
2093 ;; Remove .exe and .dll file.
2094 (delete-file-recursively
2095 (string-append out "/share/ADM6_addons"))
2097 (delete 'install)))))
2098 (home-page "http://fixounet.free.fr/avidemux/")
2099 (synopsis "Video editor")
2100 (description "Avidemux is a video editor designed for simple cutting,
2101 filtering and encoding tasks. It supports many file types, including AVI,
2102 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2103 can be automated using projects, job queue and powerful scripting
2105 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2106 ;; Software with various licenses is included, see License.txt.
2107 (license license:gpl2+)))
2109 (define-public vapoursynth
2111 (name "vapoursynth")
2116 (url "https://github.com/vapoursynth/vapoursynth.git")
2117 (commit (string-append "R" version))))
2118 (file-name (git-file-name name version))
2121 "1i6163bidlp0p9zcnxpsphr44ayfzd51fig4ri7vbrbl9lw9jaih"))))
2122 (build-system gnu-build-system)
2124 `(("autoconf" ,autoconf)
2125 ("automake" ,automake)
2126 ("cython" ,python-cython)
2127 ("libtool" ,libtool)
2128 ("pkg-config" ,pkg-config)
2132 `(("ffmpeg" ,ffmpeg)
2134 ("tesseract-ocr" ,tesseract-ocr)
2136 (home-page "http://www.vapoursynth.com/")
2137 (synopsis "Video processing framework")
2138 (description "VapourSynth is a C++ library and Python module for video
2139 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2140 multithreading, generalized colorspaces, per frame properties, and videos with
2142 ;; src/core/cpufeatures only allows x86, ARM or PPC
2143 (supported-systems (fold delete %supported-systems
2144 '("mips64el-linux" "aarch64-linux")))
2145 ;; As seen from the source files.
2146 (license license:lgpl2.1+)))
2155 "http://downloads.xvid.com/downloads/xvidcore-"
2156 version ".tar.bz2"))
2159 "0zppakvcgq5a42mhqqsbliclpg2jrhbmbfgrzalyfzr47jqmhssy"))))
2160 (build-system gnu-build-system)
2161 (native-inputs `(("yasm" ,yasm)))
2164 (modify-phases %standard-phases
2166 'configure 'pre-configure
2168 (chdir "build/generic")
2169 (substitute* "configure"
2170 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2172 ;; No 'check' target.
2174 (home-page "https://www.xvid.com/")
2175 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2176 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2177 codec library. It uses ASP features such as b-frames, global and quarter
2178 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2179 and custom quantization matrices.")
2180 (license license:gpl2+)))
2182 (define-public streamlink
2189 (uri (pypi-uri "streamlink" version))
2192 "0593ffjpz82jrljnzxfafkcmcqad3r1ijjan0hm04xjcnxc9cr00"))))
2193 (build-system python-build-system)
2194 (home-page "https://github.com/streamlink/streamlink")
2196 `(("python-freezegun" ,python-freezegun)
2197 ("python-pytest" ,python-pytest)
2198 ("python-mock" ,python-mock)
2199 ("python-requests-mock" ,python-requests-mock)))
2201 `(("python-pysocks" ,python-pysocks)
2202 ("python-websocket-client" ,python-websocket-client)
2203 ("python-iso3166" ,python-iso3166)
2204 ("python-iso639" ,python-iso639)
2205 ("python-isodate" ,python-isodate)
2206 ("python-pycryptodome" ,python-pycryptodome)
2207 ("python-requests" ,python-requests)
2208 ("python-urllib3" ,python-urllib3)))
2209 (synopsis "Extract streams from various services")
2210 (description "Streamlink is command-line utility that extracts streams
2211 from sites like Twitch.tv and pipes them into a video player of choice.")
2212 (license license:bsd-2)))
2214 (define-public livestreamer
2215 (deprecated-package "livestreamer" streamlink))
2217 (define-public twitchy
2218 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2221 (version (git-version "3.4" "1" commit))
2226 (url "https://github.com/BasioMeusPuga/twitchy.git")
2228 (file-name (git-file-name name version))
2231 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2232 (build-system python-build-system)
2235 (modify-phases %standard-phases
2236 (add-after 'unpack 'patch-paths
2237 (lambda* (#:key inputs #:allow-other-keys)
2238 (substitute* "twitchy/twitchy_play.py"
2240 (string-append "\"" (assoc-ref inputs "streamlink")
2241 "/bin/streamlink ")))
2243 (add-before 'check 'check-setup
2245 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2247 (add-after 'install 'install-rofi-plugin
2248 (lambda* (#:key outputs #:allow-other-keys)
2249 (install-file "plugins/rofi-twitchy"
2250 (string-append (assoc-ref outputs "out")
2254 `(("python-requests" ,python-requests)
2255 ("streamlink" ,streamlink)))
2256 (home-page "https://github.com/BasioMeusPuga/twitchy")
2257 (synopsis "Command-line interface for Twitch.tv")
2259 "This package provides a command-line interface for Twitch.tv")
2260 (license license:gpl3+))))
2269 (url "https://github.com/mltframework/mlt.git")
2270 (commit (string-append "v" version))))
2271 (file-name (git-file-name name version))
2274 "0iiqym15n8kbnjzj0asmm86gs23yykz0va5b475cc4v2vv5admgx"))))
2275 (build-system gnu-build-system)
2277 `(#:tests? #f ; no tests
2278 #:make-flags '("CC=gcc" "CXX=g++")
2280 (list "--enable-gpl3"
2283 (modify-phases %standard-phases
2285 'configure 'override-LDFLAGS
2286 (lambda* (#:key outputs #:allow-other-keys)
2287 (substitute* "config.mak"
2289 (string-append "LDFLAGS+=-Wl,-rpath="
2290 (assoc-ref outputs "out")
2294 `(("alsa-lib" ,alsa-lib)
2295 ("ffmpeg" ,ffmpeg-3.4)
2297 ("frei0r-plugins" ,frei0r-plugins)
2298 ("gdk-pixbuf" ,gdk-pixbuf)
2300 ("libxml2" ,libxml2)
2303 ("libsamplerate" ,libsamplerate)
2304 ("pulseaudio" ,pulseaudio)
2310 `(("pkg-config" ,pkg-config)))
2311 (home-page "https://www.mltframework.org/")
2312 (synopsis "Author, manage, and run multitrack audio/video compositions")
2314 "MLT is a multimedia framework, designed and developed for television
2315 broadcasting. It provides a toolkit for broadcasters, video editors, media
2316 players, transcoders, web streamers and many more types of applications. The
2317 functionality of the system is provided via an assortment of ready to use
2318 tools, XML authoring components, and an extensible plug-in based API.")
2319 (license license:gpl3)))
2321 (define-public v4l-utils
2327 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2328 "/v4l-utils-" version ".tar.bz2"))
2331 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2332 (build-system gnu-build-system)
2335 (list (string-append "--with-udevdir="
2336 (assoc-ref %outputs "out")
2340 ("pkg-config" ,pkg-config)))
2342 `(("alsa-lib" ,alsa-lib)
2344 ("libjpeg" ,libjpeg-turbo)
2348 (synopsis "Realtime video capture utilities for Linux")
2349 (description "The v4l-utils provide a series of libraries and utilities to
2350 be used for realtime video capture via Linux-specific APIs.")
2351 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2352 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2353 (license (list license:lgpl2.1+ license:gpl2))))
2362 (url "https://github.com/obsproject/obs-studio.git")
2364 (file-name (git-file-name name version))
2367 "0m15ch2ix9qrdf1a9mj7wcpl72z3h13zx60c9q72sb1435id2g1q"))))
2368 (build-system cmake-build-system)
2370 `(#:tests? #f)) ; no tests
2372 `(("pkg-config" ,pkg-config)))
2374 `(("alsa-lib" ,alsa-lib)
2378 ("fontconfig" ,fontconfig)
2379 ("freetype" ,freetype)
2381 ("jansson" ,jansson)
2382 ("libx264" ,libx264)
2383 ("libxcomposite" ,libxcomposite)
2385 ("pulseaudio" ,pulseaudio)
2388 ("qtx11extras" ,qtx11extras)
2390 ("v4l-utils" ,v4l-utils)
2392 (synopsis "Live streaming software")
2393 (description "Open Broadcaster Software provides a graphical interface for
2394 video recording and live streaming. OBS supports capturing audio and video
2395 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2397 (home-page "https://obsproject.com")
2398 (supported-systems '("x86_64-linux" "i686-linux"))
2399 (license license:gpl2+)))
2401 (define-public libvdpau
2409 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2411 (file-name (git-file-name name version))
2414 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2415 (build-system meson-build-system)
2417 `(("pkg-config" ,pkg-config)))
2419 `(("libx11" ,libx11 "out")
2420 ("libxext" ,libxext)
2421 ("xorgproto" ,xorgproto)))
2422 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2423 (synopsis "Video Decode and Presentation API")
2424 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2425 provides an interface to video decode acceleration and presentation hardware
2426 present in modern GPUs.")
2427 (license (license:x11-style "file://COPYING"))))
2429 (define-public vdpauinfo
2436 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2437 name "-" version ".tar.gz"))
2440 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2441 (build-system gnu-build-system)
2443 `(("pkg-config" ,pkg-config)
2444 ("libx11" ,libx11)))
2446 `(("libvdpau" ,libvdpau)))
2447 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2448 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2449 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2451 (license (license:x11-style "file://COPYING"))))
2453 (define-public libvdpau-va-gl
2455 (name "libvdpau-va-gl")
2460 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2461 "releases/download/v" version "/libvdpau-va-gl-"
2465 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2466 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2467 (modules '((guix build utils)))
2468 (snippet '(begin (delete-file-recursively "3rdparty")
2470 (build-system cmake-build-system)
2472 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2474 `(("libvdpau" ,libvdpau)
2475 ("pkg-config" ,pkg-config)))
2479 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2480 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2482 "Many applications can use VDPAU to accelerate portions of the video
2483 decoding process and video post-processing to the GPU video hardware. Since
2484 there is no VDPAU available on Intel chips, they fall back to different drawing
2485 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2486 scaling and VA-API (if available) to accelerate video decoding.")
2487 (license license:expat)))
2489 (define-public recordmydesktop
2491 (name "recordmydesktop")
2495 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2496 version "/recordmydesktop-" version ".tar.gz"))
2499 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2500 (build-system gnu-build-system)
2501 (inputs `(("popt" ,popt)
2506 ("libxfixes" ,libxfixes)
2507 ("libxdamage" ,libxdamage)
2508 ("libxext" ,libxext)
2509 ("alsa-lib" ,alsa-lib)
2510 ("libvorbis" ,libvorbis)
2511 ("libtheora" ,libtheora)))
2512 (home-page "http://recordmydesktop.sourceforge.net/")
2513 (synopsis "Desktop session video recorder")
2515 "recordMyDesktop is a command-line tool that captures the activity in
2516 your graphical desktop and encodes it as a video. This is a useful tool for
2517 making @dfn{screencasts}.")
2518 (license license:gpl2+)))
2520 (define-public simplescreenrecorder
2522 (name "simplescreenrecorder")
2528 (url "https://github.com/MaartenBaert/ssr.git")
2530 (file-name (git-file-name name version))
2533 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2534 (build-system cmake-build-system)
2535 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2536 ;; README.md, the program builds and functions properly without them.
2537 ;; As a result, they are omitted. Please add them back if problems appear.
2539 `(("alsa-lib" ,alsa-lib)
2544 ("pulseaudio" ,pulseaudio)
2546 ("qtx11extras" ,qtx11extras)))
2547 (native-inputs `(("pkg-config" ,pkg-config)))
2550 (list "-DWITH_QT5=TRUE")
2551 #:tests? #f)) ; no test suite
2552 ;; Using HTTPS causes part of the page to be displayed improperly.
2553 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2554 (synopsis "Screen recorder")
2555 (description "SimpleScreenRecorder is an easy to use screen recorder with
2556 a graphical user interface. It supports recording the entire screen, or a
2557 part of it, and allows encoding in many different codecs and file formats.
2558 Other features include a live preview and live streaming.")
2559 (license (list license:gpl3+ ; most files
2560 license:zlib ; glinject/elfhacks.*
2561 license:isc ; glinject/*
2562 license:x11)))) ; build-aux/install-sh
2564 (define-public libsmpeg
2567 (version "0.4.5-401")
2571 (url "svn://svn.icculus.org/smpeg/trunk/")
2572 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2573 (file-name (string-append name "-" version "-checkout"))
2576 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2577 (build-system gnu-build-system)
2579 ;; libsmpeg fails to build with -std=c++11, which is the default with
2580 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2581 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
2583 `(("autoconf" ,autoconf)
2584 ("automake" ,automake)))
2587 (home-page "http://icculus.org/smpeg/")
2588 (synopsis "SDL MPEG decoding library")
2590 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2591 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2592 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2593 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2594 and MPEG system streams.")
2595 (license (list license:expat
2601 (define-public libsmpeg-with-sdl1
2602 (package (inherit libsmpeg)
2604 (version "0.4.5-399")
2608 (url "svn://svn.icculus.org/smpeg/trunk/")
2609 (revision 399))) ; tagged release 0.4.5
2610 (file-name (string-append name "-" version "-checkout"))
2613 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2617 (define-public libbdplus
2624 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2625 version "/" name "-" version ".tar.bz2"))
2627 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2629 `(("libgcrypt" ,libgcrypt)))
2630 (build-system gnu-build-system)
2631 (home-page "https://www.videolan.org/developers/libbdplus.html")
2632 (synopsis "Library for decrypting certain Blu-Ray discs")
2633 (description "libbdplus is a library which implements the BD+ System
2635 (license license:lgpl2.1+)))
2637 (define-public libaacs
2644 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2645 version "/" name "-" version ".tar.bz2"))
2647 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2649 `(("libgcrypt" ,libgcrypt)))
2653 (build-system gnu-build-system)
2654 (home-page "https://www.videolan.org/developers/libaacs.html")
2655 (synopsis "Library for decrypting certain Blu-Ray discs")
2656 (description "libaacs is a library which implements the Advanced Access
2657 Content System specification.")
2658 (license license:lgpl2.1+)))
2660 (define-public mps-youtube
2662 (name "mps-youtube")
2668 (url "https://github.com/mps-youtube/mps-youtube.git")
2669 (commit (string-append "v" version))))
2670 (file-name (git-file-name name version))
2673 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2674 (build-system python-build-system)
2676 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2677 ;; test suite results differ depending on the country and also introduce
2678 ;; non-determinism in the tests.
2679 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2682 `(("python-pafy" ,python-pafy)
2683 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2684 (home-page "https://github.com/mps-youtube/mps-youtube")
2685 (synopsis "Terminal based YouTube player and downloader")
2687 "@code{mps-youtube} is based on mps, a terminal based program to
2688 search, stream and download music. This implementation uses YouTube as
2689 a source of content and can play and download video as well as audio.
2690 It can use either mpv or mplayer for playback, and for conversion of
2691 formats ffmpeg or libav is used. Users should install one of the
2692 supported players in addition to this package.")
2693 (license license:gpl3+)))
2695 (define-public handbrake
2701 (uri (string-append "https://download.handbrake.fr/releases/"
2702 version "/HandBrake-" version "-source.tar.bz2"))
2705 "09rcrq0kjs1lc1as7w3glbpbfvzldwpx3xv0pfmkn4pl7acxw1f0"))
2706 (modules '((guix build utils)))
2708 ;; Remove "contrib" and source not necessary for
2709 ;; building/running under a GNU environment.
2711 (for-each delete-file-recursively
2712 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
2713 (substitute* "make/include/main.defs"
2714 ;; Disable unconditional inclusion of "contrib" libraries
2715 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2716 ;; which would lead to fetching and building of these
2717 ;; libraries. Use our own instead.
2718 (("MODULES \\+= contrib") "# MODULES += contrib"))
2720 (build-system glib-or-gtk-build-system)
2722 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
2723 ("autoconf" ,autoconf)
2724 ("intltool" ,intltool)
2725 ("libtool" ,libtool)
2726 ("pkg-config" ,pkg-config)
2727 ("python" ,python-2))) ; For configuration
2730 ("dbus-glib" ,dbus-glib)
2732 ("fontconfig" ,fontconfig)
2733 ("freetype" ,freetype)
2735 ("gstreamer" ,gstreamer)
2736 ("gst-plugins-base" ,gst-plugins-base)
2738 ("jansson" ,jansson)
2741 ("libbluray" ,libbluray)
2743 ("libdvdnav" ,libdvdnav)
2744 ("libdvdread" ,libdvdread)
2745 ("libgudev" ,libgudev)
2746 ("libmpeg2" ,libmpeg2)
2747 ("libnotify" ,libnotify)
2748 ("libnuma" ,numactl)
2751 ("libsamplerate" ,libsamplerate)
2752 ("libtheora" ,libtheora)
2753 ("libvorbis" ,libvorbis)
2755 ("libxml2" ,libxml2)
2756 ("libx264" ,libx264)
2761 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2763 (list "--disable-gtk-update-checks"
2765 (string-append "CPPFLAGS=-I"
2766 (assoc-ref %build-inputs "libxml2")
2770 (modify-phases %standard-phases
2772 ;; Run bootstrap ahead of time so that shebangs get patched.
2774 (setenv "CONFIG_SHELL" (which "sh"))
2775 ;; Patch the Makefile so that it doesn't bootstrap again.
2776 (substitute* "gtk/module.rules"
2777 ((".*autoreconf.*") ""))
2778 (with-directory-excursion "gtk"
2779 (invoke "autoreconf" "-fiv"))))
2780 (add-before 'configure 'patch-SHELL
2782 (substitute* "gtk/po/Makefile.in.in"
2783 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
2785 (add-before 'configure 'relax-reqs
2787 (substitute* "make/configure.py"
2788 ;; cmake is checked for so that it can be used to build
2789 ;; contrib/harfbuzz and contrib/x265, but we get these as
2790 ;; inputs, so don't abort if it's not found. Similarly, meson
2791 ;; and ninja are only needed for contrib/libdav1d, and nasm
2793 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
2794 (string-append & "False")))
2797 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2798 ;; 'configure' is not an autoconf-generated script, and
2799 ;; errors on unrecognized arguments,
2800 ;; e.g. --enable-fast-install
2801 (let ((out (assoc-ref outputs "out")))
2802 (apply invoke "./configure"
2803 (string-append "--prefix=" out)
2804 (or configure-flags '())))))
2805 (add-after 'configure 'chdir-build
2806 (lambda _ (chdir "./build") #t)))))
2807 (home-page "https://handbrake.fr")
2808 (synopsis "Video transcoder")
2810 "HandBrake is a tool for converting video from any format to a selection
2811 of modern, widely supported codecs.")
2812 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2813 ;; Combination under GPLv2. See LICENSE.
2814 (license license:gpl2)))
2816 (define-public intel-vaapi-driver
2818 (name "intel-vaapi-driver")
2823 (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
2824 "releases/download/" version "/intel-vaapi-driver-"
2825 version ".tar.bz2"))
2827 (base32 "12fhydgwpvyh97gxqlgv77wsf9yax321h46vi49j4sxghpcxvqki"))))
2828 (build-system gnu-build-system)
2830 `(("pkg-config" ,pkg-config)))
2832 `(("libdrm" ,libdrm)
2834 ("libx11" ,libx11)))
2837 (modify-phases %standard-phases
2838 (add-before 'configure 'set-target-directory
2839 (lambda* (#:key outputs #:allow-other-keys)
2840 (let ((out (assoc-ref outputs "out")))
2841 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2843 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2844 ;; this to all VA-API back ends instead of once to libva.
2845 (native-search-paths
2846 (list (search-path-specification
2847 (variable "LIBVA_DRIVERS_PATH")
2848 (files '("lib/dri")))))
2849 (supported-systems '("i686-linux" "x86_64-linux"))
2850 (home-page "https://01.org/linuxmedia/vaapi")
2851 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2853 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2854 hardware-accelerated video processing on Intel GEN Graphics devices supported by
2855 the i915 driver, such as integrated Intel HD Graphics. It provides access to
2856 both hardware and shader functionality for faster encoding, decoding, and
2857 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2858 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2859 license:expat)))) ; the rest, excluding the test suite
2861 (define-public openh264
2867 (uri (string-append "https://github.com/cisco/"
2868 name "/releases/download/v"
2869 version "/Source.Code.tar.gz"))
2870 (file-name (string-append name "-" version ".tar.gz"))
2873 "0iq802xfsfkskg6q1j0kg90xh04vv1sxf61mrmahgynz5d7hx2ii"))))
2874 (build-system gnu-build-system)
2877 ("python" ,python)))
2879 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2881 #:test-target "test"
2882 #:phases (modify-phases %standard-phases
2883 ;; no configure script
2884 (delete 'configure))))
2885 (home-page "http://www.openh264.org/")
2886 (synopsis "H264 decoder library")
2888 "Openh264 is a library which can decode H264 video streams.")
2889 (license license:bsd-2)))
2891 (define-public libmp4v2
2898 ;; XXX: The new location of upstream is uncertain and will become relevant the
2899 ;; moment when the googlecode archive shuts down. It is past the date it
2900 ;; should've been turned off. I tried to communicate with upstream, but this
2901 ;; wasn't very responsive and not very helpful. The short summary is, it is
2902 ;; chaos when it comes to the amount of forks and only time will tell where
2903 ;; the new upstream location is.
2904 (uri (string-append "https://storage.googleapis.com/google-"
2905 "code-archive-downloads/v2/"
2906 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2907 (file-name (string-append name "-" version ".tar.bz2"))
2908 (patches (search-patches "libmp4v2-c++11.patch"))
2911 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2912 (build-system gnu-build-system)
2914 "static")) ; 3.7MiB .a file
2917 (modify-phases %standard-phases
2918 (add-after 'unpack 'remove-dates
2920 ;; Make the build reproducible.
2921 (substitute* "configure"
2922 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2923 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2925 (add-after 'install 'move-static-libraries
2926 (lambda* (#:key outputs #:allow-other-keys)
2927 ;; Move static libraries to the "static" output.
2928 (let* ((out (assoc-ref outputs "out"))
2929 (lib (string-append out "/lib"))
2930 (static (assoc-ref outputs "static"))
2931 (slib (string-append static "/lib")))
2933 (for-each (lambda (file)
2934 (install-file file slib)
2936 (find-files lib "\\.a$"))
2939 `(("help2man" ,help2man)
2940 ("dejagnu" ,dejagnu)))
2941 (home-page "https://code.google.com/archive/p/mp4v2/")
2942 (synopsis "API to create and modify mp4 files")
2944 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2945 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2946 file format that has been used as a multimedia file format in a variety of platforms and
2947 applications. It is a very powerful and extensible format that can accommodate
2948 practically any type of media.")
2949 (license license:mpl1.1)))
2951 (define-public libmediainfo
2953 (name "libmediainfo")
2957 (uri (string-append "https://mediaarea.net/download/source/"
2959 name "_" version ".tar.bz2"))
2962 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2963 ;; TODO add a Big Buck Bunny webm for tests.
2965 `(("autoconf" ,autoconf)
2966 ("automake" ,automake)
2967 ("libtool" ,libtool)
2968 ("pkg-config" ,pkg-config)
2970 ("tinyxml2" ,tinyxml2)
2972 ("libzen" ,libzen)))
2973 (build-system gnu-build-system)
2975 '(#:tests? #f ; see above TODO
2977 ;; build scripts not in root of archive
2978 (modify-phases %standard-phases
2979 (add-after 'unpack 'change-to-build-dir
2981 (chdir "Project/GNU/Library")
2983 (home-page "https://mediaarea.net/en/MediaInfo")
2984 (synopsis "Library for retrieving media metadata")
2985 (description "MediaInfo is a library used for retrieving technical
2986 information and other metadata about audio or video files. A non-exhaustive
2987 list of the information MediaInfo can retrieve from media files include:
2990 @item General: title, author, director, album, track number, date, duration...
2991 @item Video: codec, aspect, fps, bitrate...
2992 @item Audio: codec, sample rate, channels, language, bitrate...
2993 @item Text: language of subtitle
2994 @item Chapters: number of chapters, list of chapters
2997 MediaInfo supports the following formats:
3000 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3001 MPEG-2, MPEG-4, DVD (VOB)...
3002 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3003 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3004 @item Subtitles: SRT, SSA, ASS, SAMI...
3006 (license license:bsd-2)))
3008 ;; TODO also have a GUI version available
3009 (define-public mediainfo
3015 ;; Warning: This source has proved unreliable 1 time at least.
3016 ;; Consider an alternate source or report upstream if this
3018 (uri (string-append "https://mediaarea.net/download/source/"
3019 name "/" version "/"
3020 name "_" version ".tar.bz2"))
3023 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
3025 `(("autoconf" ,autoconf)
3026 ("automake" ,automake)
3027 ("libtool" ,libtool)
3028 ("pkg-config" ,pkg-config)
3030 ("libmediainfo" ,libmediainfo)
3031 ("libzen" ,libzen)))
3032 (build-system gnu-build-system)
3034 '(#:tests? #f ; lacks tests
3036 ;; build scripts not in root of archive
3037 (modify-phases %standard-phases
3038 (add-after 'unpack 'change-to-build-dir
3040 (chdir "Project/GNU/CLI")
3042 (home-page "https://mediaarea.net/en/MediaInfo")
3043 (synopsis "Utility for reading media metadata")
3044 (description "MediaInfo is a utility used for retrieving technical
3045 information and other metadata about audio or video files. It supports the
3046 many codecs and formats supported by libmediainfo.")
3047 (license license:bsd-2)))
3049 (define-public livemedia-utils
3051 (name "livemedia-utils")
3052 (version "2019.05.29")
3056 "https://download.videolan.org/contrib/live555/live."
3060 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
3061 (build-system gnu-build-system)
3063 '(#:tests? #f ; no tests
3064 #:make-flags (list "CC=gcc"
3065 (string-append "LDFLAGS=-Wl,-rpath="
3066 (assoc-ref %outputs "out") "/lib")
3067 (string-append "PREFIX="
3068 (assoc-ref %outputs "out")))
3069 #:phases (modify-phases %standard-phases
3070 (add-before 'configure 'fix-makefiles-generation
3072 (substitute* "genMakefiles"
3077 (invoke "./genMakefiles"
3078 "linux-with-shared-libraries"))))))
3079 (home-page "http://www.live555.com/liveMedia/")
3080 (synopsis "Set of C++ libraries for multimedia streaming")
3081 (description "This code forms a set of C++ libraries for multimedia
3082 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3083 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3084 JPEG video, and several audio codecs. They can easily be extended to support
3085 additional (audio and/or video) codecs, and can also be used to build basic
3086 RTSP or SIP clients and servers.")
3087 (license license:lgpl3+)))
3089 (define-public libdvbpsi
3096 "https://download.videolan.org/pub/libdvbpsi/"
3097 version "/libdvbpsi-" version ".tar.bz2"))
3100 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
3101 (build-system gnu-build-system)
3102 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3103 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3105 (description "libdvbpsi is a simple library designed for decoding and
3106 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3107 and ITU-T H.222.0.")
3108 (license license:lgpl2.1)))
3110 (define-public ffms2
3114 (home-page "https://github.com/FFMS/ffms2")
3118 (url "https://github.com/FFMS/ffms2.git")
3120 (file-name (git-file-name name version))
3123 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3124 (build-system gnu-build-system)
3127 (list "--enable-avresample")))
3131 `(("ffmpeg" ,ffmpeg)))
3133 `(("pkg-config" ,pkg-config)))
3134 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3136 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3137 programmers to access a standard API to open and decompress media files.")
3138 ;; sources are distributed under a different license that the binary.
3139 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3140 (license license:gpl2+))); inherits from ffmpeg
3142 (define-public aegisub
3149 "http://ftp.aegisub.org/pub/archives/releases/source/"
3150 name "-" version ".tar.xz"))
3153 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3154 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3155 "aegisub-boost68.patch"))))
3156 (build-system gnu-build-system)
3159 (list "--disable-update-checker"
3160 "--without-portaudio"
3163 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3164 ;; tests require busted, a lua package we don't have yet
3167 (modify-phases %standard-phases
3168 (add-before 'configure 'fix-ldflags
3170 (setenv "LDFLAGS" "-pthread")
3172 (add-after 'unpack 'fix-boost-headers
3175 '("src/subtitles_provider_libass.cpp"
3176 "src/colour_button.cpp"
3177 "src/video_provider_dummy.cpp"
3178 "./src/video_frame.cpp")
3179 (("#include <boost/gil/gil_all.hpp>")
3180 "#include <boost/gil.hpp>"))
3184 ("desktop-file-utils" ,desktop-file-utils)
3187 ("hunspell" ,hunspell)
3190 ("alsa-lib" ,alsa-lib)
3191 ("pulseaudio" ,pulseaudio)
3193 ("freetype" ,freetype)
3194 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3196 `(("intltool" ,intltool)
3197 ("pkg-config" ,pkg-config)))
3198 (home-page "http://www.aegisub.org/")
3199 (synopsis "Subtitle engine")
3201 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3202 it quick and easy to time subtitles to audio, and features many powerful
3203 tools for styling them, including a built-in real-time video preview.")
3204 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3205 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3206 license:expat)))) ; and src/gl that is under a license similar
3207 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3208 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3209 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3211 (define-public gst-transcoder
3213 (name "gst-transcoder")
3219 (url "https://github.com/pitivi/gst-transcoder.git")
3221 (file-name (git-file-name name version))
3224 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3225 (build-system meson-build-system)
3227 `(("gobject-introspection" ,gobject-introspection)
3229 ("gstreamer" ,gstreamer)
3230 ("gst-plugins-base" ,gst-plugins-base)))
3232 `(("python" ,python)
3233 ("pkg-config" ,pkg-config)))
3234 (home-page "https://github.com/pitivi/gst-transcoder/")
3235 (synopsis "GStreamer Transcoding API")
3236 (description "GStreamer Transcoding API")
3237 (license license:lgpl2.1)))
3246 (uri (string-append "mirror://sourceforge/gmerlin/"
3247 name "/" version "/"
3248 name "-" version ".tar.gz"))
3249 (file-name (string-append name "-" version ".tar.gz"))
3252 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3253 (build-system gnu-build-system)
3255 '(#:configure-flags '("LIBS=-lm")))
3257 `(("pkg-config" ,pkg-config)
3258 ("doxygen" ,doxygen)))
3259 (home-page "http://gmerlin.sourceforge.net")
3260 (synopsis "Low level library for multimedia API building")
3262 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3263 library, upon which multimedia APIs can be built. Gavl handles all the
3264 details of audio and video formats like colorspaces, sample rates,
3265 multichannel configurations, etc. It provides standardized definitions for
3266 those formats as well as container structures for carrying audio samples or
3267 video images inside an application.
3269 In addition, it handles the sometimes ugly task of converting between all
3270 these formats and provides some elementary operations (copying, scaling,
3271 alpha blending etc).")
3272 (license license:gpl3)))
3274 (define-public frei0r-plugins
3276 (name "frei0r-plugins")
3281 (uri (string-append "https://files.dyne.org/frei0r/"
3282 "frei0r-plugins-" version ".tar.gz"))
3285 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
3286 (build-system gnu-build-system)
3289 (modify-phases %standard-phases
3290 (add-after 'unpack 'patch-Makefile
3292 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3293 ;; names in the tarball. Try removing this for future versions.
3294 (substitute* "Makefile.in"
3295 (("README\\.md ChangeLog TODO AUTHORS")
3296 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3298 ;; TODO: opencv for additional face detection filters.
3303 `(("pkg-config" ,pkg-config)))
3304 (home-page "https://www.dyne.org/software/frei0r/")
3305 (synopsis "Minimalistic plugin API for video effects")
3307 "Frei0r is a minimalistic plugin API for video effects.
3308 The main emphasis is on simplicity for an API that will round up
3309 the most common video effects into simple filters, sources and
3310 mixers that can be controlled by parameters. Frei0r wants to
3311 provide a way to share these simple effects between many
3312 applications, avoiding their reimplementation by different projects.
3313 It counts more than 100 plugins.")
3314 (license (list license:gpl2+
3315 ;; The following files are licensed as LGPL2.1+:
3316 ;; src/generator/ising0r/ising0r.c
3317 ;; src/generator/onecol0r/onecol0r.cpp
3318 ;; src/generator/nois0r/nois0r.cpp
3319 ;; src/generator/lissajous0r/lissajous0r.cpp
3320 ;; src/filter/ndvi/gradientlut.hpp
3321 ;; src/filter/ndvi/ndvi.cpp
3322 ;; src/filter/facedetect/facedetect.cpp
3323 license:lgpl2.1+))))
3325 (define-public motion
3329 (home-page "https://motion-project.github.io/")
3333 (url "https://github.com/Motion-Project/motion.git")
3334 (commit (string-append "release-" version))))
3337 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3338 (file-name (git-file-name name version))))
3339 (build-system gnu-build-system)
3341 `(("autoconf" ,autoconf-wrapper)
3342 ("automake" ,automake)
3343 ("gettext" ,gettext-minimal)
3344 ("pkg-config" ,pkg-config)))
3346 `(("libjpeg" ,libjpeg-turbo)
3347 ("ffmpeg" ,ffmpeg-3.4)
3348 ("libmicrohttpd" ,libmicrohttpd)
3349 ("sqlite" ,sqlite)))
3351 '(#:phases (modify-phases %standard-phases
3354 (patch-shebang "version.sh")
3355 (invoke "autoreconf" "-vfi"))))
3356 #:configure-flags '("--sysconfdir=/etc")
3357 #:make-flags (list (string-append "sysconfdir="
3358 (assoc-ref %outputs "out")
3361 #:tests? #f)) ; no 'check' target
3362 (synopsis "Detect motion from video signals")
3364 "Motion is a program that monitors the video signal from one or more
3365 cameras and is able to detect if a significant part of the picture has
3366 changed. Or in other words, it can detect motion.")
3368 ;; Some files say "version 2" and others "version 2 or later".
3369 (license license:gpl2)))
3371 (define-public subdl
3372 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3376 (version (git-version "1.0.3" revision commit))
3380 (url "https://github.com/alexanderwink/subdl.git")
3382 (file-name (git-file-name name version))
3385 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3386 (build-system trivial-build-system)
3388 `(#:modules ((guix build utils))
3390 (use-modules (guix build utils))
3391 (let* ((out (assoc-ref %outputs "out"))
3392 (bin (string-append out "/bin"))
3393 (source (assoc-ref %build-inputs "source"))
3394 (python (assoc-ref %build-inputs "python")))
3395 (install-file (string-append source "/subdl") bin)
3396 (patch-shebang (string-append bin "/subdl")
3397 (list (string-append python "/bin")))))))
3398 (inputs `(("python" ,python)))
3399 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3400 (description "Subdl is a command-line tool for downloading subtitles from
3401 opensubtitles.org. By default, it will search for English subtitles, display
3402 the results, download the highest-rated result in the requested language and
3403 save it to the appropriate filename.")
3404 (license license:gpl3+)
3405 (home-page "https://github.com/alexanderwink/subdl"))))
3407 (define-public l-smash
3414 (url "https://github.com/l-smash/l-smash.git")
3415 (commit (string-append "v" version))))
3416 (file-name (git-file-name name version))
3419 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3420 (build-system gnu-build-system)
3422 `(#:tests? #f ;no tests
3424 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3425 (assoc-ref %outputs "out") "/lib"))
3427 (modify-phases %standard-phases
3428 ;; configure fails if it is followed by CONFIG_SHELL
3430 (lambda* (#:key outputs #:allow-other-keys)
3431 (let ((out (assoc-ref outputs "out")))
3432 (invoke "./configure" (string-append "--prefix=" out)
3433 "--disable-static")))))))
3435 `(("which" ,which)))
3436 (home-page "https://l-smash.github.io/l-smash/")
3437 (synopsis "MP4 multiplexer and demultiplexer library")
3439 "L-SMASH is a cross-platform library that handles the ISO base media file
3440 format and some of its derived file formats, including MP4. It operates as a
3441 multiplexer and demultiplexer, and can mux video and audio in several formats
3442 using standalone executable files.")
3443 (license license:isc)))
3445 (define-public qtfaststart
3447 (name "qtfaststart")
3451 (uri (pypi-uri "qtfaststart" version))
3454 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3455 (build-system python-build-system)
3457 '(#:tests? #f)) ; no test suite
3458 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3459 (description "qtfaststart enables streaming and pseudo-streaming of
3460 QuickTime and MP4 files by moving metadata and offset information to the
3461 beginning of the file. It can also print some useful information about the
3462 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3463 project, which is released into the public domain, as well as ISO 14496-12:2005
3464 (the official spec for MP4), which can be obtained from the ISO or found
3466 (home-page "https://github.com/danielgtaylor/qtfaststart")
3467 (license license:expat)))
3469 (define-public vidstab
3470 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3474 (version (git-version "1.1.0" revision commit))
3478 (url "https://github.com/georgmartius/vid.stab.git")
3480 (file-name (git-file-name name version))
3483 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3484 (build-system cmake-build-system)
3486 '(#:tests? #f)) ; tests are not run as part of standard build process
3487 (home-page "http://public.hronopik.de/vid.stab/")
3488 (synopsis "Video stabilization library")
3489 (description "Vidstab is a video stabilization library which can be used
3490 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3491 vehicle typically suffers from undesirable shakes and jitters. Activities such
3492 as surfing, skiing, riding and walking while shooting videos are especially
3493 prone to erratic camera shakes. Vidstab targets these video contents to help
3494 create smoother and stable videos.")
3495 (license license:gpl2+))))
3497 (define-public libopenshot
3499 (name "libopenshot")
3504 (url "https://github.com/OpenShot/libopenshot")
3505 (commit (string-append "v" version))))
3506 (file-name (git-file-name name version))
3509 "0r1qmr8ar5n72603xkj9h065vbpznrqsq88kxxmn9n8djyyvk03k"))
3510 (modules '((guix build utils)))
3512 ;; Allow overriding of the python installation dir
3513 (substitute* "src/bindings/python/CMakeLists.txt"
3514 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3515 (string-append set " CACHE PATH "
3516 "\"Python bindings directory\")")))
3517 (delete-file-recursively "thirdparty")
3519 (build-system cmake-build-system)
3521 `(("pkg-config" ,pkg-config)
3524 ("unittest++" ,unittest-cpp)))
3525 (propagated-inputs ;all referenced in installed headers
3526 `(("cppzmq" ,cppzmq)
3528 ("imagemagick" ,imagemagick)
3529 ("jsoncpp" ,jsoncpp)
3530 ("libopenshot-audio" ,libopenshot-audio)
3532 ("qtmultimedia" ,qtmultimedia)
3533 ("zeromq" ,zeromq)))
3536 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3537 ,(version-major+minor (package-version python))
3539 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3541 (modify-phases %standard-phases
3542 (add-before 'configure 'set-vars
3543 (lambda* (#:key inputs #:allow-other-keys)
3544 (setenv "LIBOPENSHOT_AUDIO_DIR"
3545 (assoc-ref inputs "libopenshot-audio"))
3547 (assoc-ref inputs "zeromq"))
3548 (setenv "UNITTEST_DIR"
3549 (string-append (assoc-ref inputs "unittest++")
3550 "/include/UnitTest++"))
3552 (home-page "https://openshot.org")
3553 (synopsis "Video-editing, animation, and playback library")
3554 (description "OpenShot Library (libopenshot) is a powerful C++ video
3555 editing library with a multi-threaded and feature rich video editing
3556 API. It includes bindings for Python, Ruby, and other languages.")
3557 (license license:lgpl3+)))
3559 (define-public openshot
3566 (url "https://github.com/OpenShot/openshot-qt")
3567 (commit (string-append "v" version))))
3568 (file-name (git-file-name name version))
3571 "0mg63v36h7l8kv2sgf6x8c1n3ygddkqqwlciz7ccxpbm4x1idqba"))
3572 (modules '((guix build utils)))
3575 (delete-file-recursively "src/images/fonts") #t))))
3576 (build-system python-build-system)
3578 `(("ffmpeg" ,ffmpeg)
3579 ("font-ubuntu" ,font-ubuntu)
3580 ("libopenshot" ,libopenshot)
3582 ("python-pyqt" ,python-pyqt)
3583 ("python-pyzmq" ,python-pyzmq)
3584 ("python-requests" ,python-requests)
3587 `(#:tests? #f ;no tests
3588 #:modules ((guix build python-build-system)
3589 (guix build qt-utils)
3591 #:imported-modules (,@%python-build-system-modules
3592 (guix build qt-utils))
3593 #:phases (modify-phases %standard-phases
3594 (delete 'build) ;install phase does all the work
3595 (add-after 'unpack 'patch-font-location
3596 (lambda* (#:key inputs #:allow-other-keys)
3597 (let ((font (assoc-ref inputs "font-ubuntu")))
3598 (substitute* "src/classes/app.py"
3599 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3600 (("fonts") "share/fonts/truetype")))
3602 (add-before 'install 'set-tmp-home
3604 ;; src/classes/info.py "needs" to create several
3605 ;; directories in $HOME when loaded during build
3606 (setenv "HOME" "/tmp")
3608 (add-after 'install 'wrap-program
3609 (lambda* (#:key outputs #:allow-other-keys)
3610 (let ((out (assoc-ref outputs "out")))
3611 (wrap-qt-program out "openshot-qt"))
3613 (home-page "https://openshot.org")
3614 (synopsis "Video editor")
3615 (description "OpenShot takes your videos, photos, and music files and
3616 helps you create the film you have always dreamed of. Easily add sub-titles,
3617 transitions, and effects and then export your film to many common formats.")
3618 (license license:gpl3+)))
3620 (define-public dav1d
3627 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3628 "/dav1d/" version "/dav1d-" version ".tar.xz"))
3631 "02hgarv2x2bqbac15pdj7pbm8f4lyn78ws0dncygvhis9a6ghk7r"))))
3632 (build-system meson-build-system)
3633 (native-inputs `(("nasm" ,nasm)))
3634 (home-page "https://code.videolan.org/videolan/dav1d")
3635 (synopsis "AV1 decoder")
3636 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3637 speed and correctness.")
3638 (license license:bsd-2)))
3640 (define-public wlstream
3641 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3645 (version (git-version "0.0" revision commit))
3650 (url "https://github.com/atomnuker/wlstream.git")
3652 (file-name (git-file-name name version))
3655 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3656 (build-system meson-build-system)
3657 (native-inputs `(("libdrm" ,libdrm)
3658 ("pkg-config" ,pkg-config)))
3659 (inputs `(("ffmpeg" ,ffmpeg)
3660 ("pulseaudio" ,pulseaudio)
3661 ("wayland" ,wayland)
3662 ("wayland-protocols" ,wayland-protocols)))
3663 (home-page "https://github.com/atomnuker/wlstream")
3664 (synopsis "Screen capture tool for Wayland sessions")
3665 (description "Wlstream is a screen capture tool for recording audio and
3666 video from a Wayland session.")
3667 (license license:lgpl2.1+))))
3669 (define-public gaupol
3676 (url "https://github.com/otsaloma/gaupol/")
3678 (file-name (git-file-name name version))
3681 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
3682 (build-system python-build-system)
3684 `(("gettext" ,gettext-minimal)
3685 ("pkg-config" ,pkg-config)))
3687 `(("python-pygobject" ,python-pygobject)
3689 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3690 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3691 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3692 ("iso-codes" ,iso-codes) ; Optional: Translations.
3693 ("gstreamer" ,gstreamer)
3694 ("gst-libav" ,gst-libav)
3695 ("gst-plugins-base" ,gst-plugins-base)
3696 ("gst-plugins-good" ,gst-plugins-good)
3697 ("gst-plugins-bad" ,gst-plugins-bad)
3698 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3700 `(#:tests? #f ; Tests seem to require networking.
3702 (modify-phases %standard-phases
3703 ;; gaupol's setup.py script does not support one of the Python build
3704 ;; system's default flags, "--single-version-externally-managed".
3706 (lambda* (#:key outputs #:allow-other-keys)
3707 (invoke "python" "setup.py" "install"
3708 (string-append "--prefix=" (assoc-ref outputs "out"))
3710 (add-after 'install 'wrap-gaupol
3711 (lambda* (#:key outputs #:allow-other-keys)
3712 (let ((out (assoc-ref outputs "out"))
3713 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3714 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3715 (wrap-program (string-append out "/bin/gaupol")
3716 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3717 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3719 (add-after 'unpack 'patch-data-dir
3720 ;; Fix some path variables that setup.py seems to garble.
3721 (lambda* (#:key outputs #:allow-other-keys)
3722 (let ((out (assoc-ref outputs "out")))
3723 (substitute* "setup.py"
3724 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3725 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3726 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3727 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3729 (synopsis "Editor for text-based subtitles")
3731 "Gaupol supports multiple subtitle file formats and provides means of
3732 creating subtitles, editing texts and timing subtitles to match video. The
3733 user interface features a builtin video player and is designed with attention
3734 to convenience of translating and batch processing of multiple documents.")
3735 (home-page "https://otsaloma.io/gaupol/")
3736 (license license:gpl3+)))
3738 (define-public theorafile
3739 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
3742 (version (git-version "0.0.0" "1" commit))
3747 (url "https://github.com/FNA-XNA/Theorafile.git")
3749 (file-name (git-file-name name version))
3751 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
3752 (build-system gnu-build-system)
3754 '(#:make-flags '("CC=gcc")
3756 (modify-phases %standard-phases
3761 (invoke "make" "test")))
3763 (lambda* (#:key outputs #:allow-other-keys)
3764 (let ((out (assoc-ref outputs "out")))
3765 (install-file "libtheorafile.so" (string-append out "/lib"))
3766 (install-file "theorafile.h" (string-append out "/include")))
3771 (home-page "https://github.com/FNA-XNA/Theorafile")
3772 (synopsis "Ogg Theora Video Decoder Library")
3773 (description "Theorafile is a library for quickly and easily decoding Ogg
3774 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
3775 (license license:zlib))))
3777 (define-public dvdbackup
3784 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
3785 "dvdbackup-" version "/"
3786 "dvdbackup-" version ".tar.xz"))
3788 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
3789 (build-system gnu-build-system)
3791 `(("libdvdcss" ,libdvdcss)
3792 ("libdvdread" ,libdvdread)))
3793 (home-page "http://dvdbackup.sourceforge.net")
3794 (synopsis "DVD video ripper")
3796 "A simple command line tool to backup video from a DVD. Decrypts the
3797 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
3798 transcode or reformat the videos in any way, producing perfect backups.")
3799 (license license:gpl3+)))