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