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