Merge remote-tracking branch 'origin/master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / video.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
11 ;;;
12 ;;; This file is part of GNU Guix.
13 ;;;
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
18 ;;;
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
23 ;;;
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27 (define-module (gnu packages video)
28 #:use-module (ice-9 match)
29 #:use-module (srfi srfi-1)
30 #:use-module (srfi srfi-26)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix utils)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system glib-or-gtk)
39 #:use-module (guix build-system python)
40 #:use-module (guix build-system waf)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages algebra)
43 #:use-module (gnu packages audio)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages avahi)
46 #:use-module (gnu packages base)
47 #:use-module (gnu packages cdrom)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages curl)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages elf)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages fribidi)
54 #:use-module (gnu packages gettext)
55 #:use-module (gnu packages ghostscript)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages gnupg)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages lua)
64 #:use-module (gnu packages mp3)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages ocr)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages popt)
70 #:use-module (gnu packages pulseaudio)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages qt)
73 #:use-module (gnu packages sdl)
74 #:use-module (gnu packages ssh)
75 #:use-module (gnu packages texinfo)
76 #:use-module (gnu packages textutils)
77 #:use-module (gnu packages tls)
78 #:use-module (gnu packages version-control)
79 #:use-module (gnu packages web)
80 #:use-module (gnu packages xdisorg)
81 #:use-module (gnu packages xiph)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xorg)
84 #:use-module (gnu packages assembly)
85 #:use-module (gnu packages zip))
86
87 (define-public aalib
88 (package
89 (name "aalib")
90 (version "1.4rc5")
91 (source (origin
92 (method url-fetch)
93 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
94 version "/" name "-" version ".tar.gz"))
95 (sha256
96 (base32
97 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
98 (build-system gnu-build-system)
99 (native-inputs
100 `(("makeinfo" ,texinfo)))
101 (inputs
102 `(("ncurses" ,ncurses)))
103 (arguments
104 '(#:phases
105 (modify-phases %standard-phases
106 (replace 'configure
107 (lambda* (#:key build inputs outputs #:allow-other-keys)
108 ;; This old `configure' script doesn't support
109 ;; variables passed as arguments.
110 (let ((out (assoc-ref outputs "out"))
111 (ncurses (assoc-ref inputs "ncurses")))
112 (setenv "CONFIG_SHELL" (which "bash"))
113 (zero? (system* "./configure"
114 (string-append "--prefix=" out)
115 (string-append "--build=" build)
116 (string-append "--with-ncurses="
117 ncurses)))))))))
118 (home-page "http://aa-project.sourceforge.net/aalib/")
119 (synopsis "ASCII-art library")
120 (description
121 "AA-lib is a low level gfx library which does not require graphics device.
122 In fact, there is no graphical output possible. AA-lib replaces those
123 old-fashioned output methods with powerful ascii-art renderer.")
124 (license license:lgpl2.0+)))
125
126 (define-public liba52
127 (package
128 (name "liba52")
129 (version "0.7.4")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append
133 ;; A mirror://sourceforge URI doesn't work, presumably
134 ;; because the SourceForge project is misconfigured.
135 "http://liba52.sourceforge.net/files/a52dec-" version
136 ".tar.gz"))
137 (sha256
138 (base32
139 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
140 (patches (search-patches "liba52-enable-pic.patch"
141 "liba52-set-soname.patch"
142 "liba52-use-mtune-not-mcpu.patch"
143 "liba52-link-with-libm.patch"))))
144 (build-system gnu-build-system)
145 ;; XXX We need to run ./bootstrap because of the build system fixes above.
146 (native-inputs
147 `(("autoconf" ,autoconf)
148 ("automake" ,automake)
149 ("libtool" ,libtool)))
150 (arguments `(#:configure-flags '("--enable-shared")
151 #:phases
152 (modify-phases %standard-phases
153 ;; XXX We need to run ./bootstrap because of the build
154 ;; system fixes above.
155 (add-after
156 'unpack 'bootstrap
157 (lambda _ (zero? (system* "sh" "bootstrap")))))))
158 (home-page "http://liba52.sourceforge.net/")
159 (synopsis "ATSC A/52 stream decoder")
160 (description "liba52 is a library for decoding ATSC A/52 streams. The
161 A/52 standard is used in a variety of applications, including digital
162 television and DVD. It is also known as AC-3.")
163 (license license:gpl2+)))
164
165 (define-public libmpeg2
166 (package
167 (name "libmpeg2")
168 (version "0.5.1")
169 (source (origin
170 (method url-fetch)
171 ;; A mirror://sourceforge URI doesn't work, presumably
172 ;; because the SourceForge project is misconfigured.
173 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
174 name "-" version ".tar.gz"))
175 (sha256
176 (base32
177 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
178 (inputs
179 `(("libx11" ,libx11)
180 ("libxext" ,libxext)
181 ("libxv" ,libxv)
182 ("libsm" ,libsm)
183 ("libice" ,libice)
184 ("sdl" ,sdl)))
185 (build-system gnu-build-system)
186 (home-page "http://libmpeg2.sourceforge.net/")
187 (synopsis "MPEG1 and MPEG2 video decoder library")
188 (description
189 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
190 (license license:gpl2+)))
191
192 (define-public libx264
193 (package
194 (name "libx264")
195 (version "20160220-2245")
196 (source (origin
197 (method url-fetch)
198 (uri (string-append "http://download.videolan.org/pub/x264/snapshots/"
199 "x264-snapshot-" version ".tar.bz2"))
200 (sha256
201 (base32
202 "12zyzbiihfhamf7yi4qqaj6k0nisnrydvfr36kxadvmsm7dg4sj3"))))
203 (build-system gnu-build-system)
204 (native-inputs
205 `(("pkg-config" ,pkg-config)
206 ("yasm" ,yasm)))
207 ;; TODO: Add gpac input
208 (arguments
209 `(#:tests? #f ;no check target
210 #:configure-flags '("--enable-shared"
211 ;; Don't build the command-line program. If we
212 ;; want it later, we should do so in a different
213 ;; package to avoid a circular dependency (the x264
214 ;; program depends on ffmpeg and ffmpeg depends on
215 ;; libx264).
216 "--disable-cli")))
217 (home-page "http://www.videolan.org/developers/x264.html")
218 (synopsis "H.264 video coding library")
219 (description "libx264 is an advanced encoding library for creating
220 H.264 (MPEG-4 AVC) video streams.")
221 (license (list license:gpl2+ ;most files
222 license:isc ;common/x86/x86inc.asm
223 license:lgpl2.1+ ;extras/getopt.c
224 license:bsd-3 ;extras/inttypes.h
225 (license:non-copyleft ;extras/cl*.h
226 "file://extras/cl.h"
227 "See extras/cl.h in the distribution.")))))
228
229 (define-public libass
230 (package
231 (name "libass")
232 (version "0.13.2")
233 (source (origin
234 (method url-fetch)
235 (uri (string-append
236 "https://github.com/libass/libass/releases/download/"
237 version "/libass-" version ".tar.xz"))
238 (sha256
239 (base32
240 "1kpsw4zw95v4cjvild9wpk73dzavn1khsm3bm32kcz6amnkd166n"))))
241 (build-system gnu-build-system)
242 (native-inputs
243 `(("pkg-config" ,pkg-config)
244 ("yasm" ,yasm)))
245 (propagated-inputs
246 `(("freetype" ,freetype)
247 ("fribidi" ,fribidi)
248 ("fontconfig" ,fontconfig)
249 ("harfbuzz" ,harfbuzz)
250 ("enca" ,enca)))
251 (home-page "https://github.com/libass/libass")
252 (synopsis "Subtitle rendering library for the ASS/SSA format")
253 (description "libass is a subtitle rendering library for the
254 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
255 (license license:isc)))
256
257 (define-public libcaca
258 (package
259 (name "libcaca")
260 (version "0.99.beta19")
261 (source (origin
262 (method url-fetch)
263 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
264 version ".tar.gz"))
265 (sha256
266 (base32
267 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
268 (build-system gnu-build-system)
269 (native-inputs `(("pkg-config" ,pkg-config)))
270 (inputs
271 `(("freeglut" ,freeglut)
272 ("ftgl" ,ftgl)
273 ("libx11" ,libx11)
274 ("mesa" ,mesa)
275 ("ncurses" ,ncurses)
276 ("zlib" ,zlib)))
277 (home-page "http://caca.zoy.org/wiki/libcaca")
278 (synopsis "Colour ASCII-art library")
279 (description "libcaca is a graphics library that outputs text instead of
280 pixels, so that it can work on older video cards or text terminals. It
281 supports Unicode, 2048 colors, dithering of color images, and advanced text
282 canvas operations.")
283 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
284
285 (define-public libdca
286 (package
287 (name "libdca")
288 (version "0.0.5")
289 (source (origin
290 (method url-fetch)
291 (uri (string-append
292 "http://download.videolan.org/pub/videolan/libdca/"
293 version "/libdca-" version ".tar.bz2"))
294 (sha256
295 (base32
296 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
297 (build-system gnu-build-system)
298 (home-page "http://www.videolan.org/developers/libdca.html")
299 (synopsis "DTS Coherent Acoustics decoder")
300 (description "libdca is a library for decoding DTS Coherent Acoustics
301 streams.")
302 (license license:gpl2+)))
303
304 (define-public libdv
305 (package
306 (name "libdv")
307 (version "1.0.0")
308 (source (origin
309 (method url-fetch)
310 (uri (string-append
311 "mirror://sourceforge/" name "/" name "/"
312 version "/" name "-" version ".tar.gz"))
313 (sha256
314 (base32
315 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
316 (build-system gnu-build-system)
317 (native-inputs `(("pkg-config" ,pkg-config)))
318 (inputs `(("libxv" ,libxv)))
319 (home-page "http://libdv.sourceforge.net/")
320 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
321 (description "The Quasar DV codec (libdv) is a software codec for DV
322 video, the encoding format used by most digital camcorders, typically those
323 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
324 developed according to the official standards for DV video: IEC 61834 and
325 SMPTE 314M.")
326 (license license:lgpl2.1+)))
327
328 (define-public libva
329 (package
330 (name "libva")
331 (version "1.7.0")
332 (source
333 (origin
334 (method url-fetch)
335 (uri (string-append
336 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
337 version".tar.bz2"))
338 (sha256
339 (base32 "0py9igf4kicj7ji22bjawkpd6my013qpg0s4ir2np9l1rk5vr2d6"))))
340 (build-system gnu-build-system)
341 (native-inputs
342 `(("pkg-config" ,pkg-config)))
343 (inputs
344 `(("libdrm" ,libdrm)
345 ("libx11" ,libx11)
346 ("libxext" ,libxext)
347 ("libxfixes" ,libxfixes)
348 ("mesa" ,mesa)))
349 (arguments
350 `(#:phases
351 (modify-phases %standard-phases
352 (add-before
353 'build 'fix-dlopen-paths
354 (lambda* (#:key outputs #:allow-other-keys)
355 (let ((out (assoc-ref outputs "out")))
356 (substitute* "va/drm/va_drm_auth_x11.c"
357 (("\"libva-x11\\.so\\.%d\"")
358 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
359 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
360 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
361 #:configure-flags
362 (list (string-append "--with-drivers-path="
363 (assoc-ref %build-inputs "mesa") "/lib/dri"))
364 ;; However, we can't write to mesa's store directory, so override the
365 ;; following make variable to install the dummy driver to libva's
366 ;; $prefix/lib/dri directory.
367 #:make-flags
368 (list (string-append "dummy_drv_video_ladir="
369 (assoc-ref %outputs "out") "/lib/dri"))))
370 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
371 (synopsis "Video acceleration library")
372 (description "The main motivation for VA-API (Video Acceleration API) is
373 to enable hardware accelerated video decode/encode at various
374 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
375 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
376 (license license:expat)))
377
378 (define-public ffmpeg
379 (package
380 (name "ffmpeg")
381 (version "3.1.1")
382 (source (origin
383 (method url-fetch)
384 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
385 version ".tar.xz"))
386 (sha256
387 (base32
388 "1nris3flwqd4v4b65yrrv9aqhsab7cb9lfp4wpxz6bi0m3r13g3i"))))
389 (build-system gnu-build-system)
390 (inputs
391 `(("fontconfig" ,fontconfig)
392 ("freetype" ,freetype)
393 ("gnutls" ,gnutls)
394 ("opus" ,opus)
395 ("ladspa" ,ladspa)
396 ("lame" ,lame)
397 ("libass" ,libass)
398 ("libbluray" ,libbluray)
399 ("libcaca" ,libcaca)
400 ("libcdio-paranoia" ,libcdio-paranoia)
401 ("libtheora" ,libtheora)
402 ("libvdpau" ,libvdpau)
403 ("libvorbis" ,libvorbis)
404 ("libvpx" ,libvpx)
405 ("libx11" ,libx11)
406 ("libx264" ,libx264)
407 ("mesa" ,mesa)
408 ("openal" ,openal)
409 ("pulseaudio" ,pulseaudio)
410 ("soxr" ,soxr)
411 ("speex" ,speex)
412 ("twolame" ,twolame)
413 ("xvid" ,xvid)
414 ("zlib" ,zlib)))
415 (native-inputs
416 `(("bc" ,bc)
417 ("perl" ,perl)
418 ("pkg-config" ,pkg-config)
419 ("texinfo" ,texinfo)
420 ("python" ,python-2) ; scripts use interpreter python2
421 ("speex" ,speex)
422 ("yasm" ,yasm)))
423 (arguments
424 `(#:test-target "fate"
425 #:configure-flags
426 ;; possible additional inputs:
427 ;; --enable-avisynth enable reading of AviSynth script
428 ;; files [no]
429 ;; --enable-frei0r enable frei0r video filtering
430 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
431 ;; --enable-libcelt enable CELT decoding via libcelt [no]
432 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
433 ;; and libraw1394 [no]
434 ;; --enable-libfaac enable AAC encoding via libfaac [no]
435 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
436 ;; --enable-libflite enable flite (voice synthesis) support via
437 ;; libflite [no]
438 ;; --enable-libgme enable Game Music Emu via libgme [no]
439 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
440 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
441 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
442 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
443 ;; --enable-libnut enable NUT (de)muxing via libnut,
444 ;; native (de)muxer exists [no]
445 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
446 ;; libopencore-amrnb [no]
447 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
448 ;; libopencore-amrwb [no]
449 ;; --enable-libopencv enable video filtering via libopencv [no]
450 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
451 ;; OpenJPEG [no]
452 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
453 ;; --enable-libschroedinger enable Dirac de/encoding via
454 ;; libschroedinger [no]
455 ;; --enable-libshine enable fixed-point MP3 encoding via
456 ;; libshine [no]
457 ;; --enable-libssh enable SFTP protocol via libssh [no]
458 ;; (libssh2 does not work)
459 ;; --enable-libstagefright-h264 enable H.264 decoding via
460 ;; libstagefright [no]
461 ;; --enable-libutvideo enable Ut Video encoding and decoding via
462 ;; libutvideo [no]
463 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
464 ;; --enable-libvidstab enable video stabilization using
465 ;; vid.stab [no]
466 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
467 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
468 ;; libvo-amrwbenc [no]
469 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
470 ;; --enable-libxavs enable AVS encoding via xavs [no]
471 ;; --enable-libzmq enable message passing via libzmq [no]
472 ;; --enable-libzvbi enable teletext support via libzvbi [no]
473 ;; --enable-opencl enable OpenCL code
474 '("--enable-avresample"
475 "--enable-gpl" ; enable optional gpl licensed parts
476 "--enable-shared"
477 "--enable-fontconfig"
478 "--enable-gnutls"
479 "--enable-ladspa"
480 "--enable-libass"
481 "--enable-libbluray"
482 "--enable-libcaca"
483 "--enable-libcdio"
484 "--enable-libfreetype"
485 "--enable-libmp3lame"
486 "--enable-libopus"
487 "--enable-libpulse"
488 "--enable-libsoxr"
489 "--enable-libspeex"
490 "--enable-libtheora"
491 "--enable-libtwolame"
492 "--enable-libvorbis"
493 "--enable-libvpx"
494 "--enable-libxvid"
495 "--enable-libx264"
496 "--enable-openal"
497 "--enable-opengl"
498 "--enable-x11grab"
499
500 "--enable-runtime-cpudetect"
501
502 ;; Runtime cpu detection is not implemented on
503 ;; MIPS, so we disable some features.
504 "--disable-mips32r2"
505 "--disable-mipsdsp"
506 "--disable-mipsdspr2"
507 "--disable-mipsfpu")
508 #:phases
509 (modify-phases %standard-phases
510 (replace
511 'configure
512 ;; configure does not work followed by "SHELL=..." and
513 ;; "CONFIG_SHELL=..."; set environment variables instead
514 (lambda* (#:key outputs configure-flags #:allow-other-keys)
515 (let ((out (assoc-ref outputs "out")))
516 (substitute* "configure"
517 (("#! /bin/sh") (string-append "#!" (which "bash"))))
518 (setenv "SHELL" (which "bash"))
519 (setenv "CONFIG_SHELL" (which "bash"))
520 (zero? (apply system*
521 "./configure"
522 (string-append "--prefix=" out)
523 ;; Add $libdir to the RUNPATH of all the binaries.
524 (string-append "--extra-ldflags=-Wl,-rpath="
525 out "/lib")
526 configure-flags)))))
527 (add-before
528 'check 'set-ld-library-path
529 (lambda _
530 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
531 ;; running tests.
532 (let* ((dso (find-files "." "\\.so$"))
533 (path (string-join (map dirname dso) ":")))
534 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
535 (setenv "LD_LIBRARY_PATH" path)
536 #t))))))
537 (home-page "https://www.ffmpeg.org/")
538 (synopsis "Audio and video framework")
539 (description "FFmpeg is a complete, cross-platform solution to record,
540 convert and stream audio and video. It includes the libavcodec
541 audio/video codec library.")
542 (license license:gpl2+)))
543
544 (define-public ffmpeg-2.8
545 (package
546 (inherit ffmpeg)
547 (version "2.8.7")
548 (source (origin
549 (method url-fetch)
550 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
551 version ".tar.xz"))
552 (sha256
553 (base32
554 "0z0mcj2q3ysp9qdn1ks03g5sn2zxyr06vxs4al0m4b5b3in8mglp"))))
555 (arguments
556 (substitute-keyword-arguments (package-arguments ffmpeg)
557 ((#:configure-flags flags)
558 `(map (lambda (flag)
559 (if (string=? flag "--disable-mipsdsp")
560 "--disable-mipsdspr1"
561 flag))
562 ,flags))))))
563
564 (define-public vlc
565 (package
566 (name "vlc")
567 (version "2.2.4")
568 (source (origin
569 (method url-fetch)
570 (uri (string-append
571 "https://download.videolan.org/pub/videolan/vlc/"
572 version "/vlc-" version ".tar.xz"))
573 (sha256
574 (base32
575 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
576 (modules '((guix build utils)))
577 (snippet
578 ;; There are two occurrences where __DATE__ and __TIME__ are
579 ;; used to capture the build time and show it to the user.
580 '(substitute* (find-files "." "help\\.c(pp)?$")
581 (("__DATE__") "\"2016\"")
582 (("__TIME__") "\"00:00\"")))))
583 (build-system gnu-build-system)
584 (native-inputs
585 `(("git" ,git) ; needed for a test
586 ("pkg-config" ,pkg-config)))
587 ;; FIXME: Add optional inputs once available.
588 (inputs
589 `(("alsa-lib" ,alsa-lib)
590 ("avahi" ,avahi)
591 ("dbus" ,dbus)
592 ("flac" ,flac)
593 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
594 ("fontconfig" ,fontconfig)
595 ("freetype" ,freetype)
596 ("gnutls" ,gnutls)
597 ("libcddb" ,libcddb)
598 ("libgcrypt" ,libgcrypt)
599 ("libkate" ,libkate)
600 ("libmad" ,libmad)
601 ("libogg" ,libogg)
602 ("libpng" ,libpng)
603 ("libsamplerate" ,libsamplerate)
604 ("libssh2" ,libssh2)
605 ("libvorbis" ,libvorbis)
606 ("libtheora" ,libtheora)
607 ("libxext" ,libxext)
608 ("libxinerama" ,libxinerama)
609 ("libxml2" ,libxml2)
610 ("libxpm" ,libxpm)
611 ("lua" ,lua-5.1)
612 ("mesa" ,mesa)
613 ("opus" ,opus)
614 ("perl" ,perl)
615 ("pulseaudio" ,pulseaudio)
616 ("python" ,python-wrapper)
617 ("qtbase" ,qtbase)
618 ;("qtx11extras" ,qtx11extras)
619 ("sdl" ,sdl)
620 ("sdl-image" ,sdl-image)
621 ("speex" ,speex)
622 ("xcb-util-keysyms" ,xcb-util-keysyms)))
623 (arguments
624 `(#:configure-flags
625 `("--disable-a52" ; FIXME: reenable once available
626 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
627 (assoc-ref %build-inputs "ffmpeg")
628 "/lib")) ;needed for the tests
629
630 #:phases
631 (modify-phases %standard-phases
632 (add-before 'configure 'remove-visual-tests
633 ;; Some of the tests require using the display to test out VLC,
634 ;; which fails in our sandboxed build system
635 (lambda _
636 (substitute* "test/run_vlc.sh"
637 (("./vlc --ignore-config") "echo"))
638 #t))
639 (add-after 'install 'regenerate-plugin-cache
640 (lambda* (#:key outputs #:allow-other-keys)
641 ;; The 'install-exec-hook' rule in the top-level Makefile.am
642 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
643 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
644 ;; it references. Thus, we first reset the timestamps of all
645 ;; these files, and then regenerate the cache such that the
646 ;; mtimes it includes are always zero instead of being dependent
647 ;; on the build time.
648 (let* ((out (assoc-ref outputs "out"))
649 (pkglibdir (string-append out "/lib/vlc"))
650 (plugindir (string-append pkglibdir "/plugins"))
651 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
652 ;; TODO: Factorize 'reset-timestamps'.
653 (for-each (lambda (file)
654 (let ((s (lstat file)))
655 (unless (eq? (stat:type s) 'symlink)
656 (utime file 0 0 0 0))))
657 (find-files plugindir))
658 (zero? (system* cachegen plugindir))))))))
659 (home-page "https://www.videolan.org/")
660 (synopsis "Audio and video framework")
661 (description "VLC is a cross-platform multimedia player and framework
662 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
663 treaming protocols.")
664 (license license:gpl2+)))
665
666 (define-public mplayer
667 (package
668 (name "mplayer")
669 (version "1.3.0")
670 (source (origin
671 (method url-fetch)
672 (uri (string-append
673 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
674 version ".tar.xz"))
675 (sha256
676 (base32
677 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
678 (build-system gnu-build-system)
679 ;; FIXME: Add additional inputs once available.
680 (native-inputs
681 `(("pkg-config" ,pkg-config)))
682 (inputs
683 `(("alsa-lib" ,alsa-lib)
684 ("cdparanoia" ,cdparanoia)
685 ("ffmpeg" ,ffmpeg)
686 ("fontconfig" ,fontconfig)
687 ("freetype" ,freetype)
688 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
689 ("lame" ,lame)
690 ("libass" ,libass)
691 ("libdvdcss" ,libdvdcss)
692 ("libdvdnav" ,libdvdnav)
693 ("libjpeg" ,libjpeg)
694 ("libmpeg2" ,libmpeg2)
695 ("libmpg123" ,mpg123) ; audio codec for MP3
696 ("libpng" ,libpng)
697 ("libtheora" ,libtheora)
698 ("libvdpau" ,libvdpau)
699 ("libvorbis" ,libvorbis)
700 ("libx11" ,libx11)
701 ("libx264" ,libx264)
702 ("libxinerama" ,libxinerama)
703 ("libxv" ,libxv)
704 ("libxxf86dga" ,libxxf86dga)
705 ("mesa" ,mesa)
706 ("opus" ,opus)
707 ("perl" ,perl)
708 ("pulseaudio" ,pulseaudio)
709 ("python" ,python-wrapper)
710 ("sdl" ,sdl)
711 ("speex" ,speex)
712 ("yasm" ,yasm)
713 ("zlib" ,zlib)))
714 (arguments
715 `(#:tests? #f ; no test target
716 #:phases
717 (modify-phases %standard-phases
718 (replace 'configure
719 ;; configure does not work followed by "SHELL=..." and
720 ;; "CONFIG_SHELL=..."; set environment variables instead
721 (lambda* (#:key inputs outputs #:allow-other-keys)
722 (let ((out (assoc-ref outputs "out"))
723 (libx11 (assoc-ref inputs "libx11")))
724 (substitute* "configure"
725 (("#! /bin/sh") (string-append "#!" (which "bash"))))
726 (setenv "SHELL" (which "bash"))
727 (setenv "CONFIG_SHELL" (which "bash"))
728 (zero? (system*
729 "./configure"
730 (string-append "--extra-cflags=-I"
731 libx11 "/include") ; to detect libx11
732 "--disable-ffmpeg_a" ; disables bundled ffmpeg
733 (string-append "--prefix=" out)
734 ;; Enable runtime cpu detection where supported,
735 ;; and choose a suitable target.
736 ,@(match (or (%current-target-system)
737 (%current-system))
738 ("x86_64-linux"
739 '("--enable-runtime-cpudetection"
740 "--target=x86_64-linux"))
741 ("i686-linux"
742 '("--enable-runtime-cpudetection"
743 "--target=i686-linux"))
744 ("mips64el-linux"
745 '("--target=mips3-linux"))
746 (_ (list (string-append
747 "--target="
748 (or (%current-target-system)
749 (nix-system->gnu-triplet
750 (%current-system)))))))
751 "--disable-iwmmxt"))))))))
752 (home-page "https://www.mplayerhq.hu/design7/news.html")
753 (synopsis "Audio and video player")
754 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
755 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
756 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
757 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
758 (license license:gpl2)))
759
760 (define-public mpv
761 (package
762 (name "mpv")
763 (version "0.18.0")
764 (source (origin
765 (method url-fetch)
766 (uri (string-append
767 "https://github.com/mpv-player/mpv/archive/v" version
768 ".tar.gz"))
769 (sha256
770 (base32
771 "0az0zqb2rakak51zsvfqzj9a8jiqpvc61jxap8hjdkkb9y6n6mmn"))
772 (file-name (string-append name "-" version ".tar.gz"))))
773 (build-system waf-build-system)
774 (native-inputs
775 `(("perl" ,perl)
776 ("pkg-config" ,pkg-config)
777 ("python-docutils" ,python-docutils)))
778 ;; Missing features: libguess, Wayland, V4L2
779 (inputs
780 `(("alsa-lib" ,alsa-lib)
781 ("enca" ,enca)
782 ("ffmpeg" ,ffmpeg)
783 ("jack" ,jack-1)
784 ("ladspa" ,ladspa)
785 ("lcms" ,lcms)
786 ("libass" ,libass)
787 ("libbluray" ,libbluray)
788 ("libcaca" ,libcaca)
789 ("libbs2b" ,libbs2b)
790 ("libcdio-paranoia" ,libcdio-paranoia)
791 ("libdvdread" ,libdvdread)
792 ("libdvdnav" ,libdvdnav)
793 ("libjpeg" ,libjpeg)
794 ("libva" ,libva)
795 ("libvdpau" ,libvdpau)
796 ("libx11" ,libx11)
797 ("libxext" ,libxext)
798 ("libxinerama" ,libxinerama)
799 ("libxrandr" ,libxrandr)
800 ("libxscrnsaver" ,libxscrnsaver)
801 ("libxv" ,libxv)
802 ("lua" ,lua)
803 ("mesa" ,mesa)
804 ("mpg123" ,mpg123)
805 ("pulseaudio" ,pulseaudio)
806 ("rsound" ,rsound)
807 ("vapoursynth" ,vapoursynth)
808 ("waf" ,python-waf)
809 ("youtube-dl" ,youtube-dl)
810 ("zlib" ,zlib)))
811 (arguments
812 '(#:phases
813 (modify-phases %standard-phases
814 (add-before
815 'configure 'setup-waf
816 (lambda* (#:key inputs #:allow-other-keys)
817 (copy-file (assoc-ref inputs "waf") "waf")
818 (setenv "CC" "gcc"))))
819 #:configure-flags (list "--enable-libmpv-shared" "--enable-zsh-comp")
820 ;; No check function defined.
821 #:tests? #f))
822 (home-page "https://mpv.io/")
823 (synopsis "Audio and video player")
824 (description "mpv is a general-purpose audio and video player. It is a
825 fork of mplayer2 and MPlayer. It shares some features with the former
826 projects while introducing many more.")
827 (license license:gpl2+)))
828
829 (define-public gnome-mpv
830 (package
831 (name "gnome-mpv")
832 (version "0.9")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
837 "/download/v" version "/gnome-mpv-" version
838 ".tar.xz"))
839 (sha256
840 (base32
841 "06pgxl6f3kkgxv8nlmyl7gy3pg55sqf8vgr8m6426mlpm4p3qdn0"))))
842 (native-inputs
843 `(("intltool" ,intltool)
844 ("pkg-config" ,pkg-config)))
845 (inputs
846 `(("gtk+" ,gtk+)
847 ("libepoxy" ,libepoxy)
848 ("mpv" ,mpv)))
849 (build-system glib-or-gtk-build-system)
850 (home-page "https://github.com/gnome-mpv/gnome-mpv")
851 (synopsis "GTK+ frontend for the mpv media player")
852 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
853 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
854 access to mpv's powerful playback capabilities.")
855 (license license:gpl3+)))
856
857 (define-public libvpx
858 (package
859 (name "libvpx")
860 (version "1.5.0")
861 (source (origin
862 (method url-fetch)
863 (uri (string-append "http://storage.googleapis.com/"
864 "downloads.webmproject.org/releases/webm/"
865 name "-" version ".tar.bz2"))
866 (sha256
867 (base32
868 "15v7qw0ydyxn08ksb6lxn1l51pxgpwgshdwd3275yrr5hs86fv9h"))
869 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
870 (build-system gnu-build-system)
871 (arguments
872 `(#:phases
873 (modify-phases %standard-phases
874 (replace 'configure
875 (lambda* (#:key outputs #:allow-other-keys)
876 (setenv "CONFIG_SHELL" (which "bash"))
877 (let ((out (assoc-ref outputs "out")))
878 (setenv "LDFLAGS"
879 (string-append "-Wl,-rpath=" out "/lib"))
880 (zero? (system* "./configure"
881 "--enable-shared"
882 "--as=yasm"
883 ;; Limit size to avoid CVE-2015-1258
884 "--size-limit=16384x16384"
885 (string-append "--prefix=" out)))))))
886 #:tests? #f)) ; no check target
887 (native-inputs
888 `(("perl" ,perl)
889 ("yasm" ,yasm)))
890 (synopsis "VP8/VP9 video codec")
891 (description "libvpx is a codec for the VP8/VP9 video compression format.")
892 (license license:bsd-3)
893 (home-page "http://www.webmproject.org/")))
894
895 (define-public youtube-dl
896 (package
897 (name "youtube-dl")
898 (version "2016.07.22")
899 (source (origin
900 (method url-fetch)
901 (uri (string-append "https://youtube-dl.org/downloads/"
902 version "/youtube-dl-"
903 version ".tar.gz"))
904 (sha256
905 (base32
906 "02wcxpcbpvsbvyxcnhhf94ma0x5dcg4fygnxxca2h31dp47dkak9"))))
907 (build-system python-build-system)
908 (home-page "https://youtube-dl.org")
909 (arguments
910 ;; The problem here is that the directory for the man page and completion
911 ;; files is relative, and for some reason, setup.py uses the
912 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
913 ;; So, we need pass the prefix directly. In addition, make sure the Bash
914 ;; completion file is called 'youtube-dl' rather than
915 ;; 'youtube-dl.bash-completion'.
916 `(#:phases (modify-phases %standard-phases
917 (add-before 'install 'fix-the-data-directories
918 (lambda* (#:key outputs #:allow-other-keys)
919 (let ((prefix (assoc-ref outputs "out")))
920 (mkdir "bash-completion")
921 (rename-file "youtube-dl.bash-completion"
922 "bash-completion/youtube-dl")
923 (substitute* "setup.py"
924 (("youtube-dl\\.bash-completion")
925 "bash-completion/youtube-dl")
926 (("'etc/")
927 (string-append "'" prefix "/etc/"))
928 (("'share/")
929 (string-append "'" prefix "/share/")))))))))
930 (synopsis "Download videos from YouTube.com and other sites")
931 (description
932 "Youtube-dl is a small command-line program to download videos from
933 YouTube.com and a few more sites.")
934 (license license:public-domain)))
935
936 (define-public libbluray
937 (package
938 (name "libbluray")
939 (version "0.9.3")
940 (source (origin
941 (method url-fetch)
942 (uri (string-append "https://download.videolan.org/videolan/"
943 name "/" version "/"
944 name "-" version ".tar.bz2"))
945 (sha256
946 (base32
947 "1q1whviqv5sr9nr372h31zwid1rvbfbx3z4lzr8lnj25xha6cdm6"))))
948 (build-system gnu-build-system)
949 (arguments `(#:configure-flags '("--disable-bdjava")))
950 (native-inputs `(("pkg-config" ,pkg-config)))
951 (inputs
952 `(("fontconfig" ,fontconfig)
953 ("freetype" ,freetype)
954 ("libxml2" ,libxml2)))
955 (home-page "https://www.videolan.org/developers/libbluray.html")
956 (synopsis "Blu-Ray Disc playback library")
957 (description
958 "libbluray is a library designed for Blu-Ray Disc playback for media
959 players, like VLC or MPlayer.")
960 (license license:lgpl2.1+)))
961
962 (define-public libdvdread
963 (package
964 (name "libdvdread")
965 (version "5.0.3")
966 (source (origin
967 (method url-fetch)
968 (uri (string-append "http://download.videolan.org/videolan/"
969 name "/" version "/"
970 name "-" version ".tar.bz2"))
971 (sha256
972 (base32
973 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
974 (build-system gnu-build-system)
975 (home-page "http://dvdnav.mplayerhq.hu/")
976 (synopsis "Library for reading video DVDs")
977 (description
978 "Libdvdread provides a simple foundation for reading DVD video
979 disks. It provides the functionality that is required to access many
980 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
981 authentication and descrambling (if an external libdvdcss library is
982 installed).")
983 (license license:gpl2+)))
984
985 (define-public libdvdnav
986 (package
987 (name "libdvdnav")
988 (version "5.0.3")
989 (source (origin
990 (method url-fetch)
991 (uri (string-append "http://download.videolan.org/videolan/"
992 name "/" version "/"
993 name "-" version ".tar.bz2"))
994 (sha256
995 (base32
996 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
997 (build-system gnu-build-system)
998 (native-inputs
999 `(("pkg-config" ,pkg-config)))
1000 (inputs
1001 `(("libdvdread" ,libdvdread)))
1002 (home-page "http://dvdnav.mplayerhq.hu/")
1003 (synopsis "Library for video DVD navigation features")
1004 (description
1005 "Libdvdnav is a library for developers of multimedia
1006 applications. It allows easy use of sophisticated DVD navigation features
1007 such as DVD menus, multiangle playback and even interactive DVD games. All
1008 this functionality is provided through a simple API which provides the DVD
1009 playback as a single logical stream of blocks, intermitted by special
1010 dvdnav events to report certain conditions. The main usage of libdvdnav is
1011 a loop regularly calling a function to get the next block, surrounded by
1012 additional calls to tell the library of user interaction. The whole
1013 DVD virtual machine and internal playback states are completely
1014 encapsulated.")
1015 (license license:gpl2+)))
1016
1017 (define-public libdvdnav-4
1018 (package
1019 (inherit libdvdnav)
1020 (version "4.2.1")
1021 (source (origin
1022 (method url-fetch)
1023 (uri
1024 (string-append
1025 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1026 version ".tar.xz"))
1027 (sha256
1028 (base32
1029 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1030 (native-inputs
1031 `(("pkg-config" ,pkg-config)
1032 ("autoconf" ,autoconf)
1033 ("automake" ,automake)
1034 ("libtool" ,libtool)))
1035 (arguments
1036 '(#:phases
1037 (alist-cons-after
1038 'unpack 'autoreconf
1039 (lambda _
1040 (zero? (system* "autoreconf" "-vif")))
1041 %standard-phases)))))
1042
1043 (define-public libdvdcss
1044 (package
1045 (name "libdvdcss")
1046 (version "1.4.0")
1047 (source (origin
1048 (method url-fetch)
1049 (uri (string-append "http://download.videolan.org/pub/"
1050 name "/" version "/"
1051 name "-" version ".tar.bz2"))
1052 (sha256
1053 (base32
1054 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1055 (build-system gnu-build-system)
1056 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1057 (synopsis "Library for accessing DVDs as block devices")
1058 (description
1059 "libdvdcss is a simple library designed for accessing DVDs like a block
1060 device without having to bother about the decryption.")
1061 (license license:gpl2+)))
1062
1063 (define-public srt2vtt
1064 (package
1065 (name "srt2vtt")
1066 (version "0.1")
1067 (source (origin
1068 (method url-fetch)
1069 (uri (string-append
1070 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1071 version ".tar.gz"))
1072 (sha256
1073 (base32
1074 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1075 (build-system gnu-build-system)
1076 (inputs
1077 `(("guile" ,guile-2.0)))
1078 (synopsis "SubRip to WebVTT subtitle converter")
1079 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1080 for use with HTML5 video.")
1081 (home-page "http://dthompson.us/pages/software/srt2vtt")
1082 (license license:gpl3+)))
1083
1084 (define-public avidemux
1085 (package
1086 (name "avidemux")
1087 (version "2.6.12")
1088 (source (origin
1089 (method url-fetch)
1090 (uri (string-append
1091 "mirror://sourceforge/" name "/" name "/" version "/"
1092 name "_" version ".tar.gz"))
1093 (sha256
1094 (base32
1095 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1096 (patches (search-patches "avidemux-install-to-lib.patch"))))
1097 (build-system cmake-build-system)
1098 (native-inputs
1099 `(("pkg-config" ,pkg-config)))
1100 ;; FIXME: Once packaged, add libraries not found during the build.
1101 (inputs
1102 `(("alsa-lib" ,alsa-lib)
1103 ("fontconfig" ,fontconfig)
1104 ("freetype" ,freetype)
1105 ("fribidi" ,fribidi)
1106 ("glu" ,glu)
1107 ("jack" ,jack-1)
1108 ("lame" ,lame)
1109 ("libva" ,libva)
1110 ("libvdpau" ,libvdpau)
1111 ("libvorbis" ,libvorbis)
1112 ("libvpx" ,libvpx)
1113 ("libxv" ,libxv)
1114 ("perl" ,perl)
1115 ("pulseaudio" ,pulseaudio)
1116 ("python" ,python-wrapper)
1117 ("qtbase" ,qtbase)
1118 ("qttools" ,qttools)
1119 ("sdl" ,sdl)
1120 ("sqlite" ,sqlite)
1121 ("yasm" ,yasm)
1122 ("zlib" ,zlib)))
1123 (arguments
1124 `(#:tests? #f ; no check target
1125 #:phases
1126 ;; Make sure files inside the included ffmpeg tarball are
1127 ;; patch-shebanged.
1128 (modify-phases %standard-phases
1129 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1130 (lambda _
1131 (with-directory-excursion "avidemux_core/ffmpeg_package"
1132 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1133 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1134 (add-after 'patch-source-shebangs 'repack-ffmpeg
1135 (lambda _
1136 (with-directory-excursion "avidemux_core/ffmpeg_package"
1137 (substitute* "ffmpeg-2.7.6/configure"
1138 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1139 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1140 ;; avoid non-determinism in the archive
1141 "--sort=name" "--mtime=@0"
1142 "--owner=root:0" "--group=root:0")
1143 (delete-file-recursively "ffmpeg-2.7.6"))))
1144 (replace 'configure
1145 (lambda _
1146 ;; Copy-paste settings from the cmake build system.
1147 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1148 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1149 (replace 'build
1150 (lambda* (#:key inputs outputs #:allow-other-keys)
1151 (let*
1152 ((out (assoc-ref outputs "out"))
1153 (lib (string-append out "/lib"))
1154 (top (getcwd))
1155 (sdl (assoc-ref inputs "sdl"))
1156 (build_component
1157 (lambda* (component srcdir #:optional (args '()))
1158 (let ((builddir (string-append "build_" component)))
1159 (mkdir builddir)
1160 (with-directory-excursion builddir
1161 (zero?
1162 (and
1163 (apply system* "cmake"
1164 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1165 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1166 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1167 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1168 "\"-Wl,-rpath=" lib "\"")
1169 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1170 (string-append "-DSDL_INCLUDE_DIR="
1171 sdl "/include/SDL")
1172 (string-append "../" srcdir)
1173 "-DENABLE_QT5=True"
1174 args)
1175 (system* "make" "-j"
1176 (number->string (parallel-job-count)))
1177 (system* "make" "install"))))))))
1178 (mkdir out)
1179 (and (build_component "core" "avidemux_core")
1180 (build_component "cli" "avidemux/cli")
1181 (build_component "qt4" "avidemux/qt4")
1182 (build_component "plugins_common" "avidemux_plugins"
1183 '("-DPLUGIN_UI=COMMON"))
1184 (build_component "plugins_cli" "avidemux_plugins"
1185 '("-DPLUGIN_UI=CLI"))
1186 (build_component "plugins_qt4" "avidemux_plugins"
1187 '("-DPLUGIN_UI=QT4"))
1188 (build_component "plugins_settings" "avidemux_plugins"
1189 '("-DPLUGIN_UI=SETTINGS")))
1190 ;; Remove .exe and .dll file.
1191 (delete-file-recursively
1192 (string-append out "/share/ADM6_addons")))))
1193 (delete 'install))))
1194 (home-page "http://fixounet.free.fr/avidemux/")
1195 (synopsis "Video editor")
1196 (description "Avidemux is a video editor designed for simple cutting,
1197 filtering and encoding tasks. It supports many file types, including AVI,
1198 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1199 can be automated using projects, job queue and powerful scripting
1200 capabilities.")
1201 ;; Software with various licenses is included, see License.txt.
1202 (license license:gpl2+)))
1203
1204 (define-public vapoursynth
1205 (package
1206 (name "vapoursynth")
1207 (version "32")
1208 (source (origin
1209 (method url-fetch)
1210 (uri (string-append
1211 "https://github.com/vapoursynth/vapoursynth/archive/R"
1212 version ".tar.gz"))
1213 (file-name (string-append name "-" version))
1214 (sha256
1215 (base32
1216 "1j08whj946v2kkpgxsfhpca8xf0ax9iqzn73wvwjx319p9j0ymp9"))))
1217 (build-system gnu-build-system)
1218 (native-inputs
1219 `(("autoconf" ,autoconf)
1220 ("automake" ,automake)
1221 ("cython" ,python-cython)
1222 ("libtool" ,libtool)
1223 ("pkg-config" ,pkg-config)
1224 ("python" ,python)
1225 ("yasm" ,yasm)))
1226 (inputs
1227 `(("ffmpeg" ,ffmpeg)
1228 ("libass" ,libass)
1229 ("tesseract-ocr" ,tesseract-ocr)
1230 ("zimg" ,zimg)))
1231 (arguments
1232 '(#:phases
1233 (modify-phases %standard-phases
1234 (add-after
1235 'unpack 'autogen
1236 (lambda _
1237 (zero? (system* "sh" "autogen.sh")))))))
1238 (home-page "http://www.vapoursynth.com/")
1239 (synopsis "Video processing framework")
1240 (description "VapourSynth is a C++ library and Python module for video
1241 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1242 multithreading, generalized colorspaces, per frame properties, and videos with
1243 format changes.")
1244 ;; As seen from the source files.
1245 (license license:lgpl2.1+)))
1246
1247 (define-public xvid
1248 (package
1249 (name "xvid")
1250 (version "1.3.4")
1251 (source (origin
1252 (method url-fetch)
1253 (uri (string-append
1254 "http://downloads.xvid.org/downloads/xvidcore-"
1255 version ".tar.bz2"))
1256 (sha256
1257 (base32
1258 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1259 (build-system gnu-build-system)
1260 (native-inputs `(("yasm" ,yasm)))
1261 (arguments
1262 '(#:phases
1263 (modify-phases %standard-phases
1264 (add-before
1265 'configure 'pre-configure
1266 (lambda _
1267 (chdir "build/generic")
1268 (substitute* "configure"
1269 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1270 ;; No 'check' target.
1271 #:tests? #f))
1272 (home-page "https://www.xvid.com/")
1273 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1274 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1275 codec library. It uses ASP features such as b-frames, global and quarter
1276 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1277 and custom quantization matrices.")
1278 (license license:gpl2+)))
1279
1280 (define-public livestreamer
1281 (package
1282 (name "livestreamer")
1283 (version "1.12.2")
1284 (source (origin
1285 (method url-fetch)
1286 (uri (string-append
1287 "https://github.com/chrippa/livestreamer/archive/v"
1288 version ".tar.gz"))
1289 (file-name (string-append "livestreamer-" version ".tar.gz"))
1290 (sha256
1291 (base32
1292 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1293 (build-system python-build-system)
1294 (arguments
1295 '(#:tests? #f)) ; tests rely on external web servers
1296 (propagated-inputs
1297 `(("python-requests" ,python-requests)))
1298 (synopsis "Internet video stream viewer")
1299 (description "Livestreamer is a command-line utility that extracts streams
1300 from various services and pipes them into a video playing application.")
1301 (home-page "http://livestreamer.io/")
1302 (license license:bsd-2)))
1303
1304 (define-public mlt
1305 (package
1306 (name "mlt")
1307 (version "6.2.0")
1308 (source (origin
1309 (method url-fetch)
1310 (uri (string-append "https://github.com/mltframework/mlt/"
1311 "archive/v" version ".tar.gz"))
1312 (file-name (string-append name "-" version ".tar.gz"))
1313 (sha256
1314 (base32
1315 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
1316 (build-system gnu-build-system)
1317 (arguments
1318 `(#:tests? #f ; no tests
1319 #:make-flags '("CC=gcc")
1320 #:configure-flags
1321 (list "--enable-gpl3"
1322 "--enable-gpl")
1323 #:phases
1324 (modify-phases %standard-phases
1325 (add-after
1326 'configure 'override-LDFLAGS
1327 (lambda* (#:key outputs #:allow-other-keys)
1328 (substitute* "config.mak"
1329 (("LDFLAGS\\+=")
1330 (string-append "LDFLAGS+=-Wl,-rpath="
1331 (assoc-ref outputs "out")
1332 "/lib ")))
1333 #t)))))
1334 (inputs
1335 `(("alsa-lib" ,alsa-lib)
1336 ("fftw" ,fftw)
1337 ("libxml2" ,libxml2)
1338 ("jack" ,jack-1)
1339 ("ladspa" ,ladspa)
1340 ("libsamplerate" ,libsamplerate)
1341 ("pulseaudio" ,pulseaudio)
1342 ("sdl" ,sdl)
1343 ("sox" ,sox)))
1344 (native-inputs
1345 `(("pkg-config" ,pkg-config)))
1346 (home-page "https://www.mltframework.org/")
1347 (synopsis "Author, manage, and run multitrack audio/video compositions")
1348 (description
1349 "MLT is a multimedia framework, designed and developed for television
1350 broadcasting. It provides a toolkit for broadcasters, video editors, media
1351 players, transcoders, web streamers and many more types of applications. The
1352 functionality of the system is provided via an assortment of ready to use
1353 tools, XML authoring components, and an extensible plug-in based API.")
1354 (license license:lgpl2.1+)))
1355
1356 (define-public v4l-utils
1357 (package
1358 (name "v4l-utils")
1359 (version "1.10.1")
1360 (source (origin
1361 (method url-fetch)
1362 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1363 "/v4l-utils-" version ".tar.bz2"))
1364 (sha256
1365 (base32
1366 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
1367 (build-system gnu-build-system)
1368 (arguments
1369 '(#:configure-flags
1370 (list (string-append "--with-udevdir="
1371 (assoc-ref %outputs "out")
1372 "/lib/udev"))))
1373 (native-inputs
1374 `(("pkg-config" ,pkg-config)))
1375 (inputs
1376 `(("alsa-lib" ,alsa-lib)
1377 ("glu" ,glu)
1378 ("libjpeg" ,libjpeg)
1379 ("libx11" ,libx11)
1380 ("qtbase" ,qtbase)
1381 ("eudev" ,eudev)))
1382 (synopsis "Realtime video capture utilities for Linux")
1383 (description "The v4l-utils provide a series of libraries and utilities to
1384 be used for realtime video capture via Linux-specific APIs.")
1385 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1386 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1387 (license (list license:lgpl2.1+ license:gpl2))))
1388
1389 (define-public obs
1390 (package
1391 (name "obs")
1392 (version "0.15.1")
1393 (source (origin
1394 (method url-fetch)
1395 (uri (string-append "https://github.com/jp9000/obs-studio"
1396 "/archive/" version ".tar.gz"))
1397 (file-name (string-append name "-" version ".tar.gz"))
1398 (sha256
1399 (base32
1400 "18fycg7xlj2i89wdb9c5js0bnl964s1lpmnvmfyj11zi9k061wsg"))))
1401 (build-system cmake-build-system)
1402 (arguments
1403 `(#:tests? #f ; no tests
1404 ,@(if (any (cute string-prefix? <> (or (%current-target-system)
1405 (%current-system)))
1406 '("arm" "mips"))
1407 '(#:phases
1408 (modify-phases %standard-phases
1409 (add-after 'unpack 'remove-architecture-specific-instructions
1410 ;; non-Intel platforms fail to build with the architecture
1411 ;; specific compiler flags included by default.
1412 (lambda _
1413 (substitute* "libobs/CMakeLists.txt"
1414 (("if\\(NOT MSVC\\)") "if(MSVC)"))
1415 #t))))
1416 '())))
1417 (native-inputs
1418 `(("pkg-config" ,pkg-config)))
1419 (inputs
1420 `(("curl" ,curl)
1421 ("eudev" ,eudev)
1422 ("ffmpeg" ,ffmpeg)
1423 ("freetype" ,freetype)
1424 ("jack" ,jack-1)
1425 ("jansson" ,jansson)
1426 ("libx264" ,libx264)
1427 ("libxcomposite" ,libxcomposite)
1428 ("mesa" ,mesa)
1429 ("pulseaudio" ,pulseaudio)
1430 ("qtbase" ,qtbase)
1431 ("qtx11extras" ,qtx11extras)
1432 ("v4l-utils" ,v4l-utils)
1433 ("zlib" ,zlib)))
1434 (synopsis "Live streaming software")
1435 (description "Open Broadcaster Software provides a graphical interface for
1436 video recording and live streaming. OBS supports capturing audio and video
1437 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1438 and JACK.")
1439 (home-page "https://obsproject.com")
1440 (license license:gpl2+)))
1441
1442 (define-public libvdpau
1443 (package
1444 (name "libvdpau")
1445 (version "1.1.1")
1446 (source
1447 (origin
1448 (method url-fetch)
1449 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1450 name "-" version ".tar.bz2"))
1451 (sha256
1452 (base32
1453 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1454 (build-system gnu-build-system)
1455 (native-inputs
1456 `(("pkg-config" ,pkg-config)))
1457 (inputs
1458 `(("dri2proto" ,dri2proto)
1459 ("libx11" ,libx11 "out")
1460 ("libxext" ,libxext)))
1461 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1462 (synopsis "Video Decode and Presentation API")
1463 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1464 provides an interface to video decode acceleration and presentation hardware
1465 present in modern GPUs.")
1466 (license (license:x11-style "file://COPYING"))))
1467
1468 (define-public vdpauinfo
1469 (package
1470 (name "vdpauinfo")
1471 (version "1.0")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1476 name "-" version ".tar.gz"))
1477 (sha256
1478 (base32
1479 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1480 (build-system gnu-build-system)
1481 (native-inputs
1482 `(("pkg-config" ,pkg-config)
1483 ("libx11" ,libx11)))
1484 (propagated-inputs
1485 `(("libvdpau" ,libvdpau)))
1486 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1487 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1488 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1489 implementation.")
1490 (license (license:x11-style "file://COPYING"))))
1491
1492 (define-public recordmydesktop
1493 (package
1494 (name "recordmydesktop")
1495 (version "0.3.8.1")
1496 (source (origin
1497 (method url-fetch)
1498 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1499 version "/recordmydesktop-" version ".tar.gz"))
1500 (sha256
1501 (base32
1502 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1503 (build-system gnu-build-system)
1504 (inputs `(("popt" ,popt)
1505 ("zlib" ,zlib)
1506 ("libx11" ,libx11)
1507 ("libice" ,libice)
1508 ("libsm" ,libsm)
1509 ("libxfixes" ,libxfixes)
1510 ("libxdamage" ,libxdamage)
1511 ("libxext" ,libxext)
1512 ("libvorbis" ,libvorbis)
1513 ("libtheora" ,libtheora)))
1514 (home-page "http://recordmydesktop.sourceforge.net/")
1515 (synopsis "Desktop session video recorder")
1516 (description
1517 "recordMyDesktop is a command-line tool that captures the activity in
1518 your graphical desktop and encodes it as a video. This is a useful tool for
1519 making @dfn{screencasts}.")
1520 (license license:gpl2+)))