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