gnu: offlineimap: Update to 7.0.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>
26da7c26 6;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
307ad140 8;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
2ad9515c 9;;; Copyright © 2015 Alex Vong <alexvong1995@gmail.com>
6cf83e3f 10;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
39efcc9b
AE
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages video)
fe138965 28 #:use-module (ice-9 match)
08858812
EF
29 #:use-module (srfi srfi-1)
30 #:use-module (srfi srfi-26)
ae0bdd81 31 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 32 #:use-module (guix utils)
39efcc9b
AE
33 #:use-module (guix packages)
34 #:use-module (guix download)
38829eac 35 #:use-module (guix git-download)
44726031 36 #:use-module (guix build-system cmake)
39efcc9b 37 #:use-module (guix build-system gnu)
0e74bb5b 38 #:use-module (guix build-system glib-or-gtk)
615215a5 39 #:use-module (guix build-system python)
1c1178cd 40 #:use-module (guix build-system waf)
3b02429c 41 #:use-module (gnu packages)
39efcc9b 42 #:use-module (gnu packages algebra)
72bfebf5 43 #:use-module (gnu packages audio)
f1044010 44 #:use-module (gnu packages autotools)
d5a748e8 45 #:use-module (gnu packages avahi)
38829eac 46 #:use-module (gnu packages base)
d5a748e8 47 #:use-module (gnu packages cdrom)
39efcc9b 48 #:use-module (gnu packages compression)
f464016d 49 #:use-module (gnu packages curl)
44726031 50 #:use-module (gnu packages databases)
f22e0e26 51 #:use-module (gnu packages elf)
39efcc9b 52 #:use-module (gnu packages fontutils)
44726031
AE
53 #:use-module (gnu packages fribidi)
54 #:use-module (gnu packages gettext)
38829eac 55 #:use-module (gnu packages ghostscript)
d5a748e8
AE
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
2cd85cf9 58 #:use-module (gnu packages guile)
d5a748e8 59 #:use-module (gnu packages gnupg)
44726031 60 #:use-module (gnu packages gtk)
e55354b8 61 #:use-module (gnu packages image)
d5a748e8
AE
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages lua)
64 #:use-module (gnu packages mp3)
4d94b93c 65 #:use-module (gnu packages ncurses)
6f6c8b65 66 #:use-module (gnu packages ocr)
39efcc9b
AE
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages pkg-config)
a7d94b54 69 #:use-module (gnu packages popt)
d5a748e8 70 #:use-module (gnu packages pulseaudio)
39efcc9b 71 #:use-module (gnu packages python)
d5a748e8
AE
72 #:use-module (gnu packages qt)
73 #:use-module (gnu packages sdl)
74 #:use-module (gnu packages ssh)
6b2c6be0 75 #:use-module (gnu packages texinfo)
c426e61e 76 #:use-module (gnu packages textutils)
a7fd7b68 77 #:use-module (gnu packages tls)
d5a748e8 78 #:use-module (gnu packages version-control)
bb470bd3 79 #:use-module (gnu packages web)
ee3b55ea 80 #:use-module (gnu packages xdisorg)
54ff0b7d 81 #:use-module (gnu packages xiph)
d5a748e8
AE
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xorg)
09b87aff 84 #:use-module (gnu packages assembly)
44726031 85 #:use-module (gnu packages zip))
39efcc9b 86
6b2c6be0
SB
87(define-public aalib
88 (package
89 (name "aalib")
90 (version "1.4rc5")
91 (source (origin
92 (method url-fetch)
de67e922
LF
93 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
94 version "/" name "-" version ".tar.gz"))
6b2c6be0
SB
95 (sha256
96 (base32
97 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
98 (build-system gnu-build-system)
99 (native-inputs
100 `(("makeinfo" ,texinfo)))
101 (inputs
102 `(("ncurses" ,ncurses)))
103 (arguments
104 '(#:phases
105 (modify-phases %standard-phases
3a4de6b2 106 (replace 'configure
014cbde6 107 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
108 ;; This old `configure' script doesn't support
109 ;; variables passed as arguments.
110 (let ((out (assoc-ref outputs "out"))
111 (ncurses (assoc-ref inputs "ncurses")))
112 (setenv "CONFIG_SHELL" (which "bash"))
113 (zero? (system* "./configure"
114 (string-append "--prefix=" out)
014cbde6 115 (string-append "--build=" build)
6b2c6be0
SB
116 (string-append "--with-ncurses="
117 ncurses)))))))))
118 (home-page "http://aa-project.sourceforge.net/aalib/")
119 (synopsis "ASCII-art library")
120 (description
121 "AA-lib is a low level gfx library which does not require graphics device.
122In fact, there is no graphical output possible. AA-lib replaces those
123old-fashioned output methods with powerful ascii-art renderer.")
124 (license license:lgpl2.0+)))
125
cda163cd
TUBK
126(define-public liba52
127 (package
128 (name "liba52")
129 (version "0.7.4")
130 (source (origin
131 (method url-fetch)
8c056935
TUBK
132 (uri (string-append
133 ;; A mirror://sourceforge URI doesn't work, presumably
134 ;; because the SourceForge project is misconfigured.
135 "http://liba52.sourceforge.net/files/a52dec-" version
136 ".tar.gz"))
cda163cd
TUBK
137 (sha256
138 (base32
23da88f6 139 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
140 (patches (search-patches "liba52-enable-pic.patch"
141 "liba52-set-soname.patch"
142 "liba52-use-mtune-not-mcpu.patch"
143 "liba52-link-with-libm.patch"))))
cda163cd 144 (build-system gnu-build-system)
23da88f6
MW
145 ;; XXX We need to run ./bootstrap because of the build system fixes above.
146 (native-inputs
147 `(("autoconf" ,autoconf)
148 ("automake" ,automake)
149 ("libtool" ,libtool)))
412a2422 150 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
151 #:phases
152 (modify-phases %standard-phases
153 ;; XXX We need to run ./bootstrap because of the build
154 ;; system fixes above.
155 (add-after
156 'unpack 'bootstrap
157 (lambda _ (zero? (system* "sh" "bootstrap")))))))
cda163cd
TUBK
158 (home-page "http://liba52.sourceforge.net/")
159 (synopsis "ATSC A/52 stream decoder")
160 (description "liba52 is a library for decoding ATSC A/52 streams. The
161A/52 standard is used in a variety of applications, including digital
162television and DVD. It is also known as AC-3.")
ae0bdd81 163 (license license:gpl2+)))
cda163cd 164
e0884109
MW
165(define-public libmpeg2
166 (package
167 (name "libmpeg2")
168 (version "0.5.1")
169 (source (origin
170 (method url-fetch)
171 ;; A mirror://sourceforge URI doesn't work, presumably
172 ;; because the SourceForge project is misconfigured.
173 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
174 name "-" version ".tar.gz"))
175 (sha256
176 (base32
177 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
178 (inputs
179 `(("libx11" ,libx11)
180 ("libxext" ,libxext)
181 ("libxv" ,libxv)
182 ("libsm" ,libsm)
183 ("libice" ,libice)
184 ("sdl" ,sdl)))
185 (build-system gnu-build-system)
186 (home-page "http://libmpeg2.sourceforge.net/")
187 (synopsis "MPEG1 and MPEG2 video decoder library")
188 (description
189 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
190 (license license:gpl2+)))
191
82712597
MW
192(define-public libx264
193 (package
194 (name "libx264")
466a7d70 195 (version "20160220-2245")
82712597
MW
196 (source (origin
197 (method url-fetch)
735e84c7 198 (uri (string-append "http://download.videolan.org/pub/x264/snapshots/"
82712597
MW
199 "x264-snapshot-" version ".tar.bz2"))
200 (sha256
201 (base32
466a7d70 202 "12zyzbiihfhamf7yi4qqaj6k0nisnrydvfr36kxadvmsm7dg4sj3"))))
82712597
MW
203 (build-system gnu-build-system)
204 (native-inputs
205 `(("pkg-config" ,pkg-config)
206 ("yasm" ,yasm)))
207 ;; TODO: Add gpac input
208 (arguments
209 `(#:tests? #f ;no check target
210 #:configure-flags '("--enable-shared"
211 ;; Don't build the command-line program. If we
212 ;; want it later, we should do so in a different
213 ;; package to avoid a circular dependency (the x264
214 ;; program depends on ffmpeg and ffmpeg depends on
215 ;; libx264).
216 "--disable-cli")))
217 (home-page "http://www.videolan.org/developers/x264.html")
218 (synopsis "H.264 video coding library")
219 (description "libx264 is an advanced encoding library for creating
220H.264 (MPEG-4 AVC) video streams.")
221 (license (list license:gpl2+ ;most files
222 license:isc ;common/x86/x86inc.asm
223 license:lgpl2.1+ ;extras/getopt.c
224 license:bsd-3 ;extras/inttypes.h
225 (license:non-copyleft ;extras/cl*.h
226 "file://extras/cl.h"
227 "See extras/cl.h in the distribution.")))))
228
c426e61e
TUBK
229(define-public libass
230 (package
231 (name "libass")
97206519 232 (version "0.13.2")
c426e61e
TUBK
233 (source (origin
234 (method url-fetch)
235 (uri (string-append
236 "https://github.com/libass/libass/releases/download/"
237 version "/libass-" version ".tar.xz"))
238 (sha256
239 (base32
97206519 240 "1kpsw4zw95v4cjvild9wpk73dzavn1khsm3bm32kcz6amnkd166n"))))
c426e61e
TUBK
241 (build-system gnu-build-system)
242 (native-inputs
243 `(("pkg-config" ,pkg-config)
244 ("yasm" ,yasm)))
245 (propagated-inputs
246 `(("freetype" ,freetype)
247 ("fribidi" ,fribidi)
248 ("fontconfig" ,fontconfig)
249 ("harfbuzz" ,harfbuzz)
250 ("enca" ,enca)))
251 (home-page "https://github.com/libass/libass")
252 (synopsis "Subtitle rendering library for the ASS/SSA format")
253 (description "libass is a subtitle rendering library for the
254ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 255 (license license:isc)))
c426e61e 256
4d94b93c
TUBK
257(define-public libcaca
258 (package
259 (name "libcaca")
260 (version "0.99.beta19")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
264 version ".tar.gz"))
265 (sha256
266 (base32
267 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
268 (build-system gnu-build-system)
269 (native-inputs `(("pkg-config" ,pkg-config)))
270 (inputs
271 `(("freeglut" ,freeglut)
272 ("ftgl" ,ftgl)
273 ("libx11" ,libx11)
274 ("mesa" ,mesa)
275 ("ncurses" ,ncurses)
276 ("zlib" ,zlib)))
277 (home-page "http://caca.zoy.org/wiki/libcaca")
278 (synopsis "Colour ASCII-art library")
279 (description "libcaca is a graphics library that outputs text instead of
280pixels, so that it can work on older video cards or text terminals. It
281supports Unicode, 2048 colors, dithering of color images, and advanced text
282canvas operations.")
ae0bdd81 283 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 284
3bfb78dc
TUBK
285(define-public libdca
286 (package
287 (name "libdca")
288 (version "0.0.5")
289 (source (origin
290 (method url-fetch)
291 (uri (string-append
292 "http://download.videolan.org/pub/videolan/libdca/"
293 version "/libdca-" version ".tar.bz2"))
294 (sha256
295 (base32
296 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
297 (build-system gnu-build-system)
298 (home-page "http://www.videolan.org/developers/libdca.html")
299 (synopsis "DTS Coherent Acoustics decoder")
300 (description "libdca is a library for decoding DTS Coherent Acoustics
301streams.")
ae0bdd81 302 (license license:gpl2+)))
3bfb78dc 303
99d4c455
TUBK
304(define-public libdv
305 (package
306 (name "libdv")
307 (version "1.0.0")
308 (source (origin
309 (method url-fetch)
310 (uri (string-append
de67e922
LF
311 "mirror://sourceforge/" name "/" name "/"
312 version "/" name "-" version ".tar.gz"))
99d4c455
TUBK
313 (sha256
314 (base32
315 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
316 (build-system gnu-build-system)
317 (native-inputs `(("pkg-config" ,pkg-config)))
318 (inputs `(("libxv" ,libxv)))
319 (home-page "http://libdv.sourceforge.net/")
320 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
321 (description "The Quasar DV codec (libdv) is a software codec for DV
322video, the encoding format used by most digital camcorders, typically those
323that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
324developed according to the official standards for DV video: IEC 61834 and
325SMPTE 314M.")
ae0bdd81 326 (license license:lgpl2.1+)))
99d4c455 327
ee3b55ea
TUBK
328(define-public libva
329 (package
330 (name "libva")
26fceae2 331 (version "1.6.1")
ee3b55ea
TUBK
332 (source
333 (origin
334 (method url-fetch)
335 (uri (string-append
5cc3096c 336 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
ee3b55ea
TUBK
337 version".tar.bz2"))
338 (sha256
26fceae2 339 (base32 "0bjfb5s8dk3lql843l91ffxzlq47isqks5sj19cxh7j3nhzw58kz"))))
ee3b55ea
TUBK
340 (build-system gnu-build-system)
341 (native-inputs
342 `(("pkg-config" ,pkg-config)))
343 (inputs
344 `(("libdrm" ,libdrm)
345 ("libx11" ,libx11)
346 ("libxext" ,libxext)
347 ("libxfixes" ,libxfixes)
348 ("mesa" ,mesa)))
372cf039
TUBK
349 (arguments
350 `(#:phases
351 (modify-phases %standard-phases
352 (add-before
353 'build 'fix-dlopen-paths
354 (lambda* (#:key outputs #:allow-other-keys)
355 (let ((out (assoc-ref outputs "out")))
356 (substitute* "va/drm/va_drm_auth_x11.c"
357 (("\"libva-x11\\.so\\.%d\"")
358 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
359 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
360 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
361 #:configure-flags
362 (list (string-append "--with-drivers-path="
363 (assoc-ref %build-inputs "mesa") "/lib/dri"))
364 ;; However, we can't write to mesa's store directory, so override the
365 ;; following make variable to install the dummy driver to libva's
366 ;; $prefix/lib/dri directory.
367 #:make-flags
368 (list (string-append "dummy_drv_video_ladir="
369 (assoc-ref %outputs "out") "/lib/dri"))))
26fceae2 370 (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
371 (synopsis "Video acceleration library")
372 (description "The main motivation for VA-API (Video Acceleration API) is
373to enable hardware accelerated video decode/encode at various
374entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
375standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 376 (license license:expat)))
ee3b55ea 377
39efcc9b
AE
378(define-public ffmpeg
379 (package
380 (name "ffmpeg")
8ffa5a57 381 (version "3.1.1")
39efcc9b
AE
382 (source (origin
383 (method url-fetch)
a1121a7f
EF
384 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
385 version ".tar.xz"))
39efcc9b
AE
386 (sha256
387 (base32
8ffa5a57 388 "1nris3flwqd4v4b65yrrv9aqhsab7cb9lfp4wpxz6bi0m3r13g3i"))))
39efcc9b
AE
389 (build-system gnu-build-system)
390 (inputs
c4c4cc05 391 `(("fontconfig" ,fontconfig)
39efcc9b 392 ("freetype" ,freetype)
c8dab7f4 393 ("gnutls" ,gnutls)
e816b348 394 ("opus" ,opus)
71241192 395 ("ladspa" ,ladspa)
d4f12db8 396 ("lame" ,lame)
c426e61e 397 ("libass" ,libass)
5d3609e4 398 ("libbluray" ,libbluray)
4d94b93c 399 ("libcaca" ,libcaca)
cc6c0170 400 ("libcdio-paranoia" ,libcdio-paranoia)
39efcc9b 401 ("libtheora" ,libtheora)
f88f0d20 402 ("libvdpau" ,libvdpau)
39efcc9b 403 ("libvorbis" ,libvorbis)
dc55b8b2 404 ("libvpx" ,libvpx)
f88f0d20 405 ("libx11" ,libx11)
549381d6 406 ("libx264" ,libx264)
f88f0d20 407 ("mesa" ,mesa)
71241192 408 ("openal" ,openal)
71241192 409 ("pulseaudio" ,pulseaudio)
72bfebf5 410 ("soxr" ,soxr)
c4c4cc05 411 ("speex" ,speex)
72bfebf5 412 ("twolame" ,twolame)
67932f86 413 ("xvid" ,xvid)
b3546174 414 ("zlib" ,zlib)))
c4c4cc05
JD
415 (native-inputs
416 `(("bc" ,bc)
39efcc9b
AE
417 ("perl" ,perl)
418 ("pkg-config" ,pkg-config)
824d9dc3 419 ("texinfo" ,texinfo)
39efcc9b
AE
420 ("python" ,python-2) ; scripts use interpreter python2
421 ("speex" ,speex)
c4c4cc05 422 ("yasm" ,yasm)))
39efcc9b 423 (arguments
31f9322e 424 `(#:test-target "fate"
12f92e38
AP
425 #:configure-flags
426 ;; possible additional inputs:
427 ;; --enable-avisynth enable reading of AviSynth script
428 ;; files [no]
429 ;; --enable-frei0r enable frei0r video filtering
430 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
431 ;; --enable-libcelt enable CELT decoding via libcelt [no]
432 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
433 ;; and libraw1394 [no]
434 ;; --enable-libfaac enable AAC encoding via libfaac [no]
435 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
436 ;; --enable-libflite enable flite (voice synthesis) support via
437 ;; libflite [no]
438 ;; --enable-libgme enable Game Music Emu via libgme [no]
439 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
440 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
441 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
442 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
443 ;; --enable-libnut enable NUT (de)muxing via libnut,
444 ;; native (de)muxer exists [no]
445 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
446 ;; libopencore-amrnb [no]
447 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
448 ;; libopencore-amrwb [no]
449 ;; --enable-libopencv enable video filtering via libopencv [no]
450 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
451 ;; OpenJPEG [no]
452 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
453 ;; --enable-libschroedinger enable Dirac de/encoding via
454 ;; libschroedinger [no]
455 ;; --enable-libshine enable fixed-point MP3 encoding via
456 ;; libshine [no]
457 ;; --enable-libssh enable SFTP protocol via libssh [no]
458 ;; (libssh2 does not work)
459 ;; --enable-libstagefright-h264 enable H.264 decoding via
460 ;; libstagefright [no]
461 ;; --enable-libutvideo enable Ut Video encoding and decoding via
462 ;; libutvideo [no]
463 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
464 ;; --enable-libvidstab enable video stabilization using
465 ;; vid.stab [no]
466 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
467 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
468 ;; libvo-amrwbenc [no]
469 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
470 ;; --enable-libxavs enable AVS encoding via xavs [no]
471 ;; --enable-libzmq enable message passing via libzmq [no]
472 ;; --enable-libzvbi enable teletext support via libzvbi [no]
473 ;; --enable-opencl enable OpenCL code
12f92e38
AP
474 '("--enable-avresample"
475 "--enable-gpl" ; enable optional gpl licensed parts
476 "--enable-shared"
477 "--enable-fontconfig"
c8dab7f4 478 "--enable-gnutls"
12f92e38
AP
479 "--enable-ladspa"
480 "--enable-libass"
481 "--enable-libbluray"
482 "--enable-libcaca"
483 "--enable-libcdio"
484 "--enable-libfreetype"
485 "--enable-libmp3lame"
486 "--enable-libopus"
487 "--enable-libpulse"
12f92e38
AP
488 "--enable-libsoxr"
489 "--enable-libspeex"
490 "--enable-libtheora"
491 "--enable-libtwolame"
492 "--enable-libvorbis"
493 "--enable-libvpx"
494 "--enable-libxvid"
495 "--enable-libx264"
496 "--enable-openal"
f88f0d20
EF
497 "--enable-opengl"
498 "--enable-x11grab"
12f92e38
AP
499
500 "--enable-runtime-cpudetect"
501
502 ;; Runtime cpu detection is not implemented on
503 ;; MIPS, so we disable some features.
504 "--disable-mips32r2"
c5e1fcd0 505 "--disable-mipsdsp"
12f92e38
AP
506 "--disable-mipsdspr2"
507 "--disable-mipsfpu")
31f9322e 508 #:phases
f2feb0ce
LC
509 (modify-phases %standard-phases
510 (replace
39efcc9b
AE
511 'configure
512 ;; configure does not work followed by "SHELL=..." and
513 ;; "CONFIG_SHELL=..."; set environment variables instead
514 (lambda* (#:key outputs configure-flags #:allow-other-keys)
515 (let ((out (assoc-ref outputs "out")))
516 (substitute* "configure"
517 (("#! /bin/sh") (string-append "#!" (which "bash"))))
518 (setenv "SHELL" (which "bash"))
519 (setenv "CONFIG_SHELL" (which "bash"))
12f92e38
AP
520 (zero? (apply system*
521 "./configure"
522 (string-append "--prefix=" out)
523 ;; Add $libdir to the RUNPATH of all the binaries.
524 (string-append "--extra-ldflags=-Wl,-rpath="
525 out "/lib")
526 configure-flags)))))
457e528e
LC
527 (add-before
528 'check 'set-ld-library-path
529 (lambda _
530 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
531 ;; running tests.
532 (let* ((dso (find-files "." "\\.so$"))
533 (path (string-join (map dirname dso) ":")))
534 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
535 (setenv "LD_LIBRARY_PATH" path)
27350ef8 536 #t))))))
702bfbf1 537 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
538 (synopsis "Audio and video framework")
539 (description "FFmpeg is a complete, cross-platform solution to record,
540convert and stream audio and video. It includes the libavcodec
541audio/video codec library.")
ae0bdd81 542 (license license:gpl2+)))
d5a748e8 543
940778c7
LC
544(define-public ffmpeg-2.8
545 (package
546 (inherit ffmpeg)
fbb060fe 547 (version "2.8.7")
940778c7
LC
548 (source (origin
549 (method url-fetch)
550 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
551 version ".tar.xz"))
552 (sha256
553 (base32
fbb060fe 554 "0z0mcj2q3ysp9qdn1ks03g5sn2zxyr06vxs4al0m4b5b3in8mglp"))))
940778c7
LC
555 (arguments
556 (substitute-keyword-arguments (package-arguments ffmpeg)
557 ((#:configure-flags flags)
558 `(map (lambda (flag)
559 (if (string=? flag "--disable-mipsdsp")
560 "--disable-mipsdspr1"
561 flag))
562 ,flags))))))
563
d5a748e8
AE
564(define-public vlc
565 (package
566 (name "vlc")
a134cc8e 567 (version "2.2.4")
d5a748e8
AE
568 (source (origin
569 (method url-fetch)
570 (uri (string-append
a134cc8e 571 "https://download.videolan.org/pub/videolan/vlc/"
d5a748e8
AE
572 version "/vlc-" version ".tar.xz"))
573 (sha256
574 (base32
a134cc8e 575 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
4ef2721b
LC
576 (modules '((guix build utils)))
577 (snippet
578 ;; There are two occurrences where __DATE__ and __TIME__ are
579 ;; used to capture the build time and show it to the user.
580 '(substitute* (find-files "." "help\\.c(pp)?$")
581 (("__DATE__") "\"2016\"")
582 (("__TIME__") "\"00:00\"")))))
d5a748e8
AE
583 (build-system gnu-build-system)
584 (native-inputs
585 `(("git" ,git) ; needed for a test
586 ("pkg-config" ,pkg-config)))
587 ;; FIXME: Add optional inputs once available.
588 (inputs
589 `(("alsa-lib" ,alsa-lib)
590 ("avahi" ,avahi)
591 ("dbus" ,dbus)
592 ("flac" ,flac)
b4dff935 593 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
d5a748e8
AE
594 ("fontconfig" ,fontconfig)
595 ("freetype" ,freetype)
596 ("gnutls" ,gnutls)
597 ("libcddb" ,libcddb)
598 ("libgcrypt" ,libgcrypt)
599 ("libkate" ,libkate)
600 ("libmad" ,libmad)
601 ("libogg" ,libogg)
602 ("libpng" ,libpng)
603 ("libsamplerate" ,libsamplerate)
604 ("libssh2" ,libssh2)
605 ("libvorbis" ,libvorbis)
606 ("libtheora" ,libtheora)
607 ("libxext" ,libxext)
608 ("libxinerama" ,libxinerama)
609 ("libxml2" ,libxml2)
610 ("libxpm" ,libxpm)
611 ("lua" ,lua-5.1)
612 ("mesa" ,mesa)
613 ("opus" ,opus)
614 ("perl" ,perl)
615 ("pulseaudio" ,pulseaudio)
616 ("python" ,python-wrapper)
a134cc8e
EF
617 ("qtbase" ,qtbase)
618 ;("qtx11extras" ,qtx11extras)
d5a748e8
AE
619 ("sdl" ,sdl)
620 ("sdl-image" ,sdl-image)
621 ("speex" ,speex)
622 ("xcb-util-keysyms" ,xcb-util-keysyms)))
623 (arguments
624 `(#:configure-flags
625 `("--disable-a52" ; FIXME: reenable once available
d5a748e8
AE
626 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
627 (assoc-ref %build-inputs "ffmpeg")
cd76fbde
LC
628 "/lib")) ;needed for the tests
629
630 #:phases
631 (modify-phases %standard-phases
a134cc8e
EF
632 (add-before 'configure 'remove-visual-tests
633 ;; Some of the tests require using the display to test out VLC,
634 ;; which fails in our sandboxed build system
635 (lambda _
636 (substitute* "test/run_vlc.sh"
637 (("./vlc --ignore-config") "echo"))
638 #t))
cd76fbde
LC
639 (add-after 'install 'regenerate-plugin-cache
640 (lambda* (#:key outputs #:allow-other-keys)
641 ;; The 'install-exec-hook' rule in the top-level Makefile.am
642 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
643 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
644 ;; it references. Thus, we first reset the timestamps of all
645 ;; these files, and then regenerate the cache such that the
646 ;; mtimes it includes are always zero instead of being dependent
647 ;; on the build time.
648 (let* ((out (assoc-ref outputs "out"))
649 (pkglibdir (string-append out "/lib/vlc"))
650 (plugindir (string-append pkglibdir "/plugins"))
651 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
652 ;; TODO: Factorize 'reset-timestamps'.
653 (for-each (lambda (file)
654 (let ((s (lstat file)))
655 (unless (eq? (stat:type s) 'symlink)
656 (utime file 0 0 0 0))))
657 (find-files plugindir))
658 (zero? (system* cachegen plugindir))))))))
d5a748e8
AE
659 (home-page "https://www.videolan.org/")
660 (synopsis "Audio and video framework")
661 (description "VLC is a cross-platform multimedia player and framework
662that plays most multimedia files as well as DVD, Audio CD, VCD, and various
663treaming protocols.")
ae0bdd81 664 (license license:gpl2+)))
ace69243
AE
665
666(define-public mplayer
667 (package
668 (name "mplayer")
e71b20e5 669 (version "1.3.0")
ace69243
AE
670 (source (origin
671 (method url-fetch)
672 (uri (string-append
ebde7c7a 673 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
674 version ".tar.xz"))
675 (sha256
676 (base32
e71b20e5 677 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
ace69243
AE
678 (build-system gnu-build-system)
679 ;; FIXME: Add additional inputs once available.
680 (native-inputs
681 `(("pkg-config" ,pkg-config)))
682 (inputs
683 `(("alsa-lib" ,alsa-lib)
684 ("cdparanoia" ,cdparanoia)
b3546174 685 ("ffmpeg" ,ffmpeg)
778a6a8b 686 ("fontconfig" ,fontconfig)
ace69243 687 ("freetype" ,freetype)
778a6a8b 688;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
ace69243 689 ("lame" ,lame)
778a6a8b 690 ("libass" ,libass)
b3546174
MW
691 ("libdvdcss" ,libdvdcss)
692 ("libdvdnav" ,libdvdnav)
ace69243 693 ("libjpeg" ,libjpeg)
778a6a8b
EF
694 ("libmpeg2" ,libmpeg2)
695 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
696 ("libpng" ,libpng)
697 ("libtheora" ,libtheora)
778a6a8b 698 ("libvdpau" ,libvdpau)
ace69243
AE
699 ("libvorbis" ,libvorbis)
700 ("libx11" ,libx11)
778a6a8b 701 ("libx264" ,libx264)
ace69243
AE
702 ("libxinerama" ,libxinerama)
703 ("libxv" ,libxv)
778a6a8b 704 ("libxxf86dga" ,libxxf86dga)
ace69243 705 ("mesa" ,mesa)
778a6a8b 706 ("opus" ,opus)
ace69243
AE
707 ("perl" ,perl)
708 ("pulseaudio" ,pulseaudio)
709 ("python" ,python-wrapper)
710 ("sdl" ,sdl)
711 ("speex" ,speex)
712 ("yasm" ,yasm)
713 ("zlib" ,zlib)))
714 (arguments
715 `(#:tests? #f ; no test target
716 #:phases
ebde7c7a
EF
717 (modify-phases %standard-phases
718 (replace 'configure
ace69243
AE
719 ;; configure does not work followed by "SHELL=..." and
720 ;; "CONFIG_SHELL=..."; set environment variables instead
721 (lambda* (#:key inputs outputs #:allow-other-keys)
722 (let ((out (assoc-ref outputs "out"))
723 (libx11 (assoc-ref inputs "libx11")))
724 (substitute* "configure"
725 (("#! /bin/sh") (string-append "#!" (which "bash"))))
726 (setenv "SHELL" (which "bash"))
727 (setenv "CONFIG_SHELL" (which "bash"))
728 (zero? (system*
729 "./configure"
730 (string-append "--extra-cflags=-I"
731 libx11 "/include") ; to detect libx11
ebde7c7a 732 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 733 (string-append "--prefix=" out)
fe138965
MW
734 ;; Enable runtime cpu detection where supported,
735 ;; and choose a suitable target.
736 ,@(match (or (%current-target-system)
737 (%current-system))
738 ("x86_64-linux"
739 '("--enable-runtime-cpudetection"
740 "--target=x86_64-linux"))
741 ("i686-linux"
742 '("--enable-runtime-cpudetection"
743 "--target=i686-linux"))
744 ("mips64el-linux"
f0d6d835
MW
745 '("--target=mips3-linux"))
746 (_ (list (string-append
747 "--target="
748 (or (%current-target-system)
749 (nix-system->gnu-triplet
750 (%current-system)))))))
ebde7c7a
EF
751 "--disable-iwmmxt"))))))))
752 (home-page "https://www.mplayerhq.hu/design7/news.html")
ace69243
AE
753 (synopsis "Audio and video player")
754 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
755Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
756NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
757SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 758 (license license:gpl2)))
d0ed39be 759
1c1178cd
TUBK
760(define-public mpv
761 (package
762 (name "mpv")
66fd9858 763 (version "0.18.0")
1c1178cd
TUBK
764 (source (origin
765 (method url-fetch)
766 (uri (string-append
767 "https://github.com/mpv-player/mpv/archive/v" version
768 ".tar.gz"))
769 (sha256
770 (base32
66fd9858 771 "0az0zqb2rakak51zsvfqzj9a8jiqpvc61jxap8hjdkkb9y6n6mmn"))
1c1178cd
TUBK
772 (file-name (string-append name "-" version ".tar.gz"))))
773 (build-system waf-build-system)
774 (native-inputs
775 `(("perl" ,perl)
776 ("pkg-config" ,pkg-config)
777 ("python-docutils" ,python-docutils)))
81c29ccc 778 ;; Missing features: libguess, Wayland, V4L2
1c1178cd
TUBK
779 (inputs
780 `(("alsa-lib" ,alsa-lib)
781 ("enca" ,enca)
782 ("ffmpeg" ,ffmpeg)
2d8781a4 783 ("jack" ,jack-1)
1c1178cd
TUBK
784 ("ladspa" ,ladspa)
785 ("lcms" ,lcms)
786 ("libass" ,libass)
787 ("libbluray" ,libbluray)
788 ("libcaca" ,libcaca)
789 ("libbs2b" ,libbs2b)
790 ("libcdio-paranoia" ,libcdio-paranoia)
791 ("libdvdread" ,libdvdread)
792 ("libdvdnav" ,libdvdnav)
793 ("libjpeg" ,libjpeg)
794 ("libva" ,libva)
81c29ccc 795 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
796 ("libx11" ,libx11)
797 ("libxext" ,libxext)
798 ("libxinerama" ,libxinerama)
799 ("libxrandr" ,libxrandr)
800 ("libxscrnsaver" ,libxscrnsaver)
801 ("libxv" ,libxv)
802 ("lua" ,lua)
803 ("mesa" ,mesa)
804 ("mpg123" ,mpg123)
805 ("pulseaudio" ,pulseaudio)
806 ("rsound" ,rsound)
1c1178cd
TUBK
807 ("vapoursynth" ,vapoursynth)
808 ("waf" ,(origin
809 (method url-fetch)
810 ;; Keep this in sync with the version in the bootstrap.py
811 ;; script of the source tarball.
54567afa 812 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.12")
1c1178cd
TUBK
813 (sha256
814 (base32
54567afa 815 "12y9c352zwliw0zk9jm2lhynsjcf5jy0k1qch1c1av8hnbm2pgq1"))))
1c1178cd
TUBK
816 ("youtube-dl" ,youtube-dl)
817 ("zlib" ,zlib)))
818 (arguments
819 '(#:phases
820 (modify-phases %standard-phases
821 (add-before
f8503e2b 822 'configure 'setup-waf
1c1178cd
TUBK
823 (lambda* (#:key inputs #:allow-other-keys)
824 (copy-file (assoc-ref inputs "waf") "waf")
599fd842 825 (setenv "CC" "gcc"))))
6cf83e3f 826 #:configure-flags (list "--enable-libmpv-shared" "--enable-zsh-comp")
1c1178cd
TUBK
827 ;; No check function defined.
828 #:tests? #f))
581873b5 829 (home-page "https://mpv.io/")
1c1178cd
TUBK
830 (synopsis "Audio and video player")
831 (description "mpv is a general-purpose audio and video player. It is a
832fork of mplayer2 and MPlayer. It shares some features with the former
833projects while introducing many more.")
ae0bdd81 834 (license license:gpl2+)))
1c1178cd 835
0e74bb5b
AG
836(define-public gnome-mpv
837 (package
838 (name "gnome-mpv")
839 (version "0.9")
840 (source
841 (origin
842 (method url-fetch)
843 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
844 "/download/v" version "/gnome-mpv-" version
845 ".tar.xz"))
846 (sha256
847 (base32
848 "06pgxl6f3kkgxv8nlmyl7gy3pg55sqf8vgr8m6426mlpm4p3qdn0"))))
849 (native-inputs
850 `(("intltool" ,intltool)
851 ("pkg-config" ,pkg-config)))
852 (inputs
853 `(("gtk+" ,gtk+)
854 ("libepoxy" ,libepoxy)
855 ("mpv" ,mpv)))
856 (build-system glib-or-gtk-build-system)
857 (home-page "https://github.com/gnome-mpv/gnome-mpv")
858 (synopsis "GTK+ frontend for the mpv media player")
859 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
860GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
861access to mpv's powerful playback capabilities.")
862 (license license:gpl3+)))
863
d0ed39be
DT
864(define-public libvpx
865 (package
866 (name "libvpx")
fb197c0d 867 (version "1.5.0")
d0ed39be
DT
868 (source (origin
869 (method url-fetch)
723e8866
MW
870 (uri (string-append "http://storage.googleapis.com/"
871 "downloads.webmproject.org/releases/webm/"
872 name "-" version ".tar.bz2"))
d0ed39be
DT
873 (sha256
874 (base32
c7c49446
MW
875 "15v7qw0ydyxn08ksb6lxn1l51pxgpwgshdwd3275yrr5hs86fv9h"))
876 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
877 (build-system gnu-build-system)
878 (arguments
0e47b4e7
EF
879 `(#:phases
880 (modify-phases %standard-phases
881 (replace 'configure
882 (lambda* (#:key outputs #:allow-other-keys)
883 (setenv "CONFIG_SHELL" (which "bash"))
884 (let ((out (assoc-ref outputs "out")))
885 (setenv "LDFLAGS"
886 (string-append "-Wl,-rpath=" out "/lib"))
887 (zero? (system* "./configure"
888 "--enable-shared"
889 "--as=yasm"
890 ;; Limit size to avoid CVE-2015-1258
891 "--size-limit=16384x16384"
892 (string-append "--prefix=" out)))))))
4f8f15cd 893 #:tests? #f)) ; no check target
d0ed39be
DT
894 (native-inputs
895 `(("perl" ,perl)
896 ("yasm" ,yasm)))
897 (synopsis "VP8/VP9 video codec")
898 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 899 (license license:bsd-3)
d0ed39be 900 (home-page "http://www.webmproject.org/")))
615215a5
LC
901
902(define-public youtube-dl
903 (package
904 (name "youtube-dl")
feb5c554 905 (version "2016.06.14")
615215a5
LC
906 (source (origin
907 (method url-fetch)
feb5c554 908 (uri (string-append "https://youtube-dl.org/downloads/"
615215a5
LC
909 version "/youtube-dl-"
910 version ".tar.gz"))
911 (sha256
912 (base32
feb5c554 913 "0fmvpqipc1xwagvk7ih4slmv1xz1rb6s8wpndhypwvrq4pnnm9ns"))))
615215a5 914 (build-system python-build-system)
feb5c554 915 (home-page "https://youtube-dl.org")
2ad9515c
AV
916 (arguments
917 ;; The problem here is that the directory for the man page and completion
918 ;; files is relative, and for some reason, setup.py uses the
919 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
920 ;; So, we need pass the prefix directly. In addition, make sure the Bash
921 ;; completion file is called 'youtube-dl' rather than
922 ;; 'youtube-dl.bash-completion'.
923 `(#:phases (modify-phases %standard-phases
924 (add-before 'install 'fix-the-data-directories
925 (lambda* (#:key outputs #:allow-other-keys)
926 (let ((prefix (assoc-ref outputs "out")))
927 (mkdir "bash-completion")
928 (rename-file "youtube-dl.bash-completion"
929 "bash-completion/youtube-dl")
930 (substitute* "setup.py"
931 (("youtube-dl\\.bash-completion")
932 "bash-completion/youtube-dl")
933 (("'etc/")
934 (string-append "'" prefix "/etc/"))
935 (("'share/")
936 (string-append "'" prefix "/share/")))))))))
615215a5
LC
937 (synopsis "Download videos from YouTube.com and other sites")
938 (description
b798dfde 939 "Youtube-dl is a small command-line program to download videos from
615215a5 940YouTube.com and a few more sites.")
ae0bdd81 941 (license license:public-domain)))
e6bdb36a 942
5d3609e4
TUBK
943(define-public libbluray
944 (package
945 (name "libbluray")
5e3f68e6 946 (version "0.9.3")
5d3609e4
TUBK
947 (source (origin
948 (method url-fetch)
5e3f68e6 949 (uri (string-append "https://download.videolan.org/videolan/"
5d3609e4
TUBK
950 name "/" version "/"
951 name "-" version ".tar.bz2"))
952 (sha256
953 (base32
5e3f68e6 954 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
5d3609e4 955 (build-system gnu-build-system)
2da45ebe
EF
956 (arguments `(#:configure-flags '("--disable-bdjava")))
957 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 958 (inputs
71ee51a0 959 `(("fontconfig" ,fontconfig)
5d3609e4 960 ("freetype" ,freetype)
71ee51a0 961 ("libxml2" ,libxml2)))
5e3f68e6 962 (home-page "https://www.videolan.org/developers/libbluray.html")
5d3609e4
TUBK
963 (synopsis "Blu-Ray Disc playback library")
964 (description
965 "libbluray is a library designed for Blu-Ray Disc playback for media
966players, like VLC or MPlayer.")
ae0bdd81 967 (license license:lgpl2.1+)))
5d3609e4 968
e6bdb36a
AE
969(define-public libdvdread
970 (package
971 (name "libdvdread")
9aebf330 972 (version "5.0.3")
e6bdb36a
AE
973 (source (origin
974 (method url-fetch)
975 (uri (string-append "http://download.videolan.org/videolan/"
976 name "/" version "/"
977 name "-" version ".tar.bz2"))
978 (sha256
979 (base32
9aebf330 980 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
e6bdb36a
AE
981 (build-system gnu-build-system)
982 (home-page "http://dvdnav.mplayerhq.hu/")
983 (synopsis "Library for reading video DVDs")
984 (description
985 "Libdvdread provides a simple foundation for reading DVD video
986disks. It provides the functionality that is required to access many
987DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
988authentication and descrambling (if an external libdvdcss library is
989installed).")
ae0bdd81 990 (license license:gpl2+)))
b027d919
AE
991
992(define-public libdvdnav
993 (package
994 (name "libdvdnav")
734976b6 995 (version "5.0.3")
b027d919
AE
996 (source (origin
997 (method url-fetch)
998 (uri (string-append "http://download.videolan.org/videolan/"
999 name "/" version "/"
1000 name "-" version ".tar.bz2"))
1001 (sha256
1002 (base32
734976b6 1003 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
b027d919
AE
1004 (build-system gnu-build-system)
1005 (native-inputs
1006 `(("pkg-config" ,pkg-config)))
1007 (inputs
1008 `(("libdvdread" ,libdvdread)))
1009 (home-page "http://dvdnav.mplayerhq.hu/")
1010 (synopsis "Library for video DVD navigation features")
1011 (description
1012 "Libdvdnav is a library for developers of multimedia
1013applications. It allows easy use of sophisticated DVD navigation features
1014such as DVD menus, multiangle playback and even interactive DVD games. All
1015this functionality is provided through a simple API which provides the DVD
1016playback as a single logical stream of blocks, intermitted by special
1017dvdnav events to report certain conditions. The main usage of libdvdnav is
1018a loop regularly calling a function to get the next block, surrounded by
1019additional calls to tell the library of user interaction. The whole
1020DVD virtual machine and internal playback states are completely
1021encapsulated.")
ae0bdd81 1022 (license license:gpl2+)))
2cd85cf9 1023
f1044010
TUBK
1024(define-public libdvdnav-4
1025 (package
1026 (inherit libdvdnav)
1027 (version "4.2.1")
1028 (source (origin
1029 (method url-fetch)
1030 (uri
1031 (string-append
1032 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1033 version ".tar.xz"))
1034 (sha256
1035 (base32
1036 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1037 (native-inputs
1038 `(("pkg-config" ,pkg-config)
1039 ("autoconf" ,autoconf)
1040 ("automake" ,automake)
1041 ("libtool" ,libtool)))
1042 (arguments
1043 '(#:phases
1044 (alist-cons-after
1045 'unpack 'autoreconf
1046 (lambda _
1047 (zero? (system* "autoreconf" "-vif")))
1048 %standard-phases)))))
1049
a6f710ec
TUBK
1050(define-public libdvdcss
1051 (package
1052 (name "libdvdcss")
98416109 1053 (version "1.4.0")
a6f710ec
TUBK
1054 (source (origin
1055 (method url-fetch)
98416109 1056 (uri (string-append "http://download.videolan.org/pub/"
a6f710ec
TUBK
1057 name "/" version "/"
1058 name "-" version ".tar.bz2"))
1059 (sha256
1060 (base32
98416109 1061 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
a6f710ec
TUBK
1062 (build-system gnu-build-system)
1063 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1064 (synopsis "Library for accessing DVDs as block devices")
1065 (description
1066 "libdvdcss is a simple library designed for accessing DVDs like a block
1067device without having to bother about the decryption.")
ae0bdd81 1068 (license license:gpl2+)))
a6f710ec 1069
2cd85cf9
DT
1070(define-public srt2vtt
1071 (package
1072 (name "srt2vtt")
1073 (version "0.1")
1074 (source (origin
1075 (method url-fetch)
1076 (uri (string-append
1077 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1078 version ".tar.gz"))
1079 (sha256
1080 (base32
1081 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1082 (build-system gnu-build-system)
1083 (inputs
1084 `(("guile" ,guile-2.0)))
1085 (synopsis "SubRip to WebVTT subtitle converter")
1086 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1087for use with HTML5 video.")
1088 (home-page "http://dthompson.us/pages/software/srt2vtt")
ae0bdd81 1089 (license license:gpl3+)))
44726031
AE
1090
1091(define-public avidemux
1092 (package
1093 (name "avidemux")
9e786e8b 1094 (version "2.6.12")
44726031
AE
1095 (source (origin
1096 (method url-fetch)
1097 (uri (string-append
de67e922
LF
1098 "mirror://sourceforge/" name "/" name "/" version "/"
1099 name "_" version ".tar.gz"))
44726031
AE
1100 (sha256
1101 (base32
9e786e8b 1102 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
fc1adab1 1103 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
1104 (build-system cmake-build-system)
1105 (native-inputs
1106 `(("pkg-config" ,pkg-config)))
1107 ;; FIXME: Once packaged, add libraries not found during the build.
1108 (inputs
1109 `(("alsa-lib" ,alsa-lib)
1110 ("fontconfig" ,fontconfig)
1111 ("freetype" ,freetype)
1112 ("fribidi" ,fribidi)
1113 ("glu" ,glu)
44726031
AE
1114 ("jack" ,jack-1)
1115 ("lame" ,lame)
4cafe8ad
EF
1116 ("libva" ,libva)
1117 ("libvdpau" ,libvdpau)
44726031
AE
1118 ("libvorbis" ,libvorbis)
1119 ("libvpx" ,libvpx)
1120 ("libxv" ,libxv)
1121 ("perl" ,perl)
1122 ("pulseaudio" ,pulseaudio)
1123 ("python" ,python-wrapper)
64e8be67
EF
1124 ("qtbase" ,qtbase)
1125 ("qttools" ,qttools)
44726031
AE
1126 ("sdl" ,sdl)
1127 ("sqlite" ,sqlite)
1128 ("yasm" ,yasm)
1129 ("zlib" ,zlib)))
1130 (arguments
1131 `(#:tests? #f ; no check target
1132 #:phases
1133 ;; Make sure files inside the included ffmpeg tarball are
1134 ;; patch-shebanged.
1898900f
EF
1135 (modify-phases %standard-phases
1136 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1137 (lambda _
1138 (with-directory-excursion "avidemux_core/ffmpeg_package"
1139 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1140 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1141 (add-after 'patch-source-shebangs 'repack-ffmpeg
44726031
AE
1142 (lambda _
1143 (with-directory-excursion "avidemux_core/ffmpeg_package"
9e786e8b 1144 (substitute* "ffmpeg-2.7.6/configure"
44726031 1145 (("#! /bin/sh") (string-append "#!" (which "bash"))))
9e786e8b 1146 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
c09e6a5f 1147 ;; avoid non-determinism in the archive
92226a47
MW
1148 "--sort=name" "--mtime=@0"
1149 "--owner=root:0" "--group=root:0")
1898900f
EF
1150 (delete-file-recursively "ffmpeg-2.7.6"))))
1151 (replace 'configure
1152 (lambda _
1153 ;; Copy-paste settings from the cmake build system.
1154 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1155 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1156 (replace 'build
1157 (lambda* (#:key inputs outputs #:allow-other-keys)
1158 (let*
1159 ((out (assoc-ref outputs "out"))
1160 (lib (string-append out "/lib"))
1161 (top (getcwd))
1162 (sdl (assoc-ref inputs "sdl"))
1163 (build_component
1164 (lambda* (component srcdir #:optional (args '()))
1165 (let ((builddir (string-append "build_" component)))
1166 (mkdir builddir)
1167 (with-directory-excursion builddir
1168 (zero?
1169 (and
44726031
AE
1170 (apply system* "cmake"
1171 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1172 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1173 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
c687f731
AE
1174 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1175 "\"-Wl,-rpath=" lib "\"")
44726031
AE
1176 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1177 (string-append "-DSDL_INCLUDE_DIR="
1178 sdl "/include/SDL")
1179 (string-append "../" srcdir)
aab56ab7 1180 "-DENABLE_QT5=True"
44726031 1181 args)
1898900f
EF
1182 (system* "make" "-j"
1183 (number->string (parallel-job-count)))
1184 (system* "make" "install"))))))))
1185 (mkdir out)
1186 (and (build_component "core" "avidemux_core")
1187 (build_component "cli" "avidemux/cli")
1188 (build_component "qt4" "avidemux/qt4")
1189 (build_component "plugins_common" "avidemux_plugins"
1190 '("-DPLUGIN_UI=COMMON"))
1191 (build_component "plugins_cli" "avidemux_plugins"
1192 '("-DPLUGIN_UI=CLI"))
1193 (build_component "plugins_qt4" "avidemux_plugins"
1194 '("-DPLUGIN_UI=QT4"))
1195 (build_component "plugins_settings" "avidemux_plugins"
1196 '("-DPLUGIN_UI=SETTINGS")))
1197 ;; Remove .exe and .dll file.
1198 (delete-file-recursively
1199 (string-append out "/share/ADM6_addons")))))
1200 (delete 'install))))
44726031
AE
1201 (home-page "http://fixounet.free.fr/avidemux/")
1202 (synopsis "Video editor")
1203 (description "Avidemux is a video editor designed for simple cutting,
1204filtering and encoding tasks. It supports many file types, including AVI,
1205DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1206can be automated using projects, job queue and powerful scripting
1207capabilities.")
1208 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1209 (license license:gpl2+)))
44726031 1210
6f6c8b65
TUBK
1211(define-public vapoursynth
1212 (package
1213 (name "vapoursynth")
f80d5fe0 1214 (version "32")
6f6c8b65
TUBK
1215 (source (origin
1216 (method url-fetch)
1217 (uri (string-append
1218 "https://github.com/vapoursynth/vapoursynth/archive/R"
1219 version ".tar.gz"))
f673552c 1220 (file-name (string-append name "-" version))
6f6c8b65
TUBK
1221 (sha256
1222 (base32
f80d5fe0 1223 "1j08whj946v2kkpgxsfhpca8xf0ax9iqzn73wvwjx319p9j0ymp9"))))
6f6c8b65
TUBK
1224 (build-system gnu-build-system)
1225 (native-inputs
1226 `(("autoconf" ,autoconf)
1227 ("automake" ,automake)
1228 ("cython" ,python-cython)
1229 ("libtool" ,libtool)
1230 ("pkg-config" ,pkg-config)
1231 ("python" ,python)
1232 ("yasm" ,yasm)))
1233 (inputs
1234 `(("ffmpeg" ,ffmpeg)
1235 ("libass" ,libass)
f80d5fe0
EF
1236 ("tesseract-ocr" ,tesseract-ocr)
1237 ("zimg" ,zimg)))
6f6c8b65
TUBK
1238 (arguments
1239 '(#:phases
1240 (modify-phases %standard-phases
1241 (add-after
f8503e2b 1242 'unpack 'autogen
6f6c8b65
TUBK
1243 (lambda _
1244 (zero? (system* "sh" "autogen.sh")))))))
1245 (home-page "http://www.vapoursynth.com/")
1246 (synopsis "Video processing framework")
1247 (description "VapourSynth is a C++ library and Python module for video
1248manipulation. It aims to be a modern rewrite of Avisynth, supporting
1249multithreading, generalized colorspaces, per frame properties, and videos with
1250format changes.")
1251 ;; As seen from the source files.
ae0bdd81 1252 (license license:lgpl2.1+)))
6f6c8b65 1253
67932f86
TUBK
1254(define-public xvid
1255 (package
1256 (name "xvid")
e05035c7 1257 (version "1.3.4")
67932f86
TUBK
1258 (source (origin
1259 (method url-fetch)
1260 (uri (string-append
1261 "http://downloads.xvid.org/downloads/xvidcore-"
1262 version ".tar.bz2"))
1263 (sha256
1264 (base32
e05035c7 1265 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
67932f86
TUBK
1266 (build-system gnu-build-system)
1267 (native-inputs `(("yasm" ,yasm)))
1268 (arguments
1269 '(#:phases
62fe2d47
EF
1270 (modify-phases %standard-phases
1271 (add-before
1272 'configure 'pre-configure
1273 (lambda _
1274 (chdir "build/generic")
1275 (substitute* "configure"
1276 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
67932f86
TUBK
1277 ;; No 'check' target.
1278 #:tests? #f))
1279 (home-page "https://www.xvid.com/")
1280 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1281 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1282codec library. It uses ASP features such as b-frames, global and quarter
1283pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1284and custom quantization matrices.")
ae0bdd81 1285 (license license:gpl2+)))
e16fde14
DT
1286
1287(define-public livestreamer
1288 (package
1289 (name "livestreamer")
68e88a09 1290 (version "1.12.2")
e16fde14
DT
1291 (source (origin
1292 (method url-fetch)
1293 (uri (string-append
1294 "https://github.com/chrippa/livestreamer/archive/v"
1295 version ".tar.gz"))
1296 (file-name (string-append "livestreamer-" version ".tar.gz"))
1297 (sha256
1298 (base32
68e88a09 1299 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
e16fde14
DT
1300 (build-system python-build-system)
1301 (arguments
1302 '(#:tests? #f)) ; tests rely on external web servers
e16fde14 1303 (propagated-inputs
5b9fe59f 1304 `(("python-requests" ,python-requests)))
e16fde14
DT
1305 (synopsis "Internet video stream viewer")
1306 (description "Livestreamer is a command-line utility that extracts streams
1307from various services and pipes them into a video playing application.")
1308 (home-page "http://livestreamer.io/")
1309 (license license:bsd-2)))
307ad140
RW
1310
1311(define-public mlt
1312 (package
1313 (name "mlt")
4c7729dc 1314 (version "6.2.0")
307ad140
RW
1315 (source (origin
1316 (method url-fetch)
4c7729dc
EF
1317 (uri (string-append "https://github.com/mltframework/mlt/"
1318 "archive/v" version ".tar.gz"))
1319 (file-name (string-append name "-" version ".tar.gz"))
307ad140
RW
1320 (sha256
1321 (base32
4c7729dc 1322 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
307ad140
RW
1323 (build-system gnu-build-system)
1324 (arguments
1325 `(#:tests? #f ; no tests
1326 #:make-flags '("CC=gcc")
1327 #:configure-flags
1328 (list "--enable-gpl3"
1329 "--enable-gpl")
1330 #:phases
1331 (modify-phases %standard-phases
1332 (add-after
1333 'configure 'override-LDFLAGS
1334 (lambda* (#:key outputs #:allow-other-keys)
1335 (substitute* "config.mak"
1336 (("LDFLAGS\\+=")
1337 (string-append "LDFLAGS+=-Wl,-rpath="
1338 (assoc-ref outputs "out")
1339 "/lib ")))
1340 #t)))))
1341 (inputs
1342 `(("alsa-lib" ,alsa-lib)
1343 ("fftw" ,fftw)
1344 ("libxml2" ,libxml2)
1345 ("jack" ,jack-1)
1346 ("ladspa" ,ladspa)
1347 ("libsamplerate" ,libsamplerate)
4c7729dc 1348 ("pulseaudio" ,pulseaudio)
307ad140
RW
1349 ("sdl" ,sdl)
1350 ("sox" ,sox)))
1351 (native-inputs
1352 `(("pkg-config" ,pkg-config)))
4c7729dc 1353 (home-page "https://www.mltframework.org/")
307ad140
RW
1354 (synopsis "Author, manage, and run multitrack audio/video compositions")
1355 (description
1356 "MLT is a multimedia framework, designed and developed for television
1357broadcasting. It provides a toolkit for broadcasters, video editors, media
1358players, transcoders, web streamers and many more types of applications. The
1359functionality of the system is provided via an assortment of ready to use
1360tools, XML authoring components, and an extensible plug-in based API.")
1361 (license license:lgpl2.1+)))
f464016d 1362
945d985a
DT
1363(define-public v4l-utils
1364 (package
1365 (name "v4l-utils")
9a5c0320 1366 (version "1.10.1")
945d985a
DT
1367 (source (origin
1368 (method url-fetch)
1d4ac724 1369 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
1370 "/v4l-utils-" version ".tar.bz2"))
1371 (sha256
1372 (base32
9a5c0320 1373 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
945d985a
DT
1374 (build-system gnu-build-system)
1375 (arguments
1376 '(#:configure-flags
1377 (list (string-append "--with-udevdir="
1378 (assoc-ref %outputs "out")
1379 "/lib/udev"))))
1380 (native-inputs
1381 `(("pkg-config" ,pkg-config)))
1382 (inputs
1383 `(("alsa-lib" ,alsa-lib)
1384 ("glu" ,glu)
1385 ("libjpeg" ,libjpeg)
1386 ("libx11" ,libx11)
b37662e2 1387 ("qtbase" ,qtbase)
945d985a
DT
1388 ("eudev" ,eudev)))
1389 (synopsis "Realtime video capture utilities for Linux")
1390 (description "The v4l-utils provide a series of libraries and utilities to
1391be used for realtime video capture via Linux-specific APIs.")
1392 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1393 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1394 (license (list license:lgpl2.1+ license:gpl2))))
1395
f464016d
DT
1396(define-public obs
1397 (package
1398 (name "obs")
cf1dc4b7 1399 (version "0.15.1")
f464016d
DT
1400 (source (origin
1401 (method url-fetch)
1402 (uri (string-append "https://github.com/jp9000/obs-studio"
1403 "/archive/" version ".tar.gz"))
1404 (file-name (string-append name "-" version ".tar.gz"))
1405 (sha256
1406 (base32
cf1dc4b7 1407 "18fycg7xlj2i89wdb9c5js0bnl964s1lpmnvmfyj11zi9k061wsg"))))
f464016d 1408 (build-system cmake-build-system)
08858812
EF
1409 (arguments
1410 `(#:tests? #f ; no tests
1411 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1412 (%current-system)))
1413 '("arm" "mips"))
1414 '(#:phases
1415 (modify-phases %standard-phases
1416 (add-after 'unpack 'remove-architecture-specific-instructions
1417 ;; non-Intel platforms fail to build with the architecture
1418 ;; specific compiler flags included by default.
1419 (lambda _
1420 (substitute* "libobs/CMakeLists.txt"
1421 (("if\\(NOT MSVC\\)") "if(MSVC)"))
1422 #t))))
1423 '())))
f464016d
DT
1424 (native-inputs
1425 `(("pkg-config" ,pkg-config)))
1426 (inputs
1427 `(("curl" ,curl)
1428 ("eudev" ,eudev)
1429 ("ffmpeg" ,ffmpeg)
1430 ("freetype" ,freetype)
1431 ("jack" ,jack-1)
1432 ("jansson" ,jansson)
1433 ("libx264" ,libx264)
1434 ("libxcomposite" ,libxcomposite)
1435 ("mesa" ,mesa)
1436 ("pulseaudio" ,pulseaudio)
90a2309b
EF
1437 ("qtbase" ,qtbase)
1438 ("qtx11extras" ,qtx11extras)
d4df2032 1439 ("v4l-utils" ,v4l-utils)
f464016d
DT
1440 ("zlib" ,zlib)))
1441 (synopsis "Live streaming software")
1442 (description "Open Broadcaster Software provides a graphical interface for
1443video recording and live streaming. OBS supports capturing audio and video
1444from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1445and JACK.")
1446 (home-page "https://obsproject.com")
1447 (license license:gpl2+)))
d5650f86
EF
1448
1449(define-public libvdpau
1450 (package
1451 (name "libvdpau")
1452 (version "1.1.1")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1457 name "-" version ".tar.bz2"))
1458 (sha256
1459 (base32
1460 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1461 (build-system gnu-build-system)
1462 (native-inputs
1463 `(("pkg-config" ,pkg-config)))
1464 (inputs
1465 `(("dri2proto" ,dri2proto)
1466 ("libx11" ,libx11 "out")
1467 ("libxext" ,libxext)))
1468 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1469 (synopsis "Video Decode and Presentation API")
1470 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1471provides an interface to video decode acceleration and presentation hardware
1472present in modern GPUs.")
1473 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
1474
1475(define-public vdpauinfo
1476 (package
1477 (name "vdpauinfo")
1478 (version "1.0")
1479 (source
1480 (origin
1481 (method url-fetch)
1482 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1483 name "-" version ".tar.gz"))
1484 (sha256
1485 (base32
1486 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1487 (build-system gnu-build-system)
1488 (native-inputs
1489 `(("pkg-config" ,pkg-config)
1490 ("libx11" ,libx11)))
1491 (propagated-inputs
1492 `(("libvdpau" ,libvdpau)))
1493 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1494 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1495 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1496implementation.")
1497 (license (license:x11-style "file://COPYING"))))
a7d94b54
LC
1498
1499(define-public recordmydesktop
1500 (package
1501 (name "recordmydesktop")
1502 (version "0.3.8.1")
1503 (source (origin
1504 (method url-fetch)
1505 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1506 version "/recordmydesktop-" version ".tar.gz"))
1507 (sha256
1508 (base32
1509 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1510 (build-system gnu-build-system)
1511 (inputs `(("popt" ,popt)
1512 ("zlib" ,zlib)
1513 ("libx11" ,libx11)
1514 ("libice" ,libice)
1515 ("libsm" ,libsm)
1516 ("libxfixes" ,libxfixes)
1517 ("libxdamage" ,libxdamage)
1518 ("libxext" ,libxext)
1519 ("libvorbis" ,libvorbis)
1520 ("libtheora" ,libtheora)))
1521 (home-page "http://recordmydesktop.sourceforge.net/")
1522 (synopsis "Desktop session video recorder")
1523 (description
1524 "recordMyDesktop is a command-line tool that captures the activity in
1525your graphical desktop and encodes it as a video. This is a useful tool for
1526making @dfn{screencasts}.")
1527 (license license:gpl2+)))