gnu: linux-libre-arm-generic: Add mitigation for CVE-2017-1000364.
[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>
ca3f9952 4;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
68b3627c 6;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
307ad140 8;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
8824da4c 9;;; Copyright © 2015, 2016 Alex Vong <alexvong1995@gmail.com>
2b841707 10;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
d8841cc5 11;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
ed6ba9cc 12;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
4df07622 13;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
3a44c7bb 14;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
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>
b8a31908 18;;; Copyright © 2017 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>
fa379a5b 22;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
39efcc9b
AE
23;;;
24;;; This file is part of GNU Guix.
25;;;
26;;; GNU Guix is free software; you can redistribute it and/or modify it
27;;; under the terms of the GNU General Public License as published by
28;;; the Free Software Foundation; either version 3 of the License, or (at
29;;; your option) any later version.
30;;;
31;;; GNU Guix is distributed in the hope that it will be useful, but
32;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34;;; GNU General Public License for more details.
35;;;
36;;; You should have received a copy of the GNU General Public License
37;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38
39(define-module (gnu packages video)
fe138965 40 #:use-module (ice-9 match)
08858812 41 #:use-module (srfi srfi-1)
ae0bdd81 42 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 43 #:use-module (guix utils)
39efcc9b
AE
44 #:use-module (guix packages)
45 #:use-module (guix download)
38829eac 46 #:use-module (guix git-download)
d8841cc5 47 #:use-module (guix svn-download)
44726031 48 #:use-module (guix build-system cmake)
39efcc9b 49 #:use-module (guix build-system gnu)
0e74bb5b 50 #:use-module (guix build-system glib-or-gtk)
615215a5 51 #:use-module (guix build-system python)
1c1178cd 52 #:use-module (guix build-system waf)
3b02429c 53 #:use-module (gnu packages)
39efcc9b 54 #:use-module (gnu packages algebra)
72bfebf5 55 #:use-module (gnu packages audio)
f1044010 56 #:use-module (gnu packages autotools)
d5a748e8 57 #:use-module (gnu packages avahi)
38829eac 58 #:use-module (gnu packages base)
8dd6fc51 59 #:use-module (gnu packages bison)
d5a748e8 60 #:use-module (gnu packages cdrom)
fe047e13 61 #:use-module (gnu packages cmake)
39efcc9b 62 #:use-module (gnu packages compression)
e0c40707 63 #:use-module (gnu packages cpp)
f464016d 64 #:use-module (gnu packages curl)
44726031 65 #:use-module (gnu packages databases)
3a44c7bb 66 #:use-module (gnu packages dejagnu)
f22e0e26 67 #:use-module (gnu packages elf)
8dd6fc51 68 #:use-module (gnu packages flex)
39efcc9b 69 #:use-module (gnu packages fontutils)
c161c22a 70 #:use-module (gnu packages freedesktop)
44726031
AE
71 #:use-module (gnu packages fribidi)
72 #:use-module (gnu packages gettext)
38829eac 73 #:use-module (gnu packages ghostscript)
d5a748e8
AE
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages glib)
2cd85cf9 76 #:use-module (gnu packages guile)
fe047e13 77 #:use-module (gnu packages gnome)
d5a748e8 78 #:use-module (gnu packages gnupg)
fe047e13 79 #:use-module (gnu packages gstreamer)
44726031 80 #:use-module (gnu packages gtk)
e55354b8 81 #:use-module (gnu packages image)
b5b20bda 82 #:use-module (gnu packages imagemagick)
d5a748e8
AE
83 #:use-module (gnu packages linux)
84 #:use-module (gnu packages lua)
fe047e13 85 #:use-module (gnu packages m4)
3a44c7bb 86 #:use-module (gnu packages man)
d5a748e8 87 #:use-module (gnu packages mp3)
4d94b93c 88 #:use-module (gnu packages ncurses)
6f6c8b65 89 #:use-module (gnu packages ocr)
39efcc9b
AE
90 #:use-module (gnu packages perl)
91 #:use-module (gnu packages pkg-config)
a7d94b54 92 #:use-module (gnu packages popt)
d5a748e8 93 #:use-module (gnu packages pulseaudio)
39efcc9b 94 #:use-module (gnu packages python)
d5a748e8
AE
95 #:use-module (gnu packages qt)
96 #:use-module (gnu packages sdl)
97 #:use-module (gnu packages ssh)
6b2c6be0 98 #:use-module (gnu packages texinfo)
c426e61e 99 #:use-module (gnu packages textutils)
a7fd7b68 100 #:use-module (gnu packages tls)
d5a748e8 101 #:use-module (gnu packages version-control)
bb470bd3 102 #:use-module (gnu packages web)
fe047e13 103 #:use-module (gnu packages webkit)
794223bc 104 #:use-module (gnu packages wxwidgets)
ee3b55ea 105 #:use-module (gnu packages xdisorg)
54ff0b7d 106 #:use-module (gnu packages xiph)
d5a748e8
AE
107 #:use-module (gnu packages xml)
108 #:use-module (gnu packages xorg)
01497dfe 109 #:use-module (gnu packages assembly)
44726031 110 #:use-module (gnu packages zip))
39efcc9b 111
6b2c6be0
SB
112(define-public aalib
113 (package
114 (name "aalib")
115 (version "1.4rc5")
116 (source (origin
117 (method url-fetch)
de67e922
LF
118 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
119 version "/" name "-" version ".tar.gz"))
6b2c6be0
SB
120 (sha256
121 (base32
122 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
123 (build-system gnu-build-system)
124 (native-inputs
125 `(("makeinfo" ,texinfo)))
126 (inputs
127 `(("ncurses" ,ncurses)))
128 (arguments
c437922a 129 `(#:phases
6b2c6be0 130 (modify-phases %standard-phases
3a4de6b2 131 (replace 'configure
014cbde6 132 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
133 ;; This old `configure' script doesn't support
134 ;; variables passed as arguments.
135 (let ((out (assoc-ref outputs "out"))
136 (ncurses (assoc-ref inputs "ncurses")))
137 (setenv "CONFIG_SHELL" (which "bash"))
138 (zero? (system* "./configure"
139 (string-append "--prefix=" out)
014cbde6 140 (string-append "--build=" build)
c437922a
MW
141 ;; The ancient config.guess is unable to
142 ;; guess the host triplet on mips64el.
143 ,@(if (string=? "mips64el-linux"
144 (%current-system))
145 '("--host=mips64el-unknown-linux-gnu")
146 '())
64465558
EF
147 ;; The same is also true with aarch64.
148 ,@(if (string=? "aarch64-linux"
149 (%current-system))
150 '("--host=aarch64-unknown-linux-gnu")
151 '())
6b2c6be0
SB
152 (string-append "--with-ncurses="
153 ncurses)))))))))
154 (home-page "http://aa-project.sourceforge.net/aalib/")
155 (synopsis "ASCII-art library")
156 (description
157 "AA-lib is a low level gfx library which does not require graphics device.
158In fact, there is no graphical output possible. AA-lib replaces those
159old-fashioned output methods with powerful ascii-art renderer.")
160 (license license:lgpl2.0+)))
161
cda163cd
TUBK
162(define-public liba52
163 (package
164 (name "liba52")
165 (version "0.7.4")
166 (source (origin
167 (method url-fetch)
8c056935
TUBK
168 (uri (string-append
169 ;; A mirror://sourceforge URI doesn't work, presumably
170 ;; because the SourceForge project is misconfigured.
171 "http://liba52.sourceforge.net/files/a52dec-" version
172 ".tar.gz"))
cda163cd
TUBK
173 (sha256
174 (base32
23da88f6 175 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
176 (patches (search-patches "liba52-enable-pic.patch"
177 "liba52-set-soname.patch"
178 "liba52-use-mtune-not-mcpu.patch"
179 "liba52-link-with-libm.patch"))))
cda163cd 180 (build-system gnu-build-system)
23da88f6
MW
181 ;; XXX We need to run ./bootstrap because of the build system fixes above.
182 (native-inputs
183 `(("autoconf" ,autoconf)
184 ("automake" ,automake)
185 ("libtool" ,libtool)))
412a2422 186 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
187 #:phases
188 (modify-phases %standard-phases
189 ;; XXX We need to run ./bootstrap because of the build
190 ;; system fixes above.
191 (add-after
192 'unpack 'bootstrap
193 (lambda _ (zero? (system* "sh" "bootstrap")))))))
cda163cd
TUBK
194 (home-page "http://liba52.sourceforge.net/")
195 (synopsis "ATSC A/52 stream decoder")
196 (description "liba52 is a library for decoding ATSC A/52 streams. The
197A/52 standard is used in a variety of applications, including digital
198television and DVD. It is also known as AC-3.")
ae0bdd81 199 (license license:gpl2+)))
cda163cd 200
e0884109
MW
201(define-public libmpeg2
202 (package
203 (name "libmpeg2")
204 (version "0.5.1")
205 (source (origin
206 (method url-fetch)
207 ;; A mirror://sourceforge URI doesn't work, presumably
208 ;; because the SourceForge project is misconfigured.
209 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
210 name "-" version ".tar.gz"))
211 (sha256
212 (base32
213 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
214 (inputs
215 `(("libx11" ,libx11)
216 ("libxext" ,libxext)
217 ("libxv" ,libxv)
218 ("libsm" ,libsm)
219 ("libice" ,libice)
220 ("sdl" ,sdl)))
221 (build-system gnu-build-system)
222 (home-page "http://libmpeg2.sourceforge.net/")
223 (synopsis "MPEG1 and MPEG2 video decoder library")
224 (description
225 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
226 (license license:gpl2+)))
227
82712597
MW
228(define-public libx264
229 (package
230 (name "libx264")
715dd13d 231 (version "20170316-2245")
82712597
MW
232 (source (origin
233 (method url-fetch)
4ff71cac 234 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
82712597
MW
235 "x264-snapshot-" version ".tar.bz2"))
236 (sha256
237 (base32
715dd13d 238 "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
82712597
MW
239 (build-system gnu-build-system)
240 (native-inputs
241 `(("pkg-config" ,pkg-config)
242 ("yasm" ,yasm)))
243 ;; TODO: Add gpac input
244 (arguments
245 `(#:tests? #f ;no check target
246 #:configure-flags '("--enable-shared"
247 ;; Don't build the command-line program. If we
248 ;; want it later, we should do so in a different
249 ;; package to avoid a circular dependency (the x264
250 ;; program depends on ffmpeg and ffmpeg depends on
251 ;; libx264).
cb50d0c2
MW
252 "--disable-cli"
253
254 ;; On MIPS, we must pass "--disable-asm" or else
255 ;; configure fails after printing: "You specified a
256 ;; pre-MSA CPU in your CFLAGS. If you really want
257 ;; to run on such a CPU, configure with
258 ;; --disable-asm."
259 ,@(if (string-prefix? "mips"
260 (or (%current-target-system)
261 (%current-system)))
262 '("--disable-asm")
263 '()))))
4ff71cac 264 (home-page "https://www.videolan.org/developers/x264.html")
82712597
MW
265 (synopsis "H.264 video coding library")
266 (description "libx264 is an advanced encoding library for creating
267H.264 (MPEG-4 AVC) video streams.")
268 (license (list license:gpl2+ ;most files
269 license:isc ;common/x86/x86inc.asm
270 license:lgpl2.1+ ;extras/getopt.c
271 license:bsd-3 ;extras/inttypes.h
272 (license:non-copyleft ;extras/cl*.h
273 "file://extras/cl.h"
274 "See extras/cl.h in the distribution.")))))
275
7bc7ffc2
EF
276(define-public x265
277 (package
278 (name "x265")
cfa7473c 279 (version "2.4")
7bc7ffc2
EF
280 (source
281 (origin
282 (method url-fetch)
283 (uri (string-append "https://download.videolan.org/videolan/x265/"
284 "x265_" version ".tar.gz"))
285 (sha256
286 (base32
cfa7473c 287 "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
7bc7ffc2
EF
288 (modules '((guix build utils)))
289 (snippet
290 '(delete-file-recursively "source/compat/getopt"))))
291 (build-system cmake-build-system)
292 (arguments
293 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
a160778c
EF
294 ;; Currently the source code doesn't check for aarch64
295 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
296 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
297 '())
7bc7ffc2
EF
298 #:phases
299 (modify-phases %standard-phases
300 (add-before 'configure 'prepare-build
301 (lambda _
302 (delete-file-recursively "build")
303 (chdir "source")
304 #t)))))
305 (home-page "http://x265.org/")
306 (synopsis "Library for encoding h.265/HEVC video streams")
307 (description "x265 is a H.265 / HEVC video encoder application library,
308designed to encode video or images into an H.265 / HEVC encoded bitstream.")
309 (license license:gpl2+)))
310
c426e61e
TUBK
311(define-public libass
312 (package
313 (name "libass")
6cb5476a 314 (version "0.13.7")
c426e61e
TUBK
315 (source (origin
316 (method url-fetch)
317 (uri (string-append
318 "https://github.com/libass/libass/releases/download/"
319 version "/libass-" version ".tar.xz"))
320 (sha256
321 (base32
6cb5476a 322 "17byv926w1mxn56n896sxvdq4m0yv1l7qbm688h6zr3nzgsyarbh"))))
c426e61e
TUBK
323 (build-system gnu-build-system)
324 (native-inputs
325 `(("pkg-config" ,pkg-config)
326 ("yasm" ,yasm)))
327 (propagated-inputs
328 `(("freetype" ,freetype)
329 ("fribidi" ,fribidi)
330 ("fontconfig" ,fontconfig)
331 ("harfbuzz" ,harfbuzz)
332 ("enca" ,enca)))
333 (home-page "https://github.com/libass/libass")
334 (synopsis "Subtitle rendering library for the ASS/SSA format")
335 (description "libass is a subtitle rendering library for the
336ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 337 (license license:isc)))
c426e61e 338
4d94b93c
TUBK
339(define-public libcaca
340 (package
341 (name "libcaca")
342 (version "0.99.beta19")
343 (source (origin
344 (method url-fetch)
345 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
346 version ".tar.gz"))
347 (sha256
348 (base32
349 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
350 (build-system gnu-build-system)
351 (native-inputs `(("pkg-config" ,pkg-config)))
352 (inputs
353 `(("freeglut" ,freeglut)
354 ("ftgl" ,ftgl)
43d51239 355 ("imlib2" ,imlib2)
4d94b93c
TUBK
356 ("libx11" ,libx11)
357 ("mesa" ,mesa)
358 ("ncurses" ,ncurses)
359 ("zlib" ,zlib)))
360 (home-page "http://caca.zoy.org/wiki/libcaca")
361 (synopsis "Colour ASCII-art library")
362 (description "libcaca is a graphics library that outputs text instead of
363pixels, so that it can work on older video cards or text terminals. It
364supports Unicode, 2048 colors, dithering of color images, and advanced text
365canvas operations.")
ae0bdd81 366 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 367
3bfb78dc
TUBK
368(define-public libdca
369 (package
370 (name "libdca")
371 (version "0.0.5")
372 (source (origin
373 (method url-fetch)
374 (uri (string-append
b8a31908 375 "https://download.videolan.org/pub/videolan/libdca/"
3bfb78dc
TUBK
376 version "/libdca-" version ".tar.bz2"))
377 (sha256
378 (base32
379 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
380 (build-system gnu-build-system)
b8a31908 381 (home-page "https://www.videolan.org/developers/libdca.html")
3bfb78dc
TUBK
382 (synopsis "DTS Coherent Acoustics decoder")
383 (description "libdca is a library for decoding DTS Coherent Acoustics
384streams.")
ae0bdd81 385 (license license:gpl2+)))
3bfb78dc 386
99d4c455
TUBK
387(define-public libdv
388 (package
389 (name "libdv")
390 (version "1.0.0")
391 (source (origin
392 (method url-fetch)
393 (uri (string-append
de67e922
LF
394 "mirror://sourceforge/" name "/" name "/"
395 version "/" name "-" version ".tar.gz"))
99d4c455
TUBK
396 (sha256
397 (base32
398 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
399 (build-system gnu-build-system)
400 (native-inputs `(("pkg-config" ,pkg-config)))
401 (inputs `(("libxv" ,libxv)))
402 (home-page "http://libdv.sourceforge.net/")
403 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
404 (description "The Quasar DV codec (libdv) is a software codec for DV
405video, the encoding format used by most digital camcorders, typically those
406that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
407developed according to the official standards for DV video: IEC 61834 and
408SMPTE 314M.")
ae0bdd81 409 (license license:lgpl2.1+)))
99d4c455 410
ee3b55ea
TUBK
411(define-public libva
412 (package
413 (name "libva")
f3fc65f9 414 (version "1.8.2")
ee3b55ea
TUBK
415 (source
416 (origin
417 (method url-fetch)
418 (uri (string-append
5cc3096c 419 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
ee3b55ea
TUBK
420 version".tar.bz2"))
421 (sha256
f3fc65f9 422 (base32 "1pnfl3q7dzxs26l3jk9xi97gr0qwnaz6dhvf9ifp2yplr3fy7lwy"))))
ee3b55ea
TUBK
423 (build-system gnu-build-system)
424 (native-inputs
425 `(("pkg-config" ,pkg-config)))
426 (inputs
427 `(("libdrm" ,libdrm)
428 ("libx11" ,libx11)
429 ("libxext" ,libxext)
430 ("libxfixes" ,libxfixes)
431 ("mesa" ,mesa)))
372cf039
TUBK
432 (arguments
433 `(#:phases
434 (modify-phases %standard-phases
435 (add-before
436 'build 'fix-dlopen-paths
437 (lambda* (#:key outputs #:allow-other-keys)
438 (let ((out (assoc-ref outputs "out")))
439 (substitute* "va/drm/va_drm_auth_x11.c"
440 (("\"libva-x11\\.so\\.%d\"")
441 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
442 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
443 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
444 #:configure-flags
445 (list (string-append "--with-drivers-path="
446 (assoc-ref %build-inputs "mesa") "/lib/dri"))
447 ;; However, we can't write to mesa's store directory, so override the
448 ;; following make variable to install the dummy driver to libva's
449 ;; $prefix/lib/dri directory.
450 #:make-flags
451 (list (string-append "dummy_drv_video_ladir="
452 (assoc-ref %outputs "out") "/lib/dri"))))
5c1c2254 453 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
454 (synopsis "Video acceleration library")
455 (description "The main motivation for VA-API (Video Acceleration API) is
456to enable hardware accelerated video decode/encode at various
457entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
458standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 459 (license license:expat)))
ee3b55ea 460
39efcc9b
AE
461(define-public ffmpeg
462 (package
463 (name "ffmpeg")
ad27449e 464 (version "3.3.2")
39efcc9b
AE
465 (source (origin
466 (method url-fetch)
a1121a7f
EF
467 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
468 version ".tar.xz"))
39efcc9b
AE
469 (sha256
470 (base32
ad27449e 471 "11974vcfsy8w0i6f4lfwqmg80xkfybqw7vw6zzrcn5i6ncddx60r"))))
39efcc9b
AE
472 (build-system gnu-build-system)
473 (inputs
c4c4cc05 474 `(("fontconfig" ,fontconfig)
39efcc9b 475 ("freetype" ,freetype)
c8dab7f4 476 ("gnutls" ,gnutls)
e816b348 477 ("opus" ,opus)
71241192 478 ("ladspa" ,ladspa)
d4f12db8 479 ("lame" ,lame)
c426e61e 480 ("libass" ,libass)
5d3609e4 481 ("libbluray" ,libbluray)
4d94b93c 482 ("libcaca" ,libcaca)
cc6c0170 483 ("libcdio-paranoia" ,libcdio-paranoia)
39efcc9b 484 ("libtheora" ,libtheora)
bb3df15e 485 ("libva" ,libva)
f88f0d20 486 ("libvdpau" ,libvdpau)
39efcc9b 487 ("libvorbis" ,libvorbis)
dc55b8b2 488 ("libvpx" ,libvpx)
f88f0d20 489 ("libx11" ,libx11)
549381d6 490 ("libx264" ,libx264)
f88f0d20 491 ("mesa" ,mesa)
71241192 492 ("openal" ,openal)
71241192 493 ("pulseaudio" ,pulseaudio)
85bc5434 494 ("sdl" ,sdl2)
72bfebf5 495 ("soxr" ,soxr)
c4c4cc05 496 ("speex" ,speex)
72bfebf5 497 ("twolame" ,twolame)
d505801a 498 ("x265" ,x265)
67932f86 499 ("xvid" ,xvid)
b3546174 500 ("zlib" ,zlib)))
c4c4cc05
JD
501 (native-inputs
502 `(("bc" ,bc)
39efcc9b
AE
503 ("perl" ,perl)
504 ("pkg-config" ,pkg-config)
824d9dc3 505 ("texinfo" ,texinfo)
39efcc9b
AE
506 ("python" ,python-2) ; scripts use interpreter python2
507 ("speex" ,speex)
c4c4cc05 508 ("yasm" ,yasm)))
39efcc9b 509 (arguments
31f9322e 510 `(#:test-target "fate"
12f92e38
AP
511 #:configure-flags
512 ;; possible additional inputs:
513 ;; --enable-avisynth enable reading of AviSynth script
514 ;; files [no]
515 ;; --enable-frei0r enable frei0r video filtering
516 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
517 ;; --enable-libcelt enable CELT decoding via libcelt [no]
518 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
519 ;; and libraw1394 [no]
520 ;; --enable-libfaac enable AAC encoding via libfaac [no]
521 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
522 ;; --enable-libflite enable flite (voice synthesis) support via
523 ;; libflite [no]
524 ;; --enable-libgme enable Game Music Emu via libgme [no]
525 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
526 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
527 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
528 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
529 ;; --enable-libnut enable NUT (de)muxing via libnut,
530 ;; native (de)muxer exists [no]
531 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
532 ;; libopencore-amrnb [no]
533 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
534 ;; libopencore-amrwb [no]
535 ;; --enable-libopencv enable video filtering via libopencv [no]
536 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
537 ;; OpenJPEG [no]
538 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
539 ;; --enable-libschroedinger enable Dirac de/encoding via
540 ;; libschroedinger [no]
541 ;; --enable-libshine enable fixed-point MP3 encoding via
542 ;; libshine [no]
543 ;; --enable-libssh enable SFTP protocol via libssh [no]
544 ;; (libssh2 does not work)
545 ;; --enable-libstagefright-h264 enable H.264 decoding via
546 ;; libstagefright [no]
547 ;; --enable-libutvideo enable Ut Video encoding and decoding via
548 ;; libutvideo [no]
549 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
550 ;; --enable-libvidstab enable video stabilization using
551 ;; vid.stab [no]
552 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
553 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
554 ;; libvo-amrwbenc [no]
555 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
556 ;; --enable-libxavs enable AVS encoding via xavs [no]
557 ;; --enable-libzmq enable message passing via libzmq [no]
558 ;; --enable-libzvbi enable teletext support via libzvbi [no]
559 ;; --enable-opencl enable OpenCL code
12f92e38
AP
560 '("--enable-avresample"
561 "--enable-gpl" ; enable optional gpl licensed parts
562 "--enable-shared"
563 "--enable-fontconfig"
c8dab7f4 564 "--enable-gnutls"
12f92e38
AP
565 "--enable-ladspa"
566 "--enable-libass"
567 "--enable-libbluray"
568 "--enable-libcaca"
569 "--enable-libcdio"
570 "--enable-libfreetype"
571 "--enable-libmp3lame"
572 "--enable-libopus"
573 "--enable-libpulse"
12f92e38
AP
574 "--enable-libsoxr"
575 "--enable-libspeex"
576 "--enable-libtheora"
577 "--enable-libtwolame"
578 "--enable-libvorbis"
579 "--enable-libvpx"
580 "--enable-libxvid"
581 "--enable-libx264"
d505801a 582 "--enable-libx265"
12f92e38 583 "--enable-openal"
f88f0d20 584 "--enable-opengl"
12f92e38
AP
585
586 "--enable-runtime-cpudetect"
587
588 ;; Runtime cpu detection is not implemented on
589 ;; MIPS, so we disable some features.
590 "--disable-mips32r2"
c5e1fcd0 591 "--disable-mipsdsp"
12f92e38
AP
592 "--disable-mipsdspr2"
593 "--disable-mipsfpu")
31f9322e 594 #:phases
f2feb0ce
LC
595 (modify-phases %standard-phases
596 (replace
39efcc9b
AE
597 'configure
598 ;; configure does not work followed by "SHELL=..." and
599 ;; "CONFIG_SHELL=..."; set environment variables instead
600 (lambda* (#:key outputs configure-flags #:allow-other-keys)
601 (let ((out (assoc-ref outputs "out")))
602 (substitute* "configure"
47734a56 603 (("#! /bin/sh") (string-append "#!" (which "sh"))))
39efcc9b
AE
604 (setenv "SHELL" (which "bash"))
605 (setenv "CONFIG_SHELL" (which "bash"))
12f92e38
AP
606 (zero? (apply system*
607 "./configure"
608 (string-append "--prefix=" out)
609 ;; Add $libdir to the RUNPATH of all the binaries.
610 (string-append "--extra-ldflags=-Wl,-rpath="
611 out "/lib")
612 configure-flags)))))
457e528e
LC
613 (add-before
614 'check 'set-ld-library-path
615 (lambda _
616 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
617 ;; running tests.
618 (let* ((dso (find-files "." "\\.so$"))
619 (path (string-join (map dirname dso) ":")))
620 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
621 (setenv "LD_LIBRARY_PATH" path)
27350ef8 622 #t))))))
702bfbf1 623 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
624 (synopsis "Audio and video framework")
625 (description "FFmpeg is a complete, cross-platform solution to record,
626convert and stream audio and video. It includes the libavcodec
627audio/video codec library.")
ae0bdd81 628 (license license:gpl2+)))
d5a748e8 629
940778c7
LC
630(define-public ffmpeg-2.8
631 (package
632 (inherit ffmpeg)
1ce1050d 633 (version "2.8.12")
940778c7
LC
634 (source (origin
635 (method url-fetch)
636 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
637 version ".tar.xz"))
638 (sha256
639 (base32
1ce1050d 640 "1gc32akvdms3rywphnap94lqqici8l5898a09ir1ad5rif5g24v2"))))
940778c7
LC
641 (arguments
642 (substitute-keyword-arguments (package-arguments ffmpeg)
643 ((#:configure-flags flags)
644 `(map (lambda (flag)
645 (if (string=? flag "--disable-mipsdsp")
646 "--disable-mipsdspr1"
647 flag))
648 ,flags))))))
649
d5a748e8
AE
650(define-public vlc
651 (package
652 (name "vlc")
dd13aa90 653 (version "2.2.6")
d5a748e8
AE
654 (source (origin
655 (method url-fetch)
656 (uri (string-append
a134cc8e 657 "https://download.videolan.org/pub/videolan/vlc/"
d5a748e8
AE
658 version "/vlc-" version ".tar.xz"))
659 (sha256
660 (base32
dd13aa90 661 "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4"))))
d5a748e8
AE
662 (build-system gnu-build-system)
663 (native-inputs
2aaa5729
CL
664 `(("autoconf" ,autoconf)
665 ("automake" ,automake)
666 ("git" ,git) ; needed for a test
667 ("libtool" ,libtool)
d5a748e8
AE
668 ("pkg-config" ,pkg-config)))
669 ;; FIXME: Add optional inputs once available.
670 (inputs
671 `(("alsa-lib" ,alsa-lib)
672 ("avahi" ,avahi)
673 ("dbus" ,dbus)
674 ("flac" ,flac)
b4dff935 675 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
d5a748e8
AE
676 ("fontconfig" ,fontconfig)
677 ("freetype" ,freetype)
678 ("gnutls" ,gnutls)
8824da4c 679 ("liba52" ,liba52)
d5a748e8 680 ("libcddb" ,libcddb)
72b6a894 681 ("libdvbpsi" ,libdvbpsi)
d5a748e8
AE
682 ("libgcrypt" ,libgcrypt)
683 ("libkate" ,libkate)
684 ("libmad" ,libmad)
685 ("libogg" ,libogg)
686 ("libpng" ,libpng)
687 ("libsamplerate" ,libsamplerate)
688 ("libssh2" ,libssh2)
689 ("libvorbis" ,libvorbis)
690 ("libtheora" ,libtheora)
691 ("libxext" ,libxext)
c161c22a 692 ("libxi" ,libxi)
d5a748e8
AE
693 ("libxinerama" ,libxinerama)
694 ("libxml2" ,libxml2)
695 ("libxpm" ,libxpm)
2aaa5729 696 ("livemedia-utils" ,livemedia-utils)
d5a748e8
AE
697 ("lua" ,lua-5.1)
698 ("mesa" ,mesa)
699 ("opus" ,opus)
700 ("perl" ,perl)
701 ("pulseaudio" ,pulseaudio)
702 ("python" ,python-wrapper)
c161c22a
DC
703 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
704 ;("qtbase" ,qtbase) with -std=gnu++11.
a134cc8e 705 ;("qtx11extras" ,qtx11extras)
d5a748e8
AE
706 ("sdl" ,sdl)
707 ("sdl-image" ,sdl-image)
708 ("speex" ,speex)
8f5f6c92 709 ("x265" ,x265)
d5a748e8
AE
710 ("xcb-util-keysyms" ,xcb-util-keysyms)))
711 (arguments
712 `(#:configure-flags
8824da4c 713 `(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
c6b3dc69
LC
714 ;; In our case, this led to a test failure:
715 ;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
716 "ac_cv_c_fast_math=no"
717
d5a748e8
AE
718 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
719 (assoc-ref %build-inputs "ffmpeg")
cd76fbde
LC
720 "/lib")) ;needed for the tests
721
722 #:phases
723 (modify-phases %standard-phases
2aaa5729
CL
724 (add-before 'configure 'bootstrap
725 (lambda _ (zero? (system* "sh" "bootstrap"))))
726 (add-before 'bootstrap 'fix-livemedia-utils-prefix
727 (lambda* (#:key inputs #:allow-other-keys)
728 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
729 (substitute* "configure.ac"
730 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
731 (string-append "LIVE555_PREFIX=" livemedia-utils)))
732 #t)))
a134cc8e
EF
733 (add-before 'configure 'remove-visual-tests
734 ;; Some of the tests require using the display to test out VLC,
735 ;; which fails in our sandboxed build system
736 (lambda _
737 (substitute* "test/run_vlc.sh"
738 (("./vlc --ignore-config") "echo"))
739 #t))
cd76fbde
LC
740 (add-after 'install 'regenerate-plugin-cache
741 (lambda* (#:key outputs #:allow-other-keys)
742 ;; The 'install-exec-hook' rule in the top-level Makefile.am
743 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
744 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
745 ;; it references. Thus, we first reset the timestamps of all
746 ;; these files, and then regenerate the cache such that the
747 ;; mtimes it includes are always zero instead of being dependent
748 ;; on the build time.
749 (let* ((out (assoc-ref outputs "out"))
750 (pkglibdir (string-append out "/lib/vlc"))
751 (plugindir (string-append pkglibdir "/plugins"))
752 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
753 ;; TODO: Factorize 'reset-timestamps'.
754 (for-each (lambda (file)
755 (let ((s (lstat file)))
756 (unless (eq? (stat:type s) 'symlink)
757 (utime file 0 0 0 0))))
758 (find-files plugindir))
759 (zero? (system* cachegen plugindir))))))))
d5a748e8
AE
760 (home-page "https://www.videolan.org/")
761 (synopsis "Audio and video framework")
762 (description "VLC is a cross-platform multimedia player and framework
763that plays most multimedia files as well as DVD, Audio CD, VCD, and various
764treaming protocols.")
ae0bdd81 765 (license license:gpl2+)))
ace69243
AE
766
767(define-public mplayer
768 (package
769 (name "mplayer")
e71b20e5 770 (version "1.3.0")
ace69243
AE
771 (source (origin
772 (method url-fetch)
773 (uri (string-append
ebde7c7a 774 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
775 version ".tar.xz"))
776 (sha256
777 (base32
e71b20e5 778 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
ace69243
AE
779 (build-system gnu-build-system)
780 ;; FIXME: Add additional inputs once available.
781 (native-inputs
782 `(("pkg-config" ,pkg-config)))
783 (inputs
784 `(("alsa-lib" ,alsa-lib)
785 ("cdparanoia" ,cdparanoia)
b3546174 786 ("ffmpeg" ,ffmpeg)
778a6a8b 787 ("fontconfig" ,fontconfig)
ace69243 788 ("freetype" ,freetype)
778a6a8b 789;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
ace69243 790 ("lame" ,lame)
778a6a8b 791 ("libass" ,libass)
b3546174
MW
792 ("libdvdcss" ,libdvdcss)
793 ("libdvdnav" ,libdvdnav)
ace69243 794 ("libjpeg" ,libjpeg)
778a6a8b
EF
795 ("libmpeg2" ,libmpeg2)
796 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
797 ("libpng" ,libpng)
798 ("libtheora" ,libtheora)
778a6a8b 799 ("libvdpau" ,libvdpau)
ace69243
AE
800 ("libvorbis" ,libvorbis)
801 ("libx11" ,libx11)
778a6a8b 802 ("libx264" ,libx264)
ace69243
AE
803 ("libxinerama" ,libxinerama)
804 ("libxv" ,libxv)
778a6a8b 805 ("libxxf86dga" ,libxxf86dga)
ace69243 806 ("mesa" ,mesa)
778a6a8b 807 ("opus" ,opus)
ace69243
AE
808 ("perl" ,perl)
809 ("pulseaudio" ,pulseaudio)
810 ("python" ,python-wrapper)
811 ("sdl" ,sdl)
812 ("speex" ,speex)
813 ("yasm" ,yasm)
814 ("zlib" ,zlib)))
815 (arguments
816 `(#:tests? #f ; no test target
817 #:phases
ebde7c7a
EF
818 (modify-phases %standard-phases
819 (replace 'configure
ace69243
AE
820 ;; configure does not work followed by "SHELL=..." and
821 ;; "CONFIG_SHELL=..."; set environment variables instead
822 (lambda* (#:key inputs outputs #:allow-other-keys)
823 (let ((out (assoc-ref outputs "out"))
824 (libx11 (assoc-ref inputs "libx11")))
825 (substitute* "configure"
2564b7c2 826 (("#! /bin/sh") (string-append "#!" (which "sh"))))
ace69243
AE
827 (setenv "SHELL" (which "bash"))
828 (setenv "CONFIG_SHELL" (which "bash"))
829 (zero? (system*
830 "./configure"
831 (string-append "--extra-cflags=-I"
832 libx11 "/include") ; to detect libx11
ebde7c7a 833 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 834 (string-append "--prefix=" out)
fe138965
MW
835 ;; Enable runtime cpu detection where supported,
836 ;; and choose a suitable target.
837 ,@(match (or (%current-target-system)
838 (%current-system))
839 ("x86_64-linux"
840 '("--enable-runtime-cpudetection"
841 "--target=x86_64-linux"))
842 ("i686-linux"
843 '("--enable-runtime-cpudetection"
844 "--target=i686-linux"))
845 ("mips64el-linux"
f0d6d835
MW
846 '("--target=mips3-linux"))
847 (_ (list (string-append
848 "--target="
849 (or (%current-target-system)
850 (nix-system->gnu-triplet
851 (%current-system)))))))
ebde7c7a
EF
852 "--disable-iwmmxt"))))))))
853 (home-page "https://www.mplayerhq.hu/design7/news.html")
ace69243
AE
854 (synopsis "Audio and video player")
855 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
856Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
857NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
858SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 859 (license license:gpl2)))
d0ed39be 860
1c1178cd
TUBK
861(define-public mpv
862 (package
863 (name "mpv")
43ba5dd4 864 (version "0.25.0")
1c1178cd
TUBK
865 (source (origin
866 (method url-fetch)
867 (uri (string-append
868 "https://github.com/mpv-player/mpv/archive/v" version
869 ".tar.gz"))
870 (sha256
871 (base32
43ba5dd4 872 "1khb7c4fdj1aak46lwyb3lq14w5jpxzws0zp6bdc87ljsvx3yhh7"))
1c1178cd
TUBK
873 (file-name (string-append name "-" version ".tar.gz"))))
874 (build-system waf-build-system)
875 (native-inputs
832d60dc 876 `(("perl" ,perl) ; for zsh completion file
1c1178cd
TUBK
877 ("pkg-config" ,pkg-config)
878 ("python-docutils" ,python-docutils)))
81c29ccc 879 ;; Missing features: libguess, Wayland, V4L2
1c1178cd
TUBK
880 (inputs
881 `(("alsa-lib" ,alsa-lib)
882 ("enca" ,enca)
883 ("ffmpeg" ,ffmpeg)
2d8781a4 884 ("jack" ,jack-1)
1c1178cd
TUBK
885 ("ladspa" ,ladspa)
886 ("lcms" ,lcms)
887 ("libass" ,libass)
888 ("libbluray" ,libbluray)
889 ("libcaca" ,libcaca)
890 ("libbs2b" ,libbs2b)
891 ("libcdio-paranoia" ,libcdio-paranoia)
892 ("libdvdread" ,libdvdread)
893 ("libdvdnav" ,libdvdnav)
894 ("libjpeg" ,libjpeg)
895 ("libva" ,libva)
81c29ccc 896 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
897 ("libx11" ,libx11)
898 ("libxext" ,libxext)
899 ("libxinerama" ,libxinerama)
900 ("libxrandr" ,libxrandr)
901 ("libxscrnsaver" ,libxscrnsaver)
902 ("libxv" ,libxv)
e66f0dd2
AP
903 ;; XXX: lua > 5.2 is not currently supported; see
904 ;; waftools/checks/custom.py
905 ("lua" ,lua-5.2)
1c1178cd
TUBK
906 ("mesa" ,mesa)
907 ("mpg123" ,mpg123)
908 ("pulseaudio" ,pulseaudio)
909 ("rsound" ,rsound)
f0b8d83a 910 ("waf" ,python-waf)
1c1178cd
TUBK
911 ("youtube-dl" ,youtube-dl)
912 ("zlib" ,zlib)))
913 (arguments
914 '(#:phases
915 (modify-phases %standard-phases
916 (add-before
f8503e2b 917 'configure 'setup-waf
1c1178cd
TUBK
918 (lambda* (#:key inputs #:allow-other-keys)
919 (copy-file (assoc-ref inputs "waf") "waf")
599fd842 920 (setenv "CC" "gcc"))))
98c8b963 921 #:configure-flags (list "--enable-libmpv-shared"
43ba5dd4
EF
922 "--enable-cdda"
923 "--enable-dvdread"
924 "--enable-dvdnav"
98c8b963
EF
925 "--enable-zsh-comp"
926 "--disable-build-date")
1c1178cd
TUBK
927 ;; No check function defined.
928 #:tests? #f))
581873b5 929 (home-page "https://mpv.io/")
1c1178cd
TUBK
930 (synopsis "Audio and video player")
931 (description "mpv is a general-purpose audio and video player. It is a
932fork of mplayer2 and MPlayer. It shares some features with the former
933projects while introducing many more.")
ae0bdd81 934 (license license:gpl2+)))
1c1178cd 935
0e74bb5b
AG
936(define-public gnome-mpv
937 (package
938 (name "gnome-mpv")
2b841707 939 (version "0.11")
0e74bb5b
AG
940 (source
941 (origin
942 (method url-fetch)
943 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
944 "/download/v" version "/gnome-mpv-" version
945 ".tar.xz"))
946 (sha256
947 (base32
2b841707 948 "1hn3mpsxbrwf2m0nz4vzji4i6i896y8kqjb9kijqpk04cnrs3fgz"))))
0e74bb5b
AG
949 (native-inputs
950 `(("intltool" ,intltool)
951 ("pkg-config" ,pkg-config)))
952 (inputs
953 `(("gtk+" ,gtk+)
954 ("libepoxy" ,libepoxy)
955 ("mpv" ,mpv)))
956 (build-system glib-or-gtk-build-system)
957 (home-page "https://github.com/gnome-mpv/gnome-mpv")
958 (synopsis "GTK+ frontend for the mpv media player")
959 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
960GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
961access to mpv's powerful playback capabilities.")
962 (license license:gpl3+)))
963
d0ed39be
DT
964(define-public libvpx
965 (package
966 (name "libvpx")
65064909 967 (version "1.6.1")
d0ed39be
DT
968 (source (origin
969 (method url-fetch)
723e8866
MW
970 (uri (string-append "http://storage.googleapis.com/"
971 "downloads.webmproject.org/releases/webm/"
972 name "-" version ".tar.bz2"))
d0ed39be
DT
973 (sha256
974 (base32
65064909 975 "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
c7c49446 976 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
977 (build-system gnu-build-system)
978 (arguments
0e47b4e7
EF
979 `(#:phases
980 (modify-phases %standard-phases
981 (replace 'configure
982 (lambda* (#:key outputs #:allow-other-keys)
983 (setenv "CONFIG_SHELL" (which "bash"))
984 (let ((out (assoc-ref outputs "out")))
985 (setenv "LDFLAGS"
986 (string-append "-Wl,-rpath=" out "/lib"))
987 (zero? (system* "./configure"
988 "--enable-shared"
989 "--as=yasm"
990 ;; Limit size to avoid CVE-2015-1258
991 "--size-limit=16384x16384"
992 (string-append "--prefix=" out)))))))
4f8f15cd 993 #:tests? #f)) ; no check target
d0ed39be
DT
994 (native-inputs
995 `(("perl" ,perl)
996 ("yasm" ,yasm)))
997 (synopsis "VP8/VP9 video codec")
998 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 999 (license license:bsd-3)
d0ed39be 1000 (home-page "http://www.webmproject.org/")))
615215a5
LC
1001
1002(define-public youtube-dl
1003 (package
1004 (name "youtube-dl")
cdd85a85 1005 (version "2017.06.12")
615215a5
LC
1006 (source (origin
1007 (method url-fetch)
39dc7032 1008 (uri (string-append "https://yt-dl.org/downloads/"
615215a5
LC
1009 version "/youtube-dl-"
1010 version ".tar.gz"))
1011 (sha256
1012 (base32
cdd85a85 1013 "1p4d8g44v8vgr4xwvmbvzkjz6zakl2r89spaak6yw1zxmymd9b1w"))))
615215a5 1014 (build-system python-build-system)
2ad9515c
AV
1015 (arguments
1016 ;; The problem here is that the directory for the man page and completion
1017 ;; files is relative, and for some reason, setup.py uses the
1018 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1019 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1020 ;; completion file is called 'youtube-dl' rather than
1021 ;; 'youtube-dl.bash-completion'.
31c58006
LF
1022 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1023 #:phases (modify-phases %standard-phases
2ad9515c
AV
1024 (add-before 'install 'fix-the-data-directories
1025 (lambda* (#:key outputs #:allow-other-keys)
1026 (let ((prefix (assoc-ref outputs "out")))
1027 (mkdir "bash-completion")
1028 (rename-file "youtube-dl.bash-completion"
1029 "bash-completion/youtube-dl")
1030 (substitute* "setup.py"
1031 (("youtube-dl\\.bash-completion")
1032 "bash-completion/youtube-dl")
1033 (("'etc/")
1034 (string-append "'" prefix "/etc/"))
1035 (("'share/")
1036 (string-append "'" prefix "/share/")))))))))
615215a5
LC
1037 (synopsis "Download videos from YouTube.com and other sites")
1038 (description
b798dfde 1039 "Youtube-dl is a small command-line program to download videos from
615215a5 1040YouTube.com and a few more sites.")
39dc7032 1041 (home-page "https://yt-dl.org")
ae0bdd81 1042 (license license:public-domain)))
e6bdb36a 1043
794223bc
CM
1044(define-public youtube-dl-gui
1045 (package
1046 (name "youtube-dl-gui")
1047 (version "0.3.8")
1048 (source
1049 (origin
1050 (method url-fetch)
1051 (uri (pypi-uri "Youtube-DLG" version))
1052 (sha256
1053 (base32
1054 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1055 (build-system python-build-system)
1056 (arguments
1057 ;; In Guix, wxpython has not yet been packaged for Python 3.
1058 `(#:python ,python-2
1059 ;; This package has no tests.
1060 #:tests? #f
1061 #:phases
1062 (modify-phases %standard-phases
1063 (add-before 'build 'patch-source
1064 (lambda* (#:key inputs #:allow-other-keys)
1065 ;; The youtube-dl-gui program lets you configure options. Some of
1066 ;; them are problematic, so we change their defaults.
1067 (substitute* "youtube_dl_gui/optionsmanager.py"
1068 ;; When this is true, the builder process will try (and fail) to
1069 ;; write logs to the builder user's home directory.
1070 (("'enable_log': True") "'enable_log': False")
1071 ;; This determines which youtube-dl program youtube-dl-gui will
1072 ;; run. If we don't set this, then youtube-dl-gui might download
1073 ;; an arbitrary copy from the Internet into the user's home
1074 ;; directory and run it, so let's make sure youtube-dl-gui uses
1075 ;; the youtube-dl from the inputs by default.
1076 (("'youtubedl_path': self.config_path")
1077 (string-append "'youtubedl_path': '"
1078 (assoc-ref inputs "youtube-dl")
1079 "/bin'"))
1080 ;; When this is True, when youtube-dl-gui is finished downloading
1081 ;; a file, it will try (and possibly fail) to open the directory
1082 ;; containing the downloaded file. This can fail because it
1083 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1084 ;; adding xdg-utils to the propagated inputs is not enough to
1085 ;; make this work, so for now we set the default to False.
1086 (("'open_dl_dir': True") "'open_dl_dir': False"))
1087 ;; The youtube-dl program from the inputs is actually a wrapper
1088 ;; script written in bash, so attempting to invoke it as a python
1089 ;; script will fail.
1090 (substitute* "youtube_dl_gui/downloaders.py"
1091 (("cmd = \\['python', self\\.youtubedl_path\\]")
1092 "cmd = [self.youtubedl_path]"))
1093 ;; Use relative paths for installing data files so youtube-dl-gui
1094 ;; installs the files relative to its prefix in the store, rather
1095 ;; than relative to /. Also, instead of installing data files into
1096 ;; $prefix/usr/share, install them into $prefix/share for
1097 ;; consistency (see: (standards) Directory Variables).
1098 (substitute* "setup.py"
1099 (("= '/usr/share") "= 'share"))
1100 ;; Update get_locale_file() so it finds the installed localization
1101 ;; files.
1102 (substitute* "youtube_dl_gui/utils.py"
1103 (("os\\.path\\.join\\('/usr', 'share'")
1104 (string-append "os.path.join('"
1105 (assoc-ref %outputs "out")
1106 "', 'share'"))))))))
1107 (inputs
1108 `(("python2-wxpython" ,python2-wxpython)
1109 ("youtube-dl" ,youtube-dl)))
1110 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1111 (synopsis
1112 "GUI (Graphical User Interface) for @command{youtube-dl}")
1113 (description
1114 "Youtube-dlG is a GUI (Graphical User Interface) for
1115@command{youtube-dl}. You can use it to download videos from YouTube and any
1116other site that youtube-dl supports.")
1117 (license license:unlicense)))
1118
72fa6667
FS
1119(define-public you-get
1120 (package
1121 (name "you-get")
f0bc6ca1 1122 (version "0.4.715")
72fa6667
FS
1123 (source (origin
1124 (method url-fetch)
1125 (uri (string-append
1126 "https://github.com/soimort/you-get/releases/download/v"
1127 version "/you-get-" version ".tar.gz"))
1128 (sha256
1129 (base32
f0bc6ca1 1130 "043122hfh56fbbszp1kwd1f65asgyn60j1ijday93hf2dkhvbrnh"))))
72fa6667
FS
1131 (build-system python-build-system)
1132 (arguments
1133 ;; no tests
1134 '(#:tests? #f))
1135 (inputs
1136 `(("ffmpeg" ,ffmpeg)))
1137 (synopsis "Download videos, audios, or images from Web sites")
1138 (description
1139 "You-Get is a command-line utility to download media contents (videos,
1140audio, images) from the Web. It can use either mpv or vlc for playback.")
1141 (home-page "https://you-get.org/")
1142 (license license:expat)))
1143
5d3609e4
TUBK
1144(define-public libbluray
1145 (package
1146 (name "libbluray")
d76e2634 1147 (version "1.0.1")
5d3609e4
TUBK
1148 (source (origin
1149 (method url-fetch)
5e3f68e6 1150 (uri (string-append "https://download.videolan.org/videolan/"
5d3609e4
TUBK
1151 name "/" version "/"
1152 name "-" version ".tar.bz2"))
1153 (sha256
1154 (base32
d76e2634 1155 "0fl5cxfj870rwqmmz3s04wh7wnabb7rnynfj1v3sz37ln8frm7qg"))))
5d3609e4 1156 (build-system gnu-build-system)
6c0cd765 1157 (arguments
d76e2634 1158 `(#:configure-flags '("--disable-bdjava-jar")
6c0cd765
AP
1159 #:phases
1160 (modify-phases %standard-phases
1161 (add-before 'build 'fix-dlopen-paths
1162 (lambda* (#:key inputs #:allow-other-keys)
1163 (let ((libaacs (assoc-ref inputs "libaacs"))
1164 (libbdplus (assoc-ref inputs "libbdplus")))
1165 (substitute* "src/libbluray/disc/aacs.c"
1166 (("\"libaacs\"")
1167 (string-append "\"" libaacs "/lib/libaacs\"")))
1168 (substitute* "src/libbluray/disc/bdplus.c"
1169 (("\"libbdplus\"")
1170 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1171 #t))))))
2da45ebe 1172 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 1173 (inputs
71ee51a0 1174 `(("fontconfig" ,fontconfig)
5d3609e4 1175 ("freetype" ,freetype)
6c0cd765
AP
1176 ("libaacs" ,libaacs)
1177 ("libbdplus" ,libbdplus)
71ee51a0 1178 ("libxml2" ,libxml2)))
5e3f68e6 1179 (home-page "https://www.videolan.org/developers/libbluray.html")
5d3609e4
TUBK
1180 (synopsis "Blu-Ray Disc playback library")
1181 (description
1182 "libbluray is a library designed for Blu-Ray Disc playback for media
1183players, like VLC or MPlayer.")
ae0bdd81 1184 (license license:lgpl2.1+)))
5d3609e4 1185
e6bdb36a
AE
1186(define-public libdvdread
1187 (package
1188 (name "libdvdread")
9aebf330 1189 (version "5.0.3")
e6bdb36a
AE
1190 (source (origin
1191 (method url-fetch)
b8a31908 1192 (uri (string-append "https://download.videolan.org/videolan/"
e6bdb36a
AE
1193 name "/" version "/"
1194 name "-" version ".tar.bz2"))
1195 (sha256
1196 (base32
9aebf330 1197 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
e6bdb36a
AE
1198 (build-system gnu-build-system)
1199 (home-page "http://dvdnav.mplayerhq.hu/")
1200 (synopsis "Library for reading video DVDs")
1201 (description
1202 "Libdvdread provides a simple foundation for reading DVD video
1203disks. It provides the functionality that is required to access many
1204DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1205authentication and descrambling (if an external libdvdcss library is
1206installed).")
ae0bdd81 1207 (license license:gpl2+)))
b027d919 1208
b5b20bda
TD
1209(define-public dvdauthor
1210 (package
1211 (name "dvdauthor")
1212 (version "0.7.2")
1213 (source
1214 (origin
1215 (method url-fetch)
1216 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1217 version ".tar.gz"))
1218 (sha256
1219 (base32
1220 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1221 (build-system gnu-build-system)
1222 (inputs
1223 `(("libdvdread" ,libdvdread)
1224 ("libpng" ,libpng)
1225 ("imagemagick" ,imagemagick)
1226 ("libxml2" ,libxml2)
1227 ("freetype" ,freetype)))
1228 (native-inputs
1229 `(("pkg-config" ,pkg-config)))
1230 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1231 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1232MPEG-2 stream containing VOB packets.")
1233 (home-page "http://dvdauthor.sourceforge.net")
1234 (license license:gpl3+)))
1235
b027d919
AE
1236(define-public libdvdnav
1237 (package
1238 (name "libdvdnav")
734976b6 1239 (version "5.0.3")
b027d919
AE
1240 (source (origin
1241 (method url-fetch)
b8a31908 1242 (uri (string-append "https://download.videolan.org/videolan/"
b027d919
AE
1243 name "/" version "/"
1244 name "-" version ".tar.bz2"))
1245 (sha256
1246 (base32
734976b6 1247 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
b027d919
AE
1248 (build-system gnu-build-system)
1249 (native-inputs
1250 `(("pkg-config" ,pkg-config)))
1251 (inputs
1252 `(("libdvdread" ,libdvdread)))
1253 (home-page "http://dvdnav.mplayerhq.hu/")
1254 (synopsis "Library for video DVD navigation features")
1255 (description
1256 "Libdvdnav is a library for developers of multimedia
1257applications. It allows easy use of sophisticated DVD navigation features
1258such as DVD menus, multiangle playback and even interactive DVD games. All
1259this functionality is provided through a simple API which provides the DVD
1260playback as a single logical stream of blocks, intermitted by special
1261dvdnav events to report certain conditions. The main usage of libdvdnav is
1262a loop regularly calling a function to get the next block, surrounded by
1263additional calls to tell the library of user interaction. The whole
1264DVD virtual machine and internal playback states are completely
1265encapsulated.")
ae0bdd81 1266 (license license:gpl2+)))
2cd85cf9 1267
f1044010
TUBK
1268(define-public libdvdnav-4
1269 (package
1270 (inherit libdvdnav)
1271 (version "4.2.1")
1272 (source (origin
1273 (method url-fetch)
1274 (uri
1275 (string-append
b8a31908 1276 "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
f1044010
TUBK
1277 version ".tar.xz"))
1278 (sha256
1279 (base32
1280 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1281 (native-inputs
1282 `(("pkg-config" ,pkg-config)
1283 ("autoconf" ,autoconf)
1284 ("automake" ,automake)
1285 ("libtool" ,libtool)))
1286 (arguments
1287 '(#:phases
1288 (alist-cons-after
1289 'unpack 'autoreconf
1290 (lambda _
1291 (zero? (system* "autoreconf" "-vif")))
1292 %standard-phases)))))
1293
a6f710ec
TUBK
1294(define-public libdvdcss
1295 (package
1296 (name "libdvdcss")
98416109 1297 (version "1.4.0")
a6f710ec
TUBK
1298 (source (origin
1299 (method url-fetch)
b8a31908 1300 (uri (string-append "https://download.videolan.org/pub/"
a6f710ec
TUBK
1301 name "/" version "/"
1302 name "-" version ".tar.bz2"))
1303 (sha256
1304 (base32
98416109 1305 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
a6f710ec 1306 (build-system gnu-build-system)
b8a31908 1307 (home-page "https://www.videolan.org/developers/libdvdcss.html")
a6f710ec
TUBK
1308 (synopsis "Library for accessing DVDs as block devices")
1309 (description
1310 "libdvdcss is a simple library designed for accessing DVDs like a block
1311device without having to bother about the decryption.")
ae0bdd81 1312 (license license:gpl2+)))
a6f710ec 1313
2cd85cf9
DT
1314(define-public srt2vtt
1315 (package
1316 (name "srt2vtt")
1317 (version "0.1")
1318 (source (origin
1319 (method url-fetch)
1320 (uri (string-append
1321 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1322 version ".tar.gz"))
1323 (sha256
1324 (base32
1325 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1326 (build-system gnu-build-system)
1327 (inputs
1328 `(("guile" ,guile-2.0)))
1329 (synopsis "SubRip to WebVTT subtitle converter")
1330 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1331for use with HTML5 video.")
1332 (home-page "http://dthompson.us/pages/software/srt2vtt")
ae0bdd81 1333 (license license:gpl3+)))
44726031
AE
1334
1335(define-public avidemux
1336 (package
1337 (name "avidemux")
9e786e8b 1338 (version "2.6.12")
44726031
AE
1339 (source (origin
1340 (method url-fetch)
1341 (uri (string-append
de67e922
LF
1342 "mirror://sourceforge/" name "/" name "/" version "/"
1343 name "_" version ".tar.gz"))
44726031
AE
1344 (sha256
1345 (base32
9e786e8b 1346 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
fc1adab1 1347 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
1348 (build-system cmake-build-system)
1349 (native-inputs
1350 `(("pkg-config" ,pkg-config)))
1351 ;; FIXME: Once packaged, add libraries not found during the build.
1352 (inputs
1353 `(("alsa-lib" ,alsa-lib)
1354 ("fontconfig" ,fontconfig)
1355 ("freetype" ,freetype)
1356 ("fribidi" ,fribidi)
1357 ("glu" ,glu)
44726031
AE
1358 ("jack" ,jack-1)
1359 ("lame" ,lame)
4cafe8ad
EF
1360 ("libva" ,libva)
1361 ("libvdpau" ,libvdpau)
44726031
AE
1362 ("libvorbis" ,libvorbis)
1363 ("libvpx" ,libvpx)
1364 ("libxv" ,libxv)
1365 ("perl" ,perl)
1366 ("pulseaudio" ,pulseaudio)
1367 ("python" ,python-wrapper)
a2c24bf5
DC
1368 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1369 ;("qtbase" ,qtbase) with -std=gnu++11.
1370 ;("qttools" ,qttools)
44726031
AE
1371 ("sdl" ,sdl)
1372 ("sqlite" ,sqlite)
1373 ("yasm" ,yasm)
1374 ("zlib" ,zlib)))
1375 (arguments
1376 `(#:tests? #f ; no check target
1377 #:phases
1378 ;; Make sure files inside the included ffmpeg tarball are
1379 ;; patch-shebanged.
1898900f
EF
1380 (modify-phases %standard-phases
1381 (add-before 'patch-source-shebangs 'unpack-ffmpeg
44726031
AE
1382 (lambda _
1383 (with-directory-excursion "avidemux_core/ffmpeg_package"
1898900f
EF
1384 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1385 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1386 (add-after 'patch-source-shebangs 'repack-ffmpeg
44726031
AE
1387 (lambda _
1388 (with-directory-excursion "avidemux_core/ffmpeg_package"
9e786e8b 1389 (substitute* "ffmpeg-2.7.6/configure"
2fed4042 1390 (("#! /bin/sh") (string-append "#!" (which "sh"))))
9e786e8b 1391 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
c09e6a5f 1392 ;; avoid non-determinism in the archive
92226a47
MW
1393 "--sort=name" "--mtime=@0"
1394 "--owner=root:0" "--group=root:0")
1898900f
EF
1395 (delete-file-recursively "ffmpeg-2.7.6"))))
1396 (replace 'configure
1397 (lambda _
1398 ;; Copy-paste settings from the cmake build system.
1399 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1400 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1401 (replace 'build
1402 (lambda* (#:key inputs outputs #:allow-other-keys)
1403 (let*
1404 ((out (assoc-ref outputs "out"))
1405 (lib (string-append out "/lib"))
1406 (top (getcwd))
1407 (sdl (assoc-ref inputs "sdl"))
1408 (build_component
1409 (lambda* (component srcdir #:optional (args '()))
1410 (let ((builddir (string-append "build_" component)))
1411 (mkdir builddir)
1412 (with-directory-excursion builddir
1413 (zero?
1414 (and
44726031
AE
1415 (apply system* "cmake"
1416 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1417 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1418 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
c687f731
AE
1419 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1420 "\"-Wl,-rpath=" lib "\"")
44726031
AE
1421 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1422 (string-append "-DSDL_INCLUDE_DIR="
1423 sdl "/include/SDL")
1424 (string-append "../" srcdir)
aab56ab7 1425 "-DENABLE_QT5=True"
44726031 1426 args)
1898900f
EF
1427 (system* "make" "-j"
1428 (number->string (parallel-job-count)))
1429 (system* "make" "install"))))))))
1430 (mkdir out)
1431 (and (build_component "core" "avidemux_core")
1432 (build_component "cli" "avidemux/cli")
1433 (build_component "qt4" "avidemux/qt4")
1434 (build_component "plugins_common" "avidemux_plugins"
1435 '("-DPLUGIN_UI=COMMON"))
1436 (build_component "plugins_cli" "avidemux_plugins"
1437 '("-DPLUGIN_UI=CLI"))
1438 (build_component "plugins_qt4" "avidemux_plugins"
1439 '("-DPLUGIN_UI=QT4"))
1440 (build_component "plugins_settings" "avidemux_plugins"
1441 '("-DPLUGIN_UI=SETTINGS")))
1442 ;; Remove .exe and .dll file.
1443 (delete-file-recursively
1444 (string-append out "/share/ADM6_addons")))))
1445 (delete 'install))))
44726031
AE
1446 (home-page "http://fixounet.free.fr/avidemux/")
1447 (synopsis "Video editor")
1448 (description "Avidemux is a video editor designed for simple cutting,
1449filtering and encoding tasks. It supports many file types, including AVI,
1450DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1451can be automated using projects, job queue and powerful scripting
1452capabilities.")
afd9ed5c 1453 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
44726031 1454 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1455 (license license:gpl2+)))
44726031 1456
6f6c8b65
TUBK
1457(define-public vapoursynth
1458 (package
1459 (name "vapoursynth")
4f7a9e0b 1460 (version "37")
6f6c8b65
TUBK
1461 (source (origin
1462 (method url-fetch)
1463 (uri (string-append
1464 "https://github.com/vapoursynth/vapoursynth/archive/R"
1465 version ".tar.gz"))
0b37c4cd 1466 (file-name (string-append name "-" version ".tar.gz"))
6f6c8b65
TUBK
1467 (sha256
1468 (base32
4f7a9e0b 1469 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
6f6c8b65
TUBK
1470 (build-system gnu-build-system)
1471 (native-inputs
1472 `(("autoconf" ,autoconf)
1473 ("automake" ,automake)
1474 ("cython" ,python-cython)
1475 ("libtool" ,libtool)
1476 ("pkg-config" ,pkg-config)
1477 ("python" ,python)
1478 ("yasm" ,yasm)))
1479 (inputs
1480 `(("ffmpeg" ,ffmpeg)
1481 ("libass" ,libass)
f80d5fe0
EF
1482 ("tesseract-ocr" ,tesseract-ocr)
1483 ("zimg" ,zimg)))
6f6c8b65
TUBK
1484 (arguments
1485 '(#:phases
1486 (modify-phases %standard-phases
1487 (add-after
f8503e2b 1488 'unpack 'autogen
6f6c8b65
TUBK
1489 (lambda _
1490 (zero? (system* "sh" "autogen.sh")))))))
1491 (home-page "http://www.vapoursynth.com/")
1492 (synopsis "Video processing framework")
1493 (description "VapourSynth is a C++ library and Python module for video
1494manipulation. It aims to be a modern rewrite of Avisynth, supporting
1495multithreading, generalized colorspaces, per frame properties, and videos with
1496format changes.")
9a078f48
EF
1497 ;; src/core/cpufeatures only allows x86, ARM or PPC
1498 (supported-systems (delete "mips64el-linux" %supported-systems))
6f6c8b65 1499 ;; As seen from the source files.
ae0bdd81 1500 (license license:lgpl2.1+)))
6f6c8b65 1501
67932f86
TUBK
1502(define-public xvid
1503 (package
1504 (name "xvid")
e05035c7 1505 (version "1.3.4")
67932f86
TUBK
1506 (source (origin
1507 (method url-fetch)
1508 (uri (string-append
1509 "http://downloads.xvid.org/downloads/xvidcore-"
1510 version ".tar.bz2"))
1511 (sha256
1512 (base32
e05035c7 1513 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
67932f86
TUBK
1514 (build-system gnu-build-system)
1515 (native-inputs `(("yasm" ,yasm)))
1516 (arguments
1517 '(#:phases
62fe2d47
EF
1518 (modify-phases %standard-phases
1519 (add-before
1520 'configure 'pre-configure
1521 (lambda _
1522 (chdir "build/generic")
1523 (substitute* "configure"
1524 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
67932f86
TUBK
1525 ;; No 'check' target.
1526 #:tests? #f))
1527 (home-page "https://www.xvid.com/")
1528 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1529 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1530codec library. It uses ASP features such as b-frames, global and quarter
1531pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1532and custom quantization matrices.")
ae0bdd81 1533 (license license:gpl2+)))
e16fde14
DT
1534
1535(define-public livestreamer
1536 (package
1537 (name "livestreamer")
68e88a09 1538 (version "1.12.2")
e16fde14
DT
1539 (source (origin
1540 (method url-fetch)
1541 (uri (string-append
1542 "https://github.com/chrippa/livestreamer/archive/v"
1543 version ".tar.gz"))
1544 (file-name (string-append "livestreamer-" version ".tar.gz"))
1545 (sha256
1546 (base32
68e88a09 1547 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
e16fde14
DT
1548 (build-system python-build-system)
1549 (arguments
1550 '(#:tests? #f)) ; tests rely on external web servers
e16fde14 1551 (propagated-inputs
5b9fe59f 1552 `(("python-requests" ,python-requests)))
e16fde14
DT
1553 (synopsis "Internet video stream viewer")
1554 (description "Livestreamer is a command-line utility that extracts streams
1555from various services and pipes them into a video playing application.")
1556 (home-page "http://livestreamer.io/")
1557 (license license:bsd-2)))
307ad140
RW
1558
1559(define-public mlt
1560 (package
1561 (name "mlt")
f05f5b30 1562 (version "6.4.1")
307ad140
RW
1563 (source (origin
1564 (method url-fetch)
4c7729dc
EF
1565 (uri (string-append "https://github.com/mltframework/mlt/"
1566 "archive/v" version ".tar.gz"))
1567 (file-name (string-append name "-" version ".tar.gz"))
307ad140
RW
1568 (sha256
1569 (base32
f05f5b30 1570 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
307ad140
RW
1571 (build-system gnu-build-system)
1572 (arguments
1573 `(#:tests? #f ; no tests
1574 #:make-flags '("CC=gcc")
1575 #:configure-flags
1576 (list "--enable-gpl3"
1577 "--enable-gpl")
1578 #:phases
1579 (modify-phases %standard-phases
1580 (add-after
1581 'configure 'override-LDFLAGS
1582 (lambda* (#:key outputs #:allow-other-keys)
1583 (substitute* "config.mak"
1584 (("LDFLAGS\\+=")
1585 (string-append "LDFLAGS+=-Wl,-rpath="
1586 (assoc-ref outputs "out")
1587 "/lib ")))
1588 #t)))))
1589 (inputs
1590 `(("alsa-lib" ,alsa-lib)
1591 ("fftw" ,fftw)
1592 ("libxml2" ,libxml2)
1593 ("jack" ,jack-1)
1594 ("ladspa" ,ladspa)
1595 ("libsamplerate" ,libsamplerate)
4c7729dc 1596 ("pulseaudio" ,pulseaudio)
307ad140
RW
1597 ("sdl" ,sdl)
1598 ("sox" ,sox)))
1599 (native-inputs
1600 `(("pkg-config" ,pkg-config)))
4c7729dc 1601 (home-page "https://www.mltframework.org/")
307ad140
RW
1602 (synopsis "Author, manage, and run multitrack audio/video compositions")
1603 (description
1604 "MLT is a multimedia framework, designed and developed for television
1605broadcasting. It provides a toolkit for broadcasters, video editors, media
1606players, transcoders, web streamers and many more types of applications. The
1607functionality of the system is provided via an assortment of ready to use
1608tools, XML authoring components, and an extensible plug-in based API.")
1609 (license license:lgpl2.1+)))
f464016d 1610
945d985a
DT
1611(define-public v4l-utils
1612 (package
1613 (name "v4l-utils")
f1d1ef71 1614 (version "1.12.5")
945d985a
DT
1615 (source (origin
1616 (method url-fetch)
1d4ac724 1617 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
1618 "/v4l-utils-" version ".tar.bz2"))
1619 (sha256
1620 (base32
f1d1ef71 1621 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
945d985a
DT
1622 (build-system gnu-build-system)
1623 (arguments
1624 '(#:configure-flags
1625 (list (string-append "--with-udevdir="
1626 (assoc-ref %outputs "out")
2cef0f7c
DC
1627 "/lib/udev")
1628 "CXXFLAGS=-std=gnu++11")))
945d985a 1629 (native-inputs
4ca077d5
TGR
1630 `(("perl" ,perl)
1631 ("pkg-config" ,pkg-config)))
945d985a
DT
1632 (inputs
1633 `(("alsa-lib" ,alsa-lib)
1634 ("glu" ,glu)
1635 ("libjpeg" ,libjpeg)
1636 ("libx11" ,libx11)
b37662e2 1637 ("qtbase" ,qtbase)
945d985a
DT
1638 ("eudev" ,eudev)))
1639 (synopsis "Realtime video capture utilities for Linux")
1640 (description "The v4l-utils provide a series of libraries and utilities to
1641be used for realtime video capture via Linux-specific APIs.")
1642 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1643 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1644 (license (list license:lgpl2.1+ license:gpl2))))
1645
f464016d
DT
1646(define-public obs
1647 (package
1648 (name "obs")
341ccb0f 1649 (version "18.0.2")
f464016d
DT
1650 (source (origin
1651 (method url-fetch)
1652 (uri (string-append "https://github.com/jp9000/obs-studio"
1653 "/archive/" version ".tar.gz"))
1654 (file-name (string-append name "-" version ".tar.gz"))
1655 (sha256
1656 (base32
341ccb0f 1657 "02pbiyvf5x0zh448h5rpmyn33qnsqk694xxlyns83mdi74savyqw"))))
f464016d 1658 (build-system cmake-build-system)
08858812 1659 (arguments
f3bd1728 1660 `(#:tests? #f)) ; no tests
f464016d
DT
1661 (native-inputs
1662 `(("pkg-config" ,pkg-config)))
1663 (inputs
4f98c3c5
EF
1664 `(("alsa-lib" ,alsa-lib)
1665 ("curl" ,curl)
f464016d
DT
1666 ("eudev" ,eudev)
1667 ("ffmpeg" ,ffmpeg)
4f98c3c5 1668 ("fontconfig" ,fontconfig)
f464016d
DT
1669 ("freetype" ,freetype)
1670 ("jack" ,jack-1)
1671 ("jansson" ,jansson)
1672 ("libx264" ,libx264)
1673 ("libxcomposite" ,libxcomposite)
1674 ("mesa" ,mesa)
1675 ("pulseaudio" ,pulseaudio)
90a2309b
EF
1676 ("qtbase" ,qtbase)
1677 ("qtx11extras" ,qtx11extras)
4f98c3c5 1678 ("speex" ,speex)
d4df2032 1679 ("v4l-utils" ,v4l-utils)
f464016d
DT
1680 ("zlib" ,zlib)))
1681 (synopsis "Live streaming software")
1682 (description "Open Broadcaster Software provides a graphical interface for
1683video recording and live streaming. OBS supports capturing audio and video
1684from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1685and JACK.")
1686 (home-page "https://obsproject.com")
f3bd1728 1687 (supported-systems '("x86_64-linux" "i686-linux"))
f464016d 1688 (license license:gpl2+)))
d5650f86
EF
1689
1690(define-public libvdpau
1691 (package
1692 (name "libvdpau")
1693 (version "1.1.1")
1694 (source
1695 (origin
1696 (method url-fetch)
1697 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1698 name "-" version ".tar.bz2"))
1699 (sha256
1700 (base32
1701 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1702 (build-system gnu-build-system)
1703 (native-inputs
1704 `(("pkg-config" ,pkg-config)))
1705 (inputs
1706 `(("dri2proto" ,dri2proto)
1707 ("libx11" ,libx11 "out")
1708 ("libxext" ,libxext)))
1709 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1710 (synopsis "Video Decode and Presentation API")
1711 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1712provides an interface to video decode acceleration and presentation hardware
1713present in modern GPUs.")
1714 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
1715
1716(define-public vdpauinfo
1717 (package
1718 (name "vdpauinfo")
1719 (version "1.0")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1724 name "-" version ".tar.gz"))
1725 (sha256
1726 (base32
1727 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1728 (build-system gnu-build-system)
1729 (native-inputs
1730 `(("pkg-config" ,pkg-config)
1731 ("libx11" ,libx11)))
1732 (propagated-inputs
1733 `(("libvdpau" ,libvdpau)))
1734 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1735 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1736 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1737implementation.")
1738 (license (license:x11-style "file://COPYING"))))
a7d94b54
LC
1739
1740(define-public recordmydesktop
1741 (package
1742 (name "recordmydesktop")
1743 (version "0.3.8.1")
1744 (source (origin
1745 (method url-fetch)
1746 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1747 version "/recordmydesktop-" version ".tar.gz"))
1748 (sha256
1749 (base32
1750 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1751 (build-system gnu-build-system)
1752 (inputs `(("popt" ,popt)
1753 ("zlib" ,zlib)
1754 ("libx11" ,libx11)
1755 ("libice" ,libice)
1756 ("libsm" ,libsm)
1757 ("libxfixes" ,libxfixes)
1758 ("libxdamage" ,libxdamage)
1759 ("libxext" ,libxext)
ed6ba9cc 1760 ("alsa-lib" ,alsa-lib)
a7d94b54
LC
1761 ("libvorbis" ,libvorbis)
1762 ("libtheora" ,libtheora)))
1763 (home-page "http://recordmydesktop.sourceforge.net/")
1764 (synopsis "Desktop session video recorder")
1765 (description
1766 "recordMyDesktop is a command-line tool that captures the activity in
1767your graphical desktop and encodes it as a video. This is a useful tool for
1768making @dfn{screencasts}.")
1769 (license license:gpl2+)))
d8841cc5
KK
1770
1771(define-public libsmpeg
1772 (package
1773 (name "libsmpeg")
1774 (version "0.4.5")
1775 (source (origin
1776 (method svn-fetch)
1777 (uri (svn-reference
1778 (url "svn://svn.icculus.org/smpeg/trunk/")
1779 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
b9af0564 1780 (file-name (string-append name "-" version "-checkout"))
d8841cc5
KK
1781 (sha256
1782 (base32
1783 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1784 (build-system gnu-build-system)
1785 (arguments
1786 `(#:phases (modify-phases %standard-phases
1787 (add-after 'unpack 'autogen.sh
1788 (lambda _
1789 (zero? (system* "sh" "autogen.sh")))))))
1790 (native-inputs
1791 `(("autoconf" ,autoconf)
1792 ("automake" ,automake)))
1793 (inputs
1794 `(("sdl" ,sdl2)))
1795 (home-page "http://icculus.org/smpeg/")
1796 (synopsis "SDL MPEG decoding library")
1797 (description
1798 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1799with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1800player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1801library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1802and MPEG system streams.")
1803 (license (list license:expat
1804 license:lgpl2.1
1805 license:lgpl2.1+
1806 license:gpl2))))
4df07622
AP
1807
1808(define-public libbdplus
1809 (package
1810 (name "libbdplus")
1811 (version "0.1.2")
1812 (source
1813 (origin
1814 (method url-fetch)
1815 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1816 version "/" name "-" version ".tar.bz2"))
1817 (sha256
1818 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1819 (inputs
1820 `(("libgcrypt" ,libgcrypt)))
1821 (build-system gnu-build-system)
b8a31908 1822 (home-page "https://www.videolan.org/developers/libbdplus.html")
4df07622
AP
1823 (synopsis "Library for decrypting certain Blu-Ray discs")
1824 (description "libbdplus is a library which implements the BD+ System
1825specifications.")
1826 (license license:lgpl2.1+)))
8dd6fc51
AP
1827
1828(define-public libaacs
1829 (package
1830 (name "libaacs")
ba58886a 1831 (version "0.9.0")
8dd6fc51
AP
1832 (source
1833 (origin
1834 (method url-fetch)
1835 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1836 version "/" name "-" version ".tar.bz2"))
1837 (sha256
ba58886a 1838 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
8dd6fc51
AP
1839 (inputs
1840 `(("libgcrypt" ,libgcrypt)))
1841 (native-inputs
1842 `(("bison" ,bison)
1843 ("flex" ,flex)))
1844 (build-system gnu-build-system)
b8a31908 1845 (home-page "https://www.videolan.org/developers/libaacs.html")
8dd6fc51
AP
1846 (synopsis "Library for decrypting certain Blu-Ray discs")
1847 (description "libaacs is a library which implements the Advanced Access
1848Content System specification.")
1849 (license license:lgpl2.1+)))
05234973 1850
1851(define-public mps-youtube
1852 (package
1853 (name "mps-youtube")
1854 (version "0.2.7.1")
1855 (source
1856 (origin
1857 (method url-fetch)
1858 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
1859 "archive/v" version ".tar.gz"))
1860 (file-name (string-append name "-" version ".tar.gz"))
1861 (sha256
1862 (base32
1863 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
1864 (build-system python-build-system)
175d6264 1865 (arguments
1866 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
1867 ;; test suite results differ depending on the country and also introduce
1868 ;; non-determinism in the tests.
1869 ;; https://github.com/mps-youtube/mps-youtube/issues/556
1870 `(#:tests? #f))
05234973 1871 (propagated-inputs
1872 `(("python-pafy" ,python-pafy)
1873 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
1874 (home-page "https://github.com/mps-youtube/mps-youtube")
1875 (synopsis "Terminal based YouTube player and downloader")
1876 (description
1877 "@code{mps-youtube} is based on mps, a terminal based program to
1878search, stream and download music. This implementation uses YouTube as
1879a source of content and can play and download video as well as audio.
1880It can use either mpv or mplayer for playback, and for conversion of
1881formats ffmpeg or libav is used. Users should install one of the
1882supported players in addition to this package.")
1883 (license license:gpl3+)))
fe047e13
EB
1884
1885(define-public handbrake
1886 (package
1887 (name "handbrake")
1888 (version "0.10.5")
1889 (source (origin
1890 (method url-fetch)
1891 (uri (string-append "https://handbrake.fr/rotation.php?file="
1892 "HandBrake-" version ".tar.bz2"))
1893 (file-name (string-append "handbrake-" version ".tar.bz2"))
1894 (sha256
1895 (base32
1896 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
1897 (patches (search-patches "handbrake-pkg-config-path.patch"))
1898 (modules '((guix build utils)))
1899 (snippet
1900 ;; Remove bundled libraries and source not necessary for
1901 ;; running under a GNU environment.
1902 '(begin
1903 (for-each delete-file-recursively '("contrib" "macosx" "win"))
1904 #t))))
1905 (build-system glib-or-gtk-build-system)
1906 (native-inputs
1907 `(("automake" ,automake) ;gui subpackage must be bootstrapped
1908 ("autoconf" ,autoconf)
1909 ("curl" ,curl) ;not actually used, but tested for
1910 ("intltool" ,intltool)
1911 ("libtool" ,libtool)
1912 ("pkg-config" ,pkg-config)
1913 ("python" ,python-2))) ;for configuration
1914 (inputs
1915 `(("bzip2" ,bzip2)
1916 ("dbus-glib" ,dbus-glib)
1917 ("ffmpeg" ,ffmpeg)
1918 ("fontconfig" ,fontconfig)
1919 ("freetype" ,freetype)
1920 ("glib" ,glib)
1921 ("gstreamer" ,gstreamer)
1922 ("gst-plugins-base" ,gst-plugins-base)
1923 ("gtk+" ,gtk+)
1924 ("lame" ,lame)
1925 ("libass" ,libass)
1926 ("libbluray" ,libbluray)
1927 ("libdvdnav" ,libdvdnav)
1928 ("libdvdread" ,libdvdread)
1929 ("libgudev" ,libgudev)
1930 ("libmpeg2" ,libmpeg2)
1931 ("libnotify" ,libnotify)
1932 ("libogg" ,libogg)
1933 ("libsamplerate" ,libsamplerate)
1934 ("libtheora" ,libtheora)
1935 ("libvorbis" ,libvorbis)
1936 ("libvpx" ,libvpx)
1937 ("libxml2" ,libxml2)
1938 ("libx264" ,libx264)
1939 ("x265" ,x265)
1940 ("zlib" ,zlib)))
1941 (arguments
1942 `(#:tests? #f ;tests require Ruby and claim to be unsupported
1943 #:phases
1944 (modify-phases %standard-phases
1945 (add-before 'patch-source-shebangs 'bootstrap-gtk
1946 ;; Run bootstrap ahead of time so that shebangs get patched.
1947 (lambda _
1948 (setenv "CONFIG_SHELL" (which "sh"))
1949 (setenv "NOCONFIGURE" "1")
1950 ;; Patch the Makefile so that it doesn't bootstrap again.
1951 (substitute* "gtk/module.rules"
1952 ((".*autogen\\.sh.*") ""))
1953 (zero? (system* "sh" "./gtk/autogen.sh"))))
1954 (add-before 'configure 'disable-contrib
1955 (lambda _
1956 (substitute* "make/include/main.defs"
1957 ;; Disable unconditional inclusion of some "contrib"
1958 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
1959 ;; and libbluray), which would lead to fetching and
1960 ;; building of these libraries. Use our own instead.
1961 (("MODULES \\+= contrib") "# MODULES += contrib"))
1962 #t))
1963 (add-before 'configure 'fix-x265-linking
1964 (lambda _
1965 (substitute* "test/module.defs"
1966 ;; Fix missing library during linking error
1967 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
1968 #t))
1969 (replace 'configure
1970 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1971 ;; 'configure' is not an autoconf-generated script, and
1972 ;; errors on unrecognized arguments,
1973 ;; e.g. --enable-fast-install
1974 (let ((out (assoc-ref outputs "out")))
1975 (zero? (apply system* "./configure"
1976 (string-append "--prefix=" out)
1977 (or configure-flags '()))))))
1978 (add-after 'configure 'chdir-build
1979 (lambda _ (chdir "./build") #t)))))
1980 (home-page "https://handbrake.fr")
1981 (synopsis "Video transcoder")
1982 (description
1983 "HandBrake is a tool for converting video from any format to a selection
1984of modern, widely supported codecs.")
1985 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
1986 (license (list license:gpl2+ license:bsd-3))))
590abe01
JN
1987
1988(define-public openh264
1989 (package
1990 (name "openh264")
1991 (version "1.6.0")
1992 (source (origin
1993 (method url-fetch)
1994 (uri (string-append "https://github.com/cisco/"
1995 name "/archive/v" version ".tar.gz"))
1996 (file-name (string-append name "-" version ".tar.gz"))
1997 (sha256
1998 (base32
1999 "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
2000 (build-system gnu-build-system)
2001 (native-inputs
2002 `(("nasm" ,nasm)
2003 ("python" ,python)))
2004 (arguments
2005 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2006 #:test-target "test"
2007 #:phases (modify-phases %standard-phases
2008 ;; no configure script
2009 (delete 'configure))))
2010 (home-page "http://www.openh264.org/")
2011 (synopsis "H264 decoder library")
2012 (description
2013 "Openh264 is a library which can decode H264 video streams.")
2014 (license license:bsd-2)))
3a44c7bb 2015
2016(define-public libmp4v2
2017 (package
2018 (name "libmp4v2")
2019 (version "2.0.0")
2020 (source
2021 (origin
2022 (method url-fetch)
2023 ;; XXX: The new location of upstream is uncertain and will become relevant the
2024 ;; moment when the googlecode archive shuts down. It is past the date it
2025 ;; should've been turned off. I tried to communicate with upstream, but this
2026 ;; wasn't very responsive and not very helpful. The short summary is, it is
2027 ;; chaos when it comes to the amount of forks and only time will tell where
2028 ;; the new upstream location is.
2029 (uri (string-append "https://storage.googleapis.com/google-"
2030 "code-archive-downloads/v2/"
2031 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2032 (file-name (string-append name "-" version ".tar.bz2"))
2033 (sha256
2034 (base32
2035 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2036 (build-system gnu-build-system)
2037 (outputs '("out"
2038 "static")) ; 3.7MiB .a file
2039 (arguments
2040 `(#:phases
2041 (modify-phases %standard-phases
2042 (add-after 'unpack 'remove-dates
2043 (lambda _
2044 ;; Make the build reproducible.
2045 (substitute* "configure"
2046 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2047 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2048 #t))
2049 (add-after 'install 'move-static-libraries
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 ;; Move static libraries to the "static" output.
2052 (let* ((out (assoc-ref outputs "out"))
2053 (lib (string-append out "/lib"))
2054 (static (assoc-ref outputs "static"))
2055 (slib (string-append static "/lib")))
2056 (mkdir-p slib)
2057 (for-each (lambda (file)
2058 (install-file file slib)
2059 (delete-file file))
2060 (find-files lib "\\.a$"))
2061 #t))))))
2062 (native-inputs
2063 `(("help2man" ,help2man)
2064 ("dejagnu" ,dejagnu)))
2065 (home-page "https://code.google.com/archive/p/mp4v2/")
2066 (synopsis "API to create and modify mp4 files")
2067 (description
2068 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2069ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2070file format that has been used as a multimedia file format in a variety of platforms and
2071applications. It is a very powerful and extensible format that can accommodate
2072practically any type of media.")
2073 (license license:mpl1.1)))
e0c40707
EJ
2074
2075(define-public libmediainfo
2076 (package
2077 (name "libmediainfo")
2078 (version "0.7.95")
2079 (source (origin
2080 (method url-fetch)
2081 (uri (string-append "https://mediaarea.net/download/source/"
2082 name "/" version"/"
2083 name "_" version ".tar.bz2"))
2084 (sha256
2085 (base32
2086 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2087 ;; TODO add a Big Buck Bunny webm for tests.
2088 (native-inputs
2089 `(("autoconf" ,autoconf)
2090 ("automake" ,automake)
2091 ("libtool" ,libtool)
2092 ("pkg-config" ,pkg-config)
2093 ("zlib" ,zlib)
2094 ("tinyxml2" ,tinyxml2)
2095 ("curl" ,curl)
2096 ("libzen" ,libzen)))
2097 (build-system gnu-build-system)
2098 (arguments
2099 '(#:tests? #f ; see above TODO
2100 #:phases
2101 ;; build scripts not in root of archive
2102 (modify-phases %standard-phases
2103 (add-before 'configure 'pre-configure
2104 (lambda _
2105 (chdir "Project/GNU/Library")))
2106 (add-before 'configure 'autogen
2107 (lambda _
2108 (zero? (system* "./autogen.sh")))))))
2109 (home-page "https://mediaarea.net/en/MediaInfo")
2110 (synopsis "Library for retrieving media metadata")
2111 (description "MediaInfo is a library used for retrieving technical
2112information and other metadata about audio or video files. A non-exhaustive
2113list of the information MediaInfo can retrieve from media files include:
2114
2115@itemize
2116@item General: title, author, director, album, track number, date, duration...
2117@item Video: codec, aspect, fps, bitrate...
2118@item Audio: codec, sample rate, channels, language, bitrate...
2119@item Text: language of subtitle
2120@item Chapters: number of chapters, list of chapters
2121@end itemize
2122
2123MediaInfo supports the following formats:
2124
2125@itemize
2126@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2127MPEG-2, MPEG-4, DVD (VOB)...
2128@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2129@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2130@item Subtitles: SRT, SSA, ASS, SAMI...
2131@end itemize\n")
2132 (license license:bsd-2)))
2133
d5fa2777
EJ
2134;; TODO also have a GUI version available
2135(define-public mediainfo
2136 (package
2137 (name "mediainfo")
2138 (version "0.7.95")
2139 (source (origin
2140 (method url-fetch)
2141 (uri (string-append "https://mediaarea.net/download/source/"
2142 name "/" version "/"
2143 name "_" version ".tar.bz2"))
2144 (sha256
2145 (base32
2146 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2147 (native-inputs
2148 `(("autoconf" ,autoconf)
2149 ("automake" ,automake)
2150 ("libtool" ,libtool)
2151 ("pkg-config" ,pkg-config)
2152 ("zlib" ,zlib)
2153 ("libmediainfo", libmediainfo)
2154 ("libzen" ,libzen)))
2155 (build-system gnu-build-system)
2156 (arguments
2157 '(#:tests? #f ; lacks tests
2158 #:phases
2159 ;; build scripts not in root of archive
2160 (modify-phases %standard-phases
2161 (add-before 'configure 'pre-configure
2162 (lambda _
2163 (chdir "Project/GNU/CLI")))
2164 (add-before 'configure 'autogen
2165 (lambda _
2166 (zero? (system* "./autogen.sh")))))))
2167 (home-page "https://mediaarea.net/en/MediaInfo")
2168 (synopsis "Utility for reading media metadata")
2169 (description "MediaInfo is a utility used for retrieving technical
2170information and other metadata about audio or video files. It supports the
2171many codecs and formats supported by libmediainfo.")
2172 (license license:bsd-2)))
fa379a5b
CL
2173
2174(define-public livemedia-utils
2175 (package
2176 (name "livemedia-utils")
e7178996 2177 (version "2017.06.04")
fa379a5b
CL
2178 (source (origin
2179 (method url-fetch)
2180 (uri (string-append
517c66c0 2181 "https://download.videolan.org/contrib/live555/live."
fa379a5b
CL
2182 version ".tar.gz"))
2183 (sha256
2184 (base32
e7178996 2185 "0xf3vynxqpxpd762zni0jkblnjlgbqxjx99m83m7gqx6zriph271"))))
fa379a5b
CL
2186 (build-system gnu-build-system)
2187 (arguments
2188 '(#:tests? #f ; no tests
2189 #:make-flags (list "CC=gcc"
2190 (string-append "LDFLAGS=-Wl,-rpath="
2191 (assoc-ref %outputs "out") "/lib")
2192 (string-append "PREFIX="
2193 (assoc-ref %outputs "out")))
2194 #:phases (modify-phases %standard-phases
2195 (add-before 'configure 'fix-makefiles-generation
2196 (lambda _
2197 (substitute* "genMakefiles"
2198 (("/bin/rm") "rm"))
2199 #t))
2200 (replace 'configure
2201 (lambda _
2202 (zero? (system* "./genMakefiles"
2203 "linux-with-shared-libraries")))))))
2204 (home-page "http://www.live555.com/liveMedia/")
2205 (synopsis "Set of C++ libraries for multimedia streaming")
2206 (description "This code forms a set of C++ libraries for multimedia
2207streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2208can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2209JPEG video, and several audio codecs. They can easily be extended to support
2210additional (audio and/or video) codecs, and can also be used to build basic
2211RTSP or SIP clients and servers.")
2212 (license license:lgpl3+)))
0dff4dd9
CL
2213
2214(define-public libdvbpsi
2215 (package
2216 (name "libdvbpsi")
2217 (version "1.3.1")
2218 (source (origin
2219 (method url-fetch)
2220 (uri (string-append
2221 "https://download.videolan.org/pub/libdvbpsi/"
2222 version "/libdvbpsi-" version ".tar.bz2"))
2223 (sha256
2224 (base32
2225 "0824r08kaspbrrg2dd5d46s475zb7j59brqkm2y6x3mdsnpng0yn"))))
2226 (build-system gnu-build-system)
2227 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2228 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2229tables")
2230 (description "libdvbpsi is a simple library designed for decoding and
2231generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2232and ITU-T H.222.0.")
2233 (license license:lgpl2.1)))