| 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, 2019 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, 2019 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, 2019 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, 2019 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, 2019 Rutger Helling <rhelling@mykolab.com> |
| 25 | ;;; Copyright © 2018 Roel Janssen <roel@gnu.org> |
| 26 | ;;; Copyright © 2018, 2019 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> |
| 34 | ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com> |
| 35 | ;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de> |
| 36 | ;;; |
| 37 | ;;; This file is part of GNU Guix. |
| 38 | ;;; |
| 39 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 40 | ;;; under the terms of the GNU General Public License as published by |
| 41 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 42 | ;;; your option) any later version. |
| 43 | ;;; |
| 44 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 45 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 46 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 47 | ;;; GNU General Public License for more details. |
| 48 | ;;; |
| 49 | ;;; You should have received a copy of the GNU General Public License |
| 50 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 51 | |
| 52 | (define-module (gnu packages video) |
| 53 | #:use-module (ice-9 match) |
| 54 | #:use-module (srfi srfi-1) |
| 55 | #:use-module (srfi srfi-26) |
| 56 | #:use-module ((guix licenses) #:prefix license:) |
| 57 | #:use-module (guix utils) |
| 58 | #:use-module (guix packages) |
| 59 | #:use-module (guix download) |
| 60 | #:use-module (guix git-download) |
| 61 | #:use-module (guix svn-download) |
| 62 | #:use-module (guix build-system cmake) |
| 63 | #:use-module (guix build-system gnu) |
| 64 | #:use-module (guix build-system glib-or-gtk) |
| 65 | #:use-module (guix build-system meson) |
| 66 | #:use-module (guix build-system perl) |
| 67 | #:use-module (guix build-system python) |
| 68 | #:use-module (guix build-system waf) |
| 69 | #:use-module (guix build-system trivial) |
| 70 | #:use-module (gnu packages) |
| 71 | #:use-module (gnu packages algebra) |
| 72 | #:use-module (gnu packages assembly) |
| 73 | #:use-module (gnu packages audio) |
| 74 | #:use-module (gnu packages autotools) |
| 75 | #:use-module (gnu packages avahi) |
| 76 | #:use-module (gnu packages backup) |
| 77 | #:use-module (gnu packages base) |
| 78 | #:use-module (gnu packages bison) |
| 79 | #:use-module (gnu packages boost) |
| 80 | #:use-module (gnu packages cdrom) |
| 81 | #:use-module (gnu packages check) |
| 82 | #:use-module (gnu packages cmake) |
| 83 | #:use-module (gnu packages compression) |
| 84 | #:use-module (gnu packages cpp) |
| 85 | #:use-module (gnu packages curl) |
| 86 | #:use-module (gnu packages dejagnu) |
| 87 | #:use-module (gnu packages dns) |
| 88 | #:use-module (gnu packages docbook) |
| 89 | #:use-module (gnu packages documentation) |
| 90 | #:use-module (gnu packages elf) |
| 91 | #:use-module (gnu packages file) |
| 92 | #:use-module (gnu packages flex) |
| 93 | #:use-module (gnu packages fontutils) |
| 94 | #:use-module (gnu packages freedesktop) |
| 95 | #:use-module (gnu packages fribidi) |
| 96 | #:use-module (gnu packages gettext) |
| 97 | #:use-module (gnu packages ghostscript) |
| 98 | #:use-module (gnu packages gl) |
| 99 | #:use-module (gnu packages glib) |
| 100 | #:use-module (gnu packages guile) |
| 101 | #:use-module (gnu packages gnome) |
| 102 | #:use-module (gnu packages gnunet) |
| 103 | #:use-module (gnu packages gnupg) |
| 104 | #:use-module (gnu packages gstreamer) |
| 105 | #:use-module (gnu packages gtk) |
| 106 | #:use-module (gnu packages image) |
| 107 | #:use-module (gnu packages imagemagick) |
| 108 | #:use-module (gnu packages iso-codes) |
| 109 | #:use-module (gnu packages libidn) |
| 110 | #:use-module (gnu packages libreoffice) |
| 111 | #:use-module (gnu packages linux) |
| 112 | #:use-module (gnu packages lua) |
| 113 | #:use-module (gnu packages m4) |
| 114 | #:use-module (gnu packages man) |
| 115 | #:use-module (gnu packages markup) |
| 116 | #:use-module (gnu packages mp3) |
| 117 | #:use-module (gnu packages ncurses) |
| 118 | #:use-module (gnu packages networking) |
| 119 | #:use-module (gnu packages ocr) |
| 120 | #:use-module (gnu packages perl) |
| 121 | #:use-module (gnu packages pkg-config) |
| 122 | #:use-module (gnu packages popt) |
| 123 | #:use-module (gnu packages pretty-print) |
| 124 | #:use-module (gnu packages protobuf) |
| 125 | #:use-module (gnu packages pulseaudio) |
| 126 | #:use-module (gnu packages python) |
| 127 | #:use-module (gnu packages python-crypto) |
| 128 | #:use-module (gnu packages python-web) |
| 129 | #:use-module (gnu packages python-xyz) |
| 130 | #:use-module (gnu packages qt) |
| 131 | #:use-module (gnu packages rdesktop) |
| 132 | #:use-module (gnu packages ruby) |
| 133 | #:use-module (gnu packages samba) |
| 134 | #:use-module (gnu packages sdl) |
| 135 | #:use-module (gnu packages serialization) |
| 136 | #:use-module (gnu packages shells) |
| 137 | #:use-module (gnu packages sqlite) |
| 138 | #:use-module (gnu packages ssh) |
| 139 | #:use-module (gnu packages swig) |
| 140 | #:use-module (gnu packages texinfo) |
| 141 | #:use-module (gnu packages textutils) |
| 142 | #:use-module (gnu packages tls) |
| 143 | #:use-module (gnu packages time) |
| 144 | #:use-module (gnu packages upnp) |
| 145 | #:use-module (gnu packages version-control) |
| 146 | #:use-module (gnu packages vulkan) |
| 147 | #:use-module (gnu packages web) |
| 148 | #:use-module (gnu packages webkit) |
| 149 | #:use-module (gnu packages wxwidgets) |
| 150 | #:use-module (gnu packages xdisorg) |
| 151 | #:use-module (gnu packages xiph) |
| 152 | #:use-module (gnu packages xml) |
| 153 | #:use-module (gnu packages xorg)) |
| 154 | |
| 155 | (define-public aalib |
| 156 | (package |
| 157 | (name "aalib") |
| 158 | (version "1.4rc5") |
| 159 | (source (origin |
| 160 | (method url-fetch) |
| 161 | (uri (string-append "mirror://sourceforge/aa-project/aa-lib/" |
| 162 | version "/" name "-" version ".tar.gz")) |
| 163 | (sha256 |
| 164 | (base32 |
| 165 | "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv")))) |
| 166 | (build-system gnu-build-system) |
| 167 | (native-inputs |
| 168 | `(("makeinfo" ,texinfo))) |
| 169 | (inputs |
| 170 | `(("ncurses" ,ncurses))) |
| 171 | (arguments |
| 172 | `(#:phases |
| 173 | (modify-phases %standard-phases |
| 174 | (replace 'configure |
| 175 | (lambda* (#:key build inputs outputs #:allow-other-keys) |
| 176 | ;; This old `configure' script doesn't support |
| 177 | ;; variables passed as arguments. |
| 178 | (let ((out (assoc-ref outputs "out")) |
| 179 | (ncurses (assoc-ref inputs "ncurses"))) |
| 180 | (setenv "CONFIG_SHELL" (which "bash")) |
| 181 | (invoke "./configure" |
| 182 | (string-append "--prefix=" out) |
| 183 | (string-append "--build=" build) |
| 184 | ;; The ancient config.guess is unable to |
| 185 | ;; guess the host triplet on mips64el. |
| 186 | ,@(if (string=? "mips64el-linux" |
| 187 | (%current-system)) |
| 188 | '("--host=mips64el-unknown-linux-gnu") |
| 189 | '()) |
| 190 | ;; The same is also true with aarch64. |
| 191 | ,@(if (string=? "aarch64-linux" |
| 192 | (%current-system)) |
| 193 | '("--host=aarch64-unknown-linux-gnu") |
| 194 | '()) |
| 195 | (string-append "--with-ncurses=" |
| 196 | ncurses)))))))) |
| 197 | (home-page "http://aa-project.sourceforge.net/aalib/") |
| 198 | (synopsis "ASCII-art library") |
| 199 | (description |
| 200 | "AA-lib is a low level gfx library which does not require graphics device. |
| 201 | In fact, there is no graphical output possible. AA-lib replaces those |
| 202 | old-fashioned output methods with powerful ascii-art renderer.") |
| 203 | (license license:lgpl2.0+))) |
| 204 | |
| 205 | (define-public liba52 |
| 206 | (package |
| 207 | (name "liba52") |
| 208 | (version "0.7.4") |
| 209 | (source (origin |
| 210 | (method url-fetch) |
| 211 | (uri (string-append |
| 212 | ;; A mirror://sourceforge URI doesn't work, presumably |
| 213 | ;; because the SourceForge project is misconfigured. |
| 214 | "http://liba52.sourceforge.net/files/a52dec-" version |
| 215 | ".tar.gz")) |
| 216 | (sha256 |
| 217 | (base32 |
| 218 | "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2")) |
| 219 | (patches (search-patches "liba52-enable-pic.patch" |
| 220 | "liba52-set-soname.patch" |
| 221 | "liba52-use-mtune-not-mcpu.patch" |
| 222 | "liba52-link-with-libm.patch")))) |
| 223 | (build-system gnu-build-system) |
| 224 | ;; XXX We need to run ./bootstrap because of the build system fixes above. |
| 225 | (native-inputs |
| 226 | `(("autoconf" ,autoconf) |
| 227 | ("automake" ,automake) |
| 228 | ("libtool" ,libtool))) |
| 229 | (arguments `(#:configure-flags '("--enable-shared") |
| 230 | #:phases |
| 231 | (modify-phases %standard-phases |
| 232 | ;; XXX We need to run ./bootstrap because of the build |
| 233 | ;; system fixes above. |
| 234 | (replace 'bootstrap |
| 235 | (lambda _ (invoke "sh" "bootstrap")))))) |
| 236 | (home-page "http://liba52.sourceforge.net/") |
| 237 | (synopsis "ATSC A/52 stream decoder") |
| 238 | (description "liba52 is a library for decoding ATSC A/52 streams. The |
| 239 | A/52 standard is used in a variety of applications, including digital |
| 240 | television and DVD. It is also known as AC-3.") |
| 241 | (license license:gpl2+))) |
| 242 | |
| 243 | (define-public libmpeg2 |
| 244 | (package |
| 245 | (name "libmpeg2") |
| 246 | (version "0.5.1") |
| 247 | (source (origin |
| 248 | (method url-fetch) |
| 249 | ;; A mirror://sourceforge URI doesn't work, presumably |
| 250 | ;; because the SourceForge project is misconfigured. |
| 251 | (uri (string-append "http://libmpeg2.sourceforge.net/files/" |
| 252 | name "-" version ".tar.gz")) |
| 253 | (sha256 |
| 254 | (base32 |
| 255 | "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny")))) |
| 256 | (inputs |
| 257 | `(("libx11" ,libx11) |
| 258 | ("libxext" ,libxext) |
| 259 | ("libxv" ,libxv) |
| 260 | ("libsm" ,libsm) |
| 261 | ("libice" ,libice) |
| 262 | ("sdl" ,sdl))) |
| 263 | (build-system gnu-build-system) |
| 264 | (home-page "http://libmpeg2.sourceforge.net/") |
| 265 | (synopsis "MPEG1 and MPEG2 video decoder library") |
| 266 | (description |
| 267 | "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.") |
| 268 | (license license:gpl2+))) |
| 269 | |
| 270 | (define-public libx264 |
| 271 | (package |
| 272 | (name "libx264") |
| 273 | (version "20180810-2245") |
| 274 | (source (origin |
| 275 | (method url-fetch) |
| 276 | (uri (string-append "https://download.videolan.org/pub/x264/snapshots/" |
| 277 | "x264-snapshot-" version "-stable.tar.bz2")) |
| 278 | (sha256 |
| 279 | (base32 |
| 280 | "0f25f39imas9pcqm7lnaa0shhjmf42hdx7jxzcnvxc7qsb7lh1bv")))) |
| 281 | (build-system gnu-build-system) |
| 282 | (native-inputs |
| 283 | `(("pkg-config" ,pkg-config) |
| 284 | ("nasm" ,nasm))) |
| 285 | ;; TODO: Add gpac input |
| 286 | (arguments |
| 287 | `(#:tests? #f ;no check target |
| 288 | #:configure-flags '("--enable-shared" |
| 289 | ;; Don't build the command-line program. If we |
| 290 | ;; want it later, we should do so in a different |
| 291 | ;; package to avoid a circular dependency (the x264 |
| 292 | ;; program depends on ffmpeg and ffmpeg depends on |
| 293 | ;; libx264). |
| 294 | "--disable-cli" |
| 295 | |
| 296 | ;; On MIPS, we must pass "--disable-asm" or else |
| 297 | ;; configure fails after printing: "You specified a |
| 298 | ;; pre-MSA CPU in your CFLAGS. If you really want |
| 299 | ;; to run on such a CPU, configure with |
| 300 | ;; --disable-asm." |
| 301 | ,@(if (string-prefix? "mips" |
| 302 | (or (%current-target-system) |
| 303 | (%current-system))) |
| 304 | '("--disable-asm") |
| 305 | '())))) |
| 306 | (home-page "https://www.videolan.org/developers/x264.html") |
| 307 | (synopsis "H.264 video coding library") |
| 308 | (description "libx264 is an advanced encoding library for creating |
| 309 | H.264 (MPEG-4 AVC) video streams.") |
| 310 | (license (list license:gpl2+ ;most files |
| 311 | license:isc ;common/x86/x86inc.asm |
| 312 | license:lgpl2.1+ ;extras/getopt.c |
| 313 | license:bsd-3 ;extras/inttypes.h |
| 314 | (license:non-copyleft ;extras/cl*.h |
| 315 | "file://extras/cl.h" |
| 316 | "See extras/cl.h in the distribution."))))) |
| 317 | |
| 318 | (define-public mkvtoolnix |
| 319 | (package |
| 320 | (name "mkvtoolnix") |
| 321 | (version "31.0.0") |
| 322 | (source |
| 323 | (origin |
| 324 | (method url-fetch) |
| 325 | (uri (string-append "https://mkvtoolnix.download/sources/" |
| 326 | name "-" version ".tar.xz")) |
| 327 | (sha256 |
| 328 | (base32 |
| 329 | "0d8va2iamzc7y3wi71z8mk2vnqvnkgwb2p7casdfp37400x8r2pr")) |
| 330 | (modules '((guix build utils))) |
| 331 | (snippet '(begin |
| 332 | ;; Delete bundled libraries. |
| 333 | (for-each delete-file-recursively |
| 334 | '("lib/fmt" |
| 335 | "lib/libebml" |
| 336 | "lib/libmatroska" |
| 337 | "lib/nlohmann-json" |
| 338 | "lib/pugixml" |
| 339 | "lib/utf8-cpp")) |
| 340 | #t)))) |
| 341 | (build-system gnu-build-system) |
| 342 | (inputs |
| 343 | `(("boost" ,boost) |
| 344 | ("bzip2" ,bzip2) |
| 345 | ("cmark" ,cmark) |
| 346 | ("libebml" ,libebml) |
| 347 | ("file" ,file) |
| 348 | ("flac" ,flac) |
| 349 | ("fmt" ,fmt) |
| 350 | ("libmatroska" ,libmatroska) |
| 351 | ("libogg" ,libogg) |
| 352 | ("libvorbis" ,libvorbis) |
| 353 | ("lzo" ,lzo) |
| 354 | ("pugixml" ,pugixml) |
| 355 | ("qtbase" ,qtbase) |
| 356 | ("qtmultimedia" ,qtmultimedia) |
| 357 | ("utfcpp" ,utfcpp) |
| 358 | ("zlib" ,zlib))) |
| 359 | (native-inputs |
| 360 | `(("docbook-xsl" ,docbook-xsl) |
| 361 | ("gettext" ,gettext-minimal) |
| 362 | ("googletest" ,googletest) |
| 363 | ("libxslt" ,libxslt) |
| 364 | ("nlohmann-json-cpp" ,nlohmann-json-cpp) |
| 365 | ("perl" ,perl) |
| 366 | ("pkg-config" ,pkg-config) |
| 367 | ("po4a" ,po4a) |
| 368 | ("qttools" ,qttools) |
| 369 | ("ruby" ,ruby))) |
| 370 | (arguments |
| 371 | `(#:configure-flags |
| 372 | (list (string-append "--with-boost=" |
| 373 | (assoc-ref %build-inputs "boost")) |
| 374 | (string-append "--with-docbook-xsl-root=" |
| 375 | (assoc-ref %build-inputs "docbook-xsl") |
| 376 | "/xml/xsl/docbook-xsl-" |
| 377 | ,(package-version docbook-xsl)) |
| 378 | "--enable-update-check=no" |
| 379 | "--enable-precompiled-headers=no") |
| 380 | #:phases |
| 381 | (modify-phases %standard-phases |
| 382 | (add-before 'configure 'add-googletest |
| 383 | (lambda* (#:key inputs #:allow-other-keys) |
| 384 | (symlink |
| 385 | (string-append (assoc-ref inputs "googletest") |
| 386 | "/include/gtest") "lib/gtest") |
| 387 | #t)) |
| 388 | (replace 'build |
| 389 | (lambda _ |
| 390 | (let ((-j (list "-j" (number->string (parallel-job-count))))) |
| 391 | (apply invoke "rake" -j)))) |
| 392 | (replace 'check |
| 393 | (lambda _ |
| 394 | (invoke "rake" "tests/unit"))) |
| 395 | (replace 'install |
| 396 | (lambda _ |
| 397 | (invoke "rake" "install")))))) |
| 398 | (home-page "https://mkvtoolnix.download") |
| 399 | (synopsis "Tools to create, alter and inspect Matroska files") |
| 400 | (description |
| 401 | "MKVToolNix provides tools for getting information about Matroska files |
| 402 | (@code{mkvinfo}), extracting tracks/data from Matroska files (@code{mkvextract}) |
| 403 | and creating Matroska files from other media files (@code{mkvmerge}).") |
| 404 | (license license:gpl2))) |
| 405 | |
| 406 | (define-public x265 |
| 407 | (package |
| 408 | (name "x265") |
| 409 | (version "3.0") |
| 410 | (outputs '("out" "static")) |
| 411 | (source |
| 412 | (origin |
| 413 | (method url-fetch) |
| 414 | (uri (string-append "https://download.videolan.org/videolan/x265/" |
| 415 | "x265_" version ".tar.gz")) |
| 416 | (sha256 |
| 417 | (base32 |
| 418 | "0qh65wdpasrspkm1y0dlfa123myax568yi0sas0lmg5b1hkgrff5")) |
| 419 | (patches (search-patches "x265-arm-flags.patch")) |
| 420 | (modules '((guix build utils))) |
| 421 | (snippet '(begin |
| 422 | (delete-file-recursively "source/compat/getopt") |
| 423 | #t)))) |
| 424 | (build-system cmake-build-system) |
| 425 | (arguments |
| 426 | `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built |
| 427 | #:configure-flags |
| 428 | ;; Ensure position independent code for everyone. |
| 429 | (list "-DENABLE_PIC=TRUE" |
| 430 | ,@(if (string-prefix? "armhf" (or (%current-system) |
| 431 | (%current-target-system))) |
| 432 | '("-DENABLE_ASSEMBLY=OFF") |
| 433 | '()) |
| 434 | (string-append "-DCMAKE_INSTALL_PREFIX=" |
| 435 | (assoc-ref %outputs "out"))) |
| 436 | #:phases |
| 437 | (modify-phases %standard-phases |
| 438 | (add-after 'unpack 'prepare-build |
| 439 | (lambda _ |
| 440 | (delete-file-recursively "build") |
| 441 | (chdir "source") |
| 442 | ;; recognize armv8 in 32-bit mode as ARM |
| 443 | (substitute* "CMakeLists.txt" |
| 444 | (("armv6l") "armv8l")) |
| 445 | #t)) |
| 446 | (add-before 'configure 'build-12-bit |
| 447 | (lambda* (#:key (configure-flags '()) #:allow-other-keys) |
| 448 | (mkdir "../build-12bit") |
| 449 | (with-directory-excursion "../build-12bit" |
| 450 | (apply invoke |
| 451 | "cmake" "../source" |
| 452 | "-DHIGH_BIT_DEPTH=ON" |
| 453 | "-DEXPORT_C_API=OFF" |
| 454 | "-DENABLE_CLI=OFF" |
| 455 | "-DMAIN12=ON" |
| 456 | configure-flags) |
| 457 | (substitute* (cons "cmake_install.cmake" |
| 458 | (append |
| 459 | (find-files "CMakeFiles/x265-shared.dir" ".") |
| 460 | (find-files "CMakeFiles/x265-static.dir" "."))) |
| 461 | (("libx265") "libx265_main12")) |
| 462 | (invoke "make")))) |
| 463 | (add-before 'configure 'build-10-bit |
| 464 | (lambda* (#:key (configure-flags '()) #:allow-other-keys) |
| 465 | (mkdir "../build-10bit") |
| 466 | (with-directory-excursion "../build-10bit" |
| 467 | (apply invoke |
| 468 | "cmake" "../source" |
| 469 | "-DHIGH_BIT_DEPTH=ON" |
| 470 | "-DEXPORT_C_API=OFF" |
| 471 | "-DENABLE_CLI=OFF" |
| 472 | configure-flags) |
| 473 | (substitute* (cons "cmake_install.cmake" |
| 474 | (append |
| 475 | (find-files "CMakeFiles/x265-shared.dir" ".") |
| 476 | (find-files "CMakeFiles/x265-static.dir" "."))) |
| 477 | (("libx265") "libx265_main10")) |
| 478 | (invoke "make")))) |
| 479 | (add-after 'install 'install-more-libs |
| 480 | (lambda _ |
| 481 | (with-directory-excursion "../build-12bit" |
| 482 | (invoke "make" "install")) |
| 483 | (with-directory-excursion "../build-10bit" |
| 484 | (invoke "make" "install")))) |
| 485 | (add-before 'strip 'move-static-libs |
| 486 | (lambda* (#:key outputs #:allow-other-keys) |
| 487 | (let ((out (assoc-ref outputs "out")) |
| 488 | (static (assoc-ref outputs "static"))) |
| 489 | (mkdir-p (string-append static "/lib")) |
| 490 | (with-directory-excursion |
| 491 | (string-append out "/lib") |
| 492 | (for-each |
| 493 | (lambda (file) |
| 494 | (rename-file file |
| 495 | (string-append static "/lib/" file))) |
| 496 | (find-files "." "\\.a$")))) |
| 497 | #t))))) |
| 498 | (home-page "http://x265.org/") |
| 499 | (synopsis "Library for encoding h.265/HEVC video streams") |
| 500 | (description "x265 is a H.265 / HEVC video encoder application library, |
| 501 | designed to encode video or images into an H.265 / HEVC encoded bitstream.") |
| 502 | (license license:gpl2+))) |
| 503 | |
| 504 | (define-public libass |
| 505 | (package |
| 506 | (name "libass") |
| 507 | (version "0.14.0") |
| 508 | (source (origin |
| 509 | (method url-fetch) |
| 510 | (uri (string-append |
| 511 | "https://github.com/libass/libass/releases/download/" |
| 512 | version "/libass-" version ".tar.xz")) |
| 513 | (sha256 |
| 514 | (base32 |
| 515 | "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8")))) |
| 516 | (build-system gnu-build-system) |
| 517 | (native-inputs |
| 518 | `(("pkg-config" ,pkg-config) |
| 519 | ("nasm" ,nasm))) |
| 520 | (propagated-inputs |
| 521 | `(("freetype" ,freetype) |
| 522 | ("fribidi" ,fribidi) |
| 523 | ("fontconfig" ,fontconfig) |
| 524 | ("harfbuzz" ,harfbuzz) |
| 525 | ("enca" ,enca))) |
| 526 | (home-page "https://github.com/libass/libass") |
| 527 | (synopsis "Subtitle rendering library for the ASS/SSA format") |
| 528 | (description "libass is a subtitle rendering library for the |
| 529 | ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.") |
| 530 | (license license:isc))) |
| 531 | |
| 532 | (define-public libcaca |
| 533 | (package |
| 534 | (name "libcaca") |
| 535 | (version "0.99.beta19") |
| 536 | (source (origin |
| 537 | (method url-fetch) |
| 538 | (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-" |
| 539 | version ".tar.gz")) |
| 540 | (sha256 |
| 541 | (base32 |
| 542 | "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj")))) |
| 543 | (build-system gnu-build-system) |
| 544 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 545 | (inputs |
| 546 | `(("freeglut" ,freeglut) |
| 547 | ("ftgl" ,ftgl) |
| 548 | ("imlib2" ,imlib2) |
| 549 | ("libx11" ,libx11) |
| 550 | ("mesa" ,mesa) |
| 551 | ("ncurses" ,ncurses) |
| 552 | ("zlib" ,zlib))) |
| 553 | (home-page "http://caca.zoy.org/wiki/libcaca") |
| 554 | (synopsis "Colour ASCII-art library") |
| 555 | (description "libcaca is a graphics library that outputs text instead of |
| 556 | pixels, so that it can work on older video cards or text terminals. It |
| 557 | supports Unicode, 2048 colors, dithering of color images, and advanced text |
| 558 | canvas operations.") |
| 559 | (license (license:fsf-free "file://COPYING")))) ;WTFPL version 2 |
| 560 | |
| 561 | (define-public libdca |
| 562 | (package |
| 563 | (name "libdca") |
| 564 | (version "0.0.6") |
| 565 | (source (origin |
| 566 | (method url-fetch) |
| 567 | (uri (string-append |
| 568 | "https://download.videolan.org/pub/videolan/libdca/" |
| 569 | version "/libdca-" version ".tar.bz2")) |
| 570 | (sha256 |
| 571 | (base32 |
| 572 | "0h0zvcn97i9kyljdpifzi8in9xnw31fx3b3ggj96p8h0l2d8mycq")))) |
| 573 | (build-system gnu-build-system) |
| 574 | (home-page "https://www.videolan.org/developers/libdca.html") |
| 575 | (synopsis "DTS Coherent Acoustics decoder") |
| 576 | (description "libdca is a library for decoding DTS Coherent Acoustics |
| 577 | streams.") |
| 578 | (license license:gpl2+))) |
| 579 | |
| 580 | (define-public libdv |
| 581 | (package |
| 582 | (name "libdv") |
| 583 | (version "1.0.0") |
| 584 | (source (origin |
| 585 | (method url-fetch) |
| 586 | (uri (string-append |
| 587 | "mirror://sourceforge/" name "/" name "/" |
| 588 | version "/" name "-" version ".tar.gz")) |
| 589 | (sha256 |
| 590 | (base32 |
| 591 | "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3")))) |
| 592 | (build-system gnu-build-system) |
| 593 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 594 | (inputs `(("libxv" ,libxv))) |
| 595 | (home-page "http://libdv.sourceforge.net/") |
| 596 | (synopsis "DV video (IEC 61834 and SMPTE 314M) codec") |
| 597 | (description "The Quasar DV codec (libdv) is a software codec for DV |
| 598 | video, the encoding format used by most digital camcorders, typically those |
| 599 | that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was |
| 600 | developed according to the official standards for DV video: IEC 61834 and |
| 601 | SMPTE 314M.") |
| 602 | (license license:lgpl2.1+))) |
| 603 | |
| 604 | (define-public libmatroska |
| 605 | (package |
| 606 | (name "libmatroska") |
| 607 | (version "1.4.9") |
| 608 | (source |
| 609 | (origin |
| 610 | (method url-fetch) |
| 611 | (uri (string-append "https://dl.matroska.org/downloads/" |
| 612 | name "/" name "-" version ".tar.xz")) |
| 613 | (sha256 |
| 614 | (base32 |
| 615 | "1j4mjzx6mjzfjf9hz8g4w84krf5jccmr5cyynll0j1vwv3aiv9iq")))) |
| 616 | (build-system cmake-build-system) |
| 617 | (inputs |
| 618 | `(("libebml" ,libebml))) |
| 619 | (arguments |
| 620 | `(#:configure-flags |
| 621 | (list "-DBUILD_SHARED_LIBS=YES") |
| 622 | #:tests? #f)) ; no test suite |
| 623 | (home-page "https://www.matroska.org") |
| 624 | (synopsis "C++ library to parse Matroska files (.mkv and .mka)") |
| 625 | (description |
| 626 | "Matroska aims to become the standard of multimedia container formats. |
| 627 | It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative |
| 628 | of XML. EBML enables the Matroska Development Team to gain significant |
| 629 | advantages in terms of future format extensibility, without breaking file |
| 630 | support in old parsers. |
| 631 | libebml is a C++ library to read and write EBML files.") |
| 632 | (license license:lgpl2.1))) |
| 633 | |
| 634 | (define-public libva |
| 635 | (package |
| 636 | (name "libva") |
| 637 | (version "2.3.0") |
| 638 | (source |
| 639 | (origin |
| 640 | (method url-fetch) |
| 641 | (uri (list |
| 642 | ;; Newer releases are only available on GitHub. |
| 643 | (string-append "https://github.com/01org/libva/releases/download/" |
| 644 | version "/libva-" version ".tar.bz2") |
| 645 | ;; Keep the old URL around for compatibility. |
| 646 | (string-append "https://www.freedesktop.org/software/vaapi/releases/" |
| 647 | "libva/libva-" version "/libva-" version ".tar.bz2"))) |
| 648 | (sha256 |
| 649 | (base32 "1r6wiw4k044cpb39rfqqdw6qmzw0268whpz124hywck9v980x130")))) |
| 650 | (build-system gnu-build-system) |
| 651 | (native-inputs |
| 652 | `(("pkg-config" ,pkg-config))) |
| 653 | (inputs |
| 654 | `(("libdrm" ,libdrm) |
| 655 | ("libx11" ,libx11) |
| 656 | ("libxext" ,libxext) |
| 657 | ("libxfixes" ,libxfixes) |
| 658 | ("mesa" ,mesa) |
| 659 | ("wayland" ,wayland))) |
| 660 | (arguments |
| 661 | `(#:phases |
| 662 | (modify-phases %standard-phases |
| 663 | (add-before |
| 664 | 'build 'fix-dlopen-paths |
| 665 | (lambda* (#:key outputs #:allow-other-keys) |
| 666 | (let ((out (assoc-ref outputs "out"))) |
| 667 | (substitute* "va/drm/va_drm_auth_x11.c" |
| 668 | (("\"libva-x11\\.so\\.%d\"") |
| 669 | (string-append "\"" out "/lib/libva-x11.so.%d\""))) |
| 670 | #t)))) |
| 671 | ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be |
| 672 | ;; overridden at run-time via LIBVA_DRIVERS_PATH.) |
| 673 | #:configure-flags |
| 674 | (list (string-append "--with-drivers-path=" |
| 675 | (assoc-ref %build-inputs "mesa") "/lib/dri")) |
| 676 | ;; However, we can't write to mesa's store directory, so override the |
| 677 | ;; following make variable to install the dummy driver to libva's |
| 678 | ;; $prefix/lib/dri directory. |
| 679 | #:make-flags |
| 680 | (list (string-append "dummy_drv_video_ladir=" |
| 681 | (assoc-ref %outputs "out") "/lib/dri")))) |
| 682 | (home-page "https://www.freedesktop.org/wiki/Software/vaapi/") |
| 683 | (synopsis "Video acceleration library") |
| 684 | (description "The main motivation for VA-API (Video Acceleration API) is |
| 685 | to enable hardware accelerated video decode/encode at various |
| 686 | entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding |
| 687 | standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).") |
| 688 | (license license:expat))) |
| 689 | |
| 690 | (define-public ffmpeg |
| 691 | (package |
| 692 | (name "ffmpeg") |
| 693 | (version "4.1.1") |
| 694 | (source (origin |
| 695 | (method url-fetch) |
| 696 | (uri (string-append "https://ffmpeg.org/releases/ffmpeg-" |
| 697 | version ".tar.xz")) |
| 698 | (sha256 |
| 699 | (base32 |
| 700 | "11id9pm4azfrhpa4vr2yaw31dzgd55kl1zsxwn24sczx9n14jdrp")))) |
| 701 | (build-system gnu-build-system) |
| 702 | (inputs |
| 703 | `(("fontconfig" ,fontconfig) |
| 704 | ("freetype" ,freetype) |
| 705 | ("frei0r-plugins" ,frei0r-plugins) |
| 706 | ("gnutls" ,gnutls) |
| 707 | ("opus" ,opus) |
| 708 | ("ladspa" ,ladspa) |
| 709 | ("lame" ,lame) |
| 710 | ("libass" ,libass) |
| 711 | ("libbluray" ,libbluray) |
| 712 | ("libcaca" ,libcaca) |
| 713 | ("libcdio-paranoia" ,libcdio-paranoia) |
| 714 | ("libdrm" ,libdrm) |
| 715 | ("libtheora" ,libtheora) |
| 716 | ("libva" ,libva) |
| 717 | ("libvdpau" ,libvdpau) |
| 718 | ("libvorbis" ,libvorbis) |
| 719 | ("libvpx" ,libvpx) |
| 720 | ("libx11" ,libx11) |
| 721 | ("libx264" ,libx264) |
| 722 | ("mesa" ,mesa) |
| 723 | ("openal" ,openal) |
| 724 | ("pulseaudio" ,pulseaudio) |
| 725 | ("sdl" ,sdl2) |
| 726 | ("soxr" ,soxr) |
| 727 | ("speex" ,speex) |
| 728 | ("twolame" ,twolame) |
| 729 | ("vidstab" ,vidstab) |
| 730 | ("x265" ,x265) |
| 731 | ("xvid" ,xvid) |
| 732 | ("zlib" ,zlib))) |
| 733 | (native-inputs |
| 734 | `(("bc" ,bc) |
| 735 | ("perl" ,perl) |
| 736 | ("pkg-config" ,pkg-config) |
| 737 | ("texinfo" ,texinfo) |
| 738 | ("python" ,python-2) ; scripts use interpreter python2 |
| 739 | ("speex" ,speex) |
| 740 | ("yasm" ,yasm))) |
| 741 | (arguments |
| 742 | `(#:test-target "fate" |
| 743 | #:configure-flags |
| 744 | ;; possible additional inputs: |
| 745 | ;; --enable-avisynth enable reading of AviSynth script |
| 746 | ;; files [no] |
| 747 | ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no] |
| 748 | ;; --enable-libcelt enable CELT decoding via libcelt [no] |
| 749 | ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 |
| 750 | ;; and libraw1394 [no] |
| 751 | ;; --enable-libfaac enable AAC encoding via libfaac [no] |
| 752 | ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] |
| 753 | ;; --enable-libflite enable flite (voice synthesis) support via |
| 754 | ;; libflite [no] |
| 755 | ;; --enable-libgme enable Game Music Emu via libgme [no] |
| 756 | ;; --enable-libgsm enable GSM de/encoding via libgsm [no] |
| 757 | ;; --enable-libiec61883 enable iec61883 via libiec61883 [no] |
| 758 | ;; --enable-libilbc enable iLBC de/encoding via libilbc [no] |
| 759 | ;; --enable-libmodplug enable ModPlug via libmodplug [no] |
| 760 | ;; --enable-libnut enable NUT (de)muxing via libnut, |
| 761 | ;; native (de)muxer exists [no] |
| 762 | ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via |
| 763 | ;; libopencore-amrnb [no] |
| 764 | ;; --enable-libopencore-amrwb enable AMR-WB decoding via |
| 765 | ;; libopencore-amrwb [no] |
| 766 | ;; --enable-libopencv enable video filtering via libopencv [no] |
| 767 | ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via |
| 768 | ;; OpenJPEG [no] |
| 769 | ;; --enable-librtmp enable RTMP[E] support via librtmp [no] |
| 770 | ;; --enable-libschroedinger enable Dirac de/encoding via |
| 771 | ;; libschroedinger [no] |
| 772 | ;; --enable-libshine enable fixed-point MP3 encoding via |
| 773 | ;; libshine [no] |
| 774 | ;; --enable-libssh enable SFTP protocol via libssh [no] |
| 775 | ;; (libssh2 does not work) |
| 776 | ;; --enable-libstagefright-h264 enable H.264 decoding via |
| 777 | ;; libstagefright [no] |
| 778 | ;; --enable-libutvideo enable Ut Video encoding and decoding via |
| 779 | ;; libutvideo [no] |
| 780 | ;; --enable-libv4l2 enable libv4l2/v4l-utils [no] |
| 781 | ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] |
| 782 | ;; --enable-libvo-amrwbenc enable AMR-WB encoding via |
| 783 | ;; libvo-amrwbenc [no] |
| 784 | ;; --enable-libwavpack enable wavpack encoding via libwavpack [no] |
| 785 | ;; --enable-libxavs enable AVS encoding via xavs [no] |
| 786 | ;; --enable-libzmq enable message passing via libzmq [no] |
| 787 | ;; --enable-libzvbi enable teletext support via libzvbi [no] |
| 788 | ;; --enable-opencl enable OpenCL code |
| 789 | '("--enable-avresample" |
| 790 | "--enable-gpl" ; enable optional gpl licensed parts |
| 791 | "--enable-shared" |
| 792 | "--enable-frei0r" |
| 793 | "--enable-fontconfig" |
| 794 | "--enable-gnutls" |
| 795 | "--enable-ladspa" |
| 796 | "--enable-libass" |
| 797 | "--enable-libbluray" |
| 798 | "--enable-libcaca" |
| 799 | "--enable-libcdio" |
| 800 | "--enable-libfreetype" |
| 801 | "--enable-libmp3lame" |
| 802 | "--enable-libopus" |
| 803 | "--enable-libpulse" |
| 804 | "--enable-libsoxr" |
| 805 | "--enable-libspeex" |
| 806 | "--enable-libtheora" |
| 807 | "--enable-libtwolame" |
| 808 | "--enable-libvidstab" |
| 809 | "--enable-libvorbis" |
| 810 | "--enable-libvpx" |
| 811 | "--enable-libxvid" |
| 812 | "--enable-libx264" |
| 813 | "--enable-libx265" |
| 814 | "--enable-openal" |
| 815 | "--enable-opengl" |
| 816 | "--enable-libdrm" |
| 817 | |
| 818 | "--enable-runtime-cpudetect" |
| 819 | |
| 820 | ;; The HTML pages take 7.2 MiB |
| 821 | "--disable-htmlpages" |
| 822 | |
| 823 | ;; The static libraries are 23 MiB |
| 824 | "--disable-static" |
| 825 | |
| 826 | ;; Runtime cpu detection is not implemented on |
| 827 | ;; MIPS, so we disable some features. |
| 828 | "--disable-mips32r2" |
| 829 | "--disable-mipsdsp" |
| 830 | "--disable-mipsdspr2" |
| 831 | "--disable-mipsfpu") |
| 832 | #:phases |
| 833 | (modify-phases %standard-phases |
| 834 | (replace |
| 835 | 'configure |
| 836 | ;; configure does not work followed by "SHELL=..." and |
| 837 | ;; "CONFIG_SHELL=..."; set environment variables instead |
| 838 | (lambda* (#:key outputs configure-flags #:allow-other-keys) |
| 839 | (let ((out (assoc-ref outputs "out"))) |
| 840 | (substitute* "configure" |
| 841 | (("#! /bin/sh") (string-append "#!" (which "sh")))) |
| 842 | (setenv "SHELL" (which "bash")) |
| 843 | (setenv "CONFIG_SHELL" (which "bash")) |
| 844 | (apply invoke |
| 845 | "./configure" |
| 846 | (string-append "--prefix=" out) |
| 847 | ;; Add $libdir to the RUNPATH of all the binaries. |
| 848 | (string-append "--extra-ldflags=-Wl,-rpath=" |
| 849 | out "/lib") |
| 850 | configure-flags)))) |
| 851 | (add-before |
| 852 | 'check 'set-ld-library-path |
| 853 | (lambda _ |
| 854 | ;; Allow $(top_builddir)/ffmpeg to find its dependencies when |
| 855 | ;; running tests. |
| 856 | (let* ((dso (find-files "." "\\.so$")) |
| 857 | (path (string-join (map dirname dso) ":"))) |
| 858 | (format #t "setting LD_LIBRARY_PATH to ~s~%" path) |
| 859 | (setenv "LD_LIBRARY_PATH" path) |
| 860 | #t)))))) |
| 861 | (home-page "https://www.ffmpeg.org/") |
| 862 | (synopsis "Audio and video framework") |
| 863 | (description "FFmpeg is a complete, cross-platform solution to record, |
| 864 | convert and stream audio and video. It includes the libavcodec |
| 865 | audio/video codec library.") |
| 866 | (license license:gpl2+))) |
| 867 | |
| 868 | (define-public ffmpeg-3.4 |
| 869 | (package |
| 870 | (inherit ffmpeg) |
| 871 | (version "3.4.5") |
| 872 | (source (origin |
| 873 | (method url-fetch) |
| 874 | (uri (string-append "https://ffmpeg.org/releases/ffmpeg-" |
| 875 | version ".tar.xz")) |
| 876 | (sha256 |
| 877 | (base32 |
| 878 | "0b59qk5wpc5ksiha76jbhb859g5gxa4w0k6afh3kgvgajiivs73l")))))) |
| 879 | |
| 880 | (define-public ffmpeg-for-stepmania |
| 881 | (hidden-package |
| 882 | (package |
| 883 | (inherit ffmpeg) |
| 884 | (version "2.1.3") |
| 885 | (source |
| 886 | (origin |
| 887 | (method git-fetch) |
| 888 | (uri (git-reference |
| 889 | (url "https://github.com/stepmania/ffmpeg.git") |
| 890 | (commit "eda6effcabcf9c238e4635eb058d72371336e09b"))) |
| 891 | (sha256 |
| 892 | (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb")) |
| 893 | (file-name (git-file-name "ffmpeg" version)))) |
| 894 | (arguments |
| 895 | (substitute-keyword-arguments (package-arguments ffmpeg) |
| 896 | ((#:configure-flags flags) |
| 897 | '(list "--disable-programs" |
| 898 | "--disable-doc" |
| 899 | "--disable-debug" |
| 900 | "--disable-avdevice" |
| 901 | "--disable-swresample" |
| 902 | "--disable-postproc" |
| 903 | "--disable-avfilter" |
| 904 | "--disable-shared" |
| 905 | "--enable-static")))) |
| 906 | (inputs '())))) |
| 907 | |
| 908 | (define-public ffmpegthumbnailer |
| 909 | (package |
| 910 | (name "ffmpegthumbnailer") |
| 911 | (version "2.2.0") |
| 912 | (source (origin |
| 913 | (method git-fetch) |
| 914 | (uri (git-reference |
| 915 | (url "https://github.com/dirkvdb/ffmpegthumbnailer.git") |
| 916 | (commit version))) |
| 917 | (file-name (git-file-name name version)) |
| 918 | (sha256 |
| 919 | (base32 |
| 920 | "0kl8aa547icy9b05njps02a8sw4yn4f8fzs228kig247sn09s4cp")))) |
| 921 | (build-system cmake-build-system) |
| 922 | (native-inputs |
| 923 | `(("pkg-config" ,pkg-config))) |
| 924 | (inputs |
| 925 | `(("ffmpeg" ,ffmpeg) |
| 926 | ("libjpeg-turbo" ,libjpeg-turbo) |
| 927 | ("libpng" ,libpng) |
| 928 | ("gvfs" ,gvfs))) |
| 929 | (arguments |
| 930 | `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON"))) |
| 931 | (home-page "https://github.com/dirkvdb/ffmpegthumbnailer") |
| 932 | (synopsis "Create thumbnails from video files") |
| 933 | (description "FFmpegthumbnailer is a lightweight video thumbnailer that |
| 934 | can be used by file managers to create thumbnails for your video files. The |
| 935 | thumbnailer uses ffmpeg to decode frames from the video files, so supported |
| 936 | videoformats depend on the configuration flags of ffmpeg.") |
| 937 | (license license:gpl2+))) |
| 938 | |
| 939 | (define-public vlc |
| 940 | (package |
| 941 | (name "vlc") |
| 942 | (version "3.0.6") |
| 943 | (source (origin |
| 944 | (method url-fetch) |
| 945 | (uri (string-append |
| 946 | "https://download.videolan.org/pub/videolan/vlc/" |
| 947 | (car (string-split version #\-)) |
| 948 | "/vlc-" version ".tar.xz")) |
| 949 | (sha256 |
| 950 | (base32 |
| 951 | "1lvyyahv6g9zv7m5g5qinyrwmw47zdsd5ysimb862j7kw15nvh8q")))) |
| 952 | (build-system gnu-build-system) |
| 953 | (native-inputs |
| 954 | `(("flex" ,flex) |
| 955 | ("bison" ,bison) |
| 956 | ("gettext" ,gettext-minimal) |
| 957 | ("git" ,git) ; needed for a test |
| 958 | ("pkg-config" ,pkg-config))) |
| 959 | ;; FIXME: Add optional inputs once available. |
| 960 | (inputs |
| 961 | `(("alsa-lib" ,alsa-lib) |
| 962 | ("avahi" ,avahi) |
| 963 | ("dbus" ,dbus) |
| 964 | ("eudev" ,eudev) |
| 965 | ("flac" ,flac) |
| 966 | ("ffmpeg" ,ffmpeg) |
| 967 | ("fontconfig" ,fontconfig) |
| 968 | ("freetype" ,freetype) |
| 969 | ("fribidi" ,fribidi) |
| 970 | ("gnutls" ,gnutls) |
| 971 | ("liba52" ,liba52) |
| 972 | ("libarchive" ,libarchive) |
| 973 | ("libass" ,libass) |
| 974 | ("libavc1394" ,libavc1394) |
| 975 | ("libbluray" ,libbluray) |
| 976 | ("libcaca" ,libcaca) |
| 977 | ("libcddb" ,libcddb) |
| 978 | ("libdca" ,libdca) |
| 979 | ("libdvbpsi" ,libdvbpsi) |
| 980 | ("libdvdnav" ,libdvdnav) |
| 981 | ("libdvdread" ,libdvdread) |
| 982 | ("libebml" ,libebml) |
| 983 | ("libgcrypt" ,libgcrypt) |
| 984 | ("libidn" ,libidn) |
| 985 | ("libkate" ,libkate) |
| 986 | ("libmad" ,libmad) |
| 987 | ("libmatroska" ,libmatroska) |
| 988 | ("libmicrodns" ,libmicrodns) |
| 989 | ("libmodplug" ,libmodplug) |
| 990 | ("libmpeg2" ,libmpeg2) |
| 991 | ("libogg" ,libogg) |
| 992 | ("libpng" ,libpng) |
| 993 | ("libraw1394" ,libraw1394) |
| 994 | ("librsvg" ,librsvg) |
| 995 | ("libsamplerate" ,libsamplerate) |
| 996 | ("libsecret" ,libsecret) |
| 997 | ("libssh2" ,libssh2) |
| 998 | ("libupnp" ,libupnp) |
| 999 | ("libva" ,libva) |
| 1000 | ("libvdpau" ,libvdpau) |
| 1001 | ("libvorbis" ,libvorbis) |
| 1002 | ("libvpx" ,libvpx-1.7) |
| 1003 | ("libtheora" ,libtheora) |
| 1004 | ("libx264" ,libx264) |
| 1005 | ("libxext" ,libxext) |
| 1006 | ("libxi" ,libxi) |
| 1007 | ("libxinerama" ,libxinerama) |
| 1008 | ("libxml2" ,libxml2) |
| 1009 | ("libxpm" ,libxpm) |
| 1010 | ("livemedia-utils" ,livemedia-utils) |
| 1011 | ("lua" ,lua-5.2) |
| 1012 | ("mesa" ,mesa) |
| 1013 | ("opus" ,opus) |
| 1014 | ("perl" ,perl) |
| 1015 | ("pulseaudio" ,pulseaudio) |
| 1016 | ("protobuf" ,protobuf) |
| 1017 | ("python" ,python-wrapper) |
| 1018 | ("qtbase" ,qtbase) |
| 1019 | ("qtsvg" ,qtsvg) |
| 1020 | ("qtx11extras" ,qtx11extras) |
| 1021 | ("samba" ,samba) |
| 1022 | ("sdl" ,sdl) |
| 1023 | ("sdl-image" ,sdl-image) |
| 1024 | ("speex" ,speex) |
| 1025 | ("speexdsp" ,speexdsp) |
| 1026 | ("taglib" ,taglib) |
| 1027 | ("twolame" ,twolame) |
| 1028 | ("unzip" ,unzip) |
| 1029 | ("wayland" ,wayland) |
| 1030 | ("wayland-protocols" ,wayland-protocols) |
| 1031 | ("x265" ,x265) |
| 1032 | ("xcb-util-keysyms" ,xcb-util-keysyms))) |
| 1033 | (arguments |
| 1034 | `(#:configure-flags |
| 1035 | `("CXXFLAGS=-std=gnu++11" |
| 1036 | "BUILDCC=gcc" |
| 1037 | ,(string-append "LDFLAGS=-Wl,-rpath -Wl," |
| 1038 | (assoc-ref %build-inputs "ffmpeg") |
| 1039 | "/lib")) ;needed for the tests |
| 1040 | |
| 1041 | #:phases |
| 1042 | (modify-phases %standard-phases |
| 1043 | (add-after 'unpack 'patch-source |
| 1044 | (lambda* (#:key inputs #:allow-other-keys) |
| 1045 | (let ((livemedia-utils (assoc-ref inputs "livemedia-utils"))) |
| 1046 | (substitute* "configure" |
| 1047 | (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}") |
| 1048 | (string-append "LIVE555_PREFIX=" livemedia-utils))) |
| 1049 | ;; Some of the tests require using the display to test out VLC, |
| 1050 | ;; which fails in our sandboxed build system |
| 1051 | (substitute* "test/run_vlc.sh" |
| 1052 | (("./vlc --ignore-config") "echo")) |
| 1053 | |
| 1054 | ;; modules/text_renderer/freetype/text_layout.c uses a |
| 1055 | ;; now-deprecated interface 'fribidi_get_par_embedding_levels' |
| 1056 | ;; from fribidi.h, so for now we enable the use of deprecated |
| 1057 | ;; fribidi interfaces from this file. |
| 1058 | ;; FIXME: Try removing this for vlc >= 3.0.3. |
| 1059 | (substitute* "modules/text_renderer/freetype/text_layout.c" |
| 1060 | (("# define FRIBIDI_NO_DEPRECATED 1") "")) |
| 1061 | |
| 1062 | ;; Fix build against Qt 5.11. |
| 1063 | (substitute* "modules/gui/qt/actions_manager.cpp" |
| 1064 | (("#include <vlc_keys.h>") "#include <vlc_keys.h> |
| 1065 | #include <QAction>")) |
| 1066 | (substitute* "modules/gui/qt/components/simple_preferences.cpp" |
| 1067 | (("#include <QFont>") "#include <QFont> |
| 1068 | #include <QButtonGroup>")) |
| 1069 | #t))) |
| 1070 | (add-after 'strip 'regenerate-plugin-cache |
| 1071 | (lambda* (#:key outputs #:allow-other-keys) |
| 1072 | ;; The 'install-exec-hook' rule in the top-level Makefile.am |
| 1073 | ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using |
| 1074 | ;; 'vlc-cache-gen'. This file includes the mtime of the plugins |
| 1075 | ;; it references. Thus, we first reset the timestamps of all |
| 1076 | ;; these files, and then regenerate the cache such that the |
| 1077 | ;; mtimes it includes are always zero instead of being dependent |
| 1078 | ;; on the build time. |
| 1079 | (let* ((out (assoc-ref outputs "out")) |
| 1080 | (pkglibdir (string-append out "/lib/vlc")) |
| 1081 | (plugindir (string-append pkglibdir "/plugins")) |
| 1082 | (cachegen (string-append pkglibdir "/vlc-cache-gen"))) |
| 1083 | ;; TODO: Factorize 'reset-timestamps'. |
| 1084 | (for-each (lambda (file) |
| 1085 | (let ((s (lstat file))) |
| 1086 | (unless (eq? (stat:type s) 'symlink) |
| 1087 | (utime file 1 1)))) |
| 1088 | (find-files plugindir)) |
| 1089 | (invoke cachegen plugindir)))) |
| 1090 | (add-after 'install 'wrap-executable |
| 1091 | (lambda* (#:key outputs #:allow-other-keys) |
| 1092 | (let ((out (assoc-ref outputs "out")) |
| 1093 | (plugin-path (getenv "QT_PLUGIN_PATH"))) |
| 1094 | (wrap-program (string-append out "/bin/vlc") |
| 1095 | `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))) |
| 1096 | #t))))) |
| 1097 | (home-page "https://www.videolan.org/") |
| 1098 | (synopsis "Audio and video framework") |
| 1099 | (description "VLC is a cross-platform multimedia player and framework |
| 1100 | that plays most multimedia files as well as DVD, Audio CD, VCD, and various |
| 1101 | streaming protocols.") |
| 1102 | (license license:gpl2+))) |
| 1103 | |
| 1104 | (define-public mplayer |
| 1105 | (package |
| 1106 | (name "mplayer") |
| 1107 | (version "1.3.0") |
| 1108 | (source (origin |
| 1109 | (method url-fetch) |
| 1110 | (uri (string-append |
| 1111 | "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-" |
| 1112 | version ".tar.xz")) |
| 1113 | (sha256 |
| 1114 | (base32 |
| 1115 | "0hwqn04bdknb2ic88xd75smffxx63scvz0zvwvjb56nqj9n89l1s")))) |
| 1116 | (build-system gnu-build-system) |
| 1117 | ;; FIXME: Add additional inputs once available. |
| 1118 | (native-inputs |
| 1119 | `(("pkg-config" ,pkg-config))) |
| 1120 | (inputs |
| 1121 | `(("alsa-lib" ,alsa-lib) |
| 1122 | ("cdparanoia" ,cdparanoia) |
| 1123 | ("ffmpeg" ,ffmpeg-3.4) |
| 1124 | ("fontconfig" ,fontconfig) |
| 1125 | ("freetype" ,freetype) |
| 1126 | ;; ("giflib" ,giflib) ; uses QuantizeBuffer, requires version >= 5 |
| 1127 | ("lame" ,lame) |
| 1128 | ("libass" ,libass) |
| 1129 | ("libdvdcss" ,libdvdcss) |
| 1130 | ("libdvdnav" ,libdvdnav) |
| 1131 | ("libjpeg" ,libjpeg) |
| 1132 | ("libmpeg2" ,libmpeg2) |
| 1133 | ("libmpg123" ,mpg123) ; audio codec for MP3 |
| 1134 | ("libpng" ,libpng) |
| 1135 | ("libtheora" ,libtheora) |
| 1136 | ("libvdpau" ,libvdpau) |
| 1137 | ("libvorbis" ,libvorbis) |
| 1138 | ("libx11" ,libx11) |
| 1139 | ("libx264" ,libx264) |
| 1140 | ("libxinerama" ,libxinerama) |
| 1141 | ("libxv" ,libxv) |
| 1142 | ("libxxf86dga" ,libxxf86dga) |
| 1143 | ("mesa" ,mesa) |
| 1144 | ("opus" ,opus) |
| 1145 | ("perl" ,perl) |
| 1146 | ("pulseaudio" ,pulseaudio) |
| 1147 | ("python" ,python-wrapper) |
| 1148 | ("sdl" ,sdl) |
| 1149 | ("speex" ,speex) |
| 1150 | ("yasm" ,yasm) |
| 1151 | ("zlib" ,zlib))) |
| 1152 | (arguments |
| 1153 | `(#:tests? #f ; no test target |
| 1154 | #:phases |
| 1155 | (modify-phases %standard-phases |
| 1156 | (replace 'configure |
| 1157 | ;; configure does not work followed by "SHELL=..." and |
| 1158 | ;; "CONFIG_SHELL=..."; set environment variables instead |
| 1159 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1160 | (let ((out (assoc-ref outputs "out")) |
| 1161 | (libx11 (assoc-ref inputs "libx11"))) |
| 1162 | (substitute* "configure" |
| 1163 | (("#! /bin/sh") (string-append "#!" (which "sh")))) |
| 1164 | (setenv "SHELL" (which "bash")) |
| 1165 | (setenv "CONFIG_SHELL" (which "bash")) |
| 1166 | (invoke "./configure" |
| 1167 | (string-append "--extra-cflags=-I" |
| 1168 | libx11 "/include") ; to detect libx11 |
| 1169 | "--disable-ffmpeg_a" ; disables bundled ffmpeg |
| 1170 | (string-append "--prefix=" out) |
| 1171 | ;; Enable runtime cpu detection where supported, |
| 1172 | ;; and choose a suitable target. |
| 1173 | ,@(match (or (%current-target-system) |
| 1174 | (%current-system)) |
| 1175 | ("x86_64-linux" |
| 1176 | '("--enable-runtime-cpudetection" |
| 1177 | "--target=x86_64-linux")) |
| 1178 | ("i686-linux" |
| 1179 | '("--enable-runtime-cpudetection" |
| 1180 | "--target=i686-linux")) |
| 1181 | ("mips64el-linux" |
| 1182 | '("--target=mips3-linux")) |
| 1183 | (_ (list (string-append |
| 1184 | "--target=" |
| 1185 | (or (%current-target-system) |
| 1186 | (nix-system->gnu-triplet |
| 1187 | (%current-system))))))) |
| 1188 | "--disable-iwmmxt"))))))) |
| 1189 | (home-page "https://www.mplayerhq.hu/design7/news.html") |
| 1190 | (synopsis "Audio and video player") |
| 1191 | (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI, |
| 1192 | Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, |
| 1193 | NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD, |
| 1194 | SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") |
| 1195 | (license license:gpl2))) |
| 1196 | |
| 1197 | (define-public mpv |
| 1198 | (package |
| 1199 | (name "mpv") |
| 1200 | (version "0.29.1") |
| 1201 | (source (origin |
| 1202 | (method git-fetch) |
| 1203 | (uri (git-reference |
| 1204 | (url "https://github.com/mpv-player/mpv.git") |
| 1205 | (commit (string-append "v" version)))) |
| 1206 | (file-name (git-file-name name version)) |
| 1207 | (sha256 |
| 1208 | (base32 |
| 1209 | "138921kx8g6qprim558xin09xximjhsj9ss8b71ifg2m6kclym8m")))) |
| 1210 | (build-system waf-build-system) |
| 1211 | (native-inputs |
| 1212 | `(("perl" ,perl) ; for zsh completion file |
| 1213 | ("pkg-config" ,pkg-config) |
| 1214 | ("python-docutils" ,python-docutils))) |
| 1215 | ;; Missing features: libguess, V4L2 |
| 1216 | (inputs |
| 1217 | `(("alsa-lib" ,alsa-lib) |
| 1218 | ("enca" ,enca) |
| 1219 | ("ffmpeg" ,ffmpeg) |
| 1220 | ("jack" ,jack-1) |
| 1221 | ("ladspa" ,ladspa) |
| 1222 | ("lcms" ,lcms) |
| 1223 | ("libass" ,libass) |
| 1224 | ("libbluray" ,libbluray) |
| 1225 | ("libcaca" ,libcaca) |
| 1226 | ("libbs2b" ,libbs2b) |
| 1227 | ("libcdio-paranoia" ,libcdio-paranoia) |
| 1228 | ("libdvdread" ,libdvdread) |
| 1229 | ("libdvdnav" ,libdvdnav) |
| 1230 | ("libjpeg" ,libjpeg) |
| 1231 | ("libva" ,libva) |
| 1232 | ("libvdpau" ,libvdpau) |
| 1233 | ("libx11" ,libx11) |
| 1234 | ("libxext" ,libxext) |
| 1235 | ("libxinerama" ,libxinerama) |
| 1236 | ("libxrandr" ,libxrandr) |
| 1237 | ("libxscrnsaver" ,libxscrnsaver) |
| 1238 | ("libxv" ,libxv) |
| 1239 | ;; XXX: lua > 5.2 is not currently supported; see |
| 1240 | ;; waftools/checks/custom.py |
| 1241 | ("lua" ,lua-5.2) |
| 1242 | ("mesa" ,mesa) |
| 1243 | ("mpg123" ,mpg123) |
| 1244 | ("pulseaudio" ,pulseaudio) |
| 1245 | ("rsound" ,rsound) |
| 1246 | ("shaderc" ,shaderc) |
| 1247 | ("vulkan-headers" ,vulkan-headers) |
| 1248 | ("vulkan-loader" ,vulkan-loader) |
| 1249 | ("waf" ,python-waf) |
| 1250 | ("wayland" ,wayland) |
| 1251 | ("wayland-protocols" ,wayland-protocols) |
| 1252 | ("libxkbcommon" ,libxkbcommon) |
| 1253 | ("youtube-dl" ,youtube-dl) |
| 1254 | ("zlib" ,zlib))) |
| 1255 | (arguments |
| 1256 | '(#:phases |
| 1257 | (modify-phases %standard-phases |
| 1258 | (add-before |
| 1259 | 'configure 'setup-waf |
| 1260 | (lambda* (#:key inputs #:allow-other-keys) |
| 1261 | (let ((waf (assoc-ref inputs "waf"))) |
| 1262 | (copy-file (string-append waf "/bin/waf") "waf")) |
| 1263 | (setenv "CC" "gcc") |
| 1264 | #t))) |
| 1265 | #:configure-flags (list "--enable-libmpv-shared" |
| 1266 | "--enable-cdda" |
| 1267 | "--enable-dvdread" |
| 1268 | "--enable-dvdnav" |
| 1269 | "--enable-zsh-comp" |
| 1270 | "--disable-build-date") |
| 1271 | ;; No check function defined. |
| 1272 | #:tests? #f)) |
| 1273 | (home-page "https://mpv.io/") |
| 1274 | (synopsis "Audio and video player") |
| 1275 | (description "mpv is a general-purpose audio and video player. It is a |
| 1276 | fork of mplayer2 and MPlayer. It shares some features with the former |
| 1277 | projects while introducing many more.") |
| 1278 | (license license:gpl2+))) |
| 1279 | |
| 1280 | (define-public gnome-mpv |
| 1281 | (package |
| 1282 | (name "gnome-mpv") |
| 1283 | (version "0.16") |
| 1284 | (source |
| 1285 | (origin |
| 1286 | (method url-fetch) |
| 1287 | (uri (string-append "https://github.com/gnome-mpv/gnome-mpv/releases" |
| 1288 | "/download/v" version "/gnome-mpv-" version |
| 1289 | ".tar.xz")) |
| 1290 | (sha256 |
| 1291 | (base32 |
| 1292 | "0jzdzvhcqp5jp1inwk2466zf7r8iimk3x69066gl8mzaay98mk92")))) |
| 1293 | (native-inputs |
| 1294 | `(("intltool" ,intltool) |
| 1295 | ("pkg-config" ,pkg-config))) |
| 1296 | (inputs |
| 1297 | `(("gtk+" ,gtk+) |
| 1298 | ("libepoxy" ,libepoxy) |
| 1299 | ("mpv" ,mpv))) |
| 1300 | (build-system glib-or-gtk-build-system) |
| 1301 | (home-page "https://github.com/gnome-mpv/gnome-mpv") |
| 1302 | (synopsis "GTK+ frontend for the mpv media player") |
| 1303 | (description "GNOME MPV is a simple GTK+ frontend for the mpv media player. |
| 1304 | GNOME MPV interacts with mpv via the client API exported by libmpv, allowing |
| 1305 | access to mpv's powerful playback capabilities.") |
| 1306 | (license license:gpl3+))) |
| 1307 | |
| 1308 | (define-public libvpx |
| 1309 | (package |
| 1310 | (name "libvpx") |
| 1311 | (version "1.8.0") |
| 1312 | (source (origin |
| 1313 | ;; XXX: Upstream does not provide tarballs for > 1.6.1. |
| 1314 | (method git-fetch) |
| 1315 | (uri (git-reference |
| 1316 | (url "https://chromium.googlesource.com/webm/libvpx") |
| 1317 | (commit (string-append "v" version)))) |
| 1318 | (file-name (git-file-name name version)) |
| 1319 | (sha256 |
| 1320 | (base32 |
| 1321 | "079pb80am08lj8y5rx99vdr99mdqis9067f172zq12alkz849n93")) |
| 1322 | (patches (search-patches "libvpx-CVE-2016-2818.patch")))) |
| 1323 | (build-system gnu-build-system) |
| 1324 | (arguments |
| 1325 | `(#:configure-flags (list "--enable-shared" |
| 1326 | "--as=yasm" |
| 1327 | ;; Limit size to avoid CVE-2015-1258 |
| 1328 | "--size-limit=16384x16384" |
| 1329 | (string-append "--prefix=" (assoc-ref %outputs "out"))) |
| 1330 | #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" |
| 1331 | (assoc-ref %outputs "out") "/lib")) |
| 1332 | #:phases (modify-phases %standard-phases |
| 1333 | (replace 'configure |
| 1334 | (lambda* (#:key configure-flags #:allow-other-keys) |
| 1335 | ;; The configure script does not understand some of the GNU |
| 1336 | ;; options, so we only add the flags specified above. |
| 1337 | (apply invoke "./configure" configure-flags)))) |
| 1338 | #:tests? #f)) ; no check target |
| 1339 | (native-inputs |
| 1340 | `(("perl" ,perl) |
| 1341 | ("yasm" ,yasm))) |
| 1342 | (synopsis "VP8/VP9 video codec") |
| 1343 | (description "libvpx is a codec for the VP8/VP9 video compression format.") |
| 1344 | (license license:bsd-3) |
| 1345 | (home-page "https://www.webmproject.org/"))) |
| 1346 | |
| 1347 | ;; GNU IceCat fails to build against 1.8.0, so keep this version for now. |
| 1348 | (define-public libvpx-1.7 |
| 1349 | (package |
| 1350 | (inherit libvpx) |
| 1351 | (version "1.7.0") |
| 1352 | (source (origin |
| 1353 | (inherit (package-source libvpx)) |
| 1354 | (uri (git-reference |
| 1355 | (url "https://chromium.googlesource.com/webm/libvpx") |
| 1356 | (commit (string-append "v" version)))) |
| 1357 | (file-name (git-file-name "libvpx" version)) |
| 1358 | (sha256 |
| 1359 | (base32 |
| 1360 | "0vvh89hvp8qg9an9vcmwb7d9k3nixhxaz6zi65qdjnd0i56kkcz6")) |
| 1361 | (patches |
| 1362 | (append |
| 1363 | (origin-patches (package-source libvpx)) |
| 1364 | (search-patches "libvpx-use-after-free-in-postproc.patch"))))))) |
| 1365 | |
| 1366 | (define-public youtube-dl |
| 1367 | (package |
| 1368 | (name "youtube-dl") |
| 1369 | (version "2019.03.01") |
| 1370 | (source (origin |
| 1371 | (method url-fetch) |
| 1372 | (uri (string-append "https://github.com/rg3/youtube-dl/releases/" |
| 1373 | "download/" version "/youtube-dl-" |
| 1374 | version ".tar.gz")) |
| 1375 | (sha256 |
| 1376 | (base32 |
| 1377 | "0bxk6adyppdv50jnp5cika8wc6wfgd6d8zbg1njgmcs1pxskllmf")))) |
| 1378 | (build-system python-build-system) |
| 1379 | (arguments |
| 1380 | ;; The problem here is that the directory for the man page and completion |
| 1381 | ;; files is relative, and for some reason, setup.py uses the |
| 1382 | ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO". |
| 1383 | ;; So, we need pass the prefix directly. In addition, make sure the Bash |
| 1384 | ;; completion file is called 'youtube-dl' rather than |
| 1385 | ;; 'youtube-dl.bash-completion'. |
| 1386 | `(#:tests? #f ; Many tests fail. The test suite can be run with pytest. |
| 1387 | #:phases (modify-phases %standard-phases |
| 1388 | (add-before 'install 'fix-the-data-directories |
| 1389 | (lambda* (#:key outputs #:allow-other-keys) |
| 1390 | (let ((prefix (assoc-ref outputs "out"))) |
| 1391 | (mkdir "bash-completion") |
| 1392 | (rename-file "youtube-dl.bash-completion" |
| 1393 | "bash-completion/youtube-dl") |
| 1394 | (substitute* "setup.py" |
| 1395 | (("youtube-dl\\.bash-completion") |
| 1396 | "bash-completion/youtube-dl") |
| 1397 | (("'etc/") |
| 1398 | (string-append "'" prefix "/etc/")) |
| 1399 | (("'share/") |
| 1400 | (string-append "'" prefix "/share/"))) |
| 1401 | #t)))))) |
| 1402 | (synopsis "Download videos from YouTube.com and other sites") |
| 1403 | (description |
| 1404 | "Youtube-dl is a small command-line program to download videos from |
| 1405 | YouTube.com and many more sites.") |
| 1406 | (home-page "https://yt-dl.org") |
| 1407 | (license license:public-domain))) |
| 1408 | |
| 1409 | (define-public youtube-dl-gui |
| 1410 | (package |
| 1411 | (name "youtube-dl-gui") |
| 1412 | (version "0.3.8") |
| 1413 | (source |
| 1414 | (origin |
| 1415 | (method url-fetch) |
| 1416 | (uri (pypi-uri "Youtube-DLG" version)) |
| 1417 | (sha256 |
| 1418 | (base32 |
| 1419 | "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb")))) |
| 1420 | (build-system python-build-system) |
| 1421 | (arguments |
| 1422 | ;; In Guix, wxpython has not yet been packaged for Python 3. |
| 1423 | `(#:python ,python-2 |
| 1424 | ;; This package has no tests. |
| 1425 | #:tests? #f |
| 1426 | #:phases |
| 1427 | (modify-phases %standard-phases |
| 1428 | (add-before 'build 'patch-source |
| 1429 | (lambda* (#:key inputs #:allow-other-keys) |
| 1430 | ;; The youtube-dl-gui program lets you configure options. Some of |
| 1431 | ;; them are problematic, so we change their defaults. |
| 1432 | (substitute* "youtube_dl_gui/optionsmanager.py" |
| 1433 | ;; When this is true, the builder process will try (and fail) to |
| 1434 | ;; write logs to the builder user's home directory. |
| 1435 | (("'enable_log': True") "'enable_log': False") |
| 1436 | ;; This determines which youtube-dl program youtube-dl-gui will |
| 1437 | ;; run. If we don't set this, then youtube-dl-gui might download |
| 1438 | ;; an arbitrary copy from the Internet into the user's home |
| 1439 | ;; directory and run it, so let's make sure youtube-dl-gui uses |
| 1440 | ;; the youtube-dl from the inputs by default. |
| 1441 | (("'youtubedl_path': self.config_path") |
| 1442 | (string-append "'youtubedl_path': '" |
| 1443 | (assoc-ref inputs "youtube-dl") |
| 1444 | "/bin'")) |
| 1445 | ;; When this is True, when youtube-dl-gui is finished downloading |
| 1446 | ;; a file, it will try (and possibly fail) to open the directory |
| 1447 | ;; containing the downloaded file. This can fail because it |
| 1448 | ;; assumes that xdg-open is in PATH. Unfortunately, simply |
| 1449 | ;; adding xdg-utils to the propagated inputs is not enough to |
| 1450 | ;; make this work, so for now we set the default to False. |
| 1451 | (("'open_dl_dir': True") "'open_dl_dir': False")) |
| 1452 | ;; The youtube-dl program from the inputs is actually a wrapper |
| 1453 | ;; script written in bash, so attempting to invoke it as a python |
| 1454 | ;; script will fail. |
| 1455 | (substitute* "youtube_dl_gui/downloaders.py" |
| 1456 | (("cmd = \\['python', self\\.youtubedl_path\\]") |
| 1457 | "cmd = [self.youtubedl_path]")) |
| 1458 | ;; Use relative paths for installing data files so youtube-dl-gui |
| 1459 | ;; installs the files relative to its prefix in the store, rather |
| 1460 | ;; than relative to /. Also, instead of installing data files into |
| 1461 | ;; $prefix/usr/share, install them into $prefix/share for |
| 1462 | ;; consistency (see: (standards) Directory Variables). |
| 1463 | (substitute* "setup.py" |
| 1464 | (("= '/usr/share") "= 'share")) |
| 1465 | ;; Update get_locale_file() so it finds the installed localization |
| 1466 | ;; files. |
| 1467 | (substitute* "youtube_dl_gui/utils.py" |
| 1468 | (("os\\.path\\.join\\('/usr', 'share'") |
| 1469 | (string-append "os.path.join('" |
| 1470 | (assoc-ref %outputs "out") |
| 1471 | "', 'share'"))) |
| 1472 | #t))))) |
| 1473 | (inputs |
| 1474 | `(("python2-wxpython" ,python2-wxpython) |
| 1475 | ("youtube-dl" ,youtube-dl))) |
| 1476 | (home-page "https://github.com/MrS0m30n3/youtube-dl-gui") |
| 1477 | (synopsis |
| 1478 | "GUI (Graphical User Interface) for @command{youtube-dl}") |
| 1479 | (description |
| 1480 | "Youtube-dlG is a GUI (Graphical User Interface) for |
| 1481 | @command{youtube-dl}. You can use it to download videos from YouTube and any |
| 1482 | other site that youtube-dl supports.") |
| 1483 | (license license:unlicense))) |
| 1484 | |
| 1485 | (define-public you-get |
| 1486 | (package |
| 1487 | (name "you-get") |
| 1488 | (version "0.4.1256") |
| 1489 | (source (origin |
| 1490 | (method git-fetch) |
| 1491 | (uri (git-reference |
| 1492 | (url "https://github.com/soimort/you-get.git") |
| 1493 | (commit (string-append "v" version)))) |
| 1494 | (file-name (git-file-name name version)) |
| 1495 | (sha256 |
| 1496 | (base32 |
| 1497 | "1hzr7ha1jvbc0v2bwl7s08ymwdmvb0f2jz4xp1fi6agq5y3ca1iv")))) |
| 1498 | (build-system python-build-system) |
| 1499 | (inputs |
| 1500 | `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos |
| 1501 | (arguments |
| 1502 | `(#:phases |
| 1503 | (modify-phases %standard-phases |
| 1504 | (add-after 'unpack 'qualify-input-references |
| 1505 | ;; Explicitly invoke the input ffmpeg, instead of whichever one |
| 1506 | ;; happens to be in the user's $PATH at run time. |
| 1507 | (lambda* (#:key inputs #:allow-other-keys) |
| 1508 | (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg") |
| 1509 | "/bin/ffmpeg"))) |
| 1510 | (substitute* "src/you_get/processor/ffmpeg.py" |
| 1511 | ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the |
| 1512 | ;; same string is also used when sniffing ffmpeg's output. |
| 1513 | (("(FFMPEG == |\\()'ffmpeg'" _ prefix) |
| 1514 | (string-append prefix "'" ffmpeg "'"))) |
| 1515 | #t)))) |
| 1516 | #:tests? #f)) ; XXX some tests need Internet access |
| 1517 | (synopsis "Download videos, audio, or images from Web sites") |
| 1518 | (description |
| 1519 | "You-Get is a command-line utility to download media contents (videos, |
| 1520 | audio, images) from the Web. It can use either mpv or vlc for playback.") |
| 1521 | (home-page "https://you-get.org/") |
| 1522 | (license license:expat))) |
| 1523 | |
| 1524 | (define-public youtube-viewer |
| 1525 | (package |
| 1526 | (name "youtube-viewer") |
| 1527 | (version "3.5.2") |
| 1528 | (source (origin |
| 1529 | (method git-fetch) |
| 1530 | (uri (git-reference |
| 1531 | (url "https://github.com/trizen/youtube-viewer.git") |
| 1532 | (commit version))) |
| 1533 | (file-name (git-file-name name version)) |
| 1534 | (sha256 |
| 1535 | (base32 |
| 1536 | "0sx0f7jgc41a4anflw02zqk5yivydn02nn78kxkn3fik6xdmv3yd")))) |
| 1537 | (build-system perl-build-system) |
| 1538 | (native-inputs |
| 1539 | `(("perl-module-build" ,perl-module-build))) |
| 1540 | ;; FIXME: Add optional dependencies once available: |
| 1541 | ;; perl-lwp-useragent-cached and perl-term-readline-gnu |
| 1542 | (inputs |
| 1543 | `(("perl-data-dump" ,perl-data-dump) |
| 1544 | ("perl-file-sharedir" ,perl-file-sharedir) |
| 1545 | ("perl-gtk2" ,perl-gtk2) |
| 1546 | ("perl-json" ,perl-json) |
| 1547 | ("perl-libwww" ,perl-libwww) |
| 1548 | ("perl-lwp-protocol-https" ,perl-lwp-protocol-https) |
| 1549 | ("perl-mozilla-ca" ,perl-mozilla-ca) |
| 1550 | ("perl-unicode-linebreak" ,perl-unicode-linebreak))) |
| 1551 | (arguments |
| 1552 | `(#:modules ((guix build perl-build-system) |
| 1553 | (guix build utils) |
| 1554 | (srfi srfi-26)) |
| 1555 | #:module-build-flags '("--gtk") |
| 1556 | #:phases |
| 1557 | (modify-phases %standard-phases |
| 1558 | (add-after 'install 'install-desktop |
| 1559 | (lambda* (#:key outputs #:allow-other-keys) |
| 1560 | (let* ((out (assoc-ref outputs "out")) |
| 1561 | (sharedir (string-append out "/share"))) |
| 1562 | (install-file "share/gtk-youtube-viewer.desktop" |
| 1563 | (string-append sharedir "/applications")) |
| 1564 | (install-file "share/icons/gtk-youtube-viewer.png" |
| 1565 | (string-append sharedir "/pixmaps")) |
| 1566 | #t))) |
| 1567 | (add-after 'install 'wrap-program |
| 1568 | (lambda* (#:key outputs #:allow-other-keys) |
| 1569 | (let* ((out (assoc-ref outputs "out")) |
| 1570 | (bin-dir (string-append out "/bin/")) |
| 1571 | (site-dir (string-append out "/lib/perl5/site_perl/")) |
| 1572 | (lib-path (getenv "PERL5LIB"))) |
| 1573 | (for-each (cut wrap-program <> |
| 1574 | `("PERL5LIB" ":" prefix (,lib-path ,site-dir))) |
| 1575 | (find-files bin-dir)) |
| 1576 | #t)))))) |
| 1577 | (synopsis |
| 1578 | "Lightweight application for searching and streaming videos from YouTube") |
| 1579 | (description |
| 1580 | "Youtube-viewer searches and plays YouTube videos in a native player. |
| 1581 | It comes with various search options; it can search for videos, playlists |
| 1582 | and/or channels. The videos are streamed directly in a selected video player |
| 1583 | at the best resolution (customizable) and with closed-captions (if available). |
| 1584 | Both command-line and GTK2 interface are available.") |
| 1585 | (home-page "https://github.com/trizen/youtube-viewer") |
| 1586 | (license license:perl-license))) |
| 1587 | |
| 1588 | (define-public libbluray |
| 1589 | (package |
| 1590 | (name "libbluray") |
| 1591 | (version "1.0.2") |
| 1592 | (source (origin |
| 1593 | (method url-fetch) |
| 1594 | (uri (string-append "https://download.videolan.org/videolan/" |
| 1595 | name "/" version "/" |
| 1596 | name "-" version ".tar.bz2")) |
| 1597 | (sha256 |
| 1598 | (base32 |
| 1599 | "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd")))) |
| 1600 | (build-system gnu-build-system) |
| 1601 | (arguments |
| 1602 | `(#:configure-flags '("--disable-bdjava-jar") |
| 1603 | #:phases |
| 1604 | (modify-phases %standard-phases |
| 1605 | (add-after 'unpack 'refer-to-libxml2-in-.pc-file |
| 1606 | ;; Avoid the need to propagate libxml2 by referring to it |
| 1607 | ;; directly, as is already done for fontconfig & freetype. |
| 1608 | (lambda* (#:key inputs #:allow-other-keys) |
| 1609 | (let ((libxml2 (assoc-ref inputs "libxml2"))) |
| 1610 | (substitute* "configure" |
| 1611 | ((" libxml-2.0") "")) |
| 1612 | (substitute* "src/libbluray.pc.in" |
| 1613 | (("^Libs.private:" field) |
| 1614 | (string-append field " -L" libxml2 "/lib -lxml2"))) |
| 1615 | #t))) |
| 1616 | (add-before 'build 'fix-dlopen-paths |
| 1617 | (lambda* (#:key inputs #:allow-other-keys) |
| 1618 | (let ((libaacs (assoc-ref inputs "libaacs")) |
| 1619 | (libbdplus (assoc-ref inputs "libbdplus"))) |
| 1620 | (substitute* "src/libbluray/disc/aacs.c" |
| 1621 | (("\"libaacs\"") |
| 1622 | (string-append "\"" libaacs "/lib/libaacs\""))) |
| 1623 | (substitute* "src/libbluray/disc/bdplus.c" |
| 1624 | (("\"libbdplus\"") |
| 1625 | (string-append "\"" libbdplus "/lib/libbdplus\""))) |
| 1626 | #t)))))) |
| 1627 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 1628 | (inputs |
| 1629 | `(("fontconfig" ,fontconfig) |
| 1630 | ("freetype" ,freetype) |
| 1631 | ("libaacs" ,libaacs) |
| 1632 | ("libbdplus" ,libbdplus) |
| 1633 | ("libxml2" ,libxml2))) |
| 1634 | (home-page "https://www.videolan.org/developers/libbluray.html") |
| 1635 | (synopsis "Blu-Ray Disc playback library") |
| 1636 | (description |
| 1637 | "libbluray is a library designed for Blu-Ray Disc playback for media |
| 1638 | players, like VLC or MPlayer.") |
| 1639 | (license license:lgpl2.1+))) |
| 1640 | |
| 1641 | (define-public libdvdread |
| 1642 | (package |
| 1643 | (name "libdvdread") |
| 1644 | (version "6.0.1") |
| 1645 | (source (origin |
| 1646 | (method url-fetch) |
| 1647 | (uri (string-append "https://download.videolan.org/videolan/" |
| 1648 | "libdvdread/" version "/" |
| 1649 | "libdvdread-" version ".tar.bz2")) |
| 1650 | (sha256 |
| 1651 | (base32 |
| 1652 | "1gfmh8ii3s2fw1c8vn57piwxc0smd3va4h7xgp9s8g48cc04zki8")))) |
| 1653 | (build-system gnu-build-system) |
| 1654 | (arguments |
| 1655 | `(#:configure-flags '("--with-libdvdcss=yes"))) |
| 1656 | (native-inputs |
| 1657 | `(("pkg-config" ,pkg-config))) |
| 1658 | (propagated-inputs |
| 1659 | `(("libdvdcss" ,libdvdcss))) |
| 1660 | (home-page "http://dvdnav.mplayerhq.hu/") |
| 1661 | (synopsis "Library for reading video DVDs") |
| 1662 | (description |
| 1663 | "Libdvdread provides a simple foundation for reading DVD video |
| 1664 | disks. It provides the functionality that is required to access many |
| 1665 | DVDs. It parses IFO files, reads NAV-blocks, and performs CSS |
| 1666 | authentication and descrambling (if an external libdvdcss library is |
| 1667 | installed).") |
| 1668 | (license license:gpl2+))) |
| 1669 | |
| 1670 | (define-public dvdauthor |
| 1671 | (package |
| 1672 | (name "dvdauthor") |
| 1673 | (version "0.7.2") |
| 1674 | (source |
| 1675 | (origin |
| 1676 | (method url-fetch) |
| 1677 | (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-" |
| 1678 | version ".tar.gz")) |
| 1679 | (sha256 |
| 1680 | (base32 |
| 1681 | "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h")))) |
| 1682 | (build-system gnu-build-system) |
| 1683 | (inputs |
| 1684 | `(("libdvdread" ,libdvdread) |
| 1685 | ("libpng" ,libpng) |
| 1686 | ("imagemagick" ,imagemagick) |
| 1687 | ("libxml2" ,libxml2) |
| 1688 | ("freetype" ,freetype))) |
| 1689 | (native-inputs |
| 1690 | `(("pkg-config" ,pkg-config))) |
| 1691 | (synopsis "Generates a DVD-Video movie from a MPEG-2 stream") |
| 1692 | (description "@command{dvdauthor} will generate a DVD-Video movie from a |
| 1693 | MPEG-2 stream containing VOB packets.") |
| 1694 | (home-page "http://dvdauthor.sourceforge.net") |
| 1695 | (license license:gpl3+))) |
| 1696 | |
| 1697 | (define-public libdvdnav |
| 1698 | (package |
| 1699 | (name "libdvdnav") |
| 1700 | (version "6.0.0") |
| 1701 | (source (origin |
| 1702 | (method url-fetch) |
| 1703 | (uri (string-append "https://download.videolan.org/videolan/" |
| 1704 | name "/" version "/" |
| 1705 | name "-" version ".tar.bz2")) |
| 1706 | (sha256 |
| 1707 | (base32 |
| 1708 | "062njcksmpgw9yv3737qkf93r2pzhaxi9szqjabpa8d010dp38ph")))) |
| 1709 | (build-system gnu-build-system) |
| 1710 | (native-inputs |
| 1711 | `(("pkg-config" ,pkg-config))) |
| 1712 | (inputs |
| 1713 | `(("libdvdread" ,libdvdread))) |
| 1714 | (home-page "http://dvdnav.mplayerhq.hu/") |
| 1715 | (synopsis "Library for video DVD navigation features") |
| 1716 | (description |
| 1717 | "Libdvdnav is a library for developers of multimedia |
| 1718 | applications. It allows easy use of sophisticated DVD navigation features |
| 1719 | such as DVD menus, multiangle playback and even interactive DVD games. All |
| 1720 | this functionality is provided through a simple API which provides the DVD |
| 1721 | playback as a single logical stream of blocks, intermitted by special |
| 1722 | dvdnav events to report certain conditions. The main usage of libdvdnav is |
| 1723 | a loop regularly calling a function to get the next block, surrounded by |
| 1724 | additional calls to tell the library of user interaction. The whole |
| 1725 | DVD virtual machine and internal playback states are completely |
| 1726 | encapsulated.") |
| 1727 | (license license:gpl2+))) |
| 1728 | |
| 1729 | (define-public libdvdcss |
| 1730 | (package |
| 1731 | (name "libdvdcss") |
| 1732 | (version "1.4.2") |
| 1733 | (source (origin |
| 1734 | (method url-fetch) |
| 1735 | (uri (string-append "https://download.videolan.org/pub/" |
| 1736 | name "/" version "/" |
| 1737 | name "-" version ".tar.bz2")) |
| 1738 | (sha256 |
| 1739 | (base32 |
| 1740 | "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq")))) |
| 1741 | (build-system gnu-build-system) |
| 1742 | (home-page "https://www.videolan.org/developers/libdvdcss.html") |
| 1743 | (synopsis "Library for accessing DVDs as block devices") |
| 1744 | (description |
| 1745 | "libdvdcss is a simple library designed for accessing DVDs like a block |
| 1746 | device without having to bother about the decryption.") |
| 1747 | (license license:gpl2+))) |
| 1748 | |
| 1749 | (define-public srt2vtt |
| 1750 | (package |
| 1751 | (name "srt2vtt") |
| 1752 | (version "0.1") |
| 1753 | (source (origin |
| 1754 | (method url-fetch) |
| 1755 | (uri (string-append |
| 1756 | "https://files.dthompson.us/srt2vtt/srt2vtt-" |
| 1757 | version ".tar.gz")) |
| 1758 | (sha256 |
| 1759 | (base32 |
| 1760 | "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif")))) |
| 1761 | (build-system gnu-build-system) |
| 1762 | (inputs |
| 1763 | `(("guile" ,guile-2.0))) |
| 1764 | (synopsis "SubRip to WebVTT subtitle converter") |
| 1765 | (description "srt2vtt converts SubRip formatted subtitles to WebVTT format |
| 1766 | for use with HTML5 video.") |
| 1767 | (home-page "https://dthompson.us/projects/srt2vtt.html") |
| 1768 | (license license:gpl3+))) |
| 1769 | |
| 1770 | (define-public avidemux |
| 1771 | (package |
| 1772 | (name "avidemux") |
| 1773 | (version "2.7.1") |
| 1774 | (source (origin |
| 1775 | (method url-fetch) |
| 1776 | (uri (string-append |
| 1777 | "mirror://sourceforge/" name "/" name "/" version "/" |
| 1778 | name "_" version ".tar.gz")) |
| 1779 | (sha256 |
| 1780 | (base32 |
| 1781 | "15g9h791qbnmycabbbl7s2b3n3xpvygm88qrfk35g2cw6957ik9w")) |
| 1782 | (patches (search-patches "avidemux-install-to-lib.patch")))) |
| 1783 | (build-system cmake-build-system) |
| 1784 | (native-inputs |
| 1785 | `(("pkg-config" ,pkg-config))) |
| 1786 | ;; FIXME: Once packaged, add libraries not found during the build. |
| 1787 | (inputs |
| 1788 | `(("alsa-lib" ,alsa-lib) |
| 1789 | ("fontconfig" ,fontconfig) |
| 1790 | ("freetype" ,freetype) |
| 1791 | ("fribidi" ,fribidi) |
| 1792 | ("glu" ,glu) |
| 1793 | ("jack" ,jack-1) |
| 1794 | ("lame" ,lame) |
| 1795 | ("libva" ,libva) |
| 1796 | ("libvdpau" ,libvdpau) |
| 1797 | ("libvorbis" ,libvorbis) |
| 1798 | ("libvpx" ,libvpx) |
| 1799 | ("libxv" ,libxv) |
| 1800 | ("perl" ,perl) |
| 1801 | ("pulseaudio" ,pulseaudio) |
| 1802 | ("python" ,python-wrapper) |
| 1803 | ("qtbase" ,qtbase) |
| 1804 | ("qttools" ,qttools) |
| 1805 | ("sdl" ,sdl) |
| 1806 | ("sqlite" ,sqlite) |
| 1807 | ("yasm" ,yasm) |
| 1808 | ("zlib" ,zlib))) |
| 1809 | (arguments |
| 1810 | `(#:tests? #f ; no check target |
| 1811 | #:phases |
| 1812 | ;; Make sure files inside the included ffmpeg tarball are |
| 1813 | ;; patch-shebanged. |
| 1814 | (modify-phases %standard-phases |
| 1815 | (add-before 'patch-source-shebangs 'unpack-ffmpeg |
| 1816 | (lambda _ |
| 1817 | (with-directory-excursion "avidemux_core/ffmpeg_package" |
| 1818 | (invoke "tar" "xf" "ffmpeg-3.3.7.tar.bz2") |
| 1819 | (delete-file "ffmpeg-3.3.7.tar.bz2")) |
| 1820 | #t)) |
| 1821 | (add-after 'patch-source-shebangs 'repack-ffmpeg |
| 1822 | (lambda _ |
| 1823 | (with-directory-excursion "avidemux_core/ffmpeg_package" |
| 1824 | (substitute* "ffmpeg-3.3.7/configure" |
| 1825 | (("#! /bin/sh") (string-append "#!" (which "sh")))) |
| 1826 | (invoke "tar" "cjf" "ffmpeg-3.3.7.tar.bz2" "ffmpeg-3.3.7" |
| 1827 | ;; avoid non-determinism in the archive |
| 1828 | "--sort=name" "--mtime=@0" |
| 1829 | "--owner=root:0" "--group=root:0") |
| 1830 | (delete-file-recursively "ffmpeg-3.3.7")) |
| 1831 | #t)) |
| 1832 | (replace 'configure |
| 1833 | (lambda _ |
| 1834 | ;; Copy-paste settings from the cmake build system. |
| 1835 | (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH")) |
| 1836 | (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) |
| 1837 | #t)) |
| 1838 | (replace 'build |
| 1839 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 1840 | (let* ((out (assoc-ref outputs "out")) |
| 1841 | (lib (string-append out "/lib")) |
| 1842 | (top (getcwd)) |
| 1843 | (sdl (assoc-ref inputs "sdl")) |
| 1844 | (build_component |
| 1845 | (lambda* (component srcdir #:optional (args '())) |
| 1846 | (let ((builddir (string-append "build_" component))) |
| 1847 | (mkdir builddir) |
| 1848 | (with-directory-excursion builddir |
| 1849 | (apply invoke "cmake" |
| 1850 | "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE" |
| 1851 | (string-append "-DCMAKE_INSTALL_PREFIX=" out) |
| 1852 | (string-append "-DCMAKE_INSTALL_RPATH=" lib) |
| 1853 | (string-append "-DCMAKE_SHARED_LINKER_FLAGS=" |
| 1854 | "\"-Wl,-rpath=" lib "\"") |
| 1855 | (string-append "-DAVIDEMUX_SOURCE_DIR=" top) |
| 1856 | (string-append "-DSDL_INCLUDE_DIR=" |
| 1857 | sdl "/include/SDL") |
| 1858 | (string-append "../" srcdir) |
| 1859 | "-DENABLE_QT5=True" |
| 1860 | args) |
| 1861 | (invoke "make" "-j" |
| 1862 | (number->string (parallel-job-count))) |
| 1863 | (invoke "make" "install")))))) |
| 1864 | (mkdir out) |
| 1865 | (build_component "core" "avidemux_core") |
| 1866 | (build_component "cli" "avidemux/cli") |
| 1867 | (build_component "qt4" "avidemux/qt4") |
| 1868 | (build_component "plugins_common" "avidemux_plugins" |
| 1869 | '("-DPLUGIN_UI=COMMON")) |
| 1870 | (build_component "plugins_cli" "avidemux_plugins" |
| 1871 | '("-DPLUGIN_UI=CLI")) |
| 1872 | (build_component "plugins_qt4" "avidemux_plugins" |
| 1873 | '("-DPLUGIN_UI=QT4")) |
| 1874 | (build_component "plugins_settings" "avidemux_plugins" |
| 1875 | '("-DPLUGIN_UI=SETTINGS")) |
| 1876 | ;; Remove .exe and .dll file. |
| 1877 | (delete-file-recursively |
| 1878 | (string-append out "/share/ADM6_addons")) |
| 1879 | #t))) |
| 1880 | (delete 'install)))) |
| 1881 | (home-page "http://fixounet.free.fr/avidemux/") |
| 1882 | (synopsis "Video editor") |
| 1883 | (description "Avidemux is a video editor designed for simple cutting, |
| 1884 | filtering and encoding tasks. It supports many file types, including AVI, |
| 1885 | DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks |
| 1886 | can be automated using projects, job queue and powerful scripting |
| 1887 | capabilities.") |
| 1888 | (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux")) |
| 1889 | ;; Software with various licenses is included, see License.txt. |
| 1890 | (license license:gpl2+))) |
| 1891 | |
| 1892 | (define-public vapoursynth |
| 1893 | (package |
| 1894 | (name "vapoursynth") |
| 1895 | (version "37") |
| 1896 | (source (origin |
| 1897 | (method git-fetch) |
| 1898 | (uri (git-reference |
| 1899 | (url "https://github.com/vapoursynth/vapoursynth.git") |
| 1900 | (commit (string-append "R" version)))) |
| 1901 | (file-name (git-file-name name version)) |
| 1902 | (sha256 |
| 1903 | (base32 |
| 1904 | "1ma2s7dxk6y6l04qj1jvgwia4xj7999ny3a1yx2vbk5l83giam2p")))) |
| 1905 | (build-system gnu-build-system) |
| 1906 | (native-inputs |
| 1907 | `(("autoconf" ,autoconf) |
| 1908 | ("automake" ,automake) |
| 1909 | ("cython" ,python-cython) |
| 1910 | ("libtool" ,libtool) |
| 1911 | ("pkg-config" ,pkg-config) |
| 1912 | ("python" ,python) |
| 1913 | ("yasm" ,yasm))) |
| 1914 | (inputs |
| 1915 | `(("ffmpeg" ,ffmpeg) |
| 1916 | ("libass" ,libass) |
| 1917 | ("tesseract-ocr" ,tesseract-ocr) |
| 1918 | ("zimg" ,zimg))) |
| 1919 | (arguments |
| 1920 | '(#:phases |
| 1921 | (modify-phases %standard-phases |
| 1922 | (add-after 'unpack 'autogen |
| 1923 | (lambda _ |
| 1924 | (invoke "sh" "autogen.sh")))))) |
| 1925 | (home-page "http://www.vapoursynth.com/") |
| 1926 | (synopsis "Video processing framework") |
| 1927 | (description "VapourSynth is a C++ library and Python module for video |
| 1928 | manipulation. It aims to be a modern rewrite of Avisynth, supporting |
| 1929 | multithreading, generalized colorspaces, per frame properties, and videos with |
| 1930 | format changes.") |
| 1931 | ;; src/core/cpufeatures only allows x86, ARM or PPC |
| 1932 | (supported-systems (fold delete %supported-systems |
| 1933 | '("mips64el-linux" "aarch64-linux"))) |
| 1934 | ;; As seen from the source files. |
| 1935 | (license license:lgpl2.1+))) |
| 1936 | |
| 1937 | (define-public xvid |
| 1938 | (package |
| 1939 | (name "xvid") |
| 1940 | (version "1.3.4") |
| 1941 | (source (origin |
| 1942 | (method url-fetch) |
| 1943 | (uri (string-append |
| 1944 | "http://downloads.xvid.org/downloads/xvidcore-" |
| 1945 | version ".tar.bz2")) |
| 1946 | (sha256 |
| 1947 | (base32 |
| 1948 | "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz")))) |
| 1949 | (build-system gnu-build-system) |
| 1950 | (native-inputs `(("yasm" ,yasm))) |
| 1951 | (arguments |
| 1952 | '(#:phases |
| 1953 | (modify-phases %standard-phases |
| 1954 | (add-before |
| 1955 | 'configure 'pre-configure |
| 1956 | (lambda _ |
| 1957 | (chdir "build/generic") |
| 1958 | (substitute* "configure" |
| 1959 | (("#! /bin/sh") (string-append "#!" (which "sh")))) |
| 1960 | #t))) |
| 1961 | ;; No 'check' target. |
| 1962 | #:tests? #f)) |
| 1963 | (home-page "https://www.xvid.com/") |
| 1964 | (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec") |
| 1965 | (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video |
| 1966 | codec library. It uses ASP features such as b-frames, global and quarter |
| 1967 | pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG |
| 1968 | and custom quantization matrices.") |
| 1969 | (license license:gpl2+))) |
| 1970 | |
| 1971 | (define-public streamlink |
| 1972 | (package |
| 1973 | (name "streamlink") |
| 1974 | (version "0.14.2") |
| 1975 | (source |
| 1976 | (origin |
| 1977 | (method url-fetch) |
| 1978 | (uri (pypi-uri "streamlink" version)) |
| 1979 | (sha256 |
| 1980 | (base32 |
| 1981 | "0l2145fd60i76afjisfxd48cwhwyir07i7s3bnimdq5db2kzkix8")) |
| 1982 | (patches (search-patches "streamlink-update-test.patch")))) |
| 1983 | (build-system python-build-system) |
| 1984 | (home-page "https://github.com/streamlink/streamlink") |
| 1985 | (native-inputs |
| 1986 | `(("python-freezegun" ,python-freezegun) |
| 1987 | ("python-pytest" ,python-pytest) |
| 1988 | ("python-mock" ,python-mock) |
| 1989 | ("python-requests-mock" ,python-requests-mock))) |
| 1990 | (propagated-inputs |
| 1991 | `(("python-pysocks" ,python-pysocks) |
| 1992 | ("python-websocket-client" ,python-websocket-client) |
| 1993 | ("python-iso3166" ,python-iso3166) |
| 1994 | ("python-iso639" ,python-iso639) |
| 1995 | ("python-isodate" ,python-isodate) |
| 1996 | ("python-pycryptodome" ,python-pycryptodome) |
| 1997 | ("python-requests" ,python-requests) |
| 1998 | ("python-urllib3" ,python-urllib3))) |
| 1999 | (synopsis "Extract streams from various services") |
| 2000 | (description "Streamlink is command-line utility that extracts streams |
| 2001 | from sites like Twitch.tv and pipes them into a video player of choice.") |
| 2002 | (license license:bsd-2))) |
| 2003 | |
| 2004 | (define-public livestreamer |
| 2005 | (deprecated-package "livestreamer" streamlink)) |
| 2006 | |
| 2007 | (define-public twitchy |
| 2008 | (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag |
| 2009 | (package |
| 2010 | (name "twitchy") |
| 2011 | (version (git-version "3.4" "1" commit)) |
| 2012 | (source |
| 2013 | (origin |
| 2014 | (method git-fetch) |
| 2015 | (uri (git-reference |
| 2016 | (url "https://github.com/BasioMeusPuga/twitchy.git") |
| 2017 | (commit commit))) |
| 2018 | (file-name (git-file-name name version)) |
| 2019 | (sha256 |
| 2020 | (base32 |
| 2021 | "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7")))) |
| 2022 | (build-system python-build-system) |
| 2023 | (arguments |
| 2024 | '(#:phases |
| 2025 | (modify-phases %standard-phases |
| 2026 | (add-after 'unpack 'patch-paths |
| 2027 | (lambda* (#:key inputs #:allow-other-keys) |
| 2028 | (substitute* "twitchy/twitchy_play.py" |
| 2029 | (("\"streamlink ") |
| 2030 | (string-append "\"" (assoc-ref inputs "streamlink") |
| 2031 | "/bin/streamlink "))) |
| 2032 | #t)) |
| 2033 | (add-before 'check 'check-setup |
| 2034 | (lambda _ |
| 2035 | (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’. |
| 2036 | #t)) |
| 2037 | (add-after 'install 'install-rofi-plugin |
| 2038 | (lambda* (#:key outputs #:allow-other-keys) |
| 2039 | (install-file "plugins/rofi-twitchy" |
| 2040 | (string-append (assoc-ref outputs "out") |
| 2041 | "/bin")) |
| 2042 | #t))))) |
| 2043 | (inputs |
| 2044 | `(("python-requests" ,python-requests) |
| 2045 | ("streamlink" ,streamlink))) |
| 2046 | (home-page "https://github.com/BasioMeusPuga/twitchy") |
| 2047 | (synopsis "Command-line interface for Twitch.tv") |
| 2048 | (description |
| 2049 | "This package provides a command-line interface for Twitch.tv") |
| 2050 | (license license:gpl3+)))) |
| 2051 | |
| 2052 | (define-public mlt |
| 2053 | (package |
| 2054 | (name "mlt") |
| 2055 | (version "6.12.0") |
| 2056 | (source (origin |
| 2057 | (method git-fetch) |
| 2058 | (uri (git-reference |
| 2059 | (url "https://github.com/mltframework/mlt.git") |
| 2060 | (commit (string-append "v" version)))) |
| 2061 | (file-name (git-file-name name version)) |
| 2062 | (sha256 |
| 2063 | (base32 |
| 2064 | "0pzm3mjbbdl2rkbswgyfkx552xlxh2qrwzsi2a4dicfr92rfgq6w")))) |
| 2065 | (build-system gnu-build-system) |
| 2066 | (arguments |
| 2067 | `(#:tests? #f ; no tests |
| 2068 | #:make-flags '("CC=gcc" "CXX=g++ -std=gnu++11") |
| 2069 | #:configure-flags |
| 2070 | (list "--enable-gpl3" |
| 2071 | "--enable-gpl") |
| 2072 | #:phases |
| 2073 | (modify-phases %standard-phases |
| 2074 | (add-after |
| 2075 | 'configure 'override-LDFLAGS |
| 2076 | (lambda* (#:key outputs #:allow-other-keys) |
| 2077 | (substitute* "config.mak" |
| 2078 | (("LDFLAGS\\+=") |
| 2079 | (string-append "LDFLAGS+=-Wl,-rpath=" |
| 2080 | (assoc-ref outputs "out") |
| 2081 | "/lib "))) |
| 2082 | #t))))) |
| 2083 | (inputs |
| 2084 | `(("alsa-lib" ,alsa-lib) |
| 2085 | ("ffmpeg" ,ffmpeg-3.4) |
| 2086 | ("fftw" ,fftw) |
| 2087 | ("frei0r-plugins" ,frei0r-plugins) |
| 2088 | ("gdk-pixbuf" ,gdk-pixbuf) |
| 2089 | ("gtk+" ,gtk+-2) |
| 2090 | ("libxml2" ,libxml2) |
| 2091 | ("jack" ,jack-1) |
| 2092 | ("ladspa" ,ladspa) |
| 2093 | ("libsamplerate" ,libsamplerate) |
| 2094 | ("pulseaudio" ,pulseaudio) |
| 2095 | ("qtbase" ,qtbase) |
| 2096 | ("qtsvg" ,qtsvg) |
| 2097 | ("sdl" ,sdl) |
| 2098 | ("sox" ,sox))) |
| 2099 | (native-inputs |
| 2100 | `(("pkg-config" ,pkg-config))) |
| 2101 | (home-page "https://www.mltframework.org/") |
| 2102 | (synopsis "Author, manage, and run multitrack audio/video compositions") |
| 2103 | (description |
| 2104 | "MLT is a multimedia framework, designed and developed for television |
| 2105 | broadcasting. It provides a toolkit for broadcasters, video editors, media |
| 2106 | players, transcoders, web streamers and many more types of applications. The |
| 2107 | functionality of the system is provided via an assortment of ready to use |
| 2108 | tools, XML authoring components, and an extensible plug-in based API.") |
| 2109 | (license license:gpl3))) |
| 2110 | |
| 2111 | (define-public v4l-utils |
| 2112 | (package |
| 2113 | (name "v4l-utils") |
| 2114 | (version "1.12.5") |
| 2115 | (source (origin |
| 2116 | (method url-fetch) |
| 2117 | (uri (string-append "https://linuxtv.org/downloads/v4l-utils" |
| 2118 | "/v4l-utils-" version ".tar.bz2")) |
| 2119 | (sha256 |
| 2120 | (base32 |
| 2121 | "03g2b4rivrilimcp57mwrlsa3qvrxmk4sza08mygwmqbvcnic606")))) |
| 2122 | (build-system gnu-build-system) |
| 2123 | (arguments |
| 2124 | '(#:configure-flags |
| 2125 | (list (string-append "--with-udevdir=" |
| 2126 | (assoc-ref %outputs "out") |
| 2127 | "/lib/udev") |
| 2128 | "CXXFLAGS=-std=gnu++11"))) |
| 2129 | (native-inputs |
| 2130 | `(("perl" ,perl) |
| 2131 | ("pkg-config" ,pkg-config))) |
| 2132 | (inputs |
| 2133 | `(("alsa-lib" ,alsa-lib) |
| 2134 | ("glu" ,glu) |
| 2135 | ("libjpeg" ,libjpeg) |
| 2136 | ("libx11" ,libx11) |
| 2137 | ("qtbase" ,qtbase) |
| 2138 | ("eudev" ,eudev))) |
| 2139 | (synopsis "Realtime video capture utilities for Linux") |
| 2140 | (description "The v4l-utils provide a series of libraries and utilities to |
| 2141 | be used for realtime video capture via Linux-specific APIs.") |
| 2142 | (home-page "https://linuxtv.org/wiki/index.php/V4l-utils") |
| 2143 | ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only. |
| 2144 | (license (list license:lgpl2.1+ license:gpl2)))) |
| 2145 | |
| 2146 | (define-public obs |
| 2147 | (package |
| 2148 | (name "obs") |
| 2149 | (version "22.0.3") |
| 2150 | (source (origin |
| 2151 | (method git-fetch) |
| 2152 | (uri (git-reference |
| 2153 | (url "https://github.com/obsproject/obs-studio.git") |
| 2154 | (commit version))) |
| 2155 | (file-name (git-file-name name version)) |
| 2156 | (sha256 |
| 2157 | (base32 |
| 2158 | "0ri9qkqk3h71b1a5bwpjzqdr21bbmfqbykg48l779d20zln23n1i")))) |
| 2159 | (build-system cmake-build-system) |
| 2160 | (arguments |
| 2161 | `(#:tests? #f)) ; no tests |
| 2162 | (native-inputs |
| 2163 | `(("pkg-config" ,pkg-config))) |
| 2164 | (inputs |
| 2165 | `(("alsa-lib" ,alsa-lib) |
| 2166 | ("curl" ,curl) |
| 2167 | ("eudev" ,eudev) |
| 2168 | ("ffmpeg" ,ffmpeg) |
| 2169 | ("fontconfig" ,fontconfig) |
| 2170 | ("freetype" ,freetype) |
| 2171 | ("jack" ,jack-1) |
| 2172 | ("jansson" ,jansson) |
| 2173 | ("libx264" ,libx264) |
| 2174 | ("libxcomposite" ,libxcomposite) |
| 2175 | ("mesa" ,mesa) |
| 2176 | ("pulseaudio" ,pulseaudio) |
| 2177 | ("qtbase" ,qtbase) |
| 2178 | ("qtx11extras" ,qtx11extras) |
| 2179 | ("speex" ,speex) |
| 2180 | ("v4l-utils" ,v4l-utils) |
| 2181 | ("zlib" ,zlib))) |
| 2182 | (synopsis "Live streaming software") |
| 2183 | (description "Open Broadcaster Software provides a graphical interface for |
| 2184 | video recording and live streaming. OBS supports capturing audio and video |
| 2185 | from many input sources such as webcams, X11 (for screencasting), PulseAudio, |
| 2186 | and JACK.") |
| 2187 | (home-page "https://obsproject.com") |
| 2188 | (supported-systems '("x86_64-linux" "i686-linux")) |
| 2189 | (license license:gpl2+))) |
| 2190 | |
| 2191 | (define-public libvdpau |
| 2192 | (package |
| 2193 | (name "libvdpau") |
| 2194 | (version "1.1.1") |
| 2195 | (source |
| 2196 | (origin |
| 2197 | (method url-fetch) |
| 2198 | (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/" |
| 2199 | name "-" version ".tar.bz2")) |
| 2200 | (sha256 |
| 2201 | (base32 |
| 2202 | "0dnpb0yh7v6rvckx82kxg045rd9rbsw25wjv7ad5n8h94s9h2yl5")))) |
| 2203 | (build-system gnu-build-system) |
| 2204 | (native-inputs |
| 2205 | `(("pkg-config" ,pkg-config))) |
| 2206 | (inputs |
| 2207 | `(("libx11" ,libx11 "out") |
| 2208 | ("libxext" ,libxext) |
| 2209 | ("xorgproto" ,xorgproto))) |
| 2210 | (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/") |
| 2211 | (synopsis "Video Decode and Presentation API") |
| 2212 | (description "VDPAU is the Video Decode and Presentation API for UNIX. It |
| 2213 | provides an interface to video decode acceleration and presentation hardware |
| 2214 | present in modern GPUs.") |
| 2215 | (license (license:x11-style "file://COPYING")))) |
| 2216 | |
| 2217 | (define-public vdpauinfo |
| 2218 | (package |
| 2219 | (name "vdpauinfo") |
| 2220 | (version "1.0") |
| 2221 | (source |
| 2222 | (origin |
| 2223 | (method url-fetch) |
| 2224 | (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/" |
| 2225 | name "-" version ".tar.gz")) |
| 2226 | (sha256 |
| 2227 | (base32 |
| 2228 | "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20")))) |
| 2229 | (build-system gnu-build-system) |
| 2230 | (native-inputs |
| 2231 | `(("pkg-config" ,pkg-config) |
| 2232 | ("libx11" ,libx11))) |
| 2233 | (propagated-inputs |
| 2234 | `(("libvdpau" ,libvdpau))) |
| 2235 | (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/") |
| 2236 | (synopsis "Tool to query the capabilities of a VDPAU implementation") |
| 2237 | (description "Vdpauinfo is a tool to query the capabilities of a VDPAU |
| 2238 | implementation.") |
| 2239 | (license (license:x11-style "file://COPYING")))) |
| 2240 | |
| 2241 | (define-public libvdpau-va-gl |
| 2242 | (package |
| 2243 | (name "libvdpau-va-gl") |
| 2244 | (version "0.4.2") |
| 2245 | (source |
| 2246 | (origin |
| 2247 | (method url-fetch) |
| 2248 | (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/" |
| 2249 | "releases/download/v" version "/libvdpau-va-gl-" |
| 2250 | version ".tar.gz")) |
| 2251 | (sha256 |
| 2252 | (base32 |
| 2253 | "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx")) |
| 2254 | (patches (search-patches "libvdpau-va-gl-unbundle.patch")) |
| 2255 | (modules '((guix build utils))) |
| 2256 | (snippet '(begin (delete-file-recursively "3rdparty") |
| 2257 | #t)))) |
| 2258 | (build-system cmake-build-system) |
| 2259 | (arguments |
| 2260 | '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support. |
| 2261 | (native-inputs |
| 2262 | `(("libvdpau" ,libvdpau) |
| 2263 | ("pkg-config" ,pkg-config))) |
| 2264 | (inputs |
| 2265 | `(("libva" ,libva) |
| 2266 | ("mesa" ,mesa))) |
| 2267 | (home-page "https://github.com/i-rinat/libvdpau-va-gl") |
| 2268 | (synopsis "VDPAU driver with VA-API/OpenGL backend") |
| 2269 | (description |
| 2270 | "Many applications can use VDPAU to accelerate portions of the video |
| 2271 | decoding process and video post-processing to the GPU video hardware. Since |
| 2272 | there is no VDPAU available on Intel chips, they fall back to different drawing |
| 2273 | techniques. This driver uses OpenGL under the hood to accelerate drawing and |
| 2274 | scaling and VA-API (if available) to accelerate video decoding.") |
| 2275 | (license license:expat))) |
| 2276 | |
| 2277 | (define-public recordmydesktop |
| 2278 | (package |
| 2279 | (name "recordmydesktop") |
| 2280 | (version "0.3.8.1") |
| 2281 | (source (origin |
| 2282 | (method url-fetch) |
| 2283 | (uri (string-append "mirror://sourceforge/" name "/" name "/" |
| 2284 | version "/recordmydesktop-" version ".tar.gz")) |
| 2285 | (sha256 |
| 2286 | (base32 |
| 2287 | "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik")))) |
| 2288 | (build-system gnu-build-system) |
| 2289 | (inputs `(("popt" ,popt) |
| 2290 | ("zlib" ,zlib) |
| 2291 | ("libx11" ,libx11) |
| 2292 | ("libice" ,libice) |
| 2293 | ("libsm" ,libsm) |
| 2294 | ("libxfixes" ,libxfixes) |
| 2295 | ("libxdamage" ,libxdamage) |
| 2296 | ("libxext" ,libxext) |
| 2297 | ("alsa-lib" ,alsa-lib) |
| 2298 | ("libvorbis" ,libvorbis) |
| 2299 | ("libtheora" ,libtheora))) |
| 2300 | (home-page "http://recordmydesktop.sourceforge.net/") |
| 2301 | (synopsis "Desktop session video recorder") |
| 2302 | (description |
| 2303 | "recordMyDesktop is a command-line tool that captures the activity in |
| 2304 | your graphical desktop and encodes it as a video. This is a useful tool for |
| 2305 | making @dfn{screencasts}.") |
| 2306 | (license license:gpl2+))) |
| 2307 | |
| 2308 | (define-public simplescreenrecorder |
| 2309 | (package |
| 2310 | (name "simplescreenrecorder") |
| 2311 | (version "0.3.11") |
| 2312 | (source |
| 2313 | (origin |
| 2314 | (method git-fetch) |
| 2315 | (uri (git-reference |
| 2316 | (url "https://github.com/MaartenBaert/ssr.git") |
| 2317 | (commit version))) |
| 2318 | (file-name (git-file-name name version)) |
| 2319 | (sha256 |
| 2320 | (base32 |
| 2321 | "0n702dnv4qshgn3b90ixvplfafjhgz6040yir5vy8khjdpciysq4")))) |
| 2322 | (build-system cmake-build-system) |
| 2323 | ;; Although libx11, libxfixes, libxext are listed as build dependencies in |
| 2324 | ;; README.md, the program builds and functions properly without them. |
| 2325 | ;; As a result, they are omitted. Please add them back if problems appear. |
| 2326 | (inputs |
| 2327 | `(("alsa-lib" ,alsa-lib) |
| 2328 | ("ffmpeg" ,ffmpeg) |
| 2329 | ("glu" ,glu) |
| 2330 | ("jack" ,jack-1) |
| 2331 | ("libxi" ,libxi) |
| 2332 | ("pulseaudio" ,pulseaudio) |
| 2333 | ("qtbase" ,qtbase) |
| 2334 | ("qtx11extras" ,qtx11extras))) |
| 2335 | (native-inputs `(("pkg-config" ,pkg-config))) |
| 2336 | (arguments |
| 2337 | `(#:configure-flags |
| 2338 | (list "-DWITH_QT5=TRUE") |
| 2339 | #:tests? #f)) ; no test suite |
| 2340 | ;; Using HTTPS causes part of the page to be displayed improperly. |
| 2341 | (home-page "http://www.maartenbaert.be/simplescreenrecorder/") |
| 2342 | (synopsis "Screen recorder") |
| 2343 | (description "SimpleScreenRecorder is an easy to use screen recorder with |
| 2344 | a graphical user interface. It supports recording the entire screen, or a |
| 2345 | part of it, and allows encoding in many different codecs and file formats. |
| 2346 | Other features include a live preview and live streaming.") |
| 2347 | (license (list license:gpl3+ ; most files |
| 2348 | license:zlib ; glinject/elfhacks.* |
| 2349 | license:isc ; glinject/* |
| 2350 | license:x11)))) ; build-aux/install-sh |
| 2351 | |
| 2352 | (define-public libsmpeg |
| 2353 | (package |
| 2354 | (name "libsmpeg") |
| 2355 | (version "0.4.5") |
| 2356 | (source (origin |
| 2357 | (method svn-fetch) |
| 2358 | (uri (svn-reference |
| 2359 | (url "svn://svn.icculus.org/smpeg/trunk/") |
| 2360 | (revision 401))) ; last revision before smpeg2 (for SDL 2.0) |
| 2361 | (file-name (string-append name "-" version "-checkout")) |
| 2362 | (sha256 |
| 2363 | (base32 |
| 2364 | "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn")))) |
| 2365 | (build-system gnu-build-system) |
| 2366 | (arguments |
| 2367 | `(#:phases |
| 2368 | (modify-phases %standard-phases |
| 2369 | (add-after 'unpack 'autogen.sh |
| 2370 | (lambda _ |
| 2371 | (invoke "sh" "autogen.sh")))))) |
| 2372 | (native-inputs |
| 2373 | `(("autoconf" ,autoconf) |
| 2374 | ("automake" ,automake))) |
| 2375 | (inputs |
| 2376 | `(("sdl" ,sdl2))) |
| 2377 | (home-page "http://icculus.org/smpeg/") |
| 2378 | (synopsis "SDL MPEG decoding library") |
| 2379 | (description |
| 2380 | "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library |
| 2381 | with sound support. Video playback is based on the ubiquitous Berkeley MPEG |
| 2382 | player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound |
| 2383 | library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video, |
| 2384 | and MPEG system streams.") |
| 2385 | (license (list license:expat |
| 2386 | license:lgpl2.1 |
| 2387 | license:lgpl2.1+ |
| 2388 | license:gpl2)))) |
| 2389 | |
| 2390 | (define-public libbdplus |
| 2391 | (package |
| 2392 | (name "libbdplus") |
| 2393 | (version "0.1.2") |
| 2394 | (source |
| 2395 | (origin |
| 2396 | (method url-fetch) |
| 2397 | (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/" |
| 2398 | version "/" name "-" version ".tar.bz2")) |
| 2399 | (sha256 |
| 2400 | (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6")))) |
| 2401 | (inputs |
| 2402 | `(("libgcrypt" ,libgcrypt))) |
| 2403 | (build-system gnu-build-system) |
| 2404 | (home-page "https://www.videolan.org/developers/libbdplus.html") |
| 2405 | (synopsis "Library for decrypting certain Blu-Ray discs") |
| 2406 | (description "libbdplus is a library which implements the BD+ System |
| 2407 | specifications.") |
| 2408 | (license license:lgpl2.1+))) |
| 2409 | |
| 2410 | (define-public libaacs |
| 2411 | (package |
| 2412 | (name "libaacs") |
| 2413 | (version "0.9.0") |
| 2414 | (source |
| 2415 | (origin |
| 2416 | (method url-fetch) |
| 2417 | (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/" |
| 2418 | version "/" name "-" version ".tar.bz2")) |
| 2419 | (sha256 |
| 2420 | (base32 "1kms92i0c7i1yl659kqjf19lm8172pnpik5lsxp19xphr74vvq27")))) |
| 2421 | (inputs |
| 2422 | `(("libgcrypt" ,libgcrypt))) |
| 2423 | (native-inputs |
| 2424 | `(("bison" ,bison) |
| 2425 | ("flex" ,flex))) |
| 2426 | (build-system gnu-build-system) |
| 2427 | (home-page "https://www.videolan.org/developers/libaacs.html") |
| 2428 | (synopsis "Library for decrypting certain Blu-Ray discs") |
| 2429 | (description "libaacs is a library which implements the Advanced Access |
| 2430 | Content System specification.") |
| 2431 | (license license:lgpl2.1+))) |
| 2432 | |
| 2433 | (define-public mps-youtube |
| 2434 | (package |
| 2435 | (name "mps-youtube") |
| 2436 | (version "0.2.8") |
| 2437 | (source |
| 2438 | (origin |
| 2439 | (method git-fetch) |
| 2440 | (uri (git-reference |
| 2441 | (url "https://github.com/mps-youtube/mps-youtube.git") |
| 2442 | (commit (string-append "v" version)))) |
| 2443 | (file-name (git-file-name name version)) |
| 2444 | (sha256 |
| 2445 | (base32 |
| 2446 | "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y")))) |
| 2447 | (build-system python-build-system) |
| 2448 | (arguments |
| 2449 | ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the |
| 2450 | ;; test suite results differ depending on the country and also introduce |
| 2451 | ;; non-determinism in the tests. |
| 2452 | ;; https://github.com/mps-youtube/mps-youtube/issues/556 |
| 2453 | `(#:tests? #f)) |
| 2454 | (propagated-inputs |
| 2455 | `(("python-pafy" ,python-pafy) |
| 2456 | ("python-pygobject" ,python-pygobject))) ; For mpris2 support |
| 2457 | (home-page "https://github.com/mps-youtube/mps-youtube") |
| 2458 | (synopsis "Terminal based YouTube player and downloader") |
| 2459 | (description |
| 2460 | "@code{mps-youtube} is based on mps, a terminal based program to |
| 2461 | search, stream and download music. This implementation uses YouTube as |
| 2462 | a source of content and can play and download video as well as audio. |
| 2463 | It can use either mpv or mplayer for playback, and for conversion of |
| 2464 | formats ffmpeg or libav is used. Users should install one of the |
| 2465 | supported players in addition to this package.") |
| 2466 | (license license:gpl3+))) |
| 2467 | |
| 2468 | (define-public handbrake |
| 2469 | (package |
| 2470 | (name "handbrake") |
| 2471 | (version "1.1.2") |
| 2472 | (source (origin |
| 2473 | (method url-fetch) |
| 2474 | (uri (string-append "https://download.handbrake.fr/releases/" |
| 2475 | version "/HandBrake-" version "-source.tar.bz2")) |
| 2476 | (sha256 |
| 2477 | (base32 |
| 2478 | "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms")) |
| 2479 | (modules '((guix build utils))) |
| 2480 | (snippet |
| 2481 | ;; Remove "contrib" and source not necessary for |
| 2482 | ;; building/running under a GNU environment. |
| 2483 | '(begin |
| 2484 | (for-each delete-file-recursively |
| 2485 | '("contrib" "macosx" "win")) |
| 2486 | (substitute* "make/include/main.defs" |
| 2487 | ;; Disable unconditional inclusion of "contrib" libraries |
| 2488 | ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray), |
| 2489 | ;; which would lead to fetching and building of these |
| 2490 | ;; libraries. Use our own instead. |
| 2491 | (("MODULES \\+= contrib") "# MODULES += contrib")) |
| 2492 | #t)))) |
| 2493 | (build-system glib-or-gtk-build-system) |
| 2494 | (native-inputs |
| 2495 | `(("automake" ,automake) ;gui subpackage must be bootstrapped |
| 2496 | ("autoconf" ,autoconf) |
| 2497 | ("curl" ,curl) ;not actually used, but tested for |
| 2498 | ("intltool" ,intltool) |
| 2499 | ("libtool" ,libtool) |
| 2500 | ("pkg-config" ,pkg-config) |
| 2501 | ("python" ,python-2))) ;for configuration |
| 2502 | (inputs |
| 2503 | `(("bzip2" ,bzip2) |
| 2504 | ("dbus-glib" ,dbus-glib) |
| 2505 | ("ffmpeg" ,ffmpeg) |
| 2506 | ("fontconfig" ,fontconfig) |
| 2507 | ("freetype" ,freetype) |
| 2508 | ("glib" ,glib) |
| 2509 | ("gstreamer" ,gstreamer) |
| 2510 | ("gst-plugins-base" ,gst-plugins-base) |
| 2511 | ("gtk+" ,gtk+) |
| 2512 | ("jansson" ,jansson) |
| 2513 | ("lame" ,lame) |
| 2514 | ("libass" ,libass) |
| 2515 | ("libbluray" ,libbluray) |
| 2516 | ("libdvdnav" ,libdvdnav) |
| 2517 | ("libdvdread" ,libdvdread) |
| 2518 | ("libgudev" ,libgudev) |
| 2519 | ("libmpeg2" ,libmpeg2) |
| 2520 | ("libnotify" ,libnotify) |
| 2521 | ("libogg" ,libogg) |
| 2522 | ("libopus" ,opus) |
| 2523 | ("libsamplerate" ,libsamplerate) |
| 2524 | ("libtheora" ,libtheora) |
| 2525 | ("libvorbis" ,libvorbis) |
| 2526 | ("libvpx" ,libvpx) |
| 2527 | ("libxml2" ,libxml2) |
| 2528 | ("libx264" ,libx264) |
| 2529 | ("x265" ,x265) |
| 2530 | ("zlib" ,zlib))) |
| 2531 | (arguments |
| 2532 | `(#:tests? #f ;tests require Ruby and claim to be unsupported |
| 2533 | #:configure-flags |
| 2534 | (list (string-append "CPPFLAGS=-I" |
| 2535 | (assoc-ref %build-inputs "libxml2") |
| 2536 | "/include/libxml2") |
| 2537 | "LDFLAGS=-lx265") |
| 2538 | #:phases |
| 2539 | (modify-phases %standard-phases |
| 2540 | (replace 'bootstrap |
| 2541 | ;; Run bootstrap ahead of time so that shebangs get patched. |
| 2542 | (lambda _ |
| 2543 | (setenv "CONFIG_SHELL" (which "sh")) |
| 2544 | (setenv "NOCONFIGURE" "1") |
| 2545 | ;; Patch the Makefile so that it doesn't bootstrap again. |
| 2546 | (substitute* "gtk/module.rules" |
| 2547 | ((".*autogen\\.sh.*") "")) |
| 2548 | (invoke "sh" "./gtk/autogen.sh"))) |
| 2549 | (replace 'configure |
| 2550 | (lambda* (#:key outputs configure-flags #:allow-other-keys) |
| 2551 | ;; 'configure' is not an autoconf-generated script, and |
| 2552 | ;; errors on unrecognized arguments, |
| 2553 | ;; e.g. --enable-fast-install |
| 2554 | (let ((out (assoc-ref outputs "out"))) |
| 2555 | (apply invoke "./configure" |
| 2556 | (string-append "--prefix=" out) |
| 2557 | (or configure-flags '()))))) |
| 2558 | (add-after 'configure 'chdir-build |
| 2559 | (lambda _ (chdir "./build") #t))))) |
| 2560 | (home-page "https://handbrake.fr") |
| 2561 | (synopsis "Video transcoder") |
| 2562 | (description |
| 2563 | "HandBrake is a tool for converting video from any format to a selection |
| 2564 | of modern, widely supported codecs.") |
| 2565 | ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3. |
| 2566 | ;; Combination under GPLv2. See LICENSE. |
| 2567 | (license license:gpl2))) |
| 2568 | |
| 2569 | (define-public openh264 |
| 2570 | (package |
| 2571 | (name "openh264") |
| 2572 | (version "1.8.0") |
| 2573 | (source (origin |
| 2574 | (method url-fetch) |
| 2575 | (uri (string-append "https://github.com/cisco/" |
| 2576 | name "/releases/download/v" |
| 2577 | version "/Source.Code.tar.gz.gz")) |
| 2578 | (file-name (string-append name "-" version ".tar.gz")) |
| 2579 | (sha256 |
| 2580 | (base32 |
| 2581 | "0niha3wnn1jsndvz9vfwy2wyql8mp9j6v75vjsipy0idwan5yzgf")))) |
| 2582 | (build-system gnu-build-system) |
| 2583 | (native-inputs |
| 2584 | `(("nasm" ,nasm) |
| 2585 | ("python" ,python))) |
| 2586 | (arguments |
| 2587 | '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) |
| 2588 | "CC=gcc") |
| 2589 | #:test-target "test" |
| 2590 | #:phases (modify-phases %standard-phases |
| 2591 | ;; no configure script |
| 2592 | (delete 'configure)))) |
| 2593 | (home-page "http://www.openh264.org/") |
| 2594 | (synopsis "H264 decoder library") |
| 2595 | (description |
| 2596 | "Openh264 is a library which can decode H264 video streams.") |
| 2597 | (license license:bsd-2))) |
| 2598 | |
| 2599 | (define-public libmp4v2 |
| 2600 | (package |
| 2601 | (name "libmp4v2") |
| 2602 | (version "2.0.0") |
| 2603 | (source |
| 2604 | (origin |
| 2605 | (method url-fetch) |
| 2606 | ;; XXX: The new location of upstream is uncertain and will become relevant the |
| 2607 | ;; moment when the googlecode archive shuts down. It is past the date it |
| 2608 | ;; should've been turned off. I tried to communicate with upstream, but this |
| 2609 | ;; wasn't very responsive and not very helpful. The short summary is, it is |
| 2610 | ;; chaos when it comes to the amount of forks and only time will tell where |
| 2611 | ;; the new upstream location is. |
| 2612 | (uri (string-append "https://storage.googleapis.com/google-" |
| 2613 | "code-archive-downloads/v2/" |
| 2614 | "code.google.com/mp4v2/mp4v2-" version ".tar.bz2")) |
| 2615 | (file-name (string-append name "-" version ".tar.bz2")) |
| 2616 | (sha256 |
| 2617 | (base32 |
| 2618 | "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683")))) |
| 2619 | (build-system gnu-build-system) |
| 2620 | (outputs '("out" |
| 2621 | "static")) ; 3.7MiB .a file |
| 2622 | (arguments |
| 2623 | `(#:phases |
| 2624 | (modify-phases %standard-phases |
| 2625 | (add-after 'unpack 'remove-dates |
| 2626 | (lambda _ |
| 2627 | ;; Make the build reproducible. |
| 2628 | (substitute* "configure" |
| 2629 | (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"") |
| 2630 | (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\"")) |
| 2631 | #t)) |
| 2632 | (add-after 'install 'move-static-libraries |
| 2633 | (lambda* (#:key outputs #:allow-other-keys) |
| 2634 | ;; Move static libraries to the "static" output. |
| 2635 | (let* ((out (assoc-ref outputs "out")) |
| 2636 | (lib (string-append out "/lib")) |
| 2637 | (static (assoc-ref outputs "static")) |
| 2638 | (slib (string-append static "/lib"))) |
| 2639 | (mkdir-p slib) |
| 2640 | (for-each (lambda (file) |
| 2641 | (install-file file slib) |
| 2642 | (delete-file file)) |
| 2643 | (find-files lib "\\.a$")) |
| 2644 | #t)))))) |
| 2645 | (native-inputs |
| 2646 | `(("help2man" ,help2man) |
| 2647 | ("dejagnu" ,dejagnu))) |
| 2648 | (home-page "https://code.google.com/archive/p/mp4v2/") |
| 2649 | (synopsis "API to create and modify mp4 files") |
| 2650 | (description |
| 2651 | "The MP4v2 library provides an API to create and modify mp4 files as defined by |
| 2652 | ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime |
| 2653 | file format that has been used as a multimedia file format in a variety of platforms and |
| 2654 | applications. It is a very powerful and extensible format that can accommodate |
| 2655 | practically any type of media.") |
| 2656 | (license license:mpl1.1))) |
| 2657 | |
| 2658 | (define-public libmediainfo |
| 2659 | (package |
| 2660 | (name "libmediainfo") |
| 2661 | (version "0.7.95") |
| 2662 | (source (origin |
| 2663 | (method url-fetch) |
| 2664 | (uri (string-append "https://mediaarea.net/download/source/" |
| 2665 | name "/" version"/" |
| 2666 | name "_" version ".tar.bz2")) |
| 2667 | (sha256 |
| 2668 | (base32 |
| 2669 | "1kchh6285b07z5nixv619hc9gml2ysdayicdiv30frrlqiyxqw4b")))) |
| 2670 | ;; TODO add a Big Buck Bunny webm for tests. |
| 2671 | (native-inputs |
| 2672 | `(("autoconf" ,autoconf) |
| 2673 | ("automake" ,automake) |
| 2674 | ("libtool" ,libtool) |
| 2675 | ("pkg-config" ,pkg-config) |
| 2676 | ("zlib" ,zlib) |
| 2677 | ("tinyxml2" ,tinyxml2) |
| 2678 | ("curl" ,curl) |
| 2679 | ("libzen" ,libzen))) |
| 2680 | (build-system gnu-build-system) |
| 2681 | (arguments |
| 2682 | '(#:tests? #f ; see above TODO |
| 2683 | #:phases |
| 2684 | ;; build scripts not in root of archive |
| 2685 | (modify-phases %standard-phases |
| 2686 | (add-after 'unpack 'change-to-build-dir |
| 2687 | (lambda _ |
| 2688 | (chdir "Project/GNU/Library") |
| 2689 | #t)) |
| 2690 | (add-after 'change-to-build-dir 'autogen |
| 2691 | (lambda _ |
| 2692 | (invoke "sh" "autogen.sh")))))) |
| 2693 | (home-page "https://mediaarea.net/en/MediaInfo") |
| 2694 | (synopsis "Library for retrieving media metadata") |
| 2695 | (description "MediaInfo is a library used for retrieving technical |
| 2696 | information and other metadata about audio or video files. A non-exhaustive |
| 2697 | list of the information MediaInfo can retrieve from media files include: |
| 2698 | |
| 2699 | @itemize |
| 2700 | @item General: title, author, director, album, track number, date, duration... |
| 2701 | @item Video: codec, aspect, fps, bitrate... |
| 2702 | @item Audio: codec, sample rate, channels, language, bitrate... |
| 2703 | @item Text: language of subtitle |
| 2704 | @item Chapters: number of chapters, list of chapters |
| 2705 | @end itemize |
| 2706 | |
| 2707 | MediaInfo supports the following formats: |
| 2708 | |
| 2709 | @itemize |
| 2710 | @item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, |
| 2711 | MPEG-2, MPEG-4, DVD (VOB)... |
| 2712 | @item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...) |
| 2713 | @item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF... |
| 2714 | @item Subtitles: SRT, SSA, ASS, SAMI... |
| 2715 | @end itemize\n") |
| 2716 | (license license:bsd-2))) |
| 2717 | |
| 2718 | ;; TODO also have a GUI version available |
| 2719 | (define-public mediainfo |
| 2720 | (package |
| 2721 | (name "mediainfo") |
| 2722 | (version "18.12") |
| 2723 | (source (origin |
| 2724 | (method url-fetch) |
| 2725 | ;; Warning: This source has proved unreliable 1 time at least. |
| 2726 | ;; Consider an alternate source or report upstream if this |
| 2727 | ;; happens again. |
| 2728 | (uri (string-append "https://mediaarea.net/download/source/" |
| 2729 | name "/" version "/" |
| 2730 | name "_" version ".tar.bz2")) |
| 2731 | (sha256 |
| 2732 | (base32 |
| 2733 | "1ix95ilcjlawcq6phh25cgplm3riqa2ii7ql82g8yagqs4ldqp6a")))) |
| 2734 | (native-inputs |
| 2735 | `(("autoconf" ,autoconf) |
| 2736 | ("automake" ,automake) |
| 2737 | ("libtool" ,libtool) |
| 2738 | ("pkg-config" ,pkg-config) |
| 2739 | ("zlib" ,zlib) |
| 2740 | ("libmediainfo" ,libmediainfo) |
| 2741 | ("libzen" ,libzen))) |
| 2742 | (build-system gnu-build-system) |
| 2743 | (arguments |
| 2744 | '(#:tests? #f ; lacks tests |
| 2745 | #:phases |
| 2746 | ;; build scripts not in root of archive |
| 2747 | (modify-phases %standard-phases |
| 2748 | (add-after 'unpack 'change-to-build-dir |
| 2749 | (lambda _ |
| 2750 | (chdir "Project/GNU/CLI") |
| 2751 | #t))))) |
| 2752 | (home-page "https://mediaarea.net/en/MediaInfo") |
| 2753 | (synopsis "Utility for reading media metadata") |
| 2754 | (description "MediaInfo is a utility used for retrieving technical |
| 2755 | information and other metadata about audio or video files. It supports the |
| 2756 | many codecs and formats supported by libmediainfo.") |
| 2757 | (license license:bsd-2))) |
| 2758 | |
| 2759 | (define-public livemedia-utils |
| 2760 | (package |
| 2761 | (name "livemedia-utils") |
| 2762 | (version "2018.10.17") |
| 2763 | (source (origin |
| 2764 | (method url-fetch) |
| 2765 | (uri (string-append |
| 2766 | "https://download.videolan.org/contrib/live555/live." |
| 2767 | version ".tar.gz")) |
| 2768 | (sha256 |
| 2769 | (base32 |
| 2770 | "1s69ipvdc6ldscp0cr1zpsll8xc3qcagr95nl84x7b1rbg4xjs3w")) |
| 2771 | (modules '((guix build utils))) |
| 2772 | (snippet '(begin |
| 2773 | ;; As of glibc 2.26, <xlocale.h> no longer is. |
| 2774 | (substitute* "liveMedia/include/Locale.hh" |
| 2775 | (("xlocale\\.h") "locale.h")) |
| 2776 | #t)))) |
| 2777 | (build-system gnu-build-system) |
| 2778 | (arguments |
| 2779 | '(#:tests? #f ; no tests |
| 2780 | #:make-flags (list "CC=gcc" |
| 2781 | (string-append "LDFLAGS=-Wl,-rpath=" |
| 2782 | (assoc-ref %outputs "out") "/lib") |
| 2783 | (string-append "PREFIX=" |
| 2784 | (assoc-ref %outputs "out"))) |
| 2785 | #:phases (modify-phases %standard-phases |
| 2786 | (add-before 'configure 'fix-makefiles-generation |
| 2787 | (lambda _ |
| 2788 | (substitute* "genMakefiles" |
| 2789 | (("/bin/rm") "rm")) |
| 2790 | #t)) |
| 2791 | (replace 'configure |
| 2792 | (lambda _ |
| 2793 | (invoke "./genMakefiles" |
| 2794 | "linux-with-shared-libraries")))))) |
| 2795 | (home-page "http://www.live555.com/liveMedia/") |
| 2796 | (synopsis "Set of C++ libraries for multimedia streaming") |
| 2797 | (description "This code forms a set of C++ libraries for multimedia |
| 2798 | streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries |
| 2799 | can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or |
| 2800 | JPEG video, and several audio codecs. They can easily be extended to support |
| 2801 | additional (audio and/or video) codecs, and can also be used to build basic |
| 2802 | RTSP or SIP clients and servers.") |
| 2803 | (license license:lgpl3+))) |
| 2804 | |
| 2805 | (define-public libdvbpsi |
| 2806 | (package |
| 2807 | (name "libdvbpsi") |
| 2808 | (version "1.3.2") |
| 2809 | (source (origin |
| 2810 | (method url-fetch) |
| 2811 | (uri (string-append |
| 2812 | "https://download.videolan.org/pub/libdvbpsi/" |
| 2813 | version "/libdvbpsi-" version ".tar.bz2")) |
| 2814 | (sha256 |
| 2815 | (base32 |
| 2816 | "1zn5hfv4qbahmydbwh59a3b480s3m5ss27r6ml35gqdip7r3jkmc")))) |
| 2817 | (build-system gnu-build-system) |
| 2818 | (home-page "https://www.videolan.org/developers/libdvbpsi.html") |
| 2819 | (synopsis "Library for decoding and generation of MPEG TS and DVB PSI |
| 2820 | tables") |
| 2821 | (description "libdvbpsi is a simple library designed for decoding and |
| 2822 | generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s |
| 2823 | and ITU-T H.222.0.") |
| 2824 | (license license:lgpl2.1))) |
| 2825 | |
| 2826 | (define-public ffms2 |
| 2827 | (package |
| 2828 | (name "ffms2") |
| 2829 | (version "2.23") |
| 2830 | (home-page "https://github.com/FFMS/ffms2") |
| 2831 | (source (origin |
| 2832 | (method git-fetch) |
| 2833 | (uri (git-reference |
| 2834 | (url "https://github.com/FFMS/ffms2.git") |
| 2835 | (commit version))) |
| 2836 | (file-name (git-file-name name version)) |
| 2837 | (sha256 |
| 2838 | (base32 |
| 2839 | "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5")))) |
| 2840 | (build-system gnu-build-system) |
| 2841 | (arguments |
| 2842 | '(#:configure-flags |
| 2843 | (list "--enable-avresample"))) |
| 2844 | (inputs |
| 2845 | `(("zlib" ,zlib))) |
| 2846 | (propagated-inputs |
| 2847 | `(("ffmpeg" ,ffmpeg))) |
| 2848 | (native-inputs |
| 2849 | `(("pkg-config" ,pkg-config))) |
| 2850 | (synopsis "Cross-platform wrapper around ffmpeg/libav") |
| 2851 | (description |
| 2852 | "FFMpegSource is a wrapper library around ffmpeg/libav that allows |
| 2853 | programmers to access a standard API to open and decompress media files.") |
| 2854 | ;; sources are distributed under a different license that the binary. |
| 2855 | ;; see https://github.com/FFMS/ffms2/blob/master/COPYING |
| 2856 | (license license:gpl2+))); inherits from ffmpeg |
| 2857 | |
| 2858 | (define-public aegisub |
| 2859 | (package |
| 2860 | (name "aegisub") |
| 2861 | (version "3.2.2") |
| 2862 | (source (origin |
| 2863 | (method url-fetch) |
| 2864 | (uri (string-append |
| 2865 | "http://ftp.aegisub.org/pub/archives/releases/source/" |
| 2866 | name "-" version ".tar.xz")) |
| 2867 | (sha256 |
| 2868 | (base32 |
| 2869 | "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5")) |
| 2870 | (patches (search-patches "aegisub-icu59-include-unistr.patch" |
| 2871 | "aegisub-boost68.patch")))) |
| 2872 | (build-system gnu-build-system) |
| 2873 | (arguments |
| 2874 | `(#:configure-flags |
| 2875 | (list "--disable-update-checker" |
| 2876 | "--without-portaudio" |
| 2877 | "--without-openal" |
| 2878 | "--without-oss" |
| 2879 | "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1") |
| 2880 | ;; tests require busted, a lua package we don't have yet |
| 2881 | #:tests? #f |
| 2882 | #:phases |
| 2883 | (modify-phases %standard-phases |
| 2884 | (add-before 'configure 'fix-ldflags |
| 2885 | (lambda _ |
| 2886 | (setenv "LDFLAGS" "-pthread") |
| 2887 | #t)) |
| 2888 | (add-after 'unpack 'fix-boost-headers |
| 2889 | (lambda _ |
| 2890 | (substitute* |
| 2891 | '("src/subtitles_provider_libass.cpp" |
| 2892 | "src/colour_button.cpp" |
| 2893 | "src/video_provider_dummy.cpp" |
| 2894 | "./src/video_frame.cpp") |
| 2895 | (("#include <boost/gil/gil_all.hpp>") |
| 2896 | "#include <boost/gil.hpp>")) |
| 2897 | #t))))) |
| 2898 | (inputs |
| 2899 | `(("boost" ,boost) |
| 2900 | ("desktop-file-utils" ,desktop-file-utils) |
| 2901 | ("ffms2" ,ffms2) |
| 2902 | ("fftw" ,fftw) |
| 2903 | ("hunspell" ,hunspell) |
| 2904 | ("mesa" ,mesa) |
| 2905 | ("libass" ,libass) |
| 2906 | ("alsa-lib" ,alsa-lib) |
| 2907 | ("pulseaudio" ,pulseaudio) |
| 2908 | ("libx11" ,libx11) |
| 2909 | ("freetype" ,freetype) |
| 2910 | ("wxwidgets-gtk2" ,wxwidgets-gtk2))) |
| 2911 | (native-inputs |
| 2912 | `(("intltool" ,intltool) |
| 2913 | ("pkg-config" ,pkg-config))) |
| 2914 | (home-page "http://www.aegisub.org/") |
| 2915 | (synopsis "Subtitle engine") |
| 2916 | (description |
| 2917 | "Aegisub is a tool for creating and modifying subtitles. Aegisub makes |
| 2918 | it quick and easy to time subtitles to audio, and features many powerful |
| 2919 | tools for styling them, including a built-in real-time video preview.") |
| 2920 | (license (list license:bsd-3 ; the package is licensed under the bsd-3, except |
| 2921 | license:mpl1.1 ; for vendor/universalchardet under the mpl1.1 |
| 2922 | license:expat)))) ; and src/gl that is under a license similar |
| 2923 | ; the the Expat license, with a rewording (Software -> Materials). (called MIT |
| 2924 | ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE |
| 2925 | ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author |
| 2926 | |
| 2927 | (define-public gst-transcoder |
| 2928 | (package |
| 2929 | (name "gst-transcoder") |
| 2930 | (version "1.12.2") |
| 2931 | (source |
| 2932 | (origin |
| 2933 | (method git-fetch) |
| 2934 | (uri (git-reference |
| 2935 | (url "https://github.com/pitivi/gst-transcoder.git") |
| 2936 | (commit version))) |
| 2937 | (file-name (git-file-name name version)) |
| 2938 | (sha256 |
| 2939 | (base32 |
| 2940 | "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az")))) |
| 2941 | (build-system meson-build-system) |
| 2942 | (inputs |
| 2943 | `(("gobject-introspection" ,gobject-introspection) |
| 2944 | ("glib" ,glib) |
| 2945 | ("gstreamer" ,gstreamer) |
| 2946 | ("gst-plugins-base" ,gst-plugins-base))) |
| 2947 | (native-inputs |
| 2948 | `(("python" ,python) |
| 2949 | ("pkg-config" ,pkg-config))) |
| 2950 | (home-page "https://github.com/pitivi/gst-transcoder/") |
| 2951 | (synopsis "GStreamer Transcoding API") |
| 2952 | (description "GStreamer Transcoding API") |
| 2953 | (license license:lgpl2.1))) |
| 2954 | |
| 2955 | (define-public gavl |
| 2956 | (package |
| 2957 | (name "gavl") |
| 2958 | (version "1.4.0") |
| 2959 | (source |
| 2960 | (origin |
| 2961 | (method url-fetch) |
| 2962 | (uri (string-append "mirror://sourceforge/gmerlin/" |
| 2963 | name "/" version "/" |
| 2964 | name "-" version ".tar.gz")) |
| 2965 | (file-name (string-append name "-" version ".tar.gz")) |
| 2966 | (sha256 |
| 2967 | (base32 |
| 2968 | "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji")))) |
| 2969 | (build-system gnu-build-system) |
| 2970 | (arguments |
| 2971 | '(#:configure-flags '("LIBS=-lm"))) |
| 2972 | (native-inputs |
| 2973 | `(("pkg-config" ,pkg-config) |
| 2974 | ("doxygen" ,doxygen))) |
| 2975 | (home-page "http://gmerlin.sourceforge.net") |
| 2976 | (synopsis "Low level library for multimedia API building") |
| 2977 | (description |
| 2978 | "Gavl is short for Gmerlin Audio Video Library. It is a low level |
| 2979 | library, upon which multimedia APIs can be built. Gavl handles all the |
| 2980 | details of audio and video formats like colorspaces, sample rates, |
| 2981 | multichannel configurations, etc. It provides standardized definitions for |
| 2982 | those formats as well as container structures for carrying audio samples or |
| 2983 | video images inside an application. |
| 2984 | |
| 2985 | In addition, it handles the sometimes ugly task of converting between all |
| 2986 | these formats and provides some elementary operations (copying, scaling, |
| 2987 | alpha blending etc).") |
| 2988 | (license license:gpl3))) |
| 2989 | |
| 2990 | (define-public frei0r-plugins |
| 2991 | (package |
| 2992 | (name "frei0r-plugins") |
| 2993 | (version "1.6.1") |
| 2994 | (source |
| 2995 | (origin |
| 2996 | (method url-fetch) |
| 2997 | (uri (string-append "https://files.dyne.org/frei0r/" |
| 2998 | "frei0r-plugins-" version ".tar.gz")) |
| 2999 | (sha256 |
| 3000 | (base32 |
| 3001 | "0pji26fpd0dqrx1akyhqi6729s394irl73dacnyxk58ijqq4dhp0")))) |
| 3002 | (build-system gnu-build-system) |
| 3003 | (arguments |
| 3004 | `(#:phases |
| 3005 | (modify-phases %standard-phases |
| 3006 | (add-after 'unpack 'autotools |
| 3007 | (lambda _ |
| 3008 | (invoke "sh" "autogen.sh")))))) |
| 3009 | ;; TODO: opencv for additional face detection filters. |
| 3010 | (inputs |
| 3011 | `(("gavl" ,gavl) |
| 3012 | ("cairo" ,cairo))) |
| 3013 | (native-inputs |
| 3014 | `(("pkg-config" ,pkg-config) |
| 3015 | ("libtool" ,libtool) |
| 3016 | ("automake" ,automake) |
| 3017 | ("autoconf" ,autoconf))) |
| 3018 | (home-page "https://www.dyne.org/software/frei0r/") |
| 3019 | (synopsis "Minimalistic plugin API for video effects") |
| 3020 | (description |
| 3021 | "Frei0r is a minimalistic plugin API for video effects. |
| 3022 | The main emphasis is on simplicity for an API that will round up |
| 3023 | the most common video effects into simple filters, sources and |
| 3024 | mixers that can be controlled by parameters. Frei0r wants to |
| 3025 | provide a way to share these simple effects between many |
| 3026 | applications, avoiding their reimplementation by different projects. |
| 3027 | It counts more than 100 plugins.") |
| 3028 | (license (list license:gpl2+ |
| 3029 | ;; The following files are licensed as LGPL2.1+: |
| 3030 | ;; src/generator/ising0r/ising0r.c |
| 3031 | ;; src/generator/onecol0r/onecol0r.cpp |
| 3032 | ;; src/generator/nois0r/nois0r.cpp |
| 3033 | ;; src/generator/lissajous0r/lissajous0r.cpp |
| 3034 | ;; src/filter/ndvi/gradientlut.hpp |
| 3035 | ;; src/filter/ndvi/ndvi.cpp |
| 3036 | ;; src/filter/facedetect/facedetect.cpp |
| 3037 | license:lgpl2.1+)))) |
| 3038 | |
| 3039 | (define-public motion |
| 3040 | (package |
| 3041 | (name "motion") |
| 3042 | (version "4.2.2") |
| 3043 | (home-page "https://motion-project.github.io/") |
| 3044 | (source (origin |
| 3045 | (method git-fetch) |
| 3046 | (uri (git-reference |
| 3047 | (url "https://github.com/Motion-Project/motion.git") |
| 3048 | (commit (string-append "release-" version)))) |
| 3049 | (sha256 |
| 3050 | (base32 |
| 3051 | "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f")) |
| 3052 | (file-name (git-file-name name version)))) |
| 3053 | (build-system gnu-build-system) |
| 3054 | (native-inputs |
| 3055 | `(("autoconf" ,autoconf-wrapper) |
| 3056 | ("automake" ,automake) |
| 3057 | ("gettext" ,gettext-minimal) |
| 3058 | ("pkg-config" ,pkg-config))) |
| 3059 | (inputs |
| 3060 | `(("libjpeg" ,libjpeg) |
| 3061 | ("ffmpeg" ,ffmpeg-3.4) |
| 3062 | ("libmicrohttpd" ,libmicrohttpd) |
| 3063 | ("sqlite" ,sqlite))) |
| 3064 | (arguments |
| 3065 | '(#:phases (modify-phases %standard-phases |
| 3066 | (replace 'bootstrap |
| 3067 | (lambda _ |
| 3068 | (patch-shebang "version.sh") |
| 3069 | (invoke "autoreconf" "-vfi")))) |
| 3070 | #:configure-flags '("--sysconfdir=/etc") |
| 3071 | #:make-flags (list (string-append "sysconfdir=" |
| 3072 | (assoc-ref %outputs "out") |
| 3073 | "/etc")) |
| 3074 | |
| 3075 | #:tests? #f)) ; no 'check' target |
| 3076 | (synopsis "Detect motion from video signals") |
| 3077 | (description |
| 3078 | "Motion is a program that monitors the video signal from one or more |
| 3079 | cameras and is able to detect if a significant part of the picture has |
| 3080 | changed. Or in other words, it can detect motion.") |
| 3081 | |
| 3082 | ;; Some files say "version 2" and others "version 2 or later". |
| 3083 | (license license:gpl2))) |
| 3084 | |
| 3085 | (define-public subdl |
| 3086 | (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471") |
| 3087 | (revision "1")) |
| 3088 | (package |
| 3089 | (name "subdl") |
| 3090 | (version (git-version "1.0.3" revision commit)) |
| 3091 | (source (origin |
| 3092 | (method git-fetch) |
| 3093 | (uri (git-reference |
| 3094 | (url "https://github.com/alexanderwink/subdl.git") |
| 3095 | (commit commit))) |
| 3096 | (file-name (git-file-name name version)) |
| 3097 | (sha256 |
| 3098 | (base32 |
| 3099 | "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8")))) |
| 3100 | (build-system trivial-build-system) |
| 3101 | (arguments |
| 3102 | `(#:modules ((guix build utils)) |
| 3103 | #:builder (begin |
| 3104 | (use-modules (guix build utils)) |
| 3105 | (let* ((out (assoc-ref %outputs "out")) |
| 3106 | (bin (string-append out "/bin")) |
| 3107 | (source (assoc-ref %build-inputs "source")) |
| 3108 | (python (assoc-ref %build-inputs "python"))) |
| 3109 | (install-file (string-append source "/subdl") bin) |
| 3110 | (patch-shebang (string-append bin "/subdl") |
| 3111 | (list (string-append python "/bin"))))))) |
| 3112 | (inputs `(("python" ,python))) |
| 3113 | (synopsis "Command-line tool for downloading subtitles from opensubtitles.org") |
| 3114 | (description "Subdl is a command-line tool for downloading subtitles from |
| 3115 | opensubtitles.org. By default, it will search for English subtitles, display |
| 3116 | the results, download the highest-rated result in the requested language and |
| 3117 | save it to the appropriate filename.") |
| 3118 | (license license:gpl3+) |
| 3119 | (home-page "https://github.com/alexanderwink/subdl")))) |
| 3120 | |
| 3121 | (define-public l-smash |
| 3122 | (package |
| 3123 | (name "l-smash") |
| 3124 | (version "2.14.5") |
| 3125 | (source (origin |
| 3126 | (method git-fetch) |
| 3127 | (uri (git-reference |
| 3128 | (url "https://github.com/l-smash/l-smash.git") |
| 3129 | (commit (string-append "v" version)))) |
| 3130 | (file-name (git-file-name name version)) |
| 3131 | (sha256 |
| 3132 | (base32 |
| 3133 | "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02")))) |
| 3134 | (build-system gnu-build-system) |
| 3135 | (arguments |
| 3136 | `(#:tests? #f ;no tests |
| 3137 | #:make-flags |
| 3138 | (list (string-append "LDFLAGS=-Wl,-L.,-rpath=" |
| 3139 | (assoc-ref %outputs "out") "/lib")) |
| 3140 | #:phases |
| 3141 | (modify-phases %standard-phases |
| 3142 | ;; configure fails if it is followed by CONFIG_SHELL |
| 3143 | (replace 'configure |
| 3144 | (lambda* (#:key outputs #:allow-other-keys) |
| 3145 | (let ((out (assoc-ref outputs "out"))) |
| 3146 | (invoke "./configure" (string-append "--prefix=" out) |
| 3147 | "--disable-static"))))))) |
| 3148 | (native-inputs |
| 3149 | `(("which" ,which))) |
| 3150 | (home-page "https://l-smash.github.io/l-smash/") |
| 3151 | (synopsis "MP4 multiplexer and demultiplexer library") |
| 3152 | (description |
| 3153 | "L-SMASH is a cross-platform library that handles the ISO base media file |
| 3154 | format and some of its derived file formats, including MP4. It operates as a |
| 3155 | multiplexer and demultiplexer, and can mux video and audio in several formats |
| 3156 | using standalone executable files.") |
| 3157 | (license license:isc))) |
| 3158 | |
| 3159 | (define-public qtfaststart |
| 3160 | (package |
| 3161 | (name "qtfaststart") |
| 3162 | (version "1.8") |
| 3163 | (source (origin |
| 3164 | (method url-fetch) |
| 3165 | (uri (pypi-uri "qtfaststart" version)) |
| 3166 | (sha256 |
| 3167 | (base32 |
| 3168 | "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h")))) |
| 3169 | (build-system python-build-system) |
| 3170 | (arguments |
| 3171 | '(#:tests? #f)) ; no test suite |
| 3172 | (synopsis "Move QuickTime and MP4 metadata to the beginning of the file") |
| 3173 | (description "qtfaststart enables streaming and pseudo-streaming of |
| 3174 | QuickTime and MP4 files by moving metadata and offset information to the |
| 3175 | beginning of the file. It can also print some useful information about the |
| 3176 | structure of the file. This program is based on qt-faststart.c from the FFmpeg |
| 3177 | project, which is released into the public domain, as well as ISO 14496-12:2005 |
| 3178 | (the official spec for MP4), which can be obtained from the ISO or found |
| 3179 | online.") |
| 3180 | (home-page "https://github.com/danielgtaylor/qtfaststart") |
| 3181 | (license license:expat))) |
| 3182 | |
| 3183 | (define-public vidstab |
| 3184 | (package |
| 3185 | (name "vidstab") |
| 3186 | (version "1.1.0") |
| 3187 | (source (origin |
| 3188 | (method git-fetch) |
| 3189 | (uri (git-reference |
| 3190 | (url "https://github.com/georgmartius/vid.stab.git") |
| 3191 | (commit (string-append "v" version)))) |
| 3192 | (file-name (git-file-name name version)) |
| 3193 | (sha256 |
| 3194 | (base32 |
| 3195 | "0a3frpm2kdbx7vszhg64p3alisag73bcspl7fp3a2f1kgq7rbh38")))) |
| 3196 | (build-system cmake-build-system) |
| 3197 | (arguments |
| 3198 | '(#:tests? #f)) ; tests are not run as part of standard build process |
| 3199 | (home-page "http://public.hronopik.de/vid.stab/") |
| 3200 | (synopsis "Video stabilization library") |
| 3201 | (description "Vidstab is a video stabilization library which can be used |
| 3202 | with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a |
| 3203 | vehicle typically suffers from undesirable shakes and jitters. Activities such |
| 3204 | as surfing, skiing, riding and walking while shooting videos are especially |
| 3205 | prone to erratic camera shakes. Vidstab targets these video contents to help |
| 3206 | create smoother and stable videos.") |
| 3207 | (license license:gpl2+))) |
| 3208 | |
| 3209 | (define-public libopenshot |
| 3210 | (package |
| 3211 | (name "libopenshot") |
| 3212 | (version "0.2.2") |
| 3213 | (source (origin |
| 3214 | (method git-fetch) |
| 3215 | (uri (git-reference |
| 3216 | (url "https://github.com/OpenShot/libopenshot") |
| 3217 | (commit (string-append "v" version)))) |
| 3218 | (file-name (git-file-name name version)) |
| 3219 | (sha256 |
| 3220 | (base32 |
| 3221 | "1x4kv05pdq1pglb6y056aa7llc6iyibyhzg93k7zwj0q08cp5ixd")) |
| 3222 | (modules '((guix build utils))) |
| 3223 | (snippet '(begin |
| 3224 | ;; Allow overriding of the python installation dir |
| 3225 | (substitute* "src/bindings/python/CMakeLists.txt" |
| 3226 | (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set) |
| 3227 | (string-append set " CACHE PATH " |
| 3228 | "\"Python bindings directory\")"))) |
| 3229 | (delete-file-recursively "thirdparty") |
| 3230 | #t)) |
| 3231 | (patches (search-patches "libopenshot-fixup-tests.patch" |
| 3232 | "libopenshot-tests-with-system-libs.patch")))) |
| 3233 | (build-system cmake-build-system) |
| 3234 | (native-inputs |
| 3235 | `(("pkg-config" ,pkg-config) |
| 3236 | ("python" ,python) |
| 3237 | ("swig" ,swig) |
| 3238 | ("unittest++" ,unittest-cpp))) |
| 3239 | (propagated-inputs ;all referenced in installed headers |
| 3240 | `(("cppzmq" ,cppzmq) |
| 3241 | ("ffmpeg" ,ffmpeg) |
| 3242 | ("imagemagick" ,imagemagick) |
| 3243 | ("jsoncpp" ,jsoncpp) |
| 3244 | ("libopenshot-audio" ,libopenshot-audio) |
| 3245 | ("qtbase" ,qtbase) |
| 3246 | ("qtmultimedia" ,qtmultimedia) |
| 3247 | ("zeromq" ,zeromq))) |
| 3248 | (arguments |
| 3249 | `(#:configure-flags |
| 3250 | (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python" |
| 3251 | ,(version-major+minor (package-version python)) |
| 3252 | "/site-packages") |
| 3253 | "-DUSE_SYSTEM_JSONCPP:BOOL=ON") |
| 3254 | #:phases |
| 3255 | (modify-phases %standard-phases |
| 3256 | (add-before 'configure 'set-vars |
| 3257 | (lambda* (#:key inputs #:allow-other-keys) |
| 3258 | (setenv "LIBOPENSHOT_AUDIO_DIR" |
| 3259 | (assoc-ref inputs "libopenshot-audio")) |
| 3260 | (setenv "ZMQDIR" |
| 3261 | (assoc-ref inputs "zeromq")) |
| 3262 | (setenv "UNITTEST_DIR" |
| 3263 | (string-append (assoc-ref inputs "unittest++") |
| 3264 | "/include/UnitTest++")) |
| 3265 | #t))))) |
| 3266 | (home-page "https://openshot.org") |
| 3267 | (synopsis "Video-editing, animation, and playback library") |
| 3268 | (description "OpenShot Library (libopenshot) is a powerful C++ video |
| 3269 | editing library with a multi-threaded and feature rich video editing |
| 3270 | API. It includes bindings for Python, Ruby, and other languages.") |
| 3271 | (license license:lgpl3+))) |
| 3272 | |
| 3273 | (define-public openshot |
| 3274 | (package |
| 3275 | (name "openshot") |
| 3276 | (version "2.4.3") |
| 3277 | (source (origin |
| 3278 | (method git-fetch) |
| 3279 | (uri (git-reference |
| 3280 | (url "https://github.com/OpenShot/openshot-qt") |
| 3281 | (commit (string-append "v" version)))) |
| 3282 | (file-name (git-file-name name version)) |
| 3283 | (sha256 |
| 3284 | (base32 |
| 3285 | "1qdw1mli4y9qhrnllnkaf6ydgw5vfvdb90chs4i679k0x0jyb9a2")))) |
| 3286 | (build-system python-build-system) |
| 3287 | (inputs |
| 3288 | `(("ffmpeg" ,ffmpeg) |
| 3289 | ("libopenshot" ,libopenshot) |
| 3290 | ("python" ,python) |
| 3291 | ("python-pyqt" ,python-pyqt) |
| 3292 | ("python-pyzmq" ,python-pyzmq) |
| 3293 | ("python-requests" ,python-requests) |
| 3294 | ("qtsvg" ,qtsvg))) |
| 3295 | (arguments |
| 3296 | `(#:tests? #f ;no tests |
| 3297 | #:phases (modify-phases %standard-phases |
| 3298 | (delete 'build) ;install phase does all the work |
| 3299 | (add-before 'install 'set-tmp-home |
| 3300 | (lambda _ |
| 3301 | ;; src/classes/info.py "needs" to create several |
| 3302 | ;; directories in $HOME when loaded during build |
| 3303 | (setenv "HOME" "/tmp") |
| 3304 | #t)) |
| 3305 | (add-after 'install 'wrap-program |
| 3306 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 3307 | (wrap-program (string-append (assoc-ref outputs "out") |
| 3308 | "/bin/openshot-qt") |
| 3309 | `("QT_PLUGIN_PATH" prefix |
| 3310 | ,(list (string-append (assoc-ref inputs "qtsvg") |
| 3311 | "/lib/qt5/plugins/"))))))))) |
| 3312 | (home-page "https://openshot.org") |
| 3313 | (synopsis "Video editor") |
| 3314 | (description "OpenShot takes your videos, photos, and music files and |
| 3315 | helps you create the film you have always dreamed of. Easily add sub-titles, |
| 3316 | transitions, and effects and then export your film to many common formats.") |
| 3317 | (license license:gpl3+))) |
| 3318 | |
| 3319 | (define-public dav1d |
| 3320 | (package |
| 3321 | (name "dav1d") |
| 3322 | (version "0.2.0") |
| 3323 | (source |
| 3324 | (origin |
| 3325 | (method url-fetch) |
| 3326 | (uri (list ;; The canonical download site |
| 3327 | (string-append "https://downloads.videolan.org/pub/videolan/" |
| 3328 | "dav1d/" version "/dav1d-" version ".tar.xz") |
| 3329 | |
| 3330 | ;; Auto-generated tarballs from the Git repo? |
| 3331 | (string-append "https://code.videolan.org/videolan/dav1d/-/" |
| 3332 | "archive/" version "/dav1d-" version ".tar.bz2"))) |
| 3333 | (sha256 |
| 3334 | (base32 |
| 3335 | "0q0dbbl91syjnkygz268gh4b7mdcgl6hldj300a4cbqidsadpl5p")))) |
| 3336 | (build-system meson-build-system) |
| 3337 | (native-inputs `(("nasm" ,nasm))) |
| 3338 | (home-page "https://code.videolan.org/videolan/dav1d") |
| 3339 | (synopsis "AV1 decoder") |
| 3340 | (description "dav1d is a new AV1 cross-platform decoder, and focused on |
| 3341 | speed and correctness.") |
| 3342 | (license license:bsd-2))) |
| 3343 | |
| 3344 | (define-public wlstream |
| 3345 | (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838") |
| 3346 | (revision "1")) |
| 3347 | (package |
| 3348 | (name "wlstream") |
| 3349 | (version (git-version "0.0" revision commit)) |
| 3350 | (source |
| 3351 | (origin |
| 3352 | (method git-fetch) |
| 3353 | (uri (git-reference |
| 3354 | (url "https://github.com/atomnuker/wlstream.git") |
| 3355 | (commit commit))) |
| 3356 | (file-name (git-file-name name version)) |
| 3357 | (sha256 |
| 3358 | (base32 |
| 3359 | "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp")))) |
| 3360 | (build-system meson-build-system) |
| 3361 | (native-inputs `(("libdrm" ,libdrm) |
| 3362 | ("pkg-config" ,pkg-config))) |
| 3363 | (inputs `(("ffmpeg" ,ffmpeg) |
| 3364 | ("pulseaudio" ,pulseaudio) |
| 3365 | ("wayland" ,wayland) |
| 3366 | ("wayland-protocols" ,wayland-protocols))) |
| 3367 | (home-page "https://github.com/atomnuker/wlstream") |
| 3368 | (synopsis "Screen capture tool for Wayland sessions") |
| 3369 | (description "Wlstream is a screen capture tool for recording audio and |
| 3370 | video from a Wayland session.") |
| 3371 | (license license:lgpl2.1+)))) |