692f3645e66590cb023aa91e09569373320fe770
[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.4")
563 (source (origin
564 (method url-fetch)
565 (uri (string-append
566 "https://download.videolan.org/pub/videolan/vlc/"
567 version "/vlc-" version ".tar.xz"))
568 (sha256
569 (base32
570 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
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 ("qtbase" ,qtbase)
613 ;("qtx11extras" ,qtx11extras)
614 ("sdl" ,sdl)
615 ("sdl-image" ,sdl-image)
616 ("speex" ,speex)
617 ("xcb-util-keysyms" ,xcb-util-keysyms)))
618 (arguments
619 `(#:configure-flags
620 `("--disable-a52" ; FIXME: reenable once available
621 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
622 (assoc-ref %build-inputs "ffmpeg")
623 "/lib")) ;needed for the tests
624
625 #:phases
626 (modify-phases %standard-phases
627 (add-before 'configure 'remove-visual-tests
628 ;; Some of the tests require using the display to test out VLC,
629 ;; which fails in our sandboxed build system
630 (lambda _
631 (substitute* "test/run_vlc.sh"
632 (("./vlc --ignore-config") "echo"))
633 #t))
634 (add-after 'install 'regenerate-plugin-cache
635 (lambda* (#:key outputs #:allow-other-keys)
636 ;; The 'install-exec-hook' rule in the top-level Makefile.am
637 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
638 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
639 ;; it references. Thus, we first reset the timestamps of all
640 ;; these files, and then regenerate the cache such that the
641 ;; mtimes it includes are always zero instead of being dependent
642 ;; on the build time.
643 (let* ((out (assoc-ref outputs "out"))
644 (pkglibdir (string-append out "/lib/vlc"))
645 (plugindir (string-append pkglibdir "/plugins"))
646 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
647 ;; TODO: Factorize 'reset-timestamps'.
648 (for-each (lambda (file)
649 (let ((s (lstat file)))
650 (unless (eq? (stat:type s) 'symlink)
651 (utime file 0 0 0 0))))
652 (find-files plugindir))
653 (zero? (system* cachegen plugindir))))))))
654 (home-page "https://www.videolan.org/")
655 (synopsis "Audio and video framework")
656 (description "VLC is a cross-platform multimedia player and framework
657 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
658 treaming protocols.")
659 (license license:gpl2+)))
660
661 (define-public mplayer
662 (package
663 (name "mplayer")
664 (version "1.3.0")
665 (source (origin
666 (method url-fetch)
667 (uri (string-append
668 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
669 version ".tar.xz"))
670 (sha256
671 (base32
672 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
673 (build-system gnu-build-system)
674 ;; FIXME: Add additional inputs once available.
675 (native-inputs
676 `(("pkg-config" ,pkg-config)))
677 (inputs
678 `(("alsa-lib" ,alsa-lib)
679 ("cdparanoia" ,cdparanoia)
680 ("ffmpeg" ,ffmpeg)
681 ("fontconfig" ,fontconfig)
682 ("freetype" ,freetype)
683 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
684 ("lame" ,lame)
685 ("libass" ,libass)
686 ("libdvdcss" ,libdvdcss)
687 ("libdvdnav" ,libdvdnav)
688 ("libjpeg" ,libjpeg)
689 ("libmpeg2" ,libmpeg2)
690 ("libmpg123" ,mpg123) ; audio codec for MP3
691 ("libpng" ,libpng)
692 ("libtheora" ,libtheora)
693 ("libvdpau" ,libvdpau)
694 ("libvorbis" ,libvorbis)
695 ("libx11" ,libx11)
696 ("libx264" ,libx264)
697 ("libxinerama" ,libxinerama)
698 ("libxv" ,libxv)
699 ("libxxf86dga" ,libxxf86dga)
700 ("mesa" ,mesa)
701 ("opus" ,opus)
702 ("perl" ,perl)
703 ("pulseaudio" ,pulseaudio)
704 ("python" ,python-wrapper)
705 ("sdl" ,sdl)
706 ("speex" ,speex)
707 ("yasm" ,yasm)
708 ("zlib" ,zlib)))
709 (arguments
710 `(#:tests? #f ; no test target
711 #:phases
712 (modify-phases %standard-phases
713 (replace 'configure
714 ;; configure does not work followed by "SHELL=..." and
715 ;; "CONFIG_SHELL=..."; set environment variables instead
716 (lambda* (#:key inputs outputs #:allow-other-keys)
717 (let ((out (assoc-ref outputs "out"))
718 (libx11 (assoc-ref inputs "libx11")))
719 (substitute* "configure"
720 (("#! /bin/sh") (string-append "#!" (which "bash"))))
721 (setenv "SHELL" (which "bash"))
722 (setenv "CONFIG_SHELL" (which "bash"))
723 (zero? (system*
724 "./configure"
725 (string-append "--extra-cflags=-I"
726 libx11 "/include") ; to detect libx11
727 "--disable-ffmpeg_a" ; disables bundled ffmpeg
728 (string-append "--prefix=" out)
729 ;; Enable runtime cpu detection where supported,
730 ;; and choose a suitable target.
731 ,@(match (or (%current-target-system)
732 (%current-system))
733 ("x86_64-linux"
734 '("--enable-runtime-cpudetection"
735 "--target=x86_64-linux"))
736 ("i686-linux"
737 '("--enable-runtime-cpudetection"
738 "--target=i686-linux"))
739 ("mips64el-linux"
740 '("--target=mips3-linux"))
741 (_ (list (string-append
742 "--target="
743 (or (%current-target-system)
744 (nix-system->gnu-triplet
745 (%current-system)))))))
746 "--disable-iwmmxt"))))))))
747 (home-page "https://www.mplayerhq.hu/design7/news.html")
748 (synopsis "Audio and video player")
749 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
750 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
751 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
752 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
753 (license license:gpl2)))
754
755 (define-public mpv
756 (package
757 (name "mpv")
758 (version "0.17.0")
759 (source (origin
760 (method url-fetch)
761 (uri (string-append
762 "https://github.com/mpv-player/mpv/archive/v" version
763 ".tar.gz"))
764 (sha256
765 (base32
766 "0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30"))
767 (file-name (string-append name "-" version ".tar.gz"))))
768 (build-system waf-build-system)
769 (native-inputs
770 `(("perl" ,perl)
771 ("pkg-config" ,pkg-config)
772 ("python-docutils" ,python-docutils)))
773 ;; Missing features: libguess, Wayland, V4L2
774 (inputs
775 `(("alsa-lib" ,alsa-lib)
776 ("enca" ,enca)
777 ("ffmpeg" ,ffmpeg)
778 ("jack" ,jack-1)
779 ("ladspa" ,ladspa)
780 ("lcms" ,lcms)
781 ("libass" ,libass)
782 ("libbluray" ,libbluray)
783 ("libcaca" ,libcaca)
784 ("libbs2b" ,libbs2b)
785 ("libcdio-paranoia" ,libcdio-paranoia)
786 ("libdvdread" ,libdvdread)
787 ("libdvdnav" ,libdvdnav)
788 ("libjpeg" ,libjpeg)
789 ("libva" ,libva)
790 ("libvdpau" ,libvdpau)
791 ("libx11" ,libx11)
792 ("libxext" ,libxext)
793 ("libxinerama" ,libxinerama)
794 ("libxrandr" ,libxrandr)
795 ("libxscrnsaver" ,libxscrnsaver)
796 ("libxv" ,libxv)
797 ("lua" ,lua)
798 ("mesa" ,mesa)
799 ("mpg123" ,mpg123)
800 ("pulseaudio" ,pulseaudio)
801 ("rsound" ,rsound)
802 ("vapoursynth" ,vapoursynth)
803 ("waf" ,(origin
804 (method url-fetch)
805 ;; Keep this in sync with the version in the bootstrap.py
806 ;; script of the source tarball.
807 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.12")
808 (sha256
809 (base32
810 "12y9c352zwliw0zk9jm2lhynsjcf5jy0k1qch1c1av8hnbm2pgq1"))))
811 ("youtube-dl" ,youtube-dl)
812 ("zlib" ,zlib)))
813 (arguments
814 '(#:phases
815 (modify-phases %standard-phases
816 (add-before
817 'configure 'setup-waf
818 (lambda* (#:key inputs #:allow-other-keys)
819 (copy-file (assoc-ref inputs "waf") "waf")
820 (setenv "CC" "gcc"))))
821 #:configure-flags (list "--enable-gpl3" "--enable-zsh-comp")
822 ;; No check function defined.
823 #:tests? #f))
824 (home-page "https://mpv.io/")
825 (synopsis "Audio and video player")
826 (description "mpv is a general-purpose audio and video player. It is a
827 fork of mplayer2 and MPlayer. It shares some features with the former
828 projects while introducing many more.")
829 (license license:gpl2+)))
830
831 (define-public libvpx
832 (package
833 (name "libvpx")
834 (version "1.5.0")
835 (source (origin
836 (method url-fetch)
837 (uri (string-append "http://storage.googleapis.com/"
838 "downloads.webmproject.org/releases/webm/"
839 name "-" version ".tar.bz2"))
840 (sha256
841 (base32
842 "15v7qw0ydyxn08ksb6lxn1l51pxgpwgshdwd3275yrr5hs86fv9h"))))
843 (build-system gnu-build-system)
844 (arguments
845 `(#:phases
846 (modify-phases %standard-phases
847 (replace 'configure
848 (lambda* (#:key outputs #:allow-other-keys)
849 (setenv "CONFIG_SHELL" (which "bash"))
850 (let ((out (assoc-ref outputs "out")))
851 (setenv "LDFLAGS"
852 (string-append "-Wl,-rpath=" out "/lib"))
853 (zero? (system* "./configure"
854 "--enable-shared"
855 "--as=yasm"
856 ;; Limit size to avoid CVE-2015-1258
857 "--size-limit=16384x16384"
858 (string-append "--prefix=" out)))))))
859 #:tests? #f)) ; no check target
860 (native-inputs
861 `(("perl" ,perl)
862 ("yasm" ,yasm)))
863 (synopsis "VP8/VP9 video codec")
864 (description "libvpx is a codec for the VP8/VP9 video compression format.")
865 (license license:bsd-3)
866 (home-page "http://www.webmproject.org/")))
867
868 (define-public youtube-dl
869 (package
870 (name "youtube-dl")
871 (version "2016.05.01")
872 (source (origin
873 (method url-fetch)
874 (uri (string-append "http://youtube-dl.org/downloads/"
875 version "/youtube-dl-"
876 version ".tar.gz"))
877 (sha256
878 (base32
879 "1w04afmwq5pjvp3nl2k59q0cigqrj9n8fwkydcfldwpq83l15j5d"))))
880 (build-system python-build-system)
881 (home-page "http://youtube-dl.org")
882 (arguments
883 ;; The problem here is that the directory for the man page and completion
884 ;; files is relative, and for some reason, setup.py uses the
885 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
886 ;; So, we need pass the prefix directly. In addition, make sure the Bash
887 ;; completion file is called 'youtube-dl' rather than
888 ;; 'youtube-dl.bash-completion'.
889 `(#:phases (modify-phases %standard-phases
890 (add-before 'install 'fix-the-data-directories
891 (lambda* (#:key outputs #:allow-other-keys)
892 (let ((prefix (assoc-ref outputs "out")))
893 (mkdir "bash-completion")
894 (rename-file "youtube-dl.bash-completion"
895 "bash-completion/youtube-dl")
896 (substitute* "setup.py"
897 (("youtube-dl\\.bash-completion")
898 "bash-completion/youtube-dl")
899 (("'etc/")
900 (string-append "'" prefix "/etc/"))
901 (("'share/")
902 (string-append "'" prefix "/share/")))))))))
903 (synopsis "Download videos from YouTube.com and other sites")
904 (description
905 "Youtube-dl is a small command-line program to download videos from
906 YouTube.com and a few more sites.")
907 (license license:public-domain)))
908
909 (define-public libbluray
910 (package
911 (name "libbluray")
912 (version "0.9.2")
913 (source (origin
914 (method url-fetch)
915 (uri (string-append "http://download.videolan.org/videolan/"
916 name "/" version "/"
917 name "-" version ".tar.bz2"))
918 (sha256
919 (base32
920 "1sp71j4agcsg17g6b85cqz78pn5vknl5pl39rvr6mkib5ps99jgg"))))
921 (build-system gnu-build-system)
922 (arguments `(#:configure-flags '("--disable-bdjava")))
923 (native-inputs `(("pkg-config" ,pkg-config)))
924 (inputs
925 `(("fontconfig" ,fontconfig)
926 ("freetype" ,freetype)
927 ("libxml2" ,libxml2)))
928 (home-page "http://www.videolan.org/developers/libbluray.html")
929 (synopsis "Blu-Ray Disc playback library")
930 (description
931 "libbluray is a library designed for Blu-Ray Disc playback for media
932 players, like VLC or MPlayer.")
933 (license license:lgpl2.1+)))
934
935 (define-public libdvdread
936 (package
937 (name "libdvdread")
938 (version "5.0.3")
939 (source (origin
940 (method url-fetch)
941 (uri (string-append "http://download.videolan.org/videolan/"
942 name "/" version "/"
943 name "-" version ".tar.bz2"))
944 (sha256
945 (base32
946 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
947 (build-system gnu-build-system)
948 (home-page "http://dvdnav.mplayerhq.hu/")
949 (synopsis "Library for reading video DVDs")
950 (description
951 "Libdvdread provides a simple foundation for reading DVD video
952 disks. It provides the functionality that is required to access many
953 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
954 authentication and descrambling (if an external libdvdcss library is
955 installed).")
956 (license license:gpl2+)))
957
958 (define-public libdvdnav
959 (package
960 (name "libdvdnav")
961 (version "5.0.3")
962 (source (origin
963 (method url-fetch)
964 (uri (string-append "http://download.videolan.org/videolan/"
965 name "/" version "/"
966 name "-" version ".tar.bz2"))
967 (sha256
968 (base32
969 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
970 (build-system gnu-build-system)
971 (native-inputs
972 `(("pkg-config" ,pkg-config)))
973 (inputs
974 `(("libdvdread" ,libdvdread)))
975 (home-page "http://dvdnav.mplayerhq.hu/")
976 (synopsis "Library for video DVD navigation features")
977 (description
978 "Libdvdnav is a library for developers of multimedia
979 applications. It allows easy use of sophisticated DVD navigation features
980 such as DVD menus, multiangle playback and even interactive DVD games. All
981 this functionality is provided through a simple API which provides the DVD
982 playback as a single logical stream of blocks, intermitted by special
983 dvdnav events to report certain conditions. The main usage of libdvdnav is
984 a loop regularly calling a function to get the next block, surrounded by
985 additional calls to tell the library of user interaction. The whole
986 DVD virtual machine and internal playback states are completely
987 encapsulated.")
988 (license license:gpl2+)))
989
990 (define-public libdvdnav-4
991 (package
992 (inherit libdvdnav)
993 (version "4.2.1")
994 (source (origin
995 (method url-fetch)
996 (uri
997 (string-append
998 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
999 version ".tar.xz"))
1000 (sha256
1001 (base32
1002 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1003 (native-inputs
1004 `(("pkg-config" ,pkg-config)
1005 ("autoconf" ,autoconf)
1006 ("automake" ,automake)
1007 ("libtool" ,libtool)))
1008 (arguments
1009 '(#:phases
1010 (alist-cons-after
1011 'unpack 'autoreconf
1012 (lambda _
1013 (zero? (system* "autoreconf" "-vif")))
1014 %standard-phases)))))
1015
1016 (define-public libdvdcss
1017 (package
1018 (name "libdvdcss")
1019 (version "1.4.0")
1020 (source (origin
1021 (method url-fetch)
1022 (uri (string-append "http://download.videolan.org/pub/"
1023 name "/" version "/"
1024 name "-" version ".tar.bz2"))
1025 (sha256
1026 (base32
1027 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1028 (build-system gnu-build-system)
1029 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1030 (synopsis "Library for accessing DVDs as block devices")
1031 (description
1032 "libdvdcss is a simple library designed for accessing DVDs like a block
1033 device without having to bother about the decryption.")
1034 (license license:gpl2+)))
1035
1036 (define-public srt2vtt
1037 (package
1038 (name "srt2vtt")
1039 (version "0.1")
1040 (source (origin
1041 (method url-fetch)
1042 (uri (string-append
1043 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1044 version ".tar.gz"))
1045 (sha256
1046 (base32
1047 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1048 (build-system gnu-build-system)
1049 (inputs
1050 `(("guile" ,guile-2.0)))
1051 (synopsis "SubRip to WebVTT subtitle converter")
1052 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1053 for use with HTML5 video.")
1054 (home-page "http://dthompson.us/pages/software/srt2vtt")
1055 (license license:gpl3+)))
1056
1057 (define-public avidemux
1058 (package
1059 (name "avidemux")
1060 (version "2.6.10")
1061 (source (origin
1062 (method url-fetch)
1063 (uri (string-append
1064 "mirror://sourceforge/avidemux/avidemux_"
1065 version ".tar.gz"))
1066 (sha256
1067 (base32
1068 "1vas43bwb15q2wv3dpp7fgp8dc6szinmwl7i0ziq2vv5l2128v0p"))
1069 (patches (search-patches "avidemux-install-to-lib.patch"))))
1070 (build-system cmake-build-system)
1071 (native-inputs
1072 `(("pkg-config" ,pkg-config)))
1073 ;; FIXME: Once packaged, add libraries not found during the build.
1074 (inputs
1075 `(("alsa-lib" ,alsa-lib)
1076 ("fontconfig" ,fontconfig)
1077 ("freetype" ,freetype)
1078 ("fribidi" ,fribidi)
1079 ("glu" ,glu)
1080 ("jack" ,jack-1)
1081 ("lame" ,lame)
1082 ("libvorbis" ,libvorbis)
1083 ("libvpx" ,libvpx)
1084 ("libxv" ,libxv)
1085 ("perl" ,perl)
1086 ("pulseaudio" ,pulseaudio)
1087 ("python" ,python-wrapper)
1088 ("qt" ,qt)
1089 ("sdl" ,sdl)
1090 ("sqlite" ,sqlite)
1091 ("yasm" ,yasm)
1092 ("zlib" ,zlib)))
1093 (arguments
1094 `(#:tests? #f ; no check target
1095 #:phases
1096 ;; Make sure files inside the included ffmpeg tarball are
1097 ;; patch-shebanged.
1098 (alist-cons-before
1099 'patch-source-shebangs 'unpack-ffmpeg
1100 (lambda _
1101 (with-directory-excursion "avidemux_core/ffmpeg_package"
1102 (system* "tar" "xf" "ffmpeg-2.6.1.tar.bz2")
1103 (delete-file "ffmpeg-2.6.1.tar.bz2")))
1104 (alist-cons-after
1105 'patch-source-shebangs 'repack-ffmpeg
1106 (lambda _
1107 (with-directory-excursion "avidemux_core/ffmpeg_package"
1108 (substitute* "ffmpeg-2.6.1/configure"
1109 (("#! /bin/sh") (string-append "#!" (which "bash"))))
1110 (system* "tar" "cjf" "ffmpeg-2.6.1.tar.bz2" "ffmpeg-2.6.1"
1111 ;; avoid non-determinism in the archive
1112 "--sort=name" "--mtime=@0"
1113 "--owner=root:0" "--group=root:0")
1114 (delete-file-recursively "ffmpeg-2.6.1")))
1115 (alist-replace 'configure
1116 (lambda _
1117 ;; Copy-paste settings from the cmake build system.
1118 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1119 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")))
1120 (alist-replace 'build
1121 (lambda* (#:key inputs outputs #:allow-other-keys)
1122 (let*
1123 ((out (assoc-ref outputs "out"))
1124 (lib (string-append out "/lib"))
1125 (top (getcwd))
1126 (sdl (assoc-ref inputs "sdl"))
1127 (build_component
1128 (lambda* (component srcdir #:optional (args '()))
1129 (let ((builddir (string-append "build_" component)))
1130 (mkdir builddir)
1131 (with-directory-excursion builddir
1132 (zero? (and
1133 (apply system* "cmake"
1134 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1135 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1136 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1137 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1138 "\"-Wl,-rpath=" lib "\"")
1139 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1140 (string-append "-DSDL_INCLUDE_DIR="
1141 sdl "/include/SDL")
1142 (string-append "../" srcdir)
1143 "-DENABLE_QT5=True"
1144 args)
1145 (system* "make" "-j"
1146 (number->string (parallel-job-count)))
1147 (system* "make" "install"))))))))
1148 (mkdir out)
1149 (and (build_component "core" "avidemux_core")
1150 (build_component "cli" "avidemux/cli")
1151 (build_component "qt4" "avidemux/qt4")
1152 (build_component "plugins_common" "avidemux_plugins"
1153 '("-DPLUGIN_UI=COMMON"))
1154 (build_component "plugins_cli" "avidemux_plugins"
1155 '("-DPLUGIN_UI=CLI"))
1156 (build_component "plugins_qt4" "avidemux_plugins"
1157 '("-DPLUGIN_UI=QT4"))
1158 (build_component "plugins_settings" "avidemux_plugins"
1159 '("-DPLUGIN_UI=SETTINGS")))
1160 ;; Remove .exe and .dll file.
1161 (delete-file-recursively
1162 (string-append out "/share/ADM6_addons"))))
1163 (alist-delete 'install
1164 %standard-phases)))))))
1165 (home-page "http://fixounet.free.fr/avidemux/")
1166 (synopsis "Video editor")
1167 (description "Avidemux is a video editor designed for simple cutting,
1168 filtering and encoding tasks. It supports many file types, including AVI,
1169 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1170 can be automated using projects, job queue and powerful scripting
1171 capabilities.")
1172 ;; Software with various licenses is included, see License.txt.
1173 (license license:gpl2+)))
1174
1175 (define-public vapoursynth
1176 (package
1177 (name "vapoursynth")
1178 (version "32")
1179 (source (origin
1180 (method url-fetch)
1181 (uri (string-append
1182 "https://github.com/vapoursynth/vapoursynth/archive/R"
1183 version ".tar.gz"))
1184 (file-name (string-append name "-" version))
1185 (sha256
1186 (base32
1187 "1j08whj946v2kkpgxsfhpca8xf0ax9iqzn73wvwjx319p9j0ymp9"))))
1188 (build-system gnu-build-system)
1189 (native-inputs
1190 `(("autoconf" ,autoconf)
1191 ("automake" ,automake)
1192 ("cython" ,python-cython)
1193 ("libtool" ,libtool)
1194 ("pkg-config" ,pkg-config)
1195 ("python" ,python)
1196 ("yasm" ,yasm)))
1197 (inputs
1198 `(("ffmpeg" ,ffmpeg)
1199 ("libass" ,libass)
1200 ("tesseract-ocr" ,tesseract-ocr)
1201 ("zimg" ,zimg)))
1202 (arguments
1203 '(#:phases
1204 (modify-phases %standard-phases
1205 (add-after
1206 'unpack 'autogen
1207 (lambda _
1208 (zero? (system* "sh" "autogen.sh")))))))
1209 (home-page "http://www.vapoursynth.com/")
1210 (synopsis "Video processing framework")
1211 (description "VapourSynth is a C++ library and Python module for video
1212 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1213 multithreading, generalized colorspaces, per frame properties, and videos with
1214 format changes.")
1215 ;; As seen from the source files.
1216 (license license:lgpl2.1+)))
1217
1218 (define-public xvid
1219 (package
1220 (name "xvid")
1221 (version "1.3.4")
1222 (source (origin
1223 (method url-fetch)
1224 (uri (string-append
1225 "http://downloads.xvid.org/downloads/xvidcore-"
1226 version ".tar.bz2"))
1227 (sha256
1228 (base32
1229 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1230 (build-system gnu-build-system)
1231 (native-inputs `(("yasm" ,yasm)))
1232 (arguments
1233 '(#:phases
1234 (modify-phases %standard-phases
1235 (add-before
1236 'configure 'pre-configure
1237 (lambda _
1238 (chdir "build/generic")
1239 (substitute* "configure"
1240 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1241 ;; No 'check' target.
1242 #:tests? #f))
1243 (home-page "https://www.xvid.com/")
1244 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1245 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1246 codec library. It uses ASP features such as b-frames, global and quarter
1247 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1248 and custom quantization matrices.")
1249 (license license:gpl2+)))
1250
1251 (define-public livestreamer
1252 (package
1253 (name "livestreamer")
1254 (version "1.12.2")
1255 (source (origin
1256 (method url-fetch)
1257 (uri (string-append
1258 "https://github.com/chrippa/livestreamer/archive/v"
1259 version ".tar.gz"))
1260 (file-name (string-append "livestreamer-" version ".tar.gz"))
1261 (sha256
1262 (base32
1263 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1264 (build-system python-build-system)
1265 (arguments
1266 '(#:tests? #f)) ; tests rely on external web servers
1267 (propagated-inputs
1268 `(("python-requests" ,python-requests)))
1269 (synopsis "Internet video stream viewer")
1270 (description "Livestreamer is a command-line utility that extracts streams
1271 from various services and pipes them into a video playing application.")
1272 (home-page "http://livestreamer.io/")
1273 (license license:bsd-2)))
1274
1275 (define-public mlt
1276 (package
1277 (name "mlt")
1278 (version "6.2.0")
1279 (source (origin
1280 (method url-fetch)
1281 (uri (string-append "https://github.com/mltframework/mlt/"
1282 "archive/v" version ".tar.gz"))
1283 (file-name (string-append name "-" version ".tar.gz"))
1284 (sha256
1285 (base32
1286 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
1287 (build-system gnu-build-system)
1288 (arguments
1289 `(#:tests? #f ; no tests
1290 #:make-flags '("CC=gcc")
1291 #:configure-flags
1292 (list "--enable-gpl3"
1293 "--enable-gpl")
1294 #:phases
1295 (modify-phases %standard-phases
1296 (add-after
1297 'configure 'override-LDFLAGS
1298 (lambda* (#:key outputs #:allow-other-keys)
1299 (substitute* "config.mak"
1300 (("LDFLAGS\\+=")
1301 (string-append "LDFLAGS+=-Wl,-rpath="
1302 (assoc-ref outputs "out")
1303 "/lib ")))
1304 #t)))))
1305 (inputs
1306 `(("alsa-lib" ,alsa-lib)
1307 ("fftw" ,fftw)
1308 ("libxml2" ,libxml2)
1309 ("jack" ,jack-1)
1310 ("ladspa" ,ladspa)
1311 ("libsamplerate" ,libsamplerate)
1312 ("pulseaudio" ,pulseaudio)
1313 ("sdl" ,sdl)
1314 ("sox" ,sox)))
1315 (native-inputs
1316 `(("pkg-config" ,pkg-config)))
1317 (home-page "https://www.mltframework.org/")
1318 (synopsis "Author, manage, and run multitrack audio/video compositions")
1319 (description
1320 "MLT is a multimedia framework, designed and developed for television
1321 broadcasting. It provides a toolkit for broadcasters, video editors, media
1322 players, transcoders, web streamers and many more types of applications. The
1323 functionality of the system is provided via an assortment of ready to use
1324 tools, XML authoring components, and an extensible plug-in based API.")
1325 (license license:lgpl2.1+)))
1326
1327 (define-public v4l-utils
1328 (package
1329 (name "v4l-utils")
1330 (version "1.10.0")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1334 "/v4l-utils-" version ".tar.bz2"))
1335 (sha256
1336 (base32
1337 "0srkwh3r6f0bkb4kp0d7i0mlmp8babs3qc22cdy1sw4awmzd5skq"))))
1338 (build-system gnu-build-system)
1339 (arguments
1340 '(#:configure-flags
1341 (list (string-append "--with-udevdir="
1342 (assoc-ref %outputs "out")
1343 "/lib/udev"))))
1344 (native-inputs
1345 `(("pkg-config" ,pkg-config)))
1346 (inputs
1347 `(("alsa-lib" ,alsa-lib)
1348 ("glu" ,glu)
1349 ("libjpeg" ,libjpeg)
1350 ("libx11" ,libx11)
1351 ("qt" ,qt)
1352 ("eudev" ,eudev)))
1353 (synopsis "Realtime video capture utilities for Linux")
1354 (description "The v4l-utils provide a series of libraries and utilities to
1355 be used for realtime video capture via Linux-specific APIs.")
1356 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1357 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1358 (license (list license:lgpl2.1+ license:gpl2))))
1359
1360 (define-public obs
1361 (package
1362 (name "obs")
1363 (version "0.14.2")
1364 (source (origin
1365 (method url-fetch)
1366 (uri (string-append "https://github.com/jp9000/obs-studio"
1367 "/archive/" version ".tar.gz"))
1368 (file-name (string-append name "-" version ".tar.gz"))
1369 (sha256
1370 (base32
1371 "1cb8naa67kfnnngkzv1wpd4y241j29ggnk1w7jgnymp9j8dny1xl"))))
1372 (build-system cmake-build-system)
1373 (arguments '(#:tests? #f)) ; no tests
1374 (native-inputs
1375 `(("pkg-config" ,pkg-config)))
1376 (inputs
1377 `(("curl" ,curl)
1378 ("eudev" ,eudev)
1379 ("ffmpeg" ,ffmpeg)
1380 ("freetype" ,freetype)
1381 ("jack" ,jack-1)
1382 ("jansson" ,jansson)
1383 ("libx264" ,libx264)
1384 ("libxcomposite" ,libxcomposite)
1385 ("mesa" ,mesa)
1386 ("pulseaudio" ,pulseaudio)
1387 ("qt" ,qt)
1388 ("v4l-utils" ,v4l-utils)
1389 ("zlib" ,zlib)))
1390 (synopsis "Live streaming software")
1391 (description "Open Broadcaster Software provides a graphical interface for
1392 video recording and live streaming. OBS supports capturing audio and video
1393 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1394 and JACK.")
1395 (home-page "https://obsproject.com")
1396 (license license:gpl2+)))
1397
1398 (define-public libvdpau
1399 (package
1400 (name "libvdpau")
1401 (version "1.1.1")
1402 (source
1403 (origin
1404 (method url-fetch)
1405 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1406 name "-" version ".tar.bz2"))
1407 (sha256
1408 (base32
1409 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1410 (build-system gnu-build-system)
1411 (native-inputs
1412 `(("pkg-config" ,pkg-config)))
1413 (inputs
1414 `(("dri2proto" ,dri2proto)
1415 ("libx11" ,libx11 "out")
1416 ("libxext" ,libxext)))
1417 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1418 (synopsis "Video Decode and Presentation API")
1419 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1420 provides an interface to video decode acceleration and presentation hardware
1421 present in modern GPUs.")
1422 (license (license:x11-style "file://COPYING"))))
1423
1424 (define-public vdpauinfo
1425 (package
1426 (name "vdpauinfo")
1427 (version "1.0")
1428 (source
1429 (origin
1430 (method url-fetch)
1431 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1432 name "-" version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1436 (build-system gnu-build-system)
1437 (native-inputs
1438 `(("pkg-config" ,pkg-config)
1439 ("libx11" ,libx11)))
1440 (propagated-inputs
1441 `(("libvdpau" ,libvdpau)))
1442 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1443 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1444 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1445 implementation.")
1446 (license (license:x11-style "file://COPYING"))))
1447
1448 (define-public recordmydesktop
1449 (package
1450 (name "recordmydesktop")
1451 (version "0.3.8.1")
1452 (source (origin
1453 (method url-fetch)
1454 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1455 version "/recordmydesktop-" version ".tar.gz"))
1456 (sha256
1457 (base32
1458 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1459 (build-system gnu-build-system)
1460 (inputs `(("popt" ,popt)
1461 ("zlib" ,zlib)
1462 ("libx11" ,libx11)
1463 ("libice" ,libice)
1464 ("libsm" ,libsm)
1465 ("libxfixes" ,libxfixes)
1466 ("libxdamage" ,libxdamage)
1467 ("libxext" ,libxext)
1468 ("libvorbis" ,libvorbis)
1469 ("libtheora" ,libtheora)))
1470 (home-page "http://recordmydesktop.sourceforge.net/")
1471 (synopsis "Desktop session video recorder")
1472 (description
1473 "recordMyDesktop is a command-line tool that captures the activity in
1474 your graphical desktop and encodes it as a video. This is a useful tool for
1475 making @dfn{screencasts}.")
1476 (license license:gpl2+)))