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