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