gnu: Rename module gnutls to tls.
[jackhill/guix/guix.git] / gnu / packages / video.scm
CommitLineData
39efcc9b 1;;; GNU Guix --- Functional package management for GNU
44726031 2;;; Copyright © 2013, 2014, 2015 Andreas Enge <andreas@enge.fr>
2cd85cf9 3;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
3b02429c 4;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
39efcc9b
AE
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages video)
fe138965 23 #:use-module (ice-9 match)
ae0bdd81 24 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 25 #:use-module (guix utils)
39efcc9b
AE
26 #:use-module (guix packages)
27 #:use-module (guix download)
38829eac 28 #:use-module (guix git-download)
44726031 29 #:use-module (guix build-system cmake)
39efcc9b 30 #:use-module (guix build-system gnu)
615215a5 31 #:use-module (guix build-system python)
1c1178cd 32 #:use-module (guix build-system waf)
3b02429c 33 #:use-module (gnu packages)
39efcc9b 34 #:use-module (gnu packages algebra)
72bfebf5 35 #:use-module (gnu packages audio)
f1044010 36 #:use-module (gnu packages autotools)
d5a748e8 37 #:use-module (gnu packages avahi)
38829eac 38 #:use-module (gnu packages base)
d5a748e8 39 #:use-module (gnu packages cdrom)
39efcc9b 40 #:use-module (gnu packages compression)
44726031 41 #:use-module (gnu packages databases)
5d3609e4 42 #:use-module (gnu packages doxygen)
f22e0e26 43 #:use-module (gnu packages elf)
39efcc9b 44 #:use-module (gnu packages fontutils)
44726031
AE
45 #:use-module (gnu packages fribidi)
46 #:use-module (gnu packages gettext)
38829eac 47 #:use-module (gnu packages ghostscript)
d5a748e8
AE
48 #:use-module (gnu packages gl)
49 #:use-module (gnu packages glib)
2cd85cf9 50 #:use-module (gnu packages guile)
d5a748e8 51 #:use-module (gnu packages gnupg)
44726031 52 #:use-module (gnu packages gtk)
e55354b8 53 #:use-module (gnu packages image)
d5a748e8
AE
54 #:use-module (gnu packages linux)
55 #:use-module (gnu packages lua)
56 #:use-module (gnu packages mp3)
4d94b93c 57 #:use-module (gnu packages ncurses)
6f6c8b65 58 #:use-module (gnu packages ocr)
39efcc9b
AE
59 #:use-module (gnu packages openssl)
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
d5a748e8 62 #:use-module (gnu packages pulseaudio)
39efcc9b 63 #:use-module (gnu packages python)
d5a748e8 64 #:use-module (gnu packages qt)
38829eac 65 #:use-module (gnu packages samba)
d5a748e8
AE
66 #:use-module (gnu packages sdl)
67 #:use-module (gnu packages ssh)
6b2c6be0 68 #:use-module (gnu packages texinfo)
5d3609e4 69 #:use-module (gnu packages texlive)
c426e61e 70 #:use-module (gnu packages textutils)
a7fd7b68 71 #:use-module (gnu packages tls)
d5a748e8 72 #:use-module (gnu packages version-control)
bb470bd3 73 #:use-module (gnu packages web)
ee3b55ea 74 #:use-module (gnu packages xdisorg)
54ff0b7d 75 #:use-module (gnu packages xiph)
d5a748e8
AE
76 #:use-module (gnu packages xml)
77 #:use-module (gnu packages xorg)
44726031
AE
78 #:use-module (gnu packages yasm)
79 #:use-module (gnu packages zip))
39efcc9b 80
6b2c6be0
SB
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
3a4de6b2 100 (replace 'configure
6b2c6be0
SB
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.
115In fact, there is no graphical output possible. AA-lib replaces those
116old-fashioned output methods with powerful ascii-art renderer.")
117 (license license:lgpl2.0+)))
118
cda163cd
TUBK
119(define-public liba52
120 (package
121 (name "liba52")
122 (version "0.7.4")
123 (source (origin
124 (method url-fetch)
8c056935
TUBK
125 (uri (string-append
126 ;; A mirror://sourceforge URI doesn't work, presumably
127 ;; because the SourceForge project is misconfigured.
128 "http://liba52.sourceforge.net/files/a52dec-" version
129 ".tar.gz"))
cda163cd
TUBK
130 (sha256
131 (base32
132 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))))
133 (build-system gnu-build-system)
e930c2a3
MW
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)))))))
cda163cd
TUBK
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
144A/52 standard is used in a variety of applications, including digital
145television and DVD. It is also known as AC-3.")
ae0bdd81 146 (license license:gpl2+)))
cda163cd 147
c426e61e
TUBK
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
173ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 174 (license license:isc)))
c426e61e 175
4d94b93c
TUBK
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
199pixels, so that it can work on older video cards or text terminals. It
200supports Unicode, 2048 colors, dithering of color images, and advanced text
201canvas operations.")
ae0bdd81 202 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 203
3bfb78dc
TUBK
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
220streams.")
ae0bdd81 221 (license license:gpl2+)))
3bfb78dc 222
99d4c455
TUBK
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
240video, the encoding format used by most digital camcorders, typically those
241that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
242developed according to the official standards for DV video: IEC 61834 and
243SMPTE 314M.")
ae0bdd81 244 (license license:lgpl2.1+)))
99d4c455 245
ee3b55ea
TUBK
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)))
372cf039
TUBK
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"))))
ee3b55ea
TUBK
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
291to enable hardware accelerated video decode/encode at various
292entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
293standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 294 (license license:expat)))
ee3b55ea 295
39efcc9b
AE
296(define-public ffmpeg
297 (package
298 (name "ffmpeg")
40783851 299 (version "2.7.1")
39efcc9b
AE
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
40783851 306 "087pyx1wxvniq3wgj6z80wrb7ampwwsmwndmr7lymzhm4iyvj1vy"))))
39efcc9b
AE
307 (build-system gnu-build-system)
308 (inputs
c4c4cc05 309 `(("fontconfig" ,fontconfig)
39efcc9b 310 ("freetype" ,freetype)
e816b348 311 ("opus" ,opus)
71241192 312 ("ladspa" ,ladspa)
d4f12db8 313 ("lame" ,lame)
c426e61e 314 ("libass" ,libass)
5d3609e4 315 ("libbluray" ,libbluray)
4d94b93c 316 ("libcaca" ,libcaca)
cc6c0170 317 ("libcdio-paranoia" ,libcdio-paranoia)
bb470bd3 318 ("libquvi" ,libquvi)
39efcc9b
AE
319 ("libtheora" ,libtheora)
320 ("libvorbis" ,libvorbis)
dc55b8b2 321 ("libvpx" ,libvpx)
71241192 322 ("openal" ,openal)
71241192 323 ("pulseaudio" ,pulseaudio)
72bfebf5 324 ("soxr" ,soxr)
c4c4cc05 325 ("speex" ,speex)
72bfebf5 326 ("twolame" ,twolame)
67932f86 327 ("xvid" ,xvid)
c4c4cc05
JD
328 ("zlib", zlib)))
329 (native-inputs
330 `(("bc" ,bc)
331 ("bzip2" ,bzip2)
39efcc9b
AE
332 ("perl" ,perl)
333 ("pkg-config" ,pkg-config)
824d9dc3 334 ("texinfo" ,texinfo)
39efcc9b
AE
335 ("python" ,python-2) ; scripts use interpreter python2
336 ("speex" ,speex)
c4c4cc05 337 ("yasm" ,yasm)))
39efcc9b 338 (arguments
31f9322e
AE
339 `(#:test-target "fate"
340 #:phases
f2feb0ce
LC
341 (modify-phases %standard-phases
342 (replace
39efcc9b
AE
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"))
f2feb0ce
LC
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]
39efcc9b
AE
391 (zero? (system*
392 "./configure"
393 (string-append "--prefix=" out)
27350ef8
SB
394 ;; Add $libdir to the RUNPATH of all the binaries.
395 (string-append "--extra-ldflags=-Wl,-rpath="
396 %output "/lib")
c85a866d 397 "--enable-avresample"
39efcc9b
AE
398 "--enable-gpl" ; enable optional gpl licensed parts
399 "--enable-shared"
400 "--enable-fontconfig"
401 ;; "--enable-gnutls" ; causes test failures
71241192 402 "--enable-ladspa"
c426e61e 403 "--enable-libass"
5d3609e4 404 "--enable-libbluray"
4d94b93c 405 "--enable-libcaca"
cc6c0170 406 "--enable-libcdio"
39efcc9b 407 "--enable-libfreetype"
d4f12db8 408 "--enable-libmp3lame"
e816b348 409 "--enable-libopus"
71241192 410 "--enable-libpulse"
bb470bd3 411 "--enable-libquvi"
72bfebf5 412 "--enable-libsoxr"
39efcc9b
AE
413 "--enable-libspeex"
414 "--enable-libtheora"
72bfebf5 415 "--enable-libtwolame"
39efcc9b 416 "--enable-libvorbis"
dc55b8b2 417 "--enable-libvpx"
67932f86 418 "--enable-libxvid"
71241192 419 "--enable-openal"
82fce926
MW
420
421 "--enable-runtime-cpudetect"
422
423 ;; Runtime cpu detection is not implemented on
424 ;; MIPS, so we disable some features.
39efcc9b
AE
425 "--disable-mips32r2"
426 "--disable-mipsdspr1"
427 "--disable-mipsdspr2"
f2feb0ce 428 "--disable-mipsfpu")))))
457e528e
LC
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)
27350ef8 438 #t))))))
39efcc9b
AE
439 (home-page "http://www.ffmpeg.org/")
440 (synopsis "Audio and video framework")
441 (description "FFmpeg is a complete, cross-platform solution to record,
442convert and stream audio and video. It includes the libavcodec
443audio/video codec library.")
ae0bdd81 444 (license license:gpl2+)))
d5a748e8
AE
445
446(define-public vlc
447 (package
448 (name "vlc")
1a189da0 449 (version "2.2.0")
d5a748e8
AE
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
1a189da0 457 "05smn9hqdp7iscc1dj4cxp1mrlad7b50lhlnlqisfzf493i2f2jy"))))
d5a748e8
AE
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)
1a189da0 468 ("ffmpeg" ,ffmpeg)
d5a748e8
AE
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
d5a748e8
AE
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
506that plays most multimedia files as well as DVD, Audio CD, VCD, and various
507treaming protocols.")
ae0bdd81 508 (license license:gpl2+)))
ace69243
AE
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)
60bbd4f1 532 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
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)
fe138965
MW
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"
f0d6d835
MW
581 '("--target=mips3-linux"))
582 (_ (list (string-append
583 "--target="
584 (or (%current-target-system)
585 (nix-system->gnu-triplet
586 (%current-system)))))))
ace69243 587 "--disable-neon"
ace69243
AE
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,
593Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
594NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
595SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 596 (license license:gpl2)))
d0ed39be 597
38829eac
TUBK
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
712a fork of the original MPlayer project, and contains further development in
713several areas.")
714 ;; See file Copyright. Most files are gpl2+ or compatible, but talloc.c
715 ;; is under lgpl3+, thus the whole project becomes gpl3+.
ae0bdd81 716 (license license:gpl3+)))
38829eac 717
1c1178cd
TUBK
718(define-public mpv
719 (package
720 (name "mpv")
7482b340 721 (version "0.9.0")
1c1178cd
TUBK
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
7482b340 729 "08nx0g6ji2d90f5w62g327szhkb7id7jzwgf3x069rc5id1x3bx7"))
1c1178cd
TUBK
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)))
7482b340 736 ;; Missing features: libguess, Wayland, VDPAU, V4L2
1c1178cd
TUBK
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
f8503e2b 780 'configure 'setup-waf
1c1178cd
TUBK
781 (lambda* (#:key inputs #:allow-other-keys)
782 (copy-file (assoc-ref inputs "waf") "waf")
783 (setenv "CC" "gcc")))
784 (add-before
f8503e2b 785 'configure 'patch-wscript
1c1178cd
TUBK
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
799fork of mplayer2 and MPlayer. It shares some features with the former
800projects while introducing many more.")
ae0bdd81 801 (license license:gpl2+)))
1c1178cd 802
d0ed39be
DT
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
3b02429c
MW
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")))))
d0ed39be
DT
818 (build-system gnu-build-system)
819 (arguments
3b02429c 820 `(#:phases (alist-replace
d0ed39be
DT
821 'configure
822 (lambda* (#:key outputs #:allow-other-keys)
823 (setenv "CONFIG_SHELL" (which "bash"))
824 (let ((out (assoc-ref outputs "out")))
b3455870
SB
825 (setenv "LDFLAGS"
826 (string-append "-Wl,-rpath=" out "/lib"))
d0ed39be
DT
827 (zero? (system* "./configure"
828 "--enable-shared"
829 "--as=yasm"
3b02429c
MW
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 '())
d0ed39be
DT
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.")
ae0bdd81 855 (license license:bsd-3)
d0ed39be 856 (home-page "http://www.webmproject.org/")))
615215a5
LC
857
858(define-public youtube-dl
859 (package
860 (name "youtube-dl")
74498576 861 (version "2015.06.25")
615215a5
LC
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
74498576 869 "0a46qh27x5hhd9qpgsj171kh1kxxasz75771icqi2kp7m05zar3f"))))
615215a5
LC
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
876YouTube.com and a few more sites.")
ae0bdd81 877 (license license:public-domain)))
e6bdb36a 878
5d3609e4
TUBK
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
904players, like VLC or MPlayer.")
ae0bdd81 905 (license license:lgpl2.1+)))
5d3609e4 906
e6bdb36a
AE
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
924disks. It provides the functionality that is required to access many
925DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
926authentication and descrambling (if an external libdvdcss library is
927installed).")
ae0bdd81 928 (license license:gpl2+)))
b027d919
AE
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
951applications. It allows easy use of sophisticated DVD navigation features
952such as DVD menus, multiangle playback and even interactive DVD games. All
953this functionality is provided through a simple API which provides the DVD
954playback as a single logical stream of blocks, intermitted by special
955dvdnav events to report certain conditions. The main usage of libdvdnav is
956a loop regularly calling a function to get the next block, surrounded by
957additional calls to tell the library of user interaction. The whole
958DVD virtual machine and internal playback states are completely
959encapsulated.")
ae0bdd81 960 (license license:gpl2+)))
2cd85cf9 961
f1044010
TUBK
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
a6f710ec
TUBK
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
1005device without having to bother about the decryption.")
ae0bdd81 1006 (license license:gpl2+)))
a6f710ec 1007
2cd85cf9
DT
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
1025for use with HTML5 video.")
1026 (home-page "http://dthompson.us/pages/software/srt2vtt")
ae0bdd81 1027 (license license:gpl3+)))
44726031
AE
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)
c687f731
AE
1106 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1107 "\"-Wl,-rpath=" lib "\"")
44726031
AE
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,
1139filtering and encoding tasks. It supports many file types, including AVI,
1140DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1141can be automated using projects, job queue and powerful scripting
1142capabilities.")
1143 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1144 (license license:gpl2+)))
44726031 1145
6f6c8b65
TUBK
1146(define-public vapoursynth
1147 (package
1148 (name "vapoursynth")
1149 (version "26")
1150 (source (origin
1151 (method url-fetch)
1152 (uri (string-append
1153 "https://github.com/vapoursynth/vapoursynth/archive/R"
1154 version ".tar.gz"))
1155 (sha256
1156 (base32
1157 "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k"))))
1158 (build-system gnu-build-system)
1159 (native-inputs
1160 `(("autoconf" ,autoconf)
1161 ("automake" ,automake)
1162 ("cython" ,python-cython)
1163 ("libtool" ,libtool)
1164 ("pkg-config" ,pkg-config)
1165 ("python" ,python)
1166 ("yasm" ,yasm)))
1167 (inputs
1168 `(("ffmpeg" ,ffmpeg)
1169 ("libass" ,libass)
1170 ("tesseract-ocr" ,tesseract-ocr)))
1171 (arguments
1172 '(#:phases
1173 (modify-phases %standard-phases
1174 (add-after
f8503e2b 1175 'unpack 'autogen
6f6c8b65
TUBK
1176 (lambda _
1177 (zero? (system* "sh" "autogen.sh")))))))
1178 (home-page "http://www.vapoursynth.com/")
1179 (synopsis "Video processing framework")
1180 (description "VapourSynth is a C++ library and Python module for video
1181manipulation. It aims to be a modern rewrite of Avisynth, supporting
1182multithreading, generalized colorspaces, per frame properties, and videos with
1183format changes.")
1184 ;; As seen from the source files.
ae0bdd81 1185 (license license:lgpl2.1+)))
6f6c8b65 1186
67932f86
TUBK
1187(define-public xvid
1188 (package
1189 (name "xvid")
1190 (version "1.3.3")
1191 (source (origin
1192 (method url-fetch)
1193 (uri (string-append
1194 "http://downloads.xvid.org/downloads/xvidcore-"
1195 version ".tar.bz2"))
1196 (sha256
1197 (base32
1198 "0m5g75qvapr7xpywg6a83v5x19kw1nm9l2q48lg7jvvpba0bmqdh"))))
1199 (build-system gnu-build-system)
1200 (native-inputs `(("yasm" ,yasm)))
1201 (arguments
1202 '(#:phases
1203 (alist-cons-before
1204 'configure 'pre-configure
1205 (lambda _
1206 (chdir "build/generic")
1207 (substitute* "configure"
1208 (("#! /bin/sh") (string-append "#!" (which "sh")))))
1209 %standard-phases)
1210 ;; No 'check' target.
1211 #:tests? #f))
1212 (home-page "https://www.xvid.com/")
1213 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1214 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1215codec library. It uses ASP features such as b-frames, global and quarter
1216pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1217and custom quantization matrices.")
ae0bdd81 1218 (license license:gpl2+)))
e16fde14
DT
1219
1220(define-public livestreamer
1221 (package
1222 (name "livestreamer")
1223 (version "1.12.1")
1224 (source (origin
1225 (method url-fetch)
1226 (uri (string-append
1227 "https://github.com/chrippa/livestreamer/archive/v"
1228 version ".tar.gz"))
1229 (file-name (string-append "livestreamer-" version ".tar.gz"))
1230 (sha256
1231 (base32
1232 "1dhgk8v8q1h3km4g5jc0cmjsxdaa2d456fvdb2wk7hmxmmwbqm9j"))))
1233 (build-system python-build-system)
1234 (arguments
1235 '(#:tests? #f)) ; tests rely on external web servers
1236 (native-inputs
1237 `(("python-setuptools" ,python-setuptools)))
1238 (propagated-inputs
1239 `(("python-requests" ,python-requests)
1240 ("python-singledispatch" ,python-singledispatch)))
1241 (synopsis "Internet video stream viewer")
1242 (description "Livestreamer is a command-line utility that extracts streams
1243from various services and pipes them into a video playing application.")
1244 (home-page "http://livestreamer.io/")
1245 (license license:bsd-2)))