gnu: avidemux: Use 'modify-phases'.
[jackhill/guix/guix.git] / gnu / packages / video.scm
CommitLineData
39efcc9b 1;;; GNU Guix --- Functional package management for GNU
71ee51a0 2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
945d985a 3;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
ca3f9952 4;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
26da7c26 6;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
307ad140 8;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
2ad9515c 9;;; Copyright © 2015 Alex Vong <alexvong1995@gmail.com>
39efcc9b
AE
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)
fe138965 27 #:use-module (ice-9 match)
ae0bdd81 28 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 29 #:use-module (guix utils)
39efcc9b
AE
30 #:use-module (guix packages)
31 #:use-module (guix download)
38829eac 32 #:use-module (guix git-download)
44726031 33 #:use-module (guix build-system cmake)
39efcc9b 34 #:use-module (guix build-system gnu)
615215a5 35 #:use-module (guix build-system python)
1c1178cd 36 #:use-module (guix build-system waf)
3b02429c 37 #:use-module (gnu packages)
39efcc9b 38 #:use-module (gnu packages algebra)
72bfebf5 39 #:use-module (gnu packages audio)
f1044010 40 #:use-module (gnu packages autotools)
d5a748e8 41 #:use-module (gnu packages avahi)
38829eac 42 #:use-module (gnu packages base)
d5a748e8 43 #:use-module (gnu packages cdrom)
39efcc9b 44 #:use-module (gnu packages compression)
f464016d 45 #:use-module (gnu packages curl)
44726031 46 #:use-module (gnu packages databases)
f22e0e26 47 #:use-module (gnu packages elf)
39efcc9b 48 #:use-module (gnu packages fontutils)
44726031
AE
49 #:use-module (gnu packages fribidi)
50 #:use-module (gnu packages gettext)
38829eac 51 #:use-module (gnu packages ghostscript)
d5a748e8
AE
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages glib)
2cd85cf9 54 #:use-module (gnu packages guile)
d5a748e8 55 #:use-module (gnu packages gnupg)
44726031 56 #:use-module (gnu packages gtk)
e55354b8 57 #:use-module (gnu packages image)
d5a748e8
AE
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages lua)
60 #:use-module (gnu packages mp3)
4d94b93c 61 #:use-module (gnu packages ncurses)
6f6c8b65 62 #:use-module (gnu packages ocr)
39efcc9b
AE
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
a7d94b54 65 #:use-module (gnu packages popt)
d5a748e8 66 #:use-module (gnu packages pulseaudio)
39efcc9b 67 #:use-module (gnu packages python)
d5a748e8
AE
68 #:use-module (gnu packages qt)
69 #:use-module (gnu packages sdl)
70 #:use-module (gnu packages ssh)
6b2c6be0 71 #:use-module (gnu packages texinfo)
c426e61e 72 #:use-module (gnu packages textutils)
a7fd7b68 73 #:use-module (gnu packages tls)
d5a748e8 74 #:use-module (gnu packages version-control)
bb470bd3 75 #:use-module (gnu packages web)
ee3b55ea 76 #:use-module (gnu packages xdisorg)
54ff0b7d 77 #:use-module (gnu packages xiph)
d5a748e8
AE
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
44726031
AE
80 #:use-module (gnu packages yasm)
81 #:use-module (gnu packages zip))
39efcc9b 82
6b2c6be0
SB
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
3a4de6b2 102 (replace 'configure
014cbde6 103 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
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)
014cbde6 111 (string-append "--build=" build)
6b2c6be0
SB
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.
118In fact, there is no graphical output possible. AA-lib replaces those
119old-fashioned output methods with powerful ascii-art renderer.")
120 (license license:lgpl2.0+)))
121
cda163cd
TUBK
122(define-public liba52
123 (package
124 (name "liba52")
125 (version "0.7.4")
126 (source (origin
127 (method url-fetch)
8c056935
TUBK
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"))
cda163cd
TUBK
133 (sha256
134 (base32
23da88f6 135 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
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"))))
cda163cd 140 (build-system gnu-build-system)
23da88f6
MW
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)))
412a2422 146 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
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")))))))
cda163cd
TUBK
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
157A/52 standard is used in a variety of applications, including digital
158television and DVD. It is also known as AC-3.")
ae0bdd81 159 (license license:gpl2+)))
cda163cd 160
e0884109
MW
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
82712597
MW
188(define-public libx264
189 (package
190 (name "libx264")
466a7d70 191 (version "20160220-2245")
82712597
MW
192 (source (origin
193 (method url-fetch)
735e84c7 194 (uri (string-append "http://download.videolan.org/pub/x264/snapshots/"
82712597
MW
195 "x264-snapshot-" version ".tar.bz2"))
196 (sha256
197 (base32
466a7d70 198 "12zyzbiihfhamf7yi4qqaj6k0nisnrydvfr36kxadvmsm7dg4sj3"))))
82712597
MW
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
216H.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
c426e61e
TUBK
225(define-public libass
226 (package
227 (name "libass")
97206519 228 (version "0.13.2")
c426e61e
TUBK
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
97206519 236 "1kpsw4zw95v4cjvild9wpk73dzavn1khsm3bm32kcz6amnkd166n"))))
c426e61e
TUBK
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
250ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 251 (license license:isc)))
c426e61e 252
4d94b93c
TUBK
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
276pixels, so that it can work on older video cards or text terminals. It
277supports Unicode, 2048 colors, dithering of color images, and advanced text
278canvas operations.")
ae0bdd81 279 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
4d94b93c 280
3bfb78dc
TUBK
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
297streams.")
ae0bdd81 298 (license license:gpl2+)))
3bfb78dc 299
99d4c455
TUBK
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
317video, the encoding format used by most digital camcorders, typically those
318that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
319developed according to the official standards for DV video: IEC 61834 and
320SMPTE 314M.")
ae0bdd81 321 (license license:lgpl2.1+)))
99d4c455 322
ee3b55ea
TUBK
323(define-public libva
324 (package
325 (name "libva")
26fceae2 326 (version "1.6.1")
ee3b55ea
TUBK
327 (source
328 (origin
329 (method url-fetch)
330 (uri (string-append
5cc3096c 331 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
ee3b55ea
TUBK
332 version".tar.bz2"))
333 (sha256
26fceae2 334 (base32 "0bjfb5s8dk3lql843l91ffxzlq47isqks5sj19cxh7j3nhzw58kz"))))
ee3b55ea
TUBK
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)))
372cf039
TUBK
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"))))
26fceae2 365 (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
366 (synopsis "Video acceleration library")
367 (description "The main motivation for VA-API (Video Acceleration API) is
368to enable hardware accelerated video decode/encode at various
369entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
370standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 371 (license license:expat)))
ee3b55ea 372
39efcc9b
AE
373(define-public ffmpeg
374 (package
375 (name "ffmpeg")
702bfbf1 376 (version "3.0.2")
39efcc9b
AE
377 (source (origin
378 (method url-fetch)
a1121a7f
EF
379 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
380 version ".tar.xz"))
39efcc9b
AE
381 (sha256
382 (base32
702bfbf1 383 "08sjp4dxgcinmv9ly7nm24swmn2cnbbhvph44ihlplf4n33kr542"))))
39efcc9b
AE
384 (build-system gnu-build-system)
385 (inputs
c4c4cc05 386 `(("fontconfig" ,fontconfig)
39efcc9b 387 ("freetype" ,freetype)
c8dab7f4 388 ("gnutls" ,gnutls)
e816b348 389 ("opus" ,opus)
71241192 390 ("ladspa" ,ladspa)
d4f12db8 391 ("lame" ,lame)
c426e61e 392 ("libass" ,libass)
5d3609e4 393 ("libbluray" ,libbluray)
4d94b93c 394 ("libcaca" ,libcaca)
cc6c0170 395 ("libcdio-paranoia" ,libcdio-paranoia)
39efcc9b 396 ("libtheora" ,libtheora)
f88f0d20 397 ("libvdpau" ,libvdpau)
39efcc9b 398 ("libvorbis" ,libvorbis)
dc55b8b2 399 ("libvpx" ,libvpx)
f88f0d20 400 ("libx11" ,libx11)
549381d6 401 ("libx264" ,libx264)
f88f0d20 402 ("mesa" ,mesa)
71241192 403 ("openal" ,openal)
71241192 404 ("pulseaudio" ,pulseaudio)
72bfebf5 405 ("soxr" ,soxr)
c4c4cc05 406 ("speex" ,speex)
72bfebf5 407 ("twolame" ,twolame)
67932f86 408 ("xvid" ,xvid)
b3546174 409 ("zlib" ,zlib)))
c4c4cc05
JD
410 (native-inputs
411 `(("bc" ,bc)
39efcc9b
AE
412 ("perl" ,perl)
413 ("pkg-config" ,pkg-config)
824d9dc3 414 ("texinfo" ,texinfo)
39efcc9b
AE
415 ("python" ,python-2) ; scripts use interpreter python2
416 ("speex" ,speex)
c4c4cc05 417 ("yasm" ,yasm)))
39efcc9b 418 (arguments
31f9322e 419 `(#:test-target "fate"
12f92e38
AP
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
12f92e38
AP
469 '("--enable-avresample"
470 "--enable-gpl" ; enable optional gpl licensed parts
471 "--enable-shared"
472 "--enable-fontconfig"
c8dab7f4 473 "--enable-gnutls"
12f92e38
AP
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"
12f92e38
AP
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"
f88f0d20
EF
492 "--enable-opengl"
493 "--enable-x11grab"
12f92e38
AP
494
495 "--enable-runtime-cpudetect"
496
497 ;; Runtime cpu detection is not implemented on
498 ;; MIPS, so we disable some features.
499 "--disable-mips32r2"
c5e1fcd0 500 "--disable-mipsdsp"
12f92e38
AP
501 "--disable-mipsdspr2"
502 "--disable-mipsfpu")
31f9322e 503 #:phases
f2feb0ce
LC
504 (modify-phases %standard-phases
505 (replace
39efcc9b
AE
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"))
12f92e38
AP
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)))))
457e528e
LC
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)
27350ef8 531 #t))))))
702bfbf1 532 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
533 (synopsis "Audio and video framework")
534 (description "FFmpeg is a complete, cross-platform solution to record,
535convert and stream audio and video. It includes the libavcodec
536audio/video codec library.")
ae0bdd81 537 (license license:gpl2+)))
d5a748e8 538
940778c7
LC
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
d5a748e8
AE
559(define-public vlc
560 (package
561 (name "vlc")
a134cc8e 562 (version "2.2.4")
d5a748e8
AE
563 (source (origin
564 (method url-fetch)
565 (uri (string-append
a134cc8e 566 "https://download.videolan.org/pub/videolan/vlc/"
d5a748e8
AE
567 version "/vlc-" version ".tar.xz"))
568 (sha256
569 (base32
a134cc8e 570 "1gjkrwlg8ab3skzl67cxb9qzg4187ifckd1z9kpy11q058fyjchn"))
4ef2721b
LC
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\"")))))
d5a748e8
AE
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)
b4dff935 588 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
d5a748e8
AE
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)
a134cc8e
EF
612 ("qtbase" ,qtbase)
613 ;("qtx11extras" ,qtx11extras)
d5a748e8
AE
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
d5a748e8
AE
621 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
622 (assoc-ref %build-inputs "ffmpeg")
cd76fbde
LC
623 "/lib")) ;needed for the tests
624
625 #:phases
626 (modify-phases %standard-phases
a134cc8e
EF
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))
cd76fbde
LC
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))))))))
d5a748e8
AE
654 (home-page "https://www.videolan.org/")
655 (synopsis "Audio and video framework")
656 (description "VLC is a cross-platform multimedia player and framework
657that plays most multimedia files as well as DVD, Audio CD, VCD, and various
658treaming protocols.")
ae0bdd81 659 (license license:gpl2+)))
ace69243
AE
660
661(define-public mplayer
662 (package
663 (name "mplayer")
e71b20e5 664 (version "1.3.0")
ace69243
AE
665 (source (origin
666 (method url-fetch)
667 (uri (string-append
ebde7c7a 668 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
669 version ".tar.xz"))
670 (sha256
671 (base32
e71b20e5 672 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
ace69243
AE
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)
b3546174 680 ("ffmpeg" ,ffmpeg)
778a6a8b 681 ("fontconfig" ,fontconfig)
ace69243 682 ("freetype" ,freetype)
778a6a8b 683;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
ace69243 684 ("lame" ,lame)
778a6a8b 685 ("libass" ,libass)
b3546174
MW
686 ("libdvdcss" ,libdvdcss)
687 ("libdvdnav" ,libdvdnav)
ace69243 688 ("libjpeg" ,libjpeg)
778a6a8b
EF
689 ("libmpeg2" ,libmpeg2)
690 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
691 ("libpng" ,libpng)
692 ("libtheora" ,libtheora)
778a6a8b 693 ("libvdpau" ,libvdpau)
ace69243
AE
694 ("libvorbis" ,libvorbis)
695 ("libx11" ,libx11)
778a6a8b 696 ("libx264" ,libx264)
ace69243
AE
697 ("libxinerama" ,libxinerama)
698 ("libxv" ,libxv)
778a6a8b 699 ("libxxf86dga" ,libxxf86dga)
ace69243 700 ("mesa" ,mesa)
778a6a8b 701 ("opus" ,opus)
ace69243
AE
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
ebde7c7a
EF
712 (modify-phases %standard-phases
713 (replace 'configure
ace69243
AE
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
ebde7c7a 727 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 728 (string-append "--prefix=" out)
fe138965
MW
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"
f0d6d835
MW
740 '("--target=mips3-linux"))
741 (_ (list (string-append
742 "--target="
743 (or (%current-target-system)
744 (nix-system->gnu-triplet
745 (%current-system)))))))
ebde7c7a
EF
746 "--disable-iwmmxt"))))))))
747 (home-page "https://www.mplayerhq.hu/design7/news.html")
ace69243
AE
748 (synopsis "Audio and video player")
749 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
750Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
751NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
752SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 753 (license license:gpl2)))
d0ed39be 754
1c1178cd
TUBK
755(define-public mpv
756 (package
757 (name "mpv")
ad25a1fa 758 (version "0.17.0")
1c1178cd
TUBK
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
ad25a1fa 766 "0vms3viwqcwl1mrgmf2yy4c69fvv7xpbkyrl693l6zpwynqd4b30"))
1c1178cd
TUBK
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)))
81c29ccc 773 ;; Missing features: libguess, Wayland, V4L2
1c1178cd
TUBK
774 (inputs
775 `(("alsa-lib" ,alsa-lib)
776 ("enca" ,enca)
777 ("ffmpeg" ,ffmpeg)
2d8781a4 778 ("jack" ,jack-1)
1c1178cd
TUBK
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)
81c29ccc 790 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
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)
1c1178cd
TUBK
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.
54567afa 807 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.12")
1c1178cd
TUBK
808 (sha256
809 (base32
54567afa 810 "12y9c352zwliw0zk9jm2lhynsjcf5jy0k1qch1c1av8hnbm2pgq1"))))
1c1178cd
TUBK
811 ("youtube-dl" ,youtube-dl)
812 ("zlib" ,zlib)))
813 (arguments
814 '(#:phases
815 (modify-phases %standard-phases
816 (add-before
f8503e2b 817 'configure 'setup-waf
1c1178cd
TUBK
818 (lambda* (#:key inputs #:allow-other-keys)
819 (copy-file (assoc-ref inputs "waf") "waf")
599fd842 820 (setenv "CC" "gcc"))))
81c29ccc 821 #:configure-flags (list "--enable-gpl3" "--enable-zsh-comp")
1c1178cd
TUBK
822 ;; No check function defined.
823 #:tests? #f))
581873b5 824 (home-page "https://mpv.io/")
1c1178cd
TUBK
825 (synopsis "Audio and video player")
826 (description "mpv is a general-purpose audio and video player. It is a
827fork of mplayer2 and MPlayer. It shares some features with the former
828projects while introducing many more.")
ae0bdd81 829 (license license:gpl2+)))
1c1178cd 830
d0ed39be
DT
831(define-public libvpx
832 (package
833 (name "libvpx")
fb197c0d 834 (version "1.5.0")
d0ed39be
DT
835 (source (origin
836 (method url-fetch)
723e8866
MW
837 (uri (string-append "http://storage.googleapis.com/"
838 "downloads.webmproject.org/releases/webm/"
839 name "-" version ".tar.bz2"))
d0ed39be
DT
840 (sha256
841 (base32
c7c49446
MW
842 "15v7qw0ydyxn08ksb6lxn1l51pxgpwgshdwd3275yrr5hs86fv9h"))
843 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
844 (build-system gnu-build-system)
845 (arguments
0e47b4e7
EF
846 `(#:phases
847 (modify-phases %standard-phases
848 (replace 'configure
849 (lambda* (#:key outputs #:allow-other-keys)
850 (setenv "CONFIG_SHELL" (which "bash"))
851 (let ((out (assoc-ref outputs "out")))
852 (setenv "LDFLAGS"
853 (string-append "-Wl,-rpath=" out "/lib"))
854 (zero? (system* "./configure"
855 "--enable-shared"
856 "--as=yasm"
857 ;; Limit size to avoid CVE-2015-1258
858 "--size-limit=16384x16384"
859 (string-append "--prefix=" out)))))))
4f8f15cd 860 #:tests? #f)) ; no check target
d0ed39be
DT
861 (native-inputs
862 `(("perl" ,perl)
863 ("yasm" ,yasm)))
864 (synopsis "VP8/VP9 video codec")
865 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 866 (license license:bsd-3)
d0ed39be 867 (home-page "http://www.webmproject.org/")))
615215a5
LC
868
869(define-public youtube-dl
870 (package
871 (name "youtube-dl")
feb5c554 872 (version "2016.06.14")
615215a5
LC
873 (source (origin
874 (method url-fetch)
feb5c554 875 (uri (string-append "https://youtube-dl.org/downloads/"
615215a5
LC
876 version "/youtube-dl-"
877 version ".tar.gz"))
878 (sha256
879 (base32
feb5c554 880 "0fmvpqipc1xwagvk7ih4slmv1xz1rb6s8wpndhypwvrq4pnnm9ns"))))
615215a5 881 (build-system python-build-system)
feb5c554 882 (home-page "https://youtube-dl.org")
2ad9515c
AV
883 (arguments
884 ;; The problem here is that the directory for the man page and completion
885 ;; files is relative, and for some reason, setup.py uses the
886 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
887 ;; So, we need pass the prefix directly. In addition, make sure the Bash
888 ;; completion file is called 'youtube-dl' rather than
889 ;; 'youtube-dl.bash-completion'.
890 `(#:phases (modify-phases %standard-phases
891 (add-before 'install 'fix-the-data-directories
892 (lambda* (#:key outputs #:allow-other-keys)
893 (let ((prefix (assoc-ref outputs "out")))
894 (mkdir "bash-completion")
895 (rename-file "youtube-dl.bash-completion"
896 "bash-completion/youtube-dl")
897 (substitute* "setup.py"
898 (("youtube-dl\\.bash-completion")
899 "bash-completion/youtube-dl")
900 (("'etc/")
901 (string-append "'" prefix "/etc/"))
902 (("'share/")
903 (string-append "'" prefix "/share/")))))))))
615215a5
LC
904 (synopsis "Download videos from YouTube.com and other sites")
905 (description
b798dfde 906 "Youtube-dl is a small command-line program to download videos from
615215a5 907YouTube.com and a few more sites.")
ae0bdd81 908 (license license:public-domain)))
e6bdb36a 909
5d3609e4
TUBK
910(define-public libbluray
911 (package
912 (name "libbluray")
59eef6f2 913 (version "0.9.2")
5d3609e4
TUBK
914 (source (origin
915 (method url-fetch)
916 (uri (string-append "http://download.videolan.org/videolan/"
917 name "/" version "/"
918 name "-" version ".tar.bz2"))
919 (sha256
920 (base32
59eef6f2 921 "1sp71j4agcsg17g6b85cqz78pn5vknl5pl39rvr6mkib5ps99jgg"))))
5d3609e4 922 (build-system gnu-build-system)
2da45ebe
EF
923 (arguments `(#:configure-flags '("--disable-bdjava")))
924 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 925 (inputs
71ee51a0 926 `(("fontconfig" ,fontconfig)
5d3609e4 927 ("freetype" ,freetype)
71ee51a0 928 ("libxml2" ,libxml2)))
5d3609e4
TUBK
929 (home-page "http://www.videolan.org/developers/libbluray.html")
930 (synopsis "Blu-Ray Disc playback library")
931 (description
932 "libbluray is a library designed for Blu-Ray Disc playback for media
933players, like VLC or MPlayer.")
ae0bdd81 934 (license license:lgpl2.1+)))
5d3609e4 935
e6bdb36a
AE
936(define-public libdvdread
937 (package
938 (name "libdvdread")
9aebf330 939 (version "5.0.3")
e6bdb36a
AE
940 (source (origin
941 (method url-fetch)
942 (uri (string-append "http://download.videolan.org/videolan/"
943 name "/" version "/"
944 name "-" version ".tar.bz2"))
945 (sha256
946 (base32
9aebf330 947 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
e6bdb36a
AE
948 (build-system gnu-build-system)
949 (home-page "http://dvdnav.mplayerhq.hu/")
950 (synopsis "Library for reading video DVDs")
951 (description
952 "Libdvdread provides a simple foundation for reading DVD video
953disks. It provides the functionality that is required to access many
954DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
955authentication and descrambling (if an external libdvdcss library is
956installed).")
ae0bdd81 957 (license license:gpl2+)))
b027d919
AE
958
959(define-public libdvdnav
960 (package
961 (name "libdvdnav")
734976b6 962 (version "5.0.3")
b027d919
AE
963 (source (origin
964 (method url-fetch)
965 (uri (string-append "http://download.videolan.org/videolan/"
966 name "/" version "/"
967 name "-" version ".tar.bz2"))
968 (sha256
969 (base32
734976b6 970 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
b027d919
AE
971 (build-system gnu-build-system)
972 (native-inputs
973 `(("pkg-config" ,pkg-config)))
974 (inputs
975 `(("libdvdread" ,libdvdread)))
976 (home-page "http://dvdnav.mplayerhq.hu/")
977 (synopsis "Library for video DVD navigation features")
978 (description
979 "Libdvdnav is a library for developers of multimedia
980applications. It allows easy use of sophisticated DVD navigation features
981such as DVD menus, multiangle playback and even interactive DVD games. All
982this functionality is provided through a simple API which provides the DVD
983playback as a single logical stream of blocks, intermitted by special
984dvdnav events to report certain conditions. The main usage of libdvdnav is
985a loop regularly calling a function to get the next block, surrounded by
986additional calls to tell the library of user interaction. The whole
987DVD virtual machine and internal playback states are completely
988encapsulated.")
ae0bdd81 989 (license license:gpl2+)))
2cd85cf9 990
f1044010
TUBK
991(define-public libdvdnav-4
992 (package
993 (inherit libdvdnav)
994 (version "4.2.1")
995 (source (origin
996 (method url-fetch)
997 (uri
998 (string-append
999 "http://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1000 version ".tar.xz"))
1001 (sha256
1002 (base32
1003 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1004 (native-inputs
1005 `(("pkg-config" ,pkg-config)
1006 ("autoconf" ,autoconf)
1007 ("automake" ,automake)
1008 ("libtool" ,libtool)))
1009 (arguments
1010 '(#:phases
1011 (alist-cons-after
1012 'unpack 'autoreconf
1013 (lambda _
1014 (zero? (system* "autoreconf" "-vif")))
1015 %standard-phases)))))
1016
a6f710ec
TUBK
1017(define-public libdvdcss
1018 (package
1019 (name "libdvdcss")
98416109 1020 (version "1.4.0")
a6f710ec
TUBK
1021 (source (origin
1022 (method url-fetch)
98416109 1023 (uri (string-append "http://download.videolan.org/pub/"
a6f710ec
TUBK
1024 name "/" version "/"
1025 name "-" version ".tar.bz2"))
1026 (sha256
1027 (base32
98416109 1028 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
a6f710ec
TUBK
1029 (build-system gnu-build-system)
1030 (home-page "http://www.videolan.org/developers/libdvdcss.html")
1031 (synopsis "Library for accessing DVDs as block devices")
1032 (description
1033 "libdvdcss is a simple library designed for accessing DVDs like a block
1034device without having to bother about the decryption.")
ae0bdd81 1035 (license license:gpl2+)))
a6f710ec 1036
2cd85cf9
DT
1037(define-public srt2vtt
1038 (package
1039 (name "srt2vtt")
1040 (version "0.1")
1041 (source (origin
1042 (method url-fetch)
1043 (uri (string-append
1044 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1045 version ".tar.gz"))
1046 (sha256
1047 (base32
1048 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1049 (build-system gnu-build-system)
1050 (inputs
1051 `(("guile" ,guile-2.0)))
1052 (synopsis "SubRip to WebVTT subtitle converter")
1053 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1054for use with HTML5 video.")
1055 (home-page "http://dthompson.us/pages/software/srt2vtt")
ae0bdd81 1056 (license license:gpl3+)))
44726031
AE
1057
1058(define-public avidemux
1059 (package
1060 (name "avidemux")
9e786e8b 1061 (version "2.6.12")
44726031
AE
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append
1065 "mirror://sourceforge/avidemux/avidemux_"
1066 version ".tar.gz"))
1067 (sha256
1068 (base32
9e786e8b 1069 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
fc1adab1 1070 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
1071 (build-system cmake-build-system)
1072 (native-inputs
1073 `(("pkg-config" ,pkg-config)))
1074 ;; FIXME: Once packaged, add libraries not found during the build.
1075 (inputs
1076 `(("alsa-lib" ,alsa-lib)
1077 ("fontconfig" ,fontconfig)
1078 ("freetype" ,freetype)
1079 ("fribidi" ,fribidi)
1080 ("glu" ,glu)
44726031
AE
1081 ("jack" ,jack-1)
1082 ("lame" ,lame)
4cafe8ad
EF
1083 ("libva" ,libva)
1084 ("libvdpau" ,libvdpau)
44726031
AE
1085 ("libvorbis" ,libvorbis)
1086 ("libvpx" ,libvpx)
1087 ("libxv" ,libxv)
1088 ("perl" ,perl)
1089 ("pulseaudio" ,pulseaudio)
1090 ("python" ,python-wrapper)
aab56ab7 1091 ("qt" ,qt)
44726031
AE
1092 ("sdl" ,sdl)
1093 ("sqlite" ,sqlite)
1094 ("yasm" ,yasm)
1095 ("zlib" ,zlib)))
1096 (arguments
1097 `(#:tests? #f ; no check target
1098 #:phases
1099 ;; Make sure files inside the included ffmpeg tarball are
1100 ;; patch-shebanged.
1898900f
EF
1101 (modify-phases %standard-phases
1102 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1103 (lambda _
1104 (with-directory-excursion "avidemux_core/ffmpeg_package"
1105 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1106 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1107 (add-after 'patch-source-shebangs 'repack-ffmpeg
44726031
AE
1108 (lambda _
1109 (with-directory-excursion "avidemux_core/ffmpeg_package"
9e786e8b 1110 (substitute* "ffmpeg-2.7.6/configure"
44726031 1111 (("#! /bin/sh") (string-append "#!" (which "bash"))))
9e786e8b 1112 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
c09e6a5f 1113 ;; avoid non-determinism in the archive
92226a47
MW
1114 "--sort=name" "--mtime=@0"
1115 "--owner=root:0" "--group=root:0")
1898900f
EF
1116 (delete-file-recursively "ffmpeg-2.7.6"))))
1117 (replace 'configure
1118 (lambda _
1119 ;; Copy-paste settings from the cmake build system.
1120 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1121 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1122 (replace 'build
1123 (lambda* (#:key inputs outputs #:allow-other-keys)
1124 (let*
1125 ((out (assoc-ref outputs "out"))
1126 (lib (string-append out "/lib"))
1127 (top (getcwd))
1128 (sdl (assoc-ref inputs "sdl"))
1129 (build_component
1130 (lambda* (component srcdir #:optional (args '()))
1131 (let ((builddir (string-append "build_" component)))
1132 (mkdir builddir)
1133 (with-directory-excursion builddir
1134 (zero?
1135 (and
44726031
AE
1136 (apply system* "cmake"
1137 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1138 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1139 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
c687f731
AE
1140 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1141 "\"-Wl,-rpath=" lib "\"")
44726031
AE
1142 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1143 (string-append "-DSDL_INCLUDE_DIR="
1144 sdl "/include/SDL")
1145 (string-append "../" srcdir)
aab56ab7 1146 "-DENABLE_QT5=True"
44726031 1147 args)
1898900f
EF
1148 (system* "make" "-j"
1149 (number->string (parallel-job-count)))
1150 (system* "make" "install"))))))))
1151 (mkdir out)
1152 (and (build_component "core" "avidemux_core")
1153 (build_component "cli" "avidemux/cli")
1154 (build_component "qt4" "avidemux/qt4")
1155 (build_component "plugins_common" "avidemux_plugins"
1156 '("-DPLUGIN_UI=COMMON"))
1157 (build_component "plugins_cli" "avidemux_plugins"
1158 '("-DPLUGIN_UI=CLI"))
1159 (build_component "plugins_qt4" "avidemux_plugins"
1160 '("-DPLUGIN_UI=QT4"))
1161 (build_component "plugins_settings" "avidemux_plugins"
1162 '("-DPLUGIN_UI=SETTINGS")))
1163 ;; Remove .exe and .dll file.
1164 (delete-file-recursively
1165 (string-append out "/share/ADM6_addons")))))
1166 (delete 'install))))
44726031
AE
1167 (home-page "http://fixounet.free.fr/avidemux/")
1168 (synopsis "Video editor")
1169 (description "Avidemux is a video editor designed for simple cutting,
1170filtering and encoding tasks. It supports many file types, including AVI,
1171DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1172can be automated using projects, job queue and powerful scripting
1173capabilities.")
1174 ;; Software with various licenses is included, see License.txt.
ae0bdd81 1175 (license license:gpl2+)))
44726031 1176
6f6c8b65
TUBK
1177(define-public vapoursynth
1178 (package
1179 (name "vapoursynth")
f80d5fe0 1180 (version "32")
6f6c8b65
TUBK
1181 (source (origin
1182 (method url-fetch)
1183 (uri (string-append
1184 "https://github.com/vapoursynth/vapoursynth/archive/R"
1185 version ".tar.gz"))
f673552c 1186 (file-name (string-append name "-" version))
6f6c8b65
TUBK
1187 (sha256
1188 (base32
f80d5fe0 1189 "1j08whj946v2kkpgxsfhpca8xf0ax9iqzn73wvwjx319p9j0ymp9"))))
6f6c8b65
TUBK
1190 (build-system gnu-build-system)
1191 (native-inputs
1192 `(("autoconf" ,autoconf)
1193 ("automake" ,automake)
1194 ("cython" ,python-cython)
1195 ("libtool" ,libtool)
1196 ("pkg-config" ,pkg-config)
1197 ("python" ,python)
1198 ("yasm" ,yasm)))
1199 (inputs
1200 `(("ffmpeg" ,ffmpeg)
1201 ("libass" ,libass)
f80d5fe0
EF
1202 ("tesseract-ocr" ,tesseract-ocr)
1203 ("zimg" ,zimg)))
6f6c8b65
TUBK
1204 (arguments
1205 '(#:phases
1206 (modify-phases %standard-phases
1207 (add-after
f8503e2b 1208 'unpack 'autogen
6f6c8b65
TUBK
1209 (lambda _
1210 (zero? (system* "sh" "autogen.sh")))))))
1211 (home-page "http://www.vapoursynth.com/")
1212 (synopsis "Video processing framework")
1213 (description "VapourSynth is a C++ library and Python module for video
1214manipulation. It aims to be a modern rewrite of Avisynth, supporting
1215multithreading, generalized colorspaces, per frame properties, and videos with
1216format changes.")
1217 ;; As seen from the source files.
ae0bdd81 1218 (license license:lgpl2.1+)))
6f6c8b65 1219
67932f86
TUBK
1220(define-public xvid
1221 (package
1222 (name "xvid")
e05035c7 1223 (version "1.3.4")
67932f86
TUBK
1224 (source (origin
1225 (method url-fetch)
1226 (uri (string-append
1227 "http://downloads.xvid.org/downloads/xvidcore-"
1228 version ".tar.bz2"))
1229 (sha256
1230 (base32
e05035c7 1231 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
67932f86
TUBK
1232 (build-system gnu-build-system)
1233 (native-inputs `(("yasm" ,yasm)))
1234 (arguments
1235 '(#:phases
62fe2d47
EF
1236 (modify-phases %standard-phases
1237 (add-before
1238 'configure 'pre-configure
1239 (lambda _
1240 (chdir "build/generic")
1241 (substitute* "configure"
1242 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
67932f86
TUBK
1243 ;; No 'check' target.
1244 #:tests? #f))
1245 (home-page "https://www.xvid.com/")
1246 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1247 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1248codec library. It uses ASP features such as b-frames, global and quarter
1249pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1250and custom quantization matrices.")
ae0bdd81 1251 (license license:gpl2+)))
e16fde14
DT
1252
1253(define-public livestreamer
1254 (package
1255 (name "livestreamer")
68e88a09 1256 (version "1.12.2")
e16fde14
DT
1257 (source (origin
1258 (method url-fetch)
1259 (uri (string-append
1260 "https://github.com/chrippa/livestreamer/archive/v"
1261 version ".tar.gz"))
1262 (file-name (string-append "livestreamer-" version ".tar.gz"))
1263 (sha256
1264 (base32
68e88a09 1265 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
e16fde14
DT
1266 (build-system python-build-system)
1267 (arguments
1268 '(#:tests? #f)) ; tests rely on external web servers
e16fde14 1269 (propagated-inputs
5b9fe59f 1270 `(("python-requests" ,python-requests)))
e16fde14
DT
1271 (synopsis "Internet video stream viewer")
1272 (description "Livestreamer is a command-line utility that extracts streams
1273from various services and pipes them into a video playing application.")
1274 (home-page "http://livestreamer.io/")
1275 (license license:bsd-2)))
307ad140
RW
1276
1277(define-public mlt
1278 (package
1279 (name "mlt")
4c7729dc 1280 (version "6.2.0")
307ad140
RW
1281 (source (origin
1282 (method url-fetch)
4c7729dc
EF
1283 (uri (string-append "https://github.com/mltframework/mlt/"
1284 "archive/v" version ".tar.gz"))
1285 (file-name (string-append name "-" version ".tar.gz"))
307ad140
RW
1286 (sha256
1287 (base32
4c7729dc 1288 "1zwzfgxrcbwkxnkiwv0a1rzxdnnaly90yyarl9wdw84nx11ffbnx"))))
307ad140
RW
1289 (build-system gnu-build-system)
1290 (arguments
1291 `(#:tests? #f ; no tests
1292 #:make-flags '("CC=gcc")
1293 #:configure-flags
1294 (list "--enable-gpl3"
1295 "--enable-gpl")
1296 #:phases
1297 (modify-phases %standard-phases
1298 (add-after
1299 'configure 'override-LDFLAGS
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 (substitute* "config.mak"
1302 (("LDFLAGS\\+=")
1303 (string-append "LDFLAGS+=-Wl,-rpath="
1304 (assoc-ref outputs "out")
1305 "/lib ")))
1306 #t)))))
1307 (inputs
1308 `(("alsa-lib" ,alsa-lib)
1309 ("fftw" ,fftw)
1310 ("libxml2" ,libxml2)
1311 ("jack" ,jack-1)
1312 ("ladspa" ,ladspa)
1313 ("libsamplerate" ,libsamplerate)
4c7729dc 1314 ("pulseaudio" ,pulseaudio)
307ad140
RW
1315 ("sdl" ,sdl)
1316 ("sox" ,sox)))
1317 (native-inputs
1318 `(("pkg-config" ,pkg-config)))
4c7729dc 1319 (home-page "https://www.mltframework.org/")
307ad140
RW
1320 (synopsis "Author, manage, and run multitrack audio/video compositions")
1321 (description
1322 "MLT is a multimedia framework, designed and developed for television
1323broadcasting. It provides a toolkit for broadcasters, video editors, media
1324players, transcoders, web streamers and many more types of applications. The
1325functionality of the system is provided via an assortment of ready to use
1326tools, XML authoring components, and an extensible plug-in based API.")
1327 (license license:lgpl2.1+)))
f464016d 1328
945d985a
DT
1329(define-public v4l-utils
1330 (package
1331 (name "v4l-utils")
9a5c0320 1332 (version "1.10.1")
945d985a
DT
1333 (source (origin
1334 (method url-fetch)
1d4ac724 1335 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
1336 "/v4l-utils-" version ".tar.bz2"))
1337 (sha256
1338 (base32
9a5c0320 1339 "1h1nhg5cmmzlbipak526nk4bm6d0yb217mll75f3rpg7kz1cqiv1"))))
945d985a
DT
1340 (build-system gnu-build-system)
1341 (arguments
1342 '(#:configure-flags
1343 (list (string-append "--with-udevdir="
1344 (assoc-ref %outputs "out")
1345 "/lib/udev"))))
1346 (native-inputs
1347 `(("pkg-config" ,pkg-config)))
1348 (inputs
1349 `(("alsa-lib" ,alsa-lib)
1350 ("glu" ,glu)
1351 ("libjpeg" ,libjpeg)
1352 ("libx11" ,libx11)
b37662e2 1353 ("qtbase" ,qtbase)
945d985a
DT
1354 ("eudev" ,eudev)))
1355 (synopsis "Realtime video capture utilities for Linux")
1356 (description "The v4l-utils provide a series of libraries and utilities to
1357be used for realtime video capture via Linux-specific APIs.")
1358 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1359 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1360 (license (list license:lgpl2.1+ license:gpl2))))
1361
f464016d
DT
1362(define-public obs
1363 (package
1364 (name "obs")
57d83cd2 1365 (version "0.14.2")
f464016d
DT
1366 (source (origin
1367 (method url-fetch)
1368 (uri (string-append "https://github.com/jp9000/obs-studio"
1369 "/archive/" version ".tar.gz"))
1370 (file-name (string-append name "-" version ".tar.gz"))
1371 (sha256
1372 (base32
57d83cd2 1373 "1cb8naa67kfnnngkzv1wpd4y241j29ggnk1w7jgnymp9j8dny1xl"))))
f464016d
DT
1374 (build-system cmake-build-system)
1375 (arguments '(#:tests? #f)) ; no tests
1376 (native-inputs
1377 `(("pkg-config" ,pkg-config)))
1378 (inputs
1379 `(("curl" ,curl)
1380 ("eudev" ,eudev)
1381 ("ffmpeg" ,ffmpeg)
1382 ("freetype" ,freetype)
1383 ("jack" ,jack-1)
1384 ("jansson" ,jansson)
1385 ("libx264" ,libx264)
1386 ("libxcomposite" ,libxcomposite)
1387 ("mesa" ,mesa)
1388 ("pulseaudio" ,pulseaudio)
90a2309b
EF
1389 ("qtbase" ,qtbase)
1390 ("qtx11extras" ,qtx11extras)
d4df2032 1391 ("v4l-utils" ,v4l-utils)
f464016d
DT
1392 ("zlib" ,zlib)))
1393 (synopsis "Live streaming software")
1394 (description "Open Broadcaster Software provides a graphical interface for
1395video recording and live streaming. OBS supports capturing audio and video
1396from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1397and JACK.")
1398 (home-page "https://obsproject.com")
1399 (license license:gpl2+)))
d5650f86
EF
1400
1401(define-public libvdpau
1402 (package
1403 (name "libvdpau")
1404 (version "1.1.1")
1405 (source
1406 (origin
1407 (method url-fetch)
1408 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1409 name "-" version ".tar.bz2"))
1410 (sha256
1411 (base32
1412 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1413 (build-system gnu-build-system)
1414 (native-inputs
1415 `(("pkg-config" ,pkg-config)))
1416 (inputs
1417 `(("dri2proto" ,dri2proto)
1418 ("libx11" ,libx11 "out")
1419 ("libxext" ,libxext)))
1420 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1421 (synopsis "Video Decode and Presentation API")
1422 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1423provides an interface to video decode acceleration and presentation hardware
1424present in modern GPUs.")
1425 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
1426
1427(define-public vdpauinfo
1428 (package
1429 (name "vdpauinfo")
1430 (version "1.0")
1431 (source
1432 (origin
1433 (method url-fetch)
1434 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1435 name "-" version ".tar.gz"))
1436 (sha256
1437 (base32
1438 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1439 (build-system gnu-build-system)
1440 (native-inputs
1441 `(("pkg-config" ,pkg-config)
1442 ("libx11" ,libx11)))
1443 (propagated-inputs
1444 `(("libvdpau" ,libvdpau)))
1445 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1446 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1447 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1448implementation.")
1449 (license (license:x11-style "file://COPYING"))))
a7d94b54
LC
1450
1451(define-public recordmydesktop
1452 (package
1453 (name "recordmydesktop")
1454 (version "0.3.8.1")
1455 (source (origin
1456 (method url-fetch)
1457 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1458 version "/recordmydesktop-" version ".tar.gz"))
1459 (sha256
1460 (base32
1461 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1462 (build-system gnu-build-system)
1463 (inputs `(("popt" ,popt)
1464 ("zlib" ,zlib)
1465 ("libx11" ,libx11)
1466 ("libice" ,libice)
1467 ("libsm" ,libsm)
1468 ("libxfixes" ,libxfixes)
1469 ("libxdamage" ,libxdamage)
1470 ("libxext" ,libxext)
1471 ("libvorbis" ,libvorbis)
1472 ("libtheora" ,libtheora)))
1473 (home-page "http://recordmydesktop.sourceforge.net/")
1474 (synopsis "Desktop session video recorder")
1475 (description
1476 "recordMyDesktop is a command-line tool that captures the activity in
1477your graphical desktop and encodes it as a video. This is a useful tool for
1478making @dfn{screencasts}.")
1479 (license license:gpl2+)))