Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / video.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
11 ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
12 ;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
13 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
14 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
15 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
16 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
17 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
18 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
19 ;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
21 ;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
22 ;;;
23 ;;; This file is part of GNU Guix.
24 ;;;
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
29 ;;;
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
34 ;;;
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37
38 (define-module (gnu packages video)
39 #:use-module (ice-9 match)
40 #:use-module (srfi srfi-1)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (guix utils)
43 #:use-module (guix packages)
44 #:use-module (guix download)
45 #:use-module (guix git-download)
46 #:use-module (guix svn-download)
47 #:use-module (guix build-system cmake)
48 #:use-module (guix build-system gnu)
49 #:use-module (guix build-system glib-or-gtk)
50 #:use-module (guix build-system python)
51 #:use-module (guix build-system waf)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages audio)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages avahi)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages bison)
59 #:use-module (gnu packages cdrom)
60 #:use-module (gnu packages cmake)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages cpp)
63 #:use-module (gnu packages curl)
64 #:use-module (gnu packages databases)
65 #:use-module (gnu packages dejagnu)
66 #:use-module (gnu packages elf)
67 #:use-module (gnu packages flex)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages freedesktop)
70 #:use-module (gnu packages fribidi)
71 #:use-module (gnu packages gettext)
72 #:use-module (gnu packages ghostscript)
73 #:use-module (gnu packages gl)
74 #:use-module (gnu packages glib)
75 #:use-module (gnu packages guile)
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gnupg)
78 #:use-module (gnu packages gstreamer)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages image)
81 #:use-module (gnu packages imagemagick)
82 #:use-module (gnu packages linux)
83 #:use-module (gnu packages lua)
84 #:use-module (gnu packages m4)
85 #:use-module (gnu packages man)
86 #:use-module (gnu packages mp3)
87 #:use-module (gnu packages ncurses)
88 #:use-module (gnu packages ocr)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages pkg-config)
91 #:use-module (gnu packages popt)
92 #:use-module (gnu packages pulseaudio)
93 #:use-module (gnu packages python)
94 #:use-module (gnu packages qt)
95 #:use-module (gnu packages sdl)
96 #:use-module (gnu packages ssh)
97 #:use-module (gnu packages texinfo)
98 #:use-module (gnu packages textutils)
99 #:use-module (gnu packages tls)
100 #:use-module (gnu packages version-control)
101 #:use-module (gnu packages web)
102 #:use-module (gnu packages webkit)
103 #:use-module (gnu packages wxwidgets)
104 #:use-module (gnu packages xdisorg)
105 #:use-module (gnu packages xiph)
106 #:use-module (gnu packages xml)
107 #:use-module (gnu packages xorg)
108 #:use-module (gnu packages assembly)
109 #:use-module (gnu packages zip))
110
111 (define-public aalib
112 (package
113 (name "aalib")
114 (version "1.4rc5")
115 (source (origin
116 (method url-fetch)
117 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
118 version "/" name "-" version ".tar.gz"))
119 (sha256
120 (base32
121 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
122 (build-system gnu-build-system)
123 (native-inputs
124 `(("makeinfo" ,texinfo)))
125 (inputs
126 `(("ncurses" ,ncurses)))
127 (arguments
128 `(#:phases
129 (modify-phases %standard-phases
130 (replace 'configure
131 (lambda* (#:key build inputs outputs #:allow-other-keys)
132 ;; This old `configure' script doesn't support
133 ;; variables passed as arguments.
134 (let ((out (assoc-ref outputs "out"))
135 (ncurses (assoc-ref inputs "ncurses")))
136 (setenv "CONFIG_SHELL" (which "bash"))
137 (zero? (system* "./configure"
138 (string-append "--prefix=" out)
139 (string-append "--build=" build)
140 ;; The ancient config.guess is unable to
141 ;; guess the host triplet on mips64el.
142 ,@(if (string=? "mips64el-linux"
143 (%current-system))
144 '("--host=mips64el-unknown-linux-gnu")
145 '())
146 ;; The same is also true with aarch64.
147 ,@(if (string=? "aarch64-linux"
148 (%current-system))
149 '("--host=aarch64-unknown-linux-gnu")
150 '())
151 (string-append "--with-ncurses="
152 ncurses)))))))))
153 (home-page "http://aa-project.sourceforge.net/aalib/")
154 (synopsis "ASCII-art library")
155 (description
156 "AA-lib is a low level gfx library which does not require graphics device.
157 In fact, there is no graphical output possible. AA-lib replaces those
158 old-fashioned output methods with powerful ascii-art renderer.")
159 (license license:lgpl2.0+)))
160
161 (define-public liba52
162 (package
163 (name "liba52")
164 (version "0.7.4")
165 (source (origin
166 (method url-fetch)
167 (uri (string-append
168 ;; A mirror://sourceforge URI doesn't work, presumably
169 ;; because the SourceForge project is misconfigured.
170 "http://liba52.sourceforge.net/files/a52dec-" version
171 ".tar.gz"))
172 (sha256
173 (base32
174 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
175 (patches (search-patches "liba52-enable-pic.patch"
176 "liba52-set-soname.patch"
177 "liba52-use-mtune-not-mcpu.patch"
178 "liba52-link-with-libm.patch"))))
179 (build-system gnu-build-system)
180 ;; XXX We need to run ./bootstrap because of the build system fixes above.
181 (native-inputs
182 `(("autoconf" ,autoconf)
183 ("automake" ,automake)
184 ("libtool" ,libtool)))
185 (arguments `(#:configure-flags '("--enable-shared")
186 #:phases
187 (modify-phases %standard-phases
188 ;; XXX We need to run ./bootstrap because of the build
189 ;; system fixes above.
190 (add-after
191 'unpack 'bootstrap
192 (lambda _ (zero? (system* "sh" "bootstrap")))))))
193 (home-page "http://liba52.sourceforge.net/")
194 (synopsis "ATSC A/52 stream decoder")
195 (description "liba52 is a library for decoding ATSC A/52 streams. The
196 A/52 standard is used in a variety of applications, including digital
197 television and DVD. It is also known as AC-3.")
198 (license license:gpl2+)))
199
200 (define-public libmpeg2
201 (package
202 (name "libmpeg2")
203 (version "0.5.1")
204 (source (origin
205 (method url-fetch)
206 ;; A mirror://sourceforge URI doesn't work, presumably
207 ;; because the SourceForge project is misconfigured.
208 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
209 name "-" version ".tar.gz"))
210 (sha256
211 (base32
212 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
213 (inputs
214 `(("libx11" ,libx11)
215 ("libxext" ,libxext)
216 ("libxv" ,libxv)
217 ("libsm" ,libsm)
218 ("libice" ,libice)
219 ("sdl" ,sdl)))
220 (build-system gnu-build-system)
221 (home-page "http://libmpeg2.sourceforge.net/")
222 (synopsis "MPEG1 and MPEG2 video decoder library")
223 (description
224 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
225 (license license:gpl2+)))
226
227 (define-public libx264
228 (package
229 (name "libx264")
230 (version "20170316-2245")
231 (source (origin
232 (method url-fetch)
233 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
234 "x264-snapshot-" version ".tar.bz2"))
235 (sha256
236 (base32
237 "1s1nnvl3axz38sv4g09skijl6k9mbbngbb1nsh26w4dr2w2gyzad"))))
238 (build-system gnu-build-system)
239 (native-inputs
240 `(("pkg-config" ,pkg-config)
241 ("yasm" ,yasm)))
242 ;; TODO: Add gpac input
243 (arguments
244 `(#:tests? #f ;no check target
245 #:configure-flags '("--enable-shared"
246 ;; Don't build the command-line program. If we
247 ;; want it later, we should do so in a different
248 ;; package to avoid a circular dependency (the x264
249 ;; program depends on ffmpeg and ffmpeg depends on
250 ;; libx264).
251 "--disable-cli"
252
253 ;; On MIPS, we must pass "--disable-asm" or else
254 ;; configure fails after printing: "You specified a
255 ;; pre-MSA CPU in your CFLAGS. If you really want
256 ;; to run on such a CPU, configure with
257 ;; --disable-asm."
258 ,@(if (string-prefix? "mips"
259 (or (%current-target-system)
260 (%current-system)))
261 '("--disable-asm")
262 '()))))
263 (home-page "https://www.videolan.org/developers/x264.html")
264 (synopsis "H.264 video coding library")
265 (description "libx264 is an advanced encoding library for creating
266 H.264 (MPEG-4 AVC) video streams.")
267 (license (list license:gpl2+ ;most files
268 license:isc ;common/x86/x86inc.asm
269 license:lgpl2.1+ ;extras/getopt.c
270 license:bsd-3 ;extras/inttypes.h
271 (license:non-copyleft ;extras/cl*.h
272 "file://extras/cl.h"
273 "See extras/cl.h in the distribution.")))))
274
275 (define-public x265
276 (package
277 (name "x265")
278 (version "2.4")
279 (source
280 (origin
281 (method url-fetch)
282 (uri (string-append "https://download.videolan.org/videolan/x265/"
283 "x265_" version ".tar.gz"))
284 (sha256
285 (base32
286 "0afp0xlk0fb4q6j4sh3hyvjnjccdp61sn21zg3fyqvwgswcafalw"))
287 (modules '((guix build utils)))
288 (snippet
289 '(delete-file-recursively "source/compat/getopt"))))
290 (build-system cmake-build-system)
291 (arguments
292 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
293 ;; Currently the source code doesn't check for aarch64
294 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
295 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
296 '())
297 #:phases
298 (modify-phases %standard-phases
299 (add-before 'configure 'prepare-build
300 (lambda _
301 (delete-file-recursively "build")
302 (chdir "source")
303 #t)))))
304 (home-page "http://x265.org/")
305 (synopsis "Library for encoding h.265/HEVC video streams")
306 (description "x265 is a H.265 / HEVC video encoder application library,
307 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
308 (license license:gpl2+)))
309
310 (define-public libass
311 (package
312 (name "libass")
313 (version "0.13.6")
314 (source (origin
315 (method url-fetch)
316 (uri (string-append
317 "https://github.com/libass/libass/releases/download/"
318 version "/libass-" version ".tar.xz"))
319 (sha256
320 (base32
321 "0b9cj5xfsa7zwlk5m146fhv102v51iqs3rapq0n2xrz30k8p9a7q"))))
322 (build-system gnu-build-system)
323 (native-inputs
324 `(("pkg-config" ,pkg-config)
325 ("yasm" ,yasm)))
326 (propagated-inputs
327 `(("freetype" ,freetype)
328 ("fribidi" ,fribidi)
329 ("fontconfig" ,fontconfig)
330 ("harfbuzz" ,harfbuzz)
331 ("enca" ,enca)))
332 (home-page "https://github.com/libass/libass")
333 (synopsis "Subtitle rendering library for the ASS/SSA format")
334 (description "libass is a subtitle rendering library for the
335 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
336 (license license:isc)))
337
338 (define-public libcaca
339 (package
340 (name "libcaca")
341 (version "0.99.beta19")
342 (source (origin
343 (method url-fetch)
344 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
345 version ".tar.gz"))
346 (sha256
347 (base32
348 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
349 (build-system gnu-build-system)
350 (native-inputs `(("pkg-config" ,pkg-config)))
351 (inputs
352 `(("freeglut" ,freeglut)
353 ("ftgl" ,ftgl)
354 ("imlib2" ,imlib2)
355 ("libx11" ,libx11)
356 ("mesa" ,mesa)
357 ("ncurses" ,ncurses)
358 ("zlib" ,zlib)))
359 (home-page "http://caca.zoy.org/wiki/libcaca")
360 (synopsis "Colour ASCII-art library")
361 (description "libcaca is a graphics library that outputs text instead of
362 pixels, so that it can work on older video cards or text terminals. It
363 supports Unicode, 2048 colors, dithering of color images, and advanced text
364 canvas operations.")
365 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
366
367 (define-public libdca
368 (package
369 (name "libdca")
370 (version "0.0.5")
371 (source (origin
372 (method url-fetch)
373 (uri (string-append
374 "https://download.videolan.org/pub/videolan/libdca/"
375 version "/libdca-" version ".tar.bz2"))
376 (sha256
377 (base32
378 "0hh6a7l8vvccsd5i1fkv9av2gzv9fy8m0b8jpsn5p6hh4bh2586v"))))
379 (build-system gnu-build-system)
380 (home-page "https://www.videolan.org/developers/libdca.html")
381 (synopsis "DTS Coherent Acoustics decoder")
382 (description "libdca is a library for decoding DTS Coherent Acoustics
383 streams.")
384 (license license:gpl2+)))
385
386 (define-public libdv
387 (package
388 (name "libdv")
389 (version "1.0.0")
390 (source (origin
391 (method url-fetch)
392 (uri (string-append
393 "mirror://sourceforge/" name "/" name "/"
394 version "/" name "-" version ".tar.gz"))
395 (sha256
396 (base32
397 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
398 (build-system gnu-build-system)
399 (native-inputs `(("pkg-config" ,pkg-config)))
400 (inputs `(("libxv" ,libxv)))
401 (home-page "http://libdv.sourceforge.net/")
402 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
403 (description "The Quasar DV codec (libdv) is a software codec for DV
404 video, the encoding format used by most digital camcorders, typically those
405 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
406 developed according to the official standards for DV video: IEC 61834 and
407 SMPTE 314M.")
408 (license license:lgpl2.1+)))
409
410 (define-public libva
411 (package
412 (name "libva")
413 (version "1.8.1")
414 (source
415 (origin
416 (method url-fetch)
417 (uri (string-append
418 "https://www.freedesktop.org/software/vaapi/releases/libva/libva-"
419 version".tar.bz2"))
420 (sha256
421 (base32 "0wswfznj93jpnxhc3jwdk5j3pmyki0rs6k9vk4vnzds0dddximf1"))))
422 (build-system gnu-build-system)
423 (native-inputs
424 `(("pkg-config" ,pkg-config)))
425 (inputs
426 `(("libdrm" ,libdrm)
427 ("libx11" ,libx11)
428 ("libxext" ,libxext)
429 ("libxfixes" ,libxfixes)
430 ("mesa" ,mesa)))
431 (arguments
432 `(#:phases
433 (modify-phases %standard-phases
434 (add-before
435 'build 'fix-dlopen-paths
436 (lambda* (#:key outputs #:allow-other-keys)
437 (let ((out (assoc-ref outputs "out")))
438 (substitute* "va/drm/va_drm_auth_x11.c"
439 (("\"libva-x11\\.so\\.%d\"")
440 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
441 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
442 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
443 #:configure-flags
444 (list (string-append "--with-drivers-path="
445 (assoc-ref %build-inputs "mesa") "/lib/dri"))
446 ;; However, we can't write to mesa's store directory, so override the
447 ;; following make variable to install the dummy driver to libva's
448 ;; $prefix/lib/dri directory.
449 #:make-flags
450 (list (string-append "dummy_drv_video_ladir="
451 (assoc-ref %outputs "out") "/lib/dri"))))
452 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
453 (synopsis "Video acceleration library")
454 (description "The main motivation for VA-API (Video Acceleration API) is
455 to enable hardware accelerated video decode/encode at various
456 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
457 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
458 (license license:expat)))
459
460 (define-public ffmpeg
461 (package
462 (name "ffmpeg")
463 (version "3.3.1")
464 (source (origin
465 (method url-fetch)
466 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
467 version ".tar.xz"))
468 (sha256
469 (base32
470 "0bwgm6z6k3khb91qh9xv15inykkfchpkm0lcdckkxhkacpyaf0mp"))))
471 (build-system gnu-build-system)
472 (inputs
473 `(("fontconfig" ,fontconfig)
474 ("freetype" ,freetype)
475 ("gnutls" ,gnutls)
476 ("opus" ,opus)
477 ("ladspa" ,ladspa)
478 ("lame" ,lame)
479 ("libass" ,libass)
480 ("libbluray" ,libbluray)
481 ("libcaca" ,libcaca)
482 ("libcdio-paranoia" ,libcdio-paranoia)
483 ("libtheora" ,libtheora)
484 ("libvdpau" ,libvdpau)
485 ("libvorbis" ,libvorbis)
486 ("libvpx" ,libvpx)
487 ("libx11" ,libx11)
488 ("libx264" ,libx264)
489 ("mesa" ,mesa)
490 ("openal" ,openal)
491 ("pulseaudio" ,pulseaudio)
492 ("sdl" ,sdl2)
493 ("soxr" ,soxr)
494 ("speex" ,speex)
495 ("twolame" ,twolame)
496 ("x265" ,x265)
497 ("xvid" ,xvid)
498 ("zlib" ,zlib)))
499 (native-inputs
500 `(("bc" ,bc)
501 ("perl" ,perl)
502 ("pkg-config" ,pkg-config)
503 ("texinfo" ,texinfo)
504 ("python" ,python-2) ; scripts use interpreter python2
505 ("speex" ,speex)
506 ("yasm" ,yasm)))
507 (arguments
508 `(#:test-target "fate"
509 #:configure-flags
510 ;; possible additional inputs:
511 ;; --enable-avisynth enable reading of AviSynth script
512 ;; files [no]
513 ;; --enable-frei0r enable frei0r video filtering
514 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
515 ;; --enable-libcelt enable CELT decoding via libcelt [no]
516 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
517 ;; and libraw1394 [no]
518 ;; --enable-libfaac enable AAC encoding via libfaac [no]
519 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
520 ;; --enable-libflite enable flite (voice synthesis) support via
521 ;; libflite [no]
522 ;; --enable-libgme enable Game Music Emu via libgme [no]
523 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
524 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
525 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
526 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
527 ;; --enable-libnut enable NUT (de)muxing via libnut,
528 ;; native (de)muxer exists [no]
529 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
530 ;; libopencore-amrnb [no]
531 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
532 ;; libopencore-amrwb [no]
533 ;; --enable-libopencv enable video filtering via libopencv [no]
534 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
535 ;; OpenJPEG [no]
536 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
537 ;; --enable-libschroedinger enable Dirac de/encoding via
538 ;; libschroedinger [no]
539 ;; --enable-libshine enable fixed-point MP3 encoding via
540 ;; libshine [no]
541 ;; --enable-libssh enable SFTP protocol via libssh [no]
542 ;; (libssh2 does not work)
543 ;; --enable-libstagefright-h264 enable H.264 decoding via
544 ;; libstagefright [no]
545 ;; --enable-libutvideo enable Ut Video encoding and decoding via
546 ;; libutvideo [no]
547 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
548 ;; --enable-libvidstab enable video stabilization using
549 ;; vid.stab [no]
550 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
551 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
552 ;; libvo-amrwbenc [no]
553 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
554 ;; --enable-libxavs enable AVS encoding via xavs [no]
555 ;; --enable-libzmq enable message passing via libzmq [no]
556 ;; --enable-libzvbi enable teletext support via libzvbi [no]
557 ;; --enable-opencl enable OpenCL code
558 '("--enable-avresample"
559 "--enable-gpl" ; enable optional gpl licensed parts
560 "--enable-shared"
561 "--enable-fontconfig"
562 "--enable-gnutls"
563 "--enable-ladspa"
564 "--enable-libass"
565 "--enable-libbluray"
566 "--enable-libcaca"
567 "--enable-libcdio"
568 "--enable-libfreetype"
569 "--enable-libmp3lame"
570 "--enable-libopus"
571 "--enable-libpulse"
572 "--enable-libsoxr"
573 "--enable-libspeex"
574 "--enable-libtheora"
575 "--enable-libtwolame"
576 "--enable-libvorbis"
577 "--enable-libvpx"
578 "--enable-libxvid"
579 "--enable-libx264"
580 "--enable-libx265"
581 "--enable-openal"
582 "--enable-opengl"
583
584 "--enable-runtime-cpudetect"
585
586 ;; Runtime cpu detection is not implemented on
587 ;; MIPS, so we disable some features.
588 "--disable-mips32r2"
589 "--disable-mipsdsp"
590 "--disable-mipsdspr2"
591 "--disable-mipsfpu")
592 #:phases
593 (modify-phases %standard-phases
594 (replace
595 'configure
596 ;; configure does not work followed by "SHELL=..." and
597 ;; "CONFIG_SHELL=..."; set environment variables instead
598 (lambda* (#:key outputs configure-flags #:allow-other-keys)
599 (let ((out (assoc-ref outputs "out")))
600 (substitute* "configure"
601 (("#! /bin/sh") (string-append "#!" (which "sh"))))
602 (setenv "SHELL" (which "bash"))
603 (setenv "CONFIG_SHELL" (which "bash"))
604 (zero? (apply system*
605 "./configure"
606 (string-append "--prefix=" out)
607 ;; Add $libdir to the RUNPATH of all the binaries.
608 (string-append "--extra-ldflags=-Wl,-rpath="
609 out "/lib")
610 configure-flags)))))
611 (add-before
612 'check 'set-ld-library-path
613 (lambda _
614 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
615 ;; running tests.
616 (let* ((dso (find-files "." "\\.so$"))
617 (path (string-join (map dirname dso) ":")))
618 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
619 (setenv "LD_LIBRARY_PATH" path)
620 #t))))))
621 (home-page "https://www.ffmpeg.org/")
622 (synopsis "Audio and video framework")
623 (description "FFmpeg is a complete, cross-platform solution to record,
624 convert and stream audio and video. It includes the libavcodec
625 audio/video codec library.")
626 (license license:gpl2+)))
627
628 (define-public ffmpeg-2.8
629 (package
630 (inherit ffmpeg)
631 (version "2.8.11")
632 (source (origin
633 (method url-fetch)
634 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
635 version ".tar.xz"))
636 (sha256
637 (base32
638 "1rhz7rhmhhh8bjcj3dc82haisn3qjbzqlr7k6d6v7064jgn3maiq"))))
639 (arguments
640 (substitute-keyword-arguments (package-arguments ffmpeg)
641 ((#:configure-flags flags)
642 `(map (lambda (flag)
643 (if (string=? flag "--disable-mipsdsp")
644 "--disable-mipsdspr1"
645 flag))
646 ,flags))))))
647
648 (define-public vlc
649 (package
650 (name "vlc")
651 (version "2.2.6")
652 (source (origin
653 (method url-fetch)
654 (uri (string-append
655 "https://download.videolan.org/pub/videolan/vlc/"
656 version "/vlc-" version ".tar.xz"))
657 (sha256
658 (base32
659 "1a22b913p2227ljz89c4fgjlyln5gcz8z58w32r0wh4srnnd60y4"))))
660 (build-system gnu-build-system)
661 (native-inputs
662 `(("git" ,git) ; needed for a test
663 ("pkg-config" ,pkg-config)))
664 ;; FIXME: Add optional inputs once available.
665 (inputs
666 `(("alsa-lib" ,alsa-lib)
667 ("avahi" ,avahi)
668 ("dbus" ,dbus)
669 ("flac" ,flac)
670 ("ffmpeg" ,ffmpeg-2.8) ;fails to build against ffmpeg 3.0
671 ("fontconfig" ,fontconfig)
672 ("freetype" ,freetype)
673 ("gnutls" ,gnutls)
674 ("liba52" ,liba52)
675 ("libcddb" ,libcddb)
676 ("libgcrypt" ,libgcrypt)
677 ("libkate" ,libkate)
678 ("libmad" ,libmad)
679 ("libogg" ,libogg)
680 ("libpng" ,libpng)
681 ("libsamplerate" ,libsamplerate)
682 ("libssh2" ,libssh2)
683 ("libvorbis" ,libvorbis)
684 ("libtheora" ,libtheora)
685 ("libxext" ,libxext)
686 ("libxi" ,libxi)
687 ("libxinerama" ,libxinerama)
688 ("libxml2" ,libxml2)
689 ("libxpm" ,libxpm)
690 ("lua" ,lua-5.1)
691 ("mesa" ,mesa)
692 ("opus" ,opus)
693 ("perl" ,perl)
694 ("pulseaudio" ,pulseaudio)
695 ("python" ,python-wrapper)
696 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
697 ;("qtbase" ,qtbase) with -std=gnu++11.
698 ;("qtx11extras" ,qtx11extras)
699 ("sdl" ,sdl)
700 ("sdl-image" ,sdl-image)
701 ("speex" ,speex)
702 ("x265" ,x265)
703 ("xcb-util-keysyms" ,xcb-util-keysyms)))
704 (arguments
705 `(#:configure-flags
706 `(;; Gross workaround for <https://trac.videolan.org/vlc/ticket/16907>.
707 ;; In our case, this led to a test failure:
708 ;; test_libvlc_equalizer: libvlc/equalizer.c:122: test_equalizer: Assertion `isnan(libvlc_audio_equalizer_get_amp_at_index (equalizer, u_bands))' failed.
709 "ac_cv_c_fast_math=no"
710
711 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
712 (assoc-ref %build-inputs "ffmpeg")
713 "/lib")) ;needed for the tests
714
715 #:phases
716 (modify-phases %standard-phases
717 (add-before 'configure 'remove-visual-tests
718 ;; Some of the tests require using the display to test out VLC,
719 ;; which fails in our sandboxed build system
720 (lambda _
721 (substitute* "test/run_vlc.sh"
722 (("./vlc --ignore-config") "echo"))
723 #t))
724 (add-after 'install 'regenerate-plugin-cache
725 (lambda* (#:key outputs #:allow-other-keys)
726 ;; The 'install-exec-hook' rule in the top-level Makefile.am
727 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
728 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
729 ;; it references. Thus, we first reset the timestamps of all
730 ;; these files, and then regenerate the cache such that the
731 ;; mtimes it includes are always zero instead of being dependent
732 ;; on the build time.
733 (let* ((out (assoc-ref outputs "out"))
734 (pkglibdir (string-append out "/lib/vlc"))
735 (plugindir (string-append pkglibdir "/plugins"))
736 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
737 ;; TODO: Factorize 'reset-timestamps'.
738 (for-each (lambda (file)
739 (let ((s (lstat file)))
740 (unless (eq? (stat:type s) 'symlink)
741 (utime file 0 0 0 0))))
742 (find-files plugindir))
743 (zero? (system* cachegen plugindir))))))))
744 (home-page "https://www.videolan.org/")
745 (synopsis "Audio and video framework")
746 (description "VLC is a cross-platform multimedia player and framework
747 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
748 treaming protocols.")
749 (license license:gpl2+)))
750
751 (define-public mplayer
752 (package
753 (name "mplayer")
754 (version "1.3.0")
755 (source (origin
756 (method url-fetch)
757 (uri (string-append
758 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
759 version ".tar.xz"))
760 (sha256
761 (base32
762 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
763 (build-system gnu-build-system)
764 ;; FIXME: Add additional inputs once available.
765 (native-inputs
766 `(("pkg-config" ,pkg-config)))
767 (inputs
768 `(("alsa-lib" ,alsa-lib)
769 ("cdparanoia" ,cdparanoia)
770 ("ffmpeg" ,ffmpeg)
771 ("fontconfig" ,fontconfig)
772 ("freetype" ,freetype)
773 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
774 ("lame" ,lame)
775 ("libass" ,libass)
776 ("libdvdcss" ,libdvdcss)
777 ("libdvdnav" ,libdvdnav)
778 ("libjpeg" ,libjpeg)
779 ("libmpeg2" ,libmpeg2)
780 ("libmpg123" ,mpg123) ; audio codec for MP3
781 ("libpng" ,libpng)
782 ("libtheora" ,libtheora)
783 ("libvdpau" ,libvdpau)
784 ("libvorbis" ,libvorbis)
785 ("libx11" ,libx11)
786 ("libx264" ,libx264)
787 ("libxinerama" ,libxinerama)
788 ("libxv" ,libxv)
789 ("libxxf86dga" ,libxxf86dga)
790 ("mesa" ,mesa)
791 ("opus" ,opus)
792 ("perl" ,perl)
793 ("pulseaudio" ,pulseaudio)
794 ("python" ,python-wrapper)
795 ("sdl" ,sdl)
796 ("speex" ,speex)
797 ("yasm" ,yasm)
798 ("zlib" ,zlib)))
799 (arguments
800 `(#:tests? #f ; no test target
801 #:phases
802 (modify-phases %standard-phases
803 (replace 'configure
804 ;; configure does not work followed by "SHELL=..." and
805 ;; "CONFIG_SHELL=..."; set environment variables instead
806 (lambda* (#:key inputs outputs #:allow-other-keys)
807 (let ((out (assoc-ref outputs "out"))
808 (libx11 (assoc-ref inputs "libx11")))
809 (substitute* "configure"
810 (("#! /bin/sh") (string-append "#!" (which "sh"))))
811 (setenv "SHELL" (which "bash"))
812 (setenv "CONFIG_SHELL" (which "bash"))
813 (zero? (system*
814 "./configure"
815 (string-append "--extra-cflags=-I"
816 libx11 "/include") ; to detect libx11
817 "--disable-ffmpeg_a" ; disables bundled ffmpeg
818 (string-append "--prefix=" out)
819 ;; Enable runtime cpu detection where supported,
820 ;; and choose a suitable target.
821 ,@(match (or (%current-target-system)
822 (%current-system))
823 ("x86_64-linux"
824 '("--enable-runtime-cpudetection"
825 "--target=x86_64-linux"))
826 ("i686-linux"
827 '("--enable-runtime-cpudetection"
828 "--target=i686-linux"))
829 ("mips64el-linux"
830 '("--target=mips3-linux"))
831 (_ (list (string-append
832 "--target="
833 (or (%current-target-system)
834 (nix-system->gnu-triplet
835 (%current-system)))))))
836 "--disable-iwmmxt"))))))))
837 (home-page "https://www.mplayerhq.hu/design7/news.html")
838 (synopsis "Audio and video player")
839 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
840 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
841 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
842 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
843 (license license:gpl2)))
844
845 (define-public mpv
846 (package
847 (name "mpv")
848 (version "0.25.0")
849 (source (origin
850 (method url-fetch)
851 (uri (string-append
852 "https://github.com/mpv-player/mpv/archive/v" version
853 ".tar.gz"))
854 (sha256
855 (base32
856 "1khb7c4fdj1aak46lwyb3lq14w5jpxzws0zp6bdc87ljsvx3yhh7"))
857 (file-name (string-append name "-" version ".tar.gz"))))
858 (build-system waf-build-system)
859 (native-inputs
860 `(("perl" ,perl) ; for zsh completion file
861 ("pkg-config" ,pkg-config)
862 ("python-docutils" ,python-docutils)))
863 ;; Missing features: libguess, Wayland, V4L2
864 (inputs
865 `(("alsa-lib" ,alsa-lib)
866 ("enca" ,enca)
867 ("ffmpeg" ,ffmpeg)
868 ("jack" ,jack-1)
869 ("ladspa" ,ladspa)
870 ("lcms" ,lcms)
871 ("libass" ,libass)
872 ("libbluray" ,libbluray)
873 ("libcaca" ,libcaca)
874 ("libbs2b" ,libbs2b)
875 ("libcdio-paranoia" ,libcdio-paranoia)
876 ("libdvdread" ,libdvdread)
877 ("libdvdnav" ,libdvdnav)
878 ("libjpeg" ,libjpeg)
879 ("libva" ,libva)
880 ("libvdpau" ,libvdpau)
881 ("libx11" ,libx11)
882 ("libxext" ,libxext)
883 ("libxinerama" ,libxinerama)
884 ("libxrandr" ,libxrandr)
885 ("libxscrnsaver" ,libxscrnsaver)
886 ("libxv" ,libxv)
887 ;; XXX: lua > 5.2 is not currently supported; see
888 ;; waftools/checks/custom.py
889 ("lua" ,lua-5.2)
890 ("mesa" ,mesa)
891 ("mpg123" ,mpg123)
892 ("pulseaudio" ,pulseaudio)
893 ("rsound" ,rsound)
894 ("waf" ,python-waf)
895 ("youtube-dl" ,youtube-dl)
896 ("zlib" ,zlib)))
897 (arguments
898 '(#:phases
899 (modify-phases %standard-phases
900 (add-before
901 'configure 'setup-waf
902 (lambda* (#:key inputs #:allow-other-keys)
903 (copy-file (assoc-ref inputs "waf") "waf")
904 (setenv "CC" "gcc"))))
905 #:configure-flags (list "--enable-libmpv-shared"
906 "--enable-cdda"
907 "--enable-dvdread"
908 "--enable-dvdnav"
909 "--enable-zsh-comp"
910 "--disable-build-date")
911 ;; No check function defined.
912 #:tests? #f))
913 (home-page "https://mpv.io/")
914 (synopsis "Audio and video player")
915 (description "mpv is a general-purpose audio and video player. It is a
916 fork of mplayer2 and MPlayer. It shares some features with the former
917 projects while introducing many more.")
918 (license license:gpl2+)))
919
920 (define-public gnome-mpv
921 (package
922 (name "gnome-mpv")
923 (version "0.11")
924 (source
925 (origin
926 (method url-fetch)
927 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
928 "/download/v" version "/gnome-mpv-" version
929 ".tar.xz"))
930 (sha256
931 (base32
932 "1hn3mpsxbrwf2m0nz4vzji4i6i896y8kqjb9kijqpk04cnrs3fgz"))))
933 (native-inputs
934 `(("intltool" ,intltool)
935 ("pkg-config" ,pkg-config)))
936 (inputs
937 `(("gtk+" ,gtk+)
938 ("libepoxy" ,libepoxy)
939 ("mpv" ,mpv)))
940 (build-system glib-or-gtk-build-system)
941 (home-page "https://github.com/gnome-mpv/gnome-mpv")
942 (synopsis "GTK+ frontend for the mpv media player")
943 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
944 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
945 access to mpv's powerful playback capabilities.")
946 (license license:gpl3+)))
947
948 (define-public libvpx
949 (package
950 (name "libvpx")
951 (version "1.6.1")
952 (source (origin
953 (method url-fetch)
954 (uri (string-append "http://storage.googleapis.com/"
955 "downloads.webmproject.org/releases/webm/"
956 name "-" version ".tar.bz2"))
957 (sha256
958 (base32
959 "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w"))
960 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
961 (build-system gnu-build-system)
962 (arguments
963 `(#:phases
964 (modify-phases %standard-phases
965 (replace 'configure
966 (lambda* (#:key outputs #:allow-other-keys)
967 (setenv "CONFIG_SHELL" (which "bash"))
968 (let ((out (assoc-ref outputs "out")))
969 (setenv "LDFLAGS"
970 (string-append "-Wl,-rpath=" out "/lib"))
971 (zero? (system* "./configure"
972 "--enable-shared"
973 "--as=yasm"
974 ;; Limit size to avoid CVE-2015-1258
975 "--size-limit=16384x16384"
976 (string-append "--prefix=" out)))))))
977 #:tests? #f)) ; no check target
978 (native-inputs
979 `(("perl" ,perl)
980 ("yasm" ,yasm)))
981 (synopsis "VP8/VP9 video codec")
982 (description "libvpx is a codec for the VP8/VP9 video compression format.")
983 (license license:bsd-3)
984 (home-page "http://www.webmproject.org/")))
985
986 (define-public youtube-dl
987 (package
988 (name "youtube-dl")
989 (version "2017.05.07")
990 (source (origin
991 (method url-fetch)
992 (uri (string-append "https://yt-dl.org/downloads/"
993 version "/youtube-dl-"
994 version ".tar.gz"))
995 (sha256
996 (base32
997 "1q3b9xkbk1lmy1wxm1jcnmaj70sdksqbc8zsqxz6b6z4nmv8qc25"))))
998 (build-system python-build-system)
999 (arguments
1000 ;; The problem here is that the directory for the man page and completion
1001 ;; files is relative, and for some reason, setup.py uses the
1002 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1003 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1004 ;; completion file is called 'youtube-dl' rather than
1005 ;; 'youtube-dl.bash-completion'.
1006 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1007 #:phases (modify-phases %standard-phases
1008 (add-before 'install 'fix-the-data-directories
1009 (lambda* (#:key outputs #:allow-other-keys)
1010 (let ((prefix (assoc-ref outputs "out")))
1011 (mkdir "bash-completion")
1012 (rename-file "youtube-dl.bash-completion"
1013 "bash-completion/youtube-dl")
1014 (substitute* "setup.py"
1015 (("youtube-dl\\.bash-completion")
1016 "bash-completion/youtube-dl")
1017 (("'etc/")
1018 (string-append "'" prefix "/etc/"))
1019 (("'share/")
1020 (string-append "'" prefix "/share/")))))))))
1021 (synopsis "Download videos from YouTube.com and other sites")
1022 (description
1023 "Youtube-dl is a small command-line program to download videos from
1024 YouTube.com and a few more sites.")
1025 (home-page "https://yt-dl.org")
1026 (license license:public-domain)))
1027
1028 (define-public youtube-dl-gui
1029 (package
1030 (name "youtube-dl-gui")
1031 (version "0.3.8")
1032 (source
1033 (origin
1034 (method url-fetch)
1035 (uri (pypi-uri "Youtube-DLG" version))
1036 (sha256
1037 (base32
1038 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1039 (build-system python-build-system)
1040 (arguments
1041 ;; In Guix, wxpython has not yet been packaged for Python 3.
1042 `(#:python ,python-2
1043 ;; This package has no tests.
1044 #:tests? #f
1045 #:phases
1046 (modify-phases %standard-phases
1047 (add-before 'build 'patch-source
1048 (lambda* (#:key inputs #:allow-other-keys)
1049 ;; The youtube-dl-gui program lets you configure options. Some of
1050 ;; them are problematic, so we change their defaults.
1051 (substitute* "youtube_dl_gui/optionsmanager.py"
1052 ;; When this is true, the builder process will try (and fail) to
1053 ;; write logs to the builder user's home directory.
1054 (("'enable_log': True") "'enable_log': False")
1055 ;; This determines which youtube-dl program youtube-dl-gui will
1056 ;; run. If we don't set this, then youtube-dl-gui might download
1057 ;; an arbitrary copy from the Internet into the user's home
1058 ;; directory and run it, so let's make sure youtube-dl-gui uses
1059 ;; the youtube-dl from the inputs by default.
1060 (("'youtubedl_path': self.config_path")
1061 (string-append "'youtubedl_path': '"
1062 (assoc-ref inputs "youtube-dl")
1063 "/bin'"))
1064 ;; When this is True, when youtube-dl-gui is finished downloading
1065 ;; a file, it will try (and possibly fail) to open the directory
1066 ;; containing the downloaded file. This can fail because it
1067 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1068 ;; adding xdg-utils to the propagated inputs is not enough to
1069 ;; make this work, so for now we set the default to False.
1070 (("'open_dl_dir': True") "'open_dl_dir': False"))
1071 ;; The youtube-dl program from the inputs is actually a wrapper
1072 ;; script written in bash, so attempting to invoke it as a python
1073 ;; script will fail.
1074 (substitute* "youtube_dl_gui/downloaders.py"
1075 (("cmd = \\['python', self\\.youtubedl_path\\]")
1076 "cmd = [self.youtubedl_path]"))
1077 ;; Use relative paths for installing data files so youtube-dl-gui
1078 ;; installs the files relative to its prefix in the store, rather
1079 ;; than relative to /. Also, instead of installing data files into
1080 ;; $prefix/usr/share, install them into $prefix/share for
1081 ;; consistency (see: (standards) Directory Variables).
1082 (substitute* "setup.py"
1083 (("= '/usr/share") "= 'share"))
1084 ;; Update get_locale_file() so it finds the installed localization
1085 ;; files.
1086 (substitute* "youtube_dl_gui/utils.py"
1087 (("os\\.path\\.join\\('/usr', 'share'")
1088 (string-append "os.path.join('"
1089 (assoc-ref %outputs "out")
1090 "', 'share'"))))))))
1091 (inputs
1092 `(("python2-wxpython" ,python2-wxpython)
1093 ("youtube-dl" ,youtube-dl)))
1094 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1095 (synopsis
1096 "GUI (Graphical User Interface) for @command{youtube-dl}")
1097 (description
1098 "Youtube-dlG is a GUI (Graphical User Interface) for
1099 @command{youtube-dl}. You can use it to download videos from YouTube and any
1100 other site that youtube-dl supports.")
1101 (license license:unlicense)))
1102
1103 (define-public you-get
1104 (package
1105 (name "you-get")
1106 (version "0.4.715")
1107 (source (origin
1108 (method url-fetch)
1109 (uri (string-append
1110 "https://github.com/soimort/you-get/releases/download/v"
1111 version "/you-get-" version ".tar.gz"))
1112 (sha256
1113 (base32
1114 "043122hfh56fbbszp1kwd1f65asgyn60j1ijday93hf2dkhvbrnh"))))
1115 (build-system python-build-system)
1116 (arguments
1117 ;; no tests
1118 '(#:tests? #f))
1119 (inputs
1120 `(("ffmpeg" ,ffmpeg)))
1121 (synopsis "Download videos, audios, or images from Web sites")
1122 (description
1123 "You-Get is a command-line utility to download media contents (videos,
1124 audio, images) from the Web. It can use either mpv or vlc for playback.")
1125 (home-page "https://you-get.org/")
1126 (license license:expat)))
1127
1128 (define-public libbluray
1129 (package
1130 (name "libbluray")
1131 (version "1.0.0")
1132 (source (origin
1133 (method url-fetch)
1134 (uri (string-append "https://download.videolan.org/videolan/"
1135 name "/" version "/"
1136 name "-" version ".tar.bz2"))
1137 (sha256
1138 (base32
1139 "1k3lag4lxi2jjd3zh4wcb5l3hadzm54j5kagh92yzfy76p9svqzp"))))
1140 (build-system gnu-build-system)
1141 (arguments
1142 `(#:configure-flags '("--disable-bdjava")
1143 #:phases
1144 (modify-phases %standard-phases
1145 (add-before 'build 'fix-dlopen-paths
1146 (lambda* (#:key inputs #:allow-other-keys)
1147 (let ((libaacs (assoc-ref inputs "libaacs"))
1148 (libbdplus (assoc-ref inputs "libbdplus")))
1149 (substitute* "src/libbluray/disc/aacs.c"
1150 (("\"libaacs\"")
1151 (string-append "\"" libaacs "/lib/libaacs\"")))
1152 (substitute* "src/libbluray/disc/bdplus.c"
1153 (("\"libbdplus\"")
1154 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1155 #t))))))
1156 (native-inputs `(("pkg-config" ,pkg-config)))
1157 (inputs
1158 `(("fontconfig" ,fontconfig)
1159 ("freetype" ,freetype)
1160 ("libaacs" ,libaacs)
1161 ("libbdplus" ,libbdplus)
1162 ("libxml2" ,libxml2)))
1163 (home-page "https://www.videolan.org/developers/libbluray.html")
1164 (synopsis "Blu-Ray Disc playback library")
1165 (description
1166 "libbluray is a library designed for Blu-Ray Disc playback for media
1167 players, like VLC or MPlayer.")
1168 (license license:lgpl2.1+)))
1169
1170 (define-public libdvdread
1171 (package
1172 (name "libdvdread")
1173 (version "5.0.3")
1174 (source (origin
1175 (method url-fetch)
1176 (uri (string-append "https://download.videolan.org/videolan/"
1177 name "/" version "/"
1178 name "-" version ".tar.bz2"))
1179 (sha256
1180 (base32
1181 "0ayqiq0psq18rcp6f5pz82sxsq66v0kwv0y55dbrcg68plnxy71j"))))
1182 (build-system gnu-build-system)
1183 (home-page "http://dvdnav.mplayerhq.hu/")
1184 (synopsis "Library for reading video DVDs")
1185 (description
1186 "Libdvdread provides a simple foundation for reading DVD video
1187 disks. It provides the functionality that is required to access many
1188 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1189 authentication and descrambling (if an external libdvdcss library is
1190 installed).")
1191 (license license:gpl2+)))
1192
1193 (define-public dvdauthor
1194 (package
1195 (name "dvdauthor")
1196 (version "0.7.2")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1201 version ".tar.gz"))
1202 (sha256
1203 (base32
1204 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1205 (build-system gnu-build-system)
1206 (inputs
1207 `(("libdvdread" ,libdvdread)
1208 ("libpng" ,libpng)
1209 ("imagemagick" ,imagemagick)
1210 ("libxml2" ,libxml2)
1211 ("freetype" ,freetype)))
1212 (native-inputs
1213 `(("pkg-config" ,pkg-config)))
1214 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1215 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1216 MPEG-2 stream containing VOB packets.")
1217 (home-page "http://dvdauthor.sourceforge.net")
1218 (license license:gpl3+)))
1219
1220 (define-public libdvdnav
1221 (package
1222 (name "libdvdnav")
1223 (version "5.0.3")
1224 (source (origin
1225 (method url-fetch)
1226 (uri (string-append "https://download.videolan.org/videolan/"
1227 name "/" version "/"
1228 name "-" version ".tar.bz2"))
1229 (sha256
1230 (base32
1231 "0v8byv5z598k06rqzdmj7739vc86xq3zf79zfr698dib7lz055sh"))))
1232 (build-system gnu-build-system)
1233 (native-inputs
1234 `(("pkg-config" ,pkg-config)))
1235 (inputs
1236 `(("libdvdread" ,libdvdread)))
1237 (home-page "http://dvdnav.mplayerhq.hu/")
1238 (synopsis "Library for video DVD navigation features")
1239 (description
1240 "Libdvdnav is a library for developers of multimedia
1241 applications. It allows easy use of sophisticated DVD navigation features
1242 such as DVD menus, multiangle playback and even interactive DVD games. All
1243 this functionality is provided through a simple API which provides the DVD
1244 playback as a single logical stream of blocks, intermitted by special
1245 dvdnav events to report certain conditions. The main usage of libdvdnav is
1246 a loop regularly calling a function to get the next block, surrounded by
1247 additional calls to tell the library of user interaction. The whole
1248 DVD virtual machine and internal playback states are completely
1249 encapsulated.")
1250 (license license:gpl2+)))
1251
1252 (define-public libdvdnav-4
1253 (package
1254 (inherit libdvdnav)
1255 (version "4.2.1")
1256 (source (origin
1257 (method url-fetch)
1258 (uri
1259 (string-append
1260 "https://download.videolan.org/videolan/libdvdnav/libdvdnav-"
1261 version ".tar.xz"))
1262 (sha256
1263 (base32
1264 "0wi3gy408c8xj0ism0hckv5jbfh3lg4pmgxv87gbch9jrhp2gjkz"))))
1265 (native-inputs
1266 `(("pkg-config" ,pkg-config)
1267 ("autoconf" ,autoconf)
1268 ("automake" ,automake)
1269 ("libtool" ,libtool)))
1270 (arguments
1271 '(#:phases
1272 (alist-cons-after
1273 'unpack 'autoreconf
1274 (lambda _
1275 (zero? (system* "autoreconf" "-vif")))
1276 %standard-phases)))))
1277
1278 (define-public libdvdcss
1279 (package
1280 (name "libdvdcss")
1281 (version "1.4.0")
1282 (source (origin
1283 (method url-fetch)
1284 (uri (string-append "https://download.videolan.org/pub/"
1285 name "/" version "/"
1286 name "-" version ".tar.bz2"))
1287 (sha256
1288 (base32
1289 "0nl45ifc4xcb196snv9d6hinfw614cqpzcqp92dg43c0hickg290"))))
1290 (build-system gnu-build-system)
1291 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1292 (synopsis "Library for accessing DVDs as block devices")
1293 (description
1294 "libdvdcss is a simple library designed for accessing DVDs like a block
1295 device without having to bother about the decryption.")
1296 (license license:gpl2+)))
1297
1298 (define-public srt2vtt
1299 (package
1300 (name "srt2vtt")
1301 (version "0.1")
1302 (source (origin
1303 (method url-fetch)
1304 (uri (string-append
1305 "http://dthompson.us/releases/srt2vtt/srt2vtt-"
1306 version ".tar.gz"))
1307 (sha256
1308 (base32
1309 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1310 (build-system gnu-build-system)
1311 (inputs
1312 `(("guile" ,guile-2.0)))
1313 (synopsis "SubRip to WebVTT subtitle converter")
1314 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1315 for use with HTML5 video.")
1316 (home-page "http://dthompson.us/pages/software/srt2vtt")
1317 (license license:gpl3+)))
1318
1319 (define-public avidemux
1320 (package
1321 (name "avidemux")
1322 (version "2.6.12")
1323 (source (origin
1324 (method url-fetch)
1325 (uri (string-append
1326 "mirror://sourceforge/" name "/" name "/" version "/"
1327 name "_" version ".tar.gz"))
1328 (sha256
1329 (base32
1330 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1331 (patches (search-patches "avidemux-install-to-lib.patch"))))
1332 (build-system cmake-build-system)
1333 (native-inputs
1334 `(("pkg-config" ,pkg-config)))
1335 ;; FIXME: Once packaged, add libraries not found during the build.
1336 (inputs
1337 `(("alsa-lib" ,alsa-lib)
1338 ("fontconfig" ,fontconfig)
1339 ("freetype" ,freetype)
1340 ("fribidi" ,fribidi)
1341 ("glu" ,glu)
1342 ("jack" ,jack-1)
1343 ("lame" ,lame)
1344 ("libva" ,libva)
1345 ("libvdpau" ,libvdpau)
1346 ("libvorbis" ,libvorbis)
1347 ("libvpx" ,libvpx)
1348 ("libxv" ,libxv)
1349 ("perl" ,perl)
1350 ("pulseaudio" ,pulseaudio)
1351 ("python" ,python-wrapper)
1352 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1353 ;("qtbase" ,qtbase) with -std=gnu++11.
1354 ;("qttools" ,qttools)
1355 ("sdl" ,sdl)
1356 ("sqlite" ,sqlite)
1357 ("yasm" ,yasm)
1358 ("zlib" ,zlib)))
1359 (arguments
1360 `(#:tests? #f ; no check target
1361 #:phases
1362 ;; Make sure files inside the included ffmpeg tarball are
1363 ;; patch-shebanged.
1364 (modify-phases %standard-phases
1365 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1366 (lambda _
1367 (with-directory-excursion "avidemux_core/ffmpeg_package"
1368 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1369 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1370 (add-after 'patch-source-shebangs 'repack-ffmpeg
1371 (lambda _
1372 (with-directory-excursion "avidemux_core/ffmpeg_package"
1373 (substitute* "ffmpeg-2.7.6/configure"
1374 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1375 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1376 ;; avoid non-determinism in the archive
1377 "--sort=name" "--mtime=@0"
1378 "--owner=root:0" "--group=root:0")
1379 (delete-file-recursively "ffmpeg-2.7.6"))))
1380 (replace 'configure
1381 (lambda _
1382 ;; Copy-paste settings from the cmake build system.
1383 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1384 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1385 (replace 'build
1386 (lambda* (#:key inputs outputs #:allow-other-keys)
1387 (let*
1388 ((out (assoc-ref outputs "out"))
1389 (lib (string-append out "/lib"))
1390 (top (getcwd))
1391 (sdl (assoc-ref inputs "sdl"))
1392 (build_component
1393 (lambda* (component srcdir #:optional (args '()))
1394 (let ((builddir (string-append "build_" component)))
1395 (mkdir builddir)
1396 (with-directory-excursion builddir
1397 (zero?
1398 (and
1399 (apply system* "cmake"
1400 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1401 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1402 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1403 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1404 "\"-Wl,-rpath=" lib "\"")
1405 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1406 (string-append "-DSDL_INCLUDE_DIR="
1407 sdl "/include/SDL")
1408 (string-append "../" srcdir)
1409 "-DENABLE_QT5=True"
1410 args)
1411 (system* "make" "-j"
1412 (number->string (parallel-job-count)))
1413 (system* "make" "install"))))))))
1414 (mkdir out)
1415 (and (build_component "core" "avidemux_core")
1416 (build_component "cli" "avidemux/cli")
1417 (build_component "qt4" "avidemux/qt4")
1418 (build_component "plugins_common" "avidemux_plugins"
1419 '("-DPLUGIN_UI=COMMON"))
1420 (build_component "plugins_cli" "avidemux_plugins"
1421 '("-DPLUGIN_UI=CLI"))
1422 (build_component "plugins_qt4" "avidemux_plugins"
1423 '("-DPLUGIN_UI=QT4"))
1424 (build_component "plugins_settings" "avidemux_plugins"
1425 '("-DPLUGIN_UI=SETTINGS")))
1426 ;; Remove .exe and .dll file.
1427 (delete-file-recursively
1428 (string-append out "/share/ADM6_addons")))))
1429 (delete 'install))))
1430 (home-page "http://fixounet.free.fr/avidemux/")
1431 (synopsis "Video editor")
1432 (description "Avidemux is a video editor designed for simple cutting,
1433 filtering and encoding tasks. It supports many file types, including AVI,
1434 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1435 can be automated using projects, job queue and powerful scripting
1436 capabilities.")
1437 ;; Software with various licenses is included, see License.txt.
1438 (license license:gpl2+)))
1439
1440 (define-public vapoursynth
1441 (package
1442 (name "vapoursynth")
1443 (version "37")
1444 (source (origin
1445 (method url-fetch)
1446 (uri (string-append
1447 "https://github.com/vapoursynth/vapoursynth/archive/R"
1448 version ".tar.gz"))
1449 (file-name (string-append name "-" version ".tar.gz"))
1450 (sha256
1451 (base32
1452 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1453 (build-system gnu-build-system)
1454 (native-inputs
1455 `(("autoconf" ,autoconf)
1456 ("automake" ,automake)
1457 ("cython" ,python-cython)
1458 ("libtool" ,libtool)
1459 ("pkg-config" ,pkg-config)
1460 ("python" ,python)
1461 ("yasm" ,yasm)))
1462 (inputs
1463 `(("ffmpeg" ,ffmpeg)
1464 ("libass" ,libass)
1465 ("tesseract-ocr" ,tesseract-ocr)
1466 ("zimg" ,zimg)))
1467 (arguments
1468 '(#:phases
1469 (modify-phases %standard-phases
1470 (add-after
1471 'unpack 'autogen
1472 (lambda _
1473 (zero? (system* "sh" "autogen.sh")))))))
1474 (home-page "http://www.vapoursynth.com/")
1475 (synopsis "Video processing framework")
1476 (description "VapourSynth is a C++ library and Python module for video
1477 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1478 multithreading, generalized colorspaces, per frame properties, and videos with
1479 format changes.")
1480 ;; src/core/cpufeatures only allows x86, ARM or PPC
1481 (supported-systems (delete "mips64el-linux" %supported-systems))
1482 ;; As seen from the source files.
1483 (license license:lgpl2.1+)))
1484
1485 (define-public xvid
1486 (package
1487 (name "xvid")
1488 (version "1.3.4")
1489 (source (origin
1490 (method url-fetch)
1491 (uri (string-append
1492 "http://downloads.xvid.org/downloads/xvidcore-"
1493 version ".tar.bz2"))
1494 (sha256
1495 (base32
1496 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1497 (build-system gnu-build-system)
1498 (native-inputs `(("yasm" ,yasm)))
1499 (arguments
1500 '(#:phases
1501 (modify-phases %standard-phases
1502 (add-before
1503 'configure 'pre-configure
1504 (lambda _
1505 (chdir "build/generic")
1506 (substitute* "configure"
1507 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1508 ;; No 'check' target.
1509 #:tests? #f))
1510 (home-page "https://www.xvid.com/")
1511 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1512 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1513 codec library. It uses ASP features such as b-frames, global and quarter
1514 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1515 and custom quantization matrices.")
1516 (license license:gpl2+)))
1517
1518 (define-public livestreamer
1519 (package
1520 (name "livestreamer")
1521 (version "1.12.2")
1522 (source (origin
1523 (method url-fetch)
1524 (uri (string-append
1525 "https://github.com/chrippa/livestreamer/archive/v"
1526 version ".tar.gz"))
1527 (file-name (string-append "livestreamer-" version ".tar.gz"))
1528 (sha256
1529 (base32
1530 "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd"))))
1531 (build-system python-build-system)
1532 (arguments
1533 '(#:tests? #f)) ; tests rely on external web servers
1534 (propagated-inputs
1535 `(("python-requests" ,python-requests)))
1536 (synopsis "Internet video stream viewer")
1537 (description "Livestreamer is a command-line utility that extracts streams
1538 from various services and pipes them into a video playing application.")
1539 (home-page "http://livestreamer.io/")
1540 (license license:bsd-2)))
1541
1542 (define-public mlt
1543 (package
1544 (name "mlt")
1545 (version "6.4.1")
1546 (source (origin
1547 (method url-fetch)
1548 (uri (string-append "https://github.com/mltframework/mlt/"
1549 "archive/v" version ".tar.gz"))
1550 (file-name (string-append name "-" version ".tar.gz"))
1551 (sha256
1552 (base32
1553 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))))
1554 (build-system gnu-build-system)
1555 (arguments
1556 `(#:tests? #f ; no tests
1557 #:make-flags '("CC=gcc")
1558 #:configure-flags
1559 (list "--enable-gpl3"
1560 "--enable-gpl")
1561 #:phases
1562 (modify-phases %standard-phases
1563 (add-after
1564 'configure 'override-LDFLAGS
1565 (lambda* (#:key outputs #:allow-other-keys)
1566 (substitute* "config.mak"
1567 (("LDFLAGS\\+=")
1568 (string-append "LDFLAGS+=-Wl,-rpath="
1569 (assoc-ref outputs "out")
1570 "/lib ")))
1571 #t)))))
1572 (inputs
1573 `(("alsa-lib" ,alsa-lib)
1574 ("fftw" ,fftw)
1575 ("libxml2" ,libxml2)
1576 ("jack" ,jack-1)
1577 ("ladspa" ,ladspa)
1578 ("libsamplerate" ,libsamplerate)
1579 ("pulseaudio" ,pulseaudio)
1580 ("sdl" ,sdl)
1581 ("sox" ,sox)))
1582 (native-inputs
1583 `(("pkg-config" ,pkg-config)))
1584 (home-page "https://www.mltframework.org/")
1585 (synopsis "Author, manage, and run multitrack audio/video compositions")
1586 (description
1587 "MLT is a multimedia framework, designed and developed for television
1588 broadcasting. It provides a toolkit for broadcasters, video editors, media
1589 players, transcoders, web streamers and many more types of applications. The
1590 functionality of the system is provided via an assortment of ready to use
1591 tools, XML authoring components, and an extensible plug-in based API.")
1592 (license license:lgpl2.1+)))
1593
1594 (define-public v4l-utils
1595 (package
1596 (name "v4l-utils")
1597 (version "1.12.5")
1598 (source (origin
1599 (method url-fetch)
1600 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1601 "/v4l-utils-" version ".tar.bz2"))
1602 (sha256
1603 (base32
1604 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1605 (build-system gnu-build-system)
1606 (arguments
1607 '(#:configure-flags
1608 (list (string-append "--with-udevdir="
1609 (assoc-ref %outputs "out")
1610 "/lib/udev")
1611 "CXXFLAGS=-std=gnu++11")))
1612 (native-inputs
1613 `(("perl" ,perl)
1614 ("pkg-config" ,pkg-config)))
1615 (inputs
1616 `(("alsa-lib" ,alsa-lib)
1617 ("glu" ,glu)
1618 ("libjpeg" ,libjpeg)
1619 ("libx11" ,libx11)
1620 ("qtbase" ,qtbase)
1621 ("eudev" ,eudev)))
1622 (synopsis "Realtime video capture utilities for Linux")
1623 (description "The v4l-utils provide a series of libraries and utilities to
1624 be used for realtime video capture via Linux-specific APIs.")
1625 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1626 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1627 (license (list license:lgpl2.1+ license:gpl2))))
1628
1629 (define-public obs
1630 (package
1631 (name "obs")
1632 (version "18.0.2")
1633 (source (origin
1634 (method url-fetch)
1635 (uri (string-append "https://github.com/jp9000/obs-studio"
1636 "/archive/" version ".tar.gz"))
1637 (file-name (string-append name "-" version ".tar.gz"))
1638 (sha256
1639 (base32
1640 "02pbiyvf5x0zh448h5rpmyn33qnsqk694xxlyns83mdi74savyqw"))))
1641 (build-system cmake-build-system)
1642 (arguments
1643 `(#:tests? #f)) ; no tests
1644 (native-inputs
1645 `(("pkg-config" ,pkg-config)))
1646 (inputs
1647 `(("alsa-lib" ,alsa-lib)
1648 ("curl" ,curl)
1649 ("eudev" ,eudev)
1650 ("ffmpeg" ,ffmpeg)
1651 ("fontconfig" ,fontconfig)
1652 ("freetype" ,freetype)
1653 ("jack" ,jack-1)
1654 ("jansson" ,jansson)
1655 ("libx264" ,libx264)
1656 ("libxcomposite" ,libxcomposite)
1657 ("mesa" ,mesa)
1658 ("pulseaudio" ,pulseaudio)
1659 ("qtbase" ,qtbase)
1660 ("qtx11extras" ,qtx11extras)
1661 ("speex" ,speex)
1662 ("v4l-utils" ,v4l-utils)
1663 ("zlib" ,zlib)))
1664 (synopsis "Live streaming software")
1665 (description "Open Broadcaster Software provides a graphical interface for
1666 video recording and live streaming. OBS supports capturing audio and video
1667 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
1668 and JACK.")
1669 (home-page "https://obsproject.com")
1670 (supported-systems '("x86_64-linux" "i686-linux"))
1671 (license license:gpl2+)))
1672
1673 (define-public libvdpau
1674 (package
1675 (name "libvdpau")
1676 (version "1.1.1")
1677 (source
1678 (origin
1679 (method url-fetch)
1680 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1681 name "-" version ".tar.bz2"))
1682 (sha256
1683 (base32
1684 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
1685 (build-system gnu-build-system)
1686 (native-inputs
1687 `(("pkg-config" ,pkg-config)))
1688 (inputs
1689 `(("dri2proto" ,dri2proto)
1690 ("libx11" ,libx11 "out")
1691 ("libxext" ,libxext)))
1692 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1693 (synopsis "Video Decode and Presentation API")
1694 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
1695 provides an interface to video decode acceleration and presentation hardware
1696 present in modern GPUs.")
1697 (license (license:x11-style "file://COPYING"))))
1698
1699 (define-public vdpauinfo
1700 (package
1701 (name "vdpauinfo")
1702 (version "1.0")
1703 (source
1704 (origin
1705 (method url-fetch)
1706 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
1707 name "-" version ".tar.gz"))
1708 (sha256
1709 (base32
1710 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
1711 (build-system gnu-build-system)
1712 (native-inputs
1713 `(("pkg-config" ,pkg-config)
1714 ("libx11" ,libx11)))
1715 (propagated-inputs
1716 `(("libvdpau" ,libvdpau)))
1717 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
1718 (synopsis "Tool to query the capabilities of a VDPAU implementation")
1719 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
1720 implementation.")
1721 (license (license:x11-style "file://COPYING"))))
1722
1723 (define-public recordmydesktop
1724 (package
1725 (name "recordmydesktop")
1726 (version "0.3.8.1")
1727 (source (origin
1728 (method url-fetch)
1729 (uri (string-append "mirror://sourceforge/" name "/" name "/"
1730 version "/recordmydesktop-" version ".tar.gz"))
1731 (sha256
1732 (base32
1733 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
1734 (build-system gnu-build-system)
1735 (inputs `(("popt" ,popt)
1736 ("zlib" ,zlib)
1737 ("libx11" ,libx11)
1738 ("libice" ,libice)
1739 ("libsm" ,libsm)
1740 ("libxfixes" ,libxfixes)
1741 ("libxdamage" ,libxdamage)
1742 ("libxext" ,libxext)
1743 ("alsa-lib" ,alsa-lib)
1744 ("libvorbis" ,libvorbis)
1745 ("libtheora" ,libtheora)))
1746 (home-page "http://recordmydesktop.sourceforge.net/")
1747 (synopsis "Desktop session video recorder")
1748 (description
1749 "recordMyDesktop is a command-line tool that captures the activity in
1750 your graphical desktop and encodes it as a video. This is a useful tool for
1751 making @dfn{screencasts}.")
1752 (license license:gpl2+)))
1753
1754 (define-public libsmpeg
1755 (package
1756 (name "libsmpeg")
1757 (version "0.4.5")
1758 (source (origin
1759 (method svn-fetch)
1760 (uri (svn-reference
1761 (url "svn://svn.icculus.org/smpeg/trunk/")
1762 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
1763 (file-name (string-append name "-" version "-checkout"))
1764 (sha256
1765 (base32
1766 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
1767 (build-system gnu-build-system)
1768 (arguments
1769 `(#:phases (modify-phases %standard-phases
1770 (add-after 'unpack 'autogen.sh
1771 (lambda _
1772 (zero? (system* "sh" "autogen.sh")))))))
1773 (native-inputs
1774 `(("autoconf" ,autoconf)
1775 ("automake" ,automake)))
1776 (inputs
1777 `(("sdl" ,sdl2)))
1778 (home-page "http://icculus.org/smpeg/")
1779 (synopsis "SDL MPEG decoding library")
1780 (description
1781 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
1782 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
1783 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
1784 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
1785 and MPEG system streams.")
1786 (license (list license:expat
1787 license:lgpl2.1
1788 license:lgpl2.1+
1789 license:gpl2))))
1790
1791 (define-public libbdplus
1792 (package
1793 (name "libbdplus")
1794 (version "0.1.2")
1795 (source
1796 (origin
1797 (method url-fetch)
1798 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libbdplus/"
1799 version "/" name "-" version ".tar.bz2"))
1800 (sha256
1801 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
1802 (inputs
1803 `(("libgcrypt" ,libgcrypt)))
1804 (build-system gnu-build-system)
1805 (home-page "https://www.videolan.org/developers/libbdplus.html")
1806 (synopsis "Library for decrypting certain Blu-Ray discs")
1807 (description "libbdplus is a library which implements the BD+ System
1808 specifications.")
1809 (license license:lgpl2.1+)))
1810
1811 (define-public libaacs
1812 (package
1813 (name "libaacs")
1814 (version "0.9.0")
1815 (source
1816 (origin
1817 (method url-fetch)
1818 (uri (string-append "ftp://ftp.videolan.org/pub/videolan/libaacs/"
1819 version "/" name "-" version ".tar.bz2"))
1820 (sha256
1821 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
1822 (inputs
1823 `(("libgcrypt" ,libgcrypt)))
1824 (native-inputs
1825 `(("bison" ,bison)
1826 ("flex" ,flex)))
1827 (build-system gnu-build-system)
1828 (home-page "https://www.videolan.org/developers/libaacs.html")
1829 (synopsis "Library for decrypting certain Blu-Ray discs")
1830 (description "libaacs is a library which implements the Advanced Access
1831 Content System specification.")
1832 (license license:lgpl2.1+)))
1833
1834 (define-public mps-youtube
1835 (package
1836 (name "mps-youtube")
1837 (version "0.2.7.1")
1838 (source
1839 (origin
1840 (method url-fetch)
1841 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
1842 "archive/v" version ".tar.gz"))
1843 (file-name (string-append name "-" version ".tar.gz"))
1844 (sha256
1845 (base32
1846 "1s7h35yx6f0szf8mm8612ic913w3v05m2kwphjfcxnpq0ammhyci"))))
1847 (build-system python-build-system)
1848 (arguments
1849 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
1850 ;; test suite results differ depending on the country and also introduce
1851 ;; non-determinism in the tests.
1852 ;; https://github.com/mps-youtube/mps-youtube/issues/556
1853 `(#:tests? #f))
1854 (propagated-inputs
1855 `(("python-pafy" ,python-pafy)
1856 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
1857 (home-page "https://github.com/mps-youtube/mps-youtube")
1858 (synopsis "Terminal based YouTube player and downloader")
1859 (description
1860 "@code{mps-youtube} is based on mps, a terminal based program to
1861 search, stream and download music. This implementation uses YouTube as
1862 a source of content and can play and download video as well as audio.
1863 It can use either mpv or mplayer for playback, and for conversion of
1864 formats ffmpeg or libav is used. Users should install one of the
1865 supported players in addition to this package.")
1866 (license license:gpl3+)))
1867
1868 (define-public handbrake
1869 (package
1870 (name "handbrake")
1871 (version "0.10.5")
1872 (source (origin
1873 (method url-fetch)
1874 (uri (string-append "https://handbrake.fr/rotation.php?file="
1875 "HandBrake-" version ".tar.bz2"))
1876 (file-name (string-append "handbrake-" version ".tar.bz2"))
1877 (sha256
1878 (base32
1879 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
1880 (patches (search-patches "handbrake-pkg-config-path.patch"))
1881 (modules '((guix build utils)))
1882 (snippet
1883 ;; Remove bundled libraries and source not necessary for
1884 ;; running under a GNU environment.
1885 '(begin
1886 (for-each delete-file-recursively '("contrib" "macosx" "win"))
1887 #t))))
1888 (build-system glib-or-gtk-build-system)
1889 (native-inputs
1890 `(("automake" ,automake) ;gui subpackage must be bootstrapped
1891 ("autoconf" ,autoconf)
1892 ("curl" ,curl) ;not actually used, but tested for
1893 ("intltool" ,intltool)
1894 ("libtool" ,libtool)
1895 ("pkg-config" ,pkg-config)
1896 ("python" ,python-2))) ;for configuration
1897 (inputs
1898 `(("bzip2" ,bzip2)
1899 ("dbus-glib" ,dbus-glib)
1900 ("ffmpeg" ,ffmpeg)
1901 ("fontconfig" ,fontconfig)
1902 ("freetype" ,freetype)
1903 ("glib" ,glib)
1904 ("gstreamer" ,gstreamer)
1905 ("gst-plugins-base" ,gst-plugins-base)
1906 ("gtk+" ,gtk+)
1907 ("lame" ,lame)
1908 ("libass" ,libass)
1909 ("libbluray" ,libbluray)
1910 ("libdvdnav" ,libdvdnav)
1911 ("libdvdread" ,libdvdread)
1912 ("libgudev" ,libgudev)
1913 ("libmpeg2" ,libmpeg2)
1914 ("libnotify" ,libnotify)
1915 ("libogg" ,libogg)
1916 ("libsamplerate" ,libsamplerate)
1917 ("libtheora" ,libtheora)
1918 ("libvorbis" ,libvorbis)
1919 ("libvpx" ,libvpx)
1920 ("libxml2" ,libxml2)
1921 ("libx264" ,libx264)
1922 ("x265" ,x265)
1923 ("zlib" ,zlib)))
1924 (arguments
1925 `(#:tests? #f ;tests require Ruby and claim to be unsupported
1926 #:phases
1927 (modify-phases %standard-phases
1928 (add-before 'patch-source-shebangs 'bootstrap-gtk
1929 ;; Run bootstrap ahead of time so that shebangs get patched.
1930 (lambda _
1931 (setenv "CONFIG_SHELL" (which "sh"))
1932 (setenv "NOCONFIGURE" "1")
1933 ;; Patch the Makefile so that it doesn't bootstrap again.
1934 (substitute* "gtk/module.rules"
1935 ((".*autogen\\.sh.*") ""))
1936 (zero? (system* "sh" "./gtk/autogen.sh"))))
1937 (add-before 'configure 'disable-contrib
1938 (lambda _
1939 (substitute* "make/include/main.defs"
1940 ;; Disable unconditional inclusion of some "contrib"
1941 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
1942 ;; and libbluray), which would lead to fetching and
1943 ;; building of these libraries. Use our own instead.
1944 (("MODULES \\+= contrib") "# MODULES += contrib"))
1945 #t))
1946 (add-before 'configure 'fix-x265-linking
1947 (lambda _
1948 (substitute* "test/module.defs"
1949 ;; Fix missing library during linking error
1950 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
1951 #t))
1952 (replace 'configure
1953 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1954 ;; 'configure' is not an autoconf-generated script, and
1955 ;; errors on unrecognized arguments,
1956 ;; e.g. --enable-fast-install
1957 (let ((out (assoc-ref outputs "out")))
1958 (zero? (apply system* "./configure"
1959 (string-append "--prefix=" out)
1960 (or configure-flags '()))))))
1961 (add-after 'configure 'chdir-build
1962 (lambda _ (chdir "./build") #t)))))
1963 (home-page "https://handbrake.fr")
1964 (synopsis "Video transcoder")
1965 (description
1966 "HandBrake is a tool for converting video from any format to a selection
1967 of modern, widely supported codecs.")
1968 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
1969 (license (list license:gpl2+ license:bsd-3))))
1970
1971 (define-public openh264
1972 (package
1973 (name "openh264")
1974 (version "1.6.0")
1975 (source (origin
1976 (method url-fetch)
1977 (uri (string-append "https://github.com/cisco/"
1978 name "/archive/v" version ".tar.gz"))
1979 (file-name (string-append name "-" version ".tar.gz"))
1980 (sha256
1981 (base32
1982 "1ix2fhk62i4q4kbnkl0gfk4x53vxqavsn0pck1pashr566zhglv5"))))
1983 (build-system gnu-build-system)
1984 (native-inputs
1985 `(("nasm" ,nasm)
1986 ("python" ,python)))
1987 (arguments
1988 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1989 #:test-target "test"
1990 #:phases (modify-phases %standard-phases
1991 ;; no configure script
1992 (delete 'configure))))
1993 (home-page "http://www.openh264.org/")
1994 (synopsis "H264 decoder library")
1995 (description
1996 "Openh264 is a library which can decode H264 video streams.")
1997 (license license:bsd-2)))
1998
1999 (define-public libmp4v2
2000 (package
2001 (name "libmp4v2")
2002 (version "2.0.0")
2003 (source
2004 (origin
2005 (method url-fetch)
2006 ;; XXX: The new location of upstream is uncertain and will become relevant the
2007 ;; moment when the googlecode archive shuts down. It is past the date it
2008 ;; should've been turned off. I tried to communicate with upstream, but this
2009 ;; wasn't very responsive and not very helpful. The short summary is, it is
2010 ;; chaos when it comes to the amount of forks and only time will tell where
2011 ;; the new upstream location is.
2012 (uri (string-append "https://storage.googleapis.com/google-"
2013 "code-archive-downloads/v2/"
2014 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2015 (file-name (string-append name "-" version ".tar.bz2"))
2016 (sha256
2017 (base32
2018 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2019 (build-system gnu-build-system)
2020 (outputs '("out"
2021 "static")) ; 3.7MiB .a file
2022 (arguments
2023 `(#:phases
2024 (modify-phases %standard-phases
2025 (add-after 'unpack 'remove-dates
2026 (lambda _
2027 ;; Make the build reproducible.
2028 (substitute* "configure"
2029 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2030 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2031 #t))
2032 (add-after 'install 'move-static-libraries
2033 (lambda* (#:key outputs #:allow-other-keys)
2034 ;; Move static libraries to the "static" output.
2035 (let* ((out (assoc-ref outputs "out"))
2036 (lib (string-append out "/lib"))
2037 (static (assoc-ref outputs "static"))
2038 (slib (string-append static "/lib")))
2039 (mkdir-p slib)
2040 (for-each (lambda (file)
2041 (install-file file slib)
2042 (delete-file file))
2043 (find-files lib "\\.a$"))
2044 #t))))))
2045 (native-inputs
2046 `(("help2man" ,help2man)
2047 ("dejagnu" ,dejagnu)))
2048 (home-page "https://code.google.com/archive/p/mp4v2/")
2049 (synopsis "API to create and modify mp4 files")
2050 (description
2051 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2052 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2053 file format that has been used as a multimedia file format in a variety of platforms and
2054 applications. It is a very powerful and extensible format that can accommodate
2055 practically any type of media.")
2056 (license license:mpl1.1)))
2057
2058 (define-public libmediainfo
2059 (package
2060 (name "libmediainfo")
2061 (version "0.7.95")
2062 (source (origin
2063 (method url-fetch)
2064 (uri (string-append "https://mediaarea.net/download/source/"
2065 name "/" version"/"
2066 name "_" version ".tar.bz2"))
2067 (sha256
2068 (base32
2069 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2070 ;; TODO add a Big Buck Bunny webm for tests.
2071 (native-inputs
2072 `(("autoconf" ,autoconf)
2073 ("automake" ,automake)
2074 ("libtool" ,libtool)
2075 ("pkg-config" ,pkg-config)
2076 ("zlib" ,zlib)
2077 ("tinyxml2" ,tinyxml2)
2078 ("curl" ,curl)
2079 ("libzen" ,libzen)))
2080 (build-system gnu-build-system)
2081 (arguments
2082 '(#:tests? #f ; see above TODO
2083 #:phases
2084 ;; build scripts not in root of archive
2085 (modify-phases %standard-phases
2086 (add-before 'configure 'pre-configure
2087 (lambda _
2088 (chdir "Project/GNU/Library")))
2089 (add-before 'configure 'autogen
2090 (lambda _
2091 (zero? (system* "./autogen.sh")))))))
2092 (home-page "https://mediaarea.net/en/MediaInfo")
2093 (synopsis "Library for retrieving media metadata")
2094 (description "MediaInfo is a library used for retrieving technical
2095 information and other metadata about audio or video files. A non-exhaustive
2096 list of the information MediaInfo can retrieve from media files include:
2097
2098 @itemize
2099 @item General: title, author, director, album, track number, date, duration...
2100 @item Video: codec, aspect, fps, bitrate...
2101 @item Audio: codec, sample rate, channels, language, bitrate...
2102 @item Text: language of subtitle
2103 @item Chapters: number of chapters, list of chapters
2104 @end itemize
2105
2106 MediaInfo supports the following formats:
2107
2108 @itemize
2109 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2110 MPEG-2, MPEG-4, DVD (VOB)...
2111 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2112 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2113 @item Subtitles: SRT, SSA, ASS, SAMI...
2114 @end itemize\n")
2115 (license license:bsd-2)))
2116
2117 ;; TODO also have a GUI version available
2118 (define-public mediainfo
2119 (package
2120 (name "mediainfo")
2121 (version "0.7.95")
2122 (source (origin
2123 (method url-fetch)
2124 (uri (string-append "https://mediaarea.net/download/source/"
2125 name "/" version "/"
2126 name "_" version ".tar.bz2"))
2127 (sha256
2128 (base32
2129 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2130 (native-inputs
2131 `(("autoconf" ,autoconf)
2132 ("automake" ,automake)
2133 ("libtool" ,libtool)
2134 ("pkg-config" ,pkg-config)
2135 ("zlib" ,zlib)
2136 ("libmediainfo", libmediainfo)
2137 ("libzen" ,libzen)))
2138 (build-system gnu-build-system)
2139 (arguments
2140 '(#:tests? #f ; lacks tests
2141 #:phases
2142 ;; build scripts not in root of archive
2143 (modify-phases %standard-phases
2144 (add-before 'configure 'pre-configure
2145 (lambda _
2146 (chdir "Project/GNU/CLI")))
2147 (add-before 'configure 'autogen
2148 (lambda _
2149 (zero? (system* "./autogen.sh")))))))
2150 (home-page "https://mediaarea.net/en/MediaInfo")
2151 (synopsis "Utility for reading media metadata")
2152 (description "MediaInfo is a utility used for retrieving technical
2153 information and other metadata about audio or video files. It supports the
2154 many codecs and formats supported by libmediainfo.")
2155 (license license:bsd-2)))