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