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, 2018 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
8 ;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2015, 2016, 2017, 2018 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 Nils Gillmann <ng0@n0.is>
15 ;;; Copyright © 2016, 2018 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, 2018 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, 2018 Clément Lassieur <clement@lassieur.org>
23 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
24 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
25 ;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
26 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
27 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
28 ;;; Copyright © 2018 Leo Famulari <leo@famulari.name>
29 ;;; Copyright © 2018 Brendan Tildesley <brendan.tildesley@openmailbox.org>
30 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
31 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
32 ;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33 ;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
35 ;;; This file is part of GNU Guix.
37 ;;; GNU Guix is free software; you can redistribute it and/or modify it
38 ;;; under the terms of the GNU General Public License as published by
39 ;;; the Free Software Foundation; either version 3 of the License, or (at
40 ;;; your option) any later version.
42 ;;; GNU Guix is distributed in the hope that it will be useful, but
43 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
44 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45 ;;; GNU General Public License for more details.
47 ;;; You should have received a copy of the GNU General Public License
48 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50 (define-module (gnu packages video)
51 #:use-module (ice-9 match)
52 #:use-module (srfi srfi-1)
53 #:use-module (srfi srfi-26)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (guix utils)
56 #:use-module (guix packages)
57 #:use-module (guix download)
58 #:use-module (guix git-download)
59 #:use-module (guix svn-download)
60 #:use-module (guix build-system cmake)
61 #:use-module (guix build-system gnu)
62 #:use-module (guix build-system glib-or-gtk)
63 #:use-module (guix build-system meson)
64 #:use-module (guix build-system perl)
65 #:use-module (guix build-system python)
66 #:use-module (guix build-system waf)
67 #:use-module (guix build-system trivial)
68 #:use-module (gnu packages)
69 #:use-module (gnu packages algebra)
70 #:use-module (gnu packages assembly)
71 #:use-module (gnu packages audio)
72 #:use-module (gnu packages autotools)
73 #:use-module (gnu packages avahi)
74 #:use-module (gnu packages backup)
75 #:use-module (gnu packages base)
76 #:use-module (gnu packages bison)
77 #:use-module (gnu packages boost)
78 #:use-module (gnu packages cdrom)
79 #:use-module (gnu packages check)
80 #:use-module (gnu packages cmake)
81 #:use-module (gnu packages compression)
82 #:use-module (gnu packages cpp)
83 #:use-module (gnu packages curl)
84 #:use-module (gnu packages databases)
85 #:use-module (gnu packages dejagnu)
86 #:use-module (gnu packages docbook)
87 #:use-module (gnu packages documentation)
88 #:use-module (gnu packages elf)
89 #:use-module (gnu packages file)
90 #:use-module (gnu packages flex)
91 #:use-module (gnu packages fontutils)
92 #:use-module (gnu packages freedesktop)
93 #:use-module (gnu packages fribidi)
94 #:use-module (gnu packages gettext)
95 #:use-module (gnu packages ghostscript)
96 #:use-module (gnu packages gl)
97 #:use-module (gnu packages glib)
98 #:use-module (gnu packages guile)
99 #:use-module (gnu packages gnome)
100 #:use-module (gnu packages gnunet)
101 #:use-module (gnu packages gnupg)
102 #:use-module (gnu packages gstreamer)
103 #:use-module (gnu packages gtk)
104 #:use-module (gnu packages image)
105 #:use-module (gnu packages imagemagick)
106 #:use-module (gnu packages iso-codes)
107 #:use-module (gnu packages libidn)
108 #:use-module (gnu packages libreoffice)
109 #:use-module (gnu packages linux)
110 #:use-module (gnu packages lua)
111 #:use-module (gnu packages m4)
112 #:use-module (gnu packages man)
113 #:use-module (gnu packages mp3)
114 #:use-module (gnu packages ncurses)
115 #:use-module (gnu packages networking)
116 #:use-module (gnu packages ocr)
117 #:use-module (gnu packages perl)
118 #:use-module (gnu packages pkg-config)
119 #:use-module (gnu packages popt)
120 #:use-module (gnu packages pulseaudio)
121 #:use-module (gnu packages python)
122 #:use-module (gnu packages python-crypto)
123 #:use-module (gnu packages python-web)
124 #:use-module (gnu packages qt)
125 #:use-module (gnu packages rdesktop)
126 #:use-module (gnu packages ruby)
127 #:use-module (gnu packages samba)
128 #:use-module (gnu packages sdl)
129 #:use-module (gnu packages serialization)
130 #:use-module (gnu packages shells)
131 #:use-module (gnu packages ssh)
132 #:use-module (gnu packages swig)
133 #:use-module (gnu packages texinfo)
134 #:use-module (gnu packages textutils)
135 #:use-module (gnu packages tls)
136 #:use-module (gnu packages time)
137 #:use-module (gnu packages upnp)
138 #:use-module (gnu packages version-control)
139 #:use-module (gnu packages vulkan)
140 #:use-module (gnu packages web)
141 #:use-module (gnu packages webkit)
142 #:use-module (gnu packages wxwidgets)
143 #:use-module (gnu packages xdisorg)
144 #:use-module (gnu packages xiph)
145 #:use-module (gnu packages xml)
146 #:use-module (gnu packages xorg))
154 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
155 version "/" name "-" version ".tar.gz"))
158 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
159 (build-system gnu-build-system)
161 `(("makeinfo" ,texinfo)))
163 `(("ncurses" ,ncurses)))
166 (modify-phases %standard-phases
168 (lambda* (#:key build inputs outputs #:allow-other-keys)
169 ;; This old `configure' script doesn't support
170 ;; variables passed as arguments.
171 (let ((out (assoc-ref outputs "out"))
172 (ncurses (assoc-ref inputs "ncurses")))
173 (setenv "CONFIG_SHELL" (which "bash"))
174 (invoke "./configure"
175 (string-append "--prefix=" out)
176 (string-append "--build=" build)
177 ;; The ancient config.guess is unable to
178 ;; guess the host triplet on mips64el.
179 ,@(if (string=? "mips64el-linux"
181 '("--host=mips64el-unknown-linux-gnu")
183 ;; The same is also true with aarch64.
184 ,@(if (string=? "aarch64-linux"
186 '("--host=aarch64-unknown-linux-gnu")
188 (string-append "--with-ncurses="
190 (home-page "http://aa-project.sourceforge.net/aalib/")
191 (synopsis "ASCII-art library")
193 "AA-lib is a low level gfx library which does not require graphics device.
194 In fact, there is no graphical output possible. AA-lib replaces those
195 old-fashioned output methods with powerful ascii-art renderer.")
196 (license license:lgpl2.0+)))
198 (define-public liba52
205 ;; A mirror://sourceforge URI doesn't work, presumably
206 ;; because the SourceForge project is misconfigured.
207 "http://liba52.sourceforge.net/files/a52dec-" version
211 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
212 (patches (search-patches "liba52-enable-pic.patch"
213 "liba52-set-soname.patch"
214 "liba52-use-mtune-not-mcpu.patch"
215 "liba52-link-with-libm.patch"))))
216 (build-system gnu-build-system)
217 ;; XXX We need to run ./bootstrap because of the build system fixes above.
219 `(("autoconf" ,autoconf)
220 ("automake" ,automake)
221 ("libtool" ,libtool)))
222 (arguments `(#:configure-flags '("--enable-shared")
224 (modify-phases %standard-phases
225 ;; XXX We need to run ./bootstrap because of the build
226 ;; system fixes above.
228 (lambda _ (invoke "sh" "bootstrap"))))))
229 (home-page "http://liba52.sourceforge.net/")
230 (synopsis "ATSC A/52 stream decoder")
231 (description "liba52 is a library for decoding ATSC A/52 streams. The
232 A/52 standard is used in a variety of applications, including digital
233 television and DVD. It is also known as AC-3.")
234 (license license:gpl2+)))
236 (define-public libmpeg2
242 ;; A mirror://sourceforge URI doesn't work, presumably
243 ;; because the SourceForge project is misconfigured.
244 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
245 name "-" version ".tar.gz"))
248 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
256 (build-system gnu-build-system)
257 (home-page "http://libmpeg2.sourceforge.net/")
258 (synopsis "MPEG1 and MPEG2 video decoder library")
260 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
261 (license license:gpl2+)))
263 (define-public libx264
266 (version "20180810-2245")
269 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
270 "x264-snapshot-" version "-stable.tar.bz2"))
273 "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv"))))
274 (build-system gnu-build-system)
276 `(("pkg-config" ,pkg-config)
278 ;; TODO: Add gpac input
280 `(#:tests? #f ;no check target
281 #:configure-flags '("--enable-shared"
282 ;; Don't build the command-line program. If we
283 ;; want it later, we should do so in a different
284 ;; package to avoid a circular dependency (the x264
285 ;; program depends on ffmpeg and ffmpeg depends on
289 ;; On MIPS, we must pass "--disable-asm" or else
290 ;; configure fails after printing: "You specified a
291 ;; pre-MSA CPU in your CFLAGS. If you really want
292 ;; to run on such a CPU, configure with
294 ,@(if (string-prefix? "mips"
295 (or (%current-target-system)
299 (home-page "https://www.videolan.org/developers/x264.html")
300 (synopsis "H.264 video coding library")
301 (description "libx264 is an advanced encoding library for creating
302 H.264 (MPEG-4 AVC) video streams.")
303 (license (list license:gpl2+ ;most files
304 license:isc ;common/x86/x86inc.asm
305 license:lgpl2.1+ ;extras/getopt.c
306 license:bsd-3 ;extras/inttypes.h
307 (license:non-copyleft ;extras/cl*.h
309 "See extras/cl.h in the distribution.")))))
311 (define-public mkvtoolnix
318 (uri (string-append "https://mkvtoolnix.download/sources/"
319 name "-" version ".tar.xz"))
322 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
323 (modules '((guix build utils)))
325 ;; Delete bundled libraries.
326 (for-each delete-file-recursively
333 (build-system gnu-build-system)
340 ("libmatroska" ,libmatroska)
342 ("libvorbis" ,libvorbis)
349 `(("docbook-xsl" ,docbook-xsl)
350 ("gettext" ,gettext-minimal)
351 ("googletest" ,googletest)
353 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
355 ("pkg-config" ,pkg-config)
360 (list (string-append "--with-boost="
361 (assoc-ref %build-inputs "boost"))
362 (string-append "--with-docbook-xsl-root="
363 (assoc-ref %build-inputs "docbook-xsl")
364 "/xml/xsl/docbook-xsl-"
365 ,(package-version docbook-xsl))
366 (string-append "--with-extra-includes="
367 (assoc-ref %build-inputs "nlohmann-json-cpp")
368 "/include/nlohmann"))
370 (modify-phases %standard-phases
371 (add-before 'configure 'add-googletest
374 (string-append (assoc-ref %build-inputs "googletest")
375 "/include/gtest") "lib/gtest")
379 (let ((-j (list "-j" (number->string (parallel-job-count)))))
380 (apply invoke "rake" -j))))
383 (invoke "rake" "tests/unit")))
386 (invoke "rake" "install"))))))
387 (home-page "https://mkvtoolnix.download")
388 (synopsis "Tools to create, alter and inspect Matroska files")
390 "MKVToolNix provides tools for getting information about Matroska files
391 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
392 and creating Matroska files from other media files (@code{mkvmerge}).")
393 (license license:gpl2)))
399 (outputs '("out" "static"))
403 (uri (string-append "https://download.videolan.org/videolan/x265/"
404 "x265_" version ".tar.gz"))
407 "090hp4216isis8q5gb7bwzia8rfyzni54z21jnwm97x3hiy6ibpb"))
408 (patches (search-patches "x265-arm-flags.patch"
409 "x265-detect512-all-arches.patch"))
410 (modules '((guix build utils)))
412 (delete-file-recursively "source/compat/getopt")
414 (build-system cmake-build-system)
416 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
418 ;; Ensure position independent code for everyone.
419 (list "-DENABLE_PIC=TRUE"
420 ,@(if (string-prefix? "armhf" (or (%current-system)
421 (%current-target-system)))
422 '("-DENABLE_ASSEMBLY=OFF")
424 (string-append "-DCMAKE_INSTALL_PREFIX="
425 (assoc-ref %outputs "out")))
427 (modify-phases %standard-phases
428 (add-after 'unpack 'prepare-build
430 (delete-file-recursively "build")
432 ;; recognize armv8 in 32-bit mode as ARM
433 (substitute* "CMakeLists.txt"
434 (("armv6l") "armv8l"))
436 (add-before 'configure 'build-12-bit
437 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
438 (mkdir "../build-12bit")
439 (with-directory-excursion "../build-12bit"
442 "-DHIGH_BIT_DEPTH=ON"
447 (substitute* (cons "cmake_install.cmake"
449 (find-files "CMakeFiles/x265-shared.dir" ".")
450 (find-files "CMakeFiles/x265-static.dir" ".")))
451 (("libx265") "libx265_main12"))
453 (add-before 'configure 'build-10-bit
454 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
455 (mkdir "../build-10bit")
456 (with-directory-excursion "../build-10bit"
459 "-DHIGH_BIT_DEPTH=ON"
463 (substitute* (cons "cmake_install.cmake"
465 (find-files "CMakeFiles/x265-shared.dir" ".")
466 (find-files "CMakeFiles/x265-static.dir" ".")))
467 (("libx265") "libx265_main10"))
469 (add-after 'install 'install-more-libs
471 (with-directory-excursion "../build-12bit"
472 (invoke "make" "install"))
473 (with-directory-excursion "../build-10bit"
474 (invoke "make" "install"))))
475 (add-before 'strip 'move-static-libs
476 (lambda* (#:key outputs #:allow-other-keys)
477 (let ((out (assoc-ref outputs "out"))
478 (static (assoc-ref outputs "static")))
479 (mkdir-p (string-append static "/lib"))
480 (with-directory-excursion
481 (string-append out "/lib")
485 (string-append static "/lib/" file)))
486 (find-files "." "\\.a$"))))
488 (home-page "http://x265.org/")
489 (synopsis "Library for encoding h.265/HEVC video streams")
490 (description "x265 is a H.265 / HEVC video encoder application library,
491 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
492 (license license:gpl2+)))
494 (define-public libass
501 "https://github.com/libass/libass/releases/download/"
502 version "/libass-" version ".tar.xz"))
505 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
506 (build-system gnu-build-system)
508 `(("pkg-config" ,pkg-config)
511 `(("freetype" ,freetype)
513 ("fontconfig" ,fontconfig)
514 ("harfbuzz" ,harfbuzz)
516 (home-page "https://github.com/libass/libass")
517 (synopsis "Subtitle rendering library for the ASS/SSA format")
518 (description "libass is a subtitle rendering library for the
519 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
520 (license license:isc)))
522 (define-public libcaca
525 (version "0.99.beta19")
528 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
532 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
533 (build-system gnu-build-system)
534 (native-inputs `(("pkg-config" ,pkg-config)))
536 `(("freeglut" ,freeglut)
543 (home-page "http://caca.zoy.org/wiki/libcaca")
544 (synopsis "Colour ASCII-art library")
545 (description "libcaca is a graphics library that outputs text instead of
546 pixels, so that it can work on older video cards or text terminals. It
547 supports Unicode, 2048 colors, dithering of color images, and advanced text
549 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
551 (define-public libdca
558 "https://download.videolan.org/pub/videolan/libdca/"
559 version "/libdca-" version ".tar.bz2"))
562 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
563 (build-system gnu-build-system)
564 (home-page "https://www.videolan.org/developers/libdca.html")
565 (synopsis "DTS Coherent Acoustics decoder")
566 (description "libdca is a library for decoding DTS Coherent Acoustics
568 (license license:gpl2+)))
577 "mirror://sourceforge/" name "/" name "/"
578 version "/" name "-" version ".tar.gz"))
581 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
582 (build-system gnu-build-system)
583 (native-inputs `(("pkg-config" ,pkg-config)))
584 (inputs `(("libxv" ,libxv)))
585 (home-page "http://libdv.sourceforge.net/")
586 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
587 (description "The Quasar DV codec (libdv) is a software codec for DV
588 video, the encoding format used by most digital camcorders, typically those
589 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
590 developed according to the official standards for DV video: IEC 61834 and
592 (license license:lgpl2.1+)))
594 (define-public libmatroska
601 (uri (string-append "https://dl.matroska.org/downloads/"
602 name "/" name "-" version ".tar.xz"))
605 "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
606 (build-system cmake-build-system)
608 `(("libebml" ,libebml)))
611 (list "-DBUILD_SHARED_LIBS=YES")
612 #:tests? #f)) ; no test suite
613 (home-page "https://www.matroska.org")
614 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
616 "Matroska aims to become the standard of multimedia container formats.
617 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
618 of XML. EBML enables the Matroska Development Team to gain significant
619 advantages in terms of future format extensibility, without breaking file
620 support in old parsers.
621 libebml is a C++ library to read and write EBML files.")
622 (license license:lgpl2.1)))
632 ;; Newer releases are only available on GitHub.
633 (string-append "https://github.com/01org/libva/releases/download/"
634 version "/libva-" version ".tar.bz2")
635 ;; Keep the old URL around for compatibility.
636 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
637 "libva/libva-" version "/libva-" version ".tar.bz2")))
639 (base32 "1wjfrs261fp9wkhgpmrlz5smnhxrmsk31way646x6i2mg16a0v3g"))))
640 (build-system gnu-build-system)
642 `(("pkg-config" ,pkg-config)))
647 ("libxfixes" ,libxfixes)
649 ("wayland" ,wayland)))
652 (modify-phases %standard-phases
654 'build 'fix-dlopen-paths
655 (lambda* (#:key outputs #:allow-other-keys)
656 (let ((out (assoc-ref outputs "out")))
657 (substitute* "va/drm/va_drm_auth_x11.c"
658 (("\"libva-x11\\.so\\.%d\"")
659 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
661 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
662 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
664 (list (string-append "--with-drivers-path="
665 (assoc-ref %build-inputs "mesa") "/lib/dri"))
666 ;; However, we can't write to mesa's store directory, so override the
667 ;; following make variable to install the dummy driver to libva's
668 ;; $prefix/lib/dri directory.
670 (list (string-append "dummy_drv_video_ladir="
671 (assoc-ref %outputs "out") "/lib/dri"))))
672 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
673 (synopsis "Video acceleration library")
674 (description "The main motivation for VA-API (Video Acceleration API) is
675 to enable hardware accelerated video decode/encode at various
676 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
677 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
678 (license license:expat)))
680 (define-public ffmpeg
686 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
690 "150rrm549fy1x71c9whmyi5knyd9sliwvmcsm438bdgg4v8c93m3"))))
691 (build-system gnu-build-system)
693 `(("fontconfig" ,fontconfig)
694 ("freetype" ,freetype)
695 ("frei0r-plugins" ,frei0r-plugins)
701 ("libbluray" ,libbluray)
703 ("libcdio-paranoia" ,libcdio-paranoia)
704 ("libtheora" ,libtheora)
706 ("libvdpau" ,libvdpau)
707 ("libvorbis" ,libvorbis)
713 ("pulseaudio" ,pulseaudio)
725 ("pkg-config" ,pkg-config)
727 ("python" ,python-2) ; scripts use interpreter python2
731 `(#:test-target "fate"
733 ;; possible additional inputs:
734 ;; --enable-avisynth enable reading of AviSynth script
736 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
737 ;; --enable-libcelt enable CELT decoding via libcelt [no]
738 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
739 ;; and libraw1394 [no]
740 ;; --enable-libfaac enable AAC encoding via libfaac [no]
741 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
742 ;; --enable-libflite enable flite (voice synthesis) support via
744 ;; --enable-libgme enable Game Music Emu via libgme [no]
745 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
746 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
747 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
748 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
749 ;; --enable-libnut enable NUT (de)muxing via libnut,
750 ;; native (de)muxer exists [no]
751 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
752 ;; libopencore-amrnb [no]
753 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
754 ;; libopencore-amrwb [no]
755 ;; --enable-libopencv enable video filtering via libopencv [no]
756 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
758 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
759 ;; --enable-libschroedinger enable Dirac de/encoding via
760 ;; libschroedinger [no]
761 ;; --enable-libshine enable fixed-point MP3 encoding via
763 ;; --enable-libssh enable SFTP protocol via libssh [no]
764 ;; (libssh2 does not work)
765 ;; --enable-libstagefright-h264 enable H.264 decoding via
766 ;; libstagefright [no]
767 ;; --enable-libutvideo enable Ut Video encoding and decoding via
769 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
770 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
771 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
772 ;; libvo-amrwbenc [no]
773 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
774 ;; --enable-libxavs enable AVS encoding via xavs [no]
775 ;; --enable-libzmq enable message passing via libzmq [no]
776 ;; --enable-libzvbi enable teletext support via libzvbi [no]
777 ;; --enable-opencl enable OpenCL code
778 '("--enable-avresample"
779 "--enable-gpl" ; enable optional gpl licensed parts
782 "--enable-fontconfig"
789 "--enable-libfreetype"
790 "--enable-libmp3lame"
796 "--enable-libtwolame"
797 "--enable-libvidstab"
806 "--enable-runtime-cpudetect"
808 ;; The HTML pages take 7.2 MiB
809 "--disable-htmlpages"
811 ;; The static libraries are 23 MiB
814 ;; Runtime cpu detection is not implemented on
815 ;; MIPS, so we disable some features.
818 "--disable-mipsdspr2"
821 (modify-phases %standard-phases
824 ;; configure does not work followed by "SHELL=..." and
825 ;; "CONFIG_SHELL=..."; set environment variables instead
826 (lambda* (#:key outputs configure-flags #:allow-other-keys)
827 (let ((out (assoc-ref outputs "out")))
828 (substitute* "configure"
829 (("#! /bin/sh") (string-append "#!" (which "sh"))))
830 (setenv "SHELL" (which "bash"))
831 (setenv "CONFIG_SHELL" (which "bash"))
834 (string-append "--prefix=" out)
835 ;; Add $libdir to the RUNPATH of all the binaries.
836 (string-append "--extra-ldflags=-Wl,-rpath="
840 'check 'set-ld-library-path
842 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
844 (let* ((dso (find-files "." "\\.so$"))
845 (path (string-join (map dirname dso) ":")))
846 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
847 (setenv "LD_LIBRARY_PATH" path)
849 (home-page "https://www.ffmpeg.org/")
850 (synopsis "Audio and video framework")
851 (description "FFmpeg is a complete, cross-platform solution to record,
852 convert and stream audio and video. It includes the libavcodec
853 audio/video codec library.")
854 (license license:gpl2+)))
856 (define-public ffmpeg-3.4
862 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
866 "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l"))))))
868 (define-public ffmpeg-2.8
874 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
878 "065xbvnfmxfbfrc14cavpqyd2slil99vcjksw4ndb7w8zdh0wp3v"))))
880 (substitute-keyword-arguments (package-arguments ffmpeg)
881 ((#:configure-flags flags)
883 (if (string=? flag "--disable-mipsdsp")
884 "--disable-mipsdspr1"
888 (define-public ffmpegthumbnailer
890 (name "ffmpegthumbnailer")
894 (uri (string-append "https://github.com/dirkvdb/"
895 name "/archive/" version ".tar.gz"))
898 "13qs4iwd4l3iiim30s5051n80z0vgsnikym8vsn321cnm9algiwb"))))
899 (build-system cmake-build-system)
901 `(("pkg-config" ,pkg-config)))
904 ("libjpeg-turbo" ,libjpeg-turbo)
908 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
909 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
910 (synopsis "Create thumbnails from video files")
911 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
912 can be used by file managers to create thumbnails for your video files. The
913 thumbnailer uses ffmpeg to decode frames from the video files, so supported
914 videoformats depend on the configuration flags of ffmpeg.")
915 (license license:gpl2+)))
917 ;; Fix build with newer x264.
918 (define %vlc-libx264-compat.patch
921 (uri (string-append "https://git.videolan.org/?p=vlc.git;a=patch;h="
922 "a8953ba707cca1f2de372ca24513296bcfcdaaa8"))
923 (file-name "vlc-libx264-compat.patch")
926 "04igckbdp3sbp8vh0ihmhcf3yjyyk9r3cd5dm9mn9j6vipi1dg3g"))))
935 "https://download.videolan.org/pub/videolan/vlc/"
936 (car (string-split version #\-))
937 "/vlc-" version ".tar.xz"))
938 (patches (list %vlc-libx264-compat.patch))
941 "17jsq0zqpqyxw4ckvjba0hf6zk8ywc4wf8sy3z03hh3ij0vxpwq1"))))
942 (build-system gnu-build-system)
946 ("gettext" ,gettext-minimal)
947 ("git" ,git) ; needed for a test
948 ("pkg-config" ,pkg-config)))
949 ;; FIXME: Add optional inputs once available.
951 `(("alsa-lib" ,alsa-lib)
957 ("fontconfig" ,fontconfig)
958 ("freetype" ,freetype)
962 ("libarchive" ,libarchive)
964 ("libavc1394" ,libavc1394)
965 ("libbluray" ,libbluray)
969 ("libdvbpsi" ,libdvbpsi)
970 ("libdvdnav" ,libdvdnav)
971 ("libdvdread" ,libdvdread)
973 ("libgcrypt" ,libgcrypt)
977 ("libmatroska" ,libmatroska)
978 ("libmodplug" ,libmodplug)
979 ("libmpeg2" ,libmpeg2)
982 ("libraw1394" ,libraw1394)
984 ("libsamplerate" ,libsamplerate)
985 ("libsecret" ,libsecret)
989 ("libvdpau" ,libvdpau)
990 ("libvorbis" ,libvorbis)
992 ("libtheora" ,libtheora)
996 ("libxinerama" ,libxinerama)
999 ("livemedia-utils" ,livemedia-utils)
1004 ("pulseaudio" ,pulseaudio)
1005 ("python" ,python-wrapper)
1008 ("qtx11extras" ,qtx11extras)
1011 ("sdl-image" ,sdl-image)
1013 ("speexdsp" ,speexdsp)
1015 ("twolame" ,twolame)
1017 ("wayland" ,wayland)
1018 ("wayland-protocols" ,wayland-protocols)
1020 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1023 `("CXXFLAGS=-std=gnu++11"
1025 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1026 (assoc-ref %build-inputs "ffmpeg")
1027 "/lib")) ;needed for the tests
1030 (modify-phases %standard-phases
1031 (add-after 'unpack 'patch-source
1032 (lambda* (#:key inputs #:allow-other-keys)
1033 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
1034 (substitute* "configure"
1035 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1036 (string-append "LIVE555_PREFIX=" livemedia-utils)))
1037 ;; Some of the tests require using the display to test out VLC,
1038 ;; which fails in our sandboxed build system
1039 (substitute* "test/run_vlc.sh"
1040 (("./vlc --ignore-config") "echo"))
1042 ;; modules/text_renderer/freetype/text_layout.c uses a
1043 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
1044 ;; from fribidi.h, so for now we enable the use of deprecated
1045 ;; fribidi interfaces from this file.
1046 ;; FIXME: Try removing this for vlc >= 3.0.3.
1047 (substitute* "modules/text_renderer/freetype/text_layout.c"
1048 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
1050 ;; Fix build against Qt 5.11.
1051 (substitute* "modules/gui/qt/actions_manager.cpp"
1052 (("#include <vlc_keys.h>") "#include <vlc_keys.h>
1053 #include <QAction>"))
1054 (substitute* "modules/gui/qt/components/simple_preferences.cpp"
1055 (("#include <QFont>") "#include <QFont>
1056 #include <QButtonGroup>"))
1058 (add-after 'strip 'regenerate-plugin-cache
1059 (lambda* (#:key outputs #:allow-other-keys)
1060 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1061 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1062 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1063 ;; it references. Thus, we first reset the timestamps of all
1064 ;; these files, and then regenerate the cache such that the
1065 ;; mtimes it includes are always zero instead of being dependent
1066 ;; on the build time.
1067 (let* ((out (assoc-ref outputs "out"))
1068 (pkglibdir (string-append out "/lib/vlc"))
1069 (plugindir (string-append pkglibdir "/plugins"))
1070 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1071 ;; TODO: Factorize 'reset-timestamps'.
1072 (for-each (lambda (file)
1073 (let ((s (lstat file)))
1074 (unless (eq? (stat:type s) 'symlink)
1076 (find-files plugindir))
1077 (invoke cachegen plugindir))))
1078 (add-after 'install 'wrap-executable
1079 (lambda* (#:key outputs #:allow-other-keys)
1080 (let ((out (assoc-ref outputs "out"))
1081 (plugin-path (getenv "QT_PLUGIN_PATH")))
1082 (wrap-program (string-append out "/bin/vlc")
1083 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1085 (home-page "https://www.videolan.org/")
1086 (synopsis "Audio and video framework")
1087 (description "VLC is a cross-platform multimedia player and framework
1088 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
1089 treaming protocols.")
1090 (license license:gpl2+)))
1092 (define-public mplayer
1099 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
1103 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
1104 (build-system gnu-build-system)
1105 ;; FIXME: Add additional inputs once available.
1107 `(("pkg-config" ,pkg-config)))
1109 `(("alsa-lib" ,alsa-lib)
1110 ("cdparanoia" ,cdparanoia)
1111 ("ffmpeg" ,ffmpeg-3.4)
1112 ("fontconfig" ,fontconfig)
1113 ("freetype" ,freetype)
1114 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
1117 ("libdvdcss" ,libdvdcss)
1118 ("libdvdnav" ,libdvdnav)
1119 ("libjpeg" ,libjpeg)
1120 ("libmpeg2" ,libmpeg2)
1121 ("libmpg123" ,mpg123) ; audio codec for MP3
1123 ("libtheora" ,libtheora)
1124 ("libvdpau" ,libvdpau)
1125 ("libvorbis" ,libvorbis)
1127 ("libx264" ,libx264)
1128 ("libxinerama" ,libxinerama)
1130 ("libxxf86dga" ,libxxf86dga)
1134 ("pulseaudio" ,pulseaudio)
1135 ("python" ,python-wrapper)
1141 `(#:tests? #f ; no test target
1143 (modify-phases %standard-phases
1145 ;; configure does not work followed by "SHELL=..." and
1146 ;; "CONFIG_SHELL=..."; set environment variables instead
1147 (lambda* (#:key inputs outputs #:allow-other-keys)
1148 (let ((out (assoc-ref outputs "out"))
1149 (libx11 (assoc-ref inputs "libx11")))
1150 (substitute* "configure"
1151 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1152 (setenv "SHELL" (which "bash"))
1153 (setenv "CONFIG_SHELL" (which "bash"))
1154 (invoke "./configure"
1155 (string-append "--extra-cflags=-I"
1156 libx11 "/include") ; to detect libx11
1157 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1158 (string-append "--prefix=" out)
1159 ;; Enable runtime cpu detection where supported,
1160 ;; and choose a suitable target.
1161 ,@(match (or (%current-target-system)
1164 '("--enable-runtime-cpudetection"
1165 "--target=x86_64-linux"))
1167 '("--enable-runtime-cpudetection"
1168 "--target=i686-linux"))
1170 '("--target=mips3-linux"))
1171 (_ (list (string-append
1173 (or (%current-target-system)
1174 (nix-system->gnu-triplet
1175 (%current-system)))))))
1176 "--disable-iwmmxt")))))))
1177 (home-page "https://www.mplayerhq.hu/design7/news.html")
1178 (synopsis "Audio and video player")
1179 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1180 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1181 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1182 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1183 (license license:gpl2)))
1192 "https://github.com/mpv-player/mpv/archive/v" version
1196 "08x63hlpj6s8xixmdbx6raff5p5mih7cnk0bcql9f3wrs5hx9ygr"))
1197 (file-name (string-append name "-" version ".tar.gz"))))
1198 (build-system waf-build-system)
1200 `(("perl" ,perl) ; for zsh completion file
1201 ("pkg-config" ,pkg-config)
1202 ("python-docutils" ,python-docutils)))
1203 ;; Missing features: libguess, V4L2
1205 `(("alsa-lib" ,alsa-lib)
1212 ("libbluray" ,libbluray)
1213 ("libcaca" ,libcaca)
1214 ("libbs2b" ,libbs2b)
1215 ("libcdio-paranoia" ,libcdio-paranoia)
1216 ("libdvdread" ,libdvdread)
1217 ("libdvdnav" ,libdvdnav)
1218 ("libjpeg" ,libjpeg)
1220 ("libvdpau" ,libvdpau)
1222 ("libxext" ,libxext)
1223 ("libxinerama" ,libxinerama)
1224 ("libxrandr" ,libxrandr)
1225 ("libxscrnsaver" ,libxscrnsaver)
1227 ;; XXX: lua > 5.2 is not currently supported; see
1228 ;; waftools/checks/custom.py
1232 ("pulseaudio" ,pulseaudio)
1234 ("shaderc" ,shaderc)
1235 ("vulkan-headers" ,vulkan-headers)
1236 ("vulkan-loader" ,vulkan-loader)
1238 ("wayland" ,wayland)
1239 ("wayland-protocols" ,wayland-protocols)
1240 ("libxkbcommon" ,libxkbcommon)
1241 ("youtube-dl" ,youtube-dl)
1245 (modify-phases %standard-phases
1247 'configure 'setup-waf
1248 (lambda* (#:key inputs #:allow-other-keys)
1249 (let ((waf (assoc-ref inputs "waf")))
1250 (copy-file (string-append waf "/bin/waf") "waf"))
1253 #:configure-flags (list "--enable-libmpv-shared"
1258 "--disable-build-date")
1259 ;; No check function defined.
1261 (home-page "https://mpv.io/")
1262 (synopsis "Audio and video player")
1263 (description "mpv is a general-purpose audio and video player. It is a
1264 fork of mplayer2 and MPlayer. It shares some features with the former
1265 projects while introducing many more.")
1266 (license license:gpl2+)))
1268 (define-public gnome-mpv
1275 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1276 "/download/v" version "/gnome-mpv-" version
1280 "1y47abkidxh1il0bvq8r3dglwn3ggsy41x2n7ic3x23wvvcqmq74"))))
1282 `(("intltool" ,intltool)
1283 ("pkg-config" ,pkg-config)))
1286 ("libepoxy" ,libepoxy)
1288 (build-system glib-or-gtk-build-system)
1289 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1290 (synopsis "GTK+ frontend for the mpv media player")
1291 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1292 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1293 access to mpv's powerful playback capabilities.")
1294 (license license:gpl3+)))
1296 (define-public libvpx
1301 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1304 (url "https://chromium.googlesource.com/webm/libvpx")
1305 (commit (string-append "v" version))))
1306 (file-name (git-file-name name version))
1309 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1310 (patches (search-patches "libvpx-use-after-free-in-postproc.patch"
1311 "libvpx-CVE-2016-2818.patch"))))
1312 (build-system gnu-build-system)
1314 `(#:configure-flags (list "--enable-shared"
1316 ;; Limit size to avoid CVE-2015-1258
1317 "--size-limit=16384x16384"
1318 (string-append "--prefix=" (assoc-ref %outputs "out")))
1319 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1320 (assoc-ref %outputs "out") "/lib"))
1321 #:phases (modify-phases %standard-phases
1323 (lambda* (#:key configure-flags #:allow-other-keys)
1324 ;; The configure script does not understand some of the GNU
1325 ;; options, so we only add the flags specified above.
1326 (apply invoke "./configure" configure-flags))))
1327 #:tests? #f)) ; no check target
1331 (synopsis "VP8/VP9 video codec")
1332 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1333 (license license:bsd-3)
1334 (home-page "https://www.webmproject.org/")))
1336 (define-public youtube-dl
1339 (version "2018.11.07")
1342 (uri (string-append "https://yt-dl.org/downloads/"
1343 version "/youtube-dl-"
1347 "1rvc2m2kbm2kycqsa7fkcg5gql9f0w3hn1a7jg48zzl06ayggxk9"))))
1348 (build-system python-build-system)
1350 ;; The problem here is that the directory for the man page and completion
1351 ;; files is relative, and for some reason, setup.py uses the
1352 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1353 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1354 ;; completion file is called 'youtube-dl' rather than
1355 ;; 'youtube-dl.bash-completion'.
1356 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1357 #:phases (modify-phases %standard-phases
1358 (add-before 'install 'fix-the-data-directories
1359 (lambda* (#:key outputs #:allow-other-keys)
1360 (let ((prefix (assoc-ref outputs "out")))
1361 (mkdir "bash-completion")
1362 (rename-file "youtube-dl.bash-completion"
1363 "bash-completion/youtube-dl")
1364 (substitute* "setup.py"
1365 (("youtube-dl\\.bash-completion")
1366 "bash-completion/youtube-dl")
1368 (string-append "'" prefix "/etc/"))
1370 (string-append "'" prefix "/share/")))
1372 (synopsis "Download videos from YouTube.com and other sites")
1374 "Youtube-dl is a small command-line program to download videos from
1375 YouTube.com and many more sites.")
1376 (home-page "https://yt-dl.org")
1377 (license license:public-domain)))
1379 (define-public youtube-dl-gui
1381 (name "youtube-dl-gui")
1386 (uri (pypi-uri "Youtube-DLG" version))
1389 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1390 (build-system python-build-system)
1392 ;; In Guix, wxpython has not yet been packaged for Python 3.
1393 `(#:python ,python-2
1394 ;; This package has no tests.
1397 (modify-phases %standard-phases
1398 (add-before 'build 'patch-source
1399 (lambda* (#:key inputs #:allow-other-keys)
1400 ;; The youtube-dl-gui program lets you configure options. Some of
1401 ;; them are problematic, so we change their defaults.
1402 (substitute* "youtube_dl_gui/optionsmanager.py"
1403 ;; When this is true, the builder process will try (and fail) to
1404 ;; write logs to the builder user's home directory.
1405 (("'enable_log': True") "'enable_log': False")
1406 ;; This determines which youtube-dl program youtube-dl-gui will
1407 ;; run. If we don't set this, then youtube-dl-gui might download
1408 ;; an arbitrary copy from the Internet into the user's home
1409 ;; directory and run it, so let's make sure youtube-dl-gui uses
1410 ;; the youtube-dl from the inputs by default.
1411 (("'youtubedl_path': self.config_path")
1412 (string-append "'youtubedl_path': '"
1413 (assoc-ref inputs "youtube-dl")
1415 ;; When this is True, when youtube-dl-gui is finished downloading
1416 ;; a file, it will try (and possibly fail) to open the directory
1417 ;; containing the downloaded file. This can fail because it
1418 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1419 ;; adding xdg-utils to the propagated inputs is not enough to
1420 ;; make this work, so for now we set the default to False.
1421 (("'open_dl_dir': True") "'open_dl_dir': False"))
1422 ;; The youtube-dl program from the inputs is actually a wrapper
1423 ;; script written in bash, so attempting to invoke it as a python
1424 ;; script will fail.
1425 (substitute* "youtube_dl_gui/downloaders.py"
1426 (("cmd = \\['python', self\\.youtubedl_path\\]")
1427 "cmd = [self.youtubedl_path]"))
1428 ;; Use relative paths for installing data files so youtube-dl-gui
1429 ;; installs the files relative to its prefix in the store, rather
1430 ;; than relative to /. Also, instead of installing data files into
1431 ;; $prefix/usr/share, install them into $prefix/share for
1432 ;; consistency (see: (standards) Directory Variables).
1433 (substitute* "setup.py"
1434 (("= '/usr/share") "= 'share"))
1435 ;; Update get_locale_file() so it finds the installed localization
1437 (substitute* "youtube_dl_gui/utils.py"
1438 (("os\\.path\\.join\\('/usr', 'share'")
1439 (string-append "os.path.join('"
1440 (assoc-ref %outputs "out")
1441 "', 'share'"))))))))
1443 `(("python2-wxpython" ,python2-wxpython)
1444 ("youtube-dl" ,youtube-dl)))
1445 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1447 "GUI (Graphical User Interface) for @command{youtube-dl}")
1449 "Youtube-dlG is a GUI (Graphical User Interface) for
1450 @command{youtube-dl}. You can use it to download videos from YouTube and any
1451 other site that youtube-dl supports.")
1452 (license license:unlicense)))
1454 (define-public you-get
1457 (version "0.4.1077")
1461 (url "https://github.com/soimort/you-get.git")
1462 (commit (string-append "v" version))))
1463 (file-name (git-file-name name version))
1466 "1rwkn3wb3r70b8cqj40qdknkg9kqbgzkvi901hbpy2a8s1b7858n"))))
1467 (build-system python-build-system)
1469 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1472 (modify-phases %standard-phases
1473 (add-after 'unpack 'qualify-input-references
1474 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1475 ;; happens to be in the user's $PATH at run time.
1476 (lambda* (#:key inputs #:allow-other-keys)
1477 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1479 (substitute* "src/you_get/processor/ffmpeg.py"
1480 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1481 ;; same string is also used when sniffing ffmpeg's output.
1482 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1483 (string-append prefix "'" ffmpeg "'")))
1485 #:tests? #f)) ; XXX some tests need Internet access
1486 (synopsis "Download videos, audio, or images from Web sites")
1488 "You-Get is a command-line utility to download media contents (videos,
1489 audio, images) from the Web. It can use either mpv or vlc for playback.")
1490 (home-page "https://you-get.org/")
1491 (license license:expat)))
1493 (define-public youtube-viewer
1495 (name "youtube-viewer")
1500 (url "https://github.com/trizen/youtube-viewer.git")
1502 (file-name (git-file-name name version))
1505 "0axgb95lx81psgrb2a5rfdd8gl4mhsrzf41jas6l58d1xkaj54ri"))))
1506 (build-system perl-build-system)
1508 `(("perl-module-build" ,perl-module-build)))
1509 ;; FIXME: Add optional dependencies once available:
1510 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1512 `(("perl-data-dump" ,perl-data-dump)
1513 ("perl-file-sharedir" ,perl-file-sharedir)
1514 ("perl-gtk2" ,perl-gtk2)
1515 ("perl-json" ,perl-json)
1516 ("perl-libwww" ,perl-libwww)
1517 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1518 ("perl-mozilla-ca" ,perl-mozilla-ca)
1519 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1521 `(#:modules ((guix build perl-build-system)
1524 #:module-build-flags '("--gtk")
1526 (modify-phases %standard-phases
1527 (add-after 'install 'wrap-program
1528 (lambda* (#:key outputs #:allow-other-keys)
1529 (let* ((out (assoc-ref outputs "out"))
1530 (bin-dir (string-append out "/bin/"))
1531 (site-dir (string-append out "/lib/perl5/site_perl/"))
1532 (lib-path (getenv "PERL5LIB")))
1533 (for-each (cut wrap-program <>
1534 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1535 (find-files bin-dir))
1538 "Lightweight application for searching and streaming videos from YouTube")
1540 "Youtube-viewer searches and plays YouTube videos in a native player.
1541 It comes with various search options; it can search for videos, playlists
1542 and/or channels. The videos are streamed directly in a selected video player
1543 at the best resolution (customizable) and with closed-captions (if available).
1544 Both command-line and GTK2 interface are available.")
1545 (home-page "https://github.com/trizen/youtube-viewer")
1546 (license license:perl-license)))
1548 (define-public libbluray
1554 (uri (string-append "https://download.videolan.org/videolan/"
1555 name "/" version "/"
1556 name "-" version ".tar.bz2"))
1559 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1560 (build-system gnu-build-system)
1562 `(#:configure-flags '("--disable-bdjava-jar")
1564 (modify-phases %standard-phases
1565 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1566 ;; Avoid the need to propagate libxml2 by referring to it
1567 ;; directly, as is already done for fontconfig & freetype.
1568 (lambda* (#:key inputs #:allow-other-keys)
1569 (let ((libxml2 (assoc-ref inputs "libxml2")))
1570 (substitute* "configure"
1571 ((" libxml-2.0") ""))
1572 (substitute* "src/libbluray.pc.in"
1573 (("^Libs.private:" field)
1574 (string-append field " -L" libxml2 "/lib -lxml2")))
1576 (add-before 'build 'fix-dlopen-paths
1577 (lambda* (#:key inputs #:allow-other-keys)
1578 (let ((libaacs (assoc-ref inputs "libaacs"))
1579 (libbdplus (assoc-ref inputs "libbdplus")))
1580 (substitute* "src/libbluray/disc/aacs.c"
1582 (string-append "\"" libaacs "/lib/libaacs\"")))
1583 (substitute* "src/libbluray/disc/bdplus.c"
1585 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1587 (native-inputs `(("pkg-config" ,pkg-config)))
1589 `(("fontconfig" ,fontconfig)
1590 ("freetype" ,freetype)
1591 ("libaacs" ,libaacs)
1592 ("libbdplus" ,libbdplus)
1593 ("libxml2" ,libxml2)))
1594 (home-page "https://www.videolan.org/developers/libbluray.html")
1595 (synopsis "Blu-Ray Disc playback library")
1597 "libbluray is a library designed for Blu-Ray Disc playback for media
1598 players, like VLC or MPlayer.")
1599 (license license:lgpl2.1+)))
1601 (define-public libdvdread
1607 (uri (string-append "https://download.videolan.org/videolan/"
1608 name "/" version "/"
1609 name "-" version ".tar.bz2"))
1612 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1613 (build-system gnu-build-system)
1615 `(#:configure-flags '("--with-libdvdcss=yes")))
1617 `(("pkg-config" ,pkg-config)))
1619 `(("libdvdcss" ,libdvdcss)))
1620 (home-page "http://dvdnav.mplayerhq.hu/")
1621 (synopsis "Library for reading video DVDs")
1623 "Libdvdread provides a simple foundation for reading DVD video
1624 disks. It provides the functionality that is required to access many
1625 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1626 authentication and descrambling (if an external libdvdcss library is
1628 (license license:gpl2+)))
1630 (define-public dvdauthor
1637 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1641 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1642 (build-system gnu-build-system)
1644 `(("libdvdread" ,libdvdread)
1646 ("imagemagick" ,imagemagick)
1647 ("libxml2" ,libxml2)
1648 ("freetype" ,freetype)))
1650 `(("pkg-config" ,pkg-config)))
1651 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1652 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1653 MPEG-2 stream containing VOB packets.")
1654 (home-page "http://dvdauthor.sourceforge.net")
1655 (license license:gpl3+)))
1657 (define-public libdvdnav
1663 (uri (string-append "https://download.videolan.org/videolan/"
1664 name "/" version "/"
1665 name "-" version ".tar.bz2"))
1668 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1669 (build-system gnu-build-system)
1671 `(("pkg-config" ,pkg-config)))
1673 `(("libdvdread" ,libdvdread)))
1674 (home-page "http://dvdnav.mplayerhq.hu/")
1675 (synopsis "Library for video DVD navigation features")
1677 "Libdvdnav is a library for developers of multimedia
1678 applications. It allows easy use of sophisticated DVD navigation features
1679 such as DVD menus, multiangle playback and even interactive DVD games. All
1680 this functionality is provided through a simple API which provides the DVD
1681 playback as a single logical stream of blocks, intermitted by special
1682 dvdnav events to report certain conditions. The main usage of libdvdnav is
1683 a loop regularly calling a function to get the next block, surrounded by
1684 additional calls to tell the library of user interaction. The whole
1685 DVD virtual machine and internal playback states are completely
1687 (license license:gpl2+)))
1689 (define-public libdvdcss
1695 (uri (string-append "https://download.videolan.org/pub/"
1696 name "/" version "/"
1697 name "-" version ".tar.bz2"))
1700 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1701 (build-system gnu-build-system)
1702 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1703 (synopsis "Library for accessing DVDs as block devices")
1705 "libdvdcss is a simple library designed for accessing DVDs like a block
1706 device without having to bother about the decryption.")
1707 (license license:gpl2+)))
1709 (define-public srt2vtt
1716 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1720 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1721 (build-system gnu-build-system)
1723 `(("guile" ,guile-2.0)))
1724 (synopsis "SubRip to WebVTT subtitle converter")
1725 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1726 for use with HTML5 video.")
1727 (home-page "https://dthompson.us/projects/srt2vtt.html")
1728 (license license:gpl3+)))
1730 (define-public avidemux
1737 "mirror://sourceforge/" name "/" name "/" version "/"
1738 name "_" version ".tar.gz"))
1741 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1742 (patches (search-patches "avidemux-install-to-lib.patch"))))
1743 (build-system cmake-build-system)
1745 `(("pkg-config" ,pkg-config)))
1746 ;; FIXME: Once packaged, add libraries not found during the build.
1748 `(("alsa-lib" ,alsa-lib)
1749 ("fontconfig" ,fontconfig)
1750 ("freetype" ,freetype)
1751 ("fribidi" ,fribidi)
1756 ("libvdpau" ,libvdpau)
1757 ("libvorbis" ,libvorbis)
1761 ("pulseaudio" ,pulseaudio)
1762 ("python" ,python-wrapper)
1763 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1764 ;("qtbase" ,qtbase) with -std=gnu++11.
1765 ;("qttools" ,qttools)
1771 `(#:tests? #f ; no check target
1773 ;; Make sure files inside the included ffmpeg tarball are
1775 (modify-phases %standard-phases
1776 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1778 (with-directory-excursion "avidemux_core/ffmpeg_package"
1779 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1780 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1781 (add-after 'patch-source-shebangs 'repack-ffmpeg
1783 (with-directory-excursion "avidemux_core/ffmpeg_package"
1784 (substitute* "ffmpeg-2.7.6/configure"
1785 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1786 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1787 ;; avoid non-determinism in the archive
1788 "--sort=name" "--mtime=@0"
1789 "--owner=root:0" "--group=root:0")
1790 (delete-file-recursively "ffmpeg-2.7.6"))))
1793 ;; Copy-paste settings from the cmake build system.
1794 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1795 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1797 (lambda* (#:key inputs outputs #:allow-other-keys)
1799 ((out (assoc-ref outputs "out"))
1800 (lib (string-append out "/lib"))
1802 (sdl (assoc-ref inputs "sdl"))
1804 (lambda* (component srcdir #:optional (args '()))
1805 (let ((builddir (string-append "build_" component)))
1807 (with-directory-excursion builddir
1810 (apply system* "cmake"
1811 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1812 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1813 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1814 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1815 "\"-Wl,-rpath=" lib "\"")
1816 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1817 (string-append "-DSDL_INCLUDE_DIR="
1819 (string-append "../" srcdir)
1822 (system* "make" "-j"
1823 (number->string (parallel-job-count)))
1824 (system* "make" "install"))))))))
1826 (and (build_component "core" "avidemux_core")
1827 (build_component "cli" "avidemux/cli")
1828 (build_component "qt4" "avidemux/qt4")
1829 (build_component "plugins_common" "avidemux_plugins"
1830 '("-DPLUGIN_UI=COMMON"))
1831 (build_component "plugins_cli" "avidemux_plugins"
1832 '("-DPLUGIN_UI=CLI"))
1833 (build_component "plugins_qt4" "avidemux_plugins"
1834 '("-DPLUGIN_UI=QT4"))
1835 (build_component "plugins_settings" "avidemux_plugins"
1836 '("-DPLUGIN_UI=SETTINGS")))
1837 ;; Remove .exe and .dll file.
1838 (delete-file-recursively
1839 (string-append out "/share/ADM6_addons")))))
1840 (delete 'install))))
1841 (home-page "http://fixounet.free.fr/avidemux/")
1842 (synopsis "Video editor")
1843 (description "Avidemux is a video editor designed for simple cutting,
1844 filtering and encoding tasks. It supports many file types, including AVI,
1845 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1846 can be automated using projects, job queue and powerful scripting
1848 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1849 ;; Software with various licenses is included, see License.txt.
1850 (license license:gpl2+)))
1852 (define-public vapoursynth
1854 (name "vapoursynth")
1859 (url "https://github.com/vapoursynth/vapoursynth.git")
1860 (commit (string-append "R" version))))
1861 (file-name (git-file-name name version))
1864 "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p"))))
1865 (build-system gnu-build-system)
1867 `(("autoconf" ,autoconf)
1868 ("automake" ,automake)
1869 ("cython" ,python-cython)
1870 ("libtool" ,libtool)
1871 ("pkg-config" ,pkg-config)
1875 `(("ffmpeg" ,ffmpeg)
1877 ("tesseract-ocr" ,tesseract-ocr)
1881 (modify-phases %standard-phases
1882 (add-after 'unpack 'autogen
1884 (invoke "sh" "autogen.sh"))))))
1885 (home-page "http://www.vapoursynth.com/")
1886 (synopsis "Video processing framework")
1887 (description "VapourSynth is a C++ library and Python module for video
1888 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1889 multithreading, generalized colorspaces, per frame properties, and videos with
1891 ;; src/core/cpufeatures only allows x86, ARM or PPC
1892 (supported-systems (fold delete %supported-systems
1893 '("mips64el-linux" "aarch64-linux")))
1894 ;; As seen from the source files.
1895 (license license:lgpl2.1+)))
1904 "http://downloads.xvid.org/downloads/xvidcore-"
1905 version ".tar.bz2"))
1908 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1909 (build-system gnu-build-system)
1910 (native-inputs `(("yasm" ,yasm)))
1913 (modify-phases %standard-phases
1915 'configure 'pre-configure
1917 (chdir "build/generic")
1918 (substitute* "configure"
1919 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1920 ;; No 'check' target.
1922 (home-page "https://www.xvid.com/")
1923 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1924 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1925 codec library. It uses ASP features such as b-frames, global and quarter
1926 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1927 and custom quantization matrices.")
1928 (license license:gpl2+)))
1930 (define-public streamlink
1937 (uri (pypi-uri "streamlink" version))
1940 "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8"))))
1941 (build-system python-build-system)
1942 (home-page "https://github.com/streamlink/streamlink")
1944 `(("python-freezegun" ,python-freezegun)
1945 ("python-pytest" ,python-pytest)
1946 ("python-mock" ,python-mock)
1947 ("python-requests-mock" ,python-requests-mock)))
1949 `(("python-pysocks" ,python-pysocks)
1950 ("python-websocket-client" ,python-websocket-client)
1951 ("python-iso3166" ,python-iso3166)
1952 ("python-iso639" ,python-iso639)
1953 ("python-isodate", python-isodate)
1954 ("python-pycryptodome" ,python-pycryptodome)
1955 ("python-requests" ,python-requests)
1956 ("python-urllib3" ,python-urllib3)))
1957 (synopsis "Extract streams from various services")
1958 (description "Streamlink is command-line utility that extracts streams
1959 from sites like Twitch.tv and pipes them into a video player of choice.")
1960 (license license:bsd-2)))
1962 (define-public livestreamer
1963 (deprecated-package "livestreamer" streamlink))
1965 (define-public twitchy
1966 (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
1969 (version (git-version "3.2" "1" commit))
1974 (url "https://github.com/BasioMeusPuga/twitchy.git")
1976 (file-name (git-file-name name version))
1979 "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
1980 (build-system python-build-system)
1983 (modify-phases %standard-phases
1984 (add-before 'check 'check-setup
1986 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
1988 (add-after 'install 'install-rofi-plugin
1989 (lambda* (#:key outputs #:allow-other-keys)
1990 (install-file "plugins/rofi-twitchy"
1991 (string-append (assoc-ref outputs "out")
1994 `(("python-requests" ,python-requests)
1995 ("streamlink" ,streamlink)))
1996 (home-page "https://github.com/BasioMeusPuga/twitchy")
1997 (synopsis "Command-line interface for Twitch.tv")
1999 "This package provides a command-line interface for Twitch.tv")
2000 (license license:gpl3+))))
2009 (url "https://github.com/mltframework/mlt.git")
2010 (commit (string-append "v" version))))
2011 (file-name (git-file-name name version))
2014 "0ki86yslr5ywa6sz8pjrgd9a4rn2rr4mss2zkmqi7pq8prgsm1fr"))
2015 (modules '((guix build utils)))
2017 ;; As of glibc 2.26, <xlocale.h> no longer is.
2018 (substitute* "src/framework/mlt_property.h"
2019 (("xlocale\\.h") "locale.h"))
2021 (build-system gnu-build-system)
2023 `(#:tests? #f ; no tests
2024 #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11")
2026 (list "--enable-gpl3"
2029 (modify-phases %standard-phases
2031 'configure 'override-LDFLAGS
2032 (lambda* (#:key outputs #:allow-other-keys)
2033 (substitute* "config.mak"
2035 (string-append "LDFLAGS+=-Wl,-rpath="
2036 (assoc-ref outputs "out")
2040 `(("alsa-lib" ,alsa-lib)
2041 ("ffmpeg" ,ffmpeg-3.4)
2043 ("frei0r-plugins" ,frei0r-plugins)
2044 ("gdk-pixbuf" ,gdk-pixbuf)
2046 ("libxml2" ,libxml2)
2049 ("libsamplerate" ,libsamplerate)
2050 ("pulseaudio" ,pulseaudio)
2056 `(("pkg-config" ,pkg-config)))
2057 (home-page "https://www.mltframework.org/")
2058 (synopsis "Author, manage, and run multitrack audio/video compositions")
2060 "MLT is a multimedia framework, designed and developed for television
2061 broadcasting. It provides a toolkit for broadcasters, video editors, media
2062 players, transcoders, web streamers and many more types of applications. The
2063 functionality of the system is provided via an assortment of ready to use
2064 tools, XML authoring components, and an extensible plug-in based API.")
2065 (license license:gpl3)))
2067 (define-public v4l-utils
2073 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
2074 "/v4l-utils-" version ".tar.bz2"))
2077 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
2078 (build-system gnu-build-system)
2081 (list (string-append "--with-udevdir="
2082 (assoc-ref %outputs "out")
2084 "CXXFLAGS=-std=gnu++11")))
2087 ("pkg-config" ,pkg-config)))
2089 `(("alsa-lib" ,alsa-lib)
2091 ("libjpeg" ,libjpeg)
2095 (synopsis "Realtime video capture utilities for Linux")
2096 (description "The v4l-utils provide a series of libraries and utilities to
2097 be used for realtime video capture via Linux-specific APIs.")
2098 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2099 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2100 (license (list license:lgpl2.1+ license:gpl2))))
2108 (uri (string-append "https://github.com/jp9000/obs-studio"
2109 "/archive/" version ".tar.gz"))
2110 (file-name (string-append name "-" version ".tar.gz"))
2113 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
2114 (build-system cmake-build-system)
2116 `(#:tests? #f)) ; no tests
2118 `(("pkg-config" ,pkg-config)))
2120 `(("alsa-lib" ,alsa-lib)
2124 ("fontconfig" ,fontconfig)
2125 ("freetype" ,freetype)
2127 ("jansson" ,jansson)
2128 ("libx264" ,libx264)
2129 ("libxcomposite" ,libxcomposite)
2131 ("pulseaudio" ,pulseaudio)
2133 ("qtx11extras" ,qtx11extras)
2135 ("v4l-utils" ,v4l-utils)
2137 (synopsis "Live streaming software")
2138 (description "Open Broadcaster Software provides a graphical interface for
2139 video recording and live streaming. OBS supports capturing audio and video
2140 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2142 (home-page "https://obsproject.com")
2143 (supported-systems '("x86_64-linux" "i686-linux"))
2144 (license license:gpl2+)))
2146 (define-public libvdpau
2153 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2154 name "-" version ".tar.bz2"))
2157 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
2158 (build-system gnu-build-system)
2160 `(("pkg-config" ,pkg-config)))
2162 `(("libx11" ,libx11 "out")
2163 ("libxext" ,libxext)
2164 ("xorgproto" ,xorgproto)))
2165 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2166 (synopsis "Video Decode and Presentation API")
2167 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2168 provides an interface to video decode acceleration and presentation hardware
2169 present in modern GPUs.")
2170 (license (license:x11-style "file://COPYING"))))
2172 (define-public vdpauinfo
2179 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2180 name "-" version ".tar.gz"))
2183 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2184 (build-system gnu-build-system)
2186 `(("pkg-config" ,pkg-config)
2187 ("libx11" ,libx11)))
2189 `(("libvdpau" ,libvdpau)))
2190 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2191 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2192 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2194 (license (license:x11-style "file://COPYING"))))
2196 (define-public libvdpau-va-gl
2198 (name "libvdpau-va-gl")
2203 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2204 "releases/download/v" version "/libvdpau-va-gl-"
2208 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2209 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2210 (modules '((guix build utils)))
2211 (snippet '(begin (delete-file-recursively "3rdparty")
2213 (build-system cmake-build-system)
2215 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2217 `(("libvdpau" ,libvdpau)
2218 ("pkg-config" ,pkg-config)))
2222 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2223 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2225 "Many applications can use VDPAU to accelerate portions of the video
2226 decoding process and video post-processing to the GPU video hardware. Since
2227 there is no VDPAU available on Intel chips, they fall back to different drawing
2228 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2229 scaling and VA-API (if available) to accelerate video decoding.")
2230 (license license:expat)))
2232 (define-public recordmydesktop
2234 (name "recordmydesktop")
2238 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2239 version "/recordmydesktop-" version ".tar.gz"))
2242 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2243 (build-system gnu-build-system)
2244 (inputs `(("popt" ,popt)
2249 ("libxfixes" ,libxfixes)
2250 ("libxdamage" ,libxdamage)
2251 ("libxext" ,libxext)
2252 ("alsa-lib" ,alsa-lib)
2253 ("libvorbis" ,libvorbis)
2254 ("libtheora" ,libtheora)))
2255 (home-page "http://recordmydesktop.sourceforge.net/")
2256 (synopsis "Desktop session video recorder")
2258 "recordMyDesktop is a command-line tool that captures the activity in
2259 your graphical desktop and encodes it as a video. This is a useful tool for
2260 making @dfn{screencasts}.")
2261 (license license:gpl2+)))
2263 (define-public simplescreenrecorder
2265 (name "simplescreenrecorder")
2270 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2272 (file-name (string-append name "-" version ".tar.gz"))
2275 "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal"))))
2276 (build-system cmake-build-system)
2277 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2278 ;; README.md, the program builds and functions properly without them.
2279 ;; As a result, they are omitted. Please add them back if problems appear.
2281 `(("alsa-lib" ,alsa-lib)
2286 ("pulseaudio" ,pulseaudio)
2288 ("qtx11extras" ,qtx11extras)))
2289 (native-inputs `(("pkg-config" ,pkg-config)))
2292 (list "-DWITH_QT5=TRUE")
2293 #:tests? #f)) ; no test suite
2294 ;; Using HTTPS causes part of the page to be displayed improperly.
2295 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2296 (synopsis "Screen recorder")
2297 (description "SimpleScreenRecorder is an easy to use screen recorder with
2298 a graphical user interface. It supports recording the entire screen, or a
2299 part of it, and allows encoding in many different codecs and file formats.
2300 Other features include a live preview and live streaming.")
2301 (license (list license:gpl3+ ; most files
2302 license:zlib ; glinject/elfhacks.*
2303 license:isc ; glinject/*
2304 license:x11)))) ; build-aux/install-sh
2306 (define-public libsmpeg
2313 (url "svn://svn.icculus.org/smpeg/trunk/")
2314 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2315 (file-name (string-append name "-" version "-checkout"))
2318 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2319 (build-system gnu-build-system)
2322 (modify-phases %standard-phases
2323 (add-after 'unpack 'autogen.sh
2325 (invoke "sh" "autogen.sh"))))))
2327 `(("autoconf" ,autoconf)
2328 ("automake" ,automake)))
2331 (home-page "http://icculus.org/smpeg/")
2332 (synopsis "SDL MPEG decoding library")
2334 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2335 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2336 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2337 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2338 and MPEG system streams.")
2339 (license (list license:expat
2344 (define-public libbdplus
2351 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2352 version "/" name "-" version ".tar.bz2"))
2354 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2356 `(("libgcrypt" ,libgcrypt)))
2357 (build-system gnu-build-system)
2358 (home-page "https://www.videolan.org/developers/libbdplus.html")
2359 (synopsis "Library for decrypting certain Blu-Ray discs")
2360 (description "libbdplus is a library which implements the BD+ System
2362 (license license:lgpl2.1+)))
2364 (define-public libaacs
2371 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2372 version "/" name "-" version ".tar.bz2"))
2374 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2376 `(("libgcrypt" ,libgcrypt)))
2380 (build-system gnu-build-system)
2381 (home-page "https://www.videolan.org/developers/libaacs.html")
2382 (synopsis "Library for decrypting certain Blu-Ray discs")
2383 (description "libaacs is a library which implements the Advanced Access
2384 Content System specification.")
2385 (license license:lgpl2.1+)))
2387 (define-public mps-youtube
2389 (name "mps-youtube")
2394 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2395 "archive/v" version ".tar.gz"))
2396 (file-name (string-append name "-" version ".tar.gz"))
2399 "0x7cmfh199q9j396v7bz81nnvanfllhsg86489i5dw2p3yyc9wnm"))))
2400 (build-system python-build-system)
2402 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2403 ;; test suite results differ depending on the country and also introduce
2404 ;; non-determinism in the tests.
2405 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2408 `(("python-pafy" ,python-pafy)
2409 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2410 (home-page "https://github.com/mps-youtube/mps-youtube")
2411 (synopsis "Terminal based YouTube player and downloader")
2413 "@code{mps-youtube} is based on mps, a terminal based program to
2414 search, stream and download music. This implementation uses YouTube as
2415 a source of content and can play and download video as well as audio.
2416 It can use either mpv or mplayer for playback, and for conversion of
2417 formats ffmpeg or libav is used. Users should install one of the
2418 supported players in addition to this package.")
2419 (license license:gpl3+)))
2421 (define-public handbrake
2427 (uri (string-append "https://handbrake.fr/rotation.php?file="
2428 "HandBrake-" version ".tar.bz2"))
2429 (file-name (string-append "handbrake-" version ".tar.bz2"))
2432 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2433 (patches (search-patches "handbrake-pkg-config-path.patch"))
2434 (modules '((guix build utils)))
2436 ;; Remove bundled libraries and source not necessary for
2437 ;; running under a GNU environment.
2439 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2441 (build-system glib-or-gtk-build-system)
2443 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2444 ("autoconf" ,autoconf)
2445 ("curl" ,curl) ;not actually used, but tested for
2446 ("intltool" ,intltool)
2447 ("libtool" ,libtool)
2448 ("pkg-config" ,pkg-config)
2449 ("python" ,python-2))) ;for configuration
2452 ("dbus-glib" ,dbus-glib)
2453 ("ffmpeg" ,ffmpeg-3.4) ;compilation errors with ffmpeg-4
2454 ("fontconfig" ,fontconfig)
2455 ("freetype" ,freetype)
2457 ("gstreamer" ,gstreamer)
2458 ("gst-plugins-base" ,gst-plugins-base)
2462 ("libbluray" ,libbluray)
2463 ("libdvdnav" ,libdvdnav)
2464 ("libdvdread" ,libdvdread)
2465 ("libgudev" ,libgudev)
2466 ("libmpeg2" ,libmpeg2)
2467 ("libnotify" ,libnotify)
2469 ("libsamplerate" ,libsamplerate)
2470 ("libtheora" ,libtheora)
2471 ("libvorbis" ,libvorbis)
2473 ("libxml2" ,libxml2)
2474 ("libx264" ,libx264)
2478 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2480 (modify-phases %standard-phases
2482 ;; Run bootstrap ahead of time so that shebangs get patched.
2484 (setenv "CONFIG_SHELL" (which "sh"))
2485 (setenv "NOCONFIGURE" "1")
2486 ;; Patch the Makefile so that it doesn't bootstrap again.
2487 (substitute* "gtk/module.rules"
2488 ((".*autogen\\.sh.*") ""))
2489 (invoke "sh" "./gtk/autogen.sh")))
2490 (add-before 'configure 'disable-contrib
2492 (substitute* "make/include/main.defs"
2493 ;; Disable unconditional inclusion of some "contrib"
2494 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2495 ;; and libbluray), which would lead to fetching and
2496 ;; building of these libraries. Use our own instead.
2497 (("MODULES \\+= contrib") "# MODULES += contrib"))
2499 (add-before 'configure 'fix-x265-linking
2501 (substitute* "test/module.defs"
2502 ;; Fix missing library during linking error
2503 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2506 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2507 ;; 'configure' is not an autoconf-generated script, and
2508 ;; errors on unrecognized arguments,
2509 ;; e.g. --enable-fast-install
2510 (let ((out (assoc-ref outputs "out")))
2511 (apply invoke "./configure"
2512 (string-append "--prefix=" out)
2513 (or configure-flags '())))))
2514 (add-after 'configure 'chdir-build
2515 (lambda _ (chdir "./build") #t)))))
2516 (home-page "https://handbrake.fr")
2517 (synopsis "Video transcoder")
2519 "HandBrake is a tool for converting video from any format to a selection
2520 of modern, widely supported codecs.")
2521 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2522 (license (list license:gpl2+ license:bsd-3))))
2524 (define-public openh264
2530 (uri (string-append "https://github.com/cisco/"
2531 name "/releases/download/v"
2532 version "/Source.Code.tar.gz.gz"))
2533 (file-name (string-append name "-" version ".tar.gz"))
2536 "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf"))))
2537 (build-system gnu-build-system)
2540 ("python" ,python)))
2542 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2544 #:test-target "test"
2545 #:phases (modify-phases %standard-phases
2546 ;; no configure script
2547 (delete 'configure))))
2548 (home-page "http://www.openh264.org/")
2549 (synopsis "H264 decoder library")
2551 "Openh264 is a library which can decode H264 video streams.")
2552 (license license:bsd-2)))
2554 (define-public libmp4v2
2561 ;; XXX: The new location of upstream is uncertain and will become relevant the
2562 ;; moment when the googlecode archive shuts down. It is past the date it
2563 ;; should've been turned off. I tried to communicate with upstream, but this
2564 ;; wasn't very responsive and not very helpful. The short summary is, it is
2565 ;; chaos when it comes to the amount of forks and only time will tell where
2566 ;; the new upstream location is.
2567 (uri (string-append "https://storage.googleapis.com/google-"
2568 "code-archive-downloads/v2/"
2569 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2570 (file-name (string-append name "-" version ".tar.bz2"))
2573 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2574 (build-system gnu-build-system)
2576 "static")) ; 3.7MiB .a file
2579 (modify-phases %standard-phases
2580 (add-after 'unpack 'remove-dates
2582 ;; Make the build reproducible.
2583 (substitute* "configure"
2584 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2585 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2587 (add-after 'install 'move-static-libraries
2588 (lambda* (#:key outputs #:allow-other-keys)
2589 ;; Move static libraries to the "static" output.
2590 (let* ((out (assoc-ref outputs "out"))
2591 (lib (string-append out "/lib"))
2592 (static (assoc-ref outputs "static"))
2593 (slib (string-append static "/lib")))
2595 (for-each (lambda (file)
2596 (install-file file slib)
2598 (find-files lib "\\.a$"))
2601 `(("help2man" ,help2man)
2602 ("dejagnu" ,dejagnu)))
2603 (home-page "https://code.google.com/archive/p/mp4v2/")
2604 (synopsis "API to create and modify mp4 files")
2606 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2607 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2608 file format that has been used as a multimedia file format in a variety of platforms and
2609 applications. It is a very powerful and extensible format that can accommodate
2610 practically any type of media.")
2611 (license license:mpl1.1)))
2613 (define-public libmediainfo
2615 (name "libmediainfo")
2619 (uri (string-append "https://mediaarea.net/download/source/"
2621 name "_" version ".tar.bz2"))
2624 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2625 ;; TODO add a Big Buck Bunny webm for tests.
2627 `(("autoconf" ,autoconf)
2628 ("automake" ,automake)
2629 ("libtool" ,libtool)
2630 ("pkg-config" ,pkg-config)
2632 ("tinyxml2" ,tinyxml2)
2634 ("libzen" ,libzen)))
2635 (build-system gnu-build-system)
2637 '(#:tests? #f ; see above TODO
2639 ;; build scripts not in root of archive
2640 (modify-phases %standard-phases
2641 (add-after 'unpack 'change-to-build-dir
2643 (chdir "Project/GNU/Library")
2645 (add-after 'change-to-build-dir 'autogen
2647 (invoke "sh" "autogen.sh"))))))
2648 (home-page "https://mediaarea.net/en/MediaInfo")
2649 (synopsis "Library for retrieving media metadata")
2650 (description "MediaInfo is a library used for retrieving technical
2651 information and other metadata about audio or video files. A non-exhaustive
2652 list of the information MediaInfo can retrieve from media files include:
2655 @item General: title, author, director, album, track number, date, duration...
2656 @item Video: codec, aspect, fps, bitrate...
2657 @item Audio: codec, sample rate, channels, language, bitrate...
2658 @item Text: language of subtitle
2659 @item Chapters: number of chapters, list of chapters
2662 MediaInfo supports the following formats:
2665 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2666 MPEG-2, MPEG-4, DVD (VOB)...
2667 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2668 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2669 @item Subtitles: SRT, SSA, ASS, SAMI...
2671 (license license:bsd-2)))
2673 ;; TODO also have a GUI version available
2674 (define-public mediainfo
2680 (uri (string-append "https://mediaarea.net/download/source/"
2681 name "/" version "/"
2682 name "_" version ".tar.bz2"))
2685 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2687 `(("autoconf" ,autoconf)
2688 ("automake" ,automake)
2689 ("libtool" ,libtool)
2690 ("pkg-config" ,pkg-config)
2692 ("libmediainfo" ,libmediainfo)
2693 ("libzen" ,libzen)))
2694 (build-system gnu-build-system)
2696 '(#:tests? #f ; lacks tests
2698 ;; build scripts not in root of archive
2699 (modify-phases %standard-phases
2700 (add-after 'unpack 'change-to-build-dir
2702 (chdir "Project/GNU/CLI")
2704 (add-after 'change-to-build-dir 'autogen
2706 (invoke "sh" "autogen.sh"))))))
2707 (home-page "https://mediaarea.net/en/MediaInfo")
2708 (synopsis "Utility for reading media metadata")
2709 (description "MediaInfo is a utility used for retrieving technical
2710 information and other metadata about audio or video files. It supports the
2711 many codecs and formats supported by libmediainfo.")
2712 (license license:bsd-2)))
2714 (define-public livemedia-utils
2716 (name "livemedia-utils")
2717 (version "2018.10.17")
2721 "https://download.videolan.org/contrib/live555/live."
2725 "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w"))
2726 (modules '((guix build utils)))
2728 ;; As of glibc 2.26, <xlocale.h> no longer is.
2729 (substitute* "liveMedia/include/Locale.hh"
2730 (("xlocale\\.h") "locale.h"))
2732 (build-system gnu-build-system)
2734 '(#:tests? #f ; no tests
2735 #:make-flags (list "CC=gcc"
2736 (string-append "LDFLAGS=-Wl,-rpath="
2737 (assoc-ref %outputs "out") "/lib")
2738 (string-append "PREFIX="
2739 (assoc-ref %outputs "out")))
2740 #:phases (modify-phases %standard-phases
2741 (add-before 'configure 'fix-makefiles-generation
2743 (substitute* "genMakefiles"
2748 (invoke "./genMakefiles"
2749 "linux-with-shared-libraries"))))))
2750 (home-page "http://www.live555.com/liveMedia/")
2751 (synopsis "Set of C++ libraries for multimedia streaming")
2752 (description "This code forms a set of C++ libraries for multimedia
2753 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2754 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2755 JPEG video, and several audio codecs. They can easily be extended to support
2756 additional (audio and/or video) codecs, and can also be used to build basic
2757 RTSP or SIP clients and servers.")
2758 (license license:lgpl3+)))
2760 (define-public libdvbpsi
2767 "https://download.videolan.org/pub/libdvbpsi/"
2768 version "/libdvbpsi-" version ".tar.bz2"))
2771 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2772 (build-system gnu-build-system)
2773 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2774 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2776 (description "libdvbpsi is a simple library designed for decoding and
2777 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2778 and ITU-T H.222.0.")
2779 (license license:lgpl2.1)))
2781 (define-public ffms2
2785 (home-page "https://github.com/FFMS/ffms2")
2788 (uri (string-append home-page "/archive/" version ".tar.gz"))
2789 (file-name (string-append name "-" version ".tar.gz"))
2792 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2793 (build-system gnu-build-system)
2796 (list "--enable-avresample")))
2800 `(("ffmpeg" ,ffmpeg)))
2802 `(("pkg-config" ,pkg-config)))
2803 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2805 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2806 programmers to access a standard API to open and decompress media files.")
2807 ;; sources are distributed under a different license that the binary.
2808 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2809 (license license:gpl2+))); inherits from ffmpeg
2811 (define-public aegisub
2818 "http://ftp.aegisub.org/pub/archives/releases/source/"
2819 name "-" version ".tar.xz"))
2822 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
2823 (patches (search-patches "aegisub-icu59-include-unistr.patch"))))
2824 (build-system gnu-build-system)
2827 (list "--disable-update-checker"
2828 "--without-portaudio"
2831 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
2832 ;; tests require busted, a lua package we don't have yet
2835 (modify-phases %standard-phases
2836 (add-before 'configure 'fix-ldflags
2838 (setenv "LDFLAGS" "-pthread")
2842 ("desktop-file-utils" ,desktop-file-utils)
2845 ("hunspell" ,hunspell)
2848 ("alsa-lib" ,alsa-lib)
2849 ("pulseaudio" ,pulseaudio)
2851 ("freetype" ,freetype)
2852 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2854 `(("intltool" ,intltool)
2855 ("pkg-config" ,pkg-config)))
2856 (home-page "http://www.aegisub.org/")
2857 (synopsis "Subtitle engine")
2859 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2860 it quick and easy to time subtitles to audio, and features many powerful
2861 tools for styling them, including a built-in real-time video preview.")
2862 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2863 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2864 license:expat)))) ; and src/gl that is under a license similar
2865 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2866 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2867 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2869 (define-public gst-transcoder
2871 (name "gst-transcoder")
2877 (url "https://github.com/pitivi/gst-transcoder.git")
2879 (file-name (git-file-name name version))
2882 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
2883 (build-system meson-build-system)
2885 `(("gobject-introspection" ,gobject-introspection)
2887 ("gstreamer" ,gstreamer)
2888 ("gst-plugins-base" ,gst-plugins-base)))
2890 `(("python" ,python)
2891 ("pkg-config" ,pkg-config)))
2892 (home-page "https://github.com/pitivi/gst-transcoder/")
2893 (synopsis "GStreamer Transcoding API")
2894 (description "GStreamer Transcoding API")
2895 (license license:lgpl2.1)))
2904 (uri (string-append "mirror://sourceforge/gmerlin/"
2905 name "/" version "/"
2906 name "-" version ".tar.gz"))
2907 (file-name (string-append name "-" version ".tar.gz"))
2910 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2911 (build-system gnu-build-system)
2913 '(#:configure-flags '("LIBS=-lm")))
2915 `(("pkg-config" ,pkg-config)
2916 ("doxygen" ,doxygen)))
2917 (home-page "http://gmerlin.sourceforge.net")
2918 (synopsis "Low level library for multimedia API building")
2920 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2921 library, upon which multimedia APIs can be built. Gavl handles all the
2922 details of audio and video formats like colorspaces, sample rates,
2923 multichannel configurations, etc. It provides standardized definitions for
2924 those formats as well as container structures for carrying audio samples or
2925 video images inside an application.
2927 In addition, it handles the sometimes ugly task of converting between all
2928 these formats and provides some elementary operations (copying, scaling,
2929 alpha blending etc).")
2930 (license license:gpl3)))
2932 (define-public frei0r-plugins
2934 (name "frei0r-plugins")
2939 (uri (string-append "https://files.dyne.org/frei0r/"
2940 "frei0r-plugins-" version ".tar.gz"))
2943 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2944 (build-system gnu-build-system)
2947 (modify-phases %standard-phases
2948 (add-after 'unpack 'autotools
2950 (invoke "sh" "autogen.sh"))))))
2951 ;; TODO: opencv for additional face detection filters.
2956 `(("pkg-config" ,pkg-config)
2957 ("libtool" ,libtool)
2958 ("automake" ,automake)
2959 ("autoconf" ,autoconf)))
2960 (home-page "https://www.dyne.org/software/frei0r/")
2961 (synopsis "Minimalistic plugin API for video effects")
2963 "Frei0r is a minimalistic plugin API for video effects.
2964 The main emphasis is on simplicity for an API that will round up
2965 the most common video effects into simple filters, sources and
2966 mixers that can be controlled by parameters. Frei0r wants to
2967 provide a way to share these simple effects between many
2968 applications, avoiding their reimplementation by different projects.
2969 It counts more than 100 plugins.")
2970 (license (list license:gpl2+
2971 ;; The following files are licensed as LGPL2.1+:
2972 ;; src/generator/ising0r/ising0r.c
2973 ;; src/generator/onecol0r/onecol0r.cpp
2974 ;; src/generator/nois0r/nois0r.cpp
2975 ;; src/generator/lissajous0r/lissajous0r.cpp
2976 ;; src/filter/ndvi/gradientlut.hpp
2977 ;; src/filter/ndvi/ndvi.cpp
2978 ;; src/filter/facedetect/facedetect.cpp
2979 license:lgpl2.1+))))
2981 (define-public motion
2985 (home-page "https://motion-project.github.io/")
2989 (url "https://github.com/Motion-Project/motion.git")
2990 (commit (string-append "release-" version))))
2993 "0c0q6dl4v561m5y8bp0c0h4p3s52fjgcdnsrrf5ygdi288d3rfxv"))
2994 (file-name (git-file-name name version))))
2995 (build-system gnu-build-system)
2997 `(("autoconf" ,autoconf-wrapper)
2998 ("automake" ,automake)
2999 ("gettext" ,gettext-minimal)
3000 ("pkg-config" ,pkg-config)))
3002 `(("libjpeg" ,libjpeg)
3003 ("ffmpeg" ,ffmpeg-3.4)
3004 ("libmicrohttpd" ,libmicrohttpd)
3005 ("sqlite" ,sqlite)))
3007 '(#:phases (modify-phases %standard-phases
3010 (patch-shebang "version.sh")
3011 (invoke "autoreconf" "-vfi"))))
3012 #:configure-flags '("--sysconfdir=/etc")
3013 #:make-flags (list (string-append "sysconfdir="
3014 (assoc-ref %outputs "out")
3017 #:tests? #f)) ;no 'check' target
3018 (synopsis "Detect motion from video signals")
3020 "Motion is a program that monitors the video signal from one or more
3021 cameras and is able to detect if a significant part of the picture has
3022 changed. Or in other words, it can detect motion.")
3024 ;; Some files say "version 2" and others "version 2 or later".
3025 (license license:gpl2)))
3027 (define-public subdl
3028 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3032 (version (git-version "1.0.3" revision commit))
3036 (url "https://github.com/alexanderwink/subdl.git")
3038 (file-name (git-file-name name version))
3041 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3042 (build-system trivial-build-system)
3044 `(#:modules ((guix build utils))
3046 (use-modules (guix build utils))
3047 (let* ((out (assoc-ref %outputs "out"))
3048 (bin (string-append out "/bin"))
3049 (source (assoc-ref %build-inputs "source"))
3050 (python (assoc-ref %build-inputs "python")))
3051 (install-file (string-append source "/subdl") bin)
3052 (patch-shebang (string-append bin "/subdl")
3053 (list (string-append python "/bin")))))))
3054 (inputs `(("python" ,python)))
3055 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3056 (description "Subdl is a command-line tool for downloading subtitles from
3057 opensubtitles.org. By default, it will search for English subtitles, display
3058 the results, download the highest-rated result in the requested language and
3059 save it to the appropriate filename.")
3060 (license license:gpl3+)
3061 (home-page "https://github.com/alexanderwink/subdl"))))
3063 (define-public l-smash
3070 (url "https://github.com/l-smash/l-smash.git")
3071 (commit (string-append "v" version))))
3072 (file-name (git-file-name name version))
3075 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
3076 (build-system gnu-build-system)
3078 `(#:tests? #f ;no tests
3080 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3081 (assoc-ref %outputs "out") "/lib"))
3083 (modify-phases %standard-phases
3084 ;; configure fails if it is followed by CONFIG_SHELL
3086 (lambda* (#:key outputs #:allow-other-keys)
3087 (let ((out (assoc-ref outputs "out")))
3088 (invoke "./configure" (string-append "--prefix=" out)
3089 "--disable-static")))))))
3091 `(("which" ,which)))
3092 (home-page "https://l-smash.github.io/l-smash/")
3093 (synopsis "MP4 multiplexer and demultiplexer library")
3095 "L-SMASH is a cross-platform library that handles the ISO base media file
3096 format and some of its derived file formats, including MP4. It operates as a
3097 multiplexer and demultiplexer, and can mux video and audio in several formats
3098 using standalone executable files.")
3099 (license license:isc)))
3101 (define-public qtfaststart
3103 (name "qtfaststart")
3107 (uri (pypi-uri "qtfaststart" version))
3110 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3111 (build-system python-build-system)
3113 '(#:tests? #f)) ; no test suite
3114 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3115 (description "qtfaststart enables streaming and pseudo-streaming of
3116 QuickTime and MP4 files by moving metadata and offset information to the
3117 beginning of the file. It can also print some useful information about the
3118 structure of the file. This program is based on qt-faststart.c from the FFmpeg
3119 project, which is released into the public domain, as well as ISO 14496-12:2005
3120 (the official spec for MP4), which can be obtained from the ISO or found
3122 (home-page "https://github.com/danielgtaylor/qtfaststart")
3123 (license license:expat)))
3125 (define-public vidstab
3132 (url "https://github.com/georgmartius/vid.stab.git")
3133 (commit (string-append "v" version))))
3134 (file-name (git-file-name name version))
3137 "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38"))))
3138 (build-system cmake-build-system)
3140 '(#:tests? #f)) ; tests are not run as part of standard build process
3141 (home-page "http://public.hronopik.de/vid.stab/")
3142 (synopsis "Video stabilization library")
3143 (description "Vidstab is a video stabilization library which can be used
3144 with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
3145 vehicle typically suffers from undesirable shakes and jitters. Activities such
3146 as surfing, skiing, riding and walking while shooting videos are especially
3147 prone to erratic camera shakes. Vidstab targets these video contents to help
3148 create smoother and stable videos.")
3149 (license license:gpl2+)))
3151 (define-public libopenshot
3153 (name "libopenshot")
3158 (url "https://github.com/OpenShot/libopenshot")
3159 (commit (string-append "v" version))))
3160 (file-name (git-file-name name version))
3163 "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd"))
3164 (modules '((guix build utils)))
3166 ;; Allow overriding of the python installation dir
3167 (substitute* "src/bindings/python/CMakeLists.txt"
3168 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
3169 (string-append set " CACHE PATH "
3170 "\"Python bindings directory\")")))
3172 (patches (search-patches "libopenshot-tests-with-system-libs.patch"))))
3173 (build-system cmake-build-system)
3175 `(("pkg-config" ,pkg-config)
3178 ("unittest++" ,unittest-cpp)))
3179 (propagated-inputs ;all referenced in installed headers
3180 `(("cppzmq" ,cppzmq)
3182 ("imagemagick" ,imagemagick)
3183 ("jsoncpp" ,jsoncpp)
3184 ("libopenshot-audio" ,libopenshot-audio)
3185 ("qt" ,qt) ;widgets, core, gui, multimedia, and multimediawidgets
3186 ("zeromq" ,zeromq)))
3189 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
3190 ,(version-major+minor (package-version python))
3192 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
3194 (modify-phases %standard-phases
3195 (add-before 'configure 'set-vars
3196 (lambda* (#:key inputs #:allow-other-keys)
3197 (setenv "LIBOPENSHOT_AUDIO_DIR"
3198 (assoc-ref inputs "libopenshot-audio"))
3200 (assoc-ref inputs "zeromq"))
3201 (setenv "UNITTEST_DIR"
3202 (string-append (assoc-ref inputs "unittest++")
3203 "/include/UnitTest++"))
3205 (home-page "https://openshot.org")
3206 (synopsis "Video-editing, animation, and playback library")
3207 (description "OpenShot Library (libopenshot) is a powerful C++ video
3208 editing library with a multi-threaded and feature rich video editing
3209 API. It includes bindings for Python, Ruby, and other languages.")
3210 (license license:lgpl3+)))
3212 (define-public openshot
3219 (url "https://github.com/OpenShot/openshot-qt")
3220 (commit (string-append "v" version))))
3221 (file-name (git-file-name name version))
3224 "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2"))))
3225 (build-system python-build-system)
3227 `(("ffmpeg" ,ffmpeg)
3228 ("libopenshot" ,libopenshot)
3230 ("python-pyqt" ,python-pyqt)
3231 ("python-pyzmq" ,python-pyzmq)
3232 ("python-requests" ,python-requests)
3235 `(#:tests? #f ;no tests
3236 #:phases (modify-phases %standard-phases
3237 (delete 'build) ;install phase does all the work
3238 (add-before 'install 'set-tmp-home
3240 ;; src/classes/info.py "needs" to create several
3241 ;; directories in $HOME when loaded during build
3242 (setenv "HOME" "/tmp")
3244 (add-after 'install 'wrap-program
3245 (lambda* (#:key inputs outputs #:allow-other-keys)
3246 (wrap-program (string-append (assoc-ref outputs "out")
3248 `("QT_PLUGIN_PATH" prefix
3249 ,(list (string-append (assoc-ref inputs "qtsvg")
3250 "/lib/qt5/plugins/")))))))))
3251 (home-page "https://openshot.org")
3252 (synopsis "Video editor")
3253 (description "OpenShot takes your videos, photos, and music files and
3254 helps you create the film you have always dreamed of. Easily add sub-titles,
3255 transitions, and effects and then export your film to many common formats.")
3256 (license license:gpl3+)))