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 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 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 <ambrevar@gmail.com>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages video)
45 #:use-module (ice-9 match)
46 #:use-module (srfi srfi-1)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (guix utils)
49 #:use-module (guix packages)
50 #:use-module (guix download)
51 #:use-module (guix git-download)
52 #:use-module (guix svn-download)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system glib-or-gtk)
56 #:use-module (guix build-system meson)
57 #:use-module (guix build-system perl)
58 #:use-module (guix build-system python)
59 #:use-module (guix build-system waf)
60 #:use-module (guix build-system trivial)
61 #:use-module (gnu packages)
62 #:use-module (gnu packages algebra)
63 #:use-module (gnu packages audio)
64 #:use-module (gnu packages autotools)
65 #:use-module (gnu packages avahi)
66 #:use-module (gnu packages backup)
67 #:use-module (gnu packages base)
68 #:use-module (gnu packages bison)
69 #:use-module (gnu packages boost)
70 #:use-module (gnu packages cdrom)
71 #:use-module (gnu packages check)
72 #:use-module (gnu packages cmake)
73 #:use-module (gnu packages compression)
74 #:use-module (gnu packages cpp)
75 #:use-module (gnu packages curl)
76 #:use-module (gnu packages databases)
77 #:use-module (gnu packages dejagnu)
78 #:use-module (gnu packages docbook)
79 #:use-module (gnu packages documentation)
80 #:use-module (gnu packages elf)
81 #:use-module (gnu packages file)
82 #:use-module (gnu packages flex)
83 #:use-module (gnu packages fontutils)
84 #:use-module (gnu packages freedesktop)
85 #:use-module (gnu packages fribidi)
86 #:use-module (gnu packages gettext)
87 #:use-module (gnu packages ghostscript)
88 #:use-module (gnu packages gl)
89 #:use-module (gnu packages glib)
90 #:use-module (gnu packages guile)
91 #:use-module (gnu packages gnome)
92 #:use-module (gnu packages gnupg)
93 #:use-module (gnu packages gstreamer)
94 #:use-module (gnu packages gtk)
95 #:use-module (gnu packages image)
96 #:use-module (gnu packages imagemagick)
97 #:use-module (gnu packages iso-codes)
98 #:use-module (gnu packages libidn)
99 #:use-module (gnu packages libreoffice)
100 #:use-module (gnu packages linux)
101 #:use-module (gnu packages lua)
102 #:use-module (gnu packages m4)
103 #:use-module (gnu packages man)
104 #:use-module (gnu packages mp3)
105 #:use-module (gnu packages ncurses)
106 #:use-module (gnu packages ocr)
107 #:use-module (gnu packages perl)
108 #:use-module (gnu packages pkg-config)
109 #:use-module (gnu packages popt)
110 #:use-module (gnu packages pulseaudio)
111 #:use-module (gnu packages python)
112 #:use-module (gnu packages python-crypto)
113 #:use-module (gnu packages python-web)
114 #:use-module (gnu packages qt)
115 #:use-module (gnu packages rdesktop)
116 #:use-module (gnu packages ruby)
117 #:use-module (gnu packages samba)
118 #:use-module (gnu packages sdl)
119 #:use-module (gnu packages serialization)
120 #:use-module (gnu packages shells)
121 #:use-module (gnu packages ssh)
122 #:use-module (gnu packages texinfo)
123 #:use-module (gnu packages textutils)
124 #:use-module (gnu packages tls)
125 #:use-module (gnu packages upnp)
126 #:use-module (gnu packages version-control)
127 #:use-module (gnu packages vulkan)
128 #:use-module (gnu packages web)
129 #:use-module (gnu packages webkit)
130 #:use-module (gnu packages wxwidgets)
131 #:use-module (gnu packages xdisorg)
132 #:use-module (gnu packages xiph)
133 #:use-module (gnu packages xml)
134 #:use-module (gnu packages xorg)
135 #:use-module (gnu packages assembly))
143 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
144 version "/" name "-" version ".tar.gz"))
147 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
148 (build-system gnu-build-system)
150 `(("makeinfo" ,texinfo)))
152 `(("ncurses" ,ncurses)))
155 (modify-phases %standard-phases
157 (lambda* (#:key build inputs outputs #:allow-other-keys)
158 ;; This old `configure' script doesn't support
159 ;; variables passed as arguments.
160 (let ((out (assoc-ref outputs "out"))
161 (ncurses (assoc-ref inputs "ncurses")))
162 (setenv "CONFIG_SHELL" (which "bash"))
163 (invoke "./configure"
164 (string-append "--prefix=" out)
165 (string-append "--build=" build)
166 ;; The ancient config.guess is unable to
167 ;; guess the host triplet on mips64el.
168 ,@(if (string=? "mips64el-linux"
170 '("--host=mips64el-unknown-linux-gnu")
172 ;; The same is also true with aarch64.
173 ,@(if (string=? "aarch64-linux"
175 '("--host=aarch64-unknown-linux-gnu")
177 (string-append "--with-ncurses="
179 (home-page "http://aa-project.sourceforge.net/aalib/")
180 (synopsis "ASCII-art library")
182 "AA-lib is a low level gfx library which does not require graphics device.
183 In fact, there is no graphical output possible. AA-lib replaces those
184 old-fashioned output methods with powerful ascii-art renderer.")
185 (license license:lgpl2.0+)))
187 (define-public liba52
194 ;; A mirror://sourceforge URI doesn't work, presumably
195 ;; because the SourceForge project is misconfigured.
196 "http://liba52.sourceforge.net/files/a52dec-" version
200 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
201 (patches (search-patches "liba52-enable-pic.patch"
202 "liba52-set-soname.patch"
203 "liba52-use-mtune-not-mcpu.patch"
204 "liba52-link-with-libm.patch"))))
205 (build-system gnu-build-system)
206 ;; XXX We need to run ./bootstrap because of the build system fixes above.
208 `(("autoconf" ,autoconf)
209 ("automake" ,automake)
210 ("libtool" ,libtool)))
211 (arguments `(#:configure-flags '("--enable-shared")
213 (modify-phases %standard-phases
214 ;; XXX We need to run ./bootstrap because of the build
215 ;; system fixes above.
219 (invoke "sh" "bootstrap"))))))
220 (home-page "http://liba52.sourceforge.net/")
221 (synopsis "ATSC A/52 stream decoder")
222 (description "liba52 is a library for decoding ATSC A/52 streams. The
223 A/52 standard is used in a variety of applications, including digital
224 television and DVD. It is also known as AC-3.")
225 (license license:gpl2+)))
227 (define-public libmpeg2
233 ;; A mirror://sourceforge URI doesn't work, presumably
234 ;; because the SourceForge project is misconfigured.
235 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
236 name "-" version ".tar.gz"))
239 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
247 (build-system gnu-build-system)
248 (home-page "http://libmpeg2.sourceforge.net/")
249 (synopsis "MPEG1 and MPEG2 video decoder library")
251 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
252 (license license:gpl2+)))
254 (define-public libx264
257 (version "20180219-2245")
260 (uri (string-append "https://download.videolan.org/pub/x264/snapshots/"
261 "x264-snapshot-" version "-stable.tar.bz2"))
264 "1x0cg8l30wp84mr7q0ddp06jclm0kjrszazrx87d4k7js3qxjy8m"))))
265 (build-system gnu-build-system)
267 `(("pkg-config" ,pkg-config)
269 ;; TODO: Add gpac input
271 `(#:tests? #f ;no check target
272 #:configure-flags '("--enable-shared"
273 ;; Don't build the command-line program. If we
274 ;; want it later, we should do so in a different
275 ;; package to avoid a circular dependency (the x264
276 ;; program depends on ffmpeg and ffmpeg depends on
280 ;; On MIPS, we must pass "--disable-asm" or else
281 ;; configure fails after printing: "You specified a
282 ;; pre-MSA CPU in your CFLAGS. If you really want
283 ;; to run on such a CPU, configure with
285 ,@(if (string-prefix? "mips"
286 (or (%current-target-system)
290 (home-page "https://www.videolan.org/developers/x264.html")
291 (synopsis "H.264 video coding library")
292 (description "libx264 is an advanced encoding library for creating
293 H.264 (MPEG-4 AVC) video streams.")
294 (license (list license:gpl2+ ;most files
295 license:isc ;common/x86/x86inc.asm
296 license:lgpl2.1+ ;extras/getopt.c
297 license:bsd-3 ;extras/inttypes.h
298 (license:non-copyleft ;extras/cl*.h
300 "See extras/cl.h in the distribution.")))))
302 (define-public mkvtoolnix
309 (uri (string-append "https://mkvtoolnix.download/sources/"
310 name "-" version ".tar.xz"))
313 "0hknnnnx9661igm1r73dc7aqxnnrl5a8yvyvr1nhd9ymn2klwpl5"))
314 (modules '((guix build utils)))
317 ;; Delete bundled libraries.
318 (for-each delete-file-recursively
324 (build-system gnu-build-system)
331 ("libmatroska" ,libmatroska)
333 ("libvorbis" ,libvorbis)
340 `(("docbook-xsl" ,docbook-xsl)
341 ("gettext" ,gettext-minimal)
342 ("googletest" ,googletest)
344 ("nlohmann-json-cpp" ,nlohmann-json-cpp)
346 ("pkg-config" ,pkg-config)
351 (list (string-append "--with-boost="
352 (assoc-ref %build-inputs "boost"))
353 (string-append "--with-docbook-xsl-root="
354 (assoc-ref %build-inputs "docbook-xsl")
355 "/xml/xsl/docbook-xsl-"
356 ,(package-version docbook-xsl))
357 (string-append "--with-extra-includes="
358 (assoc-ref %build-inputs "nlohmann-json-cpp")
359 "/include/nlohmann"))
361 (modify-phases %standard-phases
362 (add-before 'configure 'add-googletest
365 (string-append (assoc-ref %build-inputs "googletest")
366 "/include/gtest") "lib/gtest")
370 (let ((-j (list "-j" (number->string (parallel-job-count)))))
371 (apply invoke "rake" -j))))
374 (invoke "rake" "tests/unit")))
377 (invoke "rake" "install"))))))
378 (home-page "https://mkvtoolnix.download")
379 (synopsis "Tools to create, alter and inspect Matroska files")
381 "MKVToolNix provides tools for getting information about Matroska files
382 (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract})
383 and creating Matroska files from other media files (@code{mkvmerge}).")
384 (license license:gpl2)))
393 (uri (string-append "https://download.videolan.org/videolan/x265/"
394 "x265_" version ".tar.gz"))
397 "0qx8mavwdzdpkkby7n29i9av7zsnklavacwfz537mf62q2pzjnbf"))
398 (modules '((guix build utils)))
401 (delete-file-recursively "source/compat/getopt")
403 (build-system cmake-build-system)
405 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
406 ;; Currently the source code doesn't check for aarch64.
407 ,@(if (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))
408 '(#:configure-flags '("-DENABLE_PIC=TRUE"))
411 (modify-phases %standard-phases
412 (add-before 'configure 'prepare-build
414 (delete-file-recursively "build")
417 (home-page "http://x265.org/")
418 (synopsis "Library for encoding h.265/HEVC video streams")
419 (description "x265 is a H.265 / HEVC video encoder application library,
420 designed to encode video or images into an H.265 / HEVC encoded bitstream.")
421 (license license:gpl2+)))
423 (define-public libass
430 "https://github.com/libass/libass/releases/download/"
431 version "/libass-" version ".tar.xz"))
434 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
435 (build-system gnu-build-system)
437 `(("pkg-config" ,pkg-config)
440 `(("freetype" ,freetype)
442 ("fontconfig" ,fontconfig)
443 ("harfbuzz" ,harfbuzz)
445 (home-page "https://github.com/libass/libass")
446 (synopsis "Subtitle rendering library for the ASS/SSA format")
447 (description "libass is a subtitle rendering library for the
448 ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
449 (license license:isc)))
451 (define-public libcaca
454 (version "0.99.beta19")
457 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
461 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
462 (build-system gnu-build-system)
463 (native-inputs `(("pkg-config" ,pkg-config)))
465 `(("freeglut" ,freeglut)
472 (home-page "http://caca.zoy.org/wiki/libcaca")
473 (synopsis "Colour ASCII-art library")
474 (description "libcaca is a graphics library that outputs text instead of
475 pixels, so that it can work on older video cards or text terminals. It
476 supports Unicode, 2048 colors, dithering of color images, and advanced text
478 (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2
480 (define-public libdca
487 "https://download.videolan.org/pub/videolan/libdca/"
488 version "/libdca-" version ".tar.bz2"))
491 "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq"))))
492 (build-system gnu-build-system)
493 (home-page "https://www.videolan.org/developers/libdca.html")
494 (synopsis "DTS Coherent Acoustics decoder")
495 (description "libdca is a library for decoding DTS Coherent Acoustics
497 (license license:gpl2+)))
506 "mirror://sourceforge/" name "/" name "/"
507 version "/" name "-" version ".tar.gz"))
510 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
511 (build-system gnu-build-system)
512 (native-inputs `(("pkg-config" ,pkg-config)))
513 (inputs `(("libxv" ,libxv)))
514 (home-page "http://libdv.sourceforge.net/")
515 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
516 (description "The Quasar DV codec (libdv) is a software codec for DV
517 video, the encoding format used by most digital camcorders, typically those
518 that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
519 developed according to the official standards for DV video: IEC 61834 and
521 (license license:lgpl2.1+)))
523 (define-public libmatroska
530 (uri (string-append "https://dl.matroska.org/downloads/"
531 name "/" name "-" version ".tar.xz"))
534 "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq"))))
535 (build-system cmake-build-system)
537 `(("libebml" ,libebml)))
540 (list "-DBUILD_SHARED_LIBS=YES")
541 #:tests? #f)) ; no test suite
542 (home-page "https://www.matroska.org")
543 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
545 "Matroska aims to become the standard of multimedia container formats.
546 It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
547 of XML. EBML enables the Matroska Development Team to gain significant
548 advantages in terms of future format extensibility, without breaking file
549 support in old parsers.
550 libebml is a C++ library to read and write EBML files.")
551 (license license:lgpl2.1)))
561 ;; Newer releases are only available on GitHub.
562 (string-append "https://github.com/01org/libva/releases/download/"
563 version "/libva-" version ".tar.bz2")
564 ;; Keep the old URL around for compatibility.
565 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
566 "libva/libva-" version "/libva-" version ".tar.bz2")))
568 (base32 "03sb1b3fxw8myf9kz6rxw5f3v1p0vfmk34779qx0q8fk24x9bypk"))))
569 (build-system gnu-build-system)
571 `(("pkg-config" ,pkg-config)))
576 ("libxfixes" ,libxfixes)
578 ("wayland" ,wayland)))
581 (modify-phases %standard-phases
583 'build 'fix-dlopen-paths
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let ((out (assoc-ref outputs "out")))
586 (substitute* "va/drm/va_drm_auth_x11.c"
587 (("\"libva-x11\\.so\\.%d\"")
588 (string-append "\"" out "/lib/libva-x11.so.%d\"")))))))
589 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
590 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
592 (list (string-append "--with-drivers-path="
593 (assoc-ref %build-inputs "mesa") "/lib/dri"))
594 ;; However, we can't write to mesa's store directory, so override the
595 ;; following make variable to install the dummy driver to libva's
596 ;; $prefix/lib/dri directory.
598 (list (string-append "dummy_drv_video_ladir="
599 (assoc-ref %outputs "out") "/lib/dri"))))
600 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
601 (synopsis "Video acceleration library")
602 (description "The main motivation for VA-API (Video Acceleration API) is
603 to enable hardware accelerated video decode/encode at various
604 entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
605 standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
606 (license license:expat)))
608 (define-public ffmpeg
614 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
618 "0gx4ngnhi5glmxh38603qy5n6vq8bl1cr4sqd1xff95i82pmv57d"))))
619 (build-system gnu-build-system)
621 `(("fontconfig" ,fontconfig)
622 ("freetype" ,freetype)
623 ("frei0r-plugins" ,frei0r-plugins)
629 ("libbluray" ,libbluray)
631 ("libcdio-paranoia" ,libcdio-paranoia)
632 ("libtheora" ,libtheora)
634 ("libvdpau" ,libvdpau)
635 ("libvorbis" ,libvorbis)
641 ("pulseaudio" ,pulseaudio)
652 ("pkg-config" ,pkg-config)
654 ("python" ,python-2) ; scripts use interpreter python2
658 `(#:test-target "fate"
660 ;; possible additional inputs:
661 ;; --enable-avisynth enable reading of AviSynth script
663 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
664 ;; --enable-libcelt enable CELT decoding via libcelt [no]
665 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
666 ;; and libraw1394 [no]
667 ;; --enable-libfaac enable AAC encoding via libfaac [no]
668 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
669 ;; --enable-libflite enable flite (voice synthesis) support via
671 ;; --enable-libgme enable Game Music Emu via libgme [no]
672 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
673 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
674 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
675 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
676 ;; --enable-libnut enable NUT (de)muxing via libnut,
677 ;; native (de)muxer exists [no]
678 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
679 ;; libopencore-amrnb [no]
680 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
681 ;; libopencore-amrwb [no]
682 ;; --enable-libopencv enable video filtering via libopencv [no]
683 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
685 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
686 ;; --enable-libschroedinger enable Dirac de/encoding via
687 ;; libschroedinger [no]
688 ;; --enable-libshine enable fixed-point MP3 encoding via
690 ;; --enable-libssh enable SFTP protocol via libssh [no]
691 ;; (libssh2 does not work)
692 ;; --enable-libstagefright-h264 enable H.264 decoding via
693 ;; libstagefright [no]
694 ;; --enable-libutvideo enable Ut Video encoding and decoding via
696 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
697 ;; --enable-libvidstab enable video stabilization using
699 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
700 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
701 ;; libvo-amrwbenc [no]
702 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
703 ;; --enable-libxavs enable AVS encoding via xavs [no]
704 ;; --enable-libzmq enable message passing via libzmq [no]
705 ;; --enable-libzvbi enable teletext support via libzvbi [no]
706 ;; --enable-opencl enable OpenCL code
707 '("--enable-avresample"
708 "--enable-gpl" ; enable optional gpl licensed parts
711 "--enable-fontconfig"
718 "--enable-libfreetype"
719 "--enable-libmp3lame"
725 "--enable-libtwolame"
734 "--enable-runtime-cpudetect"
736 ;; The HTML pages take 7.2 MiB
737 "--disable-htmlpages"
739 ;; The static libraries are 23 MiB
742 ;; Runtime cpu detection is not implemented on
743 ;; MIPS, so we disable some features.
746 "--disable-mipsdspr2"
749 (modify-phases %standard-phases
752 ;; configure does not work followed by "SHELL=..." and
753 ;; "CONFIG_SHELL=..."; set environment variables instead
754 (lambda* (#:key outputs configure-flags #:allow-other-keys)
755 (let ((out (assoc-ref outputs "out")))
756 (substitute* "configure"
757 (("#! /bin/sh") (string-append "#!" (which "sh"))))
758 (setenv "SHELL" (which "bash"))
759 (setenv "CONFIG_SHELL" (which "bash"))
762 (string-append "--prefix=" out)
763 ;; Add $libdir to the RUNPATH of all the binaries.
764 (string-append "--extra-ldflags=-Wl,-rpath="
768 'check 'set-ld-library-path
770 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
772 (let* ((dso (find-files "." "\\.so$"))
773 (path (string-join (map dirname dso) ":")))
774 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
775 (setenv "LD_LIBRARY_PATH" path)
777 (home-page "https://www.ffmpeg.org/")
778 (synopsis "Audio and video framework")
779 (description "FFmpeg is a complete, cross-platform solution to record,
780 convert and stream audio and video. It includes the libavcodec
781 audio/video codec library.")
782 (license license:gpl2+)))
784 (define-public ffmpeg-3.4
790 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
794 "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"))))))
796 (define-public ffmpeg-2.8
802 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
806 "05m1272r5qa2r0ym5vq4figdfnpvcys1fgb1026n5s6xdjd1s1pg"))))
808 (substitute-keyword-arguments (package-arguments ffmpeg)
809 ((#:configure-flags flags)
811 (if (string=? flag "--disable-mipsdsp")
812 "--disable-mipsdspr1"
823 "https://download.videolan.org/pub/videolan/vlc/"
824 version "/vlc-" version ".tar.xz"))
827 "0lavzly8l0ll1d9iris9cnirgcs77g48lxj14058dxqkvd5v1a4v"))))
828 (build-system gnu-build-system)
832 ("gettext" ,gettext-minimal)
833 ("git" ,git) ; needed for a test
834 ("pkg-config" ,pkg-config)))
835 ;; FIXME: Add optional inputs once available.
837 `(("alsa-lib" ,alsa-lib)
843 ("fontconfig" ,fontconfig)
844 ("freetype" ,freetype)
848 ("libarchive" ,libarchive)
850 ("libavc1394" ,libavc1394)
851 ("libbluray" ,libbluray)
855 ("libdvbpsi" ,libdvbpsi)
856 ("libdvdnav" ,libdvdnav)
857 ("libdvdread" ,libdvdread)
859 ("libgcrypt" ,libgcrypt)
863 ("libmatroska" ,libmatroska)
864 ("libmodplug" ,libmodplug)
865 ("libmpeg2" ,libmpeg2)
868 ("libraw1394" ,libraw1394)
870 ("libsamplerate" ,libsamplerate)
871 ("libsecret" ,libsecret)
875 ("libvdpau" ,libvdpau)
876 ("libvorbis" ,libvorbis)
878 ("libtheora" ,libtheora)
882 ("libxinerama" ,libxinerama)
885 ("livemedia-utils" ,livemedia-utils)
890 ("pulseaudio" ,pulseaudio)
891 ("python" ,python-wrapper)
894 ("qtx11extras" ,qtx11extras)
897 ("sdl-image" ,sdl-image)
899 ("speexdsp" ,speexdsp)
904 ("wayland-protocols" ,wayland-protocols)
906 ("xcb-util-keysyms" ,xcb-util-keysyms)))
909 `("CXXFLAGS=-std=gnu++11"
911 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
912 (assoc-ref %build-inputs "ffmpeg")
913 "/lib")) ;needed for the tests
916 (modify-phases %standard-phases
917 (add-after 'unpack 'patch-source
918 (lambda* (#:key inputs #:allow-other-keys)
919 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
920 (substitute* "configure"
921 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
922 (string-append "LIVE555_PREFIX=" livemedia-utils)))
923 ;; Some of the tests require using the display to test out VLC,
924 ;; which fails in our sandboxed build system
925 (substitute* "test/run_vlc.sh"
926 (("./vlc --ignore-config") "echo"))
928 ;; modules/text_renderer/freetype/text_layout.c uses a
929 ;; now-deprecated interface 'fribidi_get_par_embedding_levels'
930 ;; from fribidi.h, so for now we enable the use of deprecated
931 ;; fribidi interfaces from this file.
932 ;; FIXME: Try removing this for vlc >= 3.0.3.
933 (substitute* "modules/text_renderer/freetype/text_layout.c"
934 (("# define FRIBIDI_NO_DEPRECATED 1") ""))
936 ;; Fix build against Qt 5.11.
937 (substitute* "modules/gui/qt/actions_manager.cpp"
938 (("#include <vlc_keys.h>") "#include <vlc_keys.h>
939 #include <QAction>"))
940 (substitute* "modules/gui/qt/components/simple_preferences.cpp"
941 (("#include <QFont>") "#include <QFont>
942 #include <QButtonGroup>"))
944 (add-after 'strip 'regenerate-plugin-cache
945 (lambda* (#:key outputs #:allow-other-keys)
946 ;; The 'install-exec-hook' rule in the top-level Makefile.am
947 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
948 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
949 ;; it references. Thus, we first reset the timestamps of all
950 ;; these files, and then regenerate the cache such that the
951 ;; mtimes it includes are always zero instead of being dependent
952 ;; on the build time.
953 (let* ((out (assoc-ref outputs "out"))
954 (pkglibdir (string-append out "/lib/vlc"))
955 (plugindir (string-append pkglibdir "/plugins"))
956 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
957 ;; TODO: Factorize 'reset-timestamps'.
958 (for-each (lambda (file)
959 (let ((s (lstat file)))
960 (unless (eq? (stat:type s) 'symlink)
962 (find-files plugindir))
963 (invoke cachegen plugindir))))
964 (add-after 'install 'wrap-executable
965 (lambda* (#:key outputs #:allow-other-keys)
966 (let ((out (assoc-ref outputs "out"))
967 (plugin-path (getenv "QT_PLUGIN_PATH")))
968 (wrap-program (string-append out "/bin/vlc")
969 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
971 (home-page "https://www.videolan.org/")
972 (synopsis "Audio and video framework")
973 (description "VLC is a cross-platform multimedia player and framework
974 that plays most multimedia files as well as DVD, Audio CD, VCD, and various
975 treaming protocols.")
976 (license license:gpl2+)))
978 (define-public mplayer
985 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
989 "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s"))))
990 (build-system gnu-build-system)
991 ;; FIXME: Add additional inputs once available.
993 `(("pkg-config" ,pkg-config)))
995 `(("alsa-lib" ,alsa-lib)
996 ("cdparanoia" ,cdparanoia)
998 ("fontconfig" ,fontconfig)
999 ("freetype" ,freetype)
1000 ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5
1003 ("libdvdcss" ,libdvdcss)
1004 ("libdvdnav" ,libdvdnav)
1005 ("libjpeg" ,libjpeg)
1006 ("libmpeg2" ,libmpeg2)
1007 ("libmpg123" ,mpg123) ; audio codec for MP3
1009 ("libtheora" ,libtheora)
1010 ("libvdpau" ,libvdpau)
1011 ("libvorbis" ,libvorbis)
1013 ("libx264" ,libx264)
1014 ("libxinerama" ,libxinerama)
1016 ("libxxf86dga" ,libxxf86dga)
1020 ("pulseaudio" ,pulseaudio)
1021 ("python" ,python-wrapper)
1027 `(#:tests? #f ; no test target
1029 (modify-phases %standard-phases
1031 ;; configure does not work followed by "SHELL=..." and
1032 ;; "CONFIG_SHELL=..."; set environment variables instead
1033 (lambda* (#:key inputs outputs #:allow-other-keys)
1034 (let ((out (assoc-ref outputs "out"))
1035 (libx11 (assoc-ref inputs "libx11")))
1036 (substitute* "configure"
1037 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1038 (setenv "SHELL" (which "bash"))
1039 (setenv "CONFIG_SHELL" (which "bash"))
1042 (string-append "--extra-cflags=-I"
1043 libx11 "/include") ; to detect libx11
1044 "--disable-ffmpeg_a" ; disables bundled ffmpeg
1045 (string-append "--prefix=" out)
1046 ;; Enable runtime cpu detection where supported,
1047 ;; and choose a suitable target.
1048 ,@(match (or (%current-target-system)
1051 '("--enable-runtime-cpudetection"
1052 "--target=x86_64-linux"))
1054 '("--enable-runtime-cpudetection"
1055 "--target=i686-linux"))
1057 '("--target=mips3-linux"))
1058 (_ (list (string-append
1060 (or (%current-target-system)
1061 (nix-system->gnu-triplet
1062 (%current-system)))))))
1063 "--disable-iwmmxt"))))))))
1064 (home-page "https://www.mplayerhq.hu/design7/news.html")
1065 (synopsis "Audio and video player")
1066 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1067 Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1068 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1069 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
1070 (license license:gpl2)))
1079 "https://github.com/mpv-player/mpv/archive/v" version
1083 "15fp4sa5glqhgidd54vs6knf9dp809wszzsqiqz5nyri4ph19nma"))
1084 (file-name (string-append name "-" version ".tar.gz"))))
1085 (build-system waf-build-system)
1087 `(("perl" ,perl) ; for zsh completion file
1088 ("pkg-config" ,pkg-config)
1089 ("python-docutils" ,python-docutils)))
1090 ;; Missing features: libguess, V4L2
1092 `(("alsa-lib" ,alsa-lib)
1099 ("libbluray" ,libbluray)
1100 ("libcaca" ,libcaca)
1101 ("libbs2b" ,libbs2b)
1102 ("libcdio-paranoia" ,libcdio-paranoia)
1103 ("libdvdread" ,libdvdread)
1104 ("libdvdnav" ,libdvdnav)
1105 ("libjpeg" ,libjpeg)
1107 ("libvdpau" ,libvdpau)
1109 ("libxext" ,libxext)
1110 ("libxinerama" ,libxinerama)
1111 ("libxrandr" ,libxrandr)
1112 ("libxscrnsaver" ,libxscrnsaver)
1114 ;; XXX: lua > 5.2 is not currently supported; see
1115 ;; waftools/checks/custom.py
1119 ("pulseaudio" ,pulseaudio)
1121 ("shaderc" ,shaderc)
1122 ("vulkan-icd-loader" ,vulkan-icd-loader)
1124 ("wayland" ,wayland)
1125 ("wayland-protocols" ,wayland-protocols)
1126 ("libxkbcommon" ,libxkbcommon)
1127 ("youtube-dl" ,youtube-dl)
1131 (modify-phases %standard-phases
1133 'configure 'setup-waf
1134 (lambda* (#:key inputs #:allow-other-keys)
1135 (copy-file (assoc-ref inputs "waf") "waf")
1136 (setenv "CC" "gcc"))))
1137 #:configure-flags (list "--enable-libmpv-shared"
1142 "--disable-build-date")
1143 ;; No check function defined.
1145 (home-page "https://mpv.io/")
1146 (synopsis "Audio and video player")
1147 (description "mpv is a general-purpose audio and video player. It is a
1148 fork of mplayer2 and MPlayer. It shares some features with the former
1149 projects while introducing many more.")
1150 (license license:gpl2+)))
1152 (define-public gnome-mpv
1159 (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases"
1160 "/download/v" version "/gnome-mpv-" version
1164 "03kjwd5jq0i5ajnvhjwf5019bjjaa16xkdrhdkiz1k58ipjvvj93"))))
1166 `(("intltool" ,intltool)
1167 ("pkg-config" ,pkg-config)))
1170 ("libepoxy" ,libepoxy)
1172 (build-system glib-or-gtk-build-system)
1173 (home-page "https://github.com/gnome-mpv/gnome-mpv")
1174 (synopsis "GTK+ frontend for the mpv media player")
1175 (description "GNOME MPV is a simple GTK+ frontend for the mpv media player.
1176 GNOME MPV interacts with mpv via the client API exported by libmpv, allowing
1177 access to mpv's powerful playback capabilities.")
1178 (license license:gpl3+)))
1180 (define-public libvpx
1185 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
1188 (url "https://chromium.googlesource.com/webm/libvpx")
1189 (commit (string-append "v" version))))
1190 (file-name (git-file-name name version))
1193 "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6"))
1194 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
1195 (build-system gnu-build-system)
1197 `(#:configure-flags (list "--enable-shared"
1199 ;; Limit size to avoid CVE-2015-1258
1200 "--size-limit=16384x16384"
1201 (string-append "--prefix=" (assoc-ref %outputs "out")))
1202 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
1203 (assoc-ref %outputs "out") "/lib"))
1204 #:phases (modify-phases %standard-phases
1206 (lambda* (#:key configure-flags #:allow-other-keys)
1207 ;; The configure script does not understand some of the GNU
1208 ;; options, so we only add the flags specified above.
1209 (apply invoke "./configure" configure-flags))))
1210 #:tests? #f)) ; no check target
1214 (synopsis "VP8/VP9 video codec")
1215 (description "libvpx is a codec for the VP8/VP9 video compression format.")
1216 (license license:bsd-3)
1217 (home-page "https://www.webmproject.org/")))
1219 (define-public youtube-dl
1222 (version "2018.05.09")
1225 (uri (string-append "https://yt-dl.org/downloads/"
1226 version "/youtube-dl-"
1230 "0sl4bi2jls3417rd62awbqdq1b6wskkjbfwpnyw4a61qarfxid1d"))))
1231 (build-system python-build-system)
1233 ;; The problem here is that the directory for the man page and completion
1234 ;; files is relative, and for some reason, setup.py uses the
1235 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
1236 ;; So, we need pass the prefix directly. In addition, make sure the Bash
1237 ;; completion file is called 'youtube-dl' rather than
1238 ;; 'youtube-dl.bash-completion'.
1239 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
1240 #:phases (modify-phases %standard-phases
1241 (add-before 'install 'fix-the-data-directories
1242 (lambda* (#:key outputs #:allow-other-keys)
1243 (let ((prefix (assoc-ref outputs "out")))
1244 (mkdir "bash-completion")
1245 (rename-file "youtube-dl.bash-completion"
1246 "bash-completion/youtube-dl")
1247 (substitute* "setup.py"
1248 (("youtube-dl\\.bash-completion")
1249 "bash-completion/youtube-dl")
1251 (string-append "'" prefix "/etc/"))
1253 (string-append "'" prefix "/share/")))
1255 (synopsis "Download videos from YouTube.com and other sites")
1257 "Youtube-dl is a small command-line program to download videos from
1258 YouTube.com and many more sites.")
1259 (home-page "https://yt-dl.org")
1260 (license license:public-domain)))
1262 (define-public youtube-dl-gui
1264 (name "youtube-dl-gui")
1269 (uri (pypi-uri "Youtube-DLG" version))
1272 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
1273 (build-system python-build-system)
1275 ;; In Guix, wxpython has not yet been packaged for Python 3.
1276 `(#:python ,python-2
1277 ;; This package has no tests.
1280 (modify-phases %standard-phases
1281 (add-before 'build 'patch-source
1282 (lambda* (#:key inputs #:allow-other-keys)
1283 ;; The youtube-dl-gui program lets you configure options. Some of
1284 ;; them are problematic, so we change their defaults.
1285 (substitute* "youtube_dl_gui/optionsmanager.py"
1286 ;; When this is true, the builder process will try (and fail) to
1287 ;; write logs to the builder user's home directory.
1288 (("'enable_log': True") "'enable_log': False")
1289 ;; This determines which youtube-dl program youtube-dl-gui will
1290 ;; run. If we don't set this, then youtube-dl-gui might download
1291 ;; an arbitrary copy from the Internet into the user's home
1292 ;; directory and run it, so let's make sure youtube-dl-gui uses
1293 ;; the youtube-dl from the inputs by default.
1294 (("'youtubedl_path': self.config_path")
1295 (string-append "'youtubedl_path': '"
1296 (assoc-ref inputs "youtube-dl")
1298 ;; When this is True, when youtube-dl-gui is finished downloading
1299 ;; a file, it will try (and possibly fail) to open the directory
1300 ;; containing the downloaded file. This can fail because it
1301 ;; assumes that xdg-open is in PATH. Unfortunately, simply
1302 ;; adding xdg-utils to the propagated inputs is not enough to
1303 ;; make this work, so for now we set the default to False.
1304 (("'open_dl_dir': True") "'open_dl_dir': False"))
1305 ;; The youtube-dl program from the inputs is actually a wrapper
1306 ;; script written in bash, so attempting to invoke it as a python
1307 ;; script will fail.
1308 (substitute* "youtube_dl_gui/downloaders.py"
1309 (("cmd = \\['python', self\\.youtubedl_path\\]")
1310 "cmd = [self.youtubedl_path]"))
1311 ;; Use relative paths for installing data files so youtube-dl-gui
1312 ;; installs the files relative to its prefix in the store, rather
1313 ;; than relative to /. Also, instead of installing data files into
1314 ;; $prefix/usr/share, install them into $prefix/share for
1315 ;; consistency (see: (standards) Directory Variables).
1316 (substitute* "setup.py"
1317 (("= '/usr/share") "= 'share"))
1318 ;; Update get_locale_file() so it finds the installed localization
1320 (substitute* "youtube_dl_gui/utils.py"
1321 (("os\\.path\\.join\\('/usr', 'share'")
1322 (string-append "os.path.join('"
1323 (assoc-ref %outputs "out")
1324 "', 'share'"))))))))
1326 `(("python2-wxpython" ,python2-wxpython)
1327 ("youtube-dl" ,youtube-dl)))
1328 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
1330 "GUI (Graphical User Interface) for @command{youtube-dl}")
1332 "Youtube-dlG is a GUI (Graphical User Interface) for
1333 @command{youtube-dl}. You can use it to download videos from YouTube and any
1334 other site that youtube-dl supports.")
1335 (license license:unlicense)))
1337 (define-public you-get
1340 (version "0.4.1077")
1344 "https://github.com/soimort/you-get/archive/v"
1346 (file-name (string-append name "-" version ".tar.gz"))
1349 "04vxc91k627qgsqs8dhqajrb6vpj4pw21jlwbha28qakfiz2x11k"))))
1350 (build-system python-build-system)
1352 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
1355 (modify-phases %standard-phases
1356 (add-after 'unpack 'qualify-input-references
1357 ;; Explicitly invoke the input ffmpeg, instead of whichever one
1358 ;; happens to be in the user's $PATH at run time.
1359 (lambda* (#:key inputs #:allow-other-keys)
1360 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
1362 (substitute* "src/you_get/processor/ffmpeg.py"
1363 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
1364 ;; same string is also used when sniffing ffmpeg's output.
1365 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
1366 (string-append prefix "'" ffmpeg "'")))
1368 #:tests? #f)) ; XXX some tests need Internet access
1369 (synopsis "Download videos, audio, or images from Web sites")
1371 "You-Get is a command-line utility to download media contents (videos,
1372 audio, images) from the Web. It can use either mpv or vlc for playback.")
1373 (home-page "https://you-get.org/")
1374 (license license:expat)))
1376 (define-public youtube-viewer
1378 (name "youtube-viewer")
1383 "https://github.com/trizen/youtube-viewer/archive/"
1385 (file-name (string-append name "-" version ".tar.gz"))
1388 "1dqaxkz5svv0lmxds6lppcpzhkq6gar2raw9gx6imrd7yz02fpgn"))))
1389 (build-system perl-build-system)
1391 `(("perl-module-build" ,perl-module-build)))
1392 ;; FIXME: Add optional dependencies once available:
1393 ;; perl-lwp-useragent-cached and perl-term-readline-gnu
1395 `(("perl-data-dump" ,perl-data-dump)
1396 ("perl-file-sharedir" ,perl-file-sharedir)
1397 ("perl-gtk2" ,perl-gtk2)
1398 ("perl-json" ,perl-json)
1399 ("perl-libwww" ,perl-libwww)
1400 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1401 ("perl-mozilla-ca" ,perl-mozilla-ca)
1402 ("perl-unicode-linebreak" ,perl-unicode-linebreak)))
1404 `(#:modules ((guix build perl-build-system)
1407 #:module-build-flags '("--gtk")
1409 (modify-phases %standard-phases
1410 (add-after 'install 'wrap-program
1411 (lambda* (#:key outputs #:allow-other-keys)
1412 (let* ((out (assoc-ref outputs "out"))
1413 (bin-dir (string-append out "/bin/"))
1414 (site-dir (string-append out "/lib/perl5/site_perl/"))
1415 (lib-path (getenv "PERL5LIB")))
1416 (for-each (cut wrap-program <>
1417 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
1418 (find-files bin-dir))
1421 "Lightweight application for searching and streaming videos from YouTube")
1423 "Youtube-viewer searches and plays YouTube videos in a native player.
1424 It comes with various search options; it can search for videos, playlists
1425 and/or channels. The videos are streamed directly in a selected video player
1426 at the best resolution (customizable) and with closed-captions (if available).
1427 Both command-line and GTK2 interface are available.")
1428 (home-page "https://github.com/trizen/youtube-viewer")
1429 (license license:perl-license)))
1431 (define-public libbluray
1437 (uri (string-append "https://download.videolan.org/videolan/"
1438 name "/" version "/"
1439 name "-" version ".tar.bz2"))
1442 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
1443 (build-system gnu-build-system)
1445 `(#:configure-flags '("--disable-bdjava-jar")
1447 (modify-phases %standard-phases
1448 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
1449 ;; Avoid the need to propagate libxml2 by referring to it
1450 ;; directly, as is already done for fontconfig & freetype.
1451 (lambda* (#:key inputs #:allow-other-keys)
1452 (let ((libxml2 (assoc-ref inputs "libxml2")))
1453 (substitute* "configure"
1454 ((" libxml-2.0") ""))
1455 (substitute* "src/libbluray.pc.in"
1456 (("^Libs.private:" field)
1457 (string-append field " -L" libxml2 "/lib -lxml2")))
1459 (add-before 'build 'fix-dlopen-paths
1460 (lambda* (#:key inputs #:allow-other-keys)
1461 (let ((libaacs (assoc-ref inputs "libaacs"))
1462 (libbdplus (assoc-ref inputs "libbdplus")))
1463 (substitute* "src/libbluray/disc/aacs.c"
1465 (string-append "\"" libaacs "/lib/libaacs\"")))
1466 (substitute* "src/libbluray/disc/bdplus.c"
1468 (string-append "\"" libbdplus "/lib/libbdplus\"")))
1470 (native-inputs `(("pkg-config" ,pkg-config)))
1472 `(("fontconfig" ,fontconfig)
1473 ("freetype" ,freetype)
1474 ("libaacs" ,libaacs)
1475 ("libbdplus" ,libbdplus)
1476 ("libxml2" ,libxml2)))
1477 (home-page "https://www.videolan.org/developers/libbluray.html")
1478 (synopsis "Blu-Ray Disc playback library")
1480 "libbluray is a library designed for Blu-Ray Disc playback for media
1481 players, like VLC or MPlayer.")
1482 (license license:lgpl2.1+)))
1484 (define-public libdvdread
1490 (uri (string-append "https://download.videolan.org/videolan/"
1491 name "/" version "/"
1492 name "-" version ".tar.bz2"))
1495 "0dgr23fzcjhb7ck54xkr9zmf4jcq3ph0dz3fbyvla1c6ni9ijfxk"))))
1496 (build-system gnu-build-system)
1498 `(#:configure-flags '("--with-libdvdcss=yes")))
1500 `(("pkg-config" ,pkg-config)))
1502 `(("libdvdcss" ,libdvdcss)))
1503 (home-page "http://dvdnav.mplayerhq.hu/")
1504 (synopsis "Library for reading video DVDs")
1506 "Libdvdread provides a simple foundation for reading DVD video
1507 disks. It provides the functionality that is required to access many
1508 DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
1509 authentication and descrambling (if an external libdvdcss library is
1511 (license license:gpl2+)))
1513 (define-public dvdauthor
1520 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
1524 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
1525 (build-system gnu-build-system)
1527 `(("libdvdread" ,libdvdread)
1529 ("imagemagick" ,imagemagick)
1530 ("libxml2" ,libxml2)
1531 ("freetype" ,freetype)))
1533 `(("pkg-config" ,pkg-config)))
1534 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
1535 (description "@command{dvdauthor} will generate a DVD-Video movie from a
1536 MPEG-2 stream containing VOB packets.")
1537 (home-page "http://dvdauthor.sourceforge.net")
1538 (license license:gpl3+)))
1540 (define-public libdvdnav
1546 (uri (string-append "https://download.videolan.org/videolan/"
1547 name "/" version "/"
1548 name "-" version ".tar.bz2"))
1551 "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph"))))
1552 (build-system gnu-build-system)
1554 `(("pkg-config" ,pkg-config)))
1556 `(("libdvdread" ,libdvdread)))
1557 (home-page "http://dvdnav.mplayerhq.hu/")
1558 (synopsis "Library for video DVD navigation features")
1560 "Libdvdnav is a library for developers of multimedia
1561 applications. It allows easy use of sophisticated DVD navigation features
1562 such as DVD menus, multiangle playback and even interactive DVD games. All
1563 this functionality is provided through a simple API which provides the DVD
1564 playback as a single logical stream of blocks, intermitted by special
1565 dvdnav events to report certain conditions. The main usage of libdvdnav is
1566 a loop regularly calling a function to get the next block, surrounded by
1567 additional calls to tell the library of user interaction. The whole
1568 DVD virtual machine and internal playback states are completely
1570 (license license:gpl2+)))
1572 (define-public libdvdcss
1578 (uri (string-append "https://download.videolan.org/pub/"
1579 name "/" version "/"
1580 name "-" version ".tar.bz2"))
1583 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
1584 (build-system gnu-build-system)
1585 (home-page "https://www.videolan.org/developers/libdvdcss.html")
1586 (synopsis "Library for accessing DVDs as block devices")
1588 "libdvdcss is a simple library designed for accessing DVDs like a block
1589 device without having to bother about the decryption.")
1590 (license license:gpl2+)))
1592 (define-public srt2vtt
1599 "https://files.dthompson.us/srt2vtt/srt2vtt-"
1603 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
1604 (build-system gnu-build-system)
1606 `(("guile" ,guile-2.0)))
1607 (synopsis "SubRip to WebVTT subtitle converter")
1608 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
1609 for use with HTML5 video.")
1610 (home-page "http://dthompson.us/pages/software/srt2vtt")
1611 (license license:gpl3+)))
1613 (define-public avidemux
1620 "mirror://sourceforge/" name "/" name "/" version "/"
1621 name "_" version ".tar.gz"))
1624 "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))
1625 (patches (search-patches "avidemux-install-to-lib.patch"))))
1626 (build-system cmake-build-system)
1628 `(("pkg-config" ,pkg-config)))
1629 ;; FIXME: Once packaged, add libraries not found during the build.
1631 `(("alsa-lib" ,alsa-lib)
1632 ("fontconfig" ,fontconfig)
1633 ("freetype" ,freetype)
1634 ("fribidi" ,fribidi)
1639 ("libvdpau" ,libvdpau)
1640 ("libvorbis" ,libvorbis)
1644 ("pulseaudio" ,pulseaudio)
1645 ("python" ,python-wrapper)
1646 ("qt" ,qt) ; FIXME: reenable modular qt after update - requires building
1647 ;("qtbase" ,qtbase) with -std=gnu++11.
1648 ;("qttools" ,qttools)
1654 `(#:tests? #f ; no check target
1656 ;; Make sure files inside the included ffmpeg tarball are
1658 (modify-phases %standard-phases
1659 (add-before 'patch-source-shebangs 'unpack-ffmpeg
1661 (with-directory-excursion "avidemux_core/ffmpeg_package"
1662 (system* "tar" "xf" "ffmpeg-2.7.6.tar.bz2")
1663 (delete-file "ffmpeg-2.7.6.tar.bz2"))))
1664 (add-after 'patch-source-shebangs 'repack-ffmpeg
1666 (with-directory-excursion "avidemux_core/ffmpeg_package"
1667 (substitute* "ffmpeg-2.7.6/configure"
1668 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1669 (system* "tar" "cjf" "ffmpeg-2.7.6.tar.bz2" "ffmpeg-2.7.6"
1670 ;; avoid non-determinism in the archive
1671 "--sort=name" "--mtime=@0"
1672 "--owner=root:0" "--group=root:0")
1673 (delete-file-recursively "ffmpeg-2.7.6"))))
1676 ;; Copy-paste settings from the cmake build system.
1677 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
1678 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))))
1680 (lambda* (#:key inputs outputs #:allow-other-keys)
1682 ((out (assoc-ref outputs "out"))
1683 (lib (string-append out "/lib"))
1685 (sdl (assoc-ref inputs "sdl"))
1687 (lambda* (component srcdir #:optional (args '()))
1688 (let ((builddir (string-append "build_" component)))
1690 (with-directory-excursion builddir
1693 (apply system* "cmake"
1694 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
1695 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
1696 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
1697 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
1698 "\"-Wl,-rpath=" lib "\"")
1699 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
1700 (string-append "-DSDL_INCLUDE_DIR="
1702 (string-append "../" srcdir)
1705 (system* "make" "-j"
1706 (number->string (parallel-job-count)))
1707 (system* "make" "install"))))))))
1709 (and (build_component "core" "avidemux_core")
1710 (build_component "cli" "avidemux/cli")
1711 (build_component "qt4" "avidemux/qt4")
1712 (build_component "plugins_common" "avidemux_plugins"
1713 '("-DPLUGIN_UI=COMMON"))
1714 (build_component "plugins_cli" "avidemux_plugins"
1715 '("-DPLUGIN_UI=CLI"))
1716 (build_component "plugins_qt4" "avidemux_plugins"
1717 '("-DPLUGIN_UI=QT4"))
1718 (build_component "plugins_settings" "avidemux_plugins"
1719 '("-DPLUGIN_UI=SETTINGS")))
1720 ;; Remove .exe and .dll file.
1721 (delete-file-recursively
1722 (string-append out "/share/ADM6_addons")))))
1723 (delete 'install))))
1724 (home-page "http://fixounet.free.fr/avidemux/")
1725 (synopsis "Video editor")
1726 (description "Avidemux is a video editor designed for simple cutting,
1727 filtering and encoding tasks. It supports many file types, including AVI,
1728 DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
1729 can be automated using projects, job queue and powerful scripting
1731 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
1732 ;; Software with various licenses is included, see License.txt.
1733 (license license:gpl2+)))
1735 (define-public vapoursynth
1737 (name "vapoursynth")
1742 "https://github.com/vapoursynth/vapoursynth/archive/R"
1744 (file-name (string-append name "-" version ".tar.gz"))
1747 "1g3hc079jw4mz1cmkv2y28pdb556wqc8ql7iravgh1rg8j3f1zi5"))))
1748 (build-system gnu-build-system)
1750 `(("autoconf" ,autoconf)
1751 ("automake" ,automake)
1752 ("cython" ,python-cython)
1753 ("libtool" ,libtool)
1754 ("pkg-config" ,pkg-config)
1758 `(("ffmpeg" ,ffmpeg)
1760 ("tesseract-ocr" ,tesseract-ocr)
1764 (modify-phases %standard-phases
1768 (zero? (system* "sh" "autogen.sh")))))))
1769 (home-page "http://www.vapoursynth.com/")
1770 (synopsis "Video processing framework")
1771 (description "VapourSynth is a C++ library and Python module for video
1772 manipulation. It aims to be a modern rewrite of Avisynth, supporting
1773 multithreading, generalized colorspaces, per frame properties, and videos with
1775 ;; src/core/cpufeatures only allows x86, ARM or PPC
1776 (supported-systems (fold delete %supported-systems
1777 '("mips64el-linux" "aarch64-linux")))
1778 ;; As seen from the source files.
1779 (license license:lgpl2.1+)))
1788 "http://downloads.xvid.org/downloads/xvidcore-"
1789 version ".tar.bz2"))
1792 "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz"))))
1793 (build-system gnu-build-system)
1794 (native-inputs `(("yasm" ,yasm)))
1797 (modify-phases %standard-phases
1799 'configure 'pre-configure
1801 (chdir "build/generic")
1802 (substitute* "configure"
1803 (("#! /bin/sh") (string-append "#!" (which "sh")))))))
1804 ;; No 'check' target.
1806 (home-page "https://www.xvid.com/")
1807 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
1808 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
1809 codec library. It uses ASP features such as b-frames, global and quarter
1810 pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
1811 and custom quantization matrices.")
1812 (license license:gpl2+)))
1814 (define-public streamlink
1821 (uri (pypi-uri "streamlink" version))
1824 "02h8b3k8l5zz4vjm0nhxvl1pm924jms8y7sjl40fbybrzvsa4mg2"))))
1825 (build-system python-build-system)
1826 (home-page "https://github.com/streamlink/streamlink")
1828 `(("python-pytest" ,python-pytest)
1829 ("python-mock" ,python-mock)
1830 ("python-requests-mock" ,python-requests-mock)))
1832 `(("python-pysocks" ,python-pysocks)
1833 ("python-websocket-client" ,python-websocket-client)
1834 ("python-iso3166" ,python-iso3166)
1835 ("python-iso639" ,python-iso639)
1836 ("python-pycryptodome" ,python-pycryptodome)
1837 ("python-requests" ,python-requests)
1838 ("python-urllib3" ,python-urllib3)))
1839 (synopsis "Extract streams from various services")
1840 (description "Streamlink is command-line utility that extracts streams
1841 from sites like Twitch.tv and pipes them into a video player of choice.")
1842 (license license:bsd-2)))
1844 (define-public livestreamer
1845 (deprecated-package "livestreamer" streamlink))
1847 (define-public twitchy
1848 (let ((commit "0c0f925b9c7ff2aed4a3b0046561cb794143c398")) ;Fixes tests.
1851 (version (git-version "3.2" "1" commit))
1856 (url "https://github.com/BasioMeusPuga/twitchy.git")
1858 (file-name (git-file-name name version))
1861 "02aizvsr744sh8bdqvwwsmp2qpczlzn8fy76h5dyd3517n9nlcz9"))))
1862 (build-system python-build-system)
1865 (modify-phases %standard-phases
1866 (add-before 'check 'check-setup
1868 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
1871 `(("python-requests" ,python-requests)
1872 ("streamlink" ,streamlink)))
1873 (home-page "https://github.com/BasioMeusPuga/twitchy")
1874 (synopsis "Command-line interface for Twitch.tv")
1876 "This package provides a command-line interface for Twitch.tv")
1877 (license license:gpl3+))))
1885 (uri (string-append "https://github.com/mltframework/mlt/"
1886 "archive/v" version ".tar.gz"))
1887 (file-name (string-append name "-" version ".tar.gz"))
1890 "10m3ry0b2pvqx3bk34qh5dq337nn8pkc2gzfyhsj4nv9abskln47"))
1891 (modules '((guix build utils)))
1893 ;; As of glibc 2.26, <xlocale.h> no longer is.
1894 '(substitute* "src/framework/mlt_property.h"
1895 (("xlocale\\.h") "locale.h")))))
1896 (build-system gnu-build-system)
1898 `(#:tests? #f ; no tests
1899 #:make-flags '("CC=gcc")
1901 (list "--enable-gpl3"
1904 (modify-phases %standard-phases
1906 'configure 'override-LDFLAGS
1907 (lambda* (#:key outputs #:allow-other-keys)
1908 (substitute* "config.mak"
1910 (string-append "LDFLAGS+=-Wl,-rpath="
1911 (assoc-ref outputs "out")
1915 `(("alsa-lib" ,alsa-lib)
1916 ("ffmpeg" ,ffmpeg-3.4)
1918 ("libxml2" ,libxml2)
1921 ("libsamplerate" ,libsamplerate)
1922 ("pulseaudio" ,pulseaudio)
1926 `(("pkg-config" ,pkg-config)))
1927 (home-page "https://www.mltframework.org/")
1928 (synopsis "Author, manage, and run multitrack audio/video compositions")
1930 "MLT is a multimedia framework, designed and developed for television
1931 broadcasting. It provides a toolkit for broadcasters, video editors, media
1932 players, transcoders, web streamers and many more types of applications. The
1933 functionality of the system is provided via an assortment of ready to use
1934 tools, XML authoring components, and an extensible plug-in based API.")
1935 (license license:gpl3)))
1937 (define-public v4l-utils
1943 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
1944 "/v4l-utils-" version ".tar.bz2"))
1947 "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606"))))
1948 (build-system gnu-build-system)
1951 (list (string-append "--with-udevdir="
1952 (assoc-ref %outputs "out")
1954 "CXXFLAGS=-std=gnu++11")))
1957 ("pkg-config" ,pkg-config)))
1959 `(("alsa-lib" ,alsa-lib)
1961 ("libjpeg" ,libjpeg)
1965 (synopsis "Realtime video capture utilities for Linux")
1966 (description "The v4l-utils provide a series of libraries and utilities to
1967 be used for realtime video capture via Linux-specific APIs.")
1968 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
1969 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
1970 (license (list license:lgpl2.1+ license:gpl2))))
1978 (uri (string-append "https://github.com/jp9000/obs-studio"
1979 "/archive/" version ".tar.gz"))
1980 (file-name (string-append name "-" version ".tar.gz"))
1983 "1g5z6z050v25whc7n3xvg6l238wmg5crp7ihvk73qngvzxr8bg28"))))
1984 (build-system cmake-build-system)
1986 `(#:tests? #f)) ; no tests
1988 `(("pkg-config" ,pkg-config)))
1990 `(("alsa-lib" ,alsa-lib)
1994 ("fontconfig" ,fontconfig)
1995 ("freetype" ,freetype)
1997 ("jansson" ,jansson)
1998 ("libx264" ,libx264)
1999 ("libxcomposite" ,libxcomposite)
2001 ("pulseaudio" ,pulseaudio)
2003 ("qtx11extras" ,qtx11extras)
2005 ("v4l-utils" ,v4l-utils)
2007 (synopsis "Live streaming software")
2008 (description "Open Broadcaster Software provides a graphical interface for
2009 video recording and live streaming. OBS supports capturing audio and video
2010 from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2012 (home-page "https://obsproject.com")
2013 (supported-systems '("x86_64-linux" "i686-linux"))
2014 (license license:gpl2+)))
2016 (define-public libvdpau
2023 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2024 name "-" version ".tar.bz2"))
2027 "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5"))))
2028 (build-system gnu-build-system)
2030 `(("pkg-config" ,pkg-config)))
2032 `(("dri2proto" ,dri2proto)
2033 ("libx11" ,libx11 "out")
2034 ("libxext" ,libxext)))
2035 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2036 (synopsis "Video Decode and Presentation API")
2037 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2038 provides an interface to video decode acceleration and presentation hardware
2039 present in modern GPUs.")
2040 (license (license:x11-style "file://COPYING"))))
2042 (define-public vdpauinfo
2049 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2050 name "-" version ".tar.gz"))
2053 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2054 (build-system gnu-build-system)
2056 `(("pkg-config" ,pkg-config)
2057 ("libx11" ,libx11)))
2059 `(("libvdpau" ,libvdpau)))
2060 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2061 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2062 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2064 (license (license:x11-style "file://COPYING"))))
2066 (define-public libvdpau-va-gl
2068 (name "libvdpau-va-gl")
2073 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2074 "releases/download/v" version "/libvdpau-va-gl-"
2078 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2079 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2080 (modules '((guix build utils)))
2081 (snippet '(delete-file-recursively "3rdparty"))))
2082 (build-system cmake-build-system)
2084 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2086 `(("libvdpau" ,libvdpau)
2087 ("pkg-config" ,pkg-config)))
2091 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
2092 (synopsis "VDPAU driver with VA-API/OpenGL backend")
2094 "Many applications can use VDPAU to accelerate portions of the video
2095 decoding process and video post-processing to the GPU video hardware. Since
2096 there is no VDPAU available on Intel chips, they fall back to different drawing
2097 techniques. This driver uses OpenGL under the hood to accelerate drawing and
2098 scaling and VA-API (if available) to accelerate video decoding.")
2099 (license license:expat)))
2101 (define-public recordmydesktop
2103 (name "recordmydesktop")
2107 (uri (string-append "mirror://sourceforge/" name "/" name "/"
2108 version "/recordmydesktop-" version ".tar.gz"))
2111 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
2112 (build-system gnu-build-system)
2113 (inputs `(("popt" ,popt)
2118 ("libxfixes" ,libxfixes)
2119 ("libxdamage" ,libxdamage)
2120 ("libxext" ,libxext)
2121 ("alsa-lib" ,alsa-lib)
2122 ("libvorbis" ,libvorbis)
2123 ("libtheora" ,libtheora)))
2124 (home-page "http://recordmydesktop.sourceforge.net/")
2125 (synopsis "Desktop session video recorder")
2127 "recordMyDesktop is a command-line tool that captures the activity in
2128 your graphical desktop and encodes it as a video. This is a useful tool for
2129 making @dfn{screencasts}.")
2130 (license license:gpl2+)))
2132 (define-public simplescreenrecorder
2134 (name "simplescreenrecorder")
2139 (uri (string-append "https://github.com/MaartenBaert/ssr/archive/"
2141 (file-name (string-append name "-" version ".tar.gz"))
2144 "0l6irdadqpajvv0dj3ngs1231n559l0y1pykhs2h7526qm4w7xal"))))
2145 (build-system cmake-build-system)
2146 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
2147 ;; README.md, the program builds and functions properly without them.
2148 ;; As a result, they are omitted. Please add them back if problems appear.
2150 `(("alsa-lib" ,alsa-lib)
2155 ("pulseaudio" ,pulseaudio)
2157 (native-inputs `(("pkg-config" ,pkg-config)))
2160 (list "-DWITH_QT5=TRUE")
2161 #:tests? #f)) ; no test suite
2162 ;; Using HTTPS causes part of the page to be displayed improperly.
2163 (home-page "http://www.maartenbaert.be/simplescreenrecorder/")
2164 (synopsis "Screen recorder")
2165 (description "SimpleScreenRecorder is an easy to use screen recorder with
2166 a graphical user interface. It supports recording the entire screen, or a
2167 part of it, and allows encoding in many different codecs and file formats.
2168 Other features include a live preview and live streaming.")
2169 (license (list license:gpl3+ ; most files
2170 license:zlib ; glinject/elfhacks.*
2171 license:isc ; glinject/*
2172 license:x11)))) ; build-aux/install-sh
2174 (define-public libsmpeg
2181 (url "svn://svn.icculus.org/smpeg/trunk/")
2182 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
2183 (file-name (string-append name "-" version "-checkout"))
2186 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
2187 (build-system gnu-build-system)
2189 `(#:phases (modify-phases %standard-phases
2190 (add-after 'unpack 'autogen.sh
2192 (zero? (system* "sh" "autogen.sh")))))))
2194 `(("autoconf" ,autoconf)
2195 ("automake" ,automake)))
2198 (home-page "http://icculus.org/smpeg/")
2199 (synopsis "SDL MPEG decoding library")
2201 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
2202 with sound support. Video playback is based on the ubiquitous Berkeley MPEG
2203 player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
2204 library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
2205 and MPEG system streams.")
2206 (license (list license:expat
2211 (define-public libbdplus
2218 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
2219 version "/" name "-" version ".tar.bz2"))
2221 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
2223 `(("libgcrypt" ,libgcrypt)))
2224 (build-system gnu-build-system)
2225 (home-page "https://www.videolan.org/developers/libbdplus.html")
2226 (synopsis "Library for decrypting certain Blu-Ray discs")
2227 (description "libbdplus is a library which implements the BD+ System
2229 (license license:lgpl2.1+)))
2231 (define-public libaacs
2238 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
2239 version "/" name "-" version ".tar.bz2"))
2241 (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27"))))
2243 `(("libgcrypt" ,libgcrypt)))
2247 (build-system gnu-build-system)
2248 (home-page "https://www.videolan.org/developers/libaacs.html")
2249 (synopsis "Library for decrypting certain Blu-Ray discs")
2250 (description "libaacs is a library which implements the Advanced Access
2251 Content System specification.")
2252 (license license:lgpl2.1+)))
2254 (define-public mps-youtube
2256 (name "mps-youtube")
2261 (uri (string-append "https://github.com/mps-youtube/mps-youtube/"
2262 "archive/v" version ".tar.gz"))
2263 (file-name (string-append name "-" version ".tar.gz"))
2266 "0x7cmfh199q9j396v7bz81nnvanfllhsg86489i5dw2p3yyc9wnm"))))
2267 (build-system python-build-system)
2269 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
2270 ;; test suite results differ depending on the country and also introduce
2271 ;; non-determinism in the tests.
2272 ;; https://github.com/mps-youtube/mps-youtube/issues/556
2275 `(("python-pafy" ,python-pafy)
2276 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
2277 (home-page "https://github.com/mps-youtube/mps-youtube")
2278 (synopsis "Terminal based YouTube player and downloader")
2280 "@code{mps-youtube} is based on mps, a terminal based program to
2281 search, stream and download music. This implementation uses YouTube as
2282 a source of content and can play and download video as well as audio.
2283 It can use either mpv or mplayer for playback, and for conversion of
2284 formats ffmpeg or libav is used. Users should install one of the
2285 supported players in addition to this package.")
2286 (license license:gpl3+)))
2288 (define-public handbrake
2294 (uri (string-append "https://handbrake.fr/rotation.php?file="
2295 "HandBrake-" version ".tar.bz2"))
2296 (file-name (string-append "handbrake-" version ".tar.bz2"))
2299 "1w720y3bplkz187wgvy4a4xm0vpppg45mlni55l6yi8v2bfk14pv"))
2300 (patches (search-patches "handbrake-pkg-config-path.patch"))
2301 (modules '((guix build utils)))
2303 ;; Remove bundled libraries and source not necessary for
2304 ;; running under a GNU environment.
2306 (for-each delete-file-recursively '("contrib" "macosx" "win"))
2308 (build-system glib-or-gtk-build-system)
2310 `(("automake" ,automake) ;gui subpackage must be bootstrapped
2311 ("autoconf" ,autoconf)
2312 ("curl" ,curl) ;not actually used, but tested for
2313 ("intltool" ,intltool)
2314 ("libtool" ,libtool)
2315 ("pkg-config" ,pkg-config)
2316 ("python" ,python-2))) ;for configuration
2319 ("dbus-glib" ,dbus-glib)
2321 ("fontconfig" ,fontconfig)
2322 ("freetype" ,freetype)
2324 ("gstreamer" ,gstreamer)
2325 ("gst-plugins-base" ,gst-plugins-base)
2329 ("libbluray" ,libbluray)
2330 ("libdvdnav" ,libdvdnav)
2331 ("libdvdread" ,libdvdread)
2332 ("libgudev" ,libgudev)
2333 ("libmpeg2" ,libmpeg2)
2334 ("libnotify" ,libnotify)
2336 ("libsamplerate" ,libsamplerate)
2337 ("libtheora" ,libtheora)
2338 ("libvorbis" ,libvorbis)
2340 ("libxml2" ,libxml2)
2341 ("libx264" ,libx264)
2345 `(#:tests? #f ;tests require Ruby and claim to be unsupported
2347 (modify-phases %standard-phases
2348 (add-before 'patch-source-shebangs 'bootstrap-gtk
2349 ;; Run bootstrap ahead of time so that shebangs get patched.
2351 (setenv "CONFIG_SHELL" (which "sh"))
2352 (setenv "NOCONFIGURE" "1")
2353 ;; Patch the Makefile so that it doesn't bootstrap again.
2354 (substitute* "gtk/module.rules"
2355 ((".*autogen\\.sh.*") ""))
2356 (zero? (system* "sh" "./gtk/autogen.sh"))))
2357 (add-before 'configure 'disable-contrib
2359 (substitute* "make/include/main.defs"
2360 ;; Disable unconditional inclusion of some "contrib"
2361 ;; libraries (ffmpeg, libvpx, libdvdread, libdvdnav,
2362 ;; and libbluray), which would lead to fetching and
2363 ;; building of these libraries. Use our own instead.
2364 (("MODULES \\+= contrib") "# MODULES += contrib"))
2366 (add-before 'configure 'fix-x265-linking
2368 (substitute* "test/module.defs"
2369 ;; Fix missing library during linking error
2370 (("TEST.GCC.l =") "TEST.GCC.l = x265"))
2373 (lambda* (#:key outputs configure-flags #:allow-other-keys)
2374 ;; 'configure' is not an autoconf-generated script, and
2375 ;; errors on unrecognized arguments,
2376 ;; e.g. --enable-fast-install
2377 (let ((out (assoc-ref outputs "out")))
2378 (zero? (apply system* "./configure"
2379 (string-append "--prefix=" out)
2380 (or configure-flags '()))))))
2381 (add-after 'configure 'chdir-build
2382 (lambda _ (chdir "./build") #t)))))
2383 (home-page "https://handbrake.fr")
2384 (synopsis "Video transcoder")
2386 "HandBrake is a tool for converting video from any format to a selection
2387 of modern, widely supported codecs.")
2388 ;; Most under GPL version 2 or later, and portions under BSD 3 Clause
2389 (license (list license:gpl2+ license:bsd-3))))
2391 (define-public openh264
2397 (uri (string-append "https://github.com/cisco/"
2398 name "/archive/v" version ".tar.gz"))
2399 (file-name (string-append name "-" version ".tar.gz"))
2402 "0gv571bqkxk7ic64dmavs1q8nr7p59mcf4ibqp4lc070gn6w61ww"))))
2403 (build-system gnu-build-system)
2406 ("python" ,python)))
2408 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
2410 #:test-target "test"
2411 #:phases (modify-phases %standard-phases
2412 ;; no configure script
2413 (delete 'configure))))
2414 (home-page "http://www.openh264.org/")
2415 (synopsis "H264 decoder library")
2417 "Openh264 is a library which can decode H264 video streams.")
2418 (license license:bsd-2)))
2420 (define-public libmp4v2
2427 ;; XXX: The new location of upstream is uncertain and will become relevant the
2428 ;; moment when the googlecode archive shuts down. It is past the date it
2429 ;; should've been turned off. I tried to communicate with upstream, but this
2430 ;; wasn't very responsive and not very helpful. The short summary is, it is
2431 ;; chaos when it comes to the amount of forks and only time will tell where
2432 ;; the new upstream location is.
2433 (uri (string-append "https://storage.googleapis.com/google-"
2434 "code-archive-downloads/v2/"
2435 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
2436 (file-name (string-append name "-" version ".tar.bz2"))
2439 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
2440 (build-system gnu-build-system)
2442 "static")) ; 3.7MiB .a file
2445 (modify-phases %standard-phases
2446 (add-after 'unpack 'remove-dates
2448 ;; Make the build reproducible.
2449 (substitute* "configure"
2450 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
2451 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
2453 (add-after 'install 'move-static-libraries
2454 (lambda* (#:key outputs #:allow-other-keys)
2455 ;; Move static libraries to the "static" output.
2456 (let* ((out (assoc-ref outputs "out"))
2457 (lib (string-append out "/lib"))
2458 (static (assoc-ref outputs "static"))
2459 (slib (string-append static "/lib")))
2461 (for-each (lambda (file)
2462 (install-file file slib)
2464 (find-files lib "\\.a$"))
2467 `(("help2man" ,help2man)
2468 ("dejagnu" ,dejagnu)))
2469 (home-page "https://code.google.com/archive/p/mp4v2/")
2470 (synopsis "API to create and modify mp4 files")
2472 "The MP4v2 library provides an API to create and modify mp4 files as defined by
2473 ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
2474 file format that has been used as a multimedia file format in a variety of platforms and
2475 applications. It is a very powerful and extensible format that can accommodate
2476 practically any type of media.")
2477 (license license:mpl1.1)))
2479 (define-public libmediainfo
2481 (name "libmediainfo")
2485 (uri (string-append "https://mediaarea.net/download/source/"
2487 name "_" version ".tar.bz2"))
2490 "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b"))))
2491 ;; TODO add a Big Buck Bunny webm for tests.
2493 `(("autoconf" ,autoconf)
2494 ("automake" ,automake)
2495 ("libtool" ,libtool)
2496 ("pkg-config" ,pkg-config)
2498 ("tinyxml2" ,tinyxml2)
2500 ("libzen" ,libzen)))
2501 (build-system gnu-build-system)
2503 '(#:tests? #f ; see above TODO
2505 ;; build scripts not in root of archive
2506 (modify-phases %standard-phases
2507 (add-after 'unpack 'change-to-build-dir
2509 (chdir "Project/GNU/Library")
2511 (add-after 'change-to-build-dir 'autogen
2513 (zero? (system* "sh" "autogen.sh")))))))
2514 (home-page "https://mediaarea.net/en/MediaInfo")
2515 (synopsis "Library for retrieving media metadata")
2516 (description "MediaInfo is a library used for retrieving technical
2517 information and other metadata about audio or video files. A non-exhaustive
2518 list of the information MediaInfo can retrieve from media files include:
2521 @item General: title, author, director, album, track number, date, duration...
2522 @item Video: codec, aspect, fps, bitrate...
2523 @item Audio: codec, sample rate, channels, language, bitrate...
2524 @item Text: language of subtitle
2525 @item Chapters: number of chapters, list of chapters
2528 MediaInfo supports the following formats:
2531 @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
2532 MPEG-2, MPEG-4, DVD (VOB)...
2533 @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
2534 @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
2535 @item Subtitles: SRT, SSA, ASS, SAMI...
2537 (license license:bsd-2)))
2539 ;; TODO also have a GUI version available
2540 (define-public mediainfo
2546 (uri (string-append "https://mediaarea.net/download/source/"
2547 name "/" version "/"
2548 name "_" version ".tar.bz2"))
2551 "0dy51a3i79jppmg1gi4f6h7jx4hcgnkmfim4d7d3gmnlbkjh8anv"))))
2553 `(("autoconf" ,autoconf)
2554 ("automake" ,automake)
2555 ("libtool" ,libtool)
2556 ("pkg-config" ,pkg-config)
2558 ("libmediainfo" ,libmediainfo)
2559 ("libzen" ,libzen)))
2560 (build-system gnu-build-system)
2562 '(#:tests? #f ; lacks tests
2564 ;; build scripts not in root of archive
2565 (modify-phases %standard-phases
2566 (add-after 'unpack 'change-to-build-dir
2568 (chdir "Project/GNU/CLI")
2570 (add-after 'change-to-build-dir 'autogen
2572 (zero? (system* "sh" "autogen.sh")))))))
2573 (home-page "https://mediaarea.net/en/MediaInfo")
2574 (synopsis "Utility for reading media metadata")
2575 (description "MediaInfo is a utility used for retrieving technical
2576 information and other metadata about audio or video files. It supports the
2577 many codecs and formats supported by libmediainfo.")
2578 (license license:bsd-2)))
2580 (define-public livemedia-utils
2582 (name "livemedia-utils")
2583 (version "2017.10.28")
2587 "https://download.videolan.org/contrib/live555/live."
2591 "0f5kxpayqn3yhabqrd2cqlc74i6x2xr01jfkank1lcilxnfyrsnq"))
2592 (modules '((guix build utils)))
2594 ;; As of glibc 2.26, <xlocale.h> no longer is.
2595 '(substitute* "liveMedia/include/Locale.hh"
2596 (("xlocale\\.h") "locale.h")))))
2597 (build-system gnu-build-system)
2599 '(#:tests? #f ; no tests
2600 #:make-flags (list "CC=gcc"
2601 (string-append "LDFLAGS=-Wl,-rpath="
2602 (assoc-ref %outputs "out") "/lib")
2603 (string-append "PREFIX="
2604 (assoc-ref %outputs "out")))
2605 #:phases (modify-phases %standard-phases
2606 (add-before 'configure 'fix-makefiles-generation
2608 (substitute* "genMakefiles"
2613 (zero? (system* "./genMakefiles"
2614 "linux-with-shared-libraries")))))))
2615 (home-page "http://www.live555.com/liveMedia/")
2616 (synopsis "Set of C++ libraries for multimedia streaming")
2617 (description "This code forms a set of C++ libraries for multimedia
2618 streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
2619 can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
2620 JPEG video, and several audio codecs. They can easily be extended to support
2621 additional (audio and/or video) codecs, and can also be used to build basic
2622 RTSP or SIP clients and servers.")
2623 (license license:lgpl3+)))
2625 (define-public libdvbpsi
2632 "https://download.videolan.org/pub/libdvbpsi/"
2633 version "/libdvbpsi-" version ".tar.bz2"))
2636 "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc"))))
2637 (build-system gnu-build-system)
2638 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
2639 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
2641 (description "libdvbpsi is a simple library designed for decoding and
2642 generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
2643 and ITU-T H.222.0.")
2644 (license license:lgpl2.1)))
2646 (define-public ffms2
2650 (home-page "https://github.com/FFMS/ffms2")
2653 (uri (string-append home-page "/archive/" version ".tar.gz"))
2654 (file-name (string-append name "-" version ".tar.gz"))
2657 "1vbkab8vrplxz5xgag8ggzkwp4f7nf285pd0l2a7zy66n6i2m6xh"))))
2658 (build-system gnu-build-system)
2661 (list "--enable-avresample")))
2665 `(("ffmpeg" ,ffmpeg)))
2667 `(("pkg-config" ,pkg-config)))
2668 (synopsis "Cross-platform wrapper around ffmpeg/libav")
2670 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
2671 programmers to access a standard API to open and decompress media files.")
2672 ;; sources are distributed under a different license that the binary.
2673 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
2674 (license license:gpl2+))); inherits from ffmpeg
2676 (define-public aegisub
2683 "http://ftp.aegisub.org/pub/archives/releases/source/"
2684 name "-" version ".tar.xz"))
2687 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))))
2688 (build-system gnu-build-system)
2691 (list "--disable-update-checker"
2692 "--without-portaudio"
2695 ;; tests require busted, a lua package we don't have yet
2698 (modify-phases %standard-phases
2699 (add-before 'configure 'fix-ldflags
2701 (setenv "LDFLAGS" "-pthread"))))))
2704 ("desktop-file-utils" ,desktop-file-utils)
2707 ("hunspell" ,hunspell)
2710 ("alsa-lib" ,alsa-lib)
2711 ("pulseaudio" ,pulseaudio)
2713 ("freetype" ,freetype)
2714 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
2716 `(("intltool" ,intltool)
2717 ("pkg-config" ,pkg-config)))
2718 (home-page "http://www.aegisub.org/")
2719 (synopsis "Subtitle engine")
2721 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
2722 it quick and easy to time subtitles to audio, and features many powerful
2723 tools for styling them, including a built-in real-time video preview.")
2724 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
2725 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
2726 license:expat)))) ; and src/gl that is under a license similar
2727 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
2728 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
2729 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
2731 (define-public gst-transcoder
2733 (name "gst-transcoder")
2738 (uri (string-append "https://github.com/pitivi/gst-transcoder/"
2739 "archive/" version ".tar.gz"))
2740 (file-name (string-append name "-" version ".tar.gz"))
2743 "0cnwmrsd321s02ff91m3j27ydj7f8wks0jvmp5admlhka6z7zxm9"))))
2744 (build-system meson-build-system)
2746 `(("gobject-introspection" ,gobject-introspection)
2748 ("gstreamer" ,gstreamer)
2749 ("gst-plugins-base" ,gst-plugins-base)))
2751 `(("python" ,python)
2752 ("pkg-config" ,pkg-config)))
2753 (home-page "https://github.com/pitivi/gst-transcoder/")
2754 (synopsis "GStreamer Transcoding API")
2755 (description "GStreamer Transcoding API")
2756 (license license:lgpl2.1)))
2765 (uri (string-append "mirror://sourceforge/gmerlin/"
2766 name "/" version "/"
2767 name "-" version ".tar.gz"))
2768 (file-name (string-append name "-" version ".tar.gz"))
2771 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
2772 (build-system gnu-build-system)
2774 '(#:configure-flags '("LIBS=-lm")))
2776 `(("pkg-config" ,pkg-config)
2777 ("doxygen" ,doxygen)))
2778 (home-page "http://gmerlin.sourceforge.net")
2779 (synopsis "Low level library for multimedia API building")
2781 "Gavl is short for Gmerlin Audio Video Library. It is a low level
2782 library, upon which multimedia APIs can be built. Gavl handles all the
2783 details of audio and video formats like colorspaces, sample rates,
2784 multichannel configurations, etc. It provides standardized definitions for
2785 those formats as well as container structures for carrying audio samples or
2786 video images inside an application.
2788 In addition, it handles the sometimes ugly task of converting between all
2789 these formats and provides some elementary operations (copying, scaling,
2790 alpha blending etc).")
2791 (license license:gpl3)))
2793 (define-public frei0r-plugins
2795 (name "frei0r-plugins")
2800 (uri (string-append "https://files.dyne.org/frei0r/"
2801 "frei0r-plugins-" version ".tar.gz"))
2804 "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0"))))
2805 (build-system gnu-build-system)
2808 (modify-phases %standard-phases
2809 (add-after 'unpack 'autotools
2811 (zero? (system* "sh" "autogen.sh")))))))
2812 ;; TODO: opencv for additional face detection filters
2817 `(("pkg-config" ,pkg-config)
2818 ("libtool" ,libtool)
2819 ("automake" ,automake)
2820 ("autoconf" ,autoconf)))
2821 (home-page "https://www.dyne.org/software/frei0r/")
2822 (synopsis "Minimalistic plugin API for video effects")
2824 "Frei0r is a minimalistic plugin API for video effects.
2825 The main emphasis is on simplicity for an API that will round up
2826 the most common video effects into simple filters, sources and
2827 mixers that can be controlled by parameters. Frei0r wants to
2828 provide a way to share these simple effects between many
2829 applications, avoiding their reimplementation by different projects.
2830 It counts more than 100 plugins.")
2831 (license (list license:gpl2+
2832 ;; The following files are licensed as LGPL2.1+:
2833 ;; src/generator/ising0r/ising0r.c
2834 ;; src/generator/onecol0r/onecol0r.cpp
2835 ;; src/generator/nois0r/nois0r.cpp
2836 ;; src/generator/lissajous0r/lissajous0r.cpp
2837 ;; src/filter/ndvi/gradientlut.hpp
2838 ;; src/filter/ndvi/ndvi.cpp
2839 ;; src/filter/facedetect/facedetect.cpp
2840 license:lgpl2.1+))))
2842 (define-public motion
2846 (home-page "https://motion-project.github.io/")
2850 "https://github.com/Motion-Project/motion/archive/"
2851 "release-" version ".tar.gz"))
2854 "1qm4i8zrqafl60sv2frhixvkd0wh0r5jfcrj5i6gha7yplsvjx10"))
2855 (file-name (string-append name "-" version ".tar.gz"))))
2856 (build-system gnu-build-system)
2858 `(("autoconf" ,autoconf-wrapper)
2859 ("automake" ,automake)
2860 ("pkg-config" ,pkg-config)))
2862 `(("libjpeg" ,libjpeg)
2863 ("ffmpeg" ,ffmpeg-3.4)
2864 ("sqlite" ,sqlite)))
2866 '(#:phases (modify-phases %standard-phases
2867 (add-after 'unpack 'bootstrap
2869 (patch-shebang "version.sh")
2870 (invoke "autoreconf" "-vfi"))))
2871 #:configure-flags '("--sysconfdir=/etc")
2872 #:make-flags (list (string-append "sysconfdir="
2873 (assoc-ref %outputs "out")
2876 #:tests? #f)) ;no 'check' target
2877 (synopsis "Detect motion from video signals")
2879 "Motion is a program that monitors the video signal from one or more
2880 cameras and is able to detect if a significant part of the picture has
2881 changed. Or in other words, it can detect motion.")
2883 ;; Some files say "version 2" and others "version 2 or later".
2884 (license license:gpl2)))
2886 (define-public subdl
2887 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
2891 (version (git-version "1.0.3" revision commit))
2895 (url "https://github.com/alexanderwink/subdl.git")
2897 (file-name (git-file-name name version))
2900 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
2901 (build-system trivial-build-system)
2903 `(#:modules ((guix build utils))
2905 (use-modules (guix build utils))
2906 (let* ((out (assoc-ref %outputs "out"))
2907 (bin (string-append out "/bin"))
2908 (source (assoc-ref %build-inputs "source"))
2909 (python (assoc-ref %build-inputs "python")))
2910 (install-file (string-append source "/subdl") bin)
2911 (patch-shebang (string-append bin "/subdl")
2912 (list (string-append python "/bin")))))))
2913 (inputs `(("python" ,python)))
2914 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
2915 (description "Subdl is a command-line tool for downloading subtitles from
2916 opensubtitles.org. By default, it will search for English subtitles, display
2917 the results, download the highest-rated result in the requested language and
2918 save it to the appropriate filename.")
2919 (license license:gpl3+)
2920 (home-page "https://github.com/alexanderwink/subdl"))))
2922 (define-public l-smash
2929 "https://github.com/" name "/" name "/archive/v"
2931 (file-name (string-append name "-" version ".tar.gz"))
2934 "0dary0h65kq6sv93iabv25djlvzr5ckdcp3ywagbix44wqfw7xz6"))))
2935 (build-system gnu-build-system)
2937 `(#:tests? #f ;no tests
2939 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
2940 (assoc-ref %outputs "out") "/lib"))
2942 (modify-phases %standard-phases
2943 ;; configure fails if it is followed by CONFIG_SHELL
2945 (lambda* (#:key outputs #:allow-other-keys)
2946 (let ((out (assoc-ref outputs "out")))
2947 (invoke "./configure" (string-append "--prefix=" out)
2948 "--disable-static")))))))
2950 `(("which" ,which)))
2951 (home-page "https://l-smash.github.io/l-smash/")
2952 (synopsis "MP4 multiplexer and demultiplexer library")
2954 "L-SMASH is a cross-platform library that handles the ISO base media file
2955 format and some of its derived file formats, including MP4. It operates as a
2956 multiplexer and demultiplexer, and can mux video and audio in several formats
2957 using standalone executable files.")
2958 (license license:isc)))