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