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