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