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