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