syscalls: Add 'network-interfaces', which wraps libc's 'getifaddrs'.
[jackhill/guix/guix.git] / gnu / packages / video.scm
CommitLineData
39efcc9b 1;;; GNU Guix --- Functional package management for GNU
44726031 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
2cd85cf9 3;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
3b02429c 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
39efcc9b
AE
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages video)
fe138965 23 #:use-module (ice-9 match)
ae0bdd81 24 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 25 #:use-module (guix utils)
39efcc9b
AE
26 #:use-module (guix packages)
27 #:use-module (guix download)
38829eac 28 #:use-module (guix git-download)
44726031 29 #:use-module (guix build-system cmake)
39efcc9b 30 #:use-module (guix build-system gnu)
615215a5 31 #:use-module (guix build-system python)
1c1178cd 32 #:use-module (guix build-system waf)
3b02429c 33 #:use-module (gnu packages)
39efcc9b 34 #:use-module (gnu packages algebra)
72bfebf5 35 #:use-module (gnu packages audio)
f1044010 36 #:use-module (gnu packages autotools)
d5a748e8 37 #:use-module (gnu packages avahi)
38829eac 38 #:use-module (gnu packages base)
d5a748e8 39 #:use-module (gnu packages cdrom)
39efcc9b 40 #:use-module (gnu packages compression)
44726031 41 #:use-module (gnu packages databases)
5d3609e4 42 #:use-module (gnu packages doxygen)
f22e0e26 43 #:use-module (gnu packages elf)
39efcc9b 44 #:use-module (gnu packages fontutils)
44726031
AE
45 #:use-module (gnu packages fribidi)
46 #:use-module (gnu packages gettext)
38829eac 47 #:use-module (gnu packages ghostscript)
d5a748e8
AE
48 #:use-module (gnu packages gl)
49 #:use-module (gnu packages glib)
2cd85cf9 50 #:use-module (gnu packages guile)
d5a748e8 51 #:use-module (gnu packages gnupg)
44726031 52 #:use-module (gnu packages gtk)
e55354b8 53 #:use-module (gnu packages image)
d5a748e8
AE
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages mp3)
4d94b93c 57 #:use-module (gnu packages ncurses)
6f6c8b65 58 #:use-module (gnu packages ocr)
39efcc9b
AE
59 #:use-module (gnu packages perl)
60 #:use-module (gnu packages pkg-config)
d5a748e8 61 #:use-module (gnu packages pulseaudio)
39efcc9b 62 #:use-module (gnu packages python)
d5a748e8 63 #:use-module (gnu packages qt)
38829eac 64 #:use-module (gnu packages samba)
d5a748e8
AE
65 #:use-module (gnu packages sdl)
66 #:use-module (gnu packages ssh)
6b2c6be0 67 #:use-module (gnu packages texinfo)
5d3609e4 68 #:use-module (gnu packages texlive)
c426e61e 69 #:use-module (gnu packages textutils)
a7fd7b68 70 #:use-module (gnu packages tls)
d5a748e8 71 #:use-module (gnu packages version-control)
bb470bd3 72 #:use-module (gnu packages web)
ee3b55ea 73 #:use-module (gnu packages xdisorg)
54ff0b7d 74 #:use-module (gnu packages xiph)
d5a748e8
AE
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
44726031
AE
77 #:use-module (gnu packages yasm)
78 #:use-module (gnu packages zip))
39efcc9b 79
6b2c6be0
SB
80(define-public aalib
81 (package
82 (name "aalib")
83 (version "1.4rc5")
84 (source (origin
85 (method url-fetch)
86 (uri (string-append "mirror://sourceforge/aa-project/"
87 name "-" version ".tar.gz"))
88 (sha256
89 (base32
90 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
91 (build-system gnu-build-system)
92 (native-inputs
93 `(("makeinfo" ,texinfo)))
94 (inputs
95 `(("ncurses" ,ncurses)))
96 (arguments
97 '(#:phases
98 (modify-phases %standard-phases
3a4de6b2 99 (replace 'configure
6b2c6be0
SB
100 (lambda* (#:key inputs outputs #:allow-other-keys)
101 ;; This old `configure' script doesn't support
102 ;; variables passed as arguments.
103 (let ((out (assoc-ref outputs "out"))
104 (ncurses (assoc-ref inputs "ncurses")))
105 (setenv "CONFIG_SHELL" (which "bash"))
106 (zero? (system* "./configure"
107 (string-append "--prefix=" out)
108 (string-append "--with-ncurses="
109 ncurses)))))))))
110 (home-page "http://aa-project.sourceforge.net/aalib/")
111 (synopsis "ASCII-art library")
112 (description
113 "AA-lib is a low level gfx library which does not require graphics device.
114In fact, there is no graphical output possible. AA-lib replaces those
115old-fashioned output methods with powerful ascii-art renderer.")
116 (license license:lgpl2.0+)))
117
cda163cd
TUBK
118(define-public liba52
119 (package
120 (name "liba52")
121 (version "0.7.4")
122 (source (origin
123 (method url-fetch)
8c056935
TUBK
124 (uri (string-append
125 ;; A mirror://sourceforge URI doesn't work, presumably
126 ;; because the SourceForge project is misconfigured.
127 "http://liba52.sourceforge.net/files/a52dec-" version
128 ".tar.gz"))
cda163cd
TUBK
129 (sha256
130 (base32
23da88f6
MW
131 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
132 (patches (map search-patch '("liba52-enable-pic.patch"
133 "liba52-set-soname.patch"
134 "liba52-use-mtune-not-mcpu.patch"
135 "liba52-link-with-libm.patch")))))
cda163cd 136 (build-system gnu-build-system)
23da88f6
MW
137 ;; XXX We need to run ./bootstrap because of the build system fixes above.
138 (native-inputs
139 `(("autoconf" ,autoconf)
140 ("automake" ,automake)
141 ("libtool" ,libtool)))
412a2422 142 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
143 #:phases
144 (modify-phases %standard-phases
145 ;; XXX We need to run ./bootstrap because of the build
146 ;; system fixes above.
147 (add-after
148 'unpack 'bootstrap
149 (lambda _ (zero? (system* "sh" "bootstrap")))))))
cda163cd
TUBK
150 (home-page "http://liba52.sourceforge.net/")
151 (synopsis "ATSC A/52 stream decoder")
152 (description "liba52 is a library for decoding ATSC A/52 streams. The
153A/52 standard is used in a variety of applications, including digital
154television and DVD. It is also known as AC-3.")
ae0bdd81 155 (license license:gpl2+)))
cda163cd 156
e0884109
MW
157(define-public libmpeg2
158 (package
159 (name "libmpeg2")
160 (version "0.5.1")
161 (source (origin
162 (method url-fetch)
163 ;; A mirror://sourceforge URI doesn't work, presumably
164 ;; because the SourceForge project is misconfigured.
165 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
166 name "-" version ".tar.gz"))
167 (sha256
168 (base32
169 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
170 (inputs
171 `(("libx11" ,libx11)
172 ("libxext" ,libxext)
173 ("libxv" ,libxv)
174 ("libsm" ,libsm)
175 ("libice" ,libice)
176 ("sdl" ,sdl)))
177 (build-system gnu-build-system)
178 (home-page "http://libmpeg2.sourceforge.net/")
179 (synopsis "MPEG1 and MPEG2 video decoder library")
180 (description
181 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
182 (license license:gpl2+)))
183
82712597
MW
184(define-public libx264
185 (package
186 (name "libx264")
187 (version "20150706-2245")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append "ftp://ftp.videolan.org/pub/x264/snapshots/"
191 "x264-snapshot-" version ".tar.bz2"))
192 (sha256
193 (base32
194 "0v04xq25q66gsk78i4kryy7503ki87jxbhln2c0qpvyy0d47p466"))))
195 (build-system gnu-build-system)
196 (native-inputs
197 `(("pkg-config" ,pkg-config)
198 ("yasm" ,yasm)))
199 ;; TODO: Add gpac input
200 (arguments
201 `(#:tests? #f ;no check target
202 #:configure-flags '("--enable-shared"
203 ;; Don't build the command-line program. If we
204 ;; want it later, we should do so in a different
205 ;; package to avoid a circular dependency (the x264
206 ;; program depends on ffmpeg and ffmpeg depends on
207 ;; libx264).
208 "--disable-cli")))
209 (home-page "http://www.videolan.org/developers/x264.html")
210 (synopsis "H.264 video coding library")
211 (description "libx264 is an advanced encoding library for creating
212H.264 (MPEG-4 AVC) video streams.")
213 (license (list license:gpl2+ ;most files
214 license:isc ;common/x86/x86inc.asm
215 license:lgpl2.1+ ;extras/getopt.c
216 license:bsd-3 ;extras/inttypes.h
217 (license:non-copyleft ;extras/cl*.h
218 "file://extras/cl.h"
219 "See extras/cl.h in the distribution.")))))
220
c426e61e
TUBK
221(define-public libass
222 (package
223 (name "libass")
224 (version "0.12.1")
225 (source (origin
226 (method url-fetch)
227 (uri (string-append
228 "https://github.com/libass/libass/releases/download/"
229 version "/libass-" version ".tar.xz"))
230 (sha256
231 (base32
232 "1mwj2nk9g6cq6f8m1hf0ijg1299rghhy9naahqq43sc2whblb1l7"))))
233 (build-system gnu-build-system)
234 (native-inputs
235 `(("pkg-config" ,pkg-config)
236 ("yasm" ,yasm)))
237 (propagated-inputs
238 `(("freetype" ,freetype)
239 ("fribidi" ,fribidi)
240 ("fontconfig" ,fontconfig)
241 ("harfbuzz" ,harfbuzz)
242 ("enca" ,enca)))
243 (home-page "https://github.com/libass/libass")
244 (synopsis "Subtitle rendering library for the ASS/SSA format")
245 (description "libass is a subtitle rendering library for the
246ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 247 (license license:isc)))
c426e61e 248
4d94b93c
TUBK
249(define-public libcaca
250 (package
251 (name "libcaca")
252 (version "0.99.beta19")
253 (source (origin
254 (method url-fetch)
255 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
256 version ".tar.gz"))
257 (sha256
258 (base32
259 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
260 (build-system gnu-build-system)
261 (native-inputs `(("pkg-config" ,pkg-config)))
262 (inputs
263 `(("freeglut" ,freeglut)
264 ("ftgl" ,ftgl)
265 ("libx11" ,libx11)
266 ("mesa" ,mesa)
267 ("ncurses" ,ncurses)
268 ("zlib" ,zlib)))
269 (home-page "http://caca.zoy.org/wiki/libcaca")
270 (synopsis "Colour ASCII-art library")
271 (description "libcaca is a graphics library that outputs text instead of
272pixels, so that it can work on older video cards or text terminals. It
273supports Unicode, 2048 colors, dithering of color images, and advanced text
274canvas operations.")
ae0bdd81 275 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 276
3bfb78dc
TUBK
277(define-public libdca
278 (package
279 (name "libdca")
280 (version "0.0.5")
281 (source (origin
282 (method url-fetch)
283 (uri (string-append
284 "http://download.videolan.org/pub/videolan/libdca/"
285 version "/libdca-" version ".tar.bz2"))
286 (sha256
287 (base32
288 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
289 (build-system gnu-build-system)
290 (home-page "http://www.videolan.org/developers/libdca.html")
291 (synopsis "DTS Coherent Acoustics decoder")
292 (description "libdca is a library for decoding DTS Coherent Acoustics
293streams.")
ae0bdd81 294 (license license:gpl2+)))
3bfb78dc 295
99d4c455
TUBK
296(define-public libdv
297 (package
298 (name "libdv")
299 (version "1.0.0")
300 (source (origin
301 (method url-fetch)
302 (uri (string-append
303 "mirror://sourceforge/libdv/libdv-" version ".tar.gz"))
304 (sha256
305 (base32
306 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
307 (build-system gnu-build-system)
308 (native-inputs `(("pkg-config" ,pkg-config)))
309 (inputs `(("libxv" ,libxv)))
310 (home-page "http://libdv.sourceforge.net/")
311 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
312 (description "The Quasar DV codec (libdv) is a software codec for DV
313video, the encoding format used by most digital camcorders, typically those
314that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
315developed according to the official standards for DV video: IEC 61834 and
316SMPTE 314M.")
ae0bdd81 317 (license license:lgpl2.1+)))
99d4c455 318
ee3b55ea
TUBK
319(define-public libva
320 (package
321 (name "libva")
322 (version "1.5.1")
323 (source
324 (origin
325 (method url-fetch)
326 (uri (string-append
327 "http://www.freedesktop.org/software/vaapi/releases/libva/libva-"
328 version".tar.bz2"))
329 (sha256
330 (base32 "01d01mm9fgpwzqycmjjcj3in3vvzcibi3f64icsw2sksmmgb4495"))))
331 (build-system gnu-build-system)
332 (native-inputs
333 `(("pkg-config" ,pkg-config)))
334 (inputs
335 `(("libdrm" ,libdrm)
336 ("libx11" ,libx11)
337 ("libxext" ,libxext)
338 ("libxfixes" ,libxfixes)
339 ("mesa" ,mesa)))
372cf039
TUBK
340 (arguments
341 `(#:phases
342 (modify-phases %standard-phases
343 (add-before
344 'build 'fix-dlopen-paths
345 (lambda* (#:key outputs #:allow-other-keys)
346 (let ((out (assoc-ref outputs "out")))
347 (substitute* "va/drm/va_drm_auth_x11.c"
348 (("\"libva-x11\\.so\\.%d\"")
349 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
350 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
351 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
352 #:configure-flags
353 (list (string-append "--with-drivers-path="
354 (assoc-ref %build-inputs "mesa") "/lib/dri"))
355 ;; However, we can't write to mesa's store directory, so override the
356 ;; following make variable to install the dummy driver to libva's
357 ;; $prefix/lib/dri directory.
358 #:make-flags
359 (list (string-append "dummy_drv_video_ladir="
360 (assoc-ref %outputs "out") "/lib/dri"))))
ee3b55ea
TUBK
361 (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
362 (synopsis "Video acceleration library")
363 (description "The main motivation for VA-API (Video Acceleration API) is
364to enable hardware accelerated video decode/encode at various
365entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
366standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 367 (license license:expat)))
ee3b55ea 368
39efcc9b
AE
369(define-public ffmpeg
370 (package
371 (name "ffmpeg")
cce11514 372 (version "2.7.2")
39efcc9b
AE
373 (source (origin
374 (method url-fetch)
375 (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
376 version ".tar.bz2"))
377 (sha256
378 (base32
cce11514 379 "1wlygd0jp34dk4qagi4h9psn4yk8zgyj7zy9lrpm5332mm87bsvw"))))
39efcc9b
AE
380 (build-system gnu-build-system)
381 (inputs
c4c4cc05 382 `(("fontconfig" ,fontconfig)
39efcc9b 383 ("freetype" ,freetype)
e816b348 384 ("opus" ,opus)
71241192 385 ("ladspa" ,ladspa)
d4f12db8 386 ("lame" ,lame)
c426e61e 387 ("libass" ,libass)
5d3609e4 388 ("libbluray" ,libbluray)
4d94b93c 389 ("libcaca" ,libcaca)
cc6c0170 390 ("libcdio-paranoia" ,libcdio-paranoia)
bb470bd3 391 ("libquvi" ,libquvi)
39efcc9b
AE
392 ("libtheora" ,libtheora)
393 ("libvorbis" ,libvorbis)
dc55b8b2 394 ("libvpx" ,libvpx)
549381d6 395 ("libx264" ,libx264)
71241192 396 ("openal" ,openal)
71241192 397 ("pulseaudio" ,pulseaudio)
72bfebf5 398 ("soxr" ,soxr)
c4c4cc05 399 ("speex" ,speex)
72bfebf5 400 ("twolame" ,twolame)
67932f86 401 ("xvid" ,xvid)
c4c4cc05
JD
402 ("zlib", zlib)))
403 (native-inputs
404 `(("bc" ,bc)
405 ("bzip2" ,bzip2)
39efcc9b
AE
406 ("perl" ,perl)
407 ("pkg-config" ,pkg-config)
824d9dc3 408 ("texinfo" ,texinfo)
39efcc9b
AE
409 ("python" ,python-2) ; scripts use interpreter python2
410 ("speex" ,speex)
c4c4cc05 411 ("yasm" ,yasm)))
39efcc9b 412 (arguments
31f9322e
AE
413 `(#:test-target "fate"
414 #:phases
f2feb0ce
LC
415 (modify-phases %standard-phases
416 (replace
39efcc9b
AE
417 'configure
418 ;; configure does not work followed by "SHELL=..." and
419 ;; "CONFIG_SHELL=..."; set environment variables instead
420 (lambda* (#:key outputs configure-flags #:allow-other-keys)
421 (let ((out (assoc-ref outputs "out")))
422 (substitute* "configure"
423 (("#! /bin/sh") (string-append "#!" (which "bash"))))
424 (setenv "SHELL" (which "bash"))
425 (setenv "CONFIG_SHELL" (which "bash"))
f2feb0ce
LC
426 ;; possible additional inputs:
427 ;; --enable-avisynth enable reading of AviSynth script files [no]
428 ;; --enable-frei0r enable frei0r video filtering
429 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
430 ;; --enable-libcelt enable CELT decoding via libcelt [no]
431 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
432 ;; and libraw1394 [no]
433 ;; --enable-libfaac enable AAC encoding via libfaac [no]
434 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
435 ;; --enable-libflite enable flite (voice synthesis) support via libflite [no]
436 ;; --enable-libgme enable Game Music Emu via libgme [no]
437 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
438 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
439 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
440 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
441 ;; --enable-libnut enable NUT (de)muxing via libnut,
442 ;; native (de)muxer exists [no]
443 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
444 ;; --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
445 ;; --enable-libopencv enable video filtering via libopencv [no]
446 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no]
447 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
448 ;; --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
449 ;; --enable-libshine enable fixed-point MP3 encoding via libshine [no]
450 ;; --enable-libssh enable SFTP protocol via libssh [no]
451 ;; (libssh2 does not work)
452 ;; --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
453 ;; --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
454 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
455 ;; --enable-libvidstab enable video stabilization using vid.stab [no]
456 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
457 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
458 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
f2feb0ce
LC
459 ;; --enable-libxavs enable AVS encoding via xavs [no]
460 ;; --enable-libzmq enable message passing via libzmq [no]
461 ;; --enable-libzvbi enable teletext support via libzvbi [no]
462 ;; --enable-opencl enable OpenCL code
463 ;; --enable-x11grab enable X11 grabbing [no]
39efcc9b
AE
464 (zero? (system*
465 "./configure"
466 (string-append "--prefix=" out)
27350ef8
SB
467 ;; Add $libdir to the RUNPATH of all the binaries.
468 (string-append "--extra-ldflags=-Wl,-rpath="
469 %output "/lib")
c85a866d 470 "--enable-avresample"
39efcc9b
AE
471 "--enable-gpl" ; enable optional gpl licensed parts
472 "--enable-shared"
473 "--enable-fontconfig"
474 ;; "--enable-gnutls" ; causes test failures
71241192 475 "--enable-ladspa"
c426e61e 476 "--enable-libass"
5d3609e4 477 "--enable-libbluray"
4d94b93c 478 "--enable-libcaca"
cc6c0170 479 "--enable-libcdio"
39efcc9b 480 "--enable-libfreetype"
d4f12db8 481 "--enable-libmp3lame"
e816b348 482 "--enable-libopus"
71241192 483 "--enable-libpulse"
bb470bd3 484 "--enable-libquvi"
72bfebf5 485 "--enable-libsoxr"
39efcc9b
AE
486 "--enable-libspeex"
487 "--enable-libtheora"
72bfebf5 488 "--enable-libtwolame"
39efcc9b 489 "--enable-libvorbis"
dc55b8b2 490 "--enable-libvpx"
67932f86 491 "--enable-libxvid"
549381d6 492 "--enable-libx264"
71241192 493 "--enable-openal"
82fce926
MW
494
495 "--enable-runtime-cpudetect"
496
497 ;; Runtime cpu detection is not implemented on
498 ;; MIPS, so we disable some features.
39efcc9b
AE
499 "--disable-mips32r2"
500 "--disable-mipsdspr1"
501 "--disable-mipsdspr2"
f2feb0ce 502 "--disable-mipsfpu")))))
457e528e
LC
503 (add-before
504 'check 'set-ld-library-path
505 (lambda _
506 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
507 ;; running tests.
508 (let* ((dso (find-files "." "\\.so$"))
509 (path (string-join (map dirname dso) ":")))
510 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
511 (setenv "LD_LIBRARY_PATH" path)
27350ef8 512 #t))))))
39efcc9b
AE
513 (home-page "http://www.ffmpeg.org/")
514 (synopsis "Audio and video framework")
515 (description "FFmpeg is a complete, cross-platform solution to record,
516convert and stream audio and video. It includes the libavcodec
517audio/video codec library.")
ae0bdd81 518 (license license:gpl2+)))
d5a748e8
AE
519
520(define-public vlc
521 (package
522 (name "vlc")
1a189da0 523 (version "2.2.0")
d5a748e8
AE
524 (source (origin
525 (method url-fetch)
526 (uri (string-append
527 "http://download.videolan.org/pub/videolan/vlc/"
528 version "/vlc-" version ".tar.xz"))
529 (sha256
530 (base32
1a189da0 531 "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy"))))
d5a748e8
AE
532 (build-system gnu-build-system)
533 (native-inputs
534 `(("git" ,git) ; needed for a test
535 ("pkg-config" ,pkg-config)))
536 ;; FIXME: Add optional inputs once available.
537 (inputs
538 `(("alsa-lib" ,alsa-lib)
539 ("avahi" ,avahi)
540 ("dbus" ,dbus)
541 ("flac" ,flac)
1a189da0 542 ("ffmpeg" ,ffmpeg)
d5a748e8
AE
543 ("fontconfig" ,fontconfig)
544 ("freetype" ,freetype)
545 ("gnutls" ,gnutls)
546 ("libcddb" ,libcddb)
547 ("libgcrypt" ,libgcrypt)
548 ("libkate" ,libkate)
549 ("libmad" ,libmad)
550 ("libogg" ,libogg)
551 ("libpng" ,libpng)
552 ("libsamplerate" ,libsamplerate)
553 ("libssh2" ,libssh2)
554 ("libvorbis" ,libvorbis)
555 ("libtheora" ,libtheora)
556 ("libxext" ,libxext)
557 ("libxinerama" ,libxinerama)
558 ("libxml2" ,libxml2)
559 ("libxpm" ,libxpm)
560 ("lua" ,lua-5.1)
561 ("mesa" ,mesa)
562 ("opus" ,opus)
563 ("perl" ,perl)
564 ("pulseaudio" ,pulseaudio)
565 ("python" ,python-wrapper)
566 ("qt" ,qt-4)
567 ("sdl" ,sdl)
568 ("sdl-image" ,sdl-image)
569 ("speex" ,speex)
570 ("xcb-util-keysyms" ,xcb-util-keysyms)))
571 (arguments
572 `(#:configure-flags
573 `("--disable-a52" ; FIXME: reenable once available
d5a748e8
AE
574 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
575 (assoc-ref %build-inputs "ffmpeg")
576 "/lib")))) ; needed for the tests
577 (home-page "https://www.videolan.org/")
578 (synopsis "Audio and video framework")
579 (description "VLC is a cross-platform multimedia player and framework
580that plays most multimedia files as well as DVD, Audio CD, VCD, and various
581treaming protocols.")
ae0bdd81 582 (license license:gpl2+)))
ace69243
AE
583
584(define-public mplayer
585 (package
586 (name "mplayer")
587 (version "1.1.1")
588 (source (origin
589 (method url-fetch)
590 (uri (string-append
591 "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
592 version ".tar.xz"))
593 (sha256
594 (base32
595 "0xlcg7rszrwmw29wqr0plsw5d1rq0hb7vjsq7bmmfsly2z1wg3yf"))))
596 (build-system gnu-build-system)
597 ;; FIXME: Add additional inputs once available.
598 (native-inputs
599 `(("pkg-config" ,pkg-config)))
600 (inputs
601 `(("alsa-lib" ,alsa-lib)
602 ("cdparanoia" ,cdparanoia)
603 ("fontconfig" ,fontconfig)
604 ("freetype" ,freetype)
605 ("lame" ,lame)
60bbd4f1 606 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
607;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
608 ("libjpeg" ,libjpeg)
609 ("libpng" ,libpng)
610 ("libtheora" ,libtheora)
611 ("libvorbis" ,libvorbis)
612 ("libx11" ,libx11)
613 ("libxxf86dga" ,libxxf86dga)
614 ("libxinerama" ,libxinerama)
615 ("libxv" ,libxv)
616 ("mesa" ,mesa)
617 ("perl" ,perl)
618 ("pulseaudio" ,pulseaudio)
619 ("python" ,python-wrapper)
620 ("sdl" ,sdl)
621 ("speex" ,speex)
622 ("yasm" ,yasm)
623 ("zlib" ,zlib)))
624 (arguments
625 `(#:tests? #f ; no test target
626 #:phases
627 (alist-replace
628 'configure
629 ;; configure does not work followed by "SHELL=..." and
630 ;; "CONFIG_SHELL=..."; set environment variables instead
631 (lambda* (#:key inputs outputs #:allow-other-keys)
632 (let ((out (assoc-ref outputs "out"))
633 (libx11 (assoc-ref inputs "libx11")))
634 (substitute* "configure"
635 (("#! /bin/sh") (string-append "#!" (which "bash"))))
636 (setenv "SHELL" (which "bash"))
637 (setenv "CONFIG_SHELL" (which "bash"))
638 (zero? (system*
639 "./configure"
640 (string-append "--extra-cflags=-I"
641 libx11 "/include") ; to detect libx11
642 "--disable-tremor-internal" ; forces external libvorbis
643 (string-append "--prefix=" out)
fe138965
MW
644 ;; Enable runtime cpu detection where supported,
645 ;; and choose a suitable target.
646 ,@(match (or (%current-target-system)
647 (%current-system))
648 ("x86_64-linux"
649 '("--enable-runtime-cpudetection"
650 "--target=x86_64-linux"))
651 ("i686-linux"
652 '("--enable-runtime-cpudetection"
653 "--target=i686-linux"))
654 ("mips64el-linux"
f0d6d835
MW
655 '("--target=mips3-linux"))
656 (_ (list (string-append
657 "--target="
658 (or (%current-target-system)
659 (nix-system->gnu-triplet
660 (%current-system)))))))
ace69243
AE
661 "--disable-iwmmxt"))))
662 %standard-phases)))
663 (home-page "http://www.mplayerhq.hu/design7/news.html")
664 (synopsis "Audio and video player")
665 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
666Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
667NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
668SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 669 (license license:gpl2)))
d0ed39be 670
38829eac
TUBK
671;;; This is not version 2; it's a fork literally named "mplayer2".
672(define-public mplayer2
673 (package
674 (name "mplayer2")
675 ;; There are no tarballs. The 2.0 git tag, which is actually the first
676 ;; release is from 2011. The latest commit is from 2013 October, so we
677 ;; use that commit.
678 (version "201310")
679 (source (origin
680 (method git-fetch)
681 (uri (git-reference
682 ;; XXX Change this if mplayer2.org goes up again.
683 (url "http://repo.or.cz/mplayer2.git")
684 (commit "2c378c71a4d9b1df382db9aa787b646628b4e3f9")))
685 (sha256
686 (base32
687 "0s8554sanj6cvnf0h148nsmjgy5v0568nmcza7grpv6fnmddpfam"))
688 (file-name (string-append name "-" version "-checkout"))
689 ;; Warning: after using this patch, one must pass the -ltheora
690 ;; linker flag manually to configure; see below.
691 (patches (list (search-patch "mplayer2-theora-fix.patch")))))
692 (build-system gnu-build-system)
693 (native-inputs
694 `(("pkg-config" ,pkg-config)
695 ("perl" ,perl)
696 ("python" ,python)
697 ("python-2" ,python-2)
698 ("python-docutils" ,python-docutils)
699 ;; ./configure uses which(1) to find rst2man.py.
700 ("which" ,which)))
701 ;; Missing features: DirectFB, Xss screensaver extensions, VDPAU, MNG,
702 ;; libnut, DirectShow TV interface, Radio interfaces of all kinds, vstream
703 ;; client, XMSS inputplugin support, joystick, lirc/lircc, and openal.
704 ;; OpenAL support is experimental and causes compilation to fail with
705 ;; linker errors.
706 (inputs
707 `(("alsa-lib" ,alsa-lib)
708 ("faad2" ,faad2)
709 ("ffmpeg" ,ffmpeg)
710 ("gettext" ,gnu-gettext)
711 ("jack" ,jack-2)
712 ("ladspa" ,ladspa)
713 ("lcms" ,lcms)
714 ("liba52" ,liba52)
715 ("libass" ,libass)
716 ("libbluray" ,libbluray)
717 ("libbs2b" ,libbs2b)
718 ("libcaca" ,libcaca)
719 ("libcdio-paranoia" ,libcdio-paranoia)
720 ("libdca" ,libdca)
721 ("libdv" ,libdv)
722 ("libdvdread" ,libdvdread)
723 ("libdvdnav" ,libdvdnav-4)
724 ("libjpeg" ,libjpeg)
725 ("libmad" ,libmad)
726 ("libpng" ,libpng)
727 ("libquvi" ,libquvi)
728 ("libtheora" ,libtheora)
729 ("libungif" ,libungif)
730 ("libvorbis" ,libvorbis)
731 ("libx11" ,libx11)
732 ("libxinerama" ,libxinerama)
733 ("libxv" ,libxv)
734 ("mesa" ,mesa)
735 ("mpg123" ,mpg123)
736 ("ncurses" ,ncurses)
737 ("portaudio" ,portaudio)
738 ("pulseaudio" ,pulseaudio)
739 ("rsound" ,rsound)
740 ("samba" ,samba)
741 ("sdl" ,sdl)
742 ("speex" ,speex)
743 ("xvid" ,xvid)))
744 (arguments
745 '(#:phases
746 (alist-replace
747 'configure
748 ;; ./configure does not work followed by "SHELL=..." and
749 ;; "CONFIG_SHELL=..."; set environment variables instead.
750 (lambda* (#:key inputs outputs #:allow-other-keys)
751 (setenv "SHELL" (which "bash"))
752 (setenv "CONFIG_SHELL" (which "bash"))
753 (substitute* "configure"
754 (("/usr/X11") (assoc-ref inputs "libx11")))
755 (zero?
756 (system* "./configure"
757 (string-append "--prefix=" (assoc-ref outputs "out"))
758 "--enable-translation"
759 "--enable-runtime-cpudetection"
760 ;; This is needed in accordance with the theora patch.
761 "--extra-libs=-ltheoradec")))
762 (alist-cons-before
763 'build 'fix-TOOLS-shebangs
764 (lambda _
765 (substitute* (find-files "TOOLS" "\\.(sh|pl|py)$")
766 (("/usr/bin/env") (which "env"))
767 (("/usr/bin/perl") (which "perl"))
768 (("/usr/bin/python3") (which "python3"))
769 (("/usr/bin/python") (which "python"))))
770 (alist-cons-before
771 'build 'fix-input-buffer-padding-size
772 (lambda _
773 (substitute* "libmpdemux/demuxer.h"
774 ;; This has to match with FFmpeg's FF_INPUT_BUFFER_PADDING_SIZE,
775 ;; which has changed at some point.
776 (("(#define MP_INPUT_BUFFER_PADDING_SIZE )[0-9]*" all)
777 (string-append all "32"))))
778 %standard-phases)))
779 ;; No 'check' target.
780 #:tests? #f))
781 ;; XXX Change this if mplayer2.org goes up again.
782 (home-page "http://repo.or.cz/w/mplayer2.git")
783 (synopsis "Audio and video player")
784 (description "mplayer2 is a general-purpose audio and video player. It's
785a fork of the original MPlayer project, and contains further development in
786several areas.")
787 ;; See file Copyright. Most files are gpl2+ or compatible, but talloc.c
788 ;; is under lgpl3+, thus the whole project becomes gpl3+.
ae0bdd81 789 (license license:gpl3+)))
38829eac 790
1c1178cd
TUBK
791(define-public mpv
792 (package
793 (name "mpv")
7482b340 794 (version "0.9.0")
1c1178cd
TUBK
795 (source (origin
796 (method url-fetch)
797 (uri (string-append
798 "https://github.com/mpv-player/mpv/archive/v" version
799 ".tar.gz"))
800 (sha256
801 (base32
7482b340 802 "08nx0g6ji2d90f5w62g327szhkb7id7jzwgf3x069rc5id1x3bx7"))
1c1178cd
TUBK
803 (file-name (string-append name "-" version ".tar.gz"))))
804 (build-system waf-build-system)
805 (native-inputs
806 `(("perl" ,perl)
807 ("pkg-config" ,pkg-config)
808 ("python-docutils" ,python-docutils)))
7482b340 809 ;; Missing features: libguess, Wayland, VDPAU, V4L2
1c1178cd
TUBK
810 (inputs
811 `(("alsa-lib" ,alsa-lib)
812 ("enca" ,enca)
813 ("ffmpeg" ,ffmpeg)
814 ("jack" ,jack-2)
815 ("ladspa" ,ladspa)
816 ("lcms" ,lcms)
817 ("libass" ,libass)
818 ("libbluray" ,libbluray)
819 ("libcaca" ,libcaca)
820 ("libbs2b" ,libbs2b)
821 ("libcdio-paranoia" ,libcdio-paranoia)
822 ("libdvdread" ,libdvdread)
823 ("libdvdnav" ,libdvdnav)
824 ("libjpeg" ,libjpeg)
825 ("libva" ,libva)
826 ("libx11" ,libx11)
827 ("libxext" ,libxext)
828 ("libxinerama" ,libxinerama)
829 ("libxrandr" ,libxrandr)
830 ("libxscrnsaver" ,libxscrnsaver)
831 ("libxv" ,libxv)
832 ("lua" ,lua)
833 ("mesa" ,mesa)
834 ("mpg123" ,mpg123)
835 ("pulseaudio" ,pulseaudio)
836 ("rsound" ,rsound)
837 ("samba" ,samba)
838 ("vapoursynth" ,vapoursynth)
839 ("waf" ,(origin
840 (method url-fetch)
841 ;; Keep this in sync with the version in the bootstrap.py
842 ;; script of the source tarball.
843 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.4")
844 (sha256
845 (base32
846 "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h"))))
847 ("youtube-dl" ,youtube-dl)
848 ("zlib" ,zlib)))
849 (arguments
850 '(#:phases
851 (modify-phases %standard-phases
852 (add-before
f8503e2b 853 'configure 'setup-waf
1c1178cd
TUBK
854 (lambda* (#:key inputs #:allow-other-keys)
855 (copy-file (assoc-ref inputs "waf") "waf")
856 (setenv "CC" "gcc")))
857 (add-before
f8503e2b 858 'configure 'patch-wscript
1c1178cd
TUBK
859 (lambda* (#:key inputs #:allow-other-keys)
860 (substitute* "wscript"
861 ;; XXX Remove this when our Samba package provides a .pc file.
862 (("check_pkg_config\\('smbclient'\\)")
863 "check_cc(lib='smbclient')")
864 ;; XXX Remove this when our Lua package provides a .pc file.
865 (("check_lua")
866 "check_cc(lib='lua')")))))
867 ;; No check function defined.
868 #:tests? #f))
869 (home-page "http://mpv.io/")
870 (synopsis "Audio and video player")
871 (description "mpv is a general-purpose audio and video player. It is a
872fork of mplayer2 and MPlayer. It shares some features with the former
873projects while introducing many more.")
ae0bdd81 874 (license license:gpl2+)))
1c1178cd 875
d0ed39be
DT
876(define-public libvpx
877 (package
878 (name "libvpx")
723e8866 879 (version "1.4.0")
d0ed39be
DT
880 (source (origin
881 (method url-fetch)
723e8866
MW
882 (uri (string-append "http://storage.googleapis.com/"
883 "downloads.webmproject.org/releases/webm/"
884 name "-" version ".tar.bz2"))
d0ed39be
DT
885 (sha256
886 (base32
723e8866 887 "1r0ql5kgy0c8mh5w7iiqvsd7w5njl9f9cclc7m52ln8assrdk0pm"))))
d0ed39be
DT
888 (build-system gnu-build-system)
889 (arguments
3b02429c 890 `(#:phases (alist-replace
d0ed39be
DT
891 'configure
892 (lambda* (#:key outputs #:allow-other-keys)
893 (setenv "CONFIG_SHELL" (which "bash"))
894 (let ((out (assoc-ref outputs "out")))
b3455870
SB
895 (setenv "LDFLAGS"
896 (string-append "-Wl,-rpath=" out "/lib"))
d0ed39be
DT
897 (zero? (system* "./configure"
898 "--enable-shared"
899 "--as=yasm"
900 (string-append "--prefix=" out)))))
901 %standard-phases)
902 #:tests? #f)) ; no check target
903 (native-inputs
904 `(("perl" ,perl)
905 ("yasm" ,yasm)))
906 (synopsis "VP8/VP9 video codec")
907 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 908 (license license:bsd-3)
d0ed39be 909 (home-page "http://www.webmproject.org/")))
615215a5
LC
910
911(define-public youtube-dl
912 (package
913 (name "youtube-dl")
74498576 914 (version "2015.06.25")
615215a5
LC
915 (source (origin
916 (method url-fetch)
917 (uri (string-append "http://youtube-dl.org/downloads/"
918 version "/youtube-dl-"
919 version ".tar.gz"))
920 (sha256
921 (base32
74498576 922 "0a46qh27x5hhd9qpgsj171kh1kxxasz75771icqi2kp7m05zar3f"))))
615215a5
LC
923 (build-system python-build-system)
924 (inputs `(("setuptools" ,python-setuptools)))
925 (home-page "http://youtube-dl.org")
926 (synopsis "Download videos from YouTube.com and other sites")
927 (description
928 "youtube-dl is a small command-line program to download videos from
929YouTube.com and a few more sites.")
ae0bdd81 930 (license license:public-domain)))
e6bdb36a 931
5d3609e4
TUBK
932(define-public libbluray
933 (package
934 (name "libbluray")
935 (version "0.7.0")
936 (source (origin
937 (method url-fetch)
938 (uri (string-append "http://download.videolan.org/videolan/"
939 name "/" version "/"
940 name "-" version ".tar.bz2"))
941 (sha256
942 (base32
943 "13dngs4b4cv29f6b825dq14n77mfhvk1kjb42axpq494pfgyp6zp"))))
944 (build-system gnu-build-system)
945 (native-inputs `(("pkg-config" ,pkg-config)))
946 (inputs
947 `(("doxygen" ,doxygen)
948 ("fontconfig" ,fontconfig)
949 ("freetype" ,freetype)
950 ("libxml2" ,libxml2)
951 ("perl" ,perl) ;for doxygen
952 ("texlive" ,texlive)))
953 (home-page "http://www.videolan.org/developers/libbluray.html")
954 (synopsis "Blu-Ray Disc playback library")
955 (description
956 "libbluray is a library designed for Blu-Ray Disc playback for media
957players, like VLC or MPlayer.")
ae0bdd81 958 (license license:lgpl2.1+)))
5d3609e4 959
e6bdb36a
AE
960(define-public libdvdread
961 (package
962 (name "libdvdread")
9aebf330 963 (version "5.0.3")
e6bdb36a
AE
964 (source (origin
965 (method url-fetch)
966 (uri (string-append "http://download.videolan.org/videolan/"
967 name "/" version "/"
968 name "-" version ".tar.bz2"))
969 (sha256
970 (base32
9aebf330 971 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
e6bdb36a
AE
972 (build-system gnu-build-system)
973 (home-page "http://dvdnav.mplayerhq.hu/")
974 (synopsis "Library for reading video DVDs")
975 (description
976 "Libdvdread provides a simple foundation for reading DVD video
977disks. It provides the functionality that is required to access many
978DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
979authentication and descrambling (if an external libdvdcss library is
980installed).")
ae0bdd81 981 (license license:gpl2+)))
b027d919
AE
982
983(define-public libdvdnav
984 (package
985 (name "libdvdnav")
734976b6 986 (version "5.0.3")
b027d919
AE
987 (source (origin
988 (method url-fetch)
989 (uri (string-append "http://download.videolan.org/videolan/"
990 name "/" version "/"
991 name "-" version ".tar.bz2"))
992 (sha256
993 (base32
734976b6 994 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
b027d919
AE
995 (build-system gnu-build-system)
996 (native-inputs
997 `(("pkg-config" ,pkg-config)))
998 (inputs
999 `(("libdvdread" ,libdvdread)))
1000 (home-page "http://dvdnav.mplayerhq.hu/")
1001 (synopsis "Library for video DVD navigation features")
1002 (description
1003 "Libdvdnav is a library for developers of multimedia
1004applications. It allows easy use of sophisticated DVD navigation features
1005such as DVD menus, multiangle playback and even interactive DVD games. All
1006this functionality is provided through a simple API which provides the DVD
1007playback as a single logical stream of blocks, intermitted by special
1008dvdnav events to report certain conditions. The main usage of libdvdnav is
1009a loop regularly calling a function to get the next block, surrounded by
1010additional calls to tell the library of user interaction. The whole
1011DVD virtual machine and internal playback states are completely
1012encapsulated.")
ae0bdd81 1013 (license license:gpl2+)))
2cd85cf9 1014
f1044010
TUBK
1015(define-public libdvdnav-4
1016 (package
1017 (inherit libdvdnav)
1018 (version "4.2.1")
1019 (source (origin
1020 (method url-fetch)
1021 (uri
1022 (string-append
1023 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1024 version ".tar.xz"))
1025 (sha256
1026 (base32
1027 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1028 (native-inputs
1029 `(("pkg-config" ,pkg-config)
1030 ("autoconf" ,autoconf)
1031 ("automake" ,automake)
1032 ("libtool" ,libtool)))
1033 (arguments
1034 '(#:phases
1035 (alist-cons-after
1036 'unpack 'autoreconf
1037 (lambda _
1038 (zero? (system* "autoreconf" "-vif")))
1039 %standard-phases)))))
1040
a6f710ec
TUBK
1041(define-public libdvdcss
1042 (package
1043 (name "libdvdcss")
1044 (version "1.3.0")
1045 (source (origin
1046 (method url-fetch)
1047 (uri (string-append "http://download.videolan.org/videolan/"
1048 name "/" version "/"
1049 name "-" version ".tar.bz2"))
1050 (sha256
1051 (base32
1052 "158k9zagmbk5bkbz96l6lwhh7xcgfcnzflkr4vblskhcab6llhbw"))))
1053 (build-system gnu-build-system)
1054 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1055 (synopsis "Library for accessing DVDs as block devices")
1056 (description
1057 "libdvdcss is a simple library designed for accessing DVDs like a block
1058device without having to bother about the decryption.")
ae0bdd81 1059 (license license:gpl2+)))
a6f710ec 1060
2cd85cf9
DT
1061(define-public srt2vtt
1062 (package
1063 (name "srt2vtt")
1064 (version "0.1")
1065 (source (origin
1066 (method url-fetch)
1067 (uri (string-append
1068 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1069 version ".tar.gz"))
1070 (sha256
1071 (base32
1072 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1073 (build-system gnu-build-system)
1074 (inputs
1075 `(("guile" ,guile-2.0)))
1076 (synopsis "SubRip to WebVTT subtitle converter")
1077 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1078for use with HTML5 video.")
1079 (home-page "http://dthompson.us/pages/software/srt2vtt")
ae0bdd81 1080 (license license:gpl3+)))
44726031
AE
1081
1082(define-public avidemux
1083 (package
1084 (name "avidemux")
1085 (version "2.6.8")
1086 (source (origin
1087 (method url-fetch)
1088 (uri (string-append
1089 "mirror://sourceforge/avidemux/avidemux_"
1090 version ".tar.gz"))
1091 (sha256
1092 (base32
1093 "10p60wjkzf1bxqcb6i7bx4hbqy3vqg598p3l9lc4v2c9b8iqr682"))))
1094 (build-system cmake-build-system)
1095 (native-inputs
1096 `(("pkg-config" ,pkg-config)))
1097 ;; FIXME: Once packaged, add libraries not found during the build.
1098 (inputs
1099 `(("alsa-lib" ,alsa-lib)
1100 ("fontconfig" ,fontconfig)
1101 ("freetype" ,freetype)
1102 ("fribidi" ,fribidi)
1103 ("glu" ,glu)
1104 ("gtk+" ,gtk+)
1105 ("jack" ,jack-1)
1106 ("lame" ,lame)
1107 ("libvorbis" ,libvorbis)
1108 ("libvpx" ,libvpx)
1109 ("libxv" ,libxv)
1110 ("perl" ,perl)
1111 ("pulseaudio" ,pulseaudio)
1112 ("python" ,python-wrapper)
1113 ("qt" ,qt-4)
1114 ("sdl" ,sdl)
1115 ("sqlite" ,sqlite)
1116 ("yasm" ,yasm)
1117 ("zlib" ,zlib)))
1118 (arguments
1119 `(#:tests? #f ; no check target
1120 #:phases
1121 ;; Make sure files inside the included ffmpeg tarball are
1122 ;; patch-shebanged.
1123 (alist-cons-before
1124 'patch-source-shebangs 'unpack-ffmpeg
1125 (lambda _
1126 (with-directory-excursion "avidemux_core/ffmpeg_package"
1127 (system* "tar" "xf" "ffmpeg-1.2.1.tar.bz2")
1128 (delete-file "ffmpeg-1.2.1.tar.bz2")))
1129 (alist-cons-after
1130 'patch-source-shebangs 'repack-ffmpeg
1131 (lambda _
1132 (with-directory-excursion "avidemux_core/ffmpeg_package"
1133 (substitute* "ffmpeg-1.2.1/configure"
1134 (("#! /bin/sh") (string-append "#!" (which "bash"))))
c09e6a5f
MW
1135 (system* "tar" "cjf" "ffmpeg-1.2.1.tar.bz2" "ffmpeg-1.2.1"
1136 ;; avoid non-determinism in the archive
1137 "--mtime=@0" "--owner=root:0" "--group=root:0")
44726031
AE
1138 (delete-file-recursively "ffmpeg-1.2.1")))
1139 (alist-replace 'configure
1140 (lambda _
1141 ;; Copy-paste settings from the cmake build system.
1142 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1143 (setenv "CMAKE_INCLUDE_PATH" (getenv "CPATH")))
1144 (alist-replace 'build
1145 (lambda* (#:key inputs outputs #:allow-other-keys)
1146 (let*
1147 ((out (assoc-ref outputs "out"))
1148 (lib (string-append out "/lib64"))
1149 (top (getcwd))
1150 (sdl (assoc-ref inputs "sdl"))
1151 (build_component
1152 (lambda* (component srcdir #:optional (args '()))
1153 (let ((builddir (string-append "build_" component)))
1154 (mkdir builddir)
1155 (with-directory-excursion builddir
1156 (zero? (and
1157 (apply system* "cmake"
1158 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1159 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1160 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
c687f731
AE
1161 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1162 "\"-Wl,-rpath=" lib "\"")
44726031
AE
1163 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1164 (string-append "-DSDL_INCLUDE_DIR="
1165 sdl "/include/SDL")
1166 (string-append "../" srcdir)
1167 args)
1168 (system* "make" "-j"
1169 (number->string (parallel-job-count)))
1170 (system* "make" "install"))))))))
1171 (mkdir out)
1172 (and (build_component "core" "avidemux_core")
1173 (build_component "cli" "avidemux/cli")
1174 (build_component "qt4" "avidemux/qt4")
1175 (build_component "gtk" "avidemux/gtk")
1176 (build_component "plugins_common" "avidemux_plugins"
1177 '("-DPLUGIN_UI=COMMON"))
1178 (build_component "plugins_cli" "avidemux_plugins"
1179 '("-DPLUGIN_UI=CLI"))
1180 (build_component "plugins_qt4" "avidemux_plugins"
1181 '("-DPLUGIN_UI=QT4"))
1182 (build_component "plugins_gtk" "avidemux_plugins"
1183 '("-DPLUGIN_UI=GTK"))
1184 (build_component "plugins_settings" "avidemux_plugins"
1185 '("-DPLUGIN_UI=SETTINGS")))
1186 ;; Remove .exe and .dll file.
1187 (delete-file-recursively
1188 (string-append out "/share/ADM6_addons"))))
1189 (alist-delete 'install
1190 %standard-phases)))))))
1191 (home-page "http://fixounet.free.fr/avidemux/")
1192 (synopsis "Video editor")
1193 (description "Avidemux is a video editor designed for simple cutting,
1194filtering and encoding tasks. It supports many file types, including AVI,
1195DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1196can be automated using projects, job queue and powerful scripting
1197capabilities.")
1198 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1199 (license license:gpl2+)))
44726031 1200
6f6c8b65
TUBK
1201(define-public vapoursynth
1202 (package
1203 (name "vapoursynth")
1204 (version "26")
1205 (source (origin
1206 (method url-fetch)
1207 (uri (string-append
1208 "https://github.com/vapoursynth/vapoursynth/archive/R"
1209 version ".tar.gz"))
1210 (sha256
1211 (base32
1212 "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k"))))
1213 (build-system gnu-build-system)
1214 (native-inputs
1215 `(("autoconf" ,autoconf)
1216 ("automake" ,automake)
1217 ("cython" ,python-cython)
1218 ("libtool" ,libtool)
1219 ("pkg-config" ,pkg-config)
1220 ("python" ,python)
1221 ("yasm" ,yasm)))
1222 (inputs
1223 `(("ffmpeg" ,ffmpeg)
1224 ("libass" ,libass)
1225 ("tesseract-ocr" ,tesseract-ocr)))
1226 (arguments
1227 '(#:phases
1228 (modify-phases %standard-phases
1229 (add-after
f8503e2b 1230 'unpack 'autogen
6f6c8b65
TUBK
1231 (lambda _
1232 (zero? (system* "sh" "autogen.sh")))))))
1233 (home-page "http://www.vapoursynth.com/")
1234 (synopsis "Video processing framework")
1235 (description "VapourSynth is a C++ library and Python module for video
1236manipulation. It aims to be a modern rewrite of Avisynth, supporting
1237multithreading, generalized colorspaces, per frame properties, and videos with
1238format changes.")
1239 ;; As seen from the source files.
ae0bdd81 1240 (license license:lgpl2.1+)))
6f6c8b65 1241
67932f86
TUBK
1242(define-public xvid
1243 (package
1244 (name "xvid")
1245 (version "1.3.3")
1246 (source (origin
1247 (method url-fetch)
1248 (uri (string-append
1249 "http://downloads.xvid.org/downloads/xvidcore-"
1250 version ".tar.bz2"))
1251 (sha256
1252 (base32
1253 "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh"))))
1254 (build-system gnu-build-system)
1255 (native-inputs `(("yasm" ,yasm)))
1256 (arguments
1257 '(#:phases
1258 (alist-cons-before
1259 'configure 'pre-configure
1260 (lambda _
1261 (chdir "build/generic")
1262 (substitute* "configure"
1263 (("#! /bin/sh") (string-append "#!" (which "sh")))))
1264 %standard-phases)
1265 ;; No 'check' target.
1266 #:tests? #f))
1267 (home-page "https://www.xvid.com/")
1268 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1269 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1270codec library. It uses ASP features such as b-frames, global and quarter
1271pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1272and custom quantization matrices.")
ae0bdd81 1273 (license license:gpl2+)))
e16fde14
DT
1274
1275(define-public livestreamer
1276 (package
1277 (name "livestreamer")
68e88a09 1278 (version "1.12.2")
e16fde14
DT
1279 (source (origin
1280 (method url-fetch)
1281 (uri (string-append
1282 "https://github.com/chrippa/livestreamer/archive/v"
1283 version ".tar.gz"))
1284 (file-name (string-append "livestreamer-" version ".tar.gz"))
1285 (sha256
1286 (base32
68e88a09 1287 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
e16fde14
DT
1288 (build-system python-build-system)
1289 (arguments
1290 '(#:tests? #f)) ; tests rely on external web servers
1291 (native-inputs
1292 `(("python-setuptools" ,python-setuptools)))
1293 (propagated-inputs
1294 `(("python-requests" ,python-requests)
1295 ("python-singledispatch" ,python-singledispatch)))
1296 (synopsis "Internet video stream viewer")
1297 (description "Livestreamer is a command-line utility that extracts streams
1298from various services and pipes them into a video playing application.")
1299 (home-page "http://livestreamer.io/")
1300 (license license:bsd-2)))