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, 2020 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 Nikita <nikita@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, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
30 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
31 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
32 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
34 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
35 ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
36 ;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
37 ;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
38 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
39 ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
40 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
41 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
42 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
43 ;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
44 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
45 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
46 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
48 ;;; This file is part of GNU Guix.
50 ;;; GNU Guix is free software; you can redistribute it and/or modify it
51 ;;; under the terms of the GNU General Public License as published by
52 ;;; the Free Software Foundation; either version 3 of the License, or (at
53 ;;; your option) any later version.
55 ;;; GNU Guix is distributed in the hope that it will be useful, but
56 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58 ;;; GNU General Public License for more details.
60 ;;; You should have received a copy of the GNU General Public License
61 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
63 (define-module (gnu packages video)
64 #:use-module (ice-9 match)
65 #:use-module (srfi srfi-1)
66 #:use-module (srfi srfi-26)
67 #:use-module ((guix licenses) #:prefix license:)
68 #:use-module (guix utils)
69 #:use-module (guix packages)
70 #:use-module (guix download)
71 #:use-module (guix git-download)
72 #:use-module (guix svn-download)
73 #:use-module (guix build-system cargo)
74 #:use-module (guix build-system cmake)
75 #:use-module (guix build-system copy)
76 #:use-module (guix build-system gnu)
77 #:use-module (guix build-system glib-or-gtk)
78 #:use-module (guix build-system meson)
79 #:use-module (guix build-system perl)
80 #:use-module (guix build-system python)
81 #:use-module (guix build-system waf)
82 #:use-module (guix build-system trivial)
83 #:use-module (gnu packages)
84 #:use-module (gnu packages algebra)
85 #:use-module (gnu packages assembly)
86 #:use-module (gnu packages audio)
87 #:use-module (gnu packages autotools)
88 #:use-module (gnu packages avahi)
89 #:use-module (gnu packages backup)
90 #:use-module (gnu packages base)
91 #:use-module (gnu packages bison)
92 #:use-module (gnu packages boost)
93 #:use-module (gnu packages cdrom)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages cmake)
96 #:use-module (gnu packages compression)
97 #:use-module (gnu packages cpp)
98 #:use-module (gnu packages crates-io)
99 #:use-module (gnu packages curl)
100 #:use-module (gnu packages dejagnu)
101 #:use-module (gnu packages dns)
102 #:use-module (gnu packages docbook)
103 #:use-module (gnu packages documentation)
104 #:use-module (gnu packages elf)
105 #:use-module (gnu packages file)
106 #:use-module (gnu packages flex)
107 #:use-module (gnu packages fonts)
108 #:use-module (gnu packages fontutils)
109 #:use-module (gnu packages freedesktop)
110 #:use-module (gnu packages fribidi)
111 #:use-module (gnu packages gettext)
112 #:use-module (gnu packages ghostscript)
113 #:use-module (gnu packages gl)
114 #:use-module (gnu packages glib)
115 #:use-module (gnu packages guile)
116 #:use-module (gnu packages gnome)
117 #:use-module (gnu packages gnunet)
118 #:use-module (gnu packages gnupg)
119 #:use-module (gnu packages gstreamer)
120 #:use-module (gnu packages gtk)
121 #:use-module (gnu packages image)
122 #:use-module (gnu packages imagemagick)
123 #:use-module (gnu packages iso-codes)
124 #:use-module (gnu packages libidn)
125 #:use-module (gnu packages libreoffice)
126 #:use-module (gnu packages libusb)
127 #:use-module (gnu packages linux)
128 #:use-module (gnu packages lua)
129 #:use-module (gnu packages m4)
130 #:use-module (gnu packages man)
131 #:use-module (gnu packages markup)
132 #:use-module (gnu packages maths)
133 #:use-module (gnu packages mp3)
134 #:use-module (gnu packages ncurses)
135 #:use-module (gnu packages networking)
136 #:use-module (gnu packages ocr)
137 #:use-module (gnu packages perl)
138 #:use-module (gnu packages perl-check)
139 #:use-module (gnu packages perl-web)
140 #:use-module (gnu packages photo)
141 #:use-module (gnu packages pkg-config)
142 #:use-module (gnu packages popt)
143 #:use-module (gnu packages pretty-print)
144 #:use-module (gnu packages protobuf)
145 #:use-module (gnu packages pulseaudio)
146 #:use-module (gnu packages python)
147 #:use-module (gnu packages python-crypto)
148 #:use-module (gnu packages python-web)
149 #:use-module (gnu packages python-xyz)
150 #:use-module (gnu packages qt)
151 #:use-module (gnu packages rdesktop)
152 #:use-module (gnu packages ruby)
153 #:use-module (gnu packages rust-apps)
154 #:use-module (gnu packages samba)
155 #:use-module (gnu packages sdl)
156 #:use-module (gnu packages serialization)
157 #:use-module (gnu packages shells)
158 #:use-module (gnu packages sqlite)
159 #:use-module (gnu packages ssh)
160 #:use-module (gnu packages swig)
161 #:use-module (gnu packages texinfo)
162 #:use-module (gnu packages textutils)
163 #:use-module (gnu packages tls)
164 #:use-module (gnu packages time)
165 #:use-module (gnu packages upnp)
166 #:use-module (gnu packages vulkan)
167 #:use-module (gnu packages web)
168 #:use-module (gnu packages webkit)
169 #:use-module (gnu packages wxwidgets)
170 #:use-module (gnu packages xdisorg)
171 #:use-module (gnu packages xiph)
172 #:use-module (gnu packages xml)
173 #:use-module (gnu packages xorg))
175 (define-public transcode
183 (string-append "https://sources.archlinux.org/other/community/"
184 name "/" name "-" version ".tar.bz2"))
186 (base32 "14ha9xjsjrj131f35jd56z5v1jb4rbsrj1nril5shqnxw3c74khy"))
188 (search-patches "transcode-ffmpeg.patch"))))
189 (build-system gnu-build-system)
195 "--enable-libmpeg2convert"
197 ;;; XXX: Not available.
202 ;;; XXX: Not available.
203 ;"--enable-libpostproc"
210 ;;; XXX: Not available.
213 "--enable-libquicktime"
218 ;;; XXX: Not available.
220 ;;"--enable-mjpegtools"
222 "--enable-imagemagick"
223 ;;; XXX: Not available.
224 ;"--enable-libjpegmmx"
225 "--enable-libjpeg")))
226 ;;; XXX: Not available.
231 `(("autoconf" ,autoconf)
232 ("automake" ,automake)
237 ("pkg-config" ,pkg-config)
238 ("python" ,python-wrapper)))
240 `(("alsa-lib" ,alsa-lib)
243 ("freetype" ,freetype)
244 ("imagemagick" ,imagemagick)
248 ("libdvdread" ,libdvdread)
249 ("libjpeg" ,libjpeg-turbo)
250 ("libmpeg2" ,libmpeg2)
252 ("libquicktime" ,libquicktime)
253 ("libtheora" ,libtheora)
254 ("libvorbis" ,libvorbis)
256 ("mjepgtools" ,mjpegtools)
258 ("v4l-utils" ,v4l-utils)
267 (synopsis "Audio/Video Transcoder")
268 (description "Transcode is a fast, versatile and command-line based
269 audio/video everything to everything converter primarily focussed on producing
270 AVI video files with MP3 audio, but also including a program to read all the
271 video and audio streams from a DVD.")
273 "http://linuxfromscratch.org/blfs/view/svn/multimedia/transcode.html")
274 (license license:gpl2+)))
276 (define-public svt-hevc
285 (url "https://github.com/OpenVisualCloud/SVT-HEVC.git")
286 (commit (string-append "v" version))))
287 (file-name (git-file-name name version))
289 (base32 "1sqh3dciqm2p1b66kngcpxqy5fx3ramxlxy8gfcbdwn2i3rsqhs7"))))
290 (build-system cmake-build-system)
292 `(#:tests? #f)) ; Test script is stand-alone
295 (synopsis "SVT HEVC encoder")
296 (description "Scalable Video Technology (SVT) is a software-based video
297 coding technology that is highly optimized for Intel's Xeon processors. Using
298 the SVT-HEVC encoder, it is possible to spread video encoding processing across
299 multiple Intel's Xeon processors to achieve a real advantage of processing
301 (home-page "https://01.org/svt")
302 (license (license:non-copyleft "file:///LICENSE.md"))))
304 (define-public mediasdk
313 (url "https://github.com/Intel-Media-SDK/MediaSDK.git")
314 (commit (string-append "intel-" name "-" version))))
315 (file-name (git-file-name name version))
317 (base32 "0blwcxr5j8762nylx2cxrq0h53bpgnk859dbs6crq4wr9fcxlx9z"))))
318 (build-system cmake-build-system)
323 "-DENABLE_X11_DRI3=ON"
324 "-DENABLE_WAYLAND=ON"
325 "-DENABLE_TEXTLOG=ON"
329 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
330 (assoc-ref %outputs "out") "/lib"))))
332 `(("pkg-config" ,pkg-config)
333 ("python" ,python-wrapper)))
337 ("pciaccess" ,libpciaccess)
340 (synopsis "Intel Media SDK")
341 (description "MediaSDK provides a plain C API to access hardware-accelerated
342 video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
343 (home-page "http://mediasdk.intel.com/")
344 (license (license:non-copyleft "file:///LICENSE"))))
346 (define-public schroedinger
348 (name "schroedinger")
354 (string-append "https://launchpad.net/" name "/trunk/" version
355 "/+download/" name "-" version ".tar.gz"))
357 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
358 (build-system gnu-build-system)
359 (outputs '("out" "doc"))
362 (modify-phases %standard-phases
363 (add-after 'install 'move-docs
364 (lambda* (#:key outputs #:allow-other-keys)
365 (let* ((out (assoc-ref outputs "out"))
366 (doc (assoc-ref outputs "doc")))
367 (mkdir-p (string-append doc "/share"))
369 (string-append out "/share/gtk-doc")
370 (string-append doc "/share/gtk-doc"))
375 ("pkg-config" ,pkg-config)))
381 (synopsis "Dirac video codec")
382 (description "Schroedinger is a project implementing the Dirac video codec in
383 ANSI C code. It is meant to be highly optimized and portable. It is developed
384 as a joint effort between the BBC and Fluendo.")
385 (home-page "https://launchpad.net/schroedinger")
387 ;; This library is licensed under 4 different licenses,
388 ;; and you can choose to use it under the terms of any one of them.
395 (define-public libquicktime
397 (name "libquicktime")
403 (string-append "https://sourceforge.net/projects/" name "/files/"
404 name "/" version "/" name "-" version ".tar.gz"))
406 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
408 (search-patches "libquicktime-ffmpeg.patch"))))
409 (build-system gnu-build-system)
411 `(("gettext" ,gettext-minimal)
413 ("pkg-config" ,pkg-config)))
420 ("libjpeg" ,libjpeg-turbo)
422 ("libvorbis" ,libvorbis)
424 ("schroedinger" ,schroedinger)
429 (synopsis "Quick Time Library")
430 (description "The goal of this project is to enhance the quicktime4linux
432 (home-page "http://libquicktime.sourceforge.net/")
433 (license license:lgpl2.1+)))
435 (define-public mjpegtools
443 (string-append "https://sourceforge.net/projects/" name "/files/"
444 name "/" version "/" name "-" version ".tar.gz"))
446 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
447 (build-system gnu-build-system)
452 ("libquicktime" ,libquicktime)
454 (synopsis "Tools for handling MPEG")
455 (description "Mjpeg tools is a suite of programs which support video capture,
456 editing, playback, and compression to MPEG of MJPEG video. Edit, play and
457 compression software is hardware independent.")
458 (home-page "http://mjpeg.sourceforge.net/")
459 (license license:gpl2+)))
461 (define-public libmms
469 (string-append "https://sourceforge.net/projects/" name "/files/"
470 name "/" version "/" name "-" version ".tar.gz"))
472 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
473 (build-system gnu-build-system)
474 (synopsis "MMS stream protocol library")
475 (description "Libmms is a library for streaming media files using the mmst
476 and mmsh protocols.")
477 (home-page "https://sourceforge.net/projects/libmms/")
478 (license license:lgpl2.1+)))
480 (define-public libvideogfx
489 (url "https://github.com/farindk/libvideogfx.git")
490 (commit (string-append "v" version))))
491 (file-name (git-file-name name version))
493 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
494 (build-system gnu-build-system)
497 (modify-phases %standard-phases
498 (add-after 'unpack 'fix-build-errors
500 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
501 (("av_close_input_file\\(")
502 "avformat_close_input(&"))
503 (substitute* "libvideogfx/graphics/fileio/png.cc"
504 (("is != NULL") "is.good()"))
507 `(("autoconf" ,autoconf)
508 ("automake" ,automake)
510 ("pkg-config" ,pkg-config)))
512 `(("ffmpeg" ,ffmpeg-2.8)
513 ("jpeg" ,libjpeg-turbo)
517 (synopsis "Video processing library")
518 (description "LibVideoGfx is a C++ library for low-level video processing.
519 It aims at speeding up the development process for image and video processing
520 applications by providing high-level classes for commonly required tasks.")
521 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
522 (license license:lgpl2.1+)))
524 (define-public libde265
533 (url "https://github.com/strukturag/libde265.git")
534 (commit (string-append "v" version))))
535 (file-name (git-file-name name version))
537 (base32 "0ipccyavlgf7hfzx1g8bvzg62xq10vcxvwgq70r3z3j6mdvmrzjp"))))
538 (build-system gnu-build-system)
541 (list "--disable-static")))
543 `(("autoconf" ,autoconf)
544 ("automake" ,automake)
546 ("pkg-config" ,pkg-config)
547 ("python" ,python-wrapper)))
549 `(;; XXX: Build fails with libvideogfx.
550 ;; ("libvideogfx" ,libvideogfx)
553 (synopsis "H.265 video codec implementation")
554 (description "Libde265 is an implementation of the h.265 video codec. It is
555 written from scratch and has a plain C API to enable a simple integration into
557 (home-page "https://www.libde265.org/")
574 (url "https://github.com/libts/tslib.git")
576 (file-name (git-file-name name version))
578 (base32 "197p6vy539wvfrv23agbvmay4rjya1jnisi46llm0nx4cvqh48by"))))
579 (build-system gnu-build-system)
581 `(#:test-target "tests"
583 (list "--with-sdl2")))
585 `(("autoconf" ,autoconf)
586 ("automake" ,automake)
588 ("pkg-config" ,pkg-config)))
590 `(("linux-headers" ,linux-libre-headers)
592 (synopsis "Touchscreen access library")
593 (description "TSLib is a cross-platform library that provides access to
594 touchscreen devices and the ability to apply filters to their input events.")
595 (home-page "http://www.tslib.org/")
596 (license license:lgpl2.1+)))
598 (define-public libmpeg3
606 (string-append "https://sourceforge.net/projects/heroines/files/"
607 "releases/081108/" name "-" version "-src.tar.bz2"))
609 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
610 (build-system gnu-build-system)
612 `(#:test-target "test"
615 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
616 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
618 (modify-phases %standard-phases
619 (add-after 'unpack 'delete-bundled-a52dec
621 (delete-file-recursively "a52dec-0.7.3")
622 (substitute* "Makefile"
623 (("include Makefile\\.a52")
625 (("\\(A52DIR\\)/include")
626 "(A52DIR)/include/a52dec")
628 (string-append match "-la52 ")))
630 (add-before 'install 'create-destination-directory
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (string-append (assoc-ref outputs "out"))))
633 (mkdir-p (string-append out "/bin"))
638 `(("liba52" ,liba52)))
639 (synopsis "Advanced MPEG editing and manipulation library")
640 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
641 and DVD footage in a single library. It supports many esoteric features like
642 parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
644 (home-page "http://heroinewarrior.com/libmpeg3.php")
645 (license license:gpl2+)))
653 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
654 version "/" name "-" version ".tar.gz"))
657 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
658 (build-system gnu-build-system)
660 `(("makeinfo" ,texinfo)))
662 `(("ncurses" ,ncurses)))
665 (modify-phases %standard-phases
667 (lambda* (#:key build inputs outputs #:allow-other-keys)
668 ;; This old `configure' script doesn't support
669 ;; variables passed as arguments.
670 (let ((out (assoc-ref outputs "out"))
671 (ncurses (assoc-ref inputs "ncurses")))
672 (setenv "CONFIG_SHELL" (which "bash"))
673 (invoke "./configure"
674 (string-append "--prefix=" out)
675 (string-append "--build=" build)
676 ;; The ancient config.guess is unable to
677 ;; guess the host triplet on mips64el.
678 ,@(if (string=? "mips64el-linux"
680 '("--host=mips64el-unknown-linux-gnu")
682 ;; The same is also true with aarch64.
683 ,@(if (string=? "aarch64-linux"
685 '("--host=aarch64-unknown-linux-gnu")
687 (string-append "--with-ncurses="
689 (home-page "http://aa-project.sourceforge.net/aalib/")
690 (synopsis "ASCII-art library")
692 "AA-lib is a low level gfx library which does not require graphics device.
693 In fact, there is no graphical output possible. AA-lib replaces those
694 old-fashioned output methods with powerful ascii-art renderer.")
695 (license license:lgpl2.0+)))
697 (define-public celluloid
704 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
705 "/download/v" version "/celluloid-" version ".tar.xz"))
707 (base32 "1s3qkism96gi44incvsb6rqg255qcvjvw61ya7nw30md0sapj4sl"))))
708 (build-system glib-or-gtk-build-system)
710 `(("intltool" ,intltool)
711 ("pkg-config" ,pkg-config)))
714 ("libepoxy" ,libepoxy)
716 (home-page "https://github.com/celluloid-player/celluloid")
717 (synopsis "GTK+ frontend for the mpv media player")
718 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
719 It interacts with mpv via the client API exported by libmpv, allowing access to
720 mpv's powerful playback capabilities.")
721 (license license:gpl3+)))
723 (define-public liba52
730 ;; A mirror://sourceforge URI doesn't work, presumably
731 ;; because the SourceForge project is misconfigured.
732 "http://liba52.sourceforge.net/files/a52dec-" version
736 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
737 (patches (search-patches "liba52-enable-pic.patch"
738 "liba52-set-soname.patch"
739 "liba52-use-mtune-not-mcpu.patch"
740 "liba52-link-with-libm.patch"))))
741 (build-system gnu-build-system)
742 ;; XXX We need to run ./bootstrap because of the build system fixes above.
744 `(("autoconf" ,autoconf)
745 ("automake" ,automake)
746 ("libtool" ,libtool)))
747 (arguments `(#:configure-flags '("--enable-shared")
749 (modify-phases %standard-phases
750 ;; XXX We need to run ./bootstrap because of the build
751 ;; system fixes above.
753 (lambda _ (invoke "sh" "bootstrap"))))))
754 (home-page "http://liba52.sourceforge.net/")
755 (synopsis "ATSC A/52 stream decoder")
756 (description "liba52 is a library for decoding ATSC A/52 streams. The
757 A/52 standard is used in a variety of applications, including digital
758 television and DVD. It is also known as AC-3.")
759 (license license:gpl2+)))
761 (define-public libaom
768 (url "https://aomedia.googlesource.com/aom/")
769 (commit (string-append "v" version))))
770 (file-name (git-file-name name version))
773 "1616xjhj6770ykn82ml741h8hx44v507iky3s9h7a5lnk9d4cxzy"))))
774 (build-system cmake-build-system)
777 ("pkg-config" ,pkg-config)
778 ("python" ,python))) ; to detect the version
780 `(#:tests? #f ;no check target
782 ;; build dynamic library
783 (list "-DBUILD_SHARED_LIBS=YES"
785 "-DAOM_TARGET_CPU=generic"
786 (string-append "-DCMAKE_INSTALL_PREFIX="
787 (assoc-ref %outputs "out")))))
788 (home-page "https://aomedia.googlesource.com/aom/")
789 (synopsis "AV1 video codec")
790 (description "Libaom is the reference implementation of AV1. It includes a
791 shared library and encoder and decoder command-line executables.")
792 (license license:bsd-2)))
794 (define-public libmpeg2
800 ;; A mirror://sourceforge URI doesn't work, presumably
801 ;; because the SourceForge project is misconfigured.
802 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
803 name "-" version ".tar.gz"))
804 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
805 "libmpeg2-global-symbol-test.patch"))
808 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
816 (build-system gnu-build-system)
817 (home-page "http://libmpeg2.sourceforge.net/")
818 (synopsis "MPEG1 and MPEG2 video decoder library")
820 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
821 (license license:gpl2+)))
823 (define-public libx264
824 ;; There are no tags in the repository, so we take the version number from
825 ;; the X264_BUILD variable defined in x264.h.
826 (let ((version "159")
827 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
831 (version (git-version version revision commit))
835 (url "https://code.videolan.org/videolan/x264.git")
837 (file-name (git-file-name name version))
840 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
841 (build-system gnu-build-system)
843 `(("pkg-config" ,pkg-config)
845 ;; TODO: Add gpac input
847 `(#:tests? #f ;no check target
848 #:configure-flags '("--enable-shared"
849 ;; Don't build the command-line program. If we
850 ;; want it later, we should do so in a different
851 ;; package to avoid a circular dependency (the x264
852 ;; program depends on ffmpeg and ffmpeg depends on
856 ;; On MIPS, we must pass "--disable-asm" or else
857 ;; configure fails after printing: "You specified a
858 ;; pre-MSA CPU in your CFLAGS. If you really want
859 ;; to run on such a CPU, configure with
861 ,@(if (string-prefix? "mips"
862 (or (%current-target-system)
866 (home-page "https://www.videolan.org/developers/x264.html")
867 (synopsis "H.264 video coding library")
868 (description "libx264 is an advanced encoding library for creating
869 H.264 (MPEG-4 AVC) video streams.")
870 (license (list license:gpl2+ ;most files
871 license:isc ;common/x86/x86inc.asm
872 license:lgpl2.1+ ;extras/getopt.c
873 license:bsd-3 ;extras/inttypes.h
874 (license:non-copyleft ;extras/cl*.h
876 "See extras/cl.h in the distribution."))))))
878 (define-public mkvtoolnix
885 (uri (string-append "https://mkvtoolnix.download/sources/"
886 "mkvtoolnix-" version ".tar.xz"))
888 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
889 (modules '((guix build utils)))
891 ;; Delete bundled libraries.
892 (for-each delete-file-recursively
900 (build-system gnu-build-system)
901 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
910 ("libmatroska" ,libmatroska)
912 ("libvorbis" ,libvorbis)
916 ("qtmultimedia" ,qtmultimedia)
920 `(("docbook-xsl" ,docbook-xsl)
921 ("gettext" ,gettext-minimal)
922 ("googletest" ,googletest)
924 ("json-modern-cxx" ,json-modern-cxx)
926 ("pkg-config" ,pkg-config)
932 (list (string-append "--with-boost="
933 (assoc-ref %build-inputs "boost"))
934 (string-append "--with-docbook-xsl-root="
935 (assoc-ref %build-inputs "docbook-xsl")
936 "/xml/xsl/docbook-xsl-"
937 ,(package-version docbook-xsl))
938 "--enable-update-check=no"
939 "--enable-precompiled-headers=no")
941 (modify-phases %standard-phases
942 (add-after 'unpack 'patch-relative-file-names
943 (lambda* (#:key outputs #:allow-other-keys)
944 (let ((out (assoc-ref outputs "out")))
945 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
947 (string-append out "/bin/" match)))
949 (add-before 'configure 'add-googletest
950 (lambda* (#:key inputs #:allow-other-keys)
952 (string-append (assoc-ref inputs "googletest")
953 "/include/gtest") "lib/gtest")
957 (let ((-j (list "-j" (number->string (parallel-job-count)))))
958 (apply invoke "rake" -j))))
961 (invoke "rake" "tests/unit")))
964 (invoke "rake" "install")))
965 (add-after 'install 'post-install
966 (lambda* (#:key outputs #:allow-other-keys)
967 ;; Move the Qt interface to "gui".
968 (let* ((out (assoc-ref outputs "out"))
969 (gui (assoc-ref outputs "gui"))
970 (strip-store-dir (lambda (path)
971 (substring path (string-prefix-length out path)))))
974 (mkdir-p (string-append gui (dirname file)))
975 (rename-file (string-append out file)
976 (string-append gui file)))
977 (append '("/bin/mkvtoolnix-gui"
978 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
979 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
980 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
981 (map strip-store-dir (find-files out "\\.ogg$"))
982 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
983 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
986 (delete-file-recursively (string-append out file)))
987 '("/share/applications"
990 "/share/mkvtoolnix")))
992 (home-page "https://mkvtoolnix.download")
993 (synopsis "Tools to create, alter and inspect Matroska files")
995 "MKVToolNix provides tools for getting information about Matroska files
996 (@command{mkvinfo}), extracting tracks/data from Matroska files
997 (@command{mkvextract}), and creating Matroska files from other media files
998 (@command{mkvmerge}).")
999 (license license:gpl2)))
1001 (define-public straw-viewer
1003 (name "straw-viewer")
1009 (url "https://github.com/trizen/straw-viewer")
1011 (file-name (git-file-name name version))
1013 (base32 "11ywip9ck2rgyj8s1pyr6za3si0bnx8rl2f3cv84xgcq36ac3rv4"))))
1014 (build-system perl-build-system)
1016 `(("perl-module-build" ,perl-module-build)
1017 ("perl-test-pod" ,perl-test-pod)))
1019 `(("perl-data-dump" ,perl-data-dump)
1020 ("perl-json" ,perl-json)
1021 ("perl-libwww" ,perl-libwww)
1022 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1023 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
1024 ("perl-mozilla-ca" ,perl-mozilla-ca)
1025 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
1026 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
1027 ("xdg-utils" ,xdg-utils)
1029 ;; Some videos play without youtube-dl, but others silently fail to.
1030 ("youtube-dl" ,youtube-dl)))
1032 ;; Required only when building the graphical interface (--gtk).
1033 ;;("perl-file-sharedir" ,perl-file-sharedir)
1035 `(#:modules ((guix build perl-build-system)
1039 (modify-phases %standard-phases
1040 (add-after 'unpack 'refer-to-inputs
1041 (lambda* (#:key inputs #:allow-other-keys)
1042 (substitute* "lib/WWW/StrawViewer.pm"
1044 (format #f "'~a/bin/youtube-dl'"
1045 (assoc-ref inputs "youtube-dl"))))
1046 (substitute* "bin/gtk-straw-viewer"
1048 (format #f "'~a/bin/xdg-open'"
1049 (assoc-ref inputs "xdg-utils"))))
1051 ;; (add-after 'install 'install-desktop
1052 ;; (lambda* (#:key outputs #:allow-other-keys)
1053 ;; (let* ((out (assoc-ref outputs "out"))
1054 ;; (sharedir (string-append out "/share")))
1055 ;; (install-file "share/gtk-straw-viewer.desktop"
1056 ;; (string-append sharedir "/applications"))
1057 ;; (install-file "share/icons/gtk-straw-viewer.png"
1058 ;; (string-append sharedir "/pixmaps"))
1060 (add-after 'install 'wrap-program
1061 (lambda* (#:key outputs #:allow-other-keys)
1062 (let* ((out (assoc-ref outputs "out"))
1063 (bin-dir (string-append out "/bin/"))
1064 (site-dir (string-append out "/lib/perl5/site_perl/"))
1065 (lib-path (getenv "PERL5LIB")))
1066 (for-each (cut wrap-program <>
1067 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1068 (find-files bin-dir))
1071 "Light-weight application for searching and streaming videos from YouTube")
1073 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
1074 invidio.us} and plays them locally in a native media player like @command{vlc}
1077 You can search for videos, playlists, and/or channels. The videos are streamed
1078 directly to the player at the best chosen resolution and with closed captions if
1080 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
1081 ;; Both a command-line and a graphical interface are available.
1082 (home-page "https://github.com/trizen/youtube-viewer")
1083 (license license:perl-license)))
1089 (outputs '("out" "static"))
1093 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
1094 "/downloads/x265_" version ".tar.gz")
1095 (string-append "https://download.videolan.org/videolan/x265/"
1096 "x265_" version ".tar.gz")))
1098 (base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
1099 (patches (search-patches "x265-arm-flags.patch"))
1100 (modules '((guix build utils)))
1102 (delete-file-recursively "source/compat/getopt")
1104 (build-system cmake-build-system)
1106 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1107 (if (string-prefix? "i686" (%current-system))
1111 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
1113 ;; Ensure position independent code for everyone.
1114 (list "-DENABLE_PIC=TRUE"
1116 '("-DENABLE_ASSEMBLY=OFF")
1118 (string-append "-DCMAKE_INSTALL_PREFIX="
1119 (assoc-ref %outputs "out")))
1121 (modify-phases %standard-phases
1122 (add-after 'unpack 'prepare-build
1124 (delete-file-recursively "build")
1127 (add-before 'configure 'build-12-bit
1128 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1129 (mkdir "../build-12bit")
1130 (with-directory-excursion "../build-12bit"
1133 "-DHIGH_BIT_DEPTH=ON"
1134 "-DEXPORT_C_API=OFF"
1138 (substitute* (cons "cmake_install.cmake"
1140 (find-files "CMakeFiles/x265-shared.dir" ".")
1141 (find-files "CMakeFiles/x265-static.dir" ".")))
1142 (("libx265") "libx265_main12"))
1144 (add-before 'configure 'build-10-bit
1145 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1146 (mkdir "../build-10bit")
1147 (with-directory-excursion "../build-10bit"
1150 "-DHIGH_BIT_DEPTH=ON"
1151 "-DEXPORT_C_API=OFF"
1154 (substitute* (cons "cmake_install.cmake"
1156 (find-files "CMakeFiles/x265-shared.dir" ".")
1157 (find-files "CMakeFiles/x265-static.dir" ".")))
1158 (("libx265") "libx265_main10"))
1160 (add-after 'install 'install-more-libs
1162 (with-directory-excursion "../build-12bit"
1163 (invoke "make" "install"))
1164 (with-directory-excursion "../build-10bit"
1165 (invoke "make" "install"))))
1166 (add-before 'strip 'move-static-libs
1167 (lambda* (#:key outputs #:allow-other-keys)
1168 (let ((out (assoc-ref outputs "out"))
1169 (static (assoc-ref outputs "static")))
1170 (mkdir-p (string-append static "/lib"))
1171 (with-directory-excursion
1172 (string-append out "/lib")
1176 (string-append static "/lib/" file)))
1177 (find-files "." "\\.a$"))))
1179 (home-page "http://x265.org/")
1180 (synopsis "Library for encoding h.265/HEVC video streams")
1181 (description "x265 is a H.265 / HEVC video encoder application library,
1182 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1183 (license license:gpl2+)))
1185 (define-public libass
1192 "https://github.com/libass/libass/releases/download/"
1193 version "/libass-" version ".tar.xz"))
1196 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
1197 (build-system gnu-build-system)
1199 `(("pkg-config" ,pkg-config)
1202 `(("freetype" ,freetype)
1203 ("fribidi" ,fribidi)
1204 ("fontconfig" ,fontconfig)
1205 ("harfbuzz" ,harfbuzz)
1207 (home-page "https://github.com/libass/libass")
1208 (synopsis "Subtitle rendering library for the ASS/SSA format")
1209 (description "libass is a subtitle rendering library for the
1210 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
1211 (license license:isc)))
1213 (define-public libcaca
1216 (version "0.99.beta19")
1219 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1223 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
1224 (build-system gnu-build-system)
1225 (native-inputs `(("pkg-config" ,pkg-config)))
1227 `(("freeglut" ,freeglut)
1232 ("ncurses" ,ncurses)
1234 (home-page "http://caca.zoy.org/wiki/libcaca")
1235 (synopsis "Colour ASCII-art library")
1236 (description "libcaca is a graphics library that outputs text instead of
1237 pixels, so that it can work on older video cards or text terminals. It
1238 supports Unicode, 2048 colors, dithering of color images, and advanced text
1239 canvas operations.")
1240 (license license:wtfpl2)))
1242 (define-public libdca
1249 "https://download.videolan.org/pub/videolan/libdca/"
1250 version "/libdca-" version ".tar.bz2"))
1253 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
1254 (build-system gnu-build-system)
1256 `(("autoconf" ,autoconf)
1257 ("automake" ,automake)
1258 ("libtool" ,libtool)))
1259 (home-page "https://www.videolan.org/developers/libdca.html")
1260 (synopsis "DTS Coherent Acoustics decoder")
1261 (description "libdca is a library for decoding DTS Coherent Acoustics
1263 (license license:gpl2+)))
1265 (define-public libdv
1272 "mirror://sourceforge/libdv/libdv/"
1273 version "/libdv-" version ".tar.gz"))
1276 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1277 (build-system gnu-build-system)
1278 (native-inputs `(("pkg-config" ,pkg-config)))
1279 (inputs `(("libxv" ,libxv)))
1280 (home-page "http://libdv.sourceforge.net/")
1281 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1282 (description "The Quasar DV codec (libdv) is a software codec for DV
1283 video, the encoding format used by most digital camcorders, typically those
1284 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1285 developed according to the official standards for DV video: IEC 61834 and
1287 (license license:lgpl2.1+)))
1289 (define-public libmatroska
1291 (name "libmatroska")
1296 (uri (string-append "https://dl.matroska.org/downloads/"
1297 "libmatroska/libmatroska-" version ".tar.xz"))
1299 (base32 "140r3q6n4a0n11zaf76lvyxd9gp435dgm8gn7mj0gar2hjm7ji5w"))))
1300 (build-system cmake-build-system)
1302 `(("libebml" ,libebml)))
1305 (list "-DBUILD_SHARED_LIBS=YES")
1306 #:tests? #f)) ; no test suite
1307 (home-page "https://www.matroska.org")
1308 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
1310 "Matroska aims to become the standard of multimedia container formats.
1311 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
1312 of XML. EBML enables the Matroska Development Team to gain significant
1313 advantages in terms of future format extensibility, without breaking file
1314 support in old parsers.
1315 libebml is a C++ library to read and write EBML files.")
1316 (license license:lgpl2.1)))
1318 (define-public libva
1326 ;; Newer releases are only available on GitHub.
1327 (string-append "https://github.com/01org/libva/releases/download/"
1328 version "/libva-" version ".tar.bz2")
1329 ;; Keep the old URL around for compatibility.
1330 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
1331 "libva/libva-" version "/libva-" version ".tar.bz2")))
1333 (base32 "014av7ayyc624xfmr63xhbgg7nw8fynsswj1g2wmk4lnkyfz23x0"))))
1334 (build-system gnu-build-system)
1336 `(("pkg-config" ,pkg-config)))
1338 `(("libdrm" ,libdrm)
1340 ("libxext" ,libxext)
1341 ("libxfixes" ,libxfixes)
1343 ("wayland" ,wayland)))
1346 (modify-phases %standard-phases
1348 'build 'fix-dlopen-paths
1349 (lambda* (#:key outputs #:allow-other-keys)
1350 (let ((out (assoc-ref outputs "out")))
1351 (substitute* "va/drm/va_drm_auth_x11.c"
1352 (("\"libva-x11\\.so\\.%d\"")
1353 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
1355 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1356 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1358 (list (string-append "--with-drivers-path="
1359 (assoc-ref %build-inputs "mesa") "/lib/dri"))
1360 ;; However, we can't write to mesa's store directory, so override the
1361 ;; following make variable to install the dummy driver to libva's
1362 ;; $prefix/lib/dri directory.
1364 (list (string-append "dummy_drv_video_ladir="
1365 (assoc-ref %outputs "out") "/lib/dri"))))
1366 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
1367 (synopsis "Video acceleration library")
1368 (description "The main motivation for VA-API (Video Acceleration API) is
1369 to enable hardware accelerated video decode/encode at various
1370 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1371 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
1372 (license license:expat)))
1374 (define-public libva-utils
1376 (name "libva-utils")
1381 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1382 version "/libva-utils-" version ".tar.bz2"))
1384 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1385 (build-system gnu-build-system)
1388 (list "--enable-wayland"
1391 `(("pkg-config" ,pkg-config)))
1393 `(("libdrm" ,libdrm)
1397 ("wayland" ,wayland)))
1398 (home-page "https://01.org/linuxmedia/vaapi")
1399 (synopsis "Collection of testing utilities for VA-API")
1401 "This is a collection of utilities to query and test the @acronym{VA-API,
1402 Video Acceleration API} implemented by the libva library.
1404 These tools require a supported graphics chip, driver, and VA-API back end to
1406 (license license:expat)))
1408 (define-public ffmpeg
1414 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1418 "1yrg9nri54iav86vxy5i8pj51dhikksa04x20d77nc3fsi09405d"))))
1419 (build-system gnu-build-system)
1422 ("fontconfig" ,fontconfig)
1423 ("freetype" ,freetype)
1424 ("frei0r-plugins" ,frei0r-plugins)
1431 ("libbluray" ,libbluray)
1432 ("libcaca" ,libcaca)
1433 ("libcdio-paranoia" ,libcdio-paranoia)
1435 ("libtheora" ,libtheora)
1437 ("libvdpau" ,libvdpau)
1438 ("libvorbis" ,libvorbis)
1441 ("libx264" ,libx264)
1444 ("pulseaudio" ,pulseaudio)
1445 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1446 ;; See also the related configure flag when changing this.
1447 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1454 ("twolame" ,twolame)
1455 ("vidstab" ,vidstab)
1462 ("pkg-config" ,pkg-config)
1463 ("texinfo" ,texinfo)
1464 ("python" ,python-2) ; scripts use interpreter python2
1468 `(#:test-target "fate"
1470 ;; possible additional inputs:
1471 ;; --enable-avisynth enable reading of AviSynth script
1473 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1474 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1475 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1476 ;; and libraw1394 [no]
1477 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1478 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1479 ;; --enable-libflite enable flite (voice synthesis) support via
1481 ;; --enable-libgme enable Game Music Emu via libgme [no]
1482 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1483 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1484 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1485 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1486 ;; --enable-libnut enable NUT (de)muxing via libnut,
1487 ;; native (de)muxer exists [no]
1488 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1489 ;; libopencore-amrnb [no]
1490 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1491 ;; libopencore-amrwb [no]
1492 ;; --enable-libopencv enable video filtering via libopencv [no]
1493 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1495 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1496 ;; --enable-libschroedinger enable Dirac de/encoding via
1497 ;; libschroedinger [no]
1498 ;; --enable-libshine enable fixed-point MP3 encoding via
1500 ;; --enable-libssh enable SFTP protocol via libssh [no]
1501 ;; (libssh2 does not work)
1502 ;; --enable-libstagefright-h264 enable H.264 decoding via
1503 ;; libstagefright [no]
1504 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1506 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
1507 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1508 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1509 ;; libvo-amrwbenc [no]
1510 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1511 ;; --enable-libxavs enable AVS encoding via xavs [no]
1512 ;; --enable-libzmq enable message passing via libzmq [no]
1513 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1514 ;; --enable-opencl enable OpenCL code
1515 '("--enable-avresample"
1516 "--enable-gpl" ; enable optional gpl licensed parts
1519 "--enable-fontconfig"
1524 "--enable-libbluray"
1528 "--enable-libfreetype"
1529 "--enable-libmp3lame"
1532 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1534 '("--enable-librav1e")
1538 "--enable-libtheora"
1539 "--enable-libtwolame"
1540 "--enable-libvidstab"
1541 "--enable-libvorbis"
1550 "--enable-runtime-cpudetect"
1552 ;; The HTML pages take 7.2 MiB
1553 "--disable-htmlpages"
1555 ;; The static libraries are 23 MiB
1558 ;; Runtime cpu detection is not implemented on
1559 ;; MIPS, so we disable some features.
1560 "--disable-mips32r2"
1562 "--disable-mipsdspr2"
1563 "--disable-mipsfpu")
1565 (modify-phases %standard-phases
1568 ;; configure does not work followed by "SHELL=..." and
1569 ;; "CONFIG_SHELL=..."; set environment variables instead
1570 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1571 (let ((out (assoc-ref outputs "out")))
1572 (substitute* "configure"
1573 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1574 (setenv "SHELL" (which "bash"))
1575 (setenv "CONFIG_SHELL" (which "bash"))
1578 (string-append "--prefix=" out)
1579 ;; Add $libdir to the RUNPATH of all the binaries.
1580 (string-append "--extra-ldflags=-Wl,-rpath="
1584 'check 'set-ld-library-path
1586 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1588 (let* ((dso (find-files "." "\\.so$"))
1589 (path (string-join (map dirname dso) ":")))
1590 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1591 (setenv "LD_LIBRARY_PATH" path)
1593 (home-page "https://www.ffmpeg.org/")
1594 (synopsis "Audio and video framework")
1595 (description "FFmpeg is a complete, cross-platform solution to record,
1596 convert and stream audio and video. It includes the libavcodec
1597 audio/video codec library.")
1598 (license license:gpl2+)))
1600 ;; ungoogled-chromium crashes with ffmpeg 4.3, so stick with this version for
1601 ;; now. See <https://issues.guix.gnu.org/41987>.
1602 (define-public ffmpeg-4.2
1608 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1612 "0cddkb5sma9dzy8i59sfls19rhjlq40zn9mh3x666dqkxl5ckxlx"))))
1614 (substitute-keyword-arguments (package-arguments ffmpeg)
1615 ((#:configure-flags flags)
1616 `(delete "--enable-librav1e" ,flags))))))
1618 (define-public ffmpeg-3.4
1624 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1628 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
1630 (substitute-keyword-arguments (package-arguments ffmpeg)
1631 ((#:configure-flags flags)
1632 `(delete "--enable-libdav1d" (delete "--enable-libaom" (delete "--enable-librav1e"
1634 (inputs (alist-delete "dav1d" (alist-delete "libaom" (alist-delete "rav1e"
1635 (package-inputs ffmpeg)))))))
1637 (define-public ffmpeg-2.8
1643 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1647 "14n0xg22yz1r4apif2idm91s3avcmkz4sl8gyj5763gcy415k2bb"))))
1649 `(#:tests? #f ; XXX: Enable them later, if required
1654 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1656 (modify-phases %standard-phases
1658 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1659 (let ((out (assoc-ref outputs "out")))
1660 (substitute* "configure"
1661 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1662 ;; configure does not work followed by "SHELL=..." and
1663 ;; "CONFIG_SHELL=..."; set environment variables instead.
1664 (setenv "SHELL" (which "bash"))
1665 (setenv "CONFIG_SHELL" (which "bash"))
1668 (string-append "--prefix=" out)
1669 ;; Add $libdir to the RUNPATH of all the binaries.
1670 (string-append "--extra-ldflags=-Wl,-rpath="
1674 'check 'set-ld-library-path
1676 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1678 (let* ((dso (find-files "." "\\.so$"))
1679 (path (string-join (map dirname dso) ":")))
1680 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1681 (setenv "LD_LIBRARY_PATH" path)
1684 (define-public ffmpeg-for-stepmania
1693 (url "https://github.com/stepmania/ffmpeg")
1694 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1696 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1697 (file-name (git-file-name "ffmpeg" version))))
1699 (substitute-keyword-arguments (package-arguments ffmpeg)
1700 ((#:configure-flags flags)
1701 '(list "--disable-programs"
1704 "--disable-avdevice"
1705 "--disable-swresample"
1706 "--disable-postproc"
1707 "--disable-avfilter"
1709 "--enable-static"))))
1712 (define-public ffmpegthumbnailer
1714 (name "ffmpegthumbnailer")
1719 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
1721 (file-name (git-file-name name version))
1724 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
1725 (build-system cmake-build-system)
1727 `(("pkg-config" ,pkg-config)))
1729 `(("ffmpeg" ,ffmpeg)
1730 ("libjpeg-turbo" ,libjpeg-turbo)
1734 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1735 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1736 (synopsis "Create thumbnails from video files")
1737 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1738 can be used by file managers to create thumbnails for your video files. The
1739 thumbnailer uses ffmpeg to decode frames from the video files, so supported
1740 videoformats depend on the configuration flags of ffmpeg.")
1741 (license license:gpl2+)))
1746 (version "3.0.11.1")
1750 "https://download.videolan.org/pub/videolan/vlc/"
1751 (car (string-split version #\-))
1752 "/vlc-" version ".tar.xz"))
1755 "1f46h0hv7fk35zg4iczlp7ib7h2jmh8m4r5klw3g2558ib9134qq"))))
1756 (build-system gnu-build-system)
1760 ("gettext" ,gettext-minimal)
1761 ("pkg-config" ,pkg-config)))
1762 ;; FIXME: Add optional inputs once available.
1764 `(("alsa-lib" ,alsa-lib)
1770 ("fontconfig" ,fontconfig)
1771 ("freetype" ,freetype)
1772 ("fribidi" ,fribidi)
1775 ("libarchive" ,libarchive)
1777 ("libavc1394" ,libavc1394)
1778 ("libbluray" ,libbluray)
1779 ("libcaca" ,libcaca)
1780 ("libcddb" ,libcddb)
1782 ("libdvbpsi" ,libdvbpsi)
1783 ("libdvdnav" ,libdvdnav)
1784 ("libdvdread" ,libdvdread)
1785 ("libebml" ,libebml)
1786 ("libgcrypt" ,libgcrypt)
1788 ("libkate" ,libkate)
1790 ("libmatroska" ,libmatroska)
1791 ("libmicrodns" ,libmicrodns)
1792 ("libmodplug" ,libmodplug)
1793 ("libmpeg2" ,libmpeg2)
1796 ("libraw1394" ,libraw1394)
1797 ("librsvg" ,librsvg)
1798 ("libsamplerate" ,libsamplerate)
1799 ("libsecret" ,libsecret)
1800 ("libssh2" ,libssh2)
1801 ("libupnp" ,libupnp)
1803 ("libvdpau" ,libvdpau)
1804 ("libvorbis" ,libvorbis)
1806 ("libtheora" ,libtheora)
1807 ("libx264" ,libx264)
1808 ("libxext" ,libxext)
1810 ("libxinerama" ,libxinerama)
1811 ("libxml2" ,libxml2)
1813 ("livemedia-utils" ,livemedia-utils)
1818 ("pulseaudio" ,pulseaudio)
1819 ("protobuf" ,protobuf)
1820 ("python" ,python-wrapper)
1823 ("qtx11extras" ,qtx11extras)
1826 ("sdl-image" ,sdl-image)
1828 ("speexdsp" ,speexdsp)
1830 ("twolame" ,twolame)
1832 ("wayland" ,wayland)
1833 ("wayland-protocols" ,wayland-protocols)
1835 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1839 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1840 (assoc-ref %build-inputs "ffmpeg")
1841 "/lib")) ;needed for the tests
1844 (modify-phases %standard-phases
1845 (add-after 'unpack 'patch-source
1846 (lambda* (#:key inputs #:allow-other-keys)
1847 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1848 (substitute* "configure"
1849 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1850 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1851 ;; Some of the tests require using the display to test out VLC,
1852 ;; which fails in our sandboxed build system
1853 (substitute* "test/run_vlc.sh"
1854 (("./vlc --ignore-config") "echo"))
1856 (add-after 'strip 'regenerate-plugin-cache
1857 (lambda* (#:key outputs #:allow-other-keys)
1858 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1859 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1860 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1861 ;; it references. Thus, we first reset the timestamps of all
1862 ;; these files, and then regenerate the cache such that the
1863 ;; mtimes it includes are always zero instead of being dependent
1864 ;; on the build time.
1865 (let* ((out (assoc-ref outputs "out"))
1866 (pkglibdir (string-append out "/lib/vlc"))
1867 (plugindir (string-append pkglibdir "/plugins"))
1868 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1869 ;; TODO: Factorize 'reset-timestamps'.
1870 (for-each (lambda (file)
1871 (let ((s (lstat file)))
1872 (unless (eq? (stat:type s) 'symlink)
1874 (find-files plugindir))
1875 (invoke cachegen plugindir))))
1876 (add-after 'install 'wrap-executable
1877 (lambda* (#:key outputs #:allow-other-keys)
1878 (let ((out (assoc-ref outputs "out"))
1879 (plugin-path (getenv "QT_PLUGIN_PATH")))
1880 (wrap-program (string-append out "/bin/vlc")
1881 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1883 (home-page "https://www.videolan.org/")
1884 (synopsis "Audio and video framework")
1885 (description "VLC is a cross-platform multimedia player and framework
1886 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1887 streaming protocols.")
1888 (license license:gpl2+)))
1890 (define-public mplayer
1897 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1901 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
1902 (build-system gnu-build-system)
1903 ;; FIXME: Add additional inputs once available.
1905 `(("pkg-config" ,pkg-config)
1908 `(("alsa-lib" ,alsa-lib)
1909 ("cdparanoia" ,cdparanoia)
1911 ("fontconfig" ,fontconfig)
1912 ("freetype" ,freetype)
1916 ("libdvdcss" ,libdvdcss)
1917 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1918 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
1919 ("libjpeg" ,libjpeg-turbo)
1920 ("libmpeg2" ,libmpeg2)
1921 ("libmpg123" ,mpg123) ; audio codec for MP3
1923 ("libtheora" ,libtheora)
1924 ("libvdpau" ,libvdpau)
1925 ("libvorbis" ,libvorbis)
1927 ("libx264" ,libx264)
1928 ("libxinerama" ,libxinerama)
1930 ("libxxf86dga" ,libxxf86dga)
1934 ("pulseaudio" ,pulseaudio)
1935 ("python" ,python-wrapper)
1940 `(#:tests? #f ; no test target
1942 (modify-phases %standard-phases
1944 ;; configure does not work followed by "SHELL=..." and
1945 ;; "CONFIG_SHELL=..."; set environment variables instead
1946 (lambda* (#:key inputs outputs #:allow-other-keys)
1947 (let ((out (assoc-ref outputs "out"))
1948 (libx11 (assoc-ref inputs "libx11")))
1949 (substitute* "configure"
1950 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1951 (setenv "SHELL" (which "bash"))
1952 (setenv "CONFIG_SHELL" (which "bash"))
1953 (invoke "./configure"
1954 (string-append "--extra-cflags=-I"
1955 libx11 "/include") ; to detect libx11
1956 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1957 (string-append "--prefix=" out)
1958 ;; Enable runtime cpu detection where supported,
1959 ;; and choose a suitable target.
1960 ,@(match (or (%current-target-system)
1963 '("--enable-runtime-cpudetection"
1964 "--target=x86_64-linux"))
1966 '("--enable-runtime-cpudetection"
1967 "--target=i686-linux"))
1969 '("--target=mips3-linux"))
1970 (_ (list (string-append
1972 (or (%current-target-system)
1973 (nix-system->gnu-triplet
1974 (%current-system)))))))
1975 "--disable-iwmmxt")))))))
1976 (home-page "https://www.mplayerhq.hu")
1977 (synopsis "Audio and video player")
1978 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1979 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1980 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1981 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1982 (license license:gpl2)))
1991 (url "https://github.com/mpv-player/mpv")
1992 (commit (string-append "v" version))))
1993 (file-name (git-file-name name version))
1996 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1997 (build-system waf-build-system)
1999 `(("perl" ,perl) ; for zsh completion file
2000 ("pkg-config" ,pkg-config)
2001 ("python-docutils" ,python-docutils)))
2002 ;; Missing features: libguess, V4L2
2004 `(("alsa-lib" ,alsa-lib)
2011 ("libbluray" ,libbluray)
2012 ("libcaca" ,libcaca)
2013 ("libbs2b" ,libbs2b)
2014 ("libcdio-paranoia" ,libcdio-paranoia)
2015 ("libdvdread" ,libdvdread)
2016 ("libdvdnav" ,libdvdnav)
2017 ("libjpeg" ,libjpeg-turbo)
2019 ("libvdpau" ,libvdpau)
2021 ("libxext" ,libxext)
2022 ("libxinerama" ,libxinerama)
2023 ("libxrandr" ,libxrandr)
2024 ("libxscrnsaver" ,libxscrnsaver)
2026 ;; XXX: lua > 5.2 is not currently supported; see
2027 ;; waftools/checks/custom.py
2031 ("pulseaudio" ,pulseaudio)
2033 ("shaderc" ,shaderc)
2034 ("vulkan-headers" ,vulkan-headers)
2035 ("vulkan-loader" ,vulkan-loader)
2037 ("wayland" ,wayland)
2038 ("wayland-protocols" ,wayland-protocols)
2039 ("libxkbcommon" ,libxkbcommon)
2040 ("youtube-dl" ,youtube-dl)
2044 (modify-phases %standard-phases
2046 'unpack 'patch-paths
2047 (lambda* (#:key inputs #:allow-other-keys)
2048 (let ((ytdl (assoc-ref inputs "youtube-dl")))
2049 (substitute* "player/lua/ytdl_hook.lua"
2050 (("\"youtube-dl\",")
2051 (string-append "\"" ytdl "/bin/youtube-dl\",")))
2053 (add-before 'configure 'build-reproducibly
2055 ;; Somewhere in the build system library dependencies are enumerated
2056 ;; and passed as linker flags, but the order in which they are added
2057 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
2058 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
2059 (setenv "PYTHONHASHSEED" "1")
2062 'configure 'setup-waf
2063 (lambda* (#:key inputs #:allow-other-keys)
2064 (let ((waf (assoc-ref inputs "waf")))
2065 (copy-file (string-append waf "/bin/waf") "waf"))
2068 #:configure-flags (list "--enable-libmpv-shared"
2071 "--disable-build-date")
2072 ;; No check function defined.
2074 (home-page "https://mpv.io/")
2075 (synopsis "Audio and video player")
2076 (description "mpv is a general-purpose audio and video player. It is a
2077 fork of mplayer2 and MPlayer. It shares some features with the former
2078 projects while introducing many more.")
2079 (license license:gpl2+)))
2081 (define-public gnome-mpv
2082 (deprecated-package "gnome-mpv" celluloid))
2084 (define-public mpv-mpris
2092 (url "https://github.com/hoyon/mpv-mpris")
2094 (file-name (git-file-name name version))
2097 "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk"))))
2098 (build-system copy-build-system)
2101 '(("mpris.so" "lib/"))
2103 (modify-phases %standard-phases
2104 (add-before 'install 'build
2106 (setenv "CC" (which "gcc"))
2107 (invoke "make"))))))
2109 `(("pkg-config" ,pkg-config)))
2113 (home-page "https://github.com/hoyon/mpv-mpris")
2114 (synopsis "MPRIS plugin for mpv")
2115 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2116 Interfacing Specification) plugin for the @code{mpv} media player. It implements
2117 @code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2120 To load this plugin, specify the following option when starting mpv:
2121 @code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2122 @file{$HOME/.config/mpv/scripts}.")
2123 (license license:expat)))
2125 (define-public libvpx
2130 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
2133 (url "https://chromium.googlesource.com/webm/libvpx")
2134 (commit (string-append "v" version))))
2135 (file-name (git-file-name name version))
2138 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
2139 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
2140 (build-system gnu-build-system)
2142 `(#:configure-flags (list "--enable-shared"
2145 ;; Limit size to avoid CVE-2015-1258
2146 "--size-limit=16384x16384"
2147 (string-append "--prefix=" (assoc-ref %outputs "out")))
2148 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2149 (assoc-ref %outputs "out") "/lib"))
2150 #:phases (modify-phases %standard-phases
2152 (lambda* (#:key configure-flags #:allow-other-keys)
2153 ;; The configure script does not understand some of the GNU
2154 ;; options, so we only add the flags specified above.
2155 (apply invoke "./configure" configure-flags))))
2156 #:tests? #f)) ; no check target
2160 (synopsis "VP8/VP9 video codec")
2161 (description "libvpx is a codec for the VP8/VP9 video compression format.")
2162 (license license:bsd-3)
2163 (home-page "https://www.webmproject.org/")))
2165 (define-public youtube-dl
2168 (version "2020.09.14")
2171 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
2172 "releases/download/" version "/youtube-dl-"
2176 "18wfhprbaszpxgqkac3hb050ngvdsaibbcifg88rkv5vc6bc2mq6"))))
2177 (build-system python-build-system)
2179 ;; The problem here is that the directory for the man page and completion
2180 ;; files is relative, and for some reason, setup.py uses the
2181 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2182 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2183 ;; completion file is called 'youtube-dl' rather than
2184 ;; 'youtube-dl.bash-completion'.
2185 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2186 #:phases (modify-phases %standard-phases
2187 (add-before 'install 'fix-the-data-directories
2188 (lambda* (#:key outputs #:allow-other-keys)
2189 (let ((prefix (assoc-ref outputs "out")))
2190 (mkdir "bash-completion")
2191 (rename-file "youtube-dl.bash-completion"
2192 "bash-completion/youtube-dl")
2193 (substitute* "setup.py"
2194 (("youtube-dl\\.bash-completion")
2195 "bash-completion/youtube-dl")
2197 (string-append "'" prefix "/etc/"))
2199 (string-append "'" prefix "/share/")))
2201 (add-after 'install 'install-completion
2202 (lambda* (#:key outputs #:allow-other-keys)
2203 (let* ((out (assoc-ref outputs "out"))
2204 (zsh (string-append out
2205 "/share/zsh/site-functions")))
2207 (copy-file "youtube-dl.zsh"
2208 (string-append zsh "/_youtube-dl"))
2210 (synopsis "Download videos from YouTube.com and other sites")
2212 "Youtube-dl is a small command-line program to download videos from
2213 YouTube.com and many more sites.")
2214 (home-page "https://yt-dl.org")
2215 (license license:public-domain)))
2217 (define-public youtube-dl-gui
2219 (name "youtube-dl-gui")
2224 (uri (pypi-uri "Youtube-DLG" version))
2227 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
2228 (build-system python-build-system)
2230 ;; In Guix, wxpython has not yet been packaged for Python 3.
2231 `(#:python ,python-2
2232 ;; This package has no tests.
2235 (modify-phases %standard-phases
2236 (add-before 'build 'patch-source
2237 (lambda* (#:key inputs #:allow-other-keys)
2238 ;; The youtube-dl-gui program lets you configure options. Some of
2239 ;; them are problematic, so we change their defaults.
2240 (substitute* "youtube_dl_gui/optionsmanager.py"
2241 ;; When this is true, the builder process will try (and fail) to
2242 ;; write logs to the builder user's home directory.
2243 (("'enable_log': True") "'enable_log': False")
2244 ;; This determines which youtube-dl program youtube-dl-gui will
2245 ;; run. If we don't set this, then youtube-dl-gui might download
2246 ;; an arbitrary copy from the Internet into the user's home
2247 ;; directory and run it, so let's make sure youtube-dl-gui uses
2248 ;; the youtube-dl from the inputs by default.
2249 (("'youtubedl_path': self.config_path")
2250 (string-append "'youtubedl_path': '"
2251 (assoc-ref inputs "youtube-dl")
2253 ;; When this is True, when youtube-dl-gui is finished downloading
2254 ;; a file, it will try (and possibly fail) to open the directory
2255 ;; containing the downloaded file. This can fail because it
2256 ;; assumes that xdg-open is in PATH. Unfortunately, simply
2257 ;; adding xdg-utils to the propagated inputs is not enough to
2258 ;; make this work, so for now we set the default to False.
2259 (("'open_dl_dir': True") "'open_dl_dir': False"))
2260 ;; The youtube-dl program from the inputs is actually a wrapper
2261 ;; script written in bash, so attempting to invoke it as a python
2262 ;; script will fail.
2263 (substitute* "youtube_dl_gui/downloaders.py"
2264 (("cmd = \\['python', self\\.youtubedl_path\\]")
2265 "cmd = [self.youtubedl_path]"))
2266 ;; Use relative paths for installing data files so youtube-dl-gui
2267 ;; installs the files relative to its prefix in the store, rather
2268 ;; than relative to /. Also, instead of installing data files into
2269 ;; $prefix/usr/share, install them into $prefix/share for
2270 ;; consistency (see: (standards) Directory Variables).
2271 (substitute* "setup.py"
2272 (("= '/usr/share") "= 'share"))
2273 ;; Update get_locale_file() so it finds the installed localization
2275 (substitute* "youtube_dl_gui/utils.py"
2276 (("os\\.path\\.join\\('/usr', 'share'")
2277 (string-append "os.path.join('"
2278 (assoc-ref %outputs "out")
2281 (add-after 'install 'create-desktop-file
2282 (lambda* (#:key outputs #:allow-other-keys)
2283 (let* ((out (assoc-ref outputs "out"))
2284 (applications (string-append out "/share/applications")))
2285 (mkdir-p applications)
2286 (call-with-output-file
2287 (string-append applications "/youtube-dl-gui.desktop")
2292 Name=Youtube-dl GUI~@
2293 Comment=Graphical interface to download video with youtube-dl~@
2294 Exec=youtube-dl-gui~@
2295 TryExec=youtube-dl-gui~@
2297 Icon=youtube-dl-gui~@
2299 Categories=AudioVideo;Audio;Video;Network~%")))
2302 `(("python2-wxpython" ,python2-wxpython)
2303 ("youtube-dl" ,youtube-dl)))
2304 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
2306 "GUI (Graphical User Interface) for @command{youtube-dl}")
2308 "Youtube-dlG is a GUI (Graphical User Interface) for
2309 @command{youtube-dl}. You can use it to download videos from YouTube and any
2310 other site that youtube-dl supports.")
2311 (license license:unlicense)))
2313 (define-public you-get
2316 (version "0.4.1456")
2320 (url "https://github.com/soimort/you-get")
2321 (commit (string-append "v" version))))
2322 (file-name (git-file-name name version))
2325 "0n6h5qkhjwsxy8rf6n4i8hd8dah38hbvchh9272c53gydgp9lp29"))))
2326 (build-system python-build-system)
2328 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
2331 (modify-phases %standard-phases
2332 (add-after 'unpack 'qualify-input-references
2333 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2334 ;; happens to be in the user's $PATH at run time.
2335 (lambda* (#:key inputs #:allow-other-keys)
2336 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
2338 (substitute* "src/you_get/processor/ffmpeg.py"
2339 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2340 ;; same string is also used when sniffing ffmpeg's output.
2341 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2342 (string-append prefix "'" ffmpeg "'")))
2344 #:tests? #f)) ; XXX some tests need Internet access
2345 (synopsis "Download videos, audio, or images from Web sites")
2347 "You-Get is a command-line utility to download media contents (videos,
2348 audio, images) from the Web. It can use either mpv or vlc for playback.")
2349 (home-page "https://you-get.org/")
2350 (license license:expat)))
2352 (define-public youtube-viewer
2354 (name "youtube-viewer")
2359 (url "https://github.com/trizen/youtube-viewer")
2361 (file-name (git-file-name name version))
2364 "1ckzzf35nbwlx5prvzjr52n28chyd479vhdk5w7vb2343az80mzi"))))
2365 (build-system perl-build-system)
2367 `(("perl-module-build" ,perl-module-build)))
2369 `(("perl-data-dump" ,perl-data-dump)
2370 ("perl-file-sharedir" ,perl-file-sharedir)
2371 ("perl-gtk2" ,perl-gtk2)
2372 ("perl-json" ,perl-json)
2373 ("perl-json-xs" ,perl-json-xs)
2374 ("perl-libwww" ,perl-libwww)
2375 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
2376 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
2377 ("perl-mozilla-ca" ,perl-mozilla-ca)
2378 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
2379 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
2380 ("xdg-utils" ,xdg-utils)
2382 ;; Some videos play without youtube-dl, but others silently fail to.
2383 ("youtube-dl" ,youtube-dl)))
2385 `(#:modules ((guix build perl-build-system)
2388 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2389 ;; is broken without perl-gtk3.
2390 #:module-build-flags '("--gtk2")
2392 (modify-phases %standard-phases
2393 (add-after 'unpack 'refer-to-inputs
2394 (lambda* (#:key inputs #:allow-other-keys)
2395 (substitute* "lib/WWW/YoutubeViewer.pm"
2397 (format #f "'~a/bin/youtube-dl'"
2398 (assoc-ref inputs "youtube-dl"))))
2399 (substitute* '("bin/gtk2-youtube-viewer"
2400 "bin/gtk3-youtube-viewer")
2402 (format #f "'~a/bin/xdg-open'"
2403 (assoc-ref inputs "xdg-utils"))))
2405 (add-after 'install 'install-desktop
2406 (lambda* (#:key outputs #:allow-other-keys)
2407 (let* ((out (assoc-ref outputs "out"))
2408 (sharedir (string-append out "/share")))
2409 (install-file "share/gtk-youtube-viewer.desktop"
2410 (string-append sharedir "/applications"))
2411 (install-file "share/icons/gtk-youtube-viewer.png"
2412 (string-append sharedir "/pixmaps"))
2414 (add-after 'install 'wrap-program
2415 (lambda* (#:key outputs #:allow-other-keys)
2416 (let* ((out (assoc-ref outputs "out"))
2417 (bin-dir (string-append out "/bin/"))
2418 (site-dir (string-append out "/lib/perl5/site_perl/"))
2419 (lib-path (getenv "PERL5LIB")))
2420 (for-each (cut wrap-program <>
2421 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2422 (find-files bin-dir))
2425 "Lightweight application for searching and streaming videos from YouTube")
2427 "Youtube-viewer searches and plays YouTube videos in a native player.
2428 It comes with various search options; it can search for videos, playlists
2429 and/or channels. The videos are streamed directly in a selected video player
2430 at the best resolution (customizable) and with closed-captions (if available).
2431 Both command-line and GTK2 interface are available.")
2432 (home-page "https://github.com/trizen/youtube-viewer")
2433 (license license:perl-license)))
2435 (define-public libbluray
2441 (uri (string-append "https://download.videolan.org/videolan/"
2442 name "/" version "/"
2443 name "-" version ".tar.bz2"))
2446 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
2447 (build-system gnu-build-system)
2449 `(#:configure-flags '("--disable-bdjava-jar")
2451 (modify-phases %standard-phases
2452 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2453 ;; Avoid the need to propagate libxml2 by referring to it
2454 ;; directly, as is already done for fontconfig & freetype.
2455 (lambda* (#:key inputs #:allow-other-keys)
2456 (let ((libxml2 (assoc-ref inputs "libxml2")))
2457 (substitute* "configure"
2458 ((" libxml-2.0") ""))
2459 (substitute* "src/libbluray.pc.in"
2460 (("^Libs.private:" field)
2461 (string-append field " -L" libxml2 "/lib -lxml2")))
2463 (add-before 'build 'fix-dlopen-paths
2464 (lambda* (#:key inputs #:allow-other-keys)
2465 (let ((libaacs (assoc-ref inputs "libaacs"))
2466 (libbdplus (assoc-ref inputs "libbdplus")))
2467 (substitute* "src/libbluray/disc/aacs.c"
2469 (string-append "\"" libaacs "/lib/libaacs\"")))
2470 (substitute* "src/libbluray/disc/bdplus.c"
2472 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2474 (native-inputs `(("pkg-config" ,pkg-config)))
2476 `(("fontconfig" ,fontconfig)
2477 ("freetype" ,freetype)
2478 ("libaacs" ,libaacs)
2479 ("libbdplus" ,libbdplus)
2480 ("libxml2" ,libxml2)))
2481 (home-page "https://www.videolan.org/developers/libbluray.html")
2482 (synopsis "Blu-Ray Disc playback library")
2484 "libbluray is a library designed for Blu-Ray Disc playback for media
2485 players, like VLC or MPlayer.")
2486 (license license:lgpl2.1+)))
2488 (define-public libdvdread
2494 (uri (string-append "https://download.videolan.org/videolan/"
2495 "libdvdread/" version "/"
2496 "libdvdread-" version ".tar.bz2"))
2499 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
2500 (build-system gnu-build-system)
2502 `(#:configure-flags '("--with-libdvdcss=yes")))
2504 `(("pkg-config" ,pkg-config)))
2506 `(("libdvdcss" ,libdvdcss)))
2507 (home-page "http://dvdnav.mplayerhq.hu/")
2508 (synopsis "Library for reading video DVDs")
2510 "Libdvdread provides a simple foundation for reading DVD video
2511 disks. It provides the functionality that is required to access many
2512 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2513 authentication and descrambling (if an external libdvdcss library is
2515 (license license:gpl2+)))
2517 (define-public dvdauthor
2524 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2528 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2529 (build-system gnu-build-system)
2531 `(("libdvdread" ,libdvdread)
2533 ("imagemagick" ,imagemagick)
2534 ("libxml2" ,libxml2)
2535 ("freetype" ,freetype)))
2537 `(("pkg-config" ,pkg-config)))
2538 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2539 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2540 MPEG-2 stream containing VOB packets.")
2541 (home-page "http://dvdauthor.sourceforge.net")
2542 (license license:gpl3+)))
2544 (define-public libdvdnav
2550 (uri (string-append "https://download.videolan.org/videolan/"
2551 "libdvdnav/" version "/"
2552 "libdvdnav-" version ".tar.bz2"))
2555 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
2556 (build-system gnu-build-system)
2558 `(("pkg-config" ,pkg-config)))
2560 `(("libdvdread" ,libdvdread)))
2561 (home-page "http://dvdnav.mplayerhq.hu/")
2562 (synopsis "Library for video DVD navigation features")
2564 "Libdvdnav is a library for developers of multimedia
2565 applications. It allows easy use of sophisticated DVD navigation features
2566 such as DVD menus, multiangle playback and even interactive DVD games. All
2567 this functionality is provided through a simple API which provides the DVD
2568 playback as a single logical stream of blocks, intermitted by special
2569 dvdnav events to report certain conditions. The main usage of libdvdnav is
2570 a loop regularly calling a function to get the next block, surrounded by
2571 additional calls to tell the library of user interaction. The whole
2572 DVD virtual machine and internal playback states are completely
2574 (license license:gpl2+)))
2576 (define-public libdvdcss
2582 (uri (string-append "https://download.videolan.org/pub/"
2583 name "/" version "/"
2584 name "-" version ".tar.bz2"))
2587 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
2588 (build-system gnu-build-system)
2589 (home-page "https://www.videolan.org/developers/libdvdcss.html")
2590 (synopsis "Library for accessing DVDs as block devices")
2592 "libdvdcss is a simple library designed for accessing DVDs like a block
2593 device without having to bother about the decryption.")
2594 (license license:gpl2+)))
2596 (define-public srt2vtt
2603 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2607 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
2608 (build-system gnu-build-system)
2610 `(("guile" ,guile-2.0)))
2611 (synopsis "SubRip to WebVTT subtitle converter")
2612 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2613 for use with HTML5 video.")
2614 (home-page "https://dthompson.us/projects/srt2vtt.html")
2615 (license license:gpl3+)))
2617 (define-public avidemux
2624 "mirror://sourceforge/avidemux/avidemux/" version "/"
2625 "avidemux_" version ".tar.gz"))
2628 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
2629 (patches (search-patches "avidemux-install-to-lib.patch"))))
2630 (build-system cmake-build-system)
2633 ("pkg-config" ,pkg-config)
2634 ("python" ,python-wrapper)
2635 ("qttools" ,qttools)
2637 ;; FIXME: Once packaged, add libraries not found during the build.
2639 `(("alsa-lib" ,alsa-lib)
2640 ("fontconfig" ,fontconfig)
2641 ("freetype" ,freetype)
2642 ("fribidi" ,fribidi)
2647 ("libvdpau" ,libvdpau)
2648 ("libvorbis" ,libvorbis)
2651 ("pulseaudio" ,pulseaudio)
2656 `(#:tests? #f ; no check target
2658 ;; Make sure files inside the included ffmpeg tarball are
2660 (let ((ffmpeg "ffmpeg-4.1.4"))
2661 (modify-phases %standard-phases
2662 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2664 (with-directory-excursion "avidemux_core/ffmpeg_package"
2665 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2666 (delete-file (string-append ffmpeg ".tar.bz2")))
2668 (add-after 'patch-source-shebangs 'repack-ffmpeg
2670 (with-directory-excursion "avidemux_core/ffmpeg_package"
2671 (substitute* (string-append ffmpeg "/configure")
2672 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2673 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2674 ;; avoid non-determinism in the archive
2675 "--sort=name" "--mtime=@0"
2676 "--owner=root:0" "--group=root:0")
2677 (delete-file-recursively ffmpeg))
2681 ;; Copy-paste settings from the cmake build system.
2682 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2683 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2686 (lambda* (#:key inputs outputs #:allow-other-keys)
2687 (let* ((out (assoc-ref outputs "out"))
2688 (lib (string-append out "/lib"))
2691 (lambda* (component srcdir #:optional (args '()))
2692 (let ((builddir (string-append "build_" component)))
2694 (with-directory-excursion builddir
2695 (apply invoke "cmake"
2696 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2697 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2698 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2699 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2700 "\"-Wl,-rpath=" lib "\"")
2701 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
2702 (string-append "../" srcdir)
2706 (number->string (parallel-job-count)))
2707 (invoke "make" "install"))))))
2709 (build_component "core" "avidemux_core")
2710 (build_component "cli" "avidemux/cli")
2711 (build_component "qt4" "avidemux/qt4")
2712 (build_component "plugins_common" "avidemux_plugins"
2713 '("-DPLUGIN_UI=COMMON"))
2714 (build_component "plugins_cli" "avidemux_plugins"
2715 '("-DPLUGIN_UI=CLI"))
2716 (build_component "plugins_qt4" "avidemux_plugins"
2717 '("-DPLUGIN_UI=QT4"))
2718 (build_component "plugins_settings" "avidemux_plugins"
2719 '("-DPLUGIN_UI=SETTINGS"))
2720 ;; Remove .exe and .dll file.
2721 (delete-file-recursively
2722 (string-append out "/share/ADM6_addons"))
2724 (delete 'install)))))
2725 (home-page "http://fixounet.free.fr/avidemux/")
2726 (synopsis "Video editor")
2727 (description "Avidemux is a video editor designed for simple cutting,
2728 filtering and encoding tasks. It supports many file types, including AVI,
2729 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2730 can be automated using projects, job queue and powerful scripting
2732 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
2733 ;; Software with various licenses is included, see License.txt.
2734 (license license:gpl2+)))
2736 (define-public vapoursynth
2738 (name "vapoursynth")
2743 (url "https://github.com/vapoursynth/vapoursynth")
2744 (commit (string-append "R" version))))
2745 (file-name (git-file-name name version))
2748 "1krfdzc2x2vxv4nq9kiv1c09hgj525qn120ah91fw2ikq8ldvmx4"))))
2749 (build-system gnu-build-system)
2751 `(("autoconf" ,autoconf)
2752 ("automake" ,automake)
2753 ("cython" ,python-cython)
2754 ("libtool" ,libtool)
2755 ("pkg-config" ,pkg-config)
2759 `(("ffmpeg" ,ffmpeg)
2761 ("tesseract-ocr" ,tesseract-ocr)
2763 (home-page "http://www.vapoursynth.com/")
2764 (synopsis "Video processing framework")
2765 (description "VapourSynth is a C++ library and Python module for video
2766 manipulation. It aims to be a modern rewrite of Avisynth, supporting
2767 multithreading, generalized colorspaces, per frame properties, and videos with
2769 ;; src/core/cpufeatures only allows x86, ARM or PPC
2770 (supported-systems (fold delete %supported-systems
2771 '("mips64el-linux" "aarch64-linux")))
2772 ;; As seen from the source files.
2773 (license license:lgpl2.1+)))
2782 "http://downloads.xvid.com/downloads/xvidcore-"
2783 version ".tar.bz2"))
2786 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
2787 (build-system gnu-build-system)
2788 (native-inputs `(("yasm" ,yasm)))
2791 (modify-phases %standard-phases
2792 (add-before 'configure 'pre-configure
2794 (chdir "build/generic")
2795 (substitute* "configure"
2796 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2798 #:tests? #f)) ; no test suite
2799 (home-page "https://www.xvid.com/")
2800 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2801 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2802 codec library. It uses ASP features such as b-frames, global and quarter
2803 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2804 and custom quantization matrices.")
2805 (license license:gpl2+)))
2807 (define-public streamlink
2814 (uri (pypi-uri "streamlink" version))
2817 "1s458k8z1lv0w8i82sxs8dys66fwm4yr9j1m7fzp7r0piz8phcpd"))))
2818 (build-system python-build-system)
2819 (home-page "https://github.com/streamlink/streamlink")
2821 `(("python-freezegun" ,python-freezegun)
2822 ("python-pytest" ,python-pytest)
2823 ("python-mock" ,python-mock)
2824 ("python-requests-mock" ,python-requests-mock)))
2826 `(("python-pysocks" ,python-pysocks)
2827 ("python-websocket-client" ,python-websocket-client)
2828 ("python-iso3166" ,python-iso3166)
2829 ("python-iso639" ,python-iso639)
2830 ("python-isodate" ,python-isodate)
2831 ("python-pycryptodome" ,python-pycryptodome)
2832 ("python-requests" ,python-requests)
2833 ("python-urllib3" ,python-urllib3)))
2834 (synopsis "Extract streams from various services")
2835 (description "Streamlink is command-line utility that extracts streams
2836 from sites like Twitch.tv and pipes them into a video player of choice.")
2837 (license license:bsd-2)))
2839 (define-public twitchy
2840 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
2843 (version (git-version "3.4" "1" commit))
2848 (url "https://github.com/BasioMeusPuga/twitchy")
2850 (file-name (git-file-name name version))
2853 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
2854 (build-system python-build-system)
2857 (modify-phases %standard-phases
2858 (add-after 'unpack 'patch-paths
2859 (lambda* (#:key inputs #:allow-other-keys)
2860 (substitute* "twitchy/twitchy_play.py"
2862 (string-append "\"" (assoc-ref inputs "streamlink")
2863 "/bin/streamlink ")))
2865 (add-before 'check 'check-setup
2867 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
2869 (add-after 'install 'install-rofi-plugin
2870 (lambda* (#:key outputs #:allow-other-keys)
2871 (install-file "plugins/rofi-twitchy"
2872 (string-append (assoc-ref outputs "out")
2876 `(("python-requests" ,python-requests)
2877 ("streamlink" ,streamlink)))
2878 (home-page "https://github.com/BasioMeusPuga/twitchy")
2879 (synopsis "Command-line interface for Twitch.tv")
2881 "This package provides a command-line interface for Twitch.tv")
2882 (license license:gpl3+))))
2891 (url "https://github.com/mltframework/mlt")
2892 (commit (string-append "v" version))))
2893 (file-name (git-file-name name version))
2896 "0jxv848ykw0csbnayrd710ylw46m0picfv7rpzsxz1vh4jzs395k"))))
2897 (build-system gnu-build-system)
2899 `(#:tests? #f ; no tests
2900 #:make-flags '("CC=gcc" "CXX=g++")
2902 (list "--enable-gpl3"
2905 (modify-phases %standard-phases
2907 'configure 'override-LDFLAGS
2908 (lambda* (#:key outputs #:allow-other-keys)
2909 (substitute* "config.mak"
2911 (string-append "LDFLAGS+=-Wl,-rpath="
2912 (assoc-ref outputs "out")
2916 `(("alsa-lib" ,alsa-lib)
2919 ("frei0r-plugins" ,frei0r-plugins)
2920 ("gdk-pixbuf" ,gdk-pixbuf)
2922 ("libxml2" ,libxml2)
2925 ("libexif" ,libexif)
2926 ("libvorbis" ,libvorbis)
2927 ("rubberband" ,rubberband)
2928 ("libsamplerate" ,libsamplerate)
2929 ("pulseaudio" ,pulseaudio)
2935 `(("pkg-config" ,pkg-config)))
2936 (home-page "https://www.mltframework.org/")
2937 (synopsis "Author, manage, and run multitrack audio/video compositions")
2939 "MLT is a multimedia framework, designed and developed for television
2940 broadcasting. It provides a toolkit for broadcasters, video editors, media
2941 players, transcoders, web streamers and many more types of applications. The
2942 functionality of the system is provided via an assortment of ready to use
2943 tools, XML authoring components, and an extensible plug-in based API.")
2944 (license license:gpl3)))
2946 (define-public v4l-utils
2952 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2953 "/v4l-utils-" version ".tar.bz2"))
2956 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
2957 (build-system gnu-build-system)
2960 (list (string-append "--with-udevdir="
2961 (assoc-ref %outputs "out")
2965 ("pkg-config" ,pkg-config)))
2967 `(("alsa-lib" ,alsa-lib)
2969 ("libjpeg" ,libjpeg-turbo)
2973 (synopsis "Realtime video capture utilities for Linux")
2974 (description "The v4l-utils provide a series of libraries and utilities to
2975 be used for realtime video capture via Linux-specific APIs.")
2976 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2977 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2978 (license (list license:lgpl2.1+ license:gpl2))))
2987 (url "https://github.com/obsproject/obs-studio")
2989 (file-name (git-file-name name version))
2992 "0j2k65q3wfyfxhvkl6icz4qy0s3kfqhksizy2i3ah7yml266axbj"))))
2993 (build-system cmake-build-system)
2995 `(#:tests? #f ; no test suite
2997 (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version))))
2999 `(("pkg-config" ,pkg-config)))
3001 `(("alsa-lib" ,alsa-lib)
3005 ("fontconfig" ,fontconfig)
3006 ("freetype" ,freetype)
3008 ("jansson" ,jansson)
3009 ("libx264" ,libx264)
3010 ("libxcomposite" ,libxcomposite)
3011 ("mbedtls" ,mbedtls-apache)
3013 ("pulseaudio" ,pulseaudio)
3016 ("qtx11extras" ,qtx11extras)
3018 ("v4l-utils" ,v4l-utils)
3020 (synopsis "Live streaming software")
3021 (description "Open Broadcaster Software provides a graphical interface for
3022 video recording and live streaming. OBS supports capturing audio and video
3023 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
3025 (home-page "https://obsproject.com")
3026 (supported-systems '("x86_64-linux" "i686-linux"))
3027 (license license:gpl2+)))
3029 (define-public libvdpau
3037 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
3039 (file-name (git-file-name name version))
3042 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
3043 (build-system meson-build-system)
3045 `(("pkg-config" ,pkg-config)))
3047 `(("libx11" ,libx11 "out")
3048 ("libxext" ,libxext)
3049 ("xorgproto" ,xorgproto)))
3050 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3051 (synopsis "Video Decode and Presentation API")
3052 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
3053 provides an interface to video decode acceleration and presentation hardware
3054 present in modern GPUs.")
3055 (license (license:x11-style "file://COPYING"))))
3057 (define-public vdpauinfo
3064 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
3065 name "-" version ".tar.gz"))
3068 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
3069 (build-system gnu-build-system)
3071 `(("pkg-config" ,pkg-config)
3072 ("libx11" ,libx11)))
3074 `(("libvdpau" ,libvdpau)))
3075 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
3076 (synopsis "Tool to query the capabilities of a VDPAU implementation")
3077 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
3079 (license (license:x11-style "file://COPYING"))))
3081 (define-public libvdpau-va-gl
3083 (name "libvdpau-va-gl")
3088 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
3089 "releases/download/v" version "/libvdpau-va-gl-"
3093 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
3094 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
3095 (modules '((guix build utils)))
3096 (snippet '(begin (delete-file-recursively "3rdparty")
3098 (build-system cmake-build-system)
3100 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
3102 `(("libvdpau" ,libvdpau)
3103 ("pkg-config" ,pkg-config)))
3107 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3108 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3110 "Many applications can use VDPAU to accelerate portions of the video
3111 decoding process and video post-processing to the GPU video hardware. Since
3112 there is no VDPAU available on Intel chips, they fall back to different drawing
3113 techniques. This driver uses OpenGL under the hood to accelerate drawing and
3114 scaling and VA-API (if available) to accelerate video decoding.")
3115 (license license:expat)))
3117 (define-public recordmydesktop
3119 (name "recordmydesktop")
3123 (uri (string-append "mirror://sourceforge/" name "/" name "/"
3124 version "/recordmydesktop-" version ".tar.gz"))
3127 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
3128 (build-system gnu-build-system)
3129 (inputs `(("popt" ,popt)
3134 ("libxfixes" ,libxfixes)
3135 ("libxdamage" ,libxdamage)
3136 ("libxext" ,libxext)
3137 ("alsa-lib" ,alsa-lib)
3138 ("libvorbis" ,libvorbis)
3139 ("libtheora" ,libtheora)))
3140 (home-page "http://recordmydesktop.sourceforge.net/")
3141 (synopsis "Desktop session video recorder")
3143 "recordMyDesktop is a command-line tool that captures the activity in
3144 your graphical desktop and encodes it as a video. This is a useful tool for
3145 making @dfn{screencasts}.")
3146 (license license:gpl2+)))
3148 (define-public simplescreenrecorder
3150 (name "simplescreenrecorder")
3156 (url "https://github.com/MaartenBaert/ssr")
3158 (file-name (git-file-name name version))
3161 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
3162 (build-system cmake-build-system)
3163 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3164 ;; README.md, the program builds and functions properly without them.
3165 ;; As a result, they are omitted. Please add them back if problems appear.
3167 `(("alsa-lib" ,alsa-lib)
3172 ("libxinerama" ,libxinerama)
3173 ("pulseaudio" ,pulseaudio)
3175 ("qtx11extras" ,qtx11extras)))
3176 (native-inputs `(("pkg-config" ,pkg-config)))
3179 (list "-DWITH_QT5=TRUE")
3180 #:tests? #f)) ; no test suite
3181 ;; Using HTTPS causes part of the page to be displayed improperly.
3182 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
3183 (synopsis "Screen recorder")
3184 (description "SimpleScreenRecorder is an easy to use screen recorder with
3185 a graphical user interface. It supports recording the entire screen, or a
3186 part of it, and allows encoding in many different codecs and file formats.
3187 Other features include a live preview and live streaming.")
3188 (license (list license:gpl3+ ; most files
3189 license:zlib ; glinject/elfhacks.*
3190 license:isc ; glinject/*
3191 license:x11)))) ; build-aux/install-sh
3193 (define-public libsmpeg
3196 (version "0.4.5-401")
3200 (url "svn://svn.icculus.org/smpeg/trunk/")
3201 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
3202 (file-name (string-append name "-" version "-checkout"))
3205 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3206 (build-system gnu-build-system)
3208 ;; libsmpeg fails to build with -std=c++11, which is the default with
3209 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3210 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
3212 `(("autoconf" ,autoconf)
3213 ("automake" ,automake)))
3216 (home-page "https://icculus.org/smpeg/")
3217 (synopsis "SDL MPEG decoding library")
3219 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3220 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3221 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3222 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3223 and MPEG system streams.")
3224 (license (list license:expat
3230 (define-public libsmpeg-with-sdl1
3231 (package (inherit libsmpeg)
3233 (version "0.4.5-399")
3237 (url "svn://svn.icculus.org/smpeg/trunk/")
3238 (revision 399))) ; tagged release 0.4.5
3239 (file-name (string-append name "-" version "-checkout"))
3242 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3246 (define-public libbdplus
3253 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
3254 version "/" name "-" version ".tar.bz2"))
3256 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3258 `(("libgcrypt" ,libgcrypt)))
3259 (build-system gnu-build-system)
3260 (home-page "https://www.videolan.org/developers/libbdplus.html")
3261 (synopsis "Library for decrypting certain Blu-Ray discs")
3262 (description "libbdplus is a library which implements the BD+ System
3264 (license license:lgpl2.1+)))
3266 (define-public libaacs
3273 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
3274 version "/libaacs-" version ".tar.bz2"))
3276 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
3278 `(("libgcrypt" ,libgcrypt)))
3282 (build-system gnu-build-system)
3283 (home-page "https://www.videolan.org/developers/libaacs.html")
3284 (synopsis "Library for decrypting certain Blu-Ray discs")
3285 (description "libaacs is a library which implements the Advanced Access
3286 Content System specification.")
3287 (license license:lgpl2.1+)))
3289 (define-public mps-youtube
3291 (name "mps-youtube")
3297 (url "https://github.com/mps-youtube/mps-youtube")
3298 (commit (string-append "v" version))))
3299 (file-name (git-file-name name version))
3302 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
3303 (build-system python-build-system)
3305 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3306 ;; test suite results differ depending on the country and also introduce
3307 ;; non-determinism in the tests.
3308 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3311 `(("python-pafy" ,python-pafy)
3312 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
3313 (home-page "https://github.com/mps-youtube/mps-youtube")
3314 (synopsis "Terminal based YouTube player and downloader")
3316 "@code{mps-youtube} is based on mps, a terminal based program to
3317 search, stream and download music. This implementation uses YouTube as
3318 a source of content and can play and download video as well as audio.
3319 It can use either mpv or mplayer for playback, and for conversion of
3320 formats ffmpeg or libav is used. Users should install one of the
3321 supported players in addition to this package.")
3322 (license license:gpl3+)))
3324 (define-public handbrake
3330 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3331 "releases/download/" version "/"
3332 "HandBrake-" version "-source.tar.bz2"))
3335 "11bzhyp052bmng5119x74xvdj5632smx6qsk537ygda8bzckg2i1"))
3336 (modules '((guix build utils)))
3338 ;; Remove "contrib" and source not necessary for
3339 ;; building/running under a GNU environment.
3341 (for-each delete-file-recursively
3342 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
3343 (substitute* "make/include/main.defs"
3344 ;; Disable unconditional inclusion of "contrib" libraries
3345 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3346 ;; which would lead to fetching and building of these
3347 ;; libraries. Use our own instead.
3348 (("MODULES \\+= contrib") "# MODULES += contrib"))
3350 (build-system glib-or-gtk-build-system)
3352 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
3353 ("autoconf" ,autoconf)
3354 ("intltool" ,intltool)
3355 ("libtool" ,libtool)
3356 ("pkg-config" ,pkg-config)
3357 ("python" ,python-2))) ; For configuration
3360 ("dbus-glib" ,dbus-glib)
3362 ("fontconfig" ,fontconfig)
3363 ("freetype" ,freetype)
3365 ("gstreamer" ,gstreamer)
3366 ("gst-plugins-base" ,gst-plugins-base)
3368 ("jansson" ,jansson)
3371 ("libbluray" ,libbluray)
3373 ("libdvdnav" ,libdvdnav)
3374 ("libdvdread" ,libdvdread)
3375 ("libgudev" ,libgudev)
3376 ("libmpeg2" ,libmpeg2)
3377 ("libnotify" ,libnotify)
3378 ("libnuma" ,numactl)
3381 ("libsamplerate" ,libsamplerate)
3382 ("libtheora" ,libtheora)
3383 ("libvorbis" ,libvorbis)
3385 ("libxml2" ,libxml2)
3386 ("libx264" ,libx264)
3391 `(#:tests? #f ;tests require Ruby and claim to be unsupported
3393 (list "--disable-gtk-update-checks"
3395 (string-append "CPPFLAGS=-I"
3396 (assoc-ref %build-inputs "libxml2")
3400 (modify-phases %standard-phases
3402 ;; Run bootstrap ahead of time so that shebangs get patched.
3404 (setenv "CONFIG_SHELL" (which "sh"))
3405 ;; Patch the Makefile so that it doesn't bootstrap again.
3406 (substitute* "gtk/module.rules"
3407 ((".*autoreconf.*") ""))
3408 (with-directory-excursion "gtk"
3409 (invoke "autoreconf" "-fiv"))))
3410 (add-before 'configure 'patch-SHELL
3412 (substitute* "gtk/po/Makefile.in.in"
3413 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
3415 (add-before 'configure 'relax-reqs
3417 (substitute* "make/configure.py"
3418 ;; cmake is checked for so that it can be used to build
3419 ;; contrib/harfbuzz and contrib/x265, but we get these as
3420 ;; inputs, so don't abort if it's not found. Similarly, meson
3421 ;; and ninja are only needed for contrib/libdav1d, and nasm
3423 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3424 (string-append & "False")))
3427 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3428 ;; 'configure' is not an autoconf-generated script, and
3429 ;; errors on unrecognized arguments,
3430 ;; e.g. --enable-fast-install
3431 (let ((out (assoc-ref outputs "out")))
3432 (apply invoke "./configure"
3433 (string-append "--prefix=" out)
3434 (or configure-flags '())))))
3435 (add-after 'configure 'chdir-build
3436 (lambda _ (chdir "./build") #t)))))
3437 (home-page "https://handbrake.fr")
3438 (synopsis "Video transcoder")
3440 "HandBrake is a tool for converting video from any format to a selection
3441 of modern, widely supported codecs.")
3442 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3443 ;; Combination under GPLv2. See LICENSE.
3444 (license license:gpl2)))
3446 (define-public intel-vaapi-driver
3448 (name "intel-vaapi-driver")
3454 (url "https://github.com/intel/intel-vaapi-driver")
3457 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3458 (file-name (git-file-name name version))))
3459 (build-system gnu-build-system)
3461 `(("autoconf" ,autoconf)
3462 ("automake" ,automake)
3463 ("libtool" ,libtool)
3464 ("pkg-config" ,pkg-config)))
3466 `(("libdrm" ,libdrm)
3468 ("libx11" ,libx11)))
3471 (modify-phases %standard-phases
3472 (add-before 'configure 'set-target-directory
3473 (lambda* (#:key outputs #:allow-other-keys)
3474 (let ((out (assoc-ref outputs "out")))
3475 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
3477 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
3478 ;; this to all VA-API back ends instead of once to libva.
3479 (native-search-paths
3480 (list (search-path-specification
3481 (variable "LIBVA_DRIVERS_PATH")
3482 (files '("lib/dri")))))
3483 (supported-systems '("i686-linux" "x86_64-linux"))
3484 (home-page "https://01.org/linuxmedia/vaapi")
3485 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
3487 "This is the @acronym{VA-API, Video Acceleration API} back end required for
3488 hardware-accelerated video processing on Intel GEN Graphics devices supported by
3489 the i915 driver, such as integrated Intel HD Graphics. It provides access to
3490 both hardware and shader functionality for faster encoding, decoding, and
3491 post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
3492 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
3493 license:expat)))) ; the rest, excluding the test suite
3495 (define-public openh264
3502 (url "https://github.com/cisco/openh264")
3503 (commit (string-append "v" version))))
3504 (file-name (git-file-name name version))
3507 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
3508 (build-system gnu-build-system)
3511 ("python" ,python)))
3513 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3515 #:test-target "test"
3516 #:phases (modify-phases %standard-phases
3517 ;; no configure script
3518 (delete 'configure))))
3519 (home-page "https://www.openh264.org/")
3520 (synopsis "H264 decoder library")
3522 "Openh264 is a library which can decode H264 video streams.")
3523 (license license:bsd-2)))
3525 (define-public libmp4v2
3532 ;; XXX: The new location of upstream is uncertain and will become relevant the
3533 ;; moment when the googlecode archive shuts down. It is past the date it
3534 ;; should've been turned off. I tried to communicate with upstream, but this
3535 ;; wasn't very responsive and not very helpful. The short summary is, it is
3536 ;; chaos when it comes to the amount of forks and only time will tell where
3537 ;; the new upstream location is.
3538 (uri (string-append "https://storage.googleapis.com/google-"
3539 "code-archive-downloads/v2/"
3540 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
3541 (file-name (string-append name "-" version ".tar.bz2"))
3542 (patches (search-patches "libmp4v2-c++11.patch"))
3545 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
3546 (build-system gnu-build-system)
3548 "static")) ; 3.7MiB .a file
3551 (modify-phases %standard-phases
3552 (add-after 'unpack 'remove-dates
3554 ;; Make the build reproducible.
3555 (substitute* "configure"
3556 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
3557 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
3559 (add-after 'install 'move-static-libraries
3560 (lambda* (#:key outputs #:allow-other-keys)
3561 ;; Move static libraries to the "static" output.
3562 (let* ((out (assoc-ref outputs "out"))
3563 (lib (string-append out "/lib"))
3564 (static (assoc-ref outputs "static"))
3565 (slib (string-append static "/lib")))
3567 (for-each (lambda (file)
3568 (install-file file slib)
3570 (find-files lib "\\.a$"))
3573 `(("help2man" ,help2man)
3574 ("dejagnu" ,dejagnu)))
3575 (home-page "https://code.google.com/archive/p/mp4v2/")
3576 (synopsis "API to create and modify mp4 files")
3578 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3579 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3580 file format that has been used as a multimedia file format in a variety of platforms and
3581 applications. It is a very powerful and extensible format that can accommodate
3582 practically any type of media.")
3583 (license license:mpl1.1)))
3585 (define-public libmediainfo
3587 (name "libmediainfo")
3591 (uri (string-append "https://mediaarea.net/download/source/"
3592 name "/" version "/"
3593 name "_" version ".tar.xz"))
3596 "19n8h9jq42b6r3dbag77fzwfksfywszmzpi636w87fvc1nqldlqj"))))
3597 ;; TODO add a Big Buck Bunny webm for tests.
3599 `(("autoconf" ,autoconf)
3600 ("automake" ,automake)
3601 ("libtool" ,libtool)
3602 ("pkg-config" ,pkg-config)
3604 ("tinyxml2" ,tinyxml2)
3606 ("libzen" ,libzen)))
3607 (build-system gnu-build-system)
3609 '(#:tests? #f ; see above TODO
3611 ;; build scripts not in root of archive
3612 (modify-phases %standard-phases
3613 (add-after 'unpack 'change-to-build-dir
3615 (chdir "Project/GNU/Library")
3617 (home-page "https://mediaarea.net/en/MediaInfo")
3618 (synopsis "Library for retrieving media metadata")
3619 (description "MediaInfo is a library used for retrieving technical
3620 information and other metadata about audio or video files. A non-exhaustive
3621 list of the information MediaInfo can retrieve from media files include:
3624 @item General: title, author, director, album, track number, date, duration...
3625 @item Video: codec, aspect, fps, bitrate...
3626 @item Audio: codec, sample rate, channels, language, bitrate...
3627 @item Text: language of subtitle
3628 @item Chapters: number of chapters, list of chapters
3631 MediaInfo supports the following formats:
3634 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3635 MPEG-2, MPEG-4, DVD (VOB)...
3636 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3637 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3638 @item Subtitles: SRT, SSA, ASS, SAMI...
3640 (license license:bsd-2)))
3642 ;; TODO also have a GUI version available
3643 (define-public mediainfo
3649 ;; Warning: This source has proved unreliable 1 time at least.
3650 ;; Consider an alternate source or report upstream if this
3652 (uri (string-append "https://mediaarea.net/download/source/"
3653 name "/" version "/"
3654 name "_" version ".tar.xz"))
3657 "1baf2dj5s3g1x4ssqli1b2r1203syk42m09zhp36qcinmfixv11l"))))
3659 `(("autoconf" ,autoconf)
3660 ("automake" ,automake)
3661 ("libtool" ,libtool)
3662 ("pkg-config" ,pkg-config)
3664 ("libmediainfo" ,libmediainfo)
3665 ("libzen" ,libzen)))
3666 (build-system gnu-build-system)
3668 '(#:tests? #f ; lacks tests
3670 ;; build scripts not in root of archive
3671 (modify-phases %standard-phases
3672 (add-after 'unpack 'change-to-build-dir
3674 (chdir "Project/GNU/CLI")
3676 (home-page "https://mediaarea.net/en/MediaInfo")
3677 (synopsis "Utility for reading media metadata")
3678 (description "MediaInfo is a utility used for retrieving technical
3679 information and other metadata about audio or video files. It supports the
3680 many codecs and formats supported by libmediainfo.")
3681 (license license:bsd-2)))
3683 (define-public livemedia-utils
3685 (name "livemedia-utils")
3686 (version "2019.05.29")
3690 "https://download.videolan.org/contrib/live555/live."
3694 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
3695 (build-system gnu-build-system)
3697 '(#:tests? #f ; no tests
3698 #:make-flags (list "CC=gcc"
3699 (string-append "LDFLAGS=-Wl,-rpath="
3700 (assoc-ref %outputs "out") "/lib")
3701 (string-append "PREFIX="
3702 (assoc-ref %outputs "out")))
3703 #:phases (modify-phases %standard-phases
3704 (add-before 'configure 'fix-makefiles-generation
3706 (substitute* "genMakefiles"
3711 (invoke "./genMakefiles"
3712 "linux-with-shared-libraries"))))))
3713 (home-page "http://www.live555.com/liveMedia/")
3714 (synopsis "Set of C++ libraries for multimedia streaming")
3715 (description "This code forms a set of C++ libraries for multimedia
3716 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3717 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3718 JPEG video, and several audio codecs. They can easily be extended to support
3719 additional (audio and/or video) codecs, and can also be used to build basic
3720 RTSP or SIP clients and servers.")
3721 (license license:lgpl3+)))
3723 (define-public libdvbpsi
3730 "https://download.videolan.org/pub/libdvbpsi/"
3731 version "/libdvbpsi-" version ".tar.bz2"))
3734 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
3735 (build-system gnu-build-system)
3736 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3737 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3739 (description "libdvbpsi is a simple library designed for decoding and
3740 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3741 and ITU-T H.222.0.")
3742 (license license:lgpl2.1)))
3744 (define-public ffms2
3748 (home-page "https://github.com/FFMS/ffms2")
3752 (url "https://github.com/FFMS/ffms2")
3754 (file-name (git-file-name name version))
3757 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
3758 (build-system gnu-build-system)
3761 (list "--enable-avresample")))
3765 `(("ffmpeg" ,ffmpeg)))
3767 `(("pkg-config" ,pkg-config)))
3768 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3770 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3771 programmers to access a standard API to open and decompress media files.")
3772 ;; sources are distributed under a different license that the binary.
3773 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3774 (license license:gpl2+))); inherits from ffmpeg
3776 (define-public aegisub
3783 "http://ftp.aegisub.org/pub/archives/releases/source/"
3784 name "-" version ".tar.xz"))
3787 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
3788 (patches (search-patches "aegisub-icu59-include-unistr.patch"
3789 "aegisub-make43.patch"
3790 "aegisub-boost68.patch"))))
3791 (build-system gnu-build-system)
3794 (list "--disable-update-checker"
3795 "--without-portaudio"
3798 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
3799 ;; tests require busted, a lua package we don't have yet
3802 (modify-phases %standard-phases
3803 (add-before 'configure 'fix-ldflags
3805 (setenv "LDFLAGS" "-pthread")
3807 (add-after 'unpack 'fix-boost-headers
3810 '("src/subtitles_provider_libass.cpp"
3811 "src/colour_button.cpp"
3812 "src/video_provider_dummy.cpp"
3813 "./src/video_frame.cpp")
3814 (("#include <boost/gil/gil_all.hpp>")
3815 "#include <boost/gil.hpp>"))
3821 ("hunspell" ,hunspell)
3824 ("alsa-lib" ,alsa-lib)
3825 ("pulseaudio" ,pulseaudio)
3827 ("freetype" ,freetype)
3828 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3830 `(("intltool" ,intltool)
3831 ("desktop-file-utils" ,desktop-file-utils)
3832 ("pkg-config" ,pkg-config)))
3833 (home-page "http://www.aegisub.org/")
3834 (synopsis "Subtitle engine")
3836 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3837 it quick and easy to time subtitles to audio, and features many powerful
3838 tools for styling them, including a built-in real-time video preview.")
3839 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3840 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3841 license:expat)))) ; and src/gl that is under a license similar
3842 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3843 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3844 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3846 (define-public gst-transcoder
3848 (name "gst-transcoder")
3854 (url "https://github.com/pitivi/gst-transcoder")
3856 (file-name (git-file-name name version))
3859 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
3860 (build-system meson-build-system)
3862 `(("gobject-introspection" ,gobject-introspection)
3864 ("gstreamer" ,gstreamer)
3865 ("gst-plugins-base" ,gst-plugins-base)))
3867 `(("python" ,python)
3868 ("pkg-config" ,pkg-config)))
3869 (home-page "https://github.com/pitivi/gst-transcoder/")
3870 (synopsis "GStreamer Transcoding API")
3871 (description "GStreamer Transcoding API")
3872 (license license:lgpl2.1)))
3881 (uri (string-append "mirror://sourceforge/gmerlin/"
3882 name "/" version "/"
3883 name "-" version ".tar.gz"))
3884 (file-name (string-append name "-" version ".tar.gz"))
3887 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3888 (build-system gnu-build-system)
3890 '(#:configure-flags '("LIBS=-lm")))
3892 `(("pkg-config" ,pkg-config)
3893 ("doxygen" ,doxygen)))
3894 (home-page "http://gmerlin.sourceforge.net")
3895 (synopsis "Low level library for multimedia API building")
3897 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3898 library, upon which multimedia APIs can be built. Gavl handles all the
3899 details of audio and video formats like colorspaces, sample rates,
3900 multichannel configurations, etc. It provides standardized definitions for
3901 those formats as well as container structures for carrying audio samples or
3902 video images inside an application.
3904 In addition, it handles the sometimes ugly task of converting between all
3905 these formats and provides some elementary operations (copying, scaling,
3906 alpha blending etc).")
3907 (license license:gpl3)))
3909 (define-public frei0r-plugins
3911 (name "frei0r-plugins")
3916 (uri (string-append "https://files.dyne.org/frei0r/"
3917 "frei0r-plugins-" version ".tar.gz"))
3920 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
3921 (build-system gnu-build-system)
3924 (modify-phases %standard-phases
3925 (add-after 'unpack 'patch-Makefile
3927 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3928 ;; names in the tarball. Try removing this for future versions.
3929 (substitute* "Makefile.in"
3930 (("README\\.md ChangeLog TODO AUTHORS")
3931 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3933 ;; TODO: opencv for additional face detection filters.
3938 `(("pkg-config" ,pkg-config)))
3939 (home-page "https://www.dyne.org/software/frei0r/")
3940 (synopsis "Minimalistic plugin API for video effects")
3942 "Frei0r is a minimalistic plugin API for video effects.
3943 The main emphasis is on simplicity for an API that will round up
3944 the most common video effects into simple filters, sources and
3945 mixers that can be controlled by parameters. Frei0r wants to
3946 provide a way to share these simple effects between many
3947 applications, avoiding their reimplementation by different projects.
3948 It counts more than 100 plugins.")
3949 (license (list license:gpl2+
3950 ;; The following files are licensed as LGPL2.1+:
3951 ;; src/generator/ising0r/ising0r.c
3952 ;; src/generator/onecol0r/onecol0r.cpp
3953 ;; src/generator/nois0r/nois0r.cpp
3954 ;; src/generator/lissajous0r/lissajous0r.cpp
3955 ;; src/filter/ndvi/gradientlut.hpp
3956 ;; src/filter/ndvi/ndvi.cpp
3957 ;; src/filter/facedetect/facedetect.cpp
3958 license:lgpl2.1+))))
3960 (define-public motion
3964 (home-page "https://motion-project.github.io/")
3968 (url "https://github.com/Motion-Project/motion")
3969 (commit (string-append "release-" version))))
3972 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
3973 (file-name (git-file-name name version))))
3974 (build-system gnu-build-system)
3976 `(("autoconf" ,autoconf-wrapper)
3977 ("automake" ,automake)
3978 ("gettext" ,gettext-minimal)
3979 ("pkg-config" ,pkg-config)))
3981 `(("libjpeg" ,libjpeg-turbo)
3983 ("libmicrohttpd" ,libmicrohttpd)
3984 ("sqlite" ,sqlite)))
3986 '(#:phases (modify-phases %standard-phases
3989 (patch-shebang "version.sh")
3990 (invoke "autoreconf" "-vfi"))))
3991 #:configure-flags '("--sysconfdir=/etc")
3992 #:make-flags (list (string-append "sysconfdir="
3993 (assoc-ref %outputs "out")
3996 #:tests? #f)) ; no 'check' target
3997 (synopsis "Detect motion from video signals")
3999 "Motion is a program that monitors the video signal from one or more
4000 cameras and is able to detect if a significant part of the picture has
4001 changed. Or in other words, it can detect motion.")
4003 ;; Some files say "version 2" and others "version 2 or later".
4004 (license license:gpl2)))
4006 (define-public subdl
4007 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
4011 (version (git-version "1.0.3" revision commit))
4015 (url "https://github.com/alexanderwink/subdl")
4017 (file-name (git-file-name name version))
4020 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
4021 (build-system trivial-build-system)
4023 `(#:modules ((guix build utils))
4025 (use-modules (guix build utils))
4026 (let* ((out (assoc-ref %outputs "out"))
4027 (bin (string-append out "/bin"))
4028 (source (assoc-ref %build-inputs "source"))
4029 (python (assoc-ref %build-inputs "python")))
4030 (install-file (string-append source "/subdl") bin)
4031 (patch-shebang (string-append bin "/subdl")
4032 (list (string-append python "/bin")))))))
4033 (inputs `(("python" ,python)))
4034 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
4035 (description "Subdl is a command-line tool for downloading subtitles from
4036 opensubtitles.org. By default, it will search for English subtitles, display
4037 the results, download the highest-rated result in the requested language and
4038 save it to the appropriate filename.")
4039 (license license:gpl3+)
4040 (home-page "https://github.com/alexanderwink/subdl"))))
4042 (define-public l-smash
4049 (url "https://github.com/l-smash/l-smash")
4050 (commit (string-append "v" version))))
4051 (file-name (git-file-name name version))
4054 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
4055 (build-system gnu-build-system)
4057 `(#:tests? #f ;no tests
4059 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
4060 (assoc-ref %outputs "out") "/lib"))
4062 (modify-phases %standard-phases
4063 ;; configure fails if it is followed by CONFIG_SHELL
4065 (lambda* (#:key outputs #:allow-other-keys)
4066 (let ((out (assoc-ref outputs "out")))
4067 (invoke "./configure" (string-append "--prefix=" out)
4068 "--disable-static")))))))
4070 `(("which" ,which)))
4071 (home-page "https://l-smash.github.io/l-smash/")
4072 (synopsis "MP4 multiplexer and demultiplexer library")
4074 "L-SMASH is a cross-platform library that handles the ISO base media file
4075 format and some of its derived file formats, including MP4. It operates as a
4076 multiplexer and demultiplexer, and can mux video and audio in several formats
4077 using standalone executable files.")
4078 (license license:isc)))
4080 (define-public qtfaststart
4082 (name "qtfaststart")
4086 (uri (pypi-uri "qtfaststart" version))
4089 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
4090 (build-system python-build-system)
4092 '(#:tests? #f)) ; no test suite
4093 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
4094 (description "qtfaststart enables streaming and pseudo-streaming of
4095 QuickTime and MP4 files by moving metadata and offset information to the
4096 beginning of the file. It can also print some useful information about the
4097 structure of the file. This program is based on qt-faststart.c from the FFmpeg
4098 project, which is released into the public domain, as well as ISO 14496-12:2005
4099 (the official spec for MP4), which can be obtained from the ISO or found
4101 (home-page "https://github.com/danielgtaylor/qtfaststart")
4102 (license license:expat)))
4104 (define-public vidstab
4105 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4109 (version (git-version "1.1.0" revision commit))
4113 (url "https://github.com/georgmartius/vid.stab")
4115 (file-name (git-file-name name version))
4118 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4119 (build-system cmake-build-system)
4121 '(#:tests? #f)) ; tests are not run as part of standard build process
4122 (home-page "http://public.hronopik.de/vid.stab/")
4123 (synopsis "Video stabilization library")
4124 (description "Vidstab is a video stabilization library which can be used
4125 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4126 vehicle typically suffers from undesirable shakes and jitters. Activities such
4127 as surfing, skiing, riding and walking while shooting videos are especially
4128 prone to erratic camera shakes. Vidstab targets these video contents to help
4129 create smoother and stable videos.")
4130 (license license:gpl2+))))
4132 (define-public libopenshot
4134 (name "libopenshot")
4139 (url "https://github.com/OpenShot/libopenshot")
4140 (commit (string-append "v" version))))
4141 (file-name (git-file-name name version))
4144 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
4145 (modules '((guix build utils)))
4147 ;; Allow overriding of the python installation dir
4148 (substitute* "src/bindings/python/CMakeLists.txt"
4149 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4150 (string-append set " CACHE PATH "
4151 "\"Python bindings directory\")")))
4152 (delete-file-recursively "thirdparty")
4154 (build-system cmake-build-system)
4156 `(("pkg-config" ,pkg-config)
4159 ("unittest++" ,unittest-cpp)))
4160 (propagated-inputs ;all referenced in installed headers
4161 `(("cppzmq" ,cppzmq)
4163 ("imagemagick" ,imagemagick)
4164 ("jsoncpp" ,jsoncpp)
4165 ("libopenshot-audio" ,libopenshot-audio)
4167 ("qtmultimedia" ,qtmultimedia)
4168 ("zeromq" ,zeromq)))
4171 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4172 ,(version-major+minor (package-version python))
4174 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4176 (modify-phases %standard-phases
4177 (add-before 'configure 'set-vars
4178 (lambda* (#:key inputs #:allow-other-keys)
4179 (setenv "LIBOPENSHOT_AUDIO_DIR"
4180 (assoc-ref inputs "libopenshot-audio"))
4182 (assoc-ref inputs "zeromq"))
4183 (setenv "UNITTEST_DIR"
4184 (string-append (assoc-ref inputs "unittest++")
4185 "/include/UnitTest++"))
4187 (home-page "https://openshot.org")
4188 (synopsis "Video-editing, animation, and playback library")
4189 (description "OpenShot Library (libopenshot) is a powerful C++ video
4190 editing library with a multi-threaded and feature rich video editing
4191 API. It includes bindings for Python, Ruby, and other languages.")
4192 (license license:lgpl3+)))
4194 (define-public openshot
4201 (url "https://github.com/OpenShot/openshot-qt")
4202 (commit (string-append "v" version))))
4203 (file-name (git-file-name name version))
4206 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
4207 (modules '((guix build utils)))
4210 ;; TODO: Unbundle jquery and others from src/timeline/media
4211 (delete-file-recursively "src/images/fonts") #t))))
4212 (build-system python-build-system)
4214 `(("ffmpeg" ,ffmpeg)
4215 ("font-ubuntu" ,font-ubuntu)
4216 ("libopenshot" ,libopenshot)
4218 ("python-pyqt" ,python-pyqt)
4219 ("python-pyzmq" ,python-pyzmq)
4220 ("python-requests" ,python-requests)
4223 `(#:modules ((guix build python-build-system)
4224 (guix build qt-utils)
4226 #:imported-modules (,@%python-build-system-modules
4227 (guix build qt-utils))
4228 #:phases (modify-phases %standard-phases
4229 (delete 'build) ;install phase does all the work
4232 (setenv "QT_QPA_PLATFORM" "offscreen")
4233 (invoke "python" "src/tests/query_tests.py")))
4234 (add-after 'unpack 'patch-font-location
4235 (lambda* (#:key inputs #:allow-other-keys)
4236 (let ((font (assoc-ref inputs "font-ubuntu")))
4237 (substitute* "src/classes/app.py"
4238 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4239 (("fonts") "share/fonts/truetype")))
4241 (add-before 'install 'set-tmp-home
4243 ;; src/classes/info.py "needs" to create several
4244 ;; directories in $HOME when loaded during build
4245 (setenv "HOME" "/tmp")
4247 (add-after 'install 'wrap-program
4248 (lambda* (#:key outputs #:allow-other-keys)
4249 (let ((out (assoc-ref outputs "out")))
4250 (wrap-qt-program out "openshot-qt"))
4252 (home-page "https://www.openshot.org/")
4253 (synopsis "Video editor")
4254 (description "OpenShot takes your videos, photos, and music files and
4255 helps you create the film you have always dreamed of. Easily add sub-titles,
4256 transitions, and effects and then export your film to many common formats.")
4257 (license license:gpl3+)))
4259 (define-public dav1d
4266 (uri (string-append "https://downloads.videolan.org/pub/videolan"
4267 "/dav1d/" version "/dav1d-" version ".tar.xz"))
4270 "1hnkfcg57bv5rib6cnj39dy1jx0q7zi5fb2fz52hf2y0bv8bad1k"))))
4271 (build-system meson-build-system)
4272 (native-inputs `(("nasm" ,nasm)))
4273 (home-page "https://code.videolan.org/videolan/dav1d")
4274 (synopsis "AV1 decoder")
4275 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4276 speed and correctness.")
4277 (license license:bsd-2)))
4279 (define-public wlstream
4280 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4284 (version (git-version "0.0" revision commit))
4289 (url "https://github.com/atomnuker/wlstream")
4291 (file-name (git-file-name name version))
4294 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
4295 (build-system meson-build-system)
4296 (native-inputs `(("libdrm" ,libdrm)
4297 ("pkg-config" ,pkg-config)))
4298 (inputs `(("ffmpeg" ,ffmpeg)
4299 ("pulseaudio" ,pulseaudio)
4300 ("wayland" ,wayland)
4301 ("wayland-protocols" ,wayland-protocols)))
4302 (home-page "https://github.com/atomnuker/wlstream")
4303 (synopsis "Screen capture tool for Wayland sessions")
4304 (description "Wlstream is a screen capture tool for recording audio and
4305 video from a Wayland session.")
4306 (license license:lgpl2.1+))))
4308 (define-public gaupol
4315 (url "https://github.com/otsaloma/gaupol/")
4317 (file-name (git-file-name name version))
4320 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
4321 (build-system python-build-system)
4323 `(("gettext" ,gettext-minimal)
4324 ("pkg-config" ,pkg-config)))
4326 `(("python-pygobject" ,python-pygobject)
4328 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
4329 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
4330 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
4331 ("iso-codes" ,iso-codes) ; Optional: Translations.
4332 ("gstreamer" ,gstreamer)
4333 ("gst-libav" ,gst-libav)
4334 ("gst-plugins-base" ,gst-plugins-base)
4335 ("gst-plugins-good" ,gst-plugins-good)
4336 ("gst-plugins-bad" ,gst-plugins-bad)
4337 ("gst-plugins-ugly" ,gst-plugins-ugly)))
4339 `(#:tests? #f ; Tests seem to require networking.
4341 (modify-phases %standard-phases
4342 ;; gaupol's setup.py script does not support one of the Python build
4343 ;; system's default flags, "--single-version-externally-managed".
4345 (lambda* (#:key outputs #:allow-other-keys)
4346 (invoke "python" "setup.py" "install"
4347 (string-append "--prefix=" (assoc-ref outputs "out"))
4349 (add-after 'install 'wrap-gaupol
4350 (lambda* (#:key outputs #:allow-other-keys)
4351 (let ((out (assoc-ref outputs "out"))
4352 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
4353 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
4354 (wrap-program (string-append out "/bin/gaupol")
4355 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
4356 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
4358 (add-after 'unpack 'patch-data-dir
4359 ;; Fix some path variables that setup.py seems to garble.
4360 (lambda* (#:key outputs #:allow-other-keys)
4361 (let ((out (assoc-ref outputs "out")))
4362 (substitute* "setup.py"
4363 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
4364 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
4365 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
4366 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
4368 (synopsis "Editor for text-based subtitles")
4370 "Gaupol supports multiple subtitle file formats and provides means of
4371 creating subtitles, editing texts and timing subtitles to match video. The
4372 user interface features a builtin video player and is designed with attention
4373 to convenience of translating and batch processing of multiple documents.")
4374 (home-page "https://otsaloma.io/gaupol/")
4375 (license license:gpl3+)))
4377 (define-public theorafile
4378 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
4381 (version (git-version "0.0.0" "1" commit))
4386 (url "https://github.com/FNA-XNA/Theorafile")
4388 (file-name (git-file-name name version))
4390 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
4391 (build-system gnu-build-system)
4393 '(#:make-flags '("CC=gcc")
4395 (modify-phases %standard-phases
4400 (invoke "make" "test")))
4402 (lambda* (#:key outputs #:allow-other-keys)
4403 (let ((out (assoc-ref outputs "out")))
4404 (install-file "libtheorafile.so" (string-append out "/lib"))
4405 (install-file "theorafile.h" (string-append out "/include")))
4410 (home-page "https://github.com/FNA-XNA/Theorafile")
4411 (synopsis "Ogg Theora Video Decoder Library")
4412 (description "Theorafile is a library for quickly and easily decoding Ogg
4413 Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
4414 (license license:zlib))))
4416 (define-public dvdbackup
4423 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
4424 "dvdbackup-" version "/"
4425 "dvdbackup-" version ".tar.xz"))
4427 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
4428 (build-system gnu-build-system)
4430 `(("libdvdcss" ,libdvdcss)
4431 ("libdvdread" ,libdvdread)))
4432 (home-page "http://dvdbackup.sourceforge.net")
4433 (synopsis "DVD video ripper")
4435 "A simple command line tool to backup video from a DVD. Decrypts the
4436 DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
4437 transcode or reformat the videos in any way, producing perfect backups.")
4438 (license license:gpl3+)))
4440 (define-public svt-av1
4448 (url "https://github.com/OpenVisualCloud/SVT-AV1")
4449 (commit (string-append "v" version))))
4450 (file-name (git-file-name name version))
4452 (base32 "1gfxdmdql090p7c8ln1z344g467l41p45287lmwy590hv8gw6bfg"))))
4453 (build-system cmake-build-system)
4454 ;; SVT-AV1 only supports Intel-compatible CPUs.
4455 (supported-systems '("x86_64-linux" "i686-linux"))
4457 ;; The test suite tries to download test data and git clone a 3rd-party
4458 ;; fork of libaom. Skip it.
4461 (modify-phases %standard-phases
4462 (add-after 'install 'install-documentation
4463 (lambda* (#:key outputs #:allow-other-keys)
4464 (let* ((out (assoc-ref %outputs "out"))
4465 (doc (string-append out "/share/doc/svt-av1-" ,version)))
4466 (copy-recursively "../source/Docs" doc)
4470 (synopsis "AV1 video codec")
4471 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
4472 work-in-progress, aiming to support video-on-demand and live streaming
4473 applications. It only supports Intel-compatible CPUs (x86).")
4474 (home-page "https://github.com/OpenVisualCloud/SVT-AV1")
4475 (license license:bsd-2)))
4477 (define-public w-scan
4480 (version "20170107")
4484 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
4485 version ".tar.bz2"))
4487 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
4488 (build-system gnu-build-system)
4489 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
4491 "This is a small command line utility used to perform frequency scans for
4492 DVB and ATSC transmissions without initial tuning data. It can print the
4493 result in several formats:
4495 @item VDR channels.conf,
4496 @item czap/tzap/xine/mplayer channels.conf,
4497 @item Gstreamer dvbsrc plugin,
4498 @item VLC xspf playlist,
4500 @item initial tuning data for scan or dvbv5-scan.
4502 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
4503 (license license:gpl2+)))
4505 (define-public rav1e
4512 (uri (crate-uri "rav1e" version))
4514 (string-append name "-" version ".tar.gz"))
4517 "053bh8hc6jj81ydq4gcak01b0ady59hvkl7d87im3y8nafg7xzb4"))))
4518 (build-system cargo-build-system)
4521 (("rust-aom-sys" ,rust-aom-sys-0.1)
4522 ("rust-arbitrary" ,rust-arbitrary-0.2)
4523 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
4524 ("rust-arrayvec" ,rust-arrayvec-0.5)
4525 ("rust-backtrace" ,rust-backtrace-0.3)
4526 ("rust-bitstream-io" ,rust-bitstream-io-0.8)
4527 ("rust-byteorder" ,rust-byteorder-1.3)
4528 ("rust-cfg-if" ,rust-cfg-if-0.1)
4529 ("rust-clap" ,rust-clap-2)
4530 ("rust-console" ,rust-console-0.11)
4531 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
4532 ("rust-fern" ,rust-fern-0.6)
4533 ("rust-image" ,rust-image-0.23)
4534 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
4535 ("rust-itertools" ,rust-itertools-0.9)
4536 ("rust-ivf" ,rust-ivf-0.1)
4537 ("rust-libc" ,rust-libc-0.2)
4538 ("rust-log" ,rust-log-0.4)
4539 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.2)
4540 ("rust-num-derive" ,rust-num-derive-0.3)
4541 ("rust-num-traits" ,rust-num-traits-0.2)
4542 ("rust-paste" ,rust-paste-0.1)
4543 ("rust-rand" ,rust-rand-0.7)
4544 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
4545 ("rust-rayon" ,rust-rayon-1)
4546 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
4547 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
4548 ("rust-serde" ,rust-serde-1)
4549 ("rust-signal-hook" ,rust-signal-hook-0.1)
4550 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
4551 ("rust-thiserror" ,rust-thiserror-1.0)
4552 ("rust-toml" ,rust-toml-0.5)
4553 ("rust-y4m" ,rust-y4m-0.5)
4554 ("rust-cc" ,rust-cc-1)
4555 ("rust-nasm-rs" ,rust-nasm-rs-0.1)
4556 ("rust-rustc-version" ,rust-rustc-version-0.2)
4557 ("rust-vergen" ,rust-vergen-3.1))
4558 #:cargo-development-inputs
4559 (("rust-assert-cmd" ,rust-assert-cmd-1)
4560 ("rust-criterion" ,rust-criterion-0.3)
4561 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
4562 ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
4563 ("rust-rand" ,rust-rand-0.7)
4564 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
4565 ("rust-semver" ,rust-semver-0.9))
4567 (modify-phases %standard-phases
4569 (lambda* (#:key outputs #:allow-other-keys)
4570 (let ((out (assoc-ref outputs "out")))
4571 (invoke "cargo" "cinstall" "--release"
4572 (string-append "--prefix=" out))))))))
4574 `(("cargo-c" ,rust-cargo-c)))
4577 (home-page "https://github.com/xiph/rav1e/")
4578 (synopsis "The fastest and safest AV1 encoder")
4580 "The fastest and safest AV1 encoder.")
4581 (license license:bsd-2)))
4591 (url "https://github.com/phw/peek")
4593 (file-name (git-file-name name version))
4595 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4596 (build-system meson-build-system)
4597 (arguments '(#:glib-or-gtk? #t))
4601 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4602 ("gettext" ,gettext-minimal)
4603 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4604 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4605 ("pkg-config" ,pkg-config)
4607 (home-page "https://github.com/phw/peek")
4608 (synopsis "Simple animated GIF screen recorder")
4610 "Peek makes it easy to create short screencasts of a screen area. It was
4611 built for the specific use case of recording screen areas, e.g. for easily
4612 showing UI features of your own apps or for showing a bug in bug reports.
4613 With Peek, you simply place the Peek window over the area you want to record
4614 and press \"Record\". Peek is optimized for generating animated GIFs, but you
4615 can also directly record to WebM or MP4 if you prefer.")
4616 (license license:gpl3+)))
4618 (define-public wf-recorder
4620 (name "wf-recorder")
4625 (url "https://github.com/ammen99/wf-recorder")
4626 (commit (string-append "v" version))))
4627 (file-name (git-file-name name version))
4630 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4631 (build-system meson-build-system)
4633 `(("pkg-config" ,pkg-config)))
4635 `(("ffmpeg" ,ffmpeg)
4636 ("pulseaudio" ,pulseaudio)
4637 ("wayland" ,wayland)
4638 ("wayland-protocols" ,wayland-protocols)
4639 ("libx264" ,libx264)))
4640 (home-page "https://github.com/ammen99/wf-recorder")
4641 (synopsis "Screen recorder for wlroots-based compositors")
4643 "@code{wf-recorder} is a utility program for screen recording of
4644 wlroots-based compositors. More specifically, those that support
4645 @code{wlr-screencopy-v1} and @code{xdg-output}.")
4646 (license license:expat)))
4648 (define-public guvcview
4654 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
4655 "src-" version ".tar.gz"))
4658 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
4659 (build-system gnu-build-system)
4661 ;; There are no tests and "make check" would fail on an intltool error.
4664 `(("pkg-config" ,pkg-config)
4665 ("intltool" ,intltool)))
4670 ("v4l-utils" ,v4l-utils) ;libv4l2
4671 ("ffmpeg" ,ffmpeg) ;libavcodec, libavutil
4674 ("portaudio" ,portaudio)
4675 ("alsa-lib" ,alsa-lib)))
4676 (home-page "http://guvcview.sourceforge.net/")
4677 (synopsis "Control your webcam and capture videos and images")
4679 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
4680 webcam accessible with Video4Linux (V4L2) and to capture videos and images.
4681 It provides control over precise settings of the webcam such as exposure,
4682 brightness, contrast, and frame rate.")
4684 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
4685 (license license:gpl2+)))
4687 (define-public get-iplayer
4689 (name "get-iplayer")
4695 (url "https://github.com/get-iplayer/get_iplayer")
4696 (commit (string-append "v" version))))
4697 (file-name (git-file-name name version))
4700 "0lsz5hz1ia5j612540rb0f31y7j2k5gf7x5i43l8k06b90wi73d6"))))
4701 (build-system perl-build-system)
4703 `(#:tests? #f ; no tests
4705 (modify-phases %standard-phases
4709 (lambda* (#:key outputs #:allow-other-keys)
4710 (let* ((out (assoc-ref outputs "out"))
4711 (bin (string-append out "/bin"))
4712 (man (string-append out "/share/man/man1")))
4713 (install-file "get_iplayer" bin)
4714 (install-file "get_iplayer.cgi" bin)
4715 (install-file "get_iplayer.1" man))
4717 (add-after 'install 'wrap-program
4718 (lambda* (#:key inputs outputs #:allow-other-keys)
4719 (let* ((out (assoc-ref outputs "out"))
4720 (perllib (string-append out "/lib/perl5/site_perl/"
4721 ,(package-version perl))))
4722 (wrap-program (string-append out "/bin/get_iplayer")
4724 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
4725 (wrap-program (string-append out "/bin/get_iplayer.cgi")
4727 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
4730 `(("perl-mojolicious" ,perl-mojolicious)
4731 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
4732 ("perl-xml-libxml" ,perl-xml-libxml)))
4733 (home-page "https://github.com/get-iplayer/get_iplayer")
4734 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
4735 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
4736 TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
4737 @code{get_iplayer} has three modes: recording a complete programme for later
4738 playback, streaming a programme directly to a playback application, such as
4739 mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
4740 terms and recording programmes automatically. It can also stream or record live
4741 BBC iPlayer output.")
4742 (license license:gpl3+)))
4744 (define-public ogmtools
4750 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
4755 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
4756 (build-system gnu-build-system)
4758 `(("libvorbis" ,libvorbis)
4759 ("libdvdread" ,libdvdread)))
4760 (synopsis "Information, extraction or creation for OGG media streams")
4762 "These tools allow information about (@code{ogminfo}) or extraction from
4763 \(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
4764 includes @code{dvdxchap} tool for extracting chapter information from DVD.")
4765 (license license:gpl2)
4766 (home-page "https://www.bunkus.org/videotools/ogmtools/")))