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