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