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