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