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