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