1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
15 ;;; Copyright © 2016, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
16 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
18 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
22 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
23 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
24 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018, 2019 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018, 2019 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
30 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
31 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
32 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
34 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
35 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
36 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
37 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
38 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
39 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
41 ;;; This file is part of GNU Guix.
43 ;;; GNU Guix is free software; you can redistribute it and/or modify it
44 ;;; under the terms of the GNU General Public License as published by
45 ;;; the Free Software Foundation; either version 3 of the License, or (at
46 ;;; your option) any later version.
48 ;;; GNU Guix is distributed in the hope that it will be useful, but
49 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
50 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
51 ;;; GNU General Public License for more details.
53 ;;; You should have received a copy of the GNU General Public License
54 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
56 (define-module (gnu packages video)
57 #:use-module (ice-9 match)
58 #:use-module (srfi srfi-1)
59 #:use-module (srfi srfi-26)
60 #:use-module ((guix licenses) #:prefix license:)
61 #:use-module (guix utils)
62 #:use-module (guix packages)
63 #:use-module (guix download)
64 #:use-module (guix git-download)
65 #:use-module (guix svn-download)
66 #:use-module (guix build-system cmake)
67 #:use-module (guix build-system gnu)
68 #:use-module (guix build-system glib-or-gtk)
69 #:use-module (guix build-system meson)
70 #:use-module (guix build-system perl)
71 #:use-module (guix build-system python)
72 #:use-module (guix build-system waf)
73 #:use-module (guix build-system trivial)
74 #:use-module (gnu packages)
75 #:use-module (gnu packages algebra)
76 #:use-module (gnu packages assembly)
77 #:use-module (gnu packages audio)
78 #:use-module (gnu packages autotools)
79 #:use-module (gnu packages avahi)
80 #:use-module (gnu packages backup)
81 #:use-module (gnu packages base)
82 #:use-module (gnu packages bison)
83 #:use-module (gnu packages boost)
84 #:use-module (gnu packages cdrom)
85 #:use-module (gnu packages check)
86 #:use-module (gnu packages cmake)
87 #:use-module (gnu packages compression)
88 #:use-module (gnu packages cpp)
89 #:use-module (gnu packages curl)
90 #:use-module (gnu packages dejagnu)
91 #:use-module (gnu packages dns)
92 #:use-module (gnu packages docbook)
93 #:use-module (gnu packages documentation)
94 #:use-module (gnu packages elf)
95 #:use-module (gnu packages file)
96 #:use-module (gnu packages flex)
97 #:use-module (gnu packages fonts)
98 #:use-module (gnu packages fontutils)
99 #:use-module (gnu packages freedesktop)
100 #:use-module (gnu packages fribidi)
101 #:use-module (gnu packages gettext)
102 #:use-module (gnu packages ghostscript)
103 #:use-module (gnu packages gl)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages guile)
106 #:use-module (gnu packages gnome)
107 #:use-module (gnu packages gnunet)
108 #:use-module (gnu packages gnupg)
109 #:use-module (gnu packages gstreamer)
110 #:use-module (gnu packages gtk)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages iso-codes)
114 #:use-module (gnu packages libidn)
115 #:use-module (gnu packages libreoffice)
116 #:use-module (gnu packages linux)
117 #:use-module (gnu packages lua)
118 #:use-module (gnu packages m4)
119 #:use-module (gnu packages man)
120 #:use-module (gnu packages markup)
121 #:use-module (gnu packages mp3)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages networking)
124 #:use-module (gnu packages ocr)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages popt)
128 #:use-module (gnu packages pretty-print)
129 #:use-module (gnu packages protobuf)
130 #:use-module (gnu packages pulseaudio)
131 #:use-module (gnu packages python)
132 #:use-module (gnu packages python-crypto)
133 #:use-module (gnu packages python-web)
134 #:use-module (gnu packages python-xyz)
135 #:use-module (gnu packages qt)
136 #:use-module (gnu packages rdesktop)
137 #:use-module (gnu packages ruby)
138 #:use-module (gnu packages samba)
139 #:use-module (gnu packages sdl)
140 #:use-module (gnu packages serialization)
141 #:use-module (gnu packages shells)
142 #:use-module (gnu packages sqlite)
143 #:use-module (gnu packages ssh)
144 #:use-module (gnu packages swig)
145 #:use-module (gnu packages texinfo)
146 #:use-module (gnu packages textutils)
147 #:use-module (gnu packages tls)
148 #:use-module (gnu packages time)
149 #:use-module (gnu packages upnp)
150 #:use-module (gnu packages version-control)
151 #:use-module (gnu packages vulkan)
152 #:use-module (gnu packages web)
153 #:use-module (gnu packages webkit)
154 #:use-module (gnu packages wxwidgets)
155 #:use-module (gnu packages xdisorg)
156 #:use-module (gnu packages xiph)
157 #:use-module (gnu packages xml)
158 #:use-module (gnu packages xorg))
166 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
167 version "/" name "-" version ".tar.gz"))
170 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
171 (build-system gnu-build-system)
173 `(("makeinfo" ,texinfo)))
175 `(("ncurses" ,ncurses)))
178 (modify-phases %standard-phases
180 (lambda* (#:key build inputs outputs #:allow-other-keys)
181 ;; This old `configure' script doesn't support
182 ;; variables passed as arguments.
183 (let ((out (assoc-ref outputs "out"))
184 (ncurses (assoc-ref inputs "ncurses")))
185 (setenv "CONFIG_SHELL" (which "bash"))
186 (invoke "./configure"
187 (string-append "--prefix=" out)
188 (string-append "--build=" build)
189 ;; The ancient config.guess is unable to
190 ;; guess the host triplet on mips64el.
191 ,@(if (string=? "mips64el-linux"
193 '("--host=mips64el-unknown-linux-gnu")
195 ;; The same is also true with aarch64.
196 ,@(if (string=? "aarch64-linux"
198 '("--host=aarch64-unknown-linux-gnu")
200 (string-append "--with-ncurses="
202 (home-page "http://aa-project.sourceforge.net/aalib/")
203 (synopsis "ASCII-art library")
205 "AA-lib is a low level gfx library which does not require graphics device.
206 In fact, there is no graphical output possible. AA-lib replaces those
207 old-fashioned output methods with powerful ascii-art renderer.")
208 (license license:lgpl2.0+)))
210 (define-public celluloid
217 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
218 "/download/v" version "/celluloid-" version ".tar.xz"))
220 (base32 "0gmscx9zb8ppfjlnmgbcmhknhawa05sdhxi7dv5wjapjq0glq481"))))
221 (build-system glib-or-gtk-build-system)
223 `(("intltool" ,intltool)
224 ("pkg-config" ,pkg-config)))
227 ("libepoxy" ,libepoxy)
229 (home-page "https://github.com/celluloid-player/celluloid")
230 (synopsis "GTK+ frontend for the mpv media player")
231 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
232 It interacts with mpv via the client API exported by libmpv, allowing access to
233 mpv's powerful playback capabilities.")
234 (license license:gpl3+)))
236 (define-public liba52
243 ;; A mirror://sourceforge URI doesn't work, presumably
244 ;; because the SourceForge project is misconfigured.
245 "http://liba52.sourceforge.net/files/a52dec-" version
249 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
250 (patches (search-patches "liba52-enable-pic.patch"
251 "liba52-set-soname.patch"
252 "liba52-use-mtune-not-mcpu.patch"
253 "liba52-link-with-libm.patch"))))
254 (build-system gnu-build-system)
255 ;; XXX We need to run ./bootstrap because of the build system fixes above.
257 `(("autoconf" ,autoconf)
258 ("automake" ,automake)
259 ("libtool" ,libtool)))
260 (arguments `(#:configure-flags '("--enable-shared")
262 (modify-phases %standard-phases
263 ;; XXX We need to run ./bootstrap because of the build
264 ;; system fixes above.
266 (lambda _ (invoke "sh" "bootstrap"))))))
267 (home-page "http://liba52.sourceforge.net/")
268 (synopsis "ATSC A/52 stream decoder")
269 (description "liba52 is a library for decoding ATSC A/52 streams. The
270 A/52 standard is used in a variety of applications, including digital
271 television and DVD. It is also known as AC-3.")
272 (license license:gpl2+)))
274 (define-public libaom
277 (version "1.0.0-errata1-avif")
281 (url "https://aomedia.googlesource.com/aom/")
282 (commit (string-append "v" version))))
283 (file-name (git-file-name name version))
286 "169yfgh7zigc21h71qclfyr7s4wwp2i9vbr4z6pkabypvass4v7m"))))
287 (build-system cmake-build-system)
290 ("pkg-config" ,pkg-config)
291 ("python" ,python))) ; to detect the version
293 `(#:tests? #f ;no check target
295 ;; build dynamic library
296 (list "-DBUILD_SHARED_LIBS=YES"
298 "-DAOM_TARGET_CPU=generic"
299 (string-append "-DCMAKE_INSTALL_PREFIX="
300 (assoc-ref %outputs "out")))))
301 (home-page "https://aomedia.googlesource.com/aom/")
302 (synopsis "AV1 video codec")
303 (description "Libaom is the reference implementation of AV1. It includes a
304 shared library and encoder and decoder command-line executables.")
305 (license license:bsd-2)))
307 (define-public libmpeg2
313 ;; A mirror://sourceforge URI doesn't work, presumably
314 ;; because the SourceForge project is misconfigured.
315 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
316 name "-" version ".tar.gz"))
317 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
318 "libmpeg2-global-symbol-test.patch"))
321 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
329 (build-system gnu-build-system)
330 (home-page "http://libmpeg2.sourceforge.net/")
331 (synopsis "MPEG1 and MPEG2 video decoder library")
333 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
334 (license license:gpl2+)))
336 (define-public libx264
337 ;; There are no tags in the repository, so we take the version number from
338 ;; the X264_BUILD variable defined in x264.h.
339 (let ((version "159")
340 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
344 (version (git-version version revision commit))
348 (url "https://code.videolan.org/videolan/x264.git")
350 (file-name (git-file-name name version))
353 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
354 (build-system gnu-build-system)
356 `(("pkg-config" ,pkg-config)
358 ;; TODO: Add gpac input
360 `(#:tests? #f ;no check target
361 #:configure-flags '("--enable-shared"
362 ;; Don't build the command-line program. If we
363 ;; want it later, we should do so in a different
364 ;; package to avoid a circular dependency (the x264
365 ;; program depends on ffmpeg and ffmpeg depends on
369 ;; On MIPS, we must pass "--disable-asm" or else
370 ;; configure fails after printing: "You specified a
371 ;; pre-MSA CPU in your CFLAGS. If you really want
372 ;; to run on such a CPU, configure with
374 ,@(if (string-prefix? "mips"
375 (or (%current-target-system)
379 (home-page "https://www.videolan.org/developers/x264.html")
380 (synopsis "H.264 video coding library")
381 (description "libx264 is an advanced encoding library for creating
382 H.264 (MPEG-4 AVC) video streams.")
383 (license (list license:gpl2+ ;most files
384 license:isc ;common/x86/x86inc.asm
385 license:lgpl2.1+ ;extras/getopt.c
386 license:bsd-3 ;extras/inttypes.h
387 (license:non-copyleft ;extras/cl*.h
389 "See extras/cl.h in the distribution."))))))
391 (define-public mkvtoolnix
398 (uri (string-append "https://mkvtoolnix.download/sources/"
399 "mkvtoolnix-" version ".tar.xz"))
401 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
402 (modules '((guix build utils)))
404 ;; Delete bundled libraries.
405 (for-each delete-file-recursively
413 (build-system gnu-build-system)
414 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
423 ("libmatroska" ,libmatroska)
425 ("libvorbis" ,libvorbis)
429 ("qtmultimedia" ,qtmultimedia)
433 `(("docbook-xsl" ,docbook-xsl)
434 ("gettext" ,gettext-minimal)
435 ("googletest" ,googletest)
437 ("json-modern-cxx" ,json-modern-cxx)
439 ("pkg-config" ,pkg-config)
445 (list (string-append "--with-boost="
446 (assoc-ref %build-inputs "boost"))
447 (string-append "--with-docbook-xsl-root="
448 (assoc-ref %build-inputs "docbook-xsl")
449 "/xml/xsl/docbook-xsl-"
450 ,(package-version docbook-xsl))
451 "--enable-update-check=no"
452 "--enable-precompiled-headers=no")
454 (modify-phases %standard-phases
455 (add-after 'unpack 'patch-relative-file-names
456 (lambda* (#:key outputs #:allow-other-keys)
457 (let ((out (assoc-ref outputs "out")))
458 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
460 (string-append out "/bin/" match)))
462 (add-before 'configure 'add-googletest
463 (lambda* (#:key inputs #:allow-other-keys)
465 (string-append (assoc-ref inputs "googletest")
466 "/include/gtest") "lib/gtest")
470 (let ((-j (list "-j" (number->string (parallel-job-count)))))
471 (apply invoke "rake" -j))))
474 (invoke "rake" "tests/unit")))
477 (invoke "rake" "install")))
478 (add-after 'install 'post-install
479 (lambda* (#:key outputs #:allow-other-keys)
480 ;; Move the Qt interface to "gui".
481 (let* ((out (assoc-ref outputs "out"))
482 (gui (assoc-ref outputs "gui"))
483 (strip-store-dir (lambda (path)
484 (substring path (string-prefix-length out path)))))
487 (mkdir-p (string-append gui (dirname file)))
488 (rename-file (string-append out file)
489 (string-append gui file)))
490 (append '("/bin/mkvtoolnix-gui"
491 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
492 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
493 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
494 (map strip-store-dir (find-files out "\\.ogg$"))
495 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
496 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
499 (delete-file-recursively (string-append out file)))
500 '("/share/applications"
503 "/share/mkvtoolnix")))
505 (home-page "https://mkvtoolnix.download")
506 (synopsis "Tools to create, alter and inspect Matroska files")
508 "MKVToolNix provides tools for getting information about Matroska files
509 (@command{mkvinfo}), extracting tracks/data from Matroska files
510 (@command{mkvextract}), and creating Matroska files from other media files
511 (@command{mkvmerge}).")
512 (license license:gpl2)))
518 (outputs '("out" "static"))
522 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
523 "/downloads/x265_" version ".tar.gz")
524 (string-append "https://download.videolan.org/videolan/x265/"
525 "x265_" version ".tar.gz")))
527 (base32 "1k5vijsy6cgcghw69f5275xfmbjjx7js0nlbgxbd6krnjb7sv6zv"))
528 (patches (search-patches "x265-arm-flags.patch"))
529 (modules '((guix build utils)))
531 (delete-file-recursively "source/compat/getopt")
533 (build-system cmake-build-system)
535 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
537 ;; Ensure position independent code for everyone.
538 (list "-DENABLE_PIC=TRUE"
539 ,@(if (string-prefix? "armhf" (or (%current-system)
540 (%current-target-system)))
541 '("-DENABLE_ASSEMBLY=OFF")
543 (string-append "-DCMAKE_INSTALL_PREFIX="
544 (assoc-ref %outputs "out")))
546 (modify-phases %standard-phases
547 (add-after 'unpack 'prepare-build
549 (delete-file-recursively "build")
551 ;; recognize armv8 in 32-bit mode as ARM
552 (substitute* "CMakeLists.txt"
553 (("armv6l") "armv8l"))
555 (add-before 'configure 'build-12-bit
556 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
557 (mkdir "../build-12bit")
558 (with-directory-excursion "../build-12bit"
561 "-DHIGH_BIT_DEPTH=ON"
566 (substitute* (cons "cmake_install.cmake"
568 (find-files "CMakeFiles/x265-shared.dir" ".")
569 (find-files "CMakeFiles/x265-static.dir" ".")))
570 (("libx265") "libx265_main12"))
572 (add-before 'configure 'build-10-bit
573 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
574 (mkdir "../build-10bit")
575 (with-directory-excursion "../build-10bit"
578 "-DHIGH_BIT_DEPTH=ON"
582 (substitute* (cons "cmake_install.cmake"
584 (find-files "CMakeFiles/x265-shared.dir" ".")
585 (find-files "CMakeFiles/x265-static.dir" ".")))
586 (("libx265") "libx265_main10"))
588 (add-after 'install 'install-more-libs
590 (with-directory-excursion "../build-12bit"
591 (invoke "make" "install"))
592 (with-directory-excursion "../build-10bit"
593 (invoke "make" "install"))))
594 (add-before 'strip 'move-static-libs
595 (lambda* (#:key outputs #:allow-other-keys)
596 (let ((out (assoc-ref outputs "out"))
597 (static (assoc-ref outputs "static")))
598 (mkdir-p (string-append static "/lib"))
599 (with-directory-excursion
600 (string-append out "/lib")
604 (string-append static "/lib/" file)))
605 (find-files "." "\\.a$"))))
607 (home-page "http://x265.org/")
608 (synopsis "Library for encoding h.265/HEVC video streams")
609 (description "x265 is a H.265 / HEVC video encoder application library,
610 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
611 (license license:gpl2+)))
613 (define-public libass
620 "https://github.com/libass/libass/releases/download/"
621 version "/libass-" version ".tar.xz"))
624 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
625 (build-system gnu-build-system)
627 `(("pkg-config" ,pkg-config)
630 `(("freetype" ,freetype)
632 ("fontconfig" ,fontconfig)
633 ("harfbuzz" ,harfbuzz)
635 (home-page "https://github.com/libass/libass")
636 (synopsis "Subtitle rendering library for the ASS/SSA format")
637 (description "libass is a subtitle rendering library for the
638 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
639 (license license:isc)))
641 (define-public libcaca
644 (version "0.99.beta19")
647 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
651 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
652 (build-system gnu-build-system)
653 (native-inputs `(("pkg-config" ,pkg-config)))
655 `(("freeglut" ,freeglut)
662 (home-page "http://caca.zoy.org/wiki/libcaca")
663 (synopsis "Colour ASCII-art library")
664 (description "libcaca is a graphics library that outputs text instead of
665 pixels, so that it can work on older video cards or text terminals. It
666 supports Unicode, 2048 colors, dithering of color images, and advanced text
668 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
670 (define-public libdca
677 "https://download.videolan.org/pub/videolan/libdca/"
678 version "/libdca-" version ".tar.bz2"))
681 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
682 (build-system gnu-build-system)
683 (home-page "https://www.videolan.org/developers/libdca.html")
684 (synopsis "DTS Coherent Acoustics decoder")
685 (description "libdca is a library for decoding DTS Coherent Acoustics
687 (license license:gpl2+)))
696 "mirror://sourceforge/libdv/libdv/"
697 version "/libdv-" version ".tar.gz"))
700 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
701 (build-system gnu-build-system)
702 (native-inputs `(("pkg-config" ,pkg-config)))
703 (inputs `(("libxv" ,libxv)))
704 (home-page "http://libdv.sourceforge.net/")
705 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
706 (description "The Quasar DV codec (libdv) is a software codec for DV
707 video, the encoding format used by most digital camcorders, typically those
708 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
709 developed according to the official standards for DV video: IEC 61834 and
711 (license license:lgpl2.1+)))
713 (define-public libmatroska
720 (uri (string-append "https://dl.matroska.org/downloads/"
721 "libmatroska/libmatroska-" version ".tar.xz"))
723 (base32 "0qn9lfs0877wbv581yxw2gywxywxpvwslc5q07q4f7bqpyzxxiha"))))
724 (build-system cmake-build-system)
726 `(("libebml" ,libebml)))
729 (list "-DBUILD_SHARED_LIBS=YES")
730 #:tests? #f)) ; no test suite
731 (home-page "https://www.matroska.org")
732 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
734 "Matroska aims to become the standard of multimedia container formats.
735 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
736 of XML. EBML enables the Matroska Development Team to gain significant
737 advantages in terms of future format extensibility, without breaking file
738 support in old parsers.
739 libebml is a C++ library to read and write EBML files.")
740 (license license:lgpl2.1)))
750 ;; Newer releases are only available on GitHub.
751 (string-append "https://github.com/01org/libva/releases/download/"
752 version "/libva-" version ".tar.bz2")
753 ;; Keep the old URL around for compatibility.
754 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
755 "libva/libva-" version "/libva-" version ".tar.bz2")))
757 (base32 "19df3r02k1p4cbyvifkdjyc8q7hi23f5b3x3390z52l25mjfnmvc"))))
758 (build-system gnu-build-system)
760 `(("pkg-config" ,pkg-config)))
765 ("libxfixes" ,libxfixes)
767 ("wayland" ,wayland)))
770 (modify-phases %standard-phases
772 'build 'fix-dlopen-paths
773 (lambda* (#:key outputs #:allow-other-keys)
774 (let ((out (assoc-ref outputs "out")))
775 (substitute* "va/drm/va_drm_auth_x11.c"
776 (("\"libva-x11\\.so\\.%d\"")
777 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
779 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
780 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
782 (list (string-append "--with-drivers-path="
783 (assoc-ref %build-inputs "mesa") "/lib/dri"))
784 ;; However, we can't write to mesa's store directory, so override the
785 ;; following make variable to install the dummy driver to libva's
786 ;; $prefix/lib/dri directory.
788 (list (string-append "dummy_drv_video_ladir="
789 (assoc-ref %outputs "out") "/lib/dri"))))
790 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
791 (synopsis "Video acceleration library")
792 (description "The main motivation for VA-API (Video Acceleration API) is
793 to enable hardware accelerated video decode/encode at various
794 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
795 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
796 (license license:expat)))
798 (define-public libva-utils
805 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
806 version "/libva-utils-" version ".tar.bz2"))
808 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
809 (build-system gnu-build-system)
812 (list "--enable-wayland"
815 `(("pkg-config" ,pkg-config)))
821 ("wayland" ,wayland)))
822 (home-page "https://01.org/linuxmedia/vaapi")
823 (synopsis "Collection of testing utilities for VA-API")
825 "This is a collection of utilities to query and test the @acronym{VA-API,
826 Video Acceleration API} implemented by the libva library.
828 These tools require a supported graphics chip, driver, and VA-API back end to
830 (license license:expat)))
832 (define-public ffmpeg
838 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
842 "176jn1lcdf0gk7sa5l2mv0faqp5dsqdhx1gqcrgymqhfmdal4xfb"))))
843 (build-system gnu-build-system)
846 ("fontconfig" ,fontconfig)
847 ("freetype" ,freetype)
848 ("frei0r-plugins" ,frei0r-plugins)
855 ("libbluray" ,libbluray)
857 ("libcdio-paranoia" ,libcdio-paranoia)
859 ("libtheora" ,libtheora)
861 ("libvdpau" ,libvdpau)
862 ("libvorbis" ,libvorbis)
868 ("pulseaudio" ,pulseaudio)
880 ("pkg-config" ,pkg-config)
882 ("python" ,python-2) ; scripts use interpreter python2
886 `(#:test-target "fate"
888 ;; possible additional inputs:
889 ;; --enable-avisynth enable reading of AviSynth script
891 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
892 ;; --enable-libcelt enable CELT decoding via libcelt [no]
893 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
894 ;; and libraw1394 [no]
895 ;; --enable-libfaac enable AAC encoding via libfaac [no]
896 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
897 ;; --enable-libflite enable flite (voice synthesis) support via
899 ;; --enable-libgme enable Game Music Emu via libgme [no]
900 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
901 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
902 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
903 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
904 ;; --enable-libnut enable NUT (de)muxing via libnut,
905 ;; native (de)muxer exists [no]
906 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
907 ;; libopencore-amrnb [no]
908 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
909 ;; libopencore-amrwb [no]
910 ;; --enable-libopencv enable video filtering via libopencv [no]
911 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
913 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
914 ;; --enable-libschroedinger enable Dirac de/encoding via
915 ;; libschroedinger [no]
916 ;; --enable-libshine enable fixed-point MP3 encoding via
918 ;; --enable-libssh enable SFTP protocol via libssh [no]
919 ;; (libssh2 does not work)
920 ;; --enable-libstagefright-h264 enable H.264 decoding via
921 ;; libstagefright [no]
922 ;; --enable-libutvideo enable Ut Video encoding and decoding via
924 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
925 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
926 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
927 ;; libvo-amrwbenc [no]
928 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
929 ;; --enable-libxavs enable AVS encoding via xavs [no]
930 ;; --enable-libzmq enable message passing via libzmq [no]
931 ;; --enable-libzvbi enable teletext support via libzvbi [no]
932 ;; --enable-opencl enable OpenCL code
933 '("--enable-avresample"
934 "--enable-gpl" ; enable optional gpl licensed parts
937 "--enable-fontconfig"
946 "--enable-libfreetype"
947 "--enable-libmp3lame"
953 "--enable-libtwolame"
954 "--enable-libvidstab"
964 "--enable-runtime-cpudetect"
966 ;; The HTML pages take 7.2 MiB
967 "--disable-htmlpages"
969 ;; The static libraries are 23 MiB
972 ;; Runtime cpu detection is not implemented on
973 ;; MIPS, so we disable some features.
976 "--disable-mipsdspr2"
979 (modify-phases %standard-phases
982 ;; configure does not work followed by "SHELL=..." and
983 ;; "CONFIG_SHELL=..."; set environment variables instead
984 (lambda* (#:key outputs configure-flags #:allow-other-keys)
985 (let ((out (assoc-ref outputs "out")))
986 (substitute* "configure"
987 (("#! /bin/sh") (string-append "#!" (which "sh"))))
988 (setenv "SHELL" (which "bash"))
989 (setenv "CONFIG_SHELL" (which "bash"))
992 (string-append "--prefix=" out)
993 ;; Add $libdir to the RUNPATH of all the binaries.
994 (string-append "--extra-ldflags=-Wl,-rpath="
998 'check 'set-ld-library-path
1000 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1002 (let* ((dso (find-files "." "\\.so$"))
1003 (path (string-join (map dirname dso) ":")))
1004 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1005 (setenv "LD_LIBRARY_PATH" path)
1007 (home-page "https://www.ffmpeg.org/")
1008 (synopsis "Audio and video framework")
1009 (description "FFmpeg is a complete, cross-platform solution to record,
1010 convert and stream audio and video. It includes the libavcodec
1011 audio/video codec library.")
1012 (license license:gpl2+)))
1014 (define-public ffmpeg-3.4
1020 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1024 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1026 (substitute-keyword-arguments (package-arguments ffmpeg)
1027 ((#:configure-flags flags)
1028 `(delete "--enable-libdav1d" (delete "--enable-libaom"
1030 (inputs (alist-delete "dav1d" (alist-delete "libaom"
1031 (package-inputs ffmpeg))))))
1033 (define-public ffmpeg-for-stepmania
1042 (url "https://github.com/stepmania/ffmpeg.git")
1043 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1045 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1046 (file-name (git-file-name "ffmpeg" version))))
1048 (substitute-keyword-arguments (package-arguments ffmpeg)
1049 ((#:configure-flags flags)
1050 '(list "--disable-programs"
1053 "--disable-avdevice"
1054 "--disable-swresample"
1055 "--disable-postproc"
1056 "--disable-avfilter"
1058 "--enable-static"))))
1061 (define-public ffmpegthumbnailer
1063 (name "ffmpegthumbnailer")
1068 (url "https://github.com/dirkvdb/ffmpegthumbnailer.git")
1070 (file-name (git-file-name name version))
1073 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1074 (build-system cmake-build-system)
1076 `(("pkg-config" ,pkg-config)))
1078 `(("ffmpeg" ,ffmpeg)
1079 ("libjpeg-turbo" ,libjpeg-turbo)
1083 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1084 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1085 (synopsis "Create thumbnails from video files")
1086 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1087 can be used by file managers to create thumbnails for your video files. The
1088 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1089 videoformats depend on the configuration flags of ffmpeg.")
1090 (license license:gpl2+)))
1099 "https://download.videolan.org/pub/videolan/vlc/"
1100 (car (string-split version #\-))
1101 "/vlc-" version ".tar.xz"))
1104 "1xmxjpyzdhabchwncz6lvx3kzvl7fz9c42bkv3nbj68albs9w570"))
1107 ;; TODO: The test "libvlc_slaves" fails. Applied upstream as
1108 ;; <https://git.videolan.org/?p=vlc.git;a=commit;h=4186c94104ee528abd6860611b49515f3e6ec644>.
1109 ;; Try removing it in 3.0.9.
1110 "vlc-fix-test_libvlc_slaves.patch"))))
1111 (build-system gnu-build-system)
1115 ("gettext" ,gettext-minimal)
1116 ("git" ,git) ; needed for a test
1117 ("pkg-config" ,pkg-config)))
1118 ;; FIXME: Add optional inputs once available.
1120 `(("alsa-lib" ,alsa-lib)
1126 ("fontconfig" ,fontconfig)
1127 ("freetype" ,freetype)
1128 ("fribidi" ,fribidi)
1131 ("libarchive" ,libarchive)
1133 ("libavc1394" ,libavc1394)
1134 ("libbluray" ,libbluray)
1135 ("libcaca" ,libcaca)
1136 ("libcddb" ,libcddb)
1138 ("libdvbpsi" ,libdvbpsi)
1139 ("libdvdnav" ,libdvdnav)
1140 ("libdvdread" ,libdvdread)
1141 ("libebml" ,libebml)
1142 ("libgcrypt" ,libgcrypt)
1144 ("libkate" ,libkate)
1146 ("libmatroska" ,libmatroska)
1147 ("libmicrodns" ,libmicrodns)
1148 ("libmodplug" ,libmodplug)
1149 ("libmpeg2" ,libmpeg2)
1152 ("libraw1394" ,libraw1394)
1153 ("librsvg" ,librsvg)
1154 ("libsamplerate" ,libsamplerate)
1155 ("libsecret" ,libsecret)
1156 ("libssh2" ,libssh2)
1157 ("libupnp" ,libupnp)
1159 ("libvdpau" ,libvdpau)
1160 ("libvorbis" ,libvorbis)
1162 ("libtheora" ,libtheora)
1163 ("libx264" ,libx264)
1164 ("libxext" ,libxext)
1166 ("libxinerama" ,libxinerama)
1167 ("libxml2" ,libxml2)
1169 ("livemedia-utils" ,livemedia-utils)
1174 ("pulseaudio" ,pulseaudio)
1175 ("protobuf" ,protobuf)
1176 ("python" ,python-wrapper)
1179 ("qtx11extras" ,qtx11extras)
1182 ("sdl-image" ,sdl-image)
1184 ("speexdsp" ,speexdsp)
1186 ("twolame" ,twolame)
1188 ("wayland" ,wayland)
1189 ("wayland-protocols" ,wayland-protocols)
1191 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1195 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1196 (assoc-ref %build-inputs "ffmpeg")
1197 "/lib")) ;needed for the tests
1200 (modify-phases %standard-phases
1201 (add-after 'unpack 'patch-source
1202 (lambda* (#:key inputs #:allow-other-keys)
1203 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1204 (substitute* "configure"
1205 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1206 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1207 ;; Some of the tests require using the display to test out VLC,
1208 ;; which fails in our sandboxed build system
1209 (substitute* "test/run_vlc.sh"
1210 (("./vlc --ignore-config") "echo"))
1212 ;; modules/text_renderer/freetype/text_layout.c uses a
1213 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1214 ;; from fribidi.h, so for now we enable the use of deprecated
1215 ;; fribidi interfaces from this file.
1216 ;; FIXME: Try removing this for vlc >= 3.0.3.
1217 (substitute* "modules/text_renderer/freetype/text_layout.c"
1218 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1220 ;; Fix build with libssh2 > 1.8.0:
1221 ;; <https://trac.videolan.org/vlc/ticket/22060>
1222 ;; <https://git.videolan.org/?p=vlc.git;a=commit;h=11449b5cd8b415768e010d9b7c1d6ba3cea21f82>
1223 (substitute* "modules/access/sftp.c"
1224 (("010801") "010900"))
1226 (add-after 'strip 'regenerate-plugin-cache
1227 (lambda* (#:key outputs #:allow-other-keys)
1228 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1229 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1230 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1231 ;; it references. Thus, we first reset the timestamps of all
1232 ;; these files, and then regenerate the cache such that the
1233 ;; mtimes it includes are always zero instead of being dependent
1234 ;; on the build time.
1235 (let* ((out (assoc-ref outputs "out"))
1236 (pkglibdir (string-append out "/lib/vlc"))
1237 (plugindir (string-append pkglibdir "/plugins"))
1238 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1239 ;; TODO: Factorize 'reset-timestamps'.
1240 (for-each (lambda (file)
1241 (let ((s (lstat file)))
1242 (unless (eq? (stat:type s) 'symlink)
1244 (find-files plugindir))
1245 (invoke cachegen plugindir))))
1246 (add-after 'install 'wrap-executable
1247 (lambda* (#:key outputs #:allow-other-keys)
1248 (let ((out (assoc-ref outputs "out"))
1249 (plugin-path (getenv "QT_PLUGIN_PATH")))
1250 (wrap-program (string-append out "/bin/vlc")
1251 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1253 (home-page "https://www.videolan.org/")
1254 (synopsis "Audio and video framework")
1255 (description "VLC is a cross-platform multimedia player and framework
1256 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1257 streaming protocols.")
1258 (license license:gpl2+)))
1260 (define-public mplayer
1267 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1271 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
1272 (build-system gnu-build-system)
1273 ;; FIXME: Add additional inputs once available.
1275 `(("pkg-config" ,pkg-config)
1278 `(("alsa-lib" ,alsa-lib)
1279 ("cdparanoia" ,cdparanoia)
1281 ("fontconfig" ,fontconfig)
1282 ("freetype" ,freetype)
1286 ("libdvdcss" ,libdvdcss)
1287 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1288 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
1289 ("libjpeg" ,libjpeg-turbo)
1290 ("libmpeg2" ,libmpeg2)
1291 ("libmpg123" ,mpg123) ; audio codec for MP3
1293 ("libtheora" ,libtheora)
1294 ("libvdpau" ,libvdpau)
1295 ("libvorbis" ,libvorbis)
1297 ("libx264" ,libx264)
1298 ("libxinerama" ,libxinerama)
1300 ("libxxf86dga" ,libxxf86dga)
1304 ("pulseaudio" ,pulseaudio)
1305 ("python" ,python-wrapper)
1310 `(#:tests? #f ; no test target
1312 (modify-phases %standard-phases
1314 ;; configure does not work followed by "SHELL=..." and
1315 ;; "CONFIG_SHELL=..."; set environment variables instead
1316 (lambda* (#:key inputs outputs #:allow-other-keys)
1317 (let ((out (assoc-ref outputs "out"))
1318 (libx11 (assoc-ref inputs "libx11")))
1319 (substitute* "configure"
1320 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1321 (setenv "SHELL" (which "bash"))
1322 (setenv "CONFIG_SHELL" (which "bash"))
1323 (invoke "./configure"
1324 (string-append "--extra-cflags=-I"
1325 libx11 "/include") ; to detect libx11
1326 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1327 (string-append "--prefix=" out)
1328 ;; Enable runtime cpu detection where supported,
1329 ;; and choose a suitable target.
1330 ,@(match (or (%current-target-system)
1333 '("--enable-runtime-cpudetection"
1334 "--target=x86_64-linux"))
1336 '("--enable-runtime-cpudetection"
1337 "--target=i686-linux"))
1339 '("--target=mips3-linux"))
1340 (_ (list (string-append
1342 (or (%current-target-system)
1343 (nix-system->gnu-triplet
1344 (%current-system)))))))
1345 "--disable-iwmmxt")))))))
1346 (home-page "https://www.mplayerhq.hu")
1347 (synopsis "Audio and video player")
1348 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1349 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1350 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1351 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1352 (license license:gpl2)))
1361 (url "https://github.com/mpv-player/mpv.git")
1362 (commit (string-append "v" version))))
1363 (file-name (git-file-name name version))
1366 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1367 (build-system waf-build-system)
1369 `(("perl" ,perl) ; for zsh completion file
1370 ("pkg-config" ,pkg-config)
1371 ("python-docutils" ,python-docutils)))
1372 ;; Missing features: libguess, V4L2
1374 `(("alsa-lib" ,alsa-lib)
1381 ("libbluray" ,libbluray)
1382 ("libcaca" ,libcaca)
1383 ("libbs2b" ,libbs2b)
1384 ("libcdio-paranoia" ,libcdio-paranoia)
1385 ("libdvdread" ,libdvdread)
1386 ("libdvdnav" ,libdvdnav)
1387 ("libjpeg" ,libjpeg-turbo)
1389 ("libvdpau" ,libvdpau)
1391 ("libxext" ,libxext)
1392 ("libxinerama" ,libxinerama)
1393 ("libxrandr" ,libxrandr)
1394 ("libxscrnsaver" ,libxscrnsaver)
1396 ;; XXX: lua > 5.2 is not currently supported; see
1397 ;; waftools/checks/custom.py
1401 ("pulseaudio" ,pulseaudio)
1403 ("shaderc" ,shaderc)
1404 ("vulkan-headers" ,vulkan-headers)
1405 ("vulkan-loader" ,vulkan-loader)
1407 ("wayland" ,wayland)
1408 ("wayland-protocols" ,wayland-protocols)
1409 ("libxkbcommon" ,libxkbcommon)
1410 ("youtube-dl" ,youtube-dl)
1414 (modify-phases %standard-phases
1416 'unpack 'patch-paths
1417 (lambda* (#:key inputs #:allow-other-keys)
1418 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1419 (substitute* "player/lua/ytdl_hook.lua"
1420 (("\"youtube-dl\",")
1421 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1424 'configure 'setup-waf
1425 (lambda* (#:key inputs #:allow-other-keys)
1426 (let ((waf (assoc-ref inputs "waf")))
1427 (copy-file (string-append waf "/bin/waf") "waf"))
1430 #:configure-flags (list "--enable-libmpv-shared"
1433 "--disable-build-date")
1434 ;; No check function defined.
1436 (home-page "https://mpv.io/")
1437 (synopsis "Audio and video player")
1438 (description "mpv is a general-purpose audio and video player. It is a
1439 fork of mplayer2 and MPlayer. It shares some features with the former
1440 projects while introducing many more.")
1441 (license license:gpl2+)))
1443 (define-public gnome-mpv
1444 (deprecated-package "gnome-mpv" celluloid))
1446 (define-public mpv-mpris
1454 (url "https://github.com/hoyon/mpv-mpris")
1456 (file-name (git-file-name name version))
1459 "06hq3j1jjlaaz9ss5l7illxz8vm5bng86jl24kawglwkqayhdnjx"))))
1460 (build-system gnu-build-system)
1462 '(#:tests? #f ; no tests
1463 #:make-flags '("CC=gcc")
1465 (modify-phases %standard-phases
1466 (delete 'configure) ; no configure script
1468 (lambda* (#:key outputs #:allow-other-keys)
1469 (let ((out (assoc-ref outputs "out")))
1470 (install-file "mpris.so" (string-append out "/lib")))
1473 `(("pkg-config" ,pkg-config)))
1477 (home-page "https://github.com/hoyon/mpv-mpris")
1478 (synopsis "MPRIS plugin for mpv")
1479 (description "This package provides an @dfn{MPRIS} (Media Player Remote
1480 Interfacing Specification) plugin for the @code{mpv} media player. It implements
1481 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
1484 To load this plugin, specify the following option when starting mpv:
1485 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
1486 @file{$HOME/.config/mpv/scripts}.")
1487 (license license:expat)))
1489 (define-public libvpx
1494 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1497 (url "https://chromium.googlesource.com/webm/libvpx")
1498 (commit (string-append "v" version))))
1499 (file-name (git-file-name name version))
1502 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
1503 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1504 (build-system gnu-build-system)
1506 `(#:configure-flags (list "--enable-shared"
1509 ;; Limit size to avoid CVE-2015-1258
1510 "--size-limit=16384x16384"
1511 (string-append "--prefix=" (assoc-ref %outputs "out")))
1512 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1513 (assoc-ref %outputs "out") "/lib"))
1514 #:phases (modify-phases %standard-phases
1516 (lambda* (#:key configure-flags #:allow-other-keys)
1517 ;; The configure script does not understand some of the GNU
1518 ;; options, so we only add the flags specified above.
1519 (apply invoke "./configure" configure-flags))))
1520 #:tests? #f)) ; no check target
1524 (synopsis "VP8/VP9 video codec")
1525 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1526 (license license:bsd-3)
1527 (home-page "https://www.webmproject.org/")))
1529 ;; GNU IceCat fails to build against 1.8.0, so keep this version for now.
1530 (define-public libvpx-1.7
1535 (inherit (package-source libvpx))
1537 (url "https://chromium.googlesource.com/webm/libvpx")
1538 (commit (string-append "v" version))))
1539 (file-name (git-file-name "libvpx" version))
1542 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1545 (origin-patches (package-source libvpx))
1546 (search-patches "libvpx-use-after-free-in-postproc.patch")))))))
1548 (define-public youtube-dl
1551 (version "2020.03.08")
1554 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
1555 "releases/download/" version "/youtube-dl-"
1559 "1xbka14wnalcqkhibfcqw8f5bw1m9b1f44719yifv1jk0614q4bn"))))
1560 (build-system python-build-system)
1562 ;; The problem here is that the directory for the man page and completion
1563 ;; files is relative, and for some reason, setup.py uses the
1564 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1565 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1566 ;; completion file is called 'youtube-dl' rather than
1567 ;; 'youtube-dl.bash-completion'.
1568 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1569 #:phases (modify-phases %standard-phases
1570 (add-before 'install 'fix-the-data-directories
1571 (lambda* (#:key outputs #:allow-other-keys)
1572 (let ((prefix (assoc-ref outputs "out")))
1573 (mkdir "bash-completion")
1574 (rename-file "youtube-dl.bash-completion"
1575 "bash-completion/youtube-dl")
1576 (substitute* "setup.py"
1577 (("youtube-dl\\.bash-completion")
1578 "bash-completion/youtube-dl")
1580 (string-append "'" prefix "/etc/"))
1582 (string-append "'" prefix "/share/")))
1584 (synopsis "Download videos from YouTube.com and other sites")
1586 "Youtube-dl is a small command-line program to download videos from
1587 YouTube.com and many more sites.")
1588 (home-page "https://yt-dl.org")
1589 (license license:public-domain)))
1591 (define-public youtube-dl-gui
1593 (name "youtube-dl-gui")
1598 (uri (pypi-uri "Youtube-DLG" version))
1601 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1602 (build-system python-build-system)
1604 ;; In Guix, wxpython has not yet been packaged for Python 3.
1605 `(#:python ,python-2
1606 ;; This package has no tests.
1609 (modify-phases %standard-phases
1610 (add-before 'build 'patch-source
1611 (lambda* (#:key inputs #:allow-other-keys)
1612 ;; The youtube-dl-gui program lets you configure options. Some of
1613 ;; them are problematic, so we change their defaults.
1614 (substitute* "youtube_dl_gui/optionsmanager.py"
1615 ;; When this is true, the builder process will try (and fail) to
1616 ;; write logs to the builder user's home directory.
1617 (("'enable_log': True") "'enable_log': False")
1618 ;; This determines which youtube-dl program youtube-dl-gui will
1619 ;; run. If we don't set this, then youtube-dl-gui might download
1620 ;; an arbitrary copy from the Internet into the user's home
1621 ;; directory and run it, so let's make sure youtube-dl-gui uses
1622 ;; the youtube-dl from the inputs by default.
1623 (("'youtubedl_path': self.config_path")
1624 (string-append "'youtubedl_path': '"
1625 (assoc-ref inputs "youtube-dl")
1627 ;; When this is True, when youtube-dl-gui is finished downloading
1628 ;; a file, it will try (and possibly fail) to open the directory
1629 ;; containing the downloaded file. This can fail because it
1630 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1631 ;; adding xdg-utils to the propagated inputs is not enough to
1632 ;; make this work, so for now we set the default to False.
1633 (("'open_dl_dir': True") "'open_dl_dir': False"))
1634 ;; The youtube-dl program from the inputs is actually a wrapper
1635 ;; script written in bash, so attempting to invoke it as a python
1636 ;; script will fail.
1637 (substitute* "youtube_dl_gui/downloaders.py"
1638 (("cmd = \\['python', self\\.youtubedl_path\\]")
1639 "cmd = [self.youtubedl_path]"))
1640 ;; Use relative paths for installing data files so youtube-dl-gui
1641 ;; installs the files relative to its prefix in the store, rather
1642 ;; than relative to /. Also, instead of installing data files into
1643 ;; $prefix/usr/share, install them into $prefix/share for
1644 ;; consistency (see: (standards) Directory Variables).
1645 (substitute* "setup.py"
1646 (("= '/usr/share") "= 'share"))
1647 ;; Update get_locale_file() so it finds the installed localization
1649 (substitute* "youtube_dl_gui/utils.py"
1650 (("os\\.path\\.join\\('/usr', 'share'")
1651 (string-append "os.path.join('"
1652 (assoc-ref %outputs "out")
1655 (add-after 'install 'create-desktop-file
1656 (lambda* (#:key outputs #:allow-other-keys)
1657 (let* ((out (assoc-ref outputs "out"))
1658 (applications (string-append out "/share/applications")))
1659 (mkdir-p applications)
1660 (call-with-output-file
1661 (string-append applications "/youtube-dl-gui.desktop")
1666 Name=Youtube-dl GUI~@
1667 Comment=Graphical interface to download video with youtube-dl~@
1668 Exec=youtube-dl-gui~@
1669 TryExec=youtube-dl-gui~@
1671 Icon=youtube-dl-gui~@
1673 Categories=AudioVideo;Audio;Video;Network~%")))
1676 `(("python2-wxpython" ,python2-wxpython)
1677 ("youtube-dl" ,youtube-dl)))
1678 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1680 "GUI (Graphical User Interface) for @command{youtube-dl}")
1682 "Youtube-dlG is a GUI (Graphical User Interface) for
1683 @command{youtube-dl}. You can use it to download videos from YouTube and any
1684 other site that youtube-dl supports.")
1685 (license license:unlicense)))
1687 (define-public you-get
1690 (version "0.4.1403")
1694 (url "https://github.com/soimort/you-get.git")
1695 (commit (string-append "v" version))))
1696 (file-name (git-file-name name version))
1699 "04viy19x4g9dngml82nf9j94ys3p47bs62c2q2cn1barkybaa3as"))))
1700 (build-system python-build-system)
1702 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1705 (modify-phases %standard-phases
1706 (add-after 'unpack 'qualify-input-references
1707 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1708 ;; happens to be in the user's $PATH at run time.
1709 (lambda* (#:key inputs #:allow-other-keys)
1710 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1712 (substitute* "src/you_get/processor/ffmpeg.py"
1713 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1714 ;; same string is also used when sniffing ffmpeg's output.
1715 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1716 (string-append prefix "'" ffmpeg "'")))
1718 #:tests? #f)) ; XXX some tests need Internet access
1719 (synopsis "Download videos, audio, or images from Web sites")
1721 "You-Get is a command-line utility to download media contents (videos,
1722 audio, images) from the Web. It can use either mpv or vlc for playback.")
1723 (home-page "https://you-get.org/")
1724 (license license:expat)))
1726 (define-public youtube-viewer
1728 (name "youtube-viewer")
1733 (url "https://github.com/trizen/youtube-viewer.git")
1735 (file-name (git-file-name name version))
1738 "1plsm1sc04lwlg5h2gapxpykc3cpd4frjll14lamql89dm4a50vi"))))
1739 (build-system perl-build-system)
1741 `(("perl-module-build" ,perl-module-build)))
1743 `(("perl-data-dump" ,perl-data-dump)
1744 ("perl-file-sharedir" ,perl-file-sharedir)
1745 ("perl-gtk2" ,perl-gtk2)
1746 ("perl-json" ,perl-json)
1747 ("perl-libwww" ,perl-libwww)
1748 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1749 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1750 ("perl-mozilla-ca" ,perl-mozilla-ca)
1751 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1752 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1753 ("xdg-utils" ,xdg-utils)
1755 ;; Some videos play without youtube-dl, but others silently fail to.
1756 ("youtube-dl" ,youtube-dl)))
1758 `(#:modules ((guix build perl-build-system)
1761 #:module-build-flags '("--gtk")
1763 (modify-phases %standard-phases
1764 (add-after 'unpack 'refer-to-inputs
1765 (lambda* (#:key inputs #:allow-other-keys)
1766 (substitute* "lib/WWW/YoutubeViewer.pm"
1768 (format #f "'~a/bin/youtube-dl'"
1769 (assoc-ref inputs "youtube-dl"))))
1770 (substitute* '("bin/gtk2-youtube-viewer"
1771 "bin/gtk3-youtube-viewer")
1773 (format #f "'~a/bin/xdg-open'"
1774 (assoc-ref inputs "xdg-utils"))))
1776 (add-after 'install 'install-desktop
1777 (lambda* (#:key outputs #:allow-other-keys)
1778 (let* ((out (assoc-ref outputs "out"))
1779 (sharedir (string-append out "/share")))
1780 (install-file "share/gtk-youtube-viewer.desktop"
1781 (string-append sharedir "/applications"))
1782 (install-file "share/icons/gtk-youtube-viewer.png"
1783 (string-append sharedir "/pixmaps"))
1785 (add-after 'install 'wrap-program
1786 (lambda* (#:key outputs #:allow-other-keys)
1787 (let* ((out (assoc-ref outputs "out"))
1788 (bin-dir (string-append out "/bin/"))
1789 (site-dir (string-append out "/lib/perl5/site_perl/"))
1790 (lib-path (getenv "PERL5LIB")))
1791 (for-each (cut wrap-program <>
1792 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1793 (find-files bin-dir))
1796 "Lightweight application for searching and streaming videos from YouTube")
1798 "Youtube-viewer searches and plays YouTube videos in a native player.
1799 It comes with various search options; it can search for videos, playlists
1800 and/or channels. The videos are streamed directly in a selected video player
1801 at the best resolution (customizable) and with closed-captions (if available).
1802 Both command-line and GTK2 interface are available.")
1803 (home-page "https://github.com/trizen/youtube-viewer")
1804 (license license:perl-license)))
1806 (define-public libbluray
1812 (uri (string-append "https://download.videolan.org/videolan/"
1813 name "/" version "/"
1814 name "-" version ".tar.bz2"))
1817 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1818 (build-system gnu-build-system)
1820 `(#:configure-flags '("--disable-bdjava-jar")
1822 (modify-phases %standard-phases
1823 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1824 ;; Avoid the need to propagate libxml2 by referring to it
1825 ;; directly, as is already done for fontconfig & freetype.
1826 (lambda* (#:key inputs #:allow-other-keys)
1827 (let ((libxml2 (assoc-ref inputs "libxml2")))
1828 (substitute* "configure"
1829 ((" libxml-2.0") ""))
1830 (substitute* "src/libbluray.pc.in"
1831 (("^Libs.private:" field)
1832 (string-append field " -L" libxml2 "/lib -lxml2")))
1834 (add-before 'build 'fix-dlopen-paths
1835 (lambda* (#:key inputs #:allow-other-keys)
1836 (let ((libaacs (assoc-ref inputs "libaacs"))
1837 (libbdplus (assoc-ref inputs "libbdplus")))
1838 (substitute* "src/libbluray/disc/aacs.c"
1840 (string-append "\"" libaacs "/lib/libaacs\"")))
1841 (substitute* "src/libbluray/disc/bdplus.c"
1843 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1845 (native-inputs `(("pkg-config" ,pkg-config)))
1847 `(("fontconfig" ,fontconfig)
1848 ("freetype" ,freetype)
1849 ("libaacs" ,libaacs)
1850 ("libbdplus" ,libbdplus)
1851 ("libxml2" ,libxml2)))
1852 (home-page "https://www.videolan.org/developers/libbluray.html")
1853 (synopsis "Blu-Ray Disc playback library")
1855 "libbluray is a library designed for Blu-Ray Disc playback for media
1856 players, like VLC or MPlayer.")
1857 (license license:lgpl2.1+)))
1859 (define-public libdvdread
1865 (uri (string-append "https://download.videolan.org/videolan/"
1866 "libdvdread/" version "/"
1867 "libdvdread-" version ".tar.bz2"))
1870 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
1871 (build-system gnu-build-system)
1873 `(#:configure-flags '("--with-libdvdcss=yes")))
1875 `(("pkg-config" ,pkg-config)))
1877 `(("libdvdcss" ,libdvdcss)))
1878 (home-page "http://dvdnav.mplayerhq.hu/")
1879 (synopsis "Library for reading video DVDs")
1881 "Libdvdread provides a simple foundation for reading DVD video
1882 disks. It provides the functionality that is required to access many
1883 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1884 authentication and descrambling (if an external libdvdcss library is
1886 (license license:gpl2+)))
1888 (define-public dvdauthor
1895 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1899 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1900 (build-system gnu-build-system)
1902 `(("libdvdread" ,libdvdread)
1904 ("imagemagick" ,imagemagick)
1905 ("libxml2" ,libxml2)
1906 ("freetype" ,freetype)))
1908 `(("pkg-config" ,pkg-config)))
1909 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1910 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1911 MPEG-2 stream containing VOB packets.")
1912 (home-page "http://dvdauthor.sourceforge.net")
1913 (license license:gpl3+)))
1915 (define-public libdvdnav
1921 (uri (string-append "https://download.videolan.org/videolan/"
1922 "libdvdnav/" version "/"
1923 "libdvdnav-" version ".tar.bz2"))
1926 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
1927 (build-system gnu-build-system)
1929 `(("pkg-config" ,pkg-config)))
1931 `(("libdvdread" ,libdvdread)))
1932 (home-page "http://dvdnav.mplayerhq.hu/")
1933 (synopsis "Library for video DVD navigation features")
1935 "Libdvdnav is a library for developers of multimedia
1936 applications. It allows easy use of sophisticated DVD navigation features
1937 such as DVD menus, multiangle playback and even interactive DVD games. All
1938 this functionality is provided through a simple API which provides the DVD
1939 playback as a single logical stream of blocks, intermitted by special
1940 dvdnav events to report certain conditions. The main usage of libdvdnav is
1941 a loop regularly calling a function to get the next block, surrounded by
1942 additional calls to tell the library of user interaction. The whole
1943 DVD virtual machine and internal playback states are completely
1945 (license license:gpl2+)))
1947 (define-public libdvdcss
1953 (uri (string-append "https://download.videolan.org/pub/"
1954 name "/" version "/"
1955 name "-" version ".tar.bz2"))
1958 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1959 (build-system gnu-build-system)
1960 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1961 (synopsis "Library for accessing DVDs as block devices")
1963 "libdvdcss is a simple library designed for accessing DVDs like a block
1964 device without having to bother about the decryption.")
1965 (license license:gpl2+)))
1967 (define-public srt2vtt
1974 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1978 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1979 (build-system gnu-build-system)
1981 `(("guile" ,guile-2.0)))
1982 (synopsis "SubRip to WebVTT subtitle converter")
1983 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1984 for use with HTML5 video.")
1985 (home-page "https://dthompson.us/projects/srt2vtt.html")
1986 (license license:gpl3+)))
1988 (define-public avidemux
1995 "mirror://sourceforge/avidemux/avidemux/" version "/"
1996 "avidemux_" version ".tar.gz"))
1999 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
2000 (patches (search-patches "avidemux-install-to-lib.patch"))))
2001 (build-system cmake-build-system)
2004 ("pkg-config" ,pkg-config)
2005 ("python" ,python-wrapper)
2006 ("qttools" ,qttools)
2008 ;; FIXME: Once packaged, add libraries not found during the build.
2010 `(("alsa-lib" ,alsa-lib)
2011 ("fontconfig" ,fontconfig)
2012 ("freetype" ,freetype)
2013 ("fribidi" ,fribidi)
2018 ("libvdpau" ,libvdpau)
2019 ("libvorbis" ,libvorbis)
2022 ("pulseaudio" ,pulseaudio)
2027 `(#:tests? #f ; no check target
2029 ;; Make sure files inside the included ffmpeg tarball are
2031 (let ((ffmpeg "ffmpeg-4.1.4"))
2032 (modify-phases %standard-phases
2033 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2035 (with-directory-excursion "avidemux_core/ffmpeg_package"
2036 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2037 (delete-file (string-append ffmpeg ".tar.bz2")))
2039 (add-after 'patch-source-shebangs 'repack-ffmpeg
2041 (with-directory-excursion "avidemux_core/ffmpeg_package"
2042 (substitute* (string-append ffmpeg "/configure")
2043 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2044 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2045 ;; avoid non-determinism in the archive
2046 "--sort=name" "--mtime=@0"
2047 "--owner=root:0" "--group=root:0")
2048 (delete-file-recursively ffmpeg))
2052 ;; Copy-paste settings from the cmake build system.
2053 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2054 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2057 (lambda* (#:key inputs outputs #:allow-other-keys)
2058 (let* ((out (assoc-ref outputs "out"))
2059 (lib (string-append out "/lib"))
2062 (lambda* (component srcdir #:optional (args '()))
2063 (let ((builddir (string-append "build_" component)))
2065 (with-directory-excursion builddir
2066 (apply invoke "cmake"
2067 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2068 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2069 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2070 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2071 "\"-Wl,-rpath=" lib "\"")
2072 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2073 (string-append "../" srcdir)
2077 (number->string (parallel-job-count)))
2078 (invoke "make" "install"))))))
2080 (build_component "core" "avidemux_core")
2081 (build_component "cli" "avidemux/cli")
2082 (build_component "qt4" "avidemux/qt4")
2083 (build_component "plugins_common" "avidemux_plugins"
2084 '("-DPLUGIN_UI=COMMON"))
2085 (build_component "plugins_cli" "avidemux_plugins"
2086 '("-DPLUGIN_UI=CLI"))
2087 (build_component "plugins_qt4" "avidemux_plugins"
2088 '("-DPLUGIN_UI=QT4"))
2089 (build_component "plugins_settings" "avidemux_plugins"
2090 '("-DPLUGIN_UI=SETTINGS"))
2091 ;; Remove .exe and .dll file.
2092 (delete-file-recursively
2093 (string-append out "/share/ADM6_addons"))
2095 (delete 'install)))))
2096 (home-page "http://fixounet.free.fr/avidemux/")
2097 (synopsis "Video editor")
2098 (description "Avidemux is a video editor designed for simple cutting,
2099 filtering and encoding tasks. It supports many file types, including AVI,
2100 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2101 can be automated using projects, job queue and powerful scripting
2103 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2104 ;; Software with various licenses is included, see License.txt.
2105 (license license:gpl2+)))
2107 (define-public vapoursynth
2109 (name "vapoursynth")
2114 (url "https://github.com/vapoursynth/vapoursynth.git")
2115 (commit (string-append "R" version))))
2116 (file-name (git-file-name name version))
2119 "1i6163bidlp0p9zcnxpsphr44ayfzd51fig4ri7vbrbl9lw9jaih"))))
2120 (build-system gnu-build-system)
2122 `(("autoconf" ,autoconf)
2123 ("automake" ,automake)
2124 ("cython" ,python-cython)
2125 ("libtool" ,libtool)
2126 ("pkg-config" ,pkg-config)
2130 `(("ffmpeg" ,ffmpeg)
2132 ("tesseract-ocr" ,tesseract-ocr)
2134 (home-page "http://www.vapoursynth.com/")
2135 (synopsis "Video processing framework")
2136 (description "VapourSynth is a C++ library and Python module for video
2137 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2138 multithreading, generalized colorspaces, per frame properties, and videos with
2140 ;; src/core/cpufeatures only allows x86, ARM or PPC
2141 (supported-systems (fold delete %supported-systems
2142 '("mips64el-linux" "aarch64-linux")))
2143 ;; As seen from the source files.
2144 (license license:lgpl2.1+)))
2153 "http://downloads.xvid.com/downloads/xvidcore-"
2154 version ".tar.bz2"))
2157 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
2158 (build-system gnu-build-system)
2159 (native-inputs `(("yasm" ,yasm)))
2162 (modify-phases %standard-phases
2163 (add-before 'configure 'pre-configure
2165 (chdir "build/generic")
2166 (substitute* "configure"
2167 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2169 #:tests? #f)) ; no test suite
2170 (home-page "https://www.xvid.com/")
2171 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2172 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2173 codec library. It uses ASP features such as b-frames, global and quarter
2174 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2175 and custom quantization matrices.")
2176 (license license:gpl2+)))
2178 (define-public streamlink
2185 (uri (pypi-uri "streamlink" version))
2188 "0cnlg3ra3g6dml4xfy9ysy9b4qwyn458fadd8ac44cfwi3v4gq6y"))))
2189 (build-system python-build-system)
2190 (home-page "https://github.com/streamlink/streamlink")
2192 `(("python-freezegun" ,python-freezegun)
2193 ("python-pytest" ,python-pytest)
2194 ("python-mock" ,python-mock)
2195 ("python-requests-mock" ,python-requests-mock)))
2197 `(("python-pysocks" ,python-pysocks)
2198 ("python-websocket-client" ,python-websocket-client)
2199 ("python-iso3166" ,python-iso3166)
2200 ("python-iso639" ,python-iso639)
2201 ("python-isodate" ,python-isodate)
2202 ("python-pycryptodome" ,python-pycryptodome)
2203 ("python-requests" ,python-requests)
2204 ("python-urllib3" ,python-urllib3)))
2205 (synopsis "Extract streams from various services")
2206 (description "Streamlink is command-line utility that extracts streams
2207 from sites like Twitch.tv and pipes them into a video player of choice.")
2208 (license license:bsd-2)))
2210 (define-public livestreamer
2211 (deprecated-package "livestreamer" streamlink))
2213 (define-public twitchy
2214 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2217 (version (git-version "3.4" "1" commit))
2222 (url "https://github.com/BasioMeusPuga/twitchy.git")
2224 (file-name (git-file-name name version))
2227 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2228 (build-system python-build-system)
2231 (modify-phases %standard-phases
2232 (add-after 'unpack 'patch-paths
2233 (lambda* (#:key inputs #:allow-other-keys)
2234 (substitute* "twitchy/twitchy_play.py"
2236 (string-append "\"" (assoc-ref inputs "streamlink")
2237 "/bin/streamlink ")))
2239 (add-before 'check 'check-setup
2241 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2243 (add-after 'install 'install-rofi-plugin
2244 (lambda* (#:key outputs #:allow-other-keys)
2245 (install-file "plugins/rofi-twitchy"
2246 (string-append (assoc-ref outputs "out")
2250 `(("python-requests" ,python-requests)
2251 ("streamlink" ,streamlink)))
2252 (home-page "https://github.com/BasioMeusPuga/twitchy")
2253 (synopsis "Command-line interface for Twitch.tv")
2255 "This package provides a command-line interface for Twitch.tv")
2256 (license license:gpl3+))))
2265 (url "https://github.com/mltframework/mlt.git")
2266 (commit (string-append "v" version))))
2267 (file-name (git-file-name name version))
2270 "0iiqym15n8kbnjzj0asmm86gs23yykz0va5b475cc4v2vv5admgx"))))
2271 (build-system gnu-build-system)
2273 `(#:tests? #f ; no tests
2274 #:make-flags '("CC=gcc" "CXX=g++")
2276 (list "--enable-gpl3"
2279 (modify-phases %standard-phases
2281 'configure 'override-LDFLAGS
2282 (lambda* (#:key outputs #:allow-other-keys)
2283 (substitute* "config.mak"
2285 (string-append "LDFLAGS+=-Wl,-rpath="
2286 (assoc-ref outputs "out")
2290 `(("alsa-lib" ,alsa-lib)
2291 ("ffmpeg" ,ffmpeg-3.4)
2293 ("frei0r-plugins" ,frei0r-plugins)
2294 ("gdk-pixbuf" ,gdk-pixbuf)
2296 ("libxml2" ,libxml2)
2299 ("libsamplerate" ,libsamplerate)
2300 ("pulseaudio" ,pulseaudio)
2306 `(("pkg-config" ,pkg-config)))
2307 (home-page "https://www.mltframework.org/")
2308 (synopsis "Author, manage, and run multitrack audio/video compositions")
2310 "MLT is a multimedia framework, designed and developed for television
2311 broadcasting. It provides a toolkit for broadcasters, video editors, media
2312 players, transcoders, web streamers and many more types of applications. The
2313 functionality of the system is provided via an assortment of ready to use
2314 tools, XML authoring components, and an extensible plug-in based API.")
2315 (license license:gpl3)))
2317 (define-public v4l-utils
2323 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2324 "/v4l-utils-" version ".tar.bz2"))
2327 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2328 (build-system gnu-build-system)
2331 (list (string-append "--with-udevdir="
2332 (assoc-ref %outputs "out")
2336 ("pkg-config" ,pkg-config)))
2338 `(("alsa-lib" ,alsa-lib)
2340 ("libjpeg" ,libjpeg-turbo)
2344 (synopsis "Realtime video capture utilities for Linux")
2345 (description "The v4l-utils provide a series of libraries and utilities to
2346 be used for realtime video capture via Linux-specific APIs.")
2347 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2348 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2349 (license (list license:lgpl2.1+ license:gpl2))))
2358 (url "https://github.com/obsproject/obs-studio.git")
2360 (file-name (git-file-name name version))
2363 "0m15ch2ix9qrdf1a9mj7wcpl72z3h13zx60c9q72sb1435id2g1q"))))
2364 (build-system cmake-build-system)
2366 `(#:tests? #f)) ; no tests
2368 `(("pkg-config" ,pkg-config)))
2370 `(("alsa-lib" ,alsa-lib)
2374 ("fontconfig" ,fontconfig)
2375 ("freetype" ,freetype)
2377 ("jansson" ,jansson)
2378 ("libx264" ,libx264)
2379 ("libxcomposite" ,libxcomposite)
2381 ("pulseaudio" ,pulseaudio)
2384 ("qtx11extras" ,qtx11extras)
2386 ("v4l-utils" ,v4l-utils)
2388 (synopsis "Live streaming software")
2389 (description "Open Broadcaster Software provides a graphical interface for
2390 video recording and live streaming. OBS supports capturing audio and video
2391 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2393 (home-page "https://obsproject.com")
2394 (supported-systems '("x86_64-linux" "i686-linux"))
2395 (license license:gpl2+)))
2397 (define-public libvdpau
2405 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2407 (file-name (git-file-name name version))
2410 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2411 (build-system meson-build-system)
2413 `(("pkg-config" ,pkg-config)))
2415 `(("libx11" ,libx11 "out")
2416 ("libxext" ,libxext)
2417 ("xorgproto" ,xorgproto)))
2418 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2419 (synopsis "Video Decode and Presentation API")
2420 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2421 provides an interface to video decode acceleration and presentation hardware
2422 present in modern GPUs.")
2423 (license (license:x11-style "file://COPYING"))))
2425 (define-public vdpauinfo
2432 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2433 name "-" version ".tar.gz"))
2436 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2437 (build-system gnu-build-system)
2439 `(("pkg-config" ,pkg-config)
2440 ("libx11" ,libx11)))
2442 `(("libvdpau" ,libvdpau)))
2443 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2444 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2445 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2447 (license (license:x11-style "file://COPYING"))))
2449 (define-public libvdpau-va-gl
2451 (name "libvdpau-va-gl")
2456 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2457 "releases/download/v" version "/libvdpau-va-gl-"
2461 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2462 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2463 (modules '((guix build utils)))
2464 (snippet '(begin (delete-file-recursively "3rdparty")
2466 (build-system cmake-build-system)
2468 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2470 `(("libvdpau" ,libvdpau)
2471 ("pkg-config" ,pkg-config)))
2475 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2476 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2478 "Many applications can use VDPAU to accelerate portions of the video
2479 decoding process and video post-processing to the GPU video hardware. Since
2480 there is no VDPAU available on Intel chips, they fall back to different drawing
2481 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2482 scaling and VA-API (if available) to accelerate video decoding.")
2483 (license license:expat)))
2485 (define-public recordmydesktop
2487 (name "recordmydesktop")
2491 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2492 version "/recordmydesktop-" version ".tar.gz"))
2495 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2496 (build-system gnu-build-system)
2497 (inputs `(("popt" ,popt)
2502 ("libxfixes" ,libxfixes)
2503 ("libxdamage" ,libxdamage)
2504 ("libxext" ,libxext)
2505 ("alsa-lib" ,alsa-lib)
2506 ("libvorbis" ,libvorbis)
2507 ("libtheora" ,libtheora)))
2508 (home-page "http://recordmydesktop.sourceforge.net/")
2509 (synopsis "Desktop session video recorder")
2511 "recordMyDesktop is a command-line tool that captures the activity in
2512 your graphical desktop and encodes it as a video. This is a useful tool for
2513 making @dfn{screencasts}.")
2514 (license license:gpl2+)))
2516 (define-public simplescreenrecorder
2518 (name "simplescreenrecorder")
2524 (url "https://github.com/MaartenBaert/ssr.git")
2526 (file-name (git-file-name name version))
2529 "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4"))))
2530 (build-system cmake-build-system)
2531 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2532 ;; README.md, the program builds and functions properly without them.
2533 ;; As a result, they are omitted. Please add them back if problems appear.
2535 `(("alsa-lib" ,alsa-lib)
2540 ("pulseaudio" ,pulseaudio)
2542 ("qtx11extras" ,qtx11extras)))
2543 (native-inputs `(("pkg-config" ,pkg-config)))
2546 (list "-DWITH_QT5=TRUE")
2547 #:tests? #f)) ; no test suite
2548 ;; Using HTTPS causes part of the page to be displayed improperly.
2549 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2550 (synopsis "Screen recorder")
2551 (description "SimpleScreenRecorder is an easy to use screen recorder with
2552 a graphical user interface. It supports recording the entire screen, or a
2553 part of it, and allows encoding in many different codecs and file formats.
2554 Other features include a live preview and live streaming.")
2555 (license (list license:gpl3+ ; most files
2556 license:zlib ; glinject/elfhacks.*
2557 license:isc ; glinject/*
2558 license:x11)))) ; build-aux/install-sh
2560 (define-public libsmpeg
2563 (version "0.4.5-401")
2567 (url "svn://svn.icculus.org/smpeg/trunk/")
2568 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2569 (file-name (string-append name "-" version "-checkout"))
2572 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2573 (build-system gnu-build-system)
2575 ;; libsmpeg fails to build with -std=c++11, which is the default with
2576 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
2577 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
2579 `(("autoconf" ,autoconf)
2580 ("automake" ,automake)))
2583 (home-page "http://icculus.org/smpeg/")
2584 (synopsis "SDL MPEG decoding library")
2586 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2587 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2588 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2589 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2590 and MPEG system streams.")
2591 (license (list license:expat
2597 (define-public libsmpeg-with-sdl1
2598 (package (inherit libsmpeg)
2600 (version "0.4.5-399")
2604 (url "svn://svn.icculus.org/smpeg/trunk/")
2605 (revision 399))) ; tagged release 0.4.5
2606 (file-name (string-append name "-" version "-checkout"))
2609 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
2613 (define-public libbdplus
2620 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2621 version "/" name "-" version ".tar.bz2"))
2623 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2625 `(("libgcrypt" ,libgcrypt)))
2626 (build-system gnu-build-system)
2627 (home-page "https://www.videolan.org/developers/libbdplus.html")
2628 (synopsis "Library for decrypting certain Blu-Ray discs")
2629 (description "libbdplus is a library which implements the BD+ System
2631 (license license:lgpl2.1+)))
2633 (define-public libaacs
2640 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2641 version "/" name "-" version ".tar.bz2"))
2643 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2645 `(("libgcrypt" ,libgcrypt)))
2649 (build-system gnu-build-system)
2650 (home-page "https://www.videolan.org/developers/libaacs.html")
2651 (synopsis "Library for decrypting certain Blu-Ray discs")
2652 (description "libaacs is a library which implements the Advanced Access
2653 Content System specification.")
2654 (license license:lgpl2.1+)))
2656 (define-public mps-youtube
2658 (name "mps-youtube")
2664 (url "https://github.com/mps-youtube/mps-youtube.git")
2665 (commit (string-append "v" version))))
2666 (file-name (git-file-name name version))
2669 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
2670 (build-system python-build-system)
2672 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2673 ;; test suite results differ depending on the country and also introduce
2674 ;; non-determinism in the tests.
2675 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2678 `(("python-pafy" ,python-pafy)
2679 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2680 (home-page "https://github.com/mps-youtube/mps-youtube")
2681 (synopsis "Terminal based YouTube player and downloader")
2683 "@code{mps-youtube} is based on mps, a terminal based program to
2684 search, stream and download music. This implementation uses YouTube as
2685 a source of content and can play and download video as well as audio.
2686 It can use either mpv or mplayer for playback, and for conversion of
2687 formats ffmpeg or libav is used. Users should install one of the
2688 supported players in addition to this package.")
2689 (license license:gpl3+)))
2691 (define-public handbrake
2697 (uri (string-append "https://download.handbrake.fr/releases/"
2698 version "/HandBrake-" version "-source.tar.bz2"))
2701 "09rcrq0kjs1lc1as7w3glbpbfvzldwpx3xv0pfmkn4pl7acxw1f0"))
2702 (modules '((guix build utils)))
2704 ;; Remove "contrib" and source not necessary for
2705 ;; building/running under a GNU environment.
2707 (for-each delete-file-recursively
2708 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
2709 (substitute* "make/include/main.defs"
2710 ;; Disable unconditional inclusion of "contrib" libraries
2711 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
2712 ;; which would lead to fetching and building of these
2713 ;; libraries. Use our own instead.
2714 (("MODULES \\+= contrib") "# MODULES += contrib"))
2716 (build-system glib-or-gtk-build-system)
2718 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
2719 ("autoconf" ,autoconf)
2720 ("intltool" ,intltool)
2721 ("libtool" ,libtool)
2722 ("pkg-config" ,pkg-config)
2723 ("python" ,python-2))) ; For configuration
2726 ("dbus-glib" ,dbus-glib)
2728 ("fontconfig" ,fontconfig)
2729 ("freetype" ,freetype)
2731 ("gstreamer" ,gstreamer)
2732 ("gst-plugins-base" ,gst-plugins-base)
2734 ("jansson" ,jansson)
2737 ("libbluray" ,libbluray)
2739 ("libdvdnav" ,libdvdnav)
2740 ("libdvdread" ,libdvdread)
2741 ("libgudev" ,libgudev)
2742 ("libmpeg2" ,libmpeg2)
2743 ("libnotify" ,libnotify)
2744 ("libnuma" ,numactl)
2747 ("libsamplerate" ,libsamplerate)
2748 ("libtheora" ,libtheora)
2749 ("libvorbis" ,libvorbis)
2751 ("libxml2" ,libxml2)
2752 ("libx264" ,libx264)
2757 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2759 (list "--disable-gtk-update-checks"
2761 (string-append "CPPFLAGS=-I"
2762 (assoc-ref %build-inputs "libxml2")
2766 (modify-phases %standard-phases
2768 ;; Run bootstrap ahead of time so that shebangs get patched.
2770 (setenv "CONFIG_SHELL" (which "sh"))
2771 ;; Patch the Makefile so that it doesn't bootstrap again.
2772 (substitute* "gtk/module.rules"
2773 ((".*autoreconf.*") ""))
2774 (with-directory-excursion "gtk"
2775 (invoke "autoreconf" "-fiv"))))
2776 (add-before 'configure 'patch-SHELL
2778 (substitute* "gtk/po/Makefile.in.in"
2779 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
2781 (add-before 'configure 'relax-reqs
2783 (substitute* "make/configure.py"
2784 ;; cmake is checked for so that it can be used to build
2785 ;; contrib/harfbuzz and contrib/x265, but we get these as
2786 ;; inputs, so don't abort if it's not found. Similarly, meson
2787 ;; and ninja are only needed for contrib/libdav1d, and nasm
2789 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
2790 (string-append & "False")))
2793 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2794 ;; 'configure' is not an autoconf-generated script, and
2795 ;; errors on unrecognized arguments,
2796 ;; e.g. --enable-fast-install
2797 (let ((out (assoc-ref outputs "out")))
2798 (apply invoke "./configure"
2799 (string-append "--prefix=" out)
2800 (or configure-flags '())))))
2801 (add-after 'configure 'chdir-build
2802 (lambda _ (chdir "./build") #t)))))
2803 (home-page "https://handbrake.fr")
2804 (synopsis "Video transcoder")
2806 "HandBrake is a tool for converting video from any format to a selection
2807 of modern, widely supported codecs.")
2808 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
2809 ;; Combination under GPLv2. See LICENSE.
2810 (license license:gpl2)))
2812 (define-public intel-vaapi-driver
2814 (name "intel-vaapi-driver")
2819 (uri (string-append "https://github.com/intel/intel-vaapi-driver/"
2820 "releases/download/" version "/intel-vaapi-driver-"
2821 version ".tar.bz2"))
2823 (base32 "12fhydgwpvyh97gxqlgv77wsf9yax321h46vi49j4sxghpcxvqki"))))
2824 (build-system gnu-build-system)
2826 `(("pkg-config" ,pkg-config)))
2828 `(("libdrm" ,libdrm)
2830 ("libx11" ,libx11)))
2833 (modify-phases %standard-phases
2834 (add-before 'configure 'set-target-directory
2835 (lambda* (#:key outputs #:allow-other-keys)
2836 (let ((out (assoc-ref outputs "out")))
2837 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
2839 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
2840 ;; this to all VA-API back ends instead of once to libva.
2841 (native-search-paths
2842 (list (search-path-specification
2843 (variable "LIBVA_DRIVERS_PATH")
2844 (files '("lib/dri")))))
2845 (supported-systems '("i686-linux" "x86_64-linux"))
2846 (home-page "https://01.org/linuxmedia/vaapi")
2847 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
2849 "This is the @acronym{VA-API, Video Acceleration API} back end required for
2850 hardware-accelerated video processing on Intel GEN Graphics devices supported by
2851 the i915 driver, such as integrated Intel HD Graphics. It provides access to
2852 both hardware and shader functionality for faster encoding, decoding, and
2853 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
2854 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
2855 license:expat)))) ; the rest, excluding the test suite
2857 (define-public openh264
2863 (uri (string-append "https://github.com/cisco/"
2864 name "/releases/download/v"
2865 version "/Source.Code.tar.gz"))
2866 (file-name (string-append name "-" version ".tar.gz"))
2869 "0iq802xfsfkskg6q1j0kg90xh04vv1sxf61mrmahgynz5d7hx2ii"))))
2870 (build-system gnu-build-system)
2873 ("python" ,python)))
2875 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2877 #:test-target "test"
2878 #:phases (modify-phases %standard-phases
2879 ;; no configure script
2880 (delete 'configure))))
2881 (home-page "https://www.openh264.org/")
2882 (synopsis "H264 decoder library")
2884 "Openh264 is a library which can decode H264 video streams.")
2885 (license license:bsd-2)))
2887 (define-public libmp4v2
2894 ;; XXX: The new location of upstream is uncertain and will become relevant the
2895 ;; moment when the googlecode archive shuts down. It is past the date it
2896 ;; should've been turned off. I tried to communicate with upstream, but this
2897 ;; wasn't very responsive and not very helpful. The short summary is, it is
2898 ;; chaos when it comes to the amount of forks and only time will tell where
2899 ;; the new upstream location is.
2900 (uri (string-append "https://storage.googleapis.com/google-"
2901 "code-archive-downloads/v2/"
2902 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2903 (file-name (string-append name "-" version ".tar.bz2"))
2904 (patches (search-patches "libmp4v2-c++11.patch"))
2907 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2908 (build-system gnu-build-system)
2910 "static")) ; 3.7MiB .a file
2913 (modify-phases %standard-phases
2914 (add-after 'unpack 'remove-dates
2916 ;; Make the build reproducible.
2917 (substitute* "configure"
2918 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2919 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2921 (add-after 'install 'move-static-libraries
2922 (lambda* (#:key outputs #:allow-other-keys)
2923 ;; Move static libraries to the "static" output.
2924 (let* ((out (assoc-ref outputs "out"))
2925 (lib (string-append out "/lib"))
2926 (static (assoc-ref outputs "static"))
2927 (slib (string-append static "/lib")))
2929 (for-each (lambda (file)
2930 (install-file file slib)
2932 (find-files lib "\\.a$"))
2935 `(("help2man" ,help2man)
2936 ("dejagnu" ,dejagnu)))
2937 (home-page "https://code.google.com/archive/p/mp4v2/")
2938 (synopsis "API to create and modify mp4 files")
2940 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2941 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2942 file format that has been used as a multimedia file format in a variety of platforms and
2943 applications. It is a very powerful and extensible format that can accommodate
2944 practically any type of media.")
2945 (license license:mpl1.1)))
2947 (define-public libmediainfo
2949 (name "libmediainfo")
2953 (uri (string-append "https://mediaarea.net/download/source/"
2955 name "_" version ".tar.bz2"))
2958 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2959 ;; TODO add a Big Buck Bunny webm for tests.
2961 `(("autoconf" ,autoconf)
2962 ("automake" ,automake)
2963 ("libtool" ,libtool)
2964 ("pkg-config" ,pkg-config)
2966 ("tinyxml2" ,tinyxml2)
2968 ("libzen" ,libzen)))
2969 (build-system gnu-build-system)
2971 '(#:tests? #f ; see above TODO
2973 ;; build scripts not in root of archive
2974 (modify-phases %standard-phases
2975 (add-after 'unpack 'change-to-build-dir
2977 (chdir "Project/GNU/Library")
2979 (home-page "https://mediaarea.net/en/MediaInfo")
2980 (synopsis "Library for retrieving media metadata")
2981 (description "MediaInfo is a library used for retrieving technical
2982 information and other metadata about audio or video files. A non-exhaustive
2983 list of the information MediaInfo can retrieve from media files include:
2986 @item General: title, author, director, album, track number, date, duration...
2987 @item Video: codec, aspect, fps, bitrate...
2988 @item Audio: codec, sample rate, channels, language, bitrate...
2989 @item Text: language of subtitle
2990 @item Chapters: number of chapters, list of chapters
2993 MediaInfo supports the following formats:
2996 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2997 MPEG-2, MPEG-4, DVD (VOB)...
2998 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2999 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3000 @item Subtitles: SRT, SSA, ASS, SAMI...
3002 (license license:bsd-2)))
3004 ;; TODO also have a GUI version available
3005 (define-public mediainfo
3011 ;; Warning: This source has proved unreliable 1 time at least.
3012 ;; Consider an alternate source or report upstream if this
3014 (uri (string-append "https://mediaarea.net/download/source/"
3015 name "/" version "/"
3016 name "_" version ".tar.bz2"))
3019 "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a"))))
3021 `(("autoconf" ,autoconf)
3022 ("automake" ,automake)
3023 ("libtool" ,libtool)
3024 ("pkg-config" ,pkg-config)
3026 ("libmediainfo" ,libmediainfo)
3027 ("libzen" ,libzen)))
3028 (build-system gnu-build-system)
3030 '(#:tests? #f ; lacks tests
3032 ;; build scripts not in root of archive
3033 (modify-phases %standard-phases
3034 (add-after 'unpack 'change-to-build-dir
3036 (chdir "Project/GNU/CLI")
3038 (home-page "https://mediaarea.net/en/MediaInfo")
3039 (synopsis "Utility for reading media metadata")
3040 (description "MediaInfo is a utility used for retrieving technical
3041 information and other metadata about audio or video files. It supports the
3042 many codecs and formats supported by libmediainfo.")
3043 (license license:bsd-2)))
3045 (define-public livemedia-utils
3047 (name "livemedia-utils")
3048 (version "2019.05.29")
3052 "https://download.videolan.org/contrib/live555/live."
3056 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
3057 (build-system gnu-build-system)
3059 '(#:tests? #f ; no tests
3060 #:make-flags (list "CC=gcc"
3061 (string-append "LDFLAGS=-Wl,-rpath="
3062 (assoc-ref %outputs "out") "/lib")
3063 (string-append "PREFIX="
3064 (assoc-ref %outputs "out")))
3065 #:phases (modify-phases %standard-phases
3066 (add-before 'configure 'fix-makefiles-generation
3068 (substitute* "genMakefiles"
3073 (invoke "./genMakefiles"
3074 "linux-with-shared-libraries"))))))
3075 (home-page "http://www.live555.com/liveMedia/")
3076 (synopsis "Set of C++ libraries for multimedia streaming")
3077 (description "This code forms a set of C++ libraries for multimedia
3078 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3079 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3080 JPEG video, and several audio codecs. They can easily be extended to support
3081 additional (audio and/or video) codecs, and can also be used to build basic
3082 RTSP or SIP clients and servers.")
3083 (license license:lgpl3+)))
3085 (define-public libdvbpsi
3092 "https://download.videolan.org/pub/libdvbpsi/"
3093 version "/libdvbpsi-" version ".tar.bz2"))
3096 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
3097 (build-system gnu-build-system)
3098 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3099 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3101 (description "libdvbpsi is a simple library designed for decoding and
3102 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3103 and ITU-T H.222.0.")
3104 (license license:lgpl2.1)))
3106 (define-public ffms2
3110 (home-page "https://github.com/FFMS/ffms2")
3114 (url "https://github.com/FFMS/ffms2.git")
3116 (file-name (git-file-name name version))
3119 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3120 (build-system gnu-build-system)
3123 (list "--enable-avresample")))
3127 `(("ffmpeg" ,ffmpeg)))
3129 `(("pkg-config" ,pkg-config)))
3130 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3132 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3133 programmers to access a standard API to open and decompress media files.")
3134 ;; sources are distributed under a different license that the binary.
3135 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3136 (license license:gpl2+))); inherits from ffmpeg
3138 (define-public aegisub
3145 "http://ftp.aegisub.org/pub/archives/releases/source/"
3146 name "-" version ".tar.xz"))
3149 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3150 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3151 "aegisub-boost68.patch"))))
3152 (build-system gnu-build-system)
3155 (list "--disable-update-checker"
3156 "--without-portaudio"
3159 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3160 ;; tests require busted, a lua package we don't have yet
3163 (modify-phases %standard-phases
3164 (add-before 'configure 'fix-ldflags
3166 (setenv "LDFLAGS" "-pthread")
3168 (add-after 'unpack 'fix-boost-headers
3171 '("src/subtitles_provider_libass.cpp"
3172 "src/colour_button.cpp"
3173 "src/video_provider_dummy.cpp"
3174 "./src/video_frame.cpp")
3175 (("#include <boost/gil/gil_all.hpp>")
3176 "#include <boost/gil.hpp>"))
3180 ("desktop-file-utils" ,desktop-file-utils)
3183 ("hunspell" ,hunspell)
3186 ("alsa-lib" ,alsa-lib)
3187 ("pulseaudio" ,pulseaudio)
3189 ("freetype" ,freetype)
3190 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3192 `(("intltool" ,intltool)
3193 ("pkg-config" ,pkg-config)))
3194 (home-page "http://www.aegisub.org/")
3195 (synopsis "Subtitle engine")
3197 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3198 it quick and easy to time subtitles to audio, and features many powerful
3199 tools for styling them, including a built-in real-time video preview.")
3200 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3201 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3202 license:expat)))) ; and src/gl that is under a license similar
3203 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3204 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3205 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3207 (define-public gst-transcoder
3209 (name "gst-transcoder")
3215 (url "https://github.com/pitivi/gst-transcoder.git")
3217 (file-name (git-file-name name version))
3220 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3221 (build-system meson-build-system)
3223 `(("gobject-introspection" ,gobject-introspection)
3225 ("gstreamer" ,gstreamer)
3226 ("gst-plugins-base" ,gst-plugins-base)))
3228 `(("python" ,python)
3229 ("pkg-config" ,pkg-config)))
3230 (home-page "https://github.com/pitivi/gst-transcoder/")
3231 (synopsis "GStreamer Transcoding API")
3232 (description "GStreamer Transcoding API")
3233 (license license:lgpl2.1)))
3242 (uri (string-append "mirror://sourceforge/gmerlin/"
3243 name "/" version "/"
3244 name "-" version ".tar.gz"))
3245 (file-name (string-append name "-" version ".tar.gz"))
3248 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3249 (build-system gnu-build-system)
3251 '(#:configure-flags '("LIBS=-lm")))
3253 `(("pkg-config" ,pkg-config)
3254 ("doxygen" ,doxygen)))
3255 (home-page "http://gmerlin.sourceforge.net")
3256 (synopsis "Low level library for multimedia API building")
3258 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3259 library, upon which multimedia APIs can be built. Gavl handles all the
3260 details of audio and video formats like colorspaces, sample rates,
3261 multichannel configurations, etc. It provides standardized definitions for
3262 those formats as well as container structures for carrying audio samples or
3263 video images inside an application.
3265 In addition, it handles the sometimes ugly task of converting between all
3266 these formats and provides some elementary operations (copying, scaling,
3267 alpha blending etc).")
3268 (license license:gpl3)))
3270 (define-public frei0r-plugins
3272 (name "frei0r-plugins")
3277 (uri (string-append "https://files.dyne.org/frei0r/"
3278 "frei0r-plugins-" version ".tar.gz"))
3281 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
3282 (build-system gnu-build-system)
3285 (modify-phases %standard-phases
3286 (add-after 'unpack 'patch-Makefile
3288 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3289 ;; names in the tarball. Try removing this for future versions.
3290 (substitute* "Makefile.in"
3291 (("README\\.md ChangeLog TODO AUTHORS")
3292 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3294 ;; TODO: opencv for additional face detection filters.
3299 `(("pkg-config" ,pkg-config)))
3300 (home-page "https://www.dyne.org/software/frei0r/")
3301 (synopsis "Minimalistic plugin API for video effects")
3303 "Frei0r is a minimalistic plugin API for video effects.
3304 The main emphasis is on simplicity for an API that will round up
3305 the most common video effects into simple filters, sources and
3306 mixers that can be controlled by parameters. Frei0r wants to
3307 provide a way to share these simple effects between many
3308 applications, avoiding their reimplementation by different projects.
3309 It counts more than 100 plugins.")
3310 (license (list license:gpl2+
3311 ;; The following files are licensed as LGPL2.1+:
3312 ;; src/generator/ising0r/ising0r.c
3313 ;; src/generator/onecol0r/onecol0r.cpp
3314 ;; src/generator/nois0r/nois0r.cpp
3315 ;; src/generator/lissajous0r/lissajous0r.cpp
3316 ;; src/filter/ndvi/gradientlut.hpp
3317 ;; src/filter/ndvi/ndvi.cpp
3318 ;; src/filter/facedetect/facedetect.cpp
3319 license:lgpl2.1+))))
3321 (define-public motion
3325 (home-page "https://motion-project.github.io/")
3329 (url "https://github.com/Motion-Project/motion.git")
3330 (commit (string-append "release-" version))))
3333 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3334 (file-name (git-file-name name version))))
3335 (build-system gnu-build-system)
3337 `(("autoconf" ,autoconf-wrapper)
3338 ("automake" ,automake)
3339 ("gettext" ,gettext-minimal)
3340 ("pkg-config" ,pkg-config)))
3342 `(("libjpeg" ,libjpeg-turbo)
3343 ("ffmpeg" ,ffmpeg-3.4)
3344 ("libmicrohttpd" ,libmicrohttpd)
3345 ("sqlite" ,sqlite)))
3347 '(#:phases (modify-phases %standard-phases
3350 (patch-shebang "version.sh")
3351 (invoke "autoreconf" "-vfi"))))
3352 #:configure-flags '("--sysconfdir=/etc")
3353 #:make-flags (list (string-append "sysconfdir="
3354 (assoc-ref %outputs "out")
3357 #:tests? #f)) ; no 'check' target
3358 (synopsis "Detect motion from video signals")
3360 "Motion is a program that monitors the video signal from one or more
3361 cameras and is able to detect if a significant part of the picture has
3362 changed. Or in other words, it can detect motion.")
3364 ;; Some files say "version 2" and others "version 2 or later".
3365 (license license:gpl2)))
3367 (define-public subdl
3368 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3372 (version (git-version "1.0.3" revision commit))
3376 (url "https://github.com/alexanderwink/subdl.git")
3378 (file-name (git-file-name name version))
3381 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3382 (build-system trivial-build-system)
3384 `(#:modules ((guix build utils))
3386 (use-modules (guix build utils))
3387 (let* ((out (assoc-ref %outputs "out"))
3388 (bin (string-append out "/bin"))
3389 (source (assoc-ref %build-inputs "source"))
3390 (python (assoc-ref %build-inputs "python")))
3391 (install-file (string-append source "/subdl") bin)
3392 (patch-shebang (string-append bin "/subdl")
3393 (list (string-append python "/bin")))))))
3394 (inputs `(("python" ,python)))
3395 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3396 (description "Subdl is a command-line tool for downloading subtitles from
3397 opensubtitles.org. By default, it will search for English subtitles, display
3398 the results, download the highest-rated result in the requested language and
3399 save it to the appropriate filename.")
3400 (license license:gpl3+)
3401 (home-page "https://github.com/alexanderwink/subdl"))))
3403 (define-public l-smash
3410 (url "https://github.com/l-smash/l-smash.git")
3411 (commit (string-append "v" version))))
3412 (file-name (git-file-name name version))
3415 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3416 (build-system gnu-build-system)
3418 `(#:tests? #f ;no tests
3420 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3421 (assoc-ref %outputs "out") "/lib"))
3423 (modify-phases %standard-phases
3424 ;; configure fails if it is followed by CONFIG_SHELL
3426 (lambda* (#:key outputs #:allow-other-keys)
3427 (let ((out (assoc-ref outputs "out")))
3428 (invoke "./configure" (string-append "--prefix=" out)
3429 "--disable-static")))))))
3431 `(("which" ,which)))
3432 (home-page "https://l-smash.github.io/l-smash/")
3433 (synopsis "MP4 multiplexer and demultiplexer library")
3435 "L-SMASH is a cross-platform library that handles the ISO base media file
3436 format and some of its derived file formats, including MP4. It operates as a
3437 multiplexer and demultiplexer, and can mux video and audio in several formats
3438 using standalone executable files.")
3439 (license license:isc)))
3441 (define-public qtfaststart
3443 (name "qtfaststart")
3447 (uri (pypi-uri "qtfaststart" version))
3450 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3451 (build-system python-build-system)
3453 '(#:tests? #f)) ; no test suite
3454 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3455 (description "qtfaststart enables streaming and pseudo-streaming of
3456 QuickTime and MP4 files by moving metadata and offset information to the
3457 beginning of the file. It can also print some useful information about the
3458 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3459 project, which is released into the public domain, as well as ISO 14496-12:2005
3460 (the official spec for MP4), which can be obtained from the ISO or found
3462 (home-page "https://github.com/danielgtaylor/qtfaststart")
3463 (license license:expat)))
3465 (define-public vidstab
3466 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
3470 (version (git-version "1.1.0" revision commit))
3474 (url "https://github.com/georgmartius/vid.stab.git")
3476 (file-name (git-file-name name version))
3479 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
3480 (build-system cmake-build-system)
3482 '(#:tests? #f)) ; tests are not run as part of standard build process
3483 (home-page "http://public.hronopik.de/vid.stab/")
3484 (synopsis "Video stabilization library")
3485 (description "Vidstab is a video stabilization library which can be used
3486 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3487 vehicle typically suffers from undesirable shakes and jitters. Activities such
3488 as surfing, skiing, riding and walking while shooting videos are especially
3489 prone to erratic camera shakes. Vidstab targets these video contents to help
3490 create smoother and stable videos.")
3491 (license license:gpl2+))))
3493 (define-public libopenshot
3495 (name "libopenshot")
3500 (url "https://github.com/OpenShot/libopenshot")
3501 (commit (string-append "v" version))))
3502 (file-name (git-file-name name version))
3505 "0r1qmr8ar5n72603xkj9h065vbpznrqsq88kxxmn9n8djyyvk03k"))
3506 (modules '((guix build utils)))
3508 ;; Allow overriding of the python installation dir
3509 (substitute* "src/bindings/python/CMakeLists.txt"
3510 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3511 (string-append set " CACHE PATH "
3512 "\"Python bindings directory\")")))
3513 (delete-file-recursively "thirdparty")
3515 (build-system cmake-build-system)
3517 `(("pkg-config" ,pkg-config)
3520 ("unittest++" ,unittest-cpp)))
3521 (propagated-inputs ;all referenced in installed headers
3522 `(("cppzmq" ,cppzmq)
3524 ("imagemagick" ,imagemagick)
3525 ("jsoncpp" ,jsoncpp)
3526 ("libopenshot-audio" ,libopenshot-audio)
3528 ("qtmultimedia" ,qtmultimedia)
3529 ("zeromq" ,zeromq)))
3532 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3533 ,(version-major+minor (package-version python))
3535 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3537 (modify-phases %standard-phases
3538 (add-before 'configure 'set-vars
3539 (lambda* (#:key inputs #:allow-other-keys)
3540 (setenv "LIBOPENSHOT_AUDIO_DIR"
3541 (assoc-ref inputs "libopenshot-audio"))
3543 (assoc-ref inputs "zeromq"))
3544 (setenv "UNITTEST_DIR"
3545 (string-append (assoc-ref inputs "unittest++")
3546 "/include/UnitTest++"))
3548 (home-page "https://openshot.org")
3549 (synopsis "Video-editing, animation, and playback library")
3550 (description "OpenShot Library (libopenshot) is a powerful C++ video
3551 editing library with a multi-threaded and feature rich video editing
3552 API. It includes bindings for Python, Ruby, and other languages.")
3553 (license license:lgpl3+)))
3555 (define-public openshot
3562 (url "https://github.com/OpenShot/openshot-qt")
3563 (commit (string-append "v" version))))
3564 (file-name (git-file-name name version))
3567 "0mg63v36h7l8kv2sgf6x8c1n3ygddkqqwlciz7ccxpbm4x1idqba"))
3568 (modules '((guix build utils)))
3571 (delete-file-recursively "src/images/fonts") #t))))
3572 (build-system python-build-system)
3574 `(("ffmpeg" ,ffmpeg)
3575 ("font-ubuntu" ,font-ubuntu)
3576 ("libopenshot" ,libopenshot)
3578 ("python-pyqt" ,python-pyqt)
3579 ("python-pyzmq" ,python-pyzmq)
3580 ("python-requests" ,python-requests)
3583 `(#:tests? #f ;no tests
3584 #:modules ((guix build python-build-system)
3585 (guix build qt-utils)
3587 #:imported-modules (,@%python-build-system-modules
3588 (guix build qt-utils))
3589 #:phases (modify-phases %standard-phases
3590 (delete 'build) ;install phase does all the work
3591 (add-after 'unpack 'patch-font-location
3592 (lambda* (#:key inputs #:allow-other-keys)
3593 (let ((font (assoc-ref inputs "font-ubuntu")))
3594 (substitute* "src/classes/app.py"
3595 (("info.IMAGES_PATH") (string-append "\"" font "\""))
3596 (("fonts") "share/fonts/truetype")))
3598 (add-before 'install 'set-tmp-home
3600 ;; src/classes/info.py "needs" to create several
3601 ;; directories in $HOME when loaded during build
3602 (setenv "HOME" "/tmp")
3604 (add-after 'install 'wrap-program
3605 (lambda* (#:key outputs #:allow-other-keys)
3606 (let ((out (assoc-ref outputs "out")))
3607 (wrap-qt-program out "openshot-qt"))
3609 (home-page "https://openshot.org")
3610 (synopsis "Video editor")
3611 (description "OpenShot takes your videos, photos, and music files and
3612 helps you create the film you have always dreamed of. Easily add sub-titles,
3613 transitions, and effects and then export your film to many common formats.")
3614 (license license:gpl3+)))
3616 (define-public dav1d
3623 (uri (string-append "https://downloads.videolan.org/pub/videolan"
3624 "/dav1d/" version "/dav1d-" version ".tar.xz"))
3627 "02hgarv2x2bqbac15pdj7pbm8f4lyn78ws0dncygvhis9a6ghk7r"))))
3628 (build-system meson-build-system)
3629 (native-inputs `(("nasm" ,nasm)))
3630 (home-page "https://code.videolan.org/videolan/dav1d")
3631 (synopsis "AV1 decoder")
3632 (description "dav1d is a new AV1 cross-platform decoder, and focused on
3633 speed and correctness.")
3634 (license license:bsd-2)))
3636 (define-public wlstream
3637 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
3641 (version (git-version "0.0" revision commit))
3646 (url "https://github.com/atomnuker/wlstream.git")
3648 (file-name (git-file-name name version))
3651 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
3652 (build-system meson-build-system)
3653 (native-inputs `(("libdrm" ,libdrm)
3654 ("pkg-config" ,pkg-config)))
3655 (inputs `(("ffmpeg" ,ffmpeg)
3656 ("pulseaudio" ,pulseaudio)
3657 ("wayland" ,wayland)
3658 ("wayland-protocols" ,wayland-protocols)))
3659 (home-page "https://github.com/atomnuker/wlstream")
3660 (synopsis "Screen capture tool for Wayland sessions")
3661 (description "Wlstream is a screen capture tool for recording audio and
3662 video from a Wayland session.")
3663 (license license:lgpl2.1+))))
3665 (define-public gaupol
3672 (url "https://github.com/otsaloma/gaupol/")
3674 (file-name (git-file-name name version))
3677 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
3678 (build-system python-build-system)
3680 `(("gettext" ,gettext-minimal)
3681 ("pkg-config" ,pkg-config)))
3683 `(("python-pygobject" ,python-pygobject)
3685 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
3686 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
3687 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
3688 ("iso-codes" ,iso-codes) ; Optional: Translations.
3689 ("gstreamer" ,gstreamer)
3690 ("gst-libav" ,gst-libav)
3691 ("gst-plugins-base" ,gst-plugins-base)
3692 ("gst-plugins-good" ,gst-plugins-good)
3693 ("gst-plugins-bad" ,gst-plugins-bad)
3694 ("gst-plugins-ugly" ,gst-plugins-ugly)))
3696 `(#:tests? #f ; Tests seem to require networking.
3698 (modify-phases %standard-phases
3699 ;; gaupol's setup.py script does not support one of the Python build
3700 ;; system's default flags, "--single-version-externally-managed".
3702 (lambda* (#:key outputs #:allow-other-keys)
3703 (invoke "python" "setup.py" "install"
3704 (string-append "--prefix=" (assoc-ref outputs "out"))
3706 (add-after 'install 'wrap-gaupol
3707 (lambda* (#:key outputs #:allow-other-keys)
3708 (let ((out (assoc-ref outputs "out"))
3709 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
3710 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
3711 (wrap-program (string-append out "/bin/gaupol")
3712 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
3713 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
3715 (add-after 'unpack 'patch-data-dir
3716 ;; Fix some path variables that setup.py seems to garble.
3717 (lambda* (#:key outputs #:allow-other-keys)
3718 (let ((out (assoc-ref outputs "out")))
3719 (substitute* "setup.py"
3720 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
3721 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
3722 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
3723 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
3725 (synopsis "Editor for text-based subtitles")
3727 "Gaupol supports multiple subtitle file formats and provides means of
3728 creating subtitles, editing texts and timing subtitles to match video. The
3729 user interface features a builtin video player and is designed with attention
3730 to convenience of translating and batch processing of multiple documents.")
3731 (home-page "https://otsaloma.io/gaupol/")
3732 (license license:gpl3+)))
3734 (define-public theorafile
3735 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
3738 (version (git-version "0.0.0" "1" commit))
3743 (url "https://github.com/FNA-XNA/Theorafile.git")
3745 (file-name (git-file-name name version))
3747 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
3748 (build-system gnu-build-system)
3750 '(#:make-flags '("CC=gcc")
3752 (modify-phases %standard-phases
3757 (invoke "make" "test")))
3759 (lambda* (#:key outputs #:allow-other-keys)
3760 (let ((out (assoc-ref outputs "out")))
3761 (install-file "libtheorafile.so" (string-append out "/lib"))
3762 (install-file "theorafile.h" (string-append out "/include")))
3767 (home-page "https://github.com/FNA-XNA/Theorafile")
3768 (synopsis "Ogg Theora Video Decoder Library")
3769 (description "Theorafile is a library for quickly and easily decoding Ogg
3770 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
3771 (license license:zlib))))
3773 (define-public dvdbackup
3780 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
3781 "dvdbackup-" version "/"
3782 "dvdbackup-" version ".tar.xz"))
3784 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
3785 (build-system gnu-build-system)
3787 `(("libdvdcss" ,libdvdcss)
3788 ("libdvdread" ,libdvdread)))
3789 (home-page "http://dvdbackup.sourceforge.net")
3790 (synopsis "DVD video ripper")
3792 "A simple command line tool to backup video from a DVD. Decrypts the
3793 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
3794 transcode or reformat the videos in any way, producing perfect backups.")
3795 (license license:gpl3+)))