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