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