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