gnu: Remove duplicate libde265.
[jackhill/guix/guix.git] / gnu / packages / video.scm
CommitLineData
39efcc9b 1;;; GNU Guix --- Functional package management for GNU
71ee51a0 2;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
945d985a 3;;; Copyright © 2014, 2015, 2016 David Thompson <davet@gnu.org>
76277052 4;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
cda163cd 5;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
954b4c73 6;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
12f92e38 7;;; Copyright © 2015 Andy Patterson <ajpatter@uwaterloo.ca>
d4f86c8b 8;;; Copyright © 2015, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
28cbf65c 9;;; Copyright © 2015, 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
2b841707 10;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
3c8ba11a 11;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
ed6ba9cc 12;;; Copyright © 2016 Dmitry Nikolaev <cameltheman@gmail.com>
4df07622 13;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
3c986a7d 14;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
adff7395 15;;; Copyright © 2016, 2018, 2019, 2020 Eric Bavier <bavier@posteo.net>
590abe01 16;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
72fa6667 17;;; Copyright © 2017 Feng Shu <tumashu@163.com>
1aab0332 18;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
794223bc 19;;; Copyright © 2017 Chris Marusich <cmmarusich@gmail.com>
b5b20bda 20;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
e0c40707 21;;; Copyright © 2017 Ethan R. Jones <doubleplusgood23@gmail.com>
eb88e2c1 22;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
2973ebf5 23;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
394207c1 24;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
e21f3473 25;;; Copyright © 2018 Roel Janssen <roel@gnu.org>
c0fe2e1f 26;;; Copyright © 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
68c858de 27;;; Copyright © 2018, 2019, 2020 Pierre Neidhardt <mail@ambrevar.xyz>
554f5b62 28;;; Copyright © 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
dcfa0acd 29;;; Copyright © 2018 Brendan Tildesley <mail@brendan.scot>
0c85d2c6 30;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
18e56ad7 31;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
e7cdd311
MM
32;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
33;;; Copyright © 2018 Gábor Boskovit <boskovits@gmail.com>
548642db 34;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
04b6e9c5 35;;; Copyright © 2019 Timo Eisenmann <eisenmann@fn.de>
a7afa454 36;;; Copyright © 2019 Arne Babenhauserheide <arne_bab@web.de>
b9d8aa09 37;;; Copyright © 2019 Riku Viitanen <riku.viitanen@protonmail.com>
67f9f578 38;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
567a1453 39;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
4233e74b 40;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
2f095261 41;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
618819aa 42;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
58a361fe 43;;; Copyright © 2020 Alex McGrath <amk@amk.ie>
4c1f5ea3 44;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
d6817e00 45;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
667903d1 46;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
39efcc9b
AE
47;;;
48;;; This file is part of GNU Guix.
49;;;
50;;; GNU Guix is free software; you can redistribute it and/or modify it
51;;; under the terms of the GNU General Public License as published by
52;;; the Free Software Foundation; either version 3 of the License, or (at
53;;; your option) any later version.
54;;;
55;;; GNU Guix is distributed in the hope that it will be useful, but
56;;; WITHOUT ANY WARRANTY; without even the implied warranty of
57;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58;;; GNU General Public License for more details.
59;;;
60;;; You should have received a copy of the GNU General Public License
61;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
62
63(define-module (gnu packages video)
fe138965 64 #:use-module (ice-9 match)
08858812 65 #:use-module (srfi srfi-1)
2b94c14c 66 #:use-module (srfi srfi-26)
ae0bdd81 67 #:use-module ((guix licenses) #:prefix license:)
e930c2a3 68 #:use-module (guix utils)
39efcc9b
AE
69 #:use-module (guix packages)
70 #:use-module (guix download)
38829eac 71 #:use-module (guix git-download)
d8841cc5 72 #:use-module (guix svn-download)
ca4b5588 73 #:use-module (guix build-system cargo)
44726031 74 #:use-module (guix build-system cmake)
2a844af9 75 #:use-module (guix build-system copy)
39efcc9b 76 #:use-module (guix build-system gnu)
0e74bb5b 77 #:use-module (guix build-system glib-or-gtk)
635f981b 78 #:use-module (guix build-system meson)
6f45e45d 79 #:use-module (guix build-system perl)
615215a5 80 #:use-module (guix build-system python)
1c1178cd 81 #:use-module (guix build-system waf)
f27f264e 82 #:use-module (guix build-system trivial)
3b02429c 83 #:use-module (gnu packages)
39efcc9b 84 #:use-module (gnu packages algebra)
4fbcfc14 85 #:use-module (gnu packages assembly)
72bfebf5 86 #:use-module (gnu packages audio)
f1044010 87 #:use-module (gnu packages autotools)
d5a748e8 88 #:use-module (gnu packages avahi)
76277052 89 #:use-module (gnu packages backup)
38829eac 90 #:use-module (gnu packages base)
8dd6fc51 91 #:use-module (gnu packages bison)
2973ebf5 92 #:use-module (gnu packages boost)
d5a748e8 93 #:use-module (gnu packages cdrom)
2973ebf5 94 #:use-module (gnu packages check)
fe047e13 95 #:use-module (gnu packages cmake)
39efcc9b 96 #:use-module (gnu packages compression)
e0c40707 97 #:use-module (gnu packages cpp)
ca4b5588 98 #:use-module (gnu packages crates-io)
f464016d 99 #:use-module (gnu packages curl)
3a44c7bb 100 #:use-module (gnu packages dejagnu)
78d112c2 101 #:use-module (gnu packages dns)
2973ebf5 102 #:use-module (gnu packages docbook)
e37bdc0f 103 #:use-module (gnu packages documentation)
f22e0e26 104 #:use-module (gnu packages elf)
2973ebf5 105 #:use-module (gnu packages file)
8dd6fc51 106 #:use-module (gnu packages flex)
2afb7939 107 #:use-module (gnu packages fonts)
39efcc9b 108 #:use-module (gnu packages fontutils)
c161c22a 109 #:use-module (gnu packages freedesktop)
44726031
AE
110 #:use-module (gnu packages fribidi)
111 #:use-module (gnu packages gettext)
38829eac 112 #:use-module (gnu packages ghostscript)
d5a748e8
AE
113 #:use-module (gnu packages gl)
114 #:use-module (gnu packages glib)
2cd85cf9 115 #:use-module (gnu packages guile)
fe047e13 116 #:use-module (gnu packages gnome)
c3069cd1 117 #:use-module (gnu packages gnunet)
d5a748e8 118 #:use-module (gnu packages gnupg)
fe047e13 119 #:use-module (gnu packages gstreamer)
44726031 120 #:use-module (gnu packages gtk)
e55354b8 121 #:use-module (gnu packages image)
b5b20bda 122 #:use-module (gnu packages imagemagick)
f48feaa2 123 #:use-module (gnu packages iso-codes)
76277052 124 #:use-module (gnu packages libidn)
c812f460 125 #:use-module (gnu packages libreoffice)
c941b312 126 #:use-module (gnu packages libusb)
d5a748e8
AE
127 #:use-module (gnu packages linux)
128 #:use-module (gnu packages lua)
fe047e13 129 #:use-module (gnu packages m4)
3a44c7bb 130 #:use-module (gnu packages man)
f3395a7b 131 #:use-module (gnu packages markup)
c941b312 132 #:use-module (gnu packages maths)
d5a748e8 133 #:use-module (gnu packages mp3)
4d94b93c 134 #:use-module (gnu packages ncurses)
579a9cde 135 #:use-module (gnu packages networking)
6f6c8b65 136 #:use-module (gnu packages ocr)
39efcc9b 137 #:use-module (gnu packages perl)
6c71d56d 138 #:use-module (gnu packages perl-check)
3123cdaf 139 #:use-module (gnu packages perl-web)
5389e030 140 #:use-module (gnu packages photo)
39efcc9b 141 #:use-module (gnu packages pkg-config)
a7d94b54 142 #:use-module (gnu packages popt)
f3395a7b 143 #:use-module (gnu packages pretty-print)
fc2982f7 144 #:use-module (gnu packages protobuf)
d5a748e8 145 #:use-module (gnu packages pulseaudio)
39efcc9b 146 #:use-module (gnu packages python)
f48feaa2 147 #:use-module (gnu packages python-crypto)
589e3f4e 148 #:use-module (gnu packages python-web)
44d10b1f 149 #:use-module (gnu packages python-xyz)
d5a748e8 150 #:use-module (gnu packages qt)
76277052 151 #:use-module (gnu packages rdesktop)
2973ebf5 152 #:use-module (gnu packages ruby)
ca4b5588 153 #:use-module (gnu packages rust-apps)
76277052 154 #:use-module (gnu packages samba)
d5a748e8 155 #:use-module (gnu packages sdl)
2973ebf5
GG
156 #:use-module (gnu packages serialization)
157 #:use-module (gnu packages shells)
cd0322a3 158 #:use-module (gnu packages sqlite)
d5a748e8 159 #:use-module (gnu packages ssh)
579a9cde 160 #:use-module (gnu packages swig)
6b2c6be0 161 #:use-module (gnu packages texinfo)
c426e61e 162 #:use-module (gnu packages textutils)
a7fd7b68 163 #:use-module (gnu packages tls)
1a291593 164 #:use-module (gnu packages time)
76277052 165 #:use-module (gnu packages upnp)
870541d6 166 #:use-module (gnu packages vulkan)
bb470bd3 167 #:use-module (gnu packages web)
fe047e13 168 #:use-module (gnu packages webkit)
794223bc 169 #:use-module (gnu packages wxwidgets)
ee3b55ea 170 #:use-module (gnu packages xdisorg)
54ff0b7d 171 #:use-module (gnu packages xiph)
d5a748e8 172 #:use-module (gnu packages xml)
4fbcfc14 173 #:use-module (gnu packages xorg))
39efcc9b 174
a56e1a84
RG
175(define-public svt-hevc
176 (package
177 (name "svt-hevc")
178 (version "1.4.3")
179 (source
180 (origin
181 (method git-fetch)
182 (uri
183 (git-reference
184 (url "https://github.com/OpenVisualCloud/SVT-HEVC.git")
185 (commit (string-append "v" version))))
186 (file-name (git-file-name name version))
187 (sha256
188 (base32 "1sqh3dciqm2p1b66kngcpxqy5fx3ramxlxy8gfcbdwn2i3rsqhs7"))))
189 (build-system cmake-build-system)
190 (arguments
191 `(#:tests? #f)) ; Test script is stand-alone
192 (native-inputs
193 `(("yasm" ,yasm)))
194 (synopsis "SVT HEVC encoder")
195 (description "Scalable Video Technology (SVT) is a software-based video
196coding technology that is highly optimized for Intel's Xeon processors. Using
197the SVT-HEVC encoder, it is possible to spread video encoding processing across
198multiple Intel's Xeon processors to achieve a real advantage of processing
199efficiency.")
200 (home-page "https://01.org/svt")
201 (license (license:non-copyleft "file:///LICENSE.md"))))
202
71a77016
RG
203(define-public mediasdk
204 (package
205 (name "mediasdk")
206 (version "20.1.1")
207 (source
208 (origin
209 (method git-fetch)
210 (uri
211 (git-reference
212 (url "https://github.com/Intel-Media-SDK/MediaSDK.git")
213 (commit (string-append "intel-" name "-" version))))
214 (file-name (git-file-name name version))
215 (sha256
216 (base32 "0blwcxr5j8762nylx2cxrq0h53bpgnk859dbs6crq4wr9fcxlx9z"))))
217 (build-system cmake-build-system)
218 (arguments
219 `(#:configure-flags
220 (list
221 "-DENABLE_X11=ON"
222 "-DENABLE_X11_DRI3=ON"
223 "-DENABLE_WAYLAND=ON"
224 "-DENABLE_TEXTLOG=ON"
225 "-DENABLE_STAT=ON"
226 "-DBUILD_TESTS=ON"
227 "-DBUILD_TOOLS=ON"
228 (string-append "-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath="
229 (assoc-ref %outputs "out") "/lib"))))
230 (native-inputs
231 `(("pkg-config" ,pkg-config)
232 ("python" ,python-wrapper)))
233 (inputs
234 `(("libdrm" ,libdrm)
235 ("libva" ,libva)
236 ("pciaccess" ,libpciaccess)
237 ("wayland" ,wayland)
238 ("x11" ,libx11)))
239 (synopsis "Intel Media SDK")
240 (description "MediaSDK provides a plain C API to access hardware-accelerated
241video decode, encode and filtering on Intel's Gen graphics hardware platforms.")
242 (home-page "http://mediasdk.intel.com/")
243 (license (license:non-copyleft "file:///LICENSE"))))
244
d6a413a7
RG
245(define-public schroedinger
246 (package
247 (name "schroedinger")
248 (version "1.0.11")
249 (source
250 (origin
251 (method url-fetch)
252 (uri
253 (string-append "https://launchpad.net/" name "/trunk/" version
254 "/+download/" name "-" version ".tar.gz"))
255 (sha256
256 (base32 "04prr667l4sn4zx256v1z36a0nnkxfdqyln48rbwlamr6l3jlmqy"))))
257 (build-system gnu-build-system)
258 (outputs '("out" "doc"))
259 (arguments
260 `(#:phases
261 (modify-phases %standard-phases
262 (add-after 'install 'move-docs
263 (lambda* (#:key outputs #:allow-other-keys)
264 (let* ((out (assoc-ref outputs "out"))
265 (doc (assoc-ref outputs "doc")))
266 (mkdir-p (string-append doc "/share"))
267 (rename-file
268 (string-append out "/share/gtk-doc")
269 (string-append doc "/share/gtk-doc"))
270 #t))))))
271 (native-inputs
272 `(("dash" ,dash)
273 ("gtk-doc" ,gtk-doc)
274 ("pkg-config" ,pkg-config)))
275 (inputs
276 `(("glew" ,glew)
277 ("opengl" ,mesa)))
278 (propagated-inputs
279 `(("orc" ,orc)))
280 (synopsis "Dirac video codec")
281 (description "Schroedinger is a project implementing the Dirac video codec in
282ANSI C code. It is meant to be highly optimized and portable. It is developed
283as a joint effort between the BBC and Fluendo.")
284 (home-page "https://launchpad.net/schroedinger")
285 (license
286 ;; This library is licensed under 4 different licenses,
287 ;; and you can choose to use it under the terms of any one of them.
288 (list
289 license:gpl2+
290 license:lgpl2.0+
291 license:expat
292 license:mpl1.1))))
293
0444187d
RG
294(define-public libquicktime
295 (package
296 (name "libquicktime")
297 (version "1.2.4")
298 (source
299 (origin
300 (method url-fetch)
301 (uri
302 (string-append "https://sourceforge.net/projects/" name "/files/"
303 name "/" version "/" name "-" version ".tar.gz"))
304 (sha256
305 (base32 "0s3kshzl3zfjw3phzv73r91fkr9z8q8kc3dhsys4f4xk6ff3alqw"))
306 (patches
307 (search-patches "libquicktime-ffmpeg.patch"))))
308 (build-system gnu-build-system)
309 (native-inputs
310 `(("gettext" ,gettext-minimal)
311 ("doxygen" ,doxygen)
312 ("pkg-config" ,pkg-config)))
313 (inputs
314 `(("alsa" ,alsa-lib)
315 ("ffmpeg" ,ffmpeg)
316 ("gtk+-2" ,gtk+-2)
317 ("lame" ,lame)
318 ("libdv" ,libdv)
319 ("libjpeg" ,libjpeg-turbo)
320 ("libpng" ,libpng)
321 ("libvorbis" ,libvorbis)
322 ("opengl" ,mesa)
323 ("schroedinger" ,schroedinger)
324 ("x11" ,libx11)
325 ("x264" ,libx264)
326 ("xaw" ,libxaw)
327 ("xv" ,libxv)))
328 (synopsis "Quick Time Library")
329 (description "The goal of this project is to enhance the quicktime4linux
330library.")
331 (home-page "http://libquicktime.sourceforge.net/")
332 (license license:lgpl2.1+)))
333
502114de
RG
334(define-public mjpegtools
335 (package
336 (name "mjpegtools")
337 (version "2.1.0")
338 (source
339 (origin
340 (method url-fetch)
341 (uri
342 (string-append "https://sourceforge.net/projects/" name "/files/"
343 name "/" version "/" name "-" version ".tar.gz"))
344 (sha256
345 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
346 (build-system gnu-build-system)
347 (inputs
348 `(("gtk+-2" ,gtk+-2)
349 ("libdv" ,libdv)
350 ("libpng" ,libpng)
351 ("libquicktime" ,libquicktime)
352 ("sdl" ,sdl)))
353 (synopsis "Tools for handling MPEG")
354 (description "Mjpeg tools is a suite of programs which support video capture,
355editing, playback, and compression to MPEG of MJPEG video. Edit, play and
356compression software is hardware independent.")
357 (home-page "http://mjpeg.sourceforge.net/")
358 (license license:gpl2+)))
359
97f3fe7c
RG
360(define-public libmms
361 (package
362 (name "libmms")
363 (version "0.6.4")
364 (source
365 (origin
366 (method url-fetch)
367 (uri
368 (string-append "https://sourceforge.net/projects/" name "/files/"
369 name "/" version "/" name "-" version ".tar.gz"))
370 (sha256
371 (base32 "0kvhxr5hkabj9v7ah2rzkbirndfqdijd9hp8v52c1z6bxddf019w"))))
372 (build-system gnu-build-system)
373 (synopsis "MMS stream protocol library")
374 (description "Libmms is a library for streaming media files using the mmst
375and mmsh protocols.")
376 (home-page "https://sourceforge.net/projects/libmms/")
377 (license license:lgpl2.1+)))
378
02c05485
RG
379(define-public libvideogfx
380 (package
381 (name "libvideogfx")
382 (version "1.0.9")
383 (source
384 (origin
385 (method git-fetch)
386 (uri
387 (git-reference
388 (url "https://github.com/farindk/libvideogfx.git")
389 (commit (string-append "v" version))))
390 (file-name (git-file-name name version))
391 (sha256
392 (base32 "154b0j8cfg879pg08xcbwvbz8z9nrfnyj31i48vxir1psas70ynq"))))
393 (build-system gnu-build-system)
394 (arguments
395 `(#:phases
396 (modify-phases %standard-phases
397 (add-after 'unpack 'fix-build-errors
398 (lambda _
399 (substitute* "libvideogfx/graphics/fileio/ffmpeg.cc"
400 (("av_close_input_file\\(")
401 "avformat_close_input(&"))
402 (substitute* "libvideogfx/graphics/fileio/png.cc"
403 (("is != NULL") "is.good()"))
404 #t)))))
405 (native-inputs
406 `(("autoconf" ,autoconf)
407 ("automake" ,automake)
408 ("libtool" ,libtool)
409 ("pkg-config" ,pkg-config)))
410 (inputs
411 `(("ffmpeg" ,ffmpeg-2.8)
412 ("jpeg" ,libjpeg-turbo)
413 ("png" ,libpng)
414 ("x11" ,libx11)
415 ("xext" ,libxext)))
416 (synopsis "Video processing library")
417 (description "LibVideoGfx is a C++ library for low-level video processing.
418It aims at speeding up the development process for image and video processing
419applications by providing high-level classes for commonly required tasks.")
420 (home-page "https://dirk-farin.net/software/libvideogfx/index.html")
421 (license license:lgpl2.1+)))
422
5f524bdd
TGR
423(define-public libde265
424 (package
425 (name "libde265")
426 (version "1.0.5")
427 (source
428 (origin
429 (method git-fetch)
430 (uri
431 (git-reference
432 (url "https://github.com/strukturag/libde265.git")
433 (commit (string-append "v" version))))
434 (file-name (git-file-name name version))
435 (sha256
436 (base32 "1qisj8ryzbknam3hk81rq70fsd9mcpxm898bqygvbsmbwyvmz3pg"))))
437 (build-system gnu-build-system)
438 (native-inputs
439 `(("autoconf" ,autoconf)
440 ("automake" ,automake)
441 ("libtool" ,libtool)
442 ("pkg-config" ,pkg-config)
443 ("python" ,python-wrapper)))
444 (inputs
445 `(;; XXX: Build fails with libvideogfx.
446 ;; ("libvideogfx" ,libvideogfx)
447 ("qt" ,qtbase)
448 ("sdl" ,sdl)))
449 (synopsis "H.265 video codec implementation")
450 (description "Libde265 is an implementation of the h.265 video codec. It is
451written from scratch and has a plain C API to enable a simple integration into
452other software.")
453 (home-page "https://www.libde265.org/")
454 (license
455 (list
456 ;; Applications.
457 license:expat
458 ;; Library.
459 license:lgpl3+))))
460
1a6bc33d
RG
461(define-public tslib
462 (package
463 (name "tslib")
464 (version "1.21")
465 (source
466 (origin
467 (method git-fetch)
468 (uri
469 (git-reference
470 (url "https://github.com/libts/tslib.git")
471 (commit version)))
472 (file-name (git-file-name name version))
473 (sha256
474 (base32 "1ph51vpfp92rpa2vs6wkz1b1pcs3z334p1i33sprsi8mjlwvkbzc"))))
475 (build-system gnu-build-system)
476 (arguments
477 `(#:test-target "tests"
478 #:configure-flags
479 (list
480 "--with-sdl2")))
481 (native-inputs
482 `(("autoconf" ,autoconf)
483 ("automake" ,automake)
484 ("libtool" ,libtool)
485 ("pkg-config" ,pkg-config)))
486 (inputs
487 `(("linux-headers" ,linux-libre-headers)
488 ("sdl2" ,sdl2)))
489 (synopsis "Touchscreen access library")
490 (description "TSLib is a cross-platform library that provides access to
491touchscreen devices and the ability to apply filters to their input events.")
492 (home-page "http://www.tslib.org/")
493 (license license:lgpl2.1+)))
494
09fd9898
RG
495(define-public libmpeg3
496 (package
497 (name "libmpeg3")
498 (version "1.8")
499 (source
500 (origin
501 (method url-fetch)
502 (uri
503 (string-append "https://sourceforge.net/projects/heroines/files/"
504 "releases/081108/" name "-" version "-src.tar.bz2"))
505 (sha256
506 (base32 "1i53vv0wm5qfwgg1z7j9g14s6c7gxxkiy4vbdkq3lijjyyz50vv5"))))
507 (build-system gnu-build-system)
508 (arguments
509 `(#:test-target "test"
510 #:make-flags
511 (list
512 (string-append "A52DIR=" (assoc-ref %build-inputs "liba52"))
513 (string-append "DST=" (assoc-ref %outputs "out") "/bin"))
514 #:phases
515 (modify-phases %standard-phases
516 (add-after 'unpack 'delete-bundled-a52dec
517 (lambda _
518 (delete-file-recursively "a52dec-0.7.3")
519 (substitute* "Makefile"
520 (("include Makefile\\.a52")
521 "")
522 (("\\(A52DIR\\)/include")
523 "(A52DIR)/include/a52dec")
524 (("LIBS = " match)
525 (string-append match "-la52 ")))
526 #t))
527 (add-before 'install 'create-destination-directory
528 (lambda* (#:key outputs #:allow-other-keys)
529 (let* ((out (string-append (assoc-ref outputs "out"))))
530 (mkdir-p (string-append out "/bin"))
531 #t))))))
532 (native-inputs
533 `(("nasm" ,nasm)))
534 (inputs
535 `(("liba52" ,liba52)))
536 (synopsis "Advanced MPEG editing and manipulation library")
537 (description "Libmpeg3 decodes MP2, MP3, AC3, MPEG-1 video, MPEG-2 video,
538and DVD footage in a single library. It supports many esoteric features like
539parallel video decoding, frame-accurate editing, YUV 4:2:2, and ATSC transport
540stream decoding")
541 (home-page "http://heroinewarrior.com/libmpeg3.php")
542 (license license:gpl2+)))
543
6b2c6be0
SB
544(define-public aalib
545 (package
546 (name "aalib")
547 (version "1.4rc5")
548 (source (origin
549 (method url-fetch)
de67e922
LF
550 (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
551 version "/" name "-" version ".tar.gz"))
6b2c6be0
SB
552 (sha256
553 (base32
554 "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
555 (build-system gnu-build-system)
556 (native-inputs
557 `(("makeinfo" ,texinfo)))
558 (inputs
559 `(("ncurses" ,ncurses)))
560 (arguments
c437922a 561 `(#:phases
6b2c6be0 562 (modify-phases %standard-phases
3a4de6b2 563 (replace 'configure
014cbde6 564 (lambda* (#:key build inputs outputs #:allow-other-keys)
6b2c6be0
SB
565 ;; This old `configure' script doesn't support
566 ;; variables passed as arguments.
567 (let ((out (assoc-ref outputs "out"))
568 (ncurses (assoc-ref inputs "ncurses")))
569 (setenv "CONFIG_SHELL" (which "bash"))
3595e83d
MW
570 (invoke "./configure"
571 (string-append "--prefix=" out)
572 (string-append "--build=" build)
573 ;; The ancient config.guess is unable to
574 ;; guess the host triplet on mips64el.
575 ,@(if (string=? "mips64el-linux"
576 (%current-system))
577 '("--host=mips64el-unknown-linux-gnu")
578 '())
579 ;; The same is also true with aarch64.
580 ,@(if (string=? "aarch64-linux"
581 (%current-system))
582 '("--host=aarch64-unknown-linux-gnu")
583 '())
584 (string-append "--with-ncurses="
585 ncurses))))))))
6b2c6be0
SB
586 (home-page "http://aa-project.sourceforge.net/aalib/")
587 (synopsis "ASCII-art library")
588 (description
589 "AA-lib is a low level gfx library which does not require graphics device.
590In fact, there is no graphical output possible. AA-lib replaces those
591old-fashioned output methods with powerful ascii-art renderer.")
592 (license license:lgpl2.0+)))
593
b7f5fa82
TGR
594(define-public celluloid
595 (package
596 (name "celluloid")
ca708858 597 (version "0.19")
b7f5fa82
TGR
598 (source
599 (origin
600 (method url-fetch)
601 (uri (string-append "https://github.com/celluloid-player/celluloid/releases"
602 "/download/v" version "/celluloid-" version ".tar.xz"))
603 (sha256
ca708858 604 (base32 "1s3qkism96gi44incvsb6rqg255qcvjvw61ya7nw30md0sapj4sl"))))
b7f5fa82
TGR
605 (build-system glib-or-gtk-build-system)
606 (native-inputs
607 `(("intltool" ,intltool)
608 ("pkg-config" ,pkg-config)))
609 (inputs
610 `(("gtk+" ,gtk+)
611 ("libepoxy" ,libepoxy)
612 ("mpv" ,mpv)))
613 (home-page "https://github.com/celluloid-player/celluloid")
614 (synopsis "GTK+ frontend for the mpv media player")
615 (description "Celluloid is a simple GTK+ frontend for the mpv media player.
616It interacts with mpv via the client API exported by libmpv, allowing access to
617mpv's powerful playback capabilities.")
618 (license license:gpl3+)))
619
cda163cd
TUBK
620(define-public liba52
621 (package
622 (name "liba52")
623 (version "0.7.4")
624 (source (origin
625 (method url-fetch)
8c056935
TUBK
626 (uri (string-append
627 ;; A mirror://sourceforge URI doesn't work, presumably
628 ;; because the SourceForge project is misconfigured.
629 "http://liba52.sourceforge.net/files/a52dec-" version
630 ".tar.gz"))
cda163cd
TUBK
631 (sha256
632 (base32
23da88f6 633 "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))
fc1adab1
AK
634 (patches (search-patches "liba52-enable-pic.patch"
635 "liba52-set-soname.patch"
636 "liba52-use-mtune-not-mcpu.patch"
637 "liba52-link-with-libm.patch"))))
cda163cd 638 (build-system gnu-build-system)
23da88f6
MW
639 ;; XXX We need to run ./bootstrap because of the build system fixes above.
640 (native-inputs
641 `(("autoconf" ,autoconf)
642 ("automake" ,automake)
643 ("libtool" ,libtool)))
412a2422 644 (arguments `(#:configure-flags '("--enable-shared")
23da88f6
MW
645 #:phases
646 (modify-phases %standard-phases
647 ;; XXX We need to run ./bootstrap because of the build
648 ;; system fixes above.
189be331 649 (replace 'bootstrap
78666a68 650 (lambda _ (invoke "sh" "bootstrap"))))))
cda163cd
TUBK
651 (home-page "http://liba52.sourceforge.net/")
652 (synopsis "ATSC A/52 stream decoder")
653 (description "liba52 is a library for decoding ATSC A/52 streams. The
654A/52 standard is used in a variety of applications, including digital
655television and DVD. It is also known as AC-3.")
ae0bdd81 656 (license license:gpl2+)))
cda163cd 657
a7afa454 658(define-public libaom
08cc1397
LF
659 (package
660 (name "libaom")
6597893b 661 (version "2.0.0")
08cc1397
LF
662 (source (origin
663 (method git-fetch)
664 (uri (git-reference
665 (url "https://aomedia.googlesource.com/aom/")
666 (commit (string-append "v" version))))
667 (file-name (git-file-name name version))
668 (sha256
669 (base32
6597893b 670 "1616xjhj6770ykn82ml741h8hx44v507iky3s9h7a5lnk9d4cxzy"))))
08cc1397
LF
671 (build-system cmake-build-system)
672 (native-inputs
673 `(("perl" ,perl)
674 ("pkg-config" ,pkg-config)
675 ("python" ,python))) ; to detect the version
676 (arguments
677 `(#:tests? #f ;no check target
678 #:configure-flags
679 ;; build dynamic library
680 (list "-DBUILD_SHARED_LIBS=YES"
681 "-DENABLE_PIC=TRUE"
682 "-DAOM_TARGET_CPU=generic"
683 (string-append "-DCMAKE_INSTALL_PREFIX="
684 (assoc-ref %outputs "out")))))
685 (home-page "https://aomedia.googlesource.com/aom/")
686 (synopsis "AV1 video codec")
687 (description "Libaom is the reference implementation of AV1. It includes a
688shared library and encoder and decoder command-line executables.")
689 (license license:bsd-2)))
a7afa454 690
e0884109
MW
691(define-public libmpeg2
692 (package
693 (name "libmpeg2")
694 (version "0.5.1")
695 (source (origin
696 (method url-fetch)
697 ;; A mirror://sourceforge URI doesn't work, presumably
698 ;; because the SourceForge project is misconfigured.
699 (uri (string-append "http://libmpeg2.sourceforge.net/files/"
700 name "-" version ".tar.gz"))
c50b07dd
MB
701 (patches (search-patches "libmpeg2-arm-private-symbols.patch"
702 "libmpeg2-global-symbol-test.patch"))
e0884109
MW
703 (sha256
704 (base32
705 "1m3i322n2fwgrvbs1yck7g5md1dbg22bhq5xdqmjpz5m7j4jxqny"))))
706 (inputs
707 `(("libx11" ,libx11)
708 ("libxext" ,libxext)
709 ("libxv" ,libxv)
710 ("libsm" ,libsm)
711 ("libice" ,libice)
712 ("sdl" ,sdl)))
713 (build-system gnu-build-system)
714 (home-page "http://libmpeg2.sourceforge.net/")
715 (synopsis "MPEG1 and MPEG2 video decoder library")
716 (description
717 "libmpeg2 is a library which can decode MPEG1 and MPEG2 video streams.")
718 (license license:gpl2+)))
719
82712597 720(define-public libx264
c0fe2e1f
MB
721 ;; There are no tags in the repository, so we take the version number from
722 ;; the X264_BUILD variable defined in x264.h.
723 (let ((version "159")
724 (commit "1771b556ee45207f8711744ccbd5d42a3949b14c")
725 (revision "0"))
726 (package
727 (name "libx264")
728 (version (git-version version revision commit))
729 (source (origin
730 (method git-fetch)
731 (uri (git-reference
732 (url "https://code.videolan.org/videolan/x264.git")
733 (commit commit)))
734 (file-name (git-file-name name version))
735 (sha256
736 (base32
737 "0kmi78gs5101d4df33il5bmjbns54nvdjsyn44xiw60lwsg11vwz"))))
738 (build-system gnu-build-system)
739 (native-inputs
740 `(("pkg-config" ,pkg-config)
741 ("nasm" ,nasm)))
742 ;; TODO: Add gpac input
743 (arguments
744 `(#:tests? #f ;no check target
745 #:configure-flags '("--enable-shared"
746 ;; Don't build the command-line program. If we
747 ;; want it later, we should do so in a different
748 ;; package to avoid a circular dependency (the x264
749 ;; program depends on ffmpeg and ffmpeg depends on
750 ;; libx264).
751 "--disable-cli"
cb50d0c2 752
c0fe2e1f
MB
753 ;; On MIPS, we must pass "--disable-asm" or else
754 ;; configure fails after printing: "You specified a
755 ;; pre-MSA CPU in your CFLAGS. If you really want
756 ;; to run on such a CPU, configure with
757 ;; --disable-asm."
758 ,@(if (string-prefix? "mips"
759 (or (%current-target-system)
760 (%current-system)))
761 '("--disable-asm")
762 '()))))
763 (home-page "https://www.videolan.org/developers/x264.html")
764 (synopsis "H.264 video coding library")
765 (description "libx264 is an advanced encoding library for creating
82712597 766H.264 (MPEG-4 AVC) video streams.")
c0fe2e1f
MB
767 (license (list license:gpl2+ ;most files
768 license:isc ;common/x86/x86inc.asm
769 license:lgpl2.1+ ;extras/getopt.c
770 license:bsd-3 ;extras/inttypes.h
771 (license:non-copyleft ;extras/cl*.h
772 "file://extras/cl.h"
773 "See extras/cl.h in the distribution."))))))
82712597 774
2973ebf5
GG
775(define-public mkvtoolnix
776 (package
777 (name "mkvtoolnix")
296b3de6 778 (version "37.0.0")
2973ebf5
GG
779 (source
780 (origin
781 (method url-fetch)
782 (uri (string-append "https://mkvtoolnix.download/sources/"
908d8bed 783 "mkvtoolnix-" version ".tar.xz"))
2973ebf5 784 (sha256
296b3de6 785 (base32 "0r4d9318ymb9a0mkc0shi9p4kjy3m70s49v4f8dmjhvj63silhix"))
2973ebf5 786 (modules '((guix build utils)))
6cbee49d
MW
787 (snippet '(begin
788 ;; Delete bundled libraries.
789 (for-each delete-file-recursively
f3395a7b
EF
790 '("lib/fmt"
791 "lib/libebml"
6cbee49d
MW
792 "lib/libmatroska"
793 "lib/nlohmann-json"
794 "lib/pugixml"
795 "lib/utf8-cpp"))
796 #t))))
2973ebf5 797 (build-system gnu-build-system)
99d5e5df 798 (outputs '("out" "gui")) ; "mkvtoolnix-gui" brings the closure size from ~300 MB to 1.5+ GB.
2973ebf5
GG
799 (inputs
800 `(("boost" ,boost)
801 ("bzip2" ,bzip2)
f3395a7b 802 ("cmark" ,cmark)
2973ebf5 803 ("libebml" ,libebml)
2973ebf5 804 ("file" ,file)
f3395a7b
EF
805 ("flac" ,flac)
806 ("fmt" ,fmt)
2973ebf5
GG
807 ("libmatroska" ,libmatroska)
808 ("libogg" ,libogg)
809 ("libvorbis" ,libvorbis)
810 ("lzo" ,lzo)
811 ("pugixml" ,pugixml)
662ff659
EF
812 ("qtbase" ,qtbase)
813 ("qtmultimedia" ,qtmultimedia)
2973ebf5
GG
814 ("utfcpp" ,utfcpp)
815 ("zlib" ,zlib)))
816 (native-inputs
817 `(("docbook-xsl" ,docbook-xsl)
818 ("gettext" ,gettext-minimal)
819 ("googletest" ,googletest)
820 ("libxslt" ,libxslt)
936aa052 821 ("json-modern-cxx" ,json-modern-cxx)
2973ebf5
GG
822 ("perl" ,perl)
823 ("pkg-config" ,pkg-config)
824 ("po4a" ,po4a)
662ff659 825 ("qttools" ,qttools)
2973ebf5
GG
826 ("ruby" ,ruby)))
827 (arguments
828 `(#:configure-flags
829 (list (string-append "--with-boost="
830 (assoc-ref %build-inputs "boost"))
831 (string-append "--with-docbook-xsl-root="
832 (assoc-ref %build-inputs "docbook-xsl")
833 "/xml/xsl/docbook-xsl-"
834 ,(package-version docbook-xsl))
e7ed996c
EF
835 "--enable-update-check=no"
836 "--enable-precompiled-headers=no")
2973ebf5
GG
837 #:phases
838 (modify-phases %standard-phases
07272bd8
TGR
839 (add-after 'unpack 'patch-relative-file-names
840 (lambda* (#:key outputs #:allow-other-keys)
841 (let ((out (assoc-ref outputs "out")))
842 (substitute* "src/mkvtoolnix-gui/util/settings.cpp"
843 (("mkvmerge" match)
844 (string-append out "/bin/" match)))
845 #t)))
2973ebf5 846 (add-before 'configure 'add-googletest
e7ed996c 847 (lambda* (#:key inputs #:allow-other-keys)
2973ebf5 848 (symlink
e7ed996c
EF
849 (string-append (assoc-ref inputs "googletest")
850 "/include/gtest") "lib/gtest")
2973ebf5
GG
851 #t))
852 (replace 'build
853 (lambda _
854 (let ((-j (list "-j" (number->string (parallel-job-count)))))
6c4d1413 855 (apply invoke "rake" -j))))
2973ebf5
GG
856 (replace 'check
857 (lambda _
6c4d1413 858 (invoke "rake" "tests/unit")))
2973ebf5
GG
859 (replace 'install
860 (lambda _
99d5e5df
PN
861 (invoke "rake" "install")))
862 (add-after 'install 'post-install
863 (lambda* (#:key outputs #:allow-other-keys)
864 ;; Move the Qt interface to "gui".
b55db494
PN
865 (let* ((out (assoc-ref outputs "out"))
866 (gui (assoc-ref outputs "gui"))
867 (strip-store-dir (lambda (path)
868 (substring path (string-prefix-length out path)))))
99d5e5df
PN
869 (for-each
870 (lambda (file)
871 (mkdir-p (string-append gui (dirname file)))
872 (rename-file (string-append out file)
873 (string-append gui file)))
b55db494
PN
874 (append '("/bin/mkvtoolnix-gui"
875 "/share/applications/org.bunkus.mkvtoolnix-gui.desktop"
876 "/share/metainfo/org.bunkus.mkvtoolnix-gui.appdata.xml"
877 "/share/mime/packages/org.bunkus.mkvtoolnix-gui.xml")
878 (map strip-store-dir (find-files out "\\.ogg$"))
879 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.png$"))
880 (map strip-store-dir (find-files out "mkvtoolnix-gui\\.1"))))
881 (for-each
882 (lambda (file)
883 (delete-file-recursively (string-append out file)))
884 '("/share/applications"
885 "/share/metainfo"
886 "/share/mime"
887 "/share/mkvtoolnix")))
99d5e5df 888 #t)))))
2973ebf5
GG
889 (home-page "https://mkvtoolnix.download")
890 (synopsis "Tools to create, alter and inspect Matroska files")
891 (description
892 "MKVToolNix provides tools for getting information about Matroska files
df14dc48
TGR
893(@command{mkvinfo}), extracting tracks/data from Matroska files
894(@command{mkvextract}), and creating Matroska files from other media files
895(@command{mkvmerge}).")
2973ebf5
GG
896 (license license:gpl2)))
897
6c71d56d
TGR
898(define-public straw-viewer
899 (package
900 (name "straw-viewer")
667903d1 901 (version "0.0.6")
6c71d56d
TGR
902 (source
903 (origin
904 (method git-fetch)
905 (uri (git-reference
906 (url "https://github.com/trizen/straw-viewer")
907 (commit version)))
908 (file-name (git-file-name name version))
909 (sha256
667903d1
BG
910 (base32
911 "0a9g10r56jdm2jx2yg9i8j8nczq74x78c29bhannr7ybnm2r6w2a"))))
6c71d56d
TGR
912 (build-system perl-build-system)
913 (native-inputs
914 `(("perl-module-build" ,perl-module-build)
915 ("perl-test-pod" ,perl-test-pod)))
916 (inputs
917 `(("perl-data-dump" ,perl-data-dump)
918 ("perl-json" ,perl-json)
919 ("perl-libwww" ,perl-libwww)
920 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
921 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
922 ("perl-mozilla-ca" ,perl-mozilla-ca)
923 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
924 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
925 ("xdg-utils" ,xdg-utils)
926
927 ;; Some videos play without youtube-dl, but others silently fail to.
928 ("youtube-dl" ,youtube-dl)))
929
930 ;; Required only when building the graphical interface (--gtk).
931 ;;("perl-file-sharedir" ,perl-file-sharedir)
932 (arguments
933 `(#:modules ((guix build perl-build-system)
934 (guix build utils)
935 (srfi srfi-26))
936 #:phases
937 (modify-phases %standard-phases
938 (add-after 'unpack 'refer-to-inputs
939 (lambda* (#:key inputs #:allow-other-keys)
940 (substitute* "lib/WWW/StrawViewer.pm"
941 (("'youtube-dl'")
942 (format #f "'~a/bin/youtube-dl'"
943 (assoc-ref inputs "youtube-dl"))))
944 (substitute* "bin/gtk-straw-viewer"
945 (("'xdg-open'")
946 (format #f "'~a/bin/xdg-open'"
947 (assoc-ref inputs "xdg-utils"))))
948 #t))
511bfafa
TGR
949 ;; (add-after 'install 'install-desktop
950 ;; (lambda* (#:key outputs #:allow-other-keys)
951 ;; (let* ((out (assoc-ref outputs "out"))
952 ;; (sharedir (string-append out "/share")))
953 ;; (install-file "share/gtk-straw-viewer.desktop"
954 ;; (string-append sharedir "/applications"))
955 ;; (install-file "share/icons/gtk-straw-viewer.png"
956 ;; (string-append sharedir "/pixmaps"))
957 ;; #t)))
6c71d56d
TGR
958 (add-after 'install 'wrap-program
959 (lambda* (#:key outputs #:allow-other-keys)
960 (let* ((out (assoc-ref outputs "out"))
961 (bin-dir (string-append out "/bin/"))
962 (site-dir (string-append out "/lib/perl5/site_perl/"))
963 (lib-path (getenv "PERL5LIB")))
964 (for-each (cut wrap-program <>
965 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
966 (find-files bin-dir))
967 #t))))))
968 (synopsis
969 "Light-weight application for searching and streaming videos from YouTube")
970 (description
971 "Straw-viewer searches for YouTube videos using @uref{https://invidio.us/,
972invidio.us} and plays them locally in a native media player like @command{vlc}
973or @command{mpv}.
974
975You can search for videos, playlists, and/or channels. The videos are streamed
976directly to the player at the best chosen resolution and with closed captions if
977available.")
978 ;; XXX Add #:module-build-flags '("--gtk") dependencies and this sentence.
979 ;; Both a command-line and a graphical interface are available.
980 (home-page "https://github.com/trizen/youtube-viewer")
981 (license license:perl-license)))
982
7bc7ffc2
EF
983(define-public x265
984 (package
985 (name "x265")
afdc16d9 986 (version "3.4")
020d4d2c 987 (outputs '("out" "static"))
7bc7ffc2
EF
988 (source
989 (origin
990 (method url-fetch)
621ce95c
MB
991 (uri (list (string-append "https://bitbucket.org/multicoreware/x265"
992 "/downloads/x265_" version ".tar.gz")
993 (string-append "https://download.videolan.org/videolan/x265/"
994 "x265_" version ".tar.gz")))
7bc7ffc2 995 (sha256
afdc16d9 996 (base32 "0wl62hfsdqpf3r3z3s6l9bz7pdb1rcik5ll00b3yaadplqipy162"))
23c25982 997 (patches (search-patches "x265-arm-flags.patch"))
7bc7ffc2 998 (modules '((guix build utils)))
6cbee49d
MW
999 (snippet '(begin
1000 (delete-file-recursively "source/compat/getopt")
1001 #t))))
7bc7ffc2 1002 (build-system cmake-build-system)
d32a3b39
MB
1003 (native-inputs
1004 ;; XXX: ASM optimization fails on i686-linux, see <https://bugs.gnu.org/41768>.
1005 (if (string-prefix? "i686" (%current-system))
1006 '()
1007 `(("nasm" ,nasm))))
7bc7ffc2
EF
1008 (arguments
1009 `(#:tests? #f ; tests are skipped if cpu-optimized code isn't built
bd606fb2
EF
1010 #:configure-flags
1011 ;; Ensure position independent code for everyone.
1012 (list "-DENABLE_PIC=TRUE"
afdc16d9 1013 ,@(if (target-arm?)
8e59c5fe
EF
1014 '("-DENABLE_ASSEMBLY=OFF")
1015 '())
bd606fb2
EF
1016 (string-append "-DCMAKE_INSTALL_PREFIX="
1017 (assoc-ref %outputs "out")))
7bc7ffc2
EF
1018 #:phases
1019 (modify-phases %standard-phases
bd606fb2 1020 (add-after 'unpack 'prepare-build
7bc7ffc2
EF
1021 (lambda _
1022 (delete-file-recursively "build")
1023 (chdir "source")
bd606fb2
EF
1024 #t))
1025 (add-before 'configure 'build-12-bit
1026 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1027 (mkdir "../build-12bit")
1028 (with-directory-excursion "../build-12bit"
1029 (apply invoke
1030 "cmake" "../source"
1031 "-DHIGH_BIT_DEPTH=ON"
1032 "-DEXPORT_C_API=OFF"
1033 "-DENABLE_CLI=OFF"
1034 "-DMAIN12=ON"
1035 configure-flags)
1036 (substitute* (cons "cmake_install.cmake"
1037 (append
1038 (find-files "CMakeFiles/x265-shared.dir" ".")
1039 (find-files "CMakeFiles/x265-static.dir" ".")))
1040 (("libx265") "libx265_main12"))
1041 (invoke "make"))))
1042 (add-before 'configure 'build-10-bit
1043 (lambda* (#:key (configure-flags '()) #:allow-other-keys)
1044 (mkdir "../build-10bit")
1045 (with-directory-excursion "../build-10bit"
1046 (apply invoke
1047 "cmake" "../source"
1048 "-DHIGH_BIT_DEPTH=ON"
1049 "-DEXPORT_C_API=OFF"
1050 "-DENABLE_CLI=OFF"
1051 configure-flags)
1052 (substitute* (cons "cmake_install.cmake"
1053 (append
1054 (find-files "CMakeFiles/x265-shared.dir" ".")
1055 (find-files "CMakeFiles/x265-static.dir" ".")))
1056 (("libx265") "libx265_main10"))
1057 (invoke "make"))))
1058 (add-after 'install 'install-more-libs
1059 (lambda _
1060 (with-directory-excursion "../build-12bit"
1061 (invoke "make" "install"))
1062 (with-directory-excursion "../build-10bit"
020d4d2c
EF
1063 (invoke "make" "install"))))
1064 (add-before 'strip 'move-static-libs
1065 (lambda* (#:key outputs #:allow-other-keys)
1066 (let ((out (assoc-ref outputs "out"))
1067 (static (assoc-ref outputs "static")))
1068 (mkdir-p (string-append static "/lib"))
1069 (with-directory-excursion
1070 (string-append out "/lib")
1071 (for-each
1072 (lambda (file)
1073 (rename-file file
1074 (string-append static "/lib/" file)))
1075 (find-files "." "\\.a$"))))
1076 #t)))))
7bc7ffc2
EF
1077 (home-page "http://x265.org/")
1078 (synopsis "Library for encoding h.265/HEVC video streams")
1079 (description "x265 is a H.265 / HEVC video encoder application library,
1080designed to encode video or images into an H.265 / HEVC encoded bitstream.")
1081 (license license:gpl2+)))
1082
c426e61e
TUBK
1083(define-public libass
1084 (package
1085 (name "libass")
449ad88b 1086 (version "0.14.0")
c426e61e
TUBK
1087 (source (origin
1088 (method url-fetch)
1089 (uri (string-append
1090 "https://github.com/libass/libass/releases/download/"
1091 version "/libass-" version ".tar.xz"))
1092 (sha256
1093 (base32
449ad88b 1094 "18iqznl4mabhj9ywfsz4kwvbsplcv1jjxq50nxssvbj8my1267w8"))))
c426e61e
TUBK
1095 (build-system gnu-build-system)
1096 (native-inputs
1097 `(("pkg-config" ,pkg-config)
449ad88b 1098 ("nasm" ,nasm)))
c426e61e
TUBK
1099 (propagated-inputs
1100 `(("freetype" ,freetype)
1101 ("fribidi" ,fribidi)
1102 ("fontconfig" ,fontconfig)
1103 ("harfbuzz" ,harfbuzz)
1104 ("enca" ,enca)))
1105 (home-page "https://github.com/libass/libass")
1106 (synopsis "Subtitle rendering library for the ASS/SSA format")
1107 (description "libass is a subtitle rendering library for the
1108ASS/SSA (Advanced Substation Alpha/SubStation Alpha) subtitle format.")
ae0bdd81 1109 (license license:isc)))
c426e61e 1110
4d94b93c
TUBK
1111(define-public libcaca
1112 (package
1113 (name "libcaca")
1114 (version "0.99.beta19")
1115 (source (origin
1116 (method url-fetch)
1117 (uri (string-append "http://caca.zoy.org/files/libcaca/libcaca-"
1118 version ".tar.gz"))
1119 (sha256
1120 (base32
1121 "1x3j6yfyxl52adgnabycr0n38j9hx2j74la0hz0n8cnh9ry4d2qj"))))
1122 (build-system gnu-build-system)
1123 (native-inputs `(("pkg-config" ,pkg-config)))
1124 (inputs
1125 `(("freeglut" ,freeglut)
1126 ("ftgl" ,ftgl)
43d51239 1127 ("imlib2" ,imlib2)
4d94b93c
TUBK
1128 ("libx11" ,libx11)
1129 ("mesa" ,mesa)
1130 ("ncurses" ,ncurses)
1131 ("zlib" ,zlib)))
1132 (home-page "http://caca.zoy.org/wiki/libcaca")
1133 (synopsis "Colour ASCII-art library")
1134 (description "libcaca is a graphics library that outputs text instead of
1135pixels, so that it can work on older video cards or text terminals. It
1136supports Unicode, 2048 colors, dithering of color images, and advanced text
1137canvas operations.")
8506fce0 1138 (license license:wtfpl2)))
4d94b93c 1139
3bfb78dc
TUBK
1140(define-public libdca
1141 (package
1142 (name "libdca")
fd13a65c 1143 (version "0.0.7")
3bfb78dc
TUBK
1144 (source (origin
1145 (method url-fetch)
1146 (uri (string-append
b8a31908 1147 "https://download.videolan.org/pub/videolan/libdca/"
3bfb78dc
TUBK
1148 version "/libdca-" version ".tar.bz2"))
1149 (sha256
1150 (base32
fd13a65c 1151 "0sjz0s0nrv7jcpvh1i432x3jza0y5yycmzw84cfncb2qby0i62rs"))))
3bfb78dc 1152 (build-system gnu-build-system)
fd13a65c
TGR
1153 (native-inputs
1154 `(("autoconf" ,autoconf)
1155 ("automake" ,automake)
1156 ("libtool" ,libtool)))
b8a31908 1157 (home-page "https://www.videolan.org/developers/libdca.html")
3bfb78dc
TUBK
1158 (synopsis "DTS Coherent Acoustics decoder")
1159 (description "libdca is a library for decoding DTS Coherent Acoustics
1160streams.")
ae0bdd81 1161 (license license:gpl2+)))
3bfb78dc 1162
99d4c455
TUBK
1163(define-public libdv
1164 (package
1165 (name "libdv")
1166 (version "1.0.0")
1167 (source (origin
1168 (method url-fetch)
1169 (uri (string-append
d2e1a0ac
TGR
1170 "mirror://sourceforge/libdv/libdv/"
1171 version "/libdv-" version ".tar.gz"))
99d4c455
TUBK
1172 (sha256
1173 (base32
1174 "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
1175 (build-system gnu-build-system)
1176 (native-inputs `(("pkg-config" ,pkg-config)))
1177 (inputs `(("libxv" ,libxv)))
1178 (home-page "http://libdv.sourceforge.net/")
1179 (synopsis "DV video (IEC 61834 and SMPTE 314M) codec")
1180 (description "The Quasar DV codec (libdv) is a software codec for DV
1181video, the encoding format used by most digital camcorders, typically those
1182that support the IEEE 1394 (a.k.a. FireWire or i.Link) interface. Libdv was
1183developed according to the official standards for DV video: IEC 61834 and
1184SMPTE 314M.")
ae0bdd81 1185 (license license:lgpl2.1+)))
99d4c455 1186
15f1d02a
GG
1187(define-public libmatroska
1188 (package
1189 (name "libmatroska")
967fa5d0 1190 (version "1.6.2")
15f1d02a
GG
1191 (source
1192 (origin
1193 (method url-fetch)
1194 (uri (string-append "https://dl.matroska.org/downloads/"
309f3408 1195 "libmatroska/libmatroska-" version ".tar.xz"))
15f1d02a 1196 (sha256
967fa5d0 1197 (base32 "140r3q6n4a0n11zaf76lvyxd9gp435dgm8gn7mj0gar2hjm7ji5w"))))
23e24ff6 1198 (build-system cmake-build-system)
15f1d02a
GG
1199 (inputs
1200 `(("libebml" ,libebml)))
23e24ff6
TGR
1201 (arguments
1202 `(#:configure-flags
1203 (list "-DBUILD_SHARED_LIBS=YES")
1204 #:tests? #f)) ; no test suite
15f1d02a 1205 (home-page "https://www.matroska.org")
cb778117 1206 (synopsis "C++ library to parse Matroska files (.mkv and .mka)")
15f1d02a
GG
1207 (description
1208 "Matroska aims to become the standard of multimedia container formats.
cb778117 1209It is based on @dfn{EBML} (Extensible Binary Meta Language), a binary derivative
15f1d02a
GG
1210of XML. EBML enables the Matroska Development Team to gain significant
1211advantages in terms of future format extensibility, without breaking file
1212support in old parsers.
1213libebml is a C++ library to read and write EBML files.")
1214 (license license:lgpl2.1)))
1215
ee3b55ea
TUBK
1216(define-public libva
1217 (package
1218 (name "libva")
167a147d 1219 (version "2.7.1")
ee3b55ea
TUBK
1220 (source
1221 (origin
1222 (method url-fetch)
7035d2dd
MB
1223 (uri (list
1224 ;; Newer releases are only available on GitHub.
1225 (string-append "https://github.com/01org/libva/releases/download/"
1226 version "/libva-" version ".tar.bz2")
1227 ;; Keep the old URL around for compatibility.
1228 (string-append "https://www.freedesktop.org/software/vaapi/releases/"
1229 "libva/libva-" version "/libva-" version ".tar.bz2")))
ee3b55ea 1230 (sha256
167a147d 1231 (base32 "014av7ayyc624xfmr63xhbgg7nw8fynsswj1g2wmk4lnkyfz23x0"))))
ee3b55ea
TUBK
1232 (build-system gnu-build-system)
1233 (native-inputs
1234 `(("pkg-config" ,pkg-config)))
1235 (inputs
1236 `(("libdrm" ,libdrm)
1237 ("libx11" ,libx11)
1238 ("libxext" ,libxext)
1239 ("libxfixes" ,libxfixes)
3ee7b4cc
EF
1240 ("mesa" ,mesa)
1241 ("wayland" ,wayland)))
372cf039
TUBK
1242 (arguments
1243 `(#:phases
1244 (modify-phases %standard-phases
1245 (add-before
1246 'build 'fix-dlopen-paths
1247 (lambda* (#:key outputs #:allow-other-keys)
1248 (let ((out (assoc-ref outputs "out")))
1249 (substitute* "va/drm/va_drm_auth_x11.c"
1250 (("\"libva-x11\\.so\\.%d\"")
d5c88f16
MW
1251 (string-append "\"" out "/lib/libva-x11.so.%d\"")))
1252 #t))))
372cf039
TUBK
1253 ;; Most drivers are in mesa's $prefix/lib/dri, so use that. (Can be
1254 ;; overridden at run-time via LIBVA_DRIVERS_PATH.)
1255 #:configure-flags
1256 (list (string-append "--with-drivers-path="
1257 (assoc-ref %build-inputs "mesa") "/lib/dri"))
1258 ;; However, we can't write to mesa's store directory, so override the
1259 ;; following make variable to install the dummy driver to libva's
1260 ;; $prefix/lib/dri directory.
1261 #:make-flags
1262 (list (string-append "dummy_drv_video_ladir="
1263 (assoc-ref %outputs "out") "/lib/dri"))))
5c1c2254 1264 (home-page "https://www.freedesktop.org/wiki/Software/vaapi/")
ee3b55ea
TUBK
1265 (synopsis "Video acceleration library")
1266 (description "The main motivation for VA-API (Video Acceleration API) is
1267to enable hardware accelerated video decode/encode at various
1268entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
1269standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
ae0bdd81 1270 (license license:expat)))
ee3b55ea 1271
3563220e
TGR
1272(define-public libva-utils
1273 (package
1274 (name "libva-utils")
1275 (version "2.5.0")
1276 (source
1277 (origin
1278 (method url-fetch)
1279 (uri (string-append "https://github.com/intel/libva-utils/releases/download/"
1280 version "/libva-utils-" version ".tar.bz2"))
1281 (sha256
1282 (base32 "05rasyqnsg522zqxak1q8rrm1hys7wwbi41kd0szjq0d27awjf4j"))))
1283 (build-system gnu-build-system)
1284 (arguments
1285 `(#:configure-flags
1286 (list "--enable-wayland"
1287 "--enable-x11")))
1288 (native-inputs
1289 `(("pkg-config" ,pkg-config)))
1290 (inputs
1291 `(("libdrm" ,libdrm)
1292 ("libva" ,libva)
1293 ("libx11" ,libx11)
1294 ("mesa" ,mesa)
1295 ("wayland" ,wayland)))
1296 (home-page "https://01.org/linuxmedia/vaapi")
1297 (synopsis "Collection of testing utilities for VA-API")
1298 (description
1299 "This is a collection of utilities to query and test the @acronym{VA-API,
1300Video Acceleration API} implemented by the libva library.
1301
1302These tools require a supported graphics chip, driver, and VA-API back end to
1303operate properly.")
1304 (license license:expat)))
1305
39efcc9b
AE
1306(define-public ffmpeg
1307 (package
1308 (name "ffmpeg")
edfd70db 1309 (version "4.3.1")
39efcc9b
AE
1310 (source (origin
1311 (method url-fetch)
a1121a7f
EF
1312 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1313 version ".tar.xz"))
39efcc9b
AE
1314 (sha256
1315 (base32
edfd70db 1316 "1yrg9nri54iav86vxy5i8pj51dhikksa04x20d77nc3fsi09405d"))))
39efcc9b
AE
1317 (build-system gnu-build-system)
1318 (inputs
86445c8e
RH
1319 `(("dav1d" ,dav1d)
1320 ("fontconfig" ,fontconfig)
39efcc9b 1321 ("freetype" ,freetype)
8fd43200 1322 ("frei0r-plugins" ,frei0r-plugins)
c8dab7f4 1323 ("gnutls" ,gnutls)
e816b348 1324 ("opus" ,opus)
71241192 1325 ("ladspa" ,ladspa)
d4f12db8 1326 ("lame" ,lame)
84eb265e 1327 ("libaom" ,libaom)
c426e61e 1328 ("libass" ,libass)
5d3609e4 1329 ("libbluray" ,libbluray)
4d94b93c 1330 ("libcaca" ,libcaca)
cc6c0170 1331 ("libcdio-paranoia" ,libcdio-paranoia)
1f61cc10 1332 ("libdrm" ,libdrm)
39efcc9b 1333 ("libtheora" ,libtheora)
bb3df15e 1334 ("libva" ,libva)
f88f0d20 1335 ("libvdpau" ,libvdpau)
39efcc9b 1336 ("libvorbis" ,libvorbis)
dc55b8b2 1337 ("libvpx" ,libvpx)
f88f0d20 1338 ("libx11" ,libx11)
549381d6 1339 ("libx264" ,libx264)
f88f0d20 1340 ("mesa" ,mesa)
71241192 1341 ("openal" ,openal)
71241192 1342 ("pulseaudio" ,pulseaudio)
402d0375
MB
1343 ;; XXX: rav1e depends on rust, which currently only works on x86_64.
1344 ;; See also the related configure flag when changing this.
1345 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1346 (%current-system)))
1347 `(("rav1e" ,rav1e))
1348 '())
85bc5434 1349 ("sdl" ,sdl2)
72bfebf5 1350 ("soxr" ,soxr)
c4c4cc05 1351 ("speex" ,speex)
72bfebf5 1352 ("twolame" ,twolame)
6d777ff9 1353 ("vidstab" ,vidstab)
d505801a 1354 ("x265" ,x265)
67932f86 1355 ("xvid" ,xvid)
b3546174 1356 ("zlib" ,zlib)))
c4c4cc05
JD
1357 (native-inputs
1358 `(("bc" ,bc)
39efcc9b
AE
1359 ("perl" ,perl)
1360 ("pkg-config" ,pkg-config)
824d9dc3 1361 ("texinfo" ,texinfo)
39efcc9b
AE
1362 ("python" ,python-2) ; scripts use interpreter python2
1363 ("speex" ,speex)
c4c4cc05 1364 ("yasm" ,yasm)))
39efcc9b 1365 (arguments
31f9322e 1366 `(#:test-target "fate"
12f92e38
AP
1367 #:configure-flags
1368 ;; possible additional inputs:
1369 ;; --enable-avisynth enable reading of AviSynth script
1370 ;; files [no]
12f92e38
AP
1371 ;; --enable-libaacplus enable AAC+ encoding via libaacplus [no]
1372 ;; --enable-libcelt enable CELT decoding via libcelt [no]
1373 ;; --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
1374 ;; and libraw1394 [no]
1375 ;; --enable-libfaac enable AAC encoding via libfaac [no]
1376 ;; --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no]
1377 ;; --enable-libflite enable flite (voice synthesis) support via
1378 ;; libflite [no]
1379 ;; --enable-libgme enable Game Music Emu via libgme [no]
1380 ;; --enable-libgsm enable GSM de/encoding via libgsm [no]
1381 ;; --enable-libiec61883 enable iec61883 via libiec61883 [no]
1382 ;; --enable-libilbc enable iLBC de/encoding via libilbc [no]
1383 ;; --enable-libmodplug enable ModPlug via libmodplug [no]
1384 ;; --enable-libnut enable NUT (de)muxing via libnut,
1385 ;; native (de)muxer exists [no]
1386 ;; --enable-libopencore-amrnb enable AMR-NB de/encoding via
1387 ;; libopencore-amrnb [no]
1388 ;; --enable-libopencore-amrwb enable AMR-WB decoding via
1389 ;; libopencore-amrwb [no]
1390 ;; --enable-libopencv enable video filtering via libopencv [no]
1391 ;; --enable-libopenjpeg enable JPEG 2000 de/encoding via
1392 ;; OpenJPEG [no]
1393 ;; --enable-librtmp enable RTMP[E] support via librtmp [no]
1394 ;; --enable-libschroedinger enable Dirac de/encoding via
1395 ;; libschroedinger [no]
1396 ;; --enable-libshine enable fixed-point MP3 encoding via
1397 ;; libshine [no]
1398 ;; --enable-libssh enable SFTP protocol via libssh [no]
1399 ;; (libssh2 does not work)
1400 ;; --enable-libstagefright-h264 enable H.264 decoding via
1401 ;; libstagefright [no]
1402 ;; --enable-libutvideo enable Ut Video encoding and decoding via
1403 ;; libutvideo [no]
1404 ;; --enable-libv4l2 enable libv4l2/v4l-utils [no]
12f92e38
AP
1405 ;; --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
1406 ;; --enable-libvo-amrwbenc enable AMR-WB encoding via
1407 ;; libvo-amrwbenc [no]
1408 ;; --enable-libwavpack enable wavpack encoding via libwavpack [no]
1409 ;; --enable-libxavs enable AVS encoding via xavs [no]
1410 ;; --enable-libzmq enable message passing via libzmq [no]
1411 ;; --enable-libzvbi enable teletext support via libzvbi [no]
1412 ;; --enable-opencl enable OpenCL code
12f92e38
AP
1413 '("--enable-avresample"
1414 "--enable-gpl" ; enable optional gpl licensed parts
1415 "--enable-shared"
8fd43200 1416 "--enable-frei0r"
12f92e38 1417 "--enable-fontconfig"
c8dab7f4 1418 "--enable-gnutls"
12f92e38 1419 "--enable-ladspa"
84eb265e 1420 "--enable-libaom"
12f92e38
AP
1421 "--enable-libass"
1422 "--enable-libbluray"
1423 "--enable-libcaca"
1424 "--enable-libcdio"
86445c8e 1425 "--enable-libdav1d"
12f92e38
AP
1426 "--enable-libfreetype"
1427 "--enable-libmp3lame"
1428 "--enable-libopus"
1429 "--enable-libpulse"
402d0375
MB
1430 ,@(if (string-prefix? "x86_64" (or (%current-target-system)
1431 (%current-system)))
1432 '("--enable-librav1e")
1433 '())
12f92e38
AP
1434 "--enable-libsoxr"
1435 "--enable-libspeex"
1436 "--enable-libtheora"
1437 "--enable-libtwolame"
6d777ff9 1438 "--enable-libvidstab"
12f92e38
AP
1439 "--enable-libvorbis"
1440 "--enable-libvpx"
1441 "--enable-libxvid"
1442 "--enable-libx264"
d505801a 1443 "--enable-libx265"
12f92e38 1444 "--enable-openal"
f88f0d20 1445 "--enable-opengl"
1f61cc10 1446 "--enable-libdrm"
12f92e38
AP
1447
1448 "--enable-runtime-cpudetect"
1449
1e2a36e1
EF
1450 ;; The HTML pages take 7.2 MiB
1451 "--disable-htmlpages"
1452
1453 ;; The static libraries are 23 MiB
1454 "--disable-static"
1455
12f92e38
AP
1456 ;; Runtime cpu detection is not implemented on
1457 ;; MIPS, so we disable some features.
1458 "--disable-mips32r2"
c5e1fcd0 1459 "--disable-mipsdsp"
12f92e38
AP
1460 "--disable-mipsdspr2"
1461 "--disable-mipsfpu")
31f9322e 1462 #:phases
f2feb0ce
LC
1463 (modify-phases %standard-phases
1464 (replace
39efcc9b
AE
1465 'configure
1466 ;; configure does not work followed by "SHELL=..." and
1467 ;; "CONFIG_SHELL=..."; set environment variables instead
1468 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1469 (let ((out (assoc-ref outputs "out")))
1470 (substitute* "configure"
47734a56 1471 (("#! /bin/sh") (string-append "#!" (which "sh"))))
39efcc9b
AE
1472 (setenv "SHELL" (which "bash"))
1473 (setenv "CONFIG_SHELL" (which "bash"))
3918ed73
MW
1474 (apply invoke
1475 "./configure"
1476 (string-append "--prefix=" out)
1477 ;; Add $libdir to the RUNPATH of all the binaries.
1478 (string-append "--extra-ldflags=-Wl,-rpath="
1479 out "/lib")
1480 configure-flags))))
457e528e
LC
1481 (add-before
1482 'check 'set-ld-library-path
1483 (lambda _
1484 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1485 ;; running tests.
1486 (let* ((dso (find-files "." "\\.so$"))
1487 (path (string-join (map dirname dso) ":")))
1488 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1489 (setenv "LD_LIBRARY_PATH" path)
27350ef8 1490 #t))))))
702bfbf1 1491 (home-page "https://www.ffmpeg.org/")
39efcc9b
AE
1492 (synopsis "Audio and video framework")
1493 (description "FFmpeg is a complete, cross-platform solution to record,
1494convert and stream audio and video. It includes the libavcodec
1495audio/video codec library.")
ae0bdd81 1496 (license license:gpl2+)))
d5a748e8 1497
3d5a217d
MB
1498;; ungoogled-chromium crashes with ffmpeg 4.3, so stick with this version for
1499;; now. See <https://issues.guix.gnu.org/41987>.
1500(define-public ffmpeg-4.2
1501 (package
1502 (inherit ffmpeg)
1503 (version "4.2.3")
1504 (source (origin
1505 (method url-fetch)
1506 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1507 version ".tar.xz"))
1508 (sha256
1509 (base32
1510 "0cddkb5sma9dzy8i59sfls19rhjlq40zn9mh3x666dqkxl5ckxlx"))))
1511 (arguments
1512 (substitute-keyword-arguments (package-arguments ffmpeg)
1513 ((#:configure-flags flags)
1514 `(delete "--enable-librav1e" ,flags))))))
1515
06079c19
RH
1516(define-public ffmpeg-3.4
1517 (package
1518 (inherit ffmpeg)
66c15f72 1519 (version "3.4.7")
06079c19
RH
1520 (source (origin
1521 (method url-fetch)
1522 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1523 version ".tar.xz"))
1524 (sha256
1525 (base32
66c15f72 1526 "1j7mdk9szrljgv4sdx69bm1pnbb3cldbdxbkr42jbdi9zn11gl7g"))))
84eb265e
AB
1527 (arguments
1528 (substitute-keyword-arguments (package-arguments ffmpeg)
1529 ((#:configure-flags flags)
e68dd68f
LF
1530 `(delete "--enable-libdav1d" (delete "--enable-libaom" (delete "--enable-librav1e"
1531 ,flags))))))
1532 (inputs (alist-delete "dav1d" (alist-delete "libaom" (alist-delete "rav1e"
1533 (package-inputs ffmpeg)))))))
06079c19 1534
1178ae47
RG
1535(define-public ffmpeg-2.8
1536 (package
1537 (inherit ffmpeg)
1538 (version "2.8.16")
1539 (source (origin
1540 (method url-fetch)
1541 (uri (string-append "https://ffmpeg.org/releases/ffmpeg-"
1542 version ".tar.xz"))
1543 (sha256
1544 (base32
1545 "14n0xg22yz1r4apif2idm91s3avcmkz4sl8gyj5763gcy415k2bb"))))
1546 (arguments
1547 `(#:tests? #f ; XXX: Enable them later, if required
1548 #:configure-flags
1549 (list
1550 "--disable-static"
1551 "--enable-shared"
1552 "--extra-cflags=-DFF_API_OLD_ENCODE_VIDEO -DFF_API_OLD_ENCODE_AUDIO")
1553 #:phases
1554 (modify-phases %standard-phases
1555 (replace 'configure
1556 (lambda* (#:key outputs configure-flags #:allow-other-keys)
1557 (let ((out (assoc-ref outputs "out")))
1558 (substitute* "configure"
1559 (("#! /bin/sh") (string-append "#!" (which "sh"))))
1560 ;; configure does not work followed by "SHELL=..." and
1561 ;; "CONFIG_SHELL=..."; set environment variables instead.
1562 (setenv "SHELL" (which "bash"))
1563 (setenv "CONFIG_SHELL" (which "bash"))
1564 (apply invoke
1565 "./configure"
1566 (string-append "--prefix=" out)
1567 ;; Add $libdir to the RUNPATH of all the binaries.
1568 (string-append "--extra-ldflags=-Wl,-rpath="
1569 out "/lib")
1570 configure-flags))))
1571 (add-before
1572 'check 'set-ld-library-path
1573 (lambda _
1574 ;; Allow $(top_builddir)/ffmpeg to find its dependencies when
1575 ;; running tests.
1576 (let* ((dso (find-files "." "\\.so$"))
1577 (path (string-join (map dirname dso) ":")))
1578 (format #t "setting LD_LIBRARY_PATH to ~s~%" path)
1579 (setenv "LD_LIBRARY_PATH" path)
1580 #t))))))))
1581
1faf0a04
NG
1582(define-public ffmpeg-for-stepmania
1583 (hidden-package
1584 (package
1585 (inherit ffmpeg)
1586 (version "2.1.3")
1587 (source
1588 (origin
1589 (method git-fetch)
1590 (uri (git-reference
b0e7b699 1591 (url "https://github.com/stepmania/ffmpeg")
1faf0a04
NG
1592 (commit "eda6effcabcf9c238e4635eb058d72371336e09b")))
1593 (sha256
1594 (base32 "1by8rmbva8mfrivdbbkr2gx4kga89zqygkd4cfjl76nr8mdcdamb"))
1595 (file-name (git-file-name "ffmpeg" version))))
1596 (arguments
1597 (substitute-keyword-arguments (package-arguments ffmpeg)
1598 ((#:configure-flags flags)
1599 '(list "--disable-programs"
1600 "--disable-doc"
1601 "--disable-debug"
1602 "--disable-avdevice"
1603 "--disable-swresample"
1604 "--disable-postproc"
1605 "--disable-avfilter"
1606 "--disable-shared"
1607 "--enable-static"))))
1608 (inputs '()))))
940778c7 1609
4febfdd0
BT
1610(define-public ffmpegthumbnailer
1611 (package
1612 (name "ffmpegthumbnailer")
f1b8ed3f 1613 (version "2.2.2")
4febfdd0 1614 (source (origin
722e6ffe
RW
1615 (method git-fetch)
1616 (uri (git-reference
b0e7b699 1617 (url "https://github.com/dirkvdb/ffmpegthumbnailer")
722e6ffe
RW
1618 (commit version)))
1619 (file-name (git-file-name name version))
4febfdd0
BT
1620 (sha256
1621 (base32
f1b8ed3f 1622 "1bakbr714j7yxdal1f5iq0gcl4cxggbbgj227ihdh5kvygqlwich"))))
4febfdd0
BT
1623 (build-system cmake-build-system)
1624 (native-inputs
1625 `(("pkg-config" ,pkg-config)))
1626 (inputs
1627 `(("ffmpeg" ,ffmpeg)
1628 ("libjpeg-turbo" ,libjpeg-turbo)
1629 ("libpng" ,libpng)
1630 ("gvfs" ,gvfs)))
1631 (arguments
1632 `(#:configure-flags (list "-DENABLE_GIO=ON" "-DENABLE_THUMBNAILER=ON")))
1633 (home-page "https://github.com/dirkvdb/ffmpegthumbnailer")
1634 (synopsis "Create thumbnails from video files")
1635 (description "FFmpegthumbnailer is a lightweight video thumbnailer that
1636can be used by file managers to create thumbnails for your video files. The
1637thumbnailer uses ffmpeg to decode frames from the video files, so supported
1638videoformats depend on the configuration flags of ffmpeg.")
1639 (license license:gpl2+)))
1640
d5a748e8
AE
1641(define-public vlc
1642 (package
1643 (name "vlc")
6ec120b1 1644 (version "3.0.11.1")
d5a748e8 1645 (source (origin
520b18e6
NG
1646 (method url-fetch)
1647 (uri (string-append
1648 "https://download.videolan.org/pub/videolan/vlc/"
1649 (car (string-split version #\-))
1650 "/vlc-" version ".tar.xz"))
1651 (sha256
1652 (base32
6ec120b1 1653 "1f46h0hv7fk35zg4iczlp7ib7h2jmh8m4r5klw3g2558ib9134qq"))))
d5a748e8
AE
1654 (build-system gnu-build-system)
1655 (native-inputs
76277052
MW
1656 `(("flex" ,flex)
1657 ("bison" ,bison)
1658 ("gettext" ,gettext-minimal)
d5a748e8
AE
1659 ("pkg-config" ,pkg-config)))
1660 ;; FIXME: Add optional inputs once available.
1661 (inputs
1662 `(("alsa-lib" ,alsa-lib)
1663 ("avahi" ,avahi)
1664 ("dbus" ,dbus)
76277052 1665 ("eudev" ,eudev)
d5a748e8 1666 ("flac" ,flac)
76277052 1667 ("ffmpeg" ,ffmpeg)
d5a748e8
AE
1668 ("fontconfig" ,fontconfig)
1669 ("freetype" ,freetype)
76277052 1670 ("fribidi" ,fribidi)
d5a748e8 1671 ("gnutls" ,gnutls)
8824da4c 1672 ("liba52" ,liba52)
76277052
MW
1673 ("libarchive" ,libarchive)
1674 ("libass" ,libass)
1675 ("libavc1394" ,libavc1394)
1676 ("libbluray" ,libbluray)
1677 ("libcaca" ,libcaca)
d5a748e8 1678 ("libcddb" ,libcddb)
76277052 1679 ("libdca" ,libdca)
72b6a894 1680 ("libdvbpsi" ,libdvbpsi)
76277052
MW
1681 ("libdvdnav" ,libdvdnav)
1682 ("libdvdread" ,libdvdread)
1683 ("libebml" ,libebml)
d5a748e8 1684 ("libgcrypt" ,libgcrypt)
76277052 1685 ("libidn" ,libidn)
d5a748e8
AE
1686 ("libkate" ,libkate)
1687 ("libmad" ,libmad)
76277052 1688 ("libmatroska" ,libmatroska)
78d112c2 1689 ("libmicrodns" ,libmicrodns)
76277052
MW
1690 ("libmodplug" ,libmodplug)
1691 ("libmpeg2" ,libmpeg2)
d5a748e8
AE
1692 ("libogg" ,libogg)
1693 ("libpng" ,libpng)
76277052
MW
1694 ("libraw1394" ,libraw1394)
1695 ("librsvg" ,librsvg)
d5a748e8 1696 ("libsamplerate" ,libsamplerate)
76277052 1697 ("libsecret" ,libsecret)
d5a748e8 1698 ("libssh2" ,libssh2)
76277052
MW
1699 ("libupnp" ,libupnp)
1700 ("libva" ,libva)
1701 ("libvdpau" ,libvdpau)
d5a748e8 1702 ("libvorbis" ,libvorbis)
26986544 1703 ("libvpx" ,libvpx)
d5a748e8 1704 ("libtheora" ,libtheora)
76277052 1705 ("libx264" ,libx264)
d5a748e8 1706 ("libxext" ,libxext)
c161c22a 1707 ("libxi" ,libxi)
d5a748e8
AE
1708 ("libxinerama" ,libxinerama)
1709 ("libxml2" ,libxml2)
1710 ("libxpm" ,libxpm)
2aaa5729 1711 ("livemedia-utils" ,livemedia-utils)
76277052 1712 ("lua" ,lua-5.2)
d5a748e8
AE
1713 ("mesa" ,mesa)
1714 ("opus" ,opus)
1715 ("perl" ,perl)
1716 ("pulseaudio" ,pulseaudio)
fc2982f7 1717 ("protobuf" ,protobuf)
d5a748e8 1718 ("python" ,python-wrapper)
552c3e95 1719 ("qtbase" ,qtbase)
76277052 1720 ("qtsvg" ,qtsvg)
552c3e95 1721 ("qtx11extras" ,qtx11extras)
76277052 1722 ("samba" ,samba)
d5a748e8
AE
1723 ("sdl" ,sdl)
1724 ("sdl-image" ,sdl-image)
1725 ("speex" ,speex)
76277052
MW
1726 ("speexdsp" ,speexdsp)
1727 ("taglib" ,taglib)
1728 ("twolame" ,twolame)
1729 ("unzip" ,unzip)
1730 ("wayland" ,wayland)
1731 ("wayland-protocols" ,wayland-protocols)
8f5f6c92 1732 ("x265" ,x265)
d5a748e8
AE
1733 ("xcb-util-keysyms" ,xcb-util-keysyms)))
1734 (arguments
1735 `(#:configure-flags
0fe041bd 1736 `("BUILDCC=gcc"
d5a748e8
AE
1737 ,(string-append "LDFLAGS=-Wl,-rpath -Wl,"
1738 (assoc-ref %build-inputs "ffmpeg")
520b18e6 1739 "/lib")) ;needed for the tests
cd76fbde
LC
1740
1741 #:phases
1742 (modify-phases %standard-phases
2d2e97bd 1743 (add-after 'unpack 'patch-source
2aaa5729
CL
1744 (lambda* (#:key inputs #:allow-other-keys)
1745 (let ((livemedia-utils (assoc-ref inputs "livemedia-utils")))
2d2e97bd 1746 (substitute* "configure"
2aaa5729
CL
1747 (("LIVE555_PREFIX=\\$\\{LIVE555_PREFIX-\"/usr\"\\}")
1748 (string-append "LIVE555_PREFIX=" livemedia-utils)))
2d2e97bd
MB
1749 ;; Some of the tests require using the display to test out VLC,
1750 ;; which fails in our sandboxed build system
1751 (substitute* "test/run_vlc.sh"
1752 (("./vlc --ignore-config") "echo"))
2aaa5729 1753 #t)))
76277052 1754 (add-after 'strip 'regenerate-plugin-cache
cd76fbde
LC
1755 (lambda* (#:key outputs #:allow-other-keys)
1756 ;; The 'install-exec-hook' rule in the top-level Makefile.am
1757 ;; generates 'lib/vlc/plugins/plugins.dat', a plugin cache, using
1758 ;; 'vlc-cache-gen'. This file includes the mtime of the plugins
1759 ;; it references. Thus, we first reset the timestamps of all
1760 ;; these files, and then regenerate the cache such that the
1761 ;; mtimes it includes are always zero instead of being dependent
1762 ;; on the build time.
1763 (let* ((out (assoc-ref outputs "out"))
1764 (pkglibdir (string-append out "/lib/vlc"))
1765 (plugindir (string-append pkglibdir "/plugins"))
1766 (cachegen (string-append pkglibdir "/vlc-cache-gen")))
1767 ;; TODO: Factorize 'reset-timestamps'.
1768 (for-each (lambda (file)
1769 (let ((s (lstat file)))
1770 (unless (eq? (stat:type s) 'symlink)
76277052 1771 (utime file 1 1))))
cd76fbde 1772 (find-files plugindir))
76277052
MW
1773 (invoke cachegen plugindir))))
1774 (add-after 'install 'wrap-executable
1775 (lambda* (#:key outputs #:allow-other-keys)
520b18e6
NG
1776 (let ((out (assoc-ref outputs "out"))
1777 (plugin-path (getenv "QT_PLUGIN_PATH")))
1778 (wrap-program (string-append out "/bin/vlc")
1779 `("QT_PLUGIN_PATH" ":" prefix (,plugin-path))))
1780 #t)))))
d5a748e8
AE
1781 (home-page "https://www.videolan.org/")
1782 (synopsis "Audio and video framework")
1783 (description "VLC is a cross-platform multimedia player and framework
1784that plays most multimedia files as well as DVD, Audio CD, VCD, and various
34a19d35 1785streaming protocols.")
ae0bdd81 1786 (license license:gpl2+)))
ace69243
AE
1787
1788(define-public mplayer
1789 (package
1790 (name "mplayer")
59ed95d6 1791 (version "1.4")
ace69243
AE
1792 (source (origin
1793 (method url-fetch)
1794 (uri (string-append
ebde7c7a 1795 "https://www.mplayerhq.hu/MPlayer/releases/MPlayer-"
ace69243
AE
1796 version ".tar.xz"))
1797 (sha256
1798 (base32
59ed95d6 1799 "0j5mflr0wnklxsvnpmxvk704hscyn2785hvvihj2i3a7b3anwnc2"))))
ace69243
AE
1800 (build-system gnu-build-system)
1801 ;; FIXME: Add additional inputs once available.
1802 (native-inputs
a5498025
EF
1803 `(("pkg-config" ,pkg-config)
1804 ("yasm" ,yasm)))
ace69243
AE
1805 (inputs
1806 `(("alsa-lib" ,alsa-lib)
1807 ("cdparanoia" ,cdparanoia)
59ed95d6 1808 ("ffmpeg" ,ffmpeg)
778a6a8b 1809 ("fontconfig" ,fontconfig)
ace69243 1810 ("freetype" ,freetype)
8480bdd3 1811 ("giflib" ,giflib)
ace69243 1812 ("lame" ,lame)
778a6a8b 1813 ("libass" ,libass)
b3546174 1814 ("libdvdcss" ,libdvdcss)
e46aacac
TGR
1815 ("libdvdnav" ,libdvdnav) ; ignored without libdvdread
1816 ("libdvdread" ,libdvdread) ; ignored without libdvdnav
4bd428a7 1817 ("libjpeg" ,libjpeg-turbo)
778a6a8b 1818 ("libmpeg2" ,libmpeg2)
59ed95d6 1819 ("libmpg123" ,mpg123) ; audio codec for MP3
ace69243
AE
1820 ("libpng" ,libpng)
1821 ("libtheora" ,libtheora)
778a6a8b 1822 ("libvdpau" ,libvdpau)
ace69243
AE
1823 ("libvorbis" ,libvorbis)
1824 ("libx11" ,libx11)
778a6a8b 1825 ("libx264" ,libx264)
ace69243
AE
1826 ("libxinerama" ,libxinerama)
1827 ("libxv" ,libxv)
778a6a8b 1828 ("libxxf86dga" ,libxxf86dga)
ace69243 1829 ("mesa" ,mesa)
778a6a8b 1830 ("opus" ,opus)
ace69243
AE
1831 ("perl" ,perl)
1832 ("pulseaudio" ,pulseaudio)
1833 ("python" ,python-wrapper)
1834 ("sdl" ,sdl)
1835 ("speex" ,speex)
ace69243
AE
1836 ("zlib" ,zlib)))
1837 (arguments
59ed95d6 1838 `(#:tests? #f ; no test target
ace69243 1839 #:phases
ebde7c7a
EF
1840 (modify-phases %standard-phases
1841 (replace 'configure
ace69243
AE
1842 ;; configure does not work followed by "SHELL=..." and
1843 ;; "CONFIG_SHELL=..."; set environment variables instead
1844 (lambda* (#:key inputs outputs #:allow-other-keys)
1845 (let ((out (assoc-ref outputs "out"))
1846 (libx11 (assoc-ref inputs "libx11")))
1847 (substitute* "configure"
2564b7c2 1848 (("#! /bin/sh") (string-append "#!" (which "sh"))))
ace69243
AE
1849 (setenv "SHELL" (which "bash"))
1850 (setenv "CONFIG_SHELL" (which "bash"))
1fe5791d 1851 (invoke "./configure"
ace69243
AE
1852 (string-append "--extra-cflags=-I"
1853 libx11 "/include") ; to detect libx11
ebde7c7a 1854 "--disable-ffmpeg_a" ; disables bundled ffmpeg
ace69243 1855 (string-append "--prefix=" out)
fe138965
MW
1856 ;; Enable runtime cpu detection where supported,
1857 ;; and choose a suitable target.
1858 ,@(match (or (%current-target-system)
1859 (%current-system))
1860 ("x86_64-linux"
1861 '("--enable-runtime-cpudetection"
1862 "--target=x86_64-linux"))
1863 ("i686-linux"
1864 '("--enable-runtime-cpudetection"
1865 "--target=i686-linux"))
1866 ("mips64el-linux"
f0d6d835
MW
1867 '("--target=mips3-linux"))
1868 (_ (list (string-append
1869 "--target="
1870 (or (%current-target-system)
1871 (nix-system->gnu-triplet
1872 (%current-system)))))))
1fe5791d 1873 "--disable-iwmmxt")))))))
858b68e4 1874 (home-page "https://www.mplayerhq.hu")
ace69243
AE
1875 (synopsis "Audio and video player")
1876 (description "MPlayer is a movie player. It plays most MPEG/VOB, AVI,
1877Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
1878NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files. One can watch VideoCD,
1879SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
ae0bdd81 1880 (license license:gpl2)))
d0ed39be 1881
1c1178cd
TUBK
1882(define-public mpv
1883 (package
1884 (name "mpv")
954b4c73 1885 (version "0.32.0")
1c1178cd 1886 (source (origin
ce4ac7d5
RW
1887 (method git-fetch)
1888 (uri (git-reference
b0e7b699 1889 (url "https://github.com/mpv-player/mpv")
ce4ac7d5
RW
1890 (commit (string-append "v" version))))
1891 (file-name (git-file-name name version))
1c1178cd
TUBK
1892 (sha256
1893 (base32
954b4c73 1894 "0kmy1q0hp87vq4rpv7py04x8bpg1wmlzaibavmkf713jqp6qy596"))))
1c1178cd
TUBK
1895 (build-system waf-build-system)
1896 (native-inputs
832d60dc 1897 `(("perl" ,perl) ; for zsh completion file
1c1178cd
TUBK
1898 ("pkg-config" ,pkg-config)
1899 ("python-docutils" ,python-docutils)))
3440f12a 1900 ;; Missing features: libguess, V4L2
1c1178cd
TUBK
1901 (inputs
1902 `(("alsa-lib" ,alsa-lib)
1903 ("enca" ,enca)
06079c19 1904 ("ffmpeg" ,ffmpeg)
2d8781a4 1905 ("jack" ,jack-1)
1c1178cd
TUBK
1906 ("ladspa" ,ladspa)
1907 ("lcms" ,lcms)
1908 ("libass" ,libass)
1909 ("libbluray" ,libbluray)
1910 ("libcaca" ,libcaca)
1911 ("libbs2b" ,libbs2b)
1912 ("libcdio-paranoia" ,libcdio-paranoia)
1913 ("libdvdread" ,libdvdread)
1914 ("libdvdnav" ,libdvdnav)
4bd428a7 1915 ("libjpeg" ,libjpeg-turbo)
1c1178cd 1916 ("libva" ,libva)
81c29ccc 1917 ("libvdpau" ,libvdpau)
1c1178cd
TUBK
1918 ("libx11" ,libx11)
1919 ("libxext" ,libxext)
1920 ("libxinerama" ,libxinerama)
1921 ("libxrandr" ,libxrandr)
1922 ("libxscrnsaver" ,libxscrnsaver)
1923 ("libxv" ,libxv)
e66f0dd2
AP
1924 ;; XXX: lua > 5.2 is not currently supported; see
1925 ;; waftools/checks/custom.py
1926 ("lua" ,lua-5.2)
1c1178cd
TUBK
1927 ("mesa" ,mesa)
1928 ("mpg123" ,mpg123)
1929 ("pulseaudio" ,pulseaudio)
1930 ("rsound" ,rsound)
870541d6 1931 ("shaderc" ,shaderc)
08899ee9 1932 ("vulkan-headers" ,vulkan-headers)
e6fcf903 1933 ("vulkan-loader" ,vulkan-loader)
f0b8d83a 1934 ("waf" ,python-waf)
3440f12a 1935 ("wayland" ,wayland)
abc5ef5a 1936 ("wayland-protocols" ,wayland-protocols)
c695fb76 1937 ("libxkbcommon" ,libxkbcommon)
1c1178cd
TUBK
1938 ("youtube-dl" ,youtube-dl)
1939 ("zlib" ,zlib)))
1940 (arguments
1941 '(#:phases
1942 (modify-phases %standard-phases
3df69aaf
TE
1943 (add-after
1944 'unpack 'patch-paths
1945 (lambda* (#:key inputs #:allow-other-keys)
1946 (let ((ytdl (assoc-ref inputs "youtube-dl")))
1947 (substitute* "player/lua/ytdl_hook.lua"
1948 (("\"youtube-dl\",")
1949 (string-append "\"" ytdl "/bin/youtube-dl\",")))
1950 #t)))
a864d407
MB
1951 (add-before 'configure 'build-reproducibly
1952 (lambda _
1953 ;; Somewhere in the build system library dependencies are enumerated
1954 ;; and passed as linker flags, but the order in which they are added
1955 ;; varies. See <https://github.com/mpv-player/mpv/issues/7855>.
1956 ;; Set PYTHONHASHSEED as a workaround for deterministic results.
1957 (setenv "PYTHONHASHSEED" "1")
1958 #t))
1c1178cd 1959 (add-before
f8503e2b 1960 'configure 'setup-waf
1c1178cd 1961 (lambda* (#:key inputs #:allow-other-keys)
a2aa746c
EF
1962 (let ((waf (assoc-ref inputs "waf")))
1963 (copy-file (string-append waf "/bin/waf") "waf"))
d39260dc
MW
1964 (setenv "CC" "gcc")
1965 #t)))
98c8b963 1966 #:configure-flags (list "--enable-libmpv-shared"
43ba5dd4 1967 "--enable-cdda"
43ba5dd4 1968 "--enable-dvdnav"
98c8b963 1969 "--disable-build-date")
1c1178cd
TUBK
1970 ;; No check function defined.
1971 #:tests? #f))
581873b5 1972 (home-page "https://mpv.io/")
1c1178cd
TUBK
1973 (synopsis "Audio and video player")
1974 (description "mpv is a general-purpose audio and video player. It is a
1975fork of mplayer2 and MPlayer. It shares some features with the former
1976projects while introducing many more.")
ae0bdd81 1977 (license license:gpl2+)))
1c1178cd 1978
0e74bb5b 1979(define-public gnome-mpv
b7f5fa82 1980 (deprecated-package "gnome-mpv" celluloid))
0e74bb5b 1981
6ed192a2
EF
1982(define-public mpv-mpris
1983 (package
1984 (name "mpv-mpris")
fe95a078 1985 (version "0.5")
6ed192a2
EF
1986 (source
1987 (origin
1988 (method git-fetch)
1989 (uri (git-reference
1990 (url "https://github.com/hoyon/mpv-mpris")
1991 (commit version)))
1992 (file-name (git-file-name name version))
1993 (sha256
1994 (base32
fe95a078 1995 "07p6li5z38pkfd40029ag2jqx917vyl3ng5p2i4v5a0af14slcnk"))))
2a844af9 1996 (build-system copy-build-system)
6ed192a2 1997 (arguments
2a844af9
EF
1998 '(#:install-plan
1999 '(("mpris.so" "lib/"))
6ed192a2
EF
2000 #:phases
2001 (modify-phases %standard-phases
2a844af9
EF
2002 (add-before 'install 'build
2003 (lambda _
2004 (setenv "CC" (which "gcc"))
2005 (invoke "make"))))))
6ed192a2
EF
2006 (native-inputs
2007 `(("pkg-config" ,pkg-config)))
2008 (inputs
2009 `(("glib" ,glib)
2010 ("mpv" ,mpv)))
2011 (home-page "https://github.com/hoyon/mpv-mpris")
2012 (synopsis "MPRIS plugin for mpv")
2013 (description "This package provides an @dfn{MPRIS} (Media Player Remote
2014Interfacing Specification) plugin for the @code{mpv} media player. It implements
2015@code{org.mpris.MediaPlayer2} and @code{org.mpris.MediaPlayer2.Player} D-Bus
2016interfaces.
2017
2018To load this plugin, specify the following option when starting mpv:
2019@code{--script $GUIX_PROFILE/lib/mpris.so} or link it into
2020@file{$HOME/.config/mpv/scripts}.")
2021 (license license:expat)))
2022
d0ed39be
DT
2023(define-public libvpx
2024 (package
2025 (name "libvpx")
0fd80a25 2026 (version "1.8.2")
d0ed39be 2027 (source (origin
8a464433
MB
2028 ;; XXX: Upstream does not provide tarballs for > 1.6.1.
2029 (method git-fetch)
2030 (uri (git-reference
2031 (url "https://chromium.googlesource.com/webm/libvpx")
2032 (commit (string-append "v" version))))
2033 (file-name (git-file-name name version))
d0ed39be
DT
2034 (sha256
2035 (base32
0fd80a25 2036 "0gyq4fkbd2fv7m1mm9xrvn6rk6f4jsmbv8bnlhingmnrvyncnmnr"))
037d5913 2037 (patches (search-patches "libvpx-CVE-2016-2818.patch"))))
d0ed39be
DT
2038 (build-system gnu-build-system)
2039 (arguments
e896c227 2040 `(#:configure-flags (list "--enable-shared"
1e667df4 2041 "--disable-static"
0e47b4e7
EF
2042 "--as=yasm"
2043 ;; Limit size to avoid CVE-2015-1258
2044 "--size-limit=16384x16384"
e896c227
MB
2045 (string-append "--prefix=" (assoc-ref %outputs "out")))
2046 #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
2047 (assoc-ref %outputs "out") "/lib"))
2048 #:phases (modify-phases %standard-phases
2049 (replace 'configure
2050 (lambda* (#:key configure-flags #:allow-other-keys)
2051 ;; The configure script does not understand some of the GNU
2052 ;; options, so we only add the flags specified above.
2053 (apply invoke "./configure" configure-flags))))
4f8f15cd 2054 #:tests? #f)) ; no check target
d0ed39be
DT
2055 (native-inputs
2056 `(("perl" ,perl)
2057 ("yasm" ,yasm)))
2058 (synopsis "VP8/VP9 video codec")
2059 (description "libvpx is a codec for the VP8/VP9 video compression format.")
ae0bdd81 2060 (license license:bsd-3)
ad7664f6 2061 (home-page "https://www.webmproject.org/")))
615215a5
LC
2062
2063(define-public youtube-dl
2064 (package
2065 (name "youtube-dl")
0f7db2a1 2066 (version "2020.07.28")
615215a5
LC
2067 (source (origin
2068 (method url-fetch)
ff1d80f3
EF
2069 (uri (string-append "https://github.com/ytdl-org/youtube-dl/"
2070 "releases/download/" version "/youtube-dl-"
615215a5
LC
2071 version ".tar.gz"))
2072 (sha256
2073 (base32
0f7db2a1 2074 "1if7xyi7g9rpni1jbs7gv5m12s34qdb15dpfbbjn8120h16y7cqz"))))
615215a5 2075 (build-system python-build-system)
2ad9515c
AV
2076 (arguments
2077 ;; The problem here is that the directory for the man page and completion
2078 ;; files is relative, and for some reason, setup.py uses the
2079 ;; auto-detected sys.prefix instead of the user-defined "--prefix=FOO".
2080 ;; So, we need pass the prefix directly. In addition, make sure the Bash
2081 ;; completion file is called 'youtube-dl' rather than
2082 ;; 'youtube-dl.bash-completion'.
31c58006
LF
2083 `(#:tests? #f ; Many tests fail. The test suite can be run with pytest.
2084 #:phases (modify-phases %standard-phases
2ad9515c
AV
2085 (add-before 'install 'fix-the-data-directories
2086 (lambda* (#:key outputs #:allow-other-keys)
2087 (let ((prefix (assoc-ref outputs "out")))
2088 (mkdir "bash-completion")
2089 (rename-file "youtube-dl.bash-completion"
2090 "bash-completion/youtube-dl")
2091 (substitute* "setup.py"
2092 (("youtube-dl\\.bash-completion")
2093 "bash-completion/youtube-dl")
2094 (("'etc/")
2095 (string-append "'" prefix "/etc/"))
2096 (("'share/")
caa8de70 2097 (string-append "'" prefix "/share/")))
4233e74b 2098 #t)))
7884fc43
BW
2099 (add-after 'install 'install-completion
2100 (lambda* (#:key outputs #:allow-other-keys)
2101 (let* ((out (assoc-ref outputs "out"))
2102 (zsh (string-append out
2103 "/share/zsh/site-functions")))
2104 (mkdir-p zsh)
2105 (copy-file "youtube-dl.zsh"
2106 (string-append zsh "/_youtube-dl"))
caa8de70 2107 #t))))))
615215a5
LC
2108 (synopsis "Download videos from YouTube.com and other sites")
2109 (description
b798dfde 2110 "Youtube-dl is a small command-line program to download videos from
1c911690 2111YouTube.com and many more sites.")
39dc7032 2112 (home-page "https://yt-dl.org")
ae0bdd81 2113 (license license:public-domain)))
e6bdb36a 2114
794223bc
CM
2115(define-public youtube-dl-gui
2116 (package
2117 (name "youtube-dl-gui")
2118 (version "0.3.8")
2119 (source
2120 (origin
2121 (method url-fetch)
2122 (uri (pypi-uri "Youtube-DLG" version))
2123 (sha256
2124 (base32
2125 "0napxwzgls5ik1bxbp99vly32l23xpc4ng5kr24hfhf21ypjyadb"))))
2126 (build-system python-build-system)
2127 (arguments
2128 ;; In Guix, wxpython has not yet been packaged for Python 3.
2129 `(#:python ,python-2
2130 ;; This package has no tests.
2131 #:tests? #f
2132 #:phases
2133 (modify-phases %standard-phases
2134 (add-before 'build 'patch-source
2135 (lambda* (#:key inputs #:allow-other-keys)
2136 ;; The youtube-dl-gui program lets you configure options. Some of
2137 ;; them are problematic, so we change their defaults.
2138 (substitute* "youtube_dl_gui/optionsmanager.py"
2139 ;; When this is true, the builder process will try (and fail) to
2140 ;; write logs to the builder user's home directory.
2141 (("'enable_log': True") "'enable_log': False")
2142 ;; This determines which youtube-dl program youtube-dl-gui will
2143 ;; run. If we don't set this, then youtube-dl-gui might download
2144 ;; an arbitrary copy from the Internet into the user's home
2145 ;; directory and run it, so let's make sure youtube-dl-gui uses
2146 ;; the youtube-dl from the inputs by default.
2147 (("'youtubedl_path': self.config_path")
2148 (string-append "'youtubedl_path': '"
2149 (assoc-ref inputs "youtube-dl")
2150 "/bin'"))
2151 ;; When this is True, when youtube-dl-gui is finished downloading
2152 ;; a file, it will try (and possibly fail) to open the directory
2153 ;; containing the downloaded file. This can fail because it
2154 ;; assumes that xdg-open is in PATH. Unfortunately, simply
2155 ;; adding xdg-utils to the propagated inputs is not enough to
2156 ;; make this work, so for now we set the default to False.
2157 (("'open_dl_dir': True") "'open_dl_dir': False"))
2158 ;; The youtube-dl program from the inputs is actually a wrapper
2159 ;; script written in bash, so attempting to invoke it as a python
2160 ;; script will fail.
2161 (substitute* "youtube_dl_gui/downloaders.py"
2162 (("cmd = \\['python', self\\.youtubedl_path\\]")
2163 "cmd = [self.youtubedl_path]"))
2164 ;; Use relative paths for installing data files so youtube-dl-gui
2165 ;; installs the files relative to its prefix in the store, rather
2166 ;; than relative to /. Also, instead of installing data files into
2167 ;; $prefix/usr/share, install them into $prefix/share for
2168 ;; consistency (see: (standards) Directory Variables).
2169 (substitute* "setup.py"
2170 (("= '/usr/share") "= 'share"))
2171 ;; Update get_locale_file() so it finds the installed localization
2172 ;; files.
2173 (substitute* "youtube_dl_gui/utils.py"
2174 (("os\\.path\\.join\\('/usr', 'share'")
2175 (string-append "os.path.join('"
2176 (assoc-ref %outputs "out")
9dcfd6aa 2177 "', 'share'")))
db37dd91
TGR
2178 #t))
2179 (add-after 'install 'create-desktop-file
2180 (lambda* (#:key outputs #:allow-other-keys)
2181 (let* ((out (assoc-ref outputs "out"))
2182 (applications (string-append out "/share/applications")))
2183 (mkdir-p applications)
2184 (call-with-output-file
2185 (string-append applications "/youtube-dl-gui.desktop")
2186 (lambda (file)
2187 (format
2188 file
2189 "[Desktop Entry]~@
2190 Name=Youtube-dl GUI~@
2191 Comment=Graphical interface to download video with youtube-dl~@
2192 Exec=youtube-dl-gui~@
2193 TryExec=youtube-dl-gui~@
2194 Terminal=false~@
2195 Icon=youtube-dl-gui~@
2196 Type=Application~@
2197 Categories=AudioVideo;Audio;Video;Network~%")))
2198 #t))))))
794223bc
CM
2199 (inputs
2200 `(("python2-wxpython" ,python2-wxpython)
2201 ("youtube-dl" ,youtube-dl)))
2202 (home-page "https://github.com/MrS0m30n3/youtube-dl-gui")
2203 (synopsis
2204 "GUI (Graphical User Interface) for @command{youtube-dl}")
2205 (description
2206 "Youtube-dlG is a GUI (Graphical User Interface) for
2207@command{youtube-dl}. You can use it to download videos from YouTube and any
2208other site that youtube-dl supports.")
2209 (license license:unlicense)))
2210
72fa6667
FS
2211(define-public you-get
2212 (package
2213 (name "you-get")
a4feaef4 2214 (version "0.4.1456")
72fa6667 2215 (source (origin
5d9e3edd
RW
2216 (method git-fetch)
2217 (uri (git-reference
b0e7b699 2218 (url "https://github.com/soimort/you-get")
5d9e3edd
RW
2219 (commit (string-append "v" version))))
2220 (file-name (git-file-name name version))
72fa6667
FS
2221 (sha256
2222 (base32
a4feaef4 2223 "0n6h5qkhjwsxy8rf6n4i8hd8dah38hbvchh9272c53gydgp9lp29"))))
72fa6667 2224 (build-system python-build-system)
72fa6667 2225 (inputs
5e84eab0
TGR
2226 `(("ffmpeg" ,ffmpeg))) ; for multi-part and >=1080p videos
2227 (arguments
2228 `(#:phases
2229 (modify-phases %standard-phases
2230 (add-after 'unpack 'qualify-input-references
2231 ;; Explicitly invoke the input ffmpeg, instead of whichever one
2232 ;; happens to be in the user's $PATH at run time.
2233 (lambda* (#:key inputs #:allow-other-keys)
2234 (let ((ffmpeg (string-append (assoc-ref inputs "ffmpeg")
2235 "/bin/ffmpeg")))
2236 (substitute* "src/you_get/processor/ffmpeg.py"
2237 ;; Don't blindly replace all occurrences of ‘'ffmpeg'’: the
2238 ;; same string is also used when sniffing ffmpeg's output.
2239 (("(FFMPEG == |\\()'ffmpeg'" _ prefix)
2240 (string-append prefix "'" ffmpeg "'")))
2241 #t))))
2242 #:tests? #f)) ; XXX some tests need Internet access
817e91bc 2243 (synopsis "Download videos, audio, or images from Web sites")
72fa6667
FS
2244 (description
2245 "You-Get is a command-line utility to download media contents (videos,
2246audio, images) from the Web. It can use either mpv or vlc for playback.")
2247 (home-page "https://you-get.org/")
2248 (license license:expat)))
2249
6f45e45d
AV
2250(define-public youtube-viewer
2251 (package
2252 (name "youtube-viewer")
90881528 2253 (version "3.7.7")
6f45e45d 2254 (source (origin
6be44578
TGR
2255 (method git-fetch)
2256 (uri (git-reference
b0e7b699 2257 (url "https://github.com/trizen/youtube-viewer")
6be44578
TGR
2258 (commit version)))
2259 (file-name (git-file-name name version))
6f45e45d
AV
2260 (sha256
2261 (base32
90881528 2262 "1gc1b1zm55w2w62ayc6k51l31fswk17b072lpbq65is3ngjg6c98"))))
6f45e45d
AV
2263 (build-system perl-build-system)
2264 (native-inputs
2265 `(("perl-module-build" ,perl-module-build)))
6f45e45d
AV
2266 (inputs
2267 `(("perl-data-dump" ,perl-data-dump)
2268 ("perl-file-sharedir" ,perl-file-sharedir)
2269 ("perl-gtk2" ,perl-gtk2)
2270 ("perl-json" ,perl-json)
b5a26299 2271 ("perl-json-xs" ,perl-json-xs)
6f45e45d
AV
2272 ("perl-libwww" ,perl-libwww)
2273 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
adff7395 2274 ("perl-lwp-useragent-cached" ,perl-lwp-useragent-cached)
6f45e45d 2275 ("perl-mozilla-ca" ,perl-mozilla-ca)
adff7395 2276 ("perl-term-readline-gnu" ,perl-term-readline-gnu)
58637415 2277 ("perl-unicode-linebreak" ,perl-unicode-linebreak)
adff7395 2278 ("xdg-utils" ,xdg-utils)
58637415
TGR
2279
2280 ;; Some videos play without youtube-dl, but others silently fail to.
2281 ("youtube-dl" ,youtube-dl)))
6f45e45d
AV
2282 (arguments
2283 `(#:modules ((guix build perl-build-system)
2284 (guix build utils)
2285 (srfi srfi-26))
619edce5
EF
2286 ;; gtk-2/3 variants are both installed by default but the gtk3 variant
2287 ;; is broken without perl-gtk3.
315b98b9 2288 #:module-build-flags '("--gtk2")
63d99002
AV
2289 #:phases
2290 (modify-phases %standard-phases
58637415
TGR
2291 (add-after 'unpack 'refer-to-inputs
2292 (lambda* (#:key inputs #:allow-other-keys)
2293 (substitute* "lib/WWW/YoutubeViewer.pm"
2294 (("'youtube-dl'")
2295 (format #f "'~a/bin/youtube-dl'"
2296 (assoc-ref inputs "youtube-dl"))))
adff7395
EB
2297 (substitute* '("bin/gtk2-youtube-viewer"
2298 "bin/gtk3-youtube-viewer")
2299 (("'xdg-open'")
2300 (format #f "'~a/bin/xdg-open'"
2301 (assoc-ref inputs "xdg-utils"))))
58637415 2302 #t))
0dd8da0b
EB
2303 (add-after 'install 'install-desktop
2304 (lambda* (#:key outputs #:allow-other-keys)
2305 (let* ((out (assoc-ref outputs "out"))
2306 (sharedir (string-append out "/share")))
2307 (install-file "share/gtk-youtube-viewer.desktop"
2308 (string-append sharedir "/applications"))
2309 (install-file "share/icons/gtk-youtube-viewer.png"
2310 (string-append sharedir "/pixmaps"))
2311 #t)))
63d99002
AV
2312 (add-after 'install 'wrap-program
2313 (lambda* (#:key outputs #:allow-other-keys)
2314 (let* ((out (assoc-ref outputs "out"))
2315 (bin-dir (string-append out "/bin/"))
2316 (site-dir (string-append out "/lib/perl5/site_perl/"))
2317 (lib-path (getenv "PERL5LIB")))
2318 (for-each (cut wrap-program <>
2319 `("PERL5LIB" ":" prefix (,lib-path ,site-dir)))
2320 (find-files bin-dir))
2321 #t))))))
6f45e45d
AV
2322 (synopsis
2323 "Lightweight application for searching and streaming videos from YouTube")
2324 (description
2325 "Youtube-viewer searches and plays YouTube videos in a native player.
2326It comes with various search options; it can search for videos, playlists
2327and/or channels. The videos are streamed directly in a selected video player
2328at the best resolution (customizable) and with closed-captions (if available).
2329Both command-line and GTK2 interface are available.")
2330 (home-page "https://github.com/trizen/youtube-viewer")
2331 (license license:perl-license)))
2332
5d3609e4
TUBK
2333(define-public libbluray
2334 (package
2335 (name "libbluray")
004450f4 2336 (version "1.0.2")
5d3609e4
TUBK
2337 (source (origin
2338 (method url-fetch)
5e3f68e6 2339 (uri (string-append "https://download.videolan.org/videolan/"
5d3609e4
TUBK
2340 name "/" version "/"
2341 name "-" version ".tar.bz2"))
2342 (sha256
2343 (base32
004450f4 2344 "1zxfnw1xbghcj7b3zz5djndv6gwssxda19cz1lrlqrkg8577r7kd"))))
5d3609e4 2345 (build-system gnu-build-system)
6c0cd765 2346 (arguments
d76e2634 2347 `(#:configure-flags '("--disable-bdjava-jar")
6c0cd765
AP
2348 #:phases
2349 (modify-phases %standard-phases
004450f4
TGR
2350 (add-after 'unpack 'refer-to-libxml2-in-.pc-file
2351 ;; Avoid the need to propagate libxml2 by referring to it
2352 ;; directly, as is already done for fontconfig & freetype.
2353 (lambda* (#:key inputs #:allow-other-keys)
2354 (let ((libxml2 (assoc-ref inputs "libxml2")))
2355 (substitute* "configure"
2356 ((" libxml-2.0") ""))
2357 (substitute* "src/libbluray.pc.in"
2358 (("^Libs.private:" field)
2359 (string-append field " -L" libxml2 "/lib -lxml2")))
2360 #t)))
6c0cd765
AP
2361 (add-before 'build 'fix-dlopen-paths
2362 (lambda* (#:key inputs #:allow-other-keys)
2363 (let ((libaacs (assoc-ref inputs "libaacs"))
2364 (libbdplus (assoc-ref inputs "libbdplus")))
2365 (substitute* "src/libbluray/disc/aacs.c"
2366 (("\"libaacs\"")
2367 (string-append "\"" libaacs "/lib/libaacs\"")))
2368 (substitute* "src/libbluray/disc/bdplus.c"
2369 (("\"libbdplus\"")
2370 (string-append "\"" libbdplus "/lib/libbdplus\"")))
2371 #t))))))
2da45ebe 2372 (native-inputs `(("pkg-config" ,pkg-config)))
5d3609e4 2373 (inputs
71ee51a0 2374 `(("fontconfig" ,fontconfig)
5d3609e4 2375 ("freetype" ,freetype)
6c0cd765
AP
2376 ("libaacs" ,libaacs)
2377 ("libbdplus" ,libbdplus)
71ee51a0 2378 ("libxml2" ,libxml2)))
5e3f68e6 2379 (home-page "https://www.videolan.org/developers/libbluray.html")
5d3609e4
TUBK
2380 (synopsis "Blu-Ray Disc playback library")
2381 (description
2382 "libbluray is a library designed for Blu-Ray Disc playback for media
2383players, like VLC or MPlayer.")
ae0bdd81 2384 (license license:lgpl2.1+)))
5d3609e4 2385
e6bdb36a
AE
2386(define-public libdvdread
2387 (package
2388 (name "libdvdread")
29f62363 2389 (version "6.0.2")
e6bdb36a
AE
2390 (source (origin
2391 (method url-fetch)
b8a31908 2392 (uri (string-append "https://download.videolan.org/videolan/"
767b4427
TGR
2393 "libdvdread/" version "/"
2394 "libdvdread-" version ".tar.bz2"))
e6bdb36a
AE
2395 (sha256
2396 (base32
29f62363 2397 "1c7yqqn67m3y3n7nfrgrnzz034zjaw5caijbwbfrq89v46ph257r"))))
e6bdb36a 2398 (build-system gnu-build-system)
e21f3473
RJ
2399 (arguments
2400 `(#:configure-flags '("--with-libdvdcss=yes")))
2401 (native-inputs
2402 `(("pkg-config" ,pkg-config)))
2403 (propagated-inputs
2404 `(("libdvdcss" ,libdvdcss)))
e6bdb36a
AE
2405 (home-page "http://dvdnav.mplayerhq.hu/")
2406 (synopsis "Library for reading video DVDs")
2407 (description
2408 "Libdvdread provides a simple foundation for reading DVD video
2409disks. It provides the functionality that is required to access many
2410DVDs. It parses IFO files, reads NAV-blocks, and performs CSS
2411authentication and descrambling (if an external libdvdcss library is
2412installed).")
ae0bdd81 2413 (license license:gpl2+)))
b027d919 2414
b5b20bda
TD
2415(define-public dvdauthor
2416 (package
2417 (name "dvdauthor")
2418 (version "0.7.2")
2419 (source
2420 (origin
2421 (method url-fetch)
2422 (uri (string-append "mirror://sourceforge/dvdauthor/dvdauthor-"
2423 version ".tar.gz"))
2424 (sha256
2425 (base32
2426 "1drfc47hikfzc9d7hjk34rw10iqw01d2vwmn91pv73ppx4nsj81h"))))
2427 (build-system gnu-build-system)
2428 (inputs
2429 `(("libdvdread" ,libdvdread)
2430 ("libpng" ,libpng)
2431 ("imagemagick" ,imagemagick)
2432 ("libxml2" ,libxml2)
2433 ("freetype" ,freetype)))
2434 (native-inputs
2435 `(("pkg-config" ,pkg-config)))
2436 (synopsis "Generates a DVD-Video movie from a MPEG-2 stream")
2437 (description "@command{dvdauthor} will generate a DVD-Video movie from a
2438MPEG-2 stream containing VOB packets.")
2439 (home-page "http://dvdauthor.sourceforge.net")
2440 (license license:gpl3+)))
2441
b027d919
AE
2442(define-public libdvdnav
2443 (package
2444 (name "libdvdnav")
059a6e9a 2445 (version "6.0.1")
b027d919
AE
2446 (source (origin
2447 (method url-fetch)
b8a31908 2448 (uri (string-append "https://download.videolan.org/videolan/"
0104ed80
TGR
2449 "libdvdnav/" version "/"
2450 "libdvdnav-" version ".tar.bz2"))
b027d919
AE
2451 (sha256
2452 (base32
059a6e9a 2453 "0cv7j8irsv1n2dadlnhr6i1b8pann2ah6xpxic41f04my6ba6rp5"))))
b027d919
AE
2454 (build-system gnu-build-system)
2455 (native-inputs
2456 `(("pkg-config" ,pkg-config)))
2457 (inputs
2458 `(("libdvdread" ,libdvdread)))
2459 (home-page "http://dvdnav.mplayerhq.hu/")
2460 (synopsis "Library for video DVD navigation features")
2461 (description
2462 "Libdvdnav is a library for developers of multimedia
2463applications. It allows easy use of sophisticated DVD navigation features
2464such as DVD menus, multiangle playback and even interactive DVD games. All
2465this functionality is provided through a simple API which provides the DVD
2466playback as a single logical stream of blocks, intermitted by special
2467dvdnav events to report certain conditions. The main usage of libdvdnav is
2468a loop regularly calling a function to get the next block, surrounded by
2469additional calls to tell the library of user interaction. The whole
2470DVD virtual machine and internal playback states are completely
2471encapsulated.")
ae0bdd81 2472 (license license:gpl2+)))
2cd85cf9 2473
a6f710ec
TUBK
2474(define-public libdvdcss
2475 (package
2476 (name "libdvdcss")
c77fb2d6 2477 (version "1.4.2")
a6f710ec
TUBK
2478 (source (origin
2479 (method url-fetch)
b8a31908 2480 (uri (string-append "https://download.videolan.org/pub/"
a6f710ec
TUBK
2481 name "/" version "/"
2482 name "-" version ".tar.bz2"))
2483 (sha256
2484 (base32
c77fb2d6 2485 "0x957zzpf4w2cp8zlk29prj8i2q6hay3lzdzsyz8y3cwxivyvhkq"))))
a6f710ec 2486 (build-system gnu-build-system)
b8a31908 2487 (home-page "https://www.videolan.org/developers/libdvdcss.html")
a6f710ec
TUBK
2488 (synopsis "Library for accessing DVDs as block devices")
2489 (description
2490 "libdvdcss is a simple library designed for accessing DVDs like a block
2491device without having to bother about the decryption.")
ae0bdd81 2492 (license license:gpl2+)))
a6f710ec 2493
2cd85cf9
DT
2494(define-public srt2vtt
2495 (package
2496 (name "srt2vtt")
2497 (version "0.1")
2498 (source (origin
2499 (method url-fetch)
2500 (uri (string-append
152fc959 2501 "https://files.dthompson.us/srt2vtt/srt2vtt-"
2cd85cf9
DT
2502 version ".tar.gz"))
2503 (sha256
2504 (base32
2505 "16b377znjm6qlga5yb8aj7b7bcisa1ghcnj2lrb1d30lvxp4liif"))))
2506 (build-system gnu-build-system)
2507 (inputs
2508 `(("guile" ,guile-2.0)))
2509 (synopsis "SubRip to WebVTT subtitle converter")
2510 (description "srt2vtt converts SubRip formatted subtitles to WebVTT format
2511for use with HTML5 video.")
373cc3b7 2512 (home-page "https://dthompson.us/projects/srt2vtt.html")
ae0bdd81 2513 (license license:gpl3+)))
44726031
AE
2514
2515(define-public avidemux
2516 (package
2517 (name "avidemux")
ce23c5ff 2518 (version "2.7.4")
44726031
AE
2519 (source (origin
2520 (method url-fetch)
2521 (uri (string-append
7d3ac6c0
TGR
2522 "mirror://sourceforge/avidemux/avidemux/" version "/"
2523 "avidemux_" version ".tar.gz"))
44726031
AE
2524 (sha256
2525 (base32
ce23c5ff 2526 "1acdb3m37vdzzbm8mwyibcn8msi7birb5v30qfi7jli5r00src3x"))
fc1adab1 2527 (patches (search-patches "avidemux-install-to-lib.patch"))))
44726031
AE
2528 (build-system cmake-build-system)
2529 (native-inputs
4632e7c7
EF
2530 `(("perl" ,perl)
2531 ("pkg-config" ,pkg-config)
2532 ("python" ,python-wrapper)
2533 ("qttools" ,qttools)
2534 ("yasm" ,yasm)))
44726031
AE
2535 ;; FIXME: Once packaged, add libraries not found during the build.
2536 (inputs
2537 `(("alsa-lib" ,alsa-lib)
2538 ("fontconfig" ,fontconfig)
2539 ("freetype" ,freetype)
2540 ("fribidi" ,fribidi)
2541 ("glu" ,glu)
44726031
AE
2542 ("jack" ,jack-1)
2543 ("lame" ,lame)
4cafe8ad
EF
2544 ("libva" ,libva)
2545 ("libvdpau" ,libvdpau)
44726031
AE
2546 ("libvorbis" ,libvorbis)
2547 ("libvpx" ,libvpx)
2548 ("libxv" ,libxv)
44726031 2549 ("pulseaudio" ,pulseaudio)
3261a732 2550 ("qtbase" ,qtbase)
44726031 2551 ("sqlite" ,sqlite)
44726031
AE
2552 ("zlib" ,zlib)))
2553 (arguments
37f62896 2554 `(#:tests? #f ; no check target
44726031
AE
2555 #:phases
2556 ;; Make sure files inside the included ffmpeg tarball are
2557 ;; patch-shebanged.
ce23c5ff 2558 (let ((ffmpeg "ffmpeg-4.1.4"))
642de36b
TGR
2559 (modify-phases %standard-phases
2560 (add-before 'patch-source-shebangs 'unpack-ffmpeg
2561 (lambda _
2562 (with-directory-excursion "avidemux_core/ffmpeg_package"
2563 (invoke "tar" "xf" (string-append ffmpeg ".tar.bz2"))
2564 (delete-file (string-append ffmpeg ".tar.bz2")))
2565 #t))
2566 (add-after 'patch-source-shebangs 'repack-ffmpeg
2567 (lambda _
2568 (with-directory-excursion "avidemux_core/ffmpeg_package"
2569 (substitute* (string-append ffmpeg "/configure")
2570 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2571 (invoke "tar" "cjf" (string-append ffmpeg ".tar.bz2") ffmpeg
2572 ;; avoid non-determinism in the archive
2573 "--sort=name" "--mtime=@0"
2574 "--owner=root:0" "--group=root:0")
2575 (delete-file-recursively ffmpeg))
2576 #t))
2577 (replace 'configure
2578 (lambda _
2579 ;; Copy-paste settings from the cmake build system.
2580 (setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
2581 (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
2582 #t))
2583 (replace 'build
2584 (lambda* (#:key inputs outputs #:allow-other-keys)
2585 (let* ((out (assoc-ref outputs "out"))
2586 (lib (string-append out "/lib"))
2587 (top (getcwd))
642de36b
TGR
2588 (build_component
2589 (lambda* (component srcdir #:optional (args '()))
2590 (let ((builddir (string-append "build_" component)))
2591 (mkdir builddir)
2592 (with-directory-excursion builddir
2593 (apply invoke "cmake"
2594 "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
2595 (string-append "-DCMAKE_INSTALL_PREFIX=" out)
2596 (string-append "-DCMAKE_INSTALL_RPATH=" lib)
2597 (string-append "-DCMAKE_SHARED_LINKER_FLAGS="
2598 "\"-Wl,-rpath=" lib "\"")
2599 (string-append "-DAVIDEMUX_SOURCE_DIR=" top)
642de36b
TGR
2600 (string-append "../" srcdir)
2601 "-DENABLE_QT5=True"
2602 args)
2603 (invoke "make" "-j"
2604 (number->string (parallel-job-count)))
2605 (invoke "make" "install"))))))
2606 (mkdir out)
2607 (build_component "core" "avidemux_core")
2608 (build_component "cli" "avidemux/cli")
2609 (build_component "qt4" "avidemux/qt4")
2610 (build_component "plugins_common" "avidemux_plugins"
2611 '("-DPLUGIN_UI=COMMON"))
2612 (build_component "plugins_cli" "avidemux_plugins"
2613 '("-DPLUGIN_UI=CLI"))
2614 (build_component "plugins_qt4" "avidemux_plugins"
2615 '("-DPLUGIN_UI=QT4"))
2616 (build_component "plugins_settings" "avidemux_plugins"
2617 '("-DPLUGIN_UI=SETTINGS"))
2618 ;; Remove .exe and .dll file.
2619 (delete-file-recursively
2620 (string-append out "/share/ADM6_addons"))
2621 #t)))
2622 (delete 'install)))))
44726031
AE
2623 (home-page "http://fixounet.free.fr/avidemux/")
2624 (synopsis "Video editor")
2625 (description "Avidemux is a video editor designed for simple cutting,
2626filtering and encoding tasks. It supports many file types, including AVI,
2627DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks
2628can be automated using projects, job queue and powerful scripting
2629capabilities.")
afd9ed5c 2630 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
44726031 2631 ;; Software with various licenses is included, see License.txt.
ae0bdd81 2632 (license license:gpl2+)))
44726031 2633
6f6c8b65
TUBK
2634(define-public vapoursynth
2635 (package
2636 (name "vapoursynth")
33abf95f 2637 (version "49")
6f6c8b65 2638 (source (origin
97ef6df5
RW
2639 (method git-fetch)
2640 (uri (git-reference
b0e7b699 2641 (url "https://github.com/vapoursynth/vapoursynth")
97ef6df5
RW
2642 (commit (string-append "R" version))))
2643 (file-name (git-file-name name version))
6f6c8b65
TUBK
2644 (sha256
2645 (base32
33abf95f 2646 "1d298mlb24nlc2x7pixfbkd0qbpv4c706c32idsgpi96z1spkhvl"))))
6f6c8b65
TUBK
2647 (build-system gnu-build-system)
2648 (native-inputs
2649 `(("autoconf" ,autoconf)
2650 ("automake" ,automake)
2651 ("cython" ,python-cython)
2652 ("libtool" ,libtool)
2653 ("pkg-config" ,pkg-config)
2654 ("python" ,python)
2655 ("yasm" ,yasm)))
2656 (inputs
2657 `(("ffmpeg" ,ffmpeg)
2658 ("libass" ,libass)
f80d5fe0
EF
2659 ("tesseract-ocr" ,tesseract-ocr)
2660 ("zimg" ,zimg)))
6f6c8b65
TUBK
2661 (home-page "http://www.vapoursynth.com/")
2662 (synopsis "Video processing framework")
2663 (description "VapourSynth is a C++ library and Python module for video
2664manipulation. It aims to be a modern rewrite of Avisynth, supporting
2665multithreading, generalized colorspaces, per frame properties, and videos with
2666format changes.")
9a078f48 2667 ;; src/core/cpufeatures only allows x86, ARM or PPC
cda20ee8
EF
2668 (supported-systems (fold delete %supported-systems
2669 '("mips64el-linux" "aarch64-linux")))
6f6c8b65 2670 ;; As seen from the source files.
ae0bdd81 2671 (license license:lgpl2.1+)))
6f6c8b65 2672
67932f86
TUBK
2673(define-public xvid
2674 (package
2675 (name "xvid")
2a42629f 2676 (version "1.3.7")
67932f86
TUBK
2677 (source (origin
2678 (method url-fetch)
2679 (uri (string-append
e661d5c2 2680 "http://downloads.xvid.com/downloads/xvidcore-"
67932f86
TUBK
2681 version ".tar.bz2"))
2682 (sha256
2683 (base32
2a42629f 2684 "1xyg3amgg27zf7188kss7y248s0xhh1vv8rrk0j9bcsd5nasxsmf"))))
67932f86
TUBK
2685 (build-system gnu-build-system)
2686 (native-inputs `(("yasm" ,yasm)))
2687 (arguments
2688 '(#:phases
62fe2d47 2689 (modify-phases %standard-phases
2a42629f 2690 (add-before 'configure 'pre-configure
62fe2d47
EF
2691 (lambda _
2692 (chdir "build/generic")
2693 (substitute* "configure"
9dcfd6aa
MW
2694 (("#! /bin/sh") (string-append "#!" (which "sh"))))
2695 #t)))
2a42629f 2696 #:tests? #f)) ; no test suite
67932f86
TUBK
2697 (home-page "https://www.xvid.com/")
2698 (synopsis "MPEG-4 Part 2 Advanced Simple Profile video codec")
2699 (description "Xvid is an MPEG-4 Part 2 Advanced Simple Profile (ASP) video
2700codec library. It uses ASP features such as b-frames, global and quarter
2701pixel motion compensation, lumi masking, trellis quantization, and H.263, MPEG
2702and custom quantization matrices.")
ae0bdd81 2703 (license license:gpl2+)))
e16fde14 2704
f48feaa2 2705(define-public streamlink
15b283e7
EF
2706 (package
2707 (name "streamlink")
f9d40736 2708 (version "1.4.1")
15b283e7
EF
2709 (source
2710 (origin
2711 (method url-fetch)
2712 (uri (pypi-uri "streamlink" version))
2713 (sha256
2714 (base32
f9d40736 2715 "1s458k8z1lv0w8i82sxs8dys66fwm4yr9j1m7fzp7r0piz8phcpd"))))
15b283e7
EF
2716 (build-system python-build-system)
2717 (home-page "https://github.com/streamlink/streamlink")
2718 (native-inputs
2719 `(("python-freezegun" ,python-freezegun)
2720 ("python-pytest" ,python-pytest)
2721 ("python-mock" ,python-mock)
2722 ("python-requests-mock" ,python-requests-mock)))
2723 (propagated-inputs
2724 `(("python-pysocks" ,python-pysocks)
2725 ("python-websocket-client" ,python-websocket-client)
2726 ("python-iso3166" ,python-iso3166)
2727 ("python-iso639" ,python-iso639)
b42b5afd 2728 ("python-isodate" ,python-isodate)
15b283e7
EF
2729 ("python-pycryptodome" ,python-pycryptodome)
2730 ("python-requests" ,python-requests)
2731 ("python-urllib3" ,python-urllib3)))
2732 (synopsis "Extract streams from various services")
2733 (description "Streamlink is command-line utility that extracts streams
f48feaa2 2734from sites like Twitch.tv and pipes them into a video player of choice.")
15b283e7 2735 (license license:bsd-2)))
f48feaa2 2736
e5e5eb1f 2737(define-public twitchy
04b6e9c5 2738 (let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
e5e5eb1f
OP
2739 (package
2740 (name "twitchy")
04b6e9c5 2741 (version (git-version "3.4" "1" commit))
e5e5eb1f
OP
2742 (source
2743 (origin
2744 (method git-fetch)
2745 (uri (git-reference
b0e7b699 2746 (url "https://github.com/BasioMeusPuga/twitchy")
e5e5eb1f
OP
2747 (commit commit)))
2748 (file-name (git-file-name name version))
2749 (sha256
2750 (base32
04b6e9c5 2751 "0di03h1j9ipp2bbnxxlxz07v87icyg2hmnsr4s7184z5ql8kpzr7"))))
e5e5eb1f
OP
2752 (build-system python-build-system)
2753 (arguments
2754 '(#:phases
2755 (modify-phases %standard-phases
04b6e9c5
TE
2756 (add-after 'unpack 'patch-paths
2757 (lambda* (#:key inputs #:allow-other-keys)
2758 (substitute* "twitchy/twitchy_play.py"
2759 (("\"streamlink ")
2760 (string-append "\"" (assoc-ref inputs "streamlink")
2761 "/bin/streamlink ")))
2762 #t))
e5e5eb1f
OP
2763 (add-before 'check 'check-setup
2764 (lambda _
2765 (setenv "HOME" (getcwd)) ;Needs to write to ‘$HOME’.
ca82bdfd
OP
2766 #t))
2767 (add-after 'install 'install-rofi-plugin
2768 (lambda* (#:key outputs #:allow-other-keys)
2769 (install-file "plugins/rofi-twitchy"
2770 (string-append (assoc-ref outputs "out")
9dcfd6aa
MW
2771 "/bin"))
2772 #t)))))
e5e5eb1f
OP
2773 (inputs
2774 `(("python-requests" ,python-requests)
2775 ("streamlink" ,streamlink)))
2776 (home-page "https://github.com/BasioMeusPuga/twitchy")
2777 (synopsis "Command-line interface for Twitch.tv")
2778 (description
2779 "This package provides a command-line interface for Twitch.tv")
2780 (license license:gpl3+))))
2781
307ad140
RW
2782(define-public mlt
2783 (package
2784 (name "mlt")
5389e030 2785 (version "6.22.1")
307ad140 2786 (source (origin
520b5d06
RW
2787 (method git-fetch)
2788 (uri (git-reference
b0e7b699 2789 (url "https://github.com/mltframework/mlt")
520b5d06
RW
2790 (commit (string-append "v" version))))
2791 (file-name (git-file-name name version))
307ad140
RW
2792 (sha256
2793 (base32
5389e030 2794 "0jxv848ykw0csbnayrd710ylw46m0picfv7rpzsxz1vh4jzs395k"))))
307ad140
RW
2795 (build-system gnu-build-system)
2796 (arguments
7acc52f9 2797 `(#:tests? #f ; no tests
0fe041bd 2798 #:make-flags '("CC=gcc" "CXX=g++")
307ad140
RW
2799 #:configure-flags
2800 (list "--enable-gpl3"
2801 "--enable-gpl")
2802 #:phases
2803 (modify-phases %standard-phases
2804 (add-after
7acc52f9
TGR
2805 'configure 'override-LDFLAGS
2806 (lambda* (#:key outputs #:allow-other-keys)
2807 (substitute* "config.mak"
2808 (("LDFLAGS\\+=")
2809 (string-append "LDFLAGS+=-Wl,-rpath="
2810 (assoc-ref outputs "out")
2811 "/lib ")))
2812 #t)))))
307ad140
RW
2813 (inputs
2814 `(("alsa-lib" ,alsa-lib)
0752dabb 2815 ("ffmpeg" ,ffmpeg)
307ad140 2816 ("fftw" ,fftw)
e7cdd311
MM
2817 ("frei0r-plugins" ,frei0r-plugins)
2818 ("gdk-pixbuf" ,gdk-pixbuf)
2819 ("gtk+" ,gtk+-2)
307ad140
RW
2820 ("libxml2" ,libxml2)
2821 ("jack" ,jack-1)
2822 ("ladspa" ,ladspa)
5389e030
MR
2823 ("libexif" ,libexif)
2824 ("libvorbis" ,libvorbis)
2825 ("rubberband" ,rubberband)
307ad140 2826 ("libsamplerate" ,libsamplerate)
4c7729dc 2827 ("pulseaudio" ,pulseaudio)
e7cdd311
MM
2828 ("qtbase" ,qtbase)
2829 ("qtsvg" ,qtsvg)
307ad140
RW
2830 ("sdl" ,sdl)
2831 ("sox" ,sox)))
2832 (native-inputs
2833 `(("pkg-config" ,pkg-config)))
4c7729dc 2834 (home-page "https://www.mltframework.org/")
307ad140
RW
2835 (synopsis "Author, manage, and run multitrack audio/video compositions")
2836 (description
2837 "MLT is a multimedia framework, designed and developed for television
2838broadcasting. It provides a toolkit for broadcasters, video editors, media
2839players, transcoders, web streamers and many more types of applications. The
2840functionality of the system is provided via an assortment of ready to use
2841tools, XML authoring components, and an extensible plug-in based API.")
42b9541c 2842 (license license:gpl3)))
f464016d 2843
945d985a
DT
2844(define-public v4l-utils
2845 (package
2846 (name "v4l-utils")
fdf1108a 2847 (version "1.16.6")
945d985a
DT
2848 (source (origin
2849 (method url-fetch)
1d4ac724 2850 (uri (string-append "https://linuxtv.org/downloads/v4l-utils"
945d985a
DT
2851 "/v4l-utils-" version ".tar.bz2"))
2852 (sha256
2853 (base32
fdf1108a 2854 "1bkqlrizx0j2rd6ybam2x17bjrpwzl4v4szmnzm3cmixis3w3npr"))))
945d985a
DT
2855 (build-system gnu-build-system)
2856 (arguments
2857 '(#:configure-flags
2858 (list (string-append "--with-udevdir="
2859 (assoc-ref %outputs "out")
0fe041bd 2860 "/lib/udev"))))
945d985a 2861 (native-inputs
4ca077d5
TGR
2862 `(("perl" ,perl)
2863 ("pkg-config" ,pkg-config)))
945d985a
DT
2864 (inputs
2865 `(("alsa-lib" ,alsa-lib)
2866 ("glu" ,glu)
4bd428a7 2867 ("libjpeg" ,libjpeg-turbo)
945d985a 2868 ("libx11" ,libx11)
b37662e2 2869 ("qtbase" ,qtbase)
945d985a
DT
2870 ("eudev" ,eudev)))
2871 (synopsis "Realtime video capture utilities for Linux")
2872 (description "The v4l-utils provide a series of libraries and utilities to
2873be used for realtime video capture via Linux-specific APIs.")
2874 (home-page "https://linuxtv.org/wiki/index.php/V4l-utils")
2875 ;; libv4l2 is LGPL2.1+, while utilities are GPL2 only.
2876 (license (list license:lgpl2.1+ license:gpl2))))
2877
f464016d
DT
2878(define-public obs
2879 (package
2880 (name "obs")
9be18877 2881 (version "25.0.8")
f464016d 2882 (source (origin
2f069a1f
RW
2883 (method git-fetch)
2884 (uri (git-reference
b0e7b699 2885 (url "https://github.com/obsproject/obs-studio")
2f069a1f
RW
2886 (commit version)))
2887 (file-name (git-file-name name version))
f464016d
DT
2888 (sha256
2889 (base32
9be18877 2890 "0j2k65q3wfyfxhvkl6icz4qy0s3kfqhksizy2i3ah7yml266axbj"))))
f464016d 2891 (build-system cmake-build-system)
08858812 2892 (arguments
9be18877
LF
2893 `(#:tests? #f ; no test suite
2894 #:configure-flags
2895 (list (string-append "-DOBS_VERSION_OVERRIDE=" ,version))))
f464016d
DT
2896 (native-inputs
2897 `(("pkg-config" ,pkg-config)))
2898 (inputs
4f98c3c5
EF
2899 `(("alsa-lib" ,alsa-lib)
2900 ("curl" ,curl)
f464016d
DT
2901 ("eudev" ,eudev)
2902 ("ffmpeg" ,ffmpeg)
4f98c3c5 2903 ("fontconfig" ,fontconfig)
f464016d
DT
2904 ("freetype" ,freetype)
2905 ("jack" ,jack-1)
2906 ("jansson" ,jansson)
2907 ("libx264" ,libx264)
2908 ("libxcomposite" ,libxcomposite)
9be18877 2909 ("mbedtls" ,mbedtls-apache)
f464016d
DT
2910 ("mesa" ,mesa)
2911 ("pulseaudio" ,pulseaudio)
90a2309b 2912 ("qtbase" ,qtbase)
900ddbf5 2913 ("qtsvg" ,qtsvg)
90a2309b 2914 ("qtx11extras" ,qtx11extras)
4f98c3c5 2915 ("speex" ,speex)
d4df2032 2916 ("v4l-utils" ,v4l-utils)
f464016d
DT
2917 ("zlib" ,zlib)))
2918 (synopsis "Live streaming software")
2919 (description "Open Broadcaster Software provides a graphical interface for
2920video recording and live streaming. OBS supports capturing audio and video
2921from many input sources such as webcams, X11 (for screencasting), PulseAudio,
2922and JACK.")
2923 (home-page "https://obsproject.com")
f3bd1728 2924 (supported-systems '("x86_64-linux" "i686-linux"))
f464016d 2925 (license license:gpl2+)))
d5650f86
EF
2926
2927(define-public libvdpau
2928 (package
2929 (name "libvdpau")
65ff644e 2930 (version "1.3")
d5650f86
EF
2931 (source
2932 (origin
65ff644e
RH
2933 (method git-fetch)
2934 (uri (git-reference
2935 (url "https://gitlab.freedesktop.org/vdpau/libvdpau.git")
2936 (commit version)))
2937 (file-name (git-file-name name version))
d5650f86
EF
2938 (sha256
2939 (base32
65ff644e
RH
2940 "1fb1nh5apr9kzx9bm2lysjwpyva1s60b2l2p230nqgvb11q25hd2"))))
2941 (build-system meson-build-system)
d5650f86
EF
2942 (native-inputs
2943 `(("pkg-config" ,pkg-config)))
2944 (inputs
3993a28a
MB
2945 `(("libx11" ,libx11 "out")
2946 ("libxext" ,libxext)
2947 ("xorgproto" ,xorgproto)))
d5650f86
EF
2948 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2949 (synopsis "Video Decode and Presentation API")
2950 (description "VDPAU is the Video Decode and Presentation API for UNIX. It
2951provides an interface to video decode acceleration and presentation hardware
2952present in modern GPUs.")
2953 (license (license:x11-style "file://COPYING"))))
3161d32d
EF
2954
2955(define-public vdpauinfo
2956 (package
2957 (name "vdpauinfo")
2958 (version "1.0")
2959 (source
2960 (origin
2961 (method url-fetch)
2962 (uri (string-append "https://secure.freedesktop.org/~aplattner/vdpau/"
2963 name "-" version ".tar.gz"))
2964 (sha256
2965 (base32
2966 "1i2b0k9h8r0lnxlrkgqzmrjakgaw3f1ygqqwzx8w6676g85rcm20"))))
2967 (build-system gnu-build-system)
2968 (native-inputs
2969 `(("pkg-config" ,pkg-config)
2970 ("libx11" ,libx11)))
2971 (propagated-inputs
2972 `(("libvdpau" ,libvdpau)))
2973 (home-page "https://wiki.freedesktop.org/www/Software/VDPAU/")
2974 (synopsis "Tool to query the capabilities of a VDPAU implementation")
2975 (description "Vdpauinfo is a tool to query the capabilities of a VDPAU
2976implementation.")
2977 (license (license:x11-style "file://COPYING"))))
a7d94b54 2978
67df7164
EF
2979(define-public libvdpau-va-gl
2980 (package
2981 (name "libvdpau-va-gl")
2982 (version "0.4.2")
2983 (source
2984 (origin
2985 (method url-fetch)
2986 (uri (string-append "https://github.com/i-rinat/libvdpau-va-gl/"
2987 "releases/download/v" version "/libvdpau-va-gl-"
2988 version ".tar.gz"))
2989 (sha256
2990 (base32
2991 "1x2ag1f2fwa4yh1g5spv99w9x1m33hbxlqwyhm205ssq0ra234bx"))
2992 (patches (search-patches "libvdpau-va-gl-unbundle.patch"))
2993 (modules '((guix build utils)))
6cbee49d
MW
2994 (snippet '(begin (delete-file-recursively "3rdparty")
2995 #t))))
67df7164
EF
2996 (build-system cmake-build-system)
2997 (arguments
2998 '(#:tests? #f)) ; Tests require a running X11 server, with VA-API support.
2999 (native-inputs
3000 `(("libvdpau" ,libvdpau)
3001 ("pkg-config" ,pkg-config)))
3002 (inputs
3003 `(("libva" ,libva)
3004 ("mesa" ,mesa)))
3005 (home-page "https://github.com/i-rinat/libvdpau-va-gl")
3006 (synopsis "VDPAU driver with VA-API/OpenGL backend")
3007 (description
3008 "Many applications can use VDPAU to accelerate portions of the video
3009decoding process and video post-processing to the GPU video hardware. Since
3010there is no VDPAU available on Intel chips, they fall back to different drawing
3011techniques. This driver uses OpenGL under the hood to accelerate drawing and
3012scaling and VA-API (if available) to accelerate video decoding.")
3013 (license license:expat)))
3014
a7d94b54
LC
3015(define-public recordmydesktop
3016 (package
3017 (name "recordmydesktop")
3018 (version "0.3.8.1")
3019 (source (origin
3020 (method url-fetch)
3021 (uri (string-append "mirror://sourceforge/" name "/" name "/"
3022 version "/recordmydesktop-" version ".tar.gz"))
3023 (sha256
3024 (base32
3025 "133kkl5j0r877d41bzj7kj0vf3xm8x80yyx2n8nqxrva304f58ik"))))
3026 (build-system gnu-build-system)
3027 (inputs `(("popt" ,popt)
3028 ("zlib" ,zlib)
3029 ("libx11" ,libx11)
3030 ("libice" ,libice)
3031 ("libsm" ,libsm)
3032 ("libxfixes" ,libxfixes)
3033 ("libxdamage" ,libxdamage)
3034 ("libxext" ,libxext)
ed6ba9cc 3035 ("alsa-lib" ,alsa-lib)
a7d94b54
LC
3036 ("libvorbis" ,libvorbis)
3037 ("libtheora" ,libtheora)))
3038 (home-page "http://recordmydesktop.sourceforge.net/")
3039 (synopsis "Desktop session video recorder")
3040 (description
3041 "recordMyDesktop is a command-line tool that captures the activity in
3042your graphical desktop and encodes it as a video. This is a useful tool for
3043making @dfn{screencasts}.")
3044 (license license:gpl2+)))
d8841cc5 3045
63cd4d53
AV
3046(define-public simplescreenrecorder
3047 (package
3048 (name "simplescreenrecorder")
1825729f 3049 (version "0.4.2")
63cd4d53
AV
3050 (source
3051 (origin
21309b8b
RW
3052 (method git-fetch)
3053 (uri (git-reference
b0e7b699 3054 (url "https://github.com/MaartenBaert/ssr")
21309b8b
RW
3055 (commit version)))
3056 (file-name (git-file-name name version))
63cd4d53
AV
3057 (sha256
3058 (base32
1825729f 3059 "1dzp5yzqlha65crzklx2qlan6ssw1diwzfpc4svd7gnr858q2292"))))
83c92882 3060 (build-system cmake-build-system)
63cd4d53
AV
3061 ;; Although libx11, libxfixes, libxext are listed as build dependencies in
3062 ;; README.md, the program builds and functions properly without them.
3063 ;; As a result, they are omitted. Please add them back if problems appear.
3064 (inputs
3065 `(("alsa-lib" ,alsa-lib)
8332ac03 3066 ("ffmpeg" ,ffmpeg)
63cd4d53
AV
3067 ("glu" ,glu)
3068 ("jack" ,jack-1)
3069 ("libxi" ,libxi)
1825729f 3070 ("libxinerama" ,libxinerama)
63cd4d53 3071 ("pulseaudio" ,pulseaudio)
91562061
MB
3072 ("qtbase" ,qtbase)
3073 ("qtx11extras" ,qtx11extras)))
63cd4d53 3074 (native-inputs `(("pkg-config" ,pkg-config)))
83c92882
TGR
3075 (arguments
3076 `(#:configure-flags
3077 (list "-DWITH_QT5=TRUE")
3078 #:tests? #f)) ; no test suite
63cd4d53 3079 ;; Using HTTPS causes part of the page to be displayed improperly.
10b52f46 3080 (home-page "https://www.maartenbaert.be/simplescreenrecorder/")
63cd4d53
AV
3081 (synopsis "Screen recorder")
3082 (description "SimpleScreenRecorder is an easy to use screen recorder with
3083a graphical user interface. It supports recording the entire screen, or a
3084part of it, and allows encoding in many different codecs and file formats.
3085Other features include a live preview and live streaming.")
3086 (license (list license:gpl3+ ; most files
3087 license:zlib ; glinject/elfhacks.*
3088 license:isc ; glinject/*
3089 license:x11)))) ; build-aux/install-sh
3090
d8841cc5
KK
3091(define-public libsmpeg
3092 (package
3093 (name "libsmpeg")
d7764d42 3094 (version "0.4.5-401")
d8841cc5
KK
3095 (source (origin
3096 (method svn-fetch)
3097 (uri (svn-reference
3098 (url "svn://svn.icculus.org/smpeg/trunk/")
3099 (revision 401))) ; last revision before smpeg2 (for SDL 2.0)
b9af0564 3100 (file-name (string-append name "-" version "-checkout"))
d8841cc5
KK
3101 (sha256
3102 (base32
3103 "18yfkr70lr1x1hc8snn2ldnbzdcc7b64xmkqrfk8w59gpg7sl1xn"))))
3104 (build-system gnu-build-system)
27130ee8
LC
3105 (arguments
3106 ;; libsmpeg fails to build with -std=c++11, which is the default with
3107 ;; GCC 7. Also, 'configure' does CXXFLAGS=$CFLAGS, hence this hack.
3108 '(#:configure-flags '("CFLAGS=-O2 -g -std=c++03")))
d8841cc5
KK
3109 (native-inputs
3110 `(("autoconf" ,autoconf)
3111 ("automake" ,automake)))
3112 (inputs
3113 `(("sdl" ,sdl2)))
84f19b1d 3114 (home-page "https://icculus.org/smpeg/")
d8841cc5
KK
3115 (synopsis "SDL MPEG decoding library")
3116 (description
3117 "SMPEG (SDL MPEG Player Library) is a free MPEG1 video player library
3118with sound support. Video playback is based on the ubiquitous Berkeley MPEG
3119player, mpeg_play v2.2. Audio is played through a slightly modified mpegsound
3120library, part of splay v0.8.2. SMPEG supports MPEG audio (MP3), MPEG-1 video,
3121and MPEG system streams.")
3122 (license (list license:expat
3123 license:lgpl2.1
3124 license:lgpl2.1+
3125 license:gpl2))))
4df07622 3126
d7764d42
RW
3127;; for btanks
3128(define-public libsmpeg-with-sdl1
3129 (package (inherit libsmpeg)
3130 (name "libsmpeg")
3131 (version "0.4.5-399")
3132 (source (origin
3133 (method svn-fetch)
3134 (uri (svn-reference
3135 (url "svn://svn.icculus.org/smpeg/trunk/")
3136 (revision 399))) ; tagged release 0.4.5
3137 (file-name (string-append name "-" version "-checkout"))
3138 (sha256
3139 (base32
3140 "0jfi085rf3fa5xsn0vd3nqf32my8ph9c6a9445y7a8lrlz4dms64"))))
3141 (inputs
3142 `(("sdl" ,sdl)))))
3143
4df07622
AP
3144(define-public libbdplus
3145 (package
3146 (name "libbdplus")
3147 (version "0.1.2")
3148 (source
3149 (origin
3150 (method url-fetch)
6f13c4fd 3151 (uri (string-append "https://ftp.videolan.org/pub/videolan/libbdplus/"
4df07622
AP
3152 version "/" name "-" version ".tar.bz2"))
3153 (sha256
3154 (base32 "02n87lysqn4kg2qk7d1ffrp96c44zkdlxdj0n16hbgrlrpiwlcd6"))))
3155 (inputs
3156 `(("libgcrypt" ,libgcrypt)))
3157 (build-system gnu-build-system)
b8a31908 3158 (home-page "https://www.videolan.org/developers/libbdplus.html")
4df07622
AP
3159 (synopsis "Library for decrypting certain Blu-Ray discs")
3160 (description "libbdplus is a library which implements the BD+ System
3161specifications.")
3162 (license license:lgpl2.1+)))
8dd6fc51
AP
3163
3164(define-public libaacs
3165 (package
3166 (name "libaacs")
24128818 3167 (version "0.11.0")
8dd6fc51
AP
3168 (source
3169 (origin
3170 (method url-fetch)
6c2481ef 3171 (uri (string-append "https://ftp.videolan.org/pub/videolan/libaacs/"
5a462ea8 3172 version "/libaacs-" version ".tar.bz2"))
8dd6fc51 3173 (sha256
24128818 3174 (base32 "11skjqjlldmbjkyxdcz4fmcn6y4p95r1xagbcnjy4ndnzf0l723d"))))
8dd6fc51
AP
3175 (inputs
3176 `(("libgcrypt" ,libgcrypt)))
3177 (native-inputs
3178 `(("bison" ,bison)
3179 ("flex" ,flex)))
3180 (build-system gnu-build-system)
b8a31908 3181 (home-page "https://www.videolan.org/developers/libaacs.html")
8dd6fc51
AP
3182 (synopsis "Library for decrypting certain Blu-Ray discs")
3183 (description "libaacs is a library which implements the Advanced Access
3184Content System specification.")
3185 (license license:lgpl2.1+)))
05234973 3186
3187(define-public mps-youtube
3188 (package
3189 (name "mps-youtube")
c53fa8c8 3190 (version "0.2.8")
05234973 3191 (source
3192 (origin
e0a80ee4
RW
3193 (method git-fetch)
3194 (uri (git-reference
b0e7b699 3195 (url "https://github.com/mps-youtube/mps-youtube")
e0a80ee4
RW
3196 (commit (string-append "v" version))))
3197 (file-name (git-file-name name version))
05234973 3198 (sha256
3199 (base32
e0a80ee4 3200 "1w1jhw9rg3dx7vp97cwrk5fymipkcy2wrbl1jaa38ivcjhqg596y"))))
05234973 3201 (build-system python-build-system)
175d6264 3202 (arguments
3203 ;; Tests need to be disabled until #556 upstream is fixed. It reads as if the
3204 ;; test suite results differ depending on the country and also introduce
3205 ;; non-determinism in the tests.
3206 ;; https://github.com/mps-youtube/mps-youtube/issues/556
3207 `(#:tests? #f))
05234973 3208 (propagated-inputs
3209 `(("python-pafy" ,python-pafy)
3210 ("python-pygobject" ,python-pygobject))) ; For mpris2 support
3211 (home-page "https://github.com/mps-youtube/mps-youtube")
3212 (synopsis "Terminal based YouTube player and downloader")
3213 (description
3214 "@code{mps-youtube} is based on mps, a terminal based program to
3215search, stream and download music. This implementation uses YouTube as
3216a source of content and can play and download video as well as audio.
3217It can use either mpv or mplayer for playback, and for conversion of
3218formats ffmpeg or libav is used. Users should install one of the
3219supported players in addition to this package.")
3220 (license license:gpl3+)))
fe047e13
EB
3221
3222(define-public handbrake
3223 (package
3224 (name "handbrake")
89528896 3225 (version "1.3.3")
fe047e13
EB
3226 (source (origin
3227 (method url-fetch)
147499a4
TGR
3228 (uri (string-append "https://github.com/HandBrake/HandBrake/"
3229 "releases/download/" version "/"
3230 "HandBrake-" version "-source.tar.bz2"))
fe047e13
EB
3231 (sha256
3232 (base32
89528896 3233 "11bzhyp052bmng5119x74xvdj5632smx6qsk537ygda8bzckg2i1"))
fe047e13
EB
3234 (modules '((guix build utils)))
3235 (snippet
37b82ccc
EB
3236 ;; Remove "contrib" and source not necessary for
3237 ;; building/running under a GNU environment.
fe047e13 3238 '(begin
37b82ccc 3239 (for-each delete-file-recursively
dc3e62a4 3240 '("contrib" "macosx" "win")) ; 540KiB, 11MiB, 5.9MiB resp.
37b82ccc
EB
3241 (substitute* "make/include/main.defs"
3242 ;; Disable unconditional inclusion of "contrib" libraries
3243 ;; (ffmpeg, libvpx, libdvdread, libdvdnav, and libbluray),
3244 ;; which would lead to fetching and building of these
3245 ;; libraries. Use our own instead.
3246 (("MODULES \\+= contrib") "# MODULES += contrib"))
dc3e62a4 3247 #t))))
fe047e13
EB
3248 (build-system glib-or-gtk-build-system)
3249 (native-inputs
dc3e62a4 3250 `(("automake" ,automake) ; GUI subpackage must be bootstrapped
fe047e13 3251 ("autoconf" ,autoconf)
fe047e13
EB
3252 ("intltool" ,intltool)
3253 ("libtool" ,libtool)
3254 ("pkg-config" ,pkg-config)
dc3e62a4 3255 ("python" ,python-2))) ; For configuration
fe047e13
EB
3256 (inputs
3257 `(("bzip2" ,bzip2)
3258 ("dbus-glib" ,dbus-glib)
37b82ccc 3259 ("ffmpeg" ,ffmpeg)
fe047e13
EB
3260 ("fontconfig" ,fontconfig)
3261 ("freetype" ,freetype)
3262 ("glib" ,glib)
3263 ("gstreamer" ,gstreamer)
3264 ("gst-plugins-base" ,gst-plugins-base)
3265 ("gtk+" ,gtk+)
37b82ccc 3266 ("jansson" ,jansson)
fe047e13
EB
3267 ("lame" ,lame)
3268 ("libass" ,libass)
3269 ("libbluray" ,libbluray)
dc3e62a4 3270 ("libdav1d" ,dav1d)
fe047e13
EB
3271 ("libdvdnav" ,libdvdnav)
3272 ("libdvdread" ,libdvdread)
3273 ("libgudev" ,libgudev)
3274 ("libmpeg2" ,libmpeg2)
3275 ("libnotify" ,libnotify)
dc3e62a4 3276 ("libnuma" ,numactl)
fe047e13 3277 ("libogg" ,libogg)
37b82ccc 3278 ("libopus" ,opus)
fe047e13
EB
3279 ("libsamplerate" ,libsamplerate)
3280 ("libtheora" ,libtheora)
3281 ("libvorbis" ,libvorbis)
3282 ("libvpx" ,libvpx)
3283 ("libxml2" ,libxml2)
3284 ("libx264" ,libx264)
4bdd41bb 3285 ("speex" ,speex)
fe047e13
EB
3286 ("x265" ,x265)
3287 ("zlib" ,zlib)))
3288 (arguments
3289 `(#:tests? #f ;tests require Ruby and claim to be unsupported
37b82ccc 3290 #:configure-flags
4bdd41bb 3291 (list "--disable-gtk-update-checks"
dc3e62a4 3292 "--disable-nvenc"
4bdd41bb 3293 (string-append "CPPFLAGS=-I"
37b82ccc
EB
3294 (assoc-ref %build-inputs "libxml2")
3295 "/include/libxml2")
3296 "LDFLAGS=-lx265")
fe047e13
EB
3297 #:phases
3298 (modify-phases %standard-phases
189be331 3299 (replace 'bootstrap
fe047e13
EB
3300 ;; Run bootstrap ahead of time so that shebangs get patched.
3301 (lambda _
3302 (setenv "CONFIG_SHELL" (which "sh"))
fe047e13
EB
3303 ;; Patch the Makefile so that it doesn't bootstrap again.
3304 (substitute* "gtk/module.rules"
dc3e62a4
EB
3305 ((".*autoreconf.*") ""))
3306 (with-directory-excursion "gtk"
3307 (invoke "autoreconf" "-fiv"))))
3308 (add-before 'configure 'patch-SHELL
3309 (lambda _
3310 (substitute* "gtk/po/Makefile.in.in"
3311 (("SHELL = /bin/sh") "SHELL = @SHELL@"))
3312 #t))
3313 (add-before 'configure 'relax-reqs
3314 (lambda _
3315 (substitute* "make/configure.py"
3316 ;; cmake is checked for so that it can be used to build
3317 ;; contrib/harfbuzz and contrib/x265, but we get these as
3318 ;; inputs, so don't abort if it's not found. Similarly, meson
3319 ;; and ninja are only needed for contrib/libdav1d, and nasm
3320 ;; only for libvpx
3321 (("((cmake|meson|ninja|nasm) *=.*abort=)True" _ &)
3322 (string-append & "False")))
3323 #t))
fe047e13
EB
3324 (replace 'configure
3325 (lambda* (#:key outputs configure-flags #:allow-other-keys)
3326 ;; 'configure' is not an autoconf-generated script, and
3327 ;; errors on unrecognized arguments,
3328 ;; e.g. --enable-fast-install
3329 (let ((out (assoc-ref outputs "out")))
da6f345c
TGR
3330 (apply invoke "./configure"
3331 (string-append "--prefix=" out)
3332 (or configure-flags '())))))
fe047e13
EB
3333 (add-after 'configure 'chdir-build
3334 (lambda _ (chdir "./build") #t)))))
3335 (home-page "https://handbrake.fr")
3336 (synopsis "Video transcoder")
3337 (description
3338 "HandBrake is a tool for converting video from any format to a selection
3339of modern, widely supported codecs.")
37b82ccc
EB
3340 ;; Some under GPLv2+, some under LGPLv2.1+, and portions under BSD3.
3341 ;; Combination under GPLv2. See LICENSE.
3342 (license license:gpl2)))
590abe01 3343
d8d7565b
TGR
3344(define-public intel-vaapi-driver
3345 (package
3346 (name "intel-vaapi-driver")
a0cfa1e2 3347 (version "2.4.1")
d8d7565b
TGR
3348 (source
3349 (origin
a0cfa1e2
TGR
3350 (method git-fetch)
3351 (uri (git-reference
3352 (url "https://github.com/intel/intel-vaapi-driver")
3353 (commit version)))
d8d7565b 3354 (sha256
a0cfa1e2
TGR
3355 (base32 "1cidki3av9wnkgwi7fklxbg3bh6kysf8w3fk2qadjr05a92mx3zp"))
3356 (file-name (git-file-name name version))))
d8d7565b
TGR
3357 (build-system gnu-build-system)
3358 (native-inputs
a0cfa1e2
TGR
3359 `(("autoconf" ,autoconf)
3360 ("automake" ,automake)
3361 ("libtool" ,libtool)
3362 ("pkg-config" ,pkg-config)))
d8d7565b
TGR
3363 (inputs
3364 `(("libdrm" ,libdrm)
3365 ("libva" ,libva)
3366 ("libx11" ,libx11)))
3367 (arguments
3368 `(#:phases
3369 (modify-phases %standard-phases
3370 (add-before 'configure 'set-target-directory
3371 (lambda* (#:key outputs #:allow-other-keys)
3372 (let ((out (assoc-ref outputs "out")))
3373 (setenv "LIBVA_DRIVERS_PATH" (string-append out "/lib/dri"))
3374 #t))))))
3375 ;; XXX Because of <https://issues.guix.gnu.org/issue/22138>, we need to add
3376 ;; this to all VA-API back ends instead of once to libva.
3377 (native-search-paths
3378 (list (search-path-specification
3379 (variable "LIBVA_DRIVERS_PATH")
3380 (files '("lib/dri")))))
3935507f 3381 (supported-systems '("i686-linux" "x86_64-linux"))
d8d7565b
TGR
3382 (home-page "https://01.org/linuxmedia/vaapi")
3383 (synopsis "VA-API video acceleration driver for Intel GEN Graphics devices")
3384 (description
3385 "This is the @acronym{VA-API, Video Acceleration API} back end required for
3386hardware-accelerated video processing on Intel GEN Graphics devices supported by
3387the i915 driver, such as integrated Intel HD Graphics. It provides access to
3388both hardware and shader functionality for faster encoding, decoding, and
3389post-processing of video formats like MPEG2, H.264/AVC, and VC-1.")
3390 (license (list license:bsd-2 ; src/gen9_vp9_const_def.c
3391 license:expat)))) ; the rest, excluding the test suite
3392
590abe01
JN
3393(define-public openh264
3394 (package
3395 (name "openh264")
4fbe53a5 3396 (version "2.1.1")
590abe01 3397 (source (origin
20ab6851
MB
3398 (method git-fetch)
3399 (uri (git-reference
3400 (url "https://github.com/cisco/openh264")
3401 (commit (string-append "v" version))))
3402 (file-name (git-file-name name version))
590abe01
JN
3403 (sha256
3404 (base32
4fbe53a5 3405 "0ffav46pz3sbj92nipd62z03fibyqgclfq9w8lgr80s6za6zdk5s"))))
590abe01
JN
3406 (build-system gnu-build-system)
3407 (native-inputs
3408 `(("nasm" ,nasm)
3409 ("python" ,python)))
3410 (arguments
8363a835
EF
3411 '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
3412 "CC=gcc")
590abe01
JN
3413 #:test-target "test"
3414 #:phases (modify-phases %standard-phases
3415 ;; no configure script
3416 (delete 'configure))))
e11639f3 3417 (home-page "https://www.openh264.org/")
590abe01
JN
3418 (synopsis "H264 decoder library")
3419 (description
3420 "Openh264 is a library which can decode H264 video streams.")
3421 (license license:bsd-2)))
3a44c7bb 3422
3423(define-public libmp4v2
3424 (package
3425 (name "libmp4v2")
3426 (version "2.0.0")
3427 (source
3428 (origin
3429 (method url-fetch)
3430 ;; XXX: The new location of upstream is uncertain and will become relevant the
3431 ;; moment when the googlecode archive shuts down. It is past the date it
3432 ;; should've been turned off. I tried to communicate with upstream, but this
3433 ;; wasn't very responsive and not very helpful. The short summary is, it is
3434 ;; chaos when it comes to the amount of forks and only time will tell where
3435 ;; the new upstream location is.
3436 (uri (string-append "https://storage.googleapis.com/google-"
3437 "code-archive-downloads/v2/"
3438 "code.google.com/mp4v2/mp4v2-" version ".tar.bz2"))
3439 (file-name (string-append name "-" version ".tar.bz2"))
995c30d0 3440 (patches (search-patches "libmp4v2-c++11.patch"))
3a44c7bb 3441 (sha256
3442 (base32
3443 "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683"))))
3444 (build-system gnu-build-system)
3445 (outputs '("out"
3446 "static")) ; 3.7MiB .a file
3447 (arguments
3448 `(#:phases
3449 (modify-phases %standard-phases
3450 (add-after 'unpack 'remove-dates
3451 (lambda _
3452 ;; Make the build reproducible.
3453 (substitute* "configure"
3454 (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"")
3455 (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\""))
3456 #t))
3457 (add-after 'install 'move-static-libraries
3458 (lambda* (#:key outputs #:allow-other-keys)
3459 ;; Move static libraries to the "static" output.
3460 (let* ((out (assoc-ref outputs "out"))
3461 (lib (string-append out "/lib"))
3462 (static (assoc-ref outputs "static"))
3463 (slib (string-append static "/lib")))
3464 (mkdir-p slib)
3465 (for-each (lambda (file)
3466 (install-file file slib)
3467 (delete-file file))
3468 (find-files lib "\\.a$"))
3469 #t))))))
3470 (native-inputs
3471 `(("help2man" ,help2man)
3472 ("dejagnu" ,dejagnu)))
3473 (home-page "https://code.google.com/archive/p/mp4v2/")
3474 (synopsis "API to create and modify mp4 files")
3475 (description
3476 "The MP4v2 library provides an API to create and modify mp4 files as defined by
3477ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime
3478file format that has been used as a multimedia file format in a variety of platforms and
3479applications. It is a very powerful and extensible format that can accommodate
3480practically any type of media.")
3481 (license license:mpl1.1)))
e0c40707
EJ
3482
3483(define-public libmediainfo
3484 (package
3485 (name "libmediainfo")
39838975 3486 (version "20.08")
e0c40707
EJ
3487 (source (origin
3488 (method url-fetch)
3489 (uri (string-append "https://mediaarea.net/download/source/"
7ae5d7d7
MR
3490 name "/" version "/"
3491 name "_" version ".tar.xz"))
e0c40707
EJ
3492 (sha256
3493 (base32
39838975 3494 "19n8h9jq42b6r3dbag77fzwfksfywszmzpi636w87fvc1nqldlqj"))))
e0c40707
EJ
3495 ;; TODO add a Big Buck Bunny webm for tests.
3496 (native-inputs
3497 `(("autoconf" ,autoconf)
3498 ("automake" ,automake)
3499 ("libtool" ,libtool)
3500 ("pkg-config" ,pkg-config)
3501 ("zlib" ,zlib)
3502 ("tinyxml2" ,tinyxml2)
3503 ("curl" ,curl)
3504 ("libzen" ,libzen)))
3505 (build-system gnu-build-system)
3506 (arguments
3507 '(#:tests? #f ; see above TODO
3508 #:phases
3509 ;; build scripts not in root of archive
3510 (modify-phases %standard-phases
0cae36b5 3511 (add-after 'unpack 'change-to-build-dir
e0c40707 3512 (lambda _
0cae36b5 3513 (chdir "Project/GNU/Library")
1d05b683 3514 #t)))))
e0c40707
EJ
3515 (home-page "https://mediaarea.net/en/MediaInfo")
3516 (synopsis "Library for retrieving media metadata")
3517 (description "MediaInfo is a library used for retrieving technical
3518information and other metadata about audio or video files. A non-exhaustive
3519list of the information MediaInfo can retrieve from media files include:
3520
3521@itemize
3522@item General: title, author, director, album, track number, date, duration...
3523@item Video: codec, aspect, fps, bitrate...
3524@item Audio: codec, sample rate, channels, language, bitrate...
3525@item Text: language of subtitle
3526@item Chapters: number of chapters, list of chapters
3527@end itemize
3528
3529MediaInfo supports the following formats:
3530
3531@itemize
3532@item Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1,
3533MPEG-2, MPEG-4, DVD (VOB)...
3534@item Video Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
3535@item Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
3536@item Subtitles: SRT, SSA, ASS, SAMI...
3537@end itemize\n")
3538 (license license:bsd-2)))
3539
d5fa2777
EJ
3540;; TODO also have a GUI version available
3541(define-public mediainfo
3542 (package
3543 (name "mediainfo")
87de620e 3544 (version "20.08")
d5fa2777
EJ
3545 (source (origin
3546 (method url-fetch)
f528588a
PN
3547 ;; Warning: This source has proved unreliable 1 time at least.
3548 ;; Consider an alternate source or report upstream if this
3549 ;; happens again.
d5fa2777
EJ
3550 (uri (string-append "https://mediaarea.net/download/source/"
3551 name "/" version "/"
4c1f5ea3 3552 name "_" version ".tar.xz"))
d5fa2777
EJ
3553 (sha256
3554 (base32
87de620e 3555 "1baf2dj5s3g1x4ssqli1b2r1203syk42m09zhp36qcinmfixv11l"))))
d5fa2777
EJ
3556 (native-inputs
3557 `(("autoconf" ,autoconf)
3558 ("automake" ,automake)
3559 ("libtool" ,libtool)
3560 ("pkg-config" ,pkg-config)
3561 ("zlib" ,zlib)
c695fb76 3562 ("libmediainfo" ,libmediainfo)
d5fa2777
EJ
3563 ("libzen" ,libzen)))
3564 (build-system gnu-build-system)
3565 (arguments
3566 '(#:tests? #f ; lacks tests
3567 #:phases
3568 ;; build scripts not in root of archive
3569 (modify-phases %standard-phases
2f17187f 3570 (add-after 'unpack 'change-to-build-dir
d5fa2777 3571 (lambda _
2f17187f 3572 (chdir "Project/GNU/CLI")
f528588a 3573 #t)))))
d5fa2777
EJ
3574 (home-page "https://mediaarea.net/en/MediaInfo")
3575 (synopsis "Utility for reading media metadata")
3576 (description "MediaInfo is a utility used for retrieving technical
3577information and other metadata about audio or video files. It supports the
3578many codecs and formats supported by libmediainfo.")
3579 (license license:bsd-2)))
fa379a5b
CL
3580
3581(define-public livemedia-utils
3582 (package
3583 (name "livemedia-utils")
ecdc2f82 3584 (version "2019.05.29")
fa379a5b
CL
3585 (source (origin
3586 (method url-fetch)
3587 (uri (string-append
517c66c0 3588 "https://download.videolan.org/contrib/live555/live."
fa379a5b
CL
3589 version ".tar.gz"))
3590 (sha256
3591 (base32
ecdc2f82 3592 "08i63jr8ihn1xiq5z5n3yls3yz6li5sg0s454l56p5bcvbrw81my"))))
fa379a5b
CL
3593 (build-system gnu-build-system)
3594 (arguments
ecdc2f82 3595 '(#:tests? #f ; no tests
fa379a5b
CL
3596 #:make-flags (list "CC=gcc"
3597 (string-append "LDFLAGS=-Wl,-rpath="
3598 (assoc-ref %outputs "out") "/lib")
3599 (string-append "PREFIX="
3600 (assoc-ref %outputs "out")))
3601 #:phases (modify-phases %standard-phases
3602 (add-before 'configure 'fix-makefiles-generation
3603 (lambda _
3604 (substitute* "genMakefiles"
3605 (("/bin/rm") "rm"))
3606 #t))
3607 (replace 'configure
3608 (lambda _
6b677bb0
TGR
3609 (invoke "./genMakefiles"
3610 "linux-with-shared-libraries"))))))
fa379a5b
CL
3611 (home-page "http://www.live555.com/liveMedia/")
3612 (synopsis "Set of C++ libraries for multimedia streaming")
3613 (description "This code forms a set of C++ libraries for multimedia
3614streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). The libraries
3615can be used to stream, receive, and process MPEG, H.265, H.264, H.263+, DV or
3616JPEG video, and several audio codecs. They can easily be extended to support
3617additional (audio and/or video) codecs, and can also be used to build basic
3618RTSP or SIP clients and servers.")
3619 (license license:lgpl3+)))
0dff4dd9
CL
3620
3621(define-public libdvbpsi
3622 (package
3623 (name "libdvbpsi")
1cb256ab 3624 (version "1.3.3")
0dff4dd9
CL
3625 (source (origin
3626 (method url-fetch)
3627 (uri (string-append
3628 "https://download.videolan.org/pub/libdvbpsi/"
3629 version "/libdvbpsi-" version ".tar.bz2"))
3630 (sha256
3631 (base32
1cb256ab 3632 "04h1l3vrkrdsrvkgzcr51adk10g6hxcxvgjphyyxz718ry5rkd82"))))
0dff4dd9
CL
3633 (build-system gnu-build-system)
3634 (home-page "https://www.videolan.org/developers/libdvbpsi.html")
3635 (synopsis "Library for decoding and generation of MPEG TS and DVB PSI
3636tables")
3637 (description "libdvbpsi is a simple library designed for decoding and
3638generation of MPEG TS and DVB PSI tables according to standards ISO/IEC 13818s
3639and ITU-T H.222.0.")
3640 (license license:lgpl2.1)))
6779ae27
JL
3641
3642(define-public ffms2
3643 (package
3644 (name "ffms2")
3645 (version "2.23")
b1eaede0 3646 (home-page "https://github.com/FFMS/ffms2")
6779ae27 3647 (source (origin
940fdd0c
RW
3648 (method git-fetch)
3649 (uri (git-reference
b0e7b699 3650 (url "https://github.com/FFMS/ffms2")
940fdd0c
RW
3651 (commit version)))
3652 (file-name (git-file-name name version))
6779ae27
JL
3653 (sha256
3654 (base32
940fdd0c 3655 "0dkz5b3gxq5p4xz0qqg6l2sigszrlsinz3skyf0ln4wf3zrvf8m5"))))
6779ae27
JL
3656 (build-system gnu-build-system)
3657 (arguments
3658 '(#:configure-flags
3659 (list "--enable-avresample")))
3660 (inputs
3661 `(("zlib" ,zlib)))
3662 (propagated-inputs
3663 `(("ffmpeg" ,ffmpeg)))
3664 (native-inputs
3665 `(("pkg-config" ,pkg-config)))
3666 (synopsis "Cross-platform wrapper around ffmpeg/libav")
3667 (description
3668 "FFMpegSource is a wrapper library around ffmpeg/libav that allows
3669programmers to access a standard API to open and decompress media files.")
3670 ;; sources are distributed under a different license that the binary.
3671 ;; see https://github.com/FFMS/ffms2/blob/master/COPYING
3672 (license license:gpl2+))); inherits from ffmpeg
c812f460
JL
3673
3674(define-public aegisub
3675 (package
3676 (name "aegisub")
3677 (version "3.2.2")
3678 (source (origin
3679 (method url-fetch)
3680 (uri (string-append
3681 "http://ftp.aegisub.org/pub/archives/releases/source/"
3682 name "-" version ".tar.xz"))
3683 (sha256
3684 (base32
18e56ad7 3685 "11b83qazc8h0iidyj1rprnnjdivj1lpphvpa08y53n42bfa36pn5"))
644af6c8 3686 (patches (search-patches "aegisub-icu59-include-unistr.patch"
e43e980f 3687 "aegisub-make43.patch"
644af6c8 3688 "aegisub-boost68.patch"))))
c812f460
JL
3689 (build-system gnu-build-system)
3690 (arguments
3691 `(#:configure-flags
3692 (list "--disable-update-checker"
3693 "--without-portaudio"
3694 "--without-openal"
18e56ad7
BH
3695 "--without-oss"
3696 "CXXFLAGS=-DU_USING_ICU_NAMESPACE=1")
c812f460
JL
3697 ;; tests require busted, a lua package we don't have yet
3698 #:tests? #f
3699 #:phases
3700 (modify-phases %standard-phases
3701 (add-before 'configure 'fix-ldflags
3702 (lambda _
18e56ad7 3703 (setenv "LDFLAGS" "-pthread")
f6974e15
BH
3704 #t))
3705 (add-after 'unpack 'fix-boost-headers
3706 (lambda _
3707 (substitute*
3708 '("src/subtitles_provider_libass.cpp"
3709 "src/colour_button.cpp"
3710 "src/video_provider_dummy.cpp"
3711 "./src/video_frame.cpp")
3712 (("#include <boost/gil/gil_all.hpp>")
3713 "#include <boost/gil.hpp>"))
3714 #t)))))
c812f460
JL
3715 (inputs
3716 `(("boost" ,boost)
c812f460
JL
3717 ("ffms2" ,ffms2)
3718 ("fftw" ,fftw)
3719 ("hunspell" ,hunspell)
3720 ("mesa" ,mesa)
3721 ("libass" ,libass)
3722 ("alsa-lib" ,alsa-lib)
3723 ("pulseaudio" ,pulseaudio)
3724 ("libx11" ,libx11)
3725 ("freetype" ,freetype)
3726 ("wxwidgets-gtk2" ,wxwidgets-gtk2)))
3727 (native-inputs
3728 `(("intltool" ,intltool)
2f095261 3729 ("desktop-file-utils" ,desktop-file-utils)
c812f460
JL
3730 ("pkg-config" ,pkg-config)))
3731 (home-page "http://www.aegisub.org/")
3732 (synopsis "Subtitle engine")
3733 (description
3734 "Aegisub is a tool for creating and modifying subtitles. Aegisub makes
3735it quick and easy to time subtitles to audio, and features many powerful
3736tools for styling them, including a built-in real-time video preview.")
3737 (license (list license:bsd-3 ; the package is licensed under the bsd-3, except
3738 license:mpl1.1 ; for vendor/universalchardet under the mpl1.1
3739 license:expat)))) ; and src/gl that is under a license similar
3740 ; the the Expat license, with a rewording (Software -> Materials). (called MIT
3741 ; by upstream). See https://github.com/Aegisub/Aegisub/blob/master/LICENCE
3742 ; src/MatroskaParser.(c|h) is under bsd-3 with permission from the author
3743
635f981b 3744(define-public gst-transcoder
3745 (package
3746 (name "gst-transcoder")
3747 (version "1.12.2")
3748 (source
3749 (origin
e7c7b10d
RW
3750 (method git-fetch)
3751 (uri (git-reference
b0e7b699 3752 (url "https://github.com/pitivi/gst-transcoder")
e7c7b10d
RW
3753 (commit version)))
3754 (file-name (git-file-name name version))
635f981b 3755 (sha256
3756 (base32
e7c7b10d 3757 "0nw1zykqc6c8xs3ri55pm00pwyz93z4y4nd880apfiwj7yv5p3az"))))
635f981b 3758 (build-system meson-build-system)
3759 (inputs
3760 `(("gobject-introspection" ,gobject-introspection)
3761 ("glib" ,glib)
3762 ("gstreamer" ,gstreamer)
3763 ("gst-plugins-base" ,gst-plugins-base)))
3764 (native-inputs
3765 `(("python" ,python)
3766 ("pkg-config" ,pkg-config)))
3767 (home-page "https://github.com/pitivi/gst-transcoder/")
3768 (synopsis "GStreamer Transcoding API")
3769 (description "GStreamer Transcoding API")
3770 (license license:lgpl2.1)))
e37bdc0f 3771
3772(define-public gavl
3773 (package
3774 (name "gavl")
3775 (version "1.4.0")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (string-append "mirror://sourceforge/gmerlin/"
3780 name "/" version "/"
3781 name "-" version ".tar.gz"))
3782 (file-name (string-append name "-" version ".tar.gz"))
3783 (sha256
3784 (base32
3785 "1kikkn971a14zzm7svi7190ldc14fjai0xyhpbcmp48s750sraji"))))
3786 (build-system gnu-build-system)
c178aa34
EF
3787 (arguments
3788 '(#:configure-flags '("LIBS=-lm")))
e37bdc0f 3789 (native-inputs
3790 `(("pkg-config" ,pkg-config)
3791 ("doxygen" ,doxygen)))
3792 (home-page "http://gmerlin.sourceforge.net")
3793 (synopsis "Low level library for multimedia API building")
3794 (description
3795 "Gavl is short for Gmerlin Audio Video Library. It is a low level
3796library, upon which multimedia APIs can be built. Gavl handles all the
3797details of audio and video formats like colorspaces, sample rates,
3798multichannel configurations, etc. It provides standardized definitions for
3799those formats as well as container structures for carrying audio samples or
3800video images inside an application.
3801
3802In addition, it handles the sometimes ugly task of converting between all
3803these formats and provides some elementary operations (copying, scaling,
3804alpha blending etc).")
3805 (license license:gpl3)))
49e1d76d 3806
3807(define-public frei0r-plugins
3808 (package
3809 (name "frei0r-plugins")
1debba19 3810 (version "1.7.0")
49e1d76d 3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (string-append "https://files.dyne.org/frei0r/"
3815 "frei0r-plugins-" version ".tar.gz"))
3816 (sha256
3817 (base32
1debba19 3818 "0fjji3060r4fwr7vn91lwfzl80lg3my9lkp94kbyw8xwz7qgh7qv"))))
49e1d76d 3819 (build-system gnu-build-system)
3820 (arguments
3821 `(#:phases
3822 (modify-phases %standard-phases
1debba19 3823 (add-after 'unpack 'patch-Makefile
49e1d76d 3824 (lambda _
1debba19
MB
3825 ;; XXX: The 1.7.0 Makefile looks for files that have slightly different
3826 ;; names in the tarball. Try removing this for future versions.
3827 (substitute* "Makefile.in"
3828 (("README\\.md ChangeLog TODO AUTHORS")
3829 "README.txt ChangeLog.txt TODO.txt AUTHORS.txt"))
3830 #t)))))
63181c85 3831 ;; TODO: opencv for additional face detection filters.
49e1d76d 3832 (inputs
3833 `(("gavl" ,gavl)
3834 ("cairo" ,cairo)))
3835 (native-inputs
1debba19 3836 `(("pkg-config" ,pkg-config)))
49e1d76d 3837 (home-page "https://www.dyne.org/software/frei0r/")
3838 (synopsis "Minimalistic plugin API for video effects")
3839 (description
3840 "Frei0r is a minimalistic plugin API for video effects.
3841The main emphasis is on simplicity for an API that will round up
3842the most common video effects into simple filters, sources and
3843mixers that can be controlled by parameters. Frei0r wants to
3844provide a way to share these simple effects between many
3845applications, avoiding their reimplementation by different projects.
3846It counts more than 100 plugins.")
3847 (license (list license:gpl2+
3848 ;; The following files are licensed as LGPL2.1+:
3849 ;; src/generator/ising0r/ising0r.c
3850 ;; src/generator/onecol0r/onecol0r.cpp
3851 ;; src/generator/nois0r/nois0r.cpp
3852 ;; src/generator/lissajous0r/lissajous0r.cpp
3853 ;; src/filter/ndvi/gradientlut.hpp
3854 ;; src/filter/ndvi/ndvi.cpp
3855 ;; src/filter/facedetect/facedetect.cpp
3856 license:lgpl2.1+))))
eb3e41c9
LC
3857
3858(define-public motion
3859 (package
3860 (name "motion")
a9e9c738 3861 (version "4.2.2")
eb3e41c9
LC
3862 (home-page "https://motion-project.github.io/")
3863 (source (origin
2ea678fa
TGR
3864 (method git-fetch)
3865 (uri (git-reference
b0e7b699 3866 (url "https://github.com/Motion-Project/motion")
2ea678fa 3867 (commit (string-append "release-" version))))
eb3e41c9
LC
3868 (sha256
3869 (base32
a9e9c738 3870 "05c1gx75xy2hw49x6vkydvwxbr80kipsc3nr906k3hq8735svx6f"))
2ea678fa 3871 (file-name (git-file-name name version))))
eb3e41c9
LC
3872 (build-system gnu-build-system)
3873 (native-inputs
464f5447 3874 `(("autoconf" ,autoconf-wrapper)
eb3e41c9 3875 ("automake" ,automake)
33bddd30 3876 ("gettext" ,gettext-minimal)
eb3e41c9
LC
3877 ("pkg-config" ,pkg-config)))
3878 (inputs
4bd428a7 3879 `(("libjpeg" ,libjpeg-turbo)
b87840f0 3880 ("ffmpeg" ,ffmpeg)
c3069cd1 3881 ("libmicrohttpd" ,libmicrohttpd)
eb3e41c9
LC
3882 ("sqlite" ,sqlite)))
3883 (arguments
3884 '(#:phases (modify-phases %standard-phases
189be331 3885 (replace 'bootstrap
eb3e41c9
LC
3886 (lambda _
3887 (patch-shebang "version.sh")
3888 (invoke "autoreconf" "-vfi"))))
3889 #:configure-flags '("--sysconfdir=/etc")
3890 #:make-flags (list (string-append "sysconfdir="
3891 (assoc-ref %outputs "out")
3892 "/etc"))
3893
a9e9c738 3894 #:tests? #f)) ; no 'check' target
eb3e41c9
LC
3895 (synopsis "Detect motion from video signals")
3896 (description
3897 "Motion is a program that monitors the video signal from one or more
3898cameras and is able to detect if a significant part of the picture has
3899changed. Or in other words, it can detect motion.")
3900
3901 ;; Some files say "version 2" and others "version 2 or later".
3902 (license license:gpl2)))
f27f264e
PN
3903
3904(define-public subdl
3905 (let ((commit "4cf5789b11f0ff3f863b704b336190bf968cd471")
3906 (revision "1"))
3907 (package
3908 (name "subdl")
3909 (version (git-version "1.0.3" revision commit))
3910 (source (origin
3911 (method git-fetch)
3912 (uri (git-reference
b0e7b699 3913 (url "https://github.com/alexanderwink/subdl")
f27f264e
PN
3914 (commit commit)))
3915 (file-name (git-file-name name version))
3916 (sha256
3917 (base32
3918 "0kmk5ck1j49q4ww0lvas2767kwnzhkq0vdwkmjypdx5zkxz73fn8"))))
3919 (build-system trivial-build-system)
3920 (arguments
3921 `(#:modules ((guix build utils))
3922 #:builder (begin
3923 (use-modules (guix build utils))
3924 (let* ((out (assoc-ref %outputs "out"))
3925 (bin (string-append out "/bin"))
3926 (source (assoc-ref %build-inputs "source"))
3927 (python (assoc-ref %build-inputs "python")))
3928 (install-file (string-append source "/subdl") bin)
3929 (patch-shebang (string-append bin "/subdl")
3930 (list (string-append python "/bin")))))))
3931 (inputs `(("python" ,python)))
3932 (synopsis "Command-line tool for downloading subtitles from opensubtitles.org")
3933 (description "Subdl is a command-line tool for downloading subtitles from
3934opensubtitles.org. By default, it will search for English subtitles, display
3935the results, download the highest-rated result in the requested language and
3936save it to the appropriate filename.")
3937 (license license:gpl3+)
3938 (home-page "https://github.com/alexanderwink/subdl"))))
eb88e2c1
CL
3939
3940(define-public l-smash
3941 (package
3942 (name "l-smash")
3943 (version "2.14.5")
3944 (source (origin
45b2eff0
RW
3945 (method git-fetch)
3946 (uri (git-reference
b0e7b699 3947 (url "https://github.com/l-smash/l-smash")
45b2eff0
RW
3948 (commit (string-append "v" version))))
3949 (file-name (git-file-name name version))
eb88e2c1
CL
3950 (sha256
3951 (base32
45b2eff0 3952 "0rcq9727im6kd8da8b7kzzbzxdldvmh5nsljj9pvr4m3lj484b02"))))
eb88e2c1
CL
3953 (build-system gnu-build-system)
3954 (arguments
3955 `(#:tests? #f ;no tests
3956 #:make-flags
3957 (list (string-append "LDFLAGS=-Wl,-L.,-rpath="
3958 (assoc-ref %outputs "out") "/lib"))
3959 #:phases
3960 (modify-phases %standard-phases
3961 ;; configure fails if it is followed by CONFIG_SHELL
3962 (replace 'configure
3963 (lambda* (#:key outputs #:allow-other-keys)
3964 (let ((out (assoc-ref outputs "out")))
3965 (invoke "./configure" (string-append "--prefix=" out)
3966 "--disable-static")))))))
3967 (native-inputs
3968 `(("which" ,which)))
3969 (home-page "https://l-smash.github.io/l-smash/")
3970 (synopsis "MP4 multiplexer and demultiplexer library")
3971 (description
3972 "L-SMASH is a cross-platform library that handles the ISO base media file
3973format and some of its derived file formats, including MP4. It operates as a
3974multiplexer and demultiplexer, and can mux video and audio in several formats
3975using standalone executable files.")
3976 (license license:isc)))
a0135eee
LF
3977
3978(define-public qtfaststart
3979 (package
3980 (name "qtfaststart")
3981 (version "1.8")
3982 (source (origin
3983 (method url-fetch)
3984 (uri (pypi-uri "qtfaststart" version))
3985 (sha256
3986 (base32
3987 "0hcjfik8hhb1syqvyh5c6aillpvzal26nkjflcq1270z64aj6i5h"))))
3988 (build-system python-build-system)
3989 (arguments
3990 '(#:tests? #f)) ; no test suite
3991 (synopsis "Move QuickTime and MP4 metadata to the beginning of the file")
3992 (description "qtfaststart enables streaming and pseudo-streaming of
3993QuickTime and MP4 files by moving metadata and offset information to the
3994beginning of the file. It can also print some useful information about the
3995structure of the file. This program is based on qt-faststart.c from the FFmpeg
3996project, which is released into the public domain, as well as ISO 14496-12:2005
3997(the official spec for MP4), which can be obtained from the ISO or found
3998online.")
3999 (home-page "https://github.com/danielgtaylor/qtfaststart")
4000 (license license:expat)))
485638cd
LF
4001
4002(define-public vidstab
ad64f271
LF
4003 (let ((commit "aeabc8daa7904f9edf7441a11f293965a5ef53b8")
4004 (revision "0"))
4005 (package
4006 (name "vidstab")
4007 (version (git-version "1.1.0" revision commit))
4008 (source (origin
4009 (method git-fetch)
4010 (uri (git-reference
b0e7b699 4011 (url "https://github.com/georgmartius/vid.stab")
ad64f271
LF
4012 (commit commit)))
4013 (file-name (git-file-name name version))
4014 (sha256
4015 (base32
4016 "042iy0f3khwzr68djzvqgn301sy21ljvkf52rnc2c73q7ircnzzn"))))
4017 (build-system cmake-build-system)
4018 (arguments
4019 '(#:tests? #f)) ; tests are not run as part of standard build process
4020 (home-page "http://public.hronopik.de/vid.stab/")
4021 (synopsis "Video stabilization library")
4022 (description "Vidstab is a video stabilization library which can be used
485638cd
LF
4023with FFmpeg. A video acquired using a hand-held camera or a camera mounted on a
4024vehicle typically suffers from undesirable shakes and jitters. Activities such
4025as surfing, skiing, riding and walking while shooting videos are especially
4026prone to erratic camera shakes. Vidstab targets these video contents to help
4027create smoother and stable videos.")
ad64f271 4028 (license license:gpl2+))))
579a9cde
EB
4029
4030(define-public libopenshot
4031 (package
4032 (name "libopenshot")
747953c4 4033 (version "0.2.5")
579a9cde
EB
4034 (source (origin
4035 (method git-fetch)
4036 (uri (git-reference
4037 (url "https://github.com/OpenShot/libopenshot")
4038 (commit (string-append "v" version))))
4039 (file-name (git-file-name name version))
4040 (sha256
4041 (base32
747953c4 4042 "1mxjkgjmjzgf628y3rscc6rqf55hxgjpmvwxlncfk1216i5xskwp"))
579a9cde
EB
4043 (modules '((guix build utils)))
4044 (snippet '(begin
4045 ;; Allow overriding of the python installation dir
4046 (substitute* "src/bindings/python/CMakeLists.txt"
4047 (("(SET\\(PYTHON_MODULE_PATH.*)\\)" _ set)
4048 (string-append set " CACHE PATH "
4049 "\"Python bindings directory\")")))
277becbb 4050 (delete-file-recursively "thirdparty")
4994174f 4051 #t))))
579a9cde
EB
4052 (build-system cmake-build-system)
4053 (native-inputs
4054 `(("pkg-config" ,pkg-config)
4055 ("python" ,python)
4056 ("swig" ,swig)
4057 ("unittest++" ,unittest-cpp)))
4058 (propagated-inputs ;all referenced in installed headers
4059 `(("cppzmq" ,cppzmq)
4060 ("ffmpeg" ,ffmpeg)
4061 ("imagemagick" ,imagemagick)
4062 ("jsoncpp" ,jsoncpp)
4063 ("libopenshot-audio" ,libopenshot-audio)
ad656e70
EF
4064 ("qtbase" ,qtbase)
4065 ("qtmultimedia" ,qtmultimedia)
579a9cde
EB
4066 ("zeromq" ,zeromq)))
4067 (arguments
4068 `(#:configure-flags
4069 (list (string-append "-DPYTHON_MODULE_PATH:PATH=" %output "/lib/python"
4070 ,(version-major+minor (package-version python))
4071 "/site-packages")
4072 "-DUSE_SYSTEM_JSONCPP:BOOL=ON")
4073 #:phases
4074 (modify-phases %standard-phases
4075 (add-before 'configure 'set-vars
4076 (lambda* (#:key inputs #:allow-other-keys)
4077 (setenv "LIBOPENSHOT_AUDIO_DIR"
4078 (assoc-ref inputs "libopenshot-audio"))
4079 (setenv "ZMQDIR"
4080 (assoc-ref inputs "zeromq"))
4081 (setenv "UNITTEST_DIR"
4082 (string-append (assoc-ref inputs "unittest++")
4083 "/include/UnitTest++"))
4084 #t)))))
4085 (home-page "https://openshot.org")
4086 (synopsis "Video-editing, animation, and playback library")
4087 (description "OpenShot Library (libopenshot) is a powerful C++ video
4088editing library with a multi-threaded and feature rich video editing
4089API. It includes bindings for Python, Ruby, and other languages.")
4090 (license license:lgpl3+)))
69a3fcc0
EB
4091
4092(define-public openshot
4093 (package
4094 (name "openshot")
5020a263 4095 (version "2.5.1")
69a3fcc0
EB
4096 (source (origin
4097 (method git-fetch)
4098 (uri (git-reference
4099 (url "https://github.com/OpenShot/openshot-qt")
4100 (commit (string-append "v" version))))
4101 (file-name (git-file-name name version))
4102 (sha256
4103 (base32
5020a263 4104 "0qc5i0ay6j2wab1whl41sjb71cj02pg6y79drf7asrprq8b2rmfq"))
2afb7939
EF
4105 (modules '((guix build utils)))
4106 (snippet
4107 '(begin
5020a263 4108 ;; TODO: Unbundle jquery and others from src/timeline/media
2afb7939 4109 (delete-file-recursively "src/images/fonts") #t))))
69a3fcc0
EB
4110 (build-system python-build-system)
4111 (inputs
4112 `(("ffmpeg" ,ffmpeg)
2afb7939 4113 ("font-ubuntu" ,font-ubuntu)
69a3fcc0
EB
4114 ("libopenshot" ,libopenshot)
4115 ("python" ,python)
4116 ("python-pyqt" ,python-pyqt)
4117 ("python-pyzmq" ,python-pyzmq)
4118 ("python-requests" ,python-requests)
4119 ("qtsvg" ,qtsvg)))
4120 (arguments
e7228f0c 4121 `(#:modules ((guix build python-build-system)
a512aa91
EF
4122 (guix build qt-utils)
4123 (guix build utils))
4124 #:imported-modules (,@%python-build-system-modules
4125 (guix build qt-utils))
69a3fcc0
EB
4126 #:phases (modify-phases %standard-phases
4127 (delete 'build) ;install phase does all the work
e7228f0c
EF
4128 (replace 'check
4129 (lambda _
4130 (setenv "QT_QPA_PLATFORM" "offscreen")
4131 (invoke "python" "src/tests/query_tests.py")))
2afb7939
EF
4132 (add-after 'unpack 'patch-font-location
4133 (lambda* (#:key inputs #:allow-other-keys)
4134 (let ((font (assoc-ref inputs "font-ubuntu")))
4135 (substitute* "src/classes/app.py"
4136 (("info.IMAGES_PATH") (string-append "\"" font "\""))
4137 (("fonts") "share/fonts/truetype")))
4138 #t))
69a3fcc0
EB
4139 (add-before 'install 'set-tmp-home
4140 (lambda _
4141 ;; src/classes/info.py "needs" to create several
4142 ;; directories in $HOME when loaded during build
4143 (setenv "HOME" "/tmp")
4144 #t))
4145 (add-after 'install 'wrap-program
a512aa91
EF
4146 (lambda* (#:key outputs #:allow-other-keys)
4147 (let ((out (assoc-ref outputs "out")))
4148 (wrap-qt-program out "openshot-qt"))
4149 #t)))))
5020a263 4150 (home-page "https://www.openshot.org/")
69a3fcc0
EB
4151 (synopsis "Video editor")
4152 (description "OpenShot takes your videos, photos, and music files and
4153helps you create the film you have always dreamed of. Easily add sub-titles,
4154transitions, and effects and then export your film to many common formats.")
4155 (license license:gpl3+)))
8c380a01
EF
4156
4157(define-public dav1d
4158 (package
4159 (name "dav1d")
edeb6f17 4160 (version "0.7.1")
8c380a01
EF
4161 (source
4162 (origin
4163 (method url-fetch)
10f2ae01
MB
4164 (uri (string-append "https://downloads.videolan.org/pub/videolan"
4165 "/dav1d/" version "/dav1d-" version ".tar.xz"))
8c380a01 4166 (sha256
89ccc9ce 4167 (base32
edeb6f17 4168 "1hnkfcg57bv5rib6cnj39dy1jx0q7zi5fb2fz52hf2y0bv8bad1k"))))
8c380a01
EF
4169 (build-system meson-build-system)
4170 (native-inputs `(("nasm" ,nasm)))
4171 (home-page "https://code.videolan.org/videolan/dav1d")
4172 (synopsis "AV1 decoder")
4173 (description "dav1d is a new AV1 cross-platform decoder, and focused on
4174speed and correctness.")
4175 (license license:bsd-2)))
20b4aa6b
RH
4176
4177(define-public wlstream
4178 (let ((commit "182076a94562b128c3a97ecc53cc68905ea86838")
4179 (revision "1"))
4180 (package
4181 (name "wlstream")
4182 (version (git-version "0.0" revision commit))
4183 (source
1d591432
RH
4184 (origin
4185 (method git-fetch)
4186 (uri (git-reference
b0e7b699 4187 (url "https://github.com/atomnuker/wlstream")
1d591432
RH
4188 (commit commit)))
4189 (file-name (git-file-name name version))
4190 (sha256
4191 (base32
4192 "01qbcgfl3g9kfwn1jf1z9pdj3bvf5lmg71d1vwkcllc2az24bjqp"))))
20b4aa6b
RH
4193 (build-system meson-build-system)
4194 (native-inputs `(("libdrm" ,libdrm)
4195 ("pkg-config" ,pkg-config)))
4196 (inputs `(("ffmpeg" ,ffmpeg)
4197 ("pulseaudio" ,pulseaudio)
4198 ("wayland" ,wayland)
4199 ("wayland-protocols" ,wayland-protocols)))
4200 (home-page "https://github.com/atomnuker/wlstream")
4201 (synopsis "Screen capture tool for Wayland sessions")
4202 (description "Wlstream is a screen capture tool for recording audio and
4203video from a Wayland session.")
4204 (license license:lgpl2.1+))))
08486153
PN
4205
4206(define-public gaupol
4207 (package
4208 (name "gaupol")
ce5b71f9 4209 (version "1.7")
08486153
PN
4210 (source (origin
4211 (method git-fetch)
4212 (uri (git-reference
4213 (url "https://github.com/otsaloma/gaupol/")
4214 (commit version)))
4215 (file-name (git-file-name name version))
4216 (sha256
4217 (base32
ce5b71f9 4218 "1cp0ka8hzma1dxiisdhl2fznxklj2pl63vkdqcd91lrblghdj6x9"))))
08486153
PN
4219 (build-system python-build-system)
4220 (native-inputs
4221 `(("gettext" ,gettext-minimal)
4222 ("pkg-config" ,pkg-config)))
4223 (inputs
4224 `(("python-pygobject" ,python-pygobject)
4225 ("gtk+" ,gtk+)
4226 ("python-pycairo" ,python-pycairo) ; Required or else clicking on a subtitle line fails.
4227 ("python-chardet" ,python-chardet) ; Optional: Character encoding detection.
4228 ("gtkspell3" ,gtkspell3) ; Optional: Inline spell-checking.
4229 ("iso-codes" ,iso-codes) ; Optional: Translations.
4230 ("gstreamer" ,gstreamer)
4231 ("gst-libav" ,gst-libav)
4232 ("gst-plugins-base" ,gst-plugins-base)
4233 ("gst-plugins-good" ,gst-plugins-good)
4234 ("gst-plugins-bad" ,gst-plugins-bad)
4235 ("gst-plugins-ugly" ,gst-plugins-ugly)))
4236 (arguments
4237 `(#:tests? #f ; Tests seem to require networking.
4238 #:phases
4239 (modify-phases %standard-phases
4240 ;; gaupol's setup.py script does not support one of the Python build
4241 ;; system's default flags, "--single-version-externally-managed".
4242 (replace 'install
4243 (lambda* (#:key outputs #:allow-other-keys)
4244 (invoke "python" "setup.py" "install"
4245 (string-append "--prefix=" (assoc-ref outputs "out"))
4246 "--root=/")))
4247 (add-after 'install 'wrap-gaupol
4248 (lambda* (#:key outputs #:allow-other-keys)
4249 (let ((out (assoc-ref outputs "out"))
4250 (gst-plugin-path (getenv "GST_PLUGIN_SYSTEM_PATH"))
4251 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
4252 (wrap-program (string-append out "/bin/gaupol")
4253 `("GST_PLUGIN_SYSTEM_PATH" ":" prefix (,gst-plugin-path))
4254 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
4255 #t))
4256 (add-after 'unpack 'patch-data-dir
4257 ;; Fix some path variables that setup.py seems to garble.
4258 (lambda* (#:key outputs #:allow-other-keys)
4259 (let ((out (assoc-ref outputs "out")))
4260 (substitute* "setup.py"
4261 (("DATA_DIR = \\{!r\\}\"\\.format\\(data_dir\\)")
4262 (string-append "DATA_DIR = '" out "/share/gaupol'\""))
4263 (("LOCALE_DIR = \\{!r\\}\"\\.format\\(locale_dir\\)")
4264 (string-append "LOCALE_DIR = '" out "/share/locale'\"")))
4265 #t))))))
4266 (synopsis "Editor for text-based subtitles")
4267 (description
4268 "Gaupol supports multiple subtitle file formats and provides means of
4269creating subtitles, editing texts and timing subtitles to match video. The
4270user interface features a builtin video player and is designed with attention
4271to convenience of translating and batch processing of multiple documents.")
4272 (home-page "https://otsaloma.io/gaupol/")
4273 (license license:gpl3+)))
97115892
PN
4274
4275(define-public theorafile
4276 (let ((commit "404b14d7602b5918d117eaa64e8aa6601ede8593"))
4277 (package
4278 (name "theorafile")
4279 (version (git-version "0.0.0" "1" commit))
4280 (source
4281 (origin
4282 (method git-fetch)
4283 (uri (git-reference
b0e7b699 4284 (url "https://github.com/FNA-XNA/Theorafile")
97115892
PN
4285 (commit commit)))
4286 (file-name (git-file-name name version))
4287 (sha256
4288 (base32 "128c3pjzqbgrj020glm5jd6ss18vl19471lj615w2brjwb7c1f0z"))))
4289 (build-system gnu-build-system)
4290 (arguments
4291 '(#:make-flags '("CC=gcc")
4292 #:phases
4293 (modify-phases %standard-phases
4294 (delete 'configure)
4295 (replace 'check
4296 (lambda _
4297 (setenv "CC" "gcc")
4298 (invoke "make" "test")))
4299 (replace 'install
4300 (lambda* (#:key outputs #:allow-other-keys)
4301 (let ((out (assoc-ref outputs "out")))
4302 (install-file "libtheorafile.so" (string-append out "/lib"))
4303 (install-file "theorafile.h" (string-append out "/include")))
4304 #t)))))
4305 (native-inputs
4306 ;; For tests.
4307 `(("sdl2" ,sdl2)))
4308 (home-page "https://github.com/FNA-XNA/Theorafile")
4309 (synopsis "Ogg Theora Video Decoder Library")
4310 (description "Theorafile is a library for quickly and easily decoding Ogg
4311Theora videos. Theorafile was written to be used for FNA's VideoPlayer.")
4312 (license license:zlib))))
b9d8aa09
RV
4313
4314(define-public dvdbackup
4315 (package
4316 (name "dvdbackup")
4317 (version "0.4.2")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (string-append "mirror://sourceforge/dvdbackup/dvdbackup/"
4322 "dvdbackup-" version "/"
4323 "dvdbackup-" version ".tar.xz"))
4324 (sha256
4325 (base32 "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g"))))
4326 (build-system gnu-build-system)
4327 (inputs
4328 `(("libdvdcss" ,libdvdcss)
4329 ("libdvdread" ,libdvdread)))
4330 (home-page "http://dvdbackup.sourceforge.net")
4331 (synopsis "DVD video ripper")
4332 (description
4333 "A simple command line tool to backup video from a DVD. Decrypts the
4334DVD using @command{libdvdcss}, but does @strong{not} demux, remux,
4335transcode or reformat the videos in any way, producing perfect backups.")
4336 (license license:gpl3+)))
554f5b62
LF
4337
4338(define-public svt-av1
4339 (package
4340 (name "svt-av1")
349f2a9d 4341 (version "0.8.4")
554f5b62
LF
4342 (source (origin
4343 (method git-fetch)
4344 (uri (git-reference
b0e7b699 4345 (url "https://github.com/OpenVisualCloud/SVT-AV1")
554f5b62
LF
4346 (commit (string-append "v" version))))
4347 (file-name (git-file-name name version))
4348 (sha256
4349 (base32
349f2a9d 4350 "0xad35q9sv5w0iihcf9q1f1m7br5anl3vsyx9svnx128iqf0n997"))))
554f5b62
LF
4351 (build-system cmake-build-system)
4352 ;; SVT-AV1 only supports Intel-compatible CPUs.
4353 (supported-systems '("x86_64-linux" "i686-linux"))
4354 (arguments
4355 ;; The test suite tries to download test data and git clone a 3rd-party
4356 ;; fork of libaom. Skip it.
4357 `(#:tests? #f
4358 #:phases
4359 (modify-phases %standard-phases
4360 (add-after 'install 'install-documentation
4361 (lambda* (#:key outputs #:allow-other-keys)
4362 (let* ((out (assoc-ref %outputs "out"))
4363 (doc (string-append out "/share/doc/svt-av1-" ,version)))
4364 (copy-recursively "../source/Docs" doc)
4365 #t))))))
4366 (native-inputs
4367 `(("yasm" ,yasm)))
4368 (synopsis "AV1 video codec")
4369 (description "SVT-AV1 is an AV1 codec implementation. The encoder is a
4370work-in-progress, aiming to support video-on-demand and live streaming
4371applications. It only supports Intel-compatible CPUs (x86).")
4372 (home-page "https://github.com/OpenVisualCloud/SVT-AV1")
4373 (license license:bsd-2)))
618819aa
GLV
4374
4375(define-public w-scan
4376 (package
4377 (name "w-scan")
4378 (version "20170107")
4379 (source
4380 (origin
4381 (method url-fetch)
4382 (uri (string-append "https://www.gen2vdr.de/wirbel/w_scan/w_scan-"
4383 version ".tar.bz2"))
4384 (sha256
4385 (base32 "1zkgnj2sfvckix360wwk1v5s43g69snm45m0drnzyv7hgf5g7q1q"))))
4386 (build-system gnu-build-system)
4387 (synopsis "Scan ATSC/DVB-C/DVB-S/DVB-T channels")
4388 (description
4389 "This is a small command line utility used to perform frequency scans for
4390DVB and ATSC transmissions without initial tuning data. It can print the
4391result in several formats:
4392@itemize
4393@item VDR channels.conf,
4394@item czap/tzap/xine/mplayer channels.conf,
4395@item Gstreamer dvbsrc plugin,
4396@item VLC xspf playlist,
4397@item XML,
4398@item initial tuning data for scan or dvbv5-scan.
4399@end itemize\n")
4400 (home-page "https://www.gen2vdr.de/wirbel/w_scan/index2.html")
4401 (license license:gpl2+)))
ca4b5588
LF
4402
4403(define-public rav1e
4404 (package
4405 (name "rav1e")
4fc95933 4406 (version "0.3.3")
ca4b5588
LF
4407 (source
4408 (origin
4409 (method url-fetch)
4410 (uri (crate-uri "rav1e" version))
4411 (file-name
4412 (string-append name "-" version ".tar.gz"))
4413 (sha256
4414 (base32
4fc95933 4415 "053bh8hc6jj81ydq4gcak01b0ady59hvkl7d87im3y8nafg7xzb4"))))
ca4b5588
LF
4416 (build-system cargo-build-system)
4417 (arguments
4418 `(#:cargo-inputs
e26d6cc7 4419 (("rust-aom-sys" ,rust-aom-sys-0.1)
ca4b5588 4420 ("rust-arbitrary" ,rust-arbitrary-0.2)
e26d6cc7
EF
4421 ("rust-arg-enum-proc-macro" ,rust-arg-enum-proc-macro-0.3)
4422 ("rust-arrayvec" ,rust-arrayvec-0.5)
4423 ("rust-backtrace" ,rust-backtrace-0.3)
e26d6cc7
EF
4424 ("rust-bitstream-io" ,rust-bitstream-io-0.8)
4425 ("rust-byteorder" ,rust-byteorder-1.3)
4426 ("rust-cfg-if" ,rust-cfg-if-0.1)
4427 ("rust-clap" ,rust-clap-2)
4fc95933 4428 ("rust-console" ,rust-console-0.11)
e26d6cc7 4429 ("rust-dav1d-sys" ,rust-dav1d-sys-0.3)
4fc95933
EF
4430 ("rust-fern" ,rust-fern-0.6)
4431 ("rust-image" ,rust-image-0.23)
e26d6cc7 4432 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
4fc95933 4433 ("rust-itertools" ,rust-itertools-0.9)
e26d6cc7
EF
4434 ("rust-ivf" ,rust-ivf-0.1)
4435 ("rust-libc" ,rust-libc-0.2)
ca4b5588 4436 ("rust-log" ,rust-log-0.4)
e26d6cc7
EF
4437 ("rust-noop-proc-macro" ,rust-noop-proc-macro-0.2)
4438 ("rust-num-derive" ,rust-num-derive-0.3)
4439 ("rust-num-traits" ,rust-num-traits-0.2)
4440 ("rust-paste" ,rust-paste-0.1)
ca4b5588 4441 ("rust-rand" ,rust-rand-0.7)
e26d6cc7
EF
4442 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
4443 ("rust-rayon" ,rust-rayon-1)
4444 ("rust-rust-hawktracer" ,rust-rust-hawktracer-0.7)
4445 ("rust-scan-fmt" ,rust-scan-fmt-0.2)
271161db 4446 ("rust-serde" ,rust-serde-1)
e26d6cc7
EF
4447 ("rust-signal-hook" ,rust-signal-hook-0.1)
4448 ("rust-simd-helpers" ,rust-simd-helpers-0.1)
4fc95933 4449 ("rust-thiserror" ,rust-thiserror-1.0)
e26d6cc7
EF
4450 ("rust-toml" ,rust-toml-0.5)
4451 ("rust-y4m" ,rust-y4m-0.5)
1209cc47 4452 ("rust-cc" ,rust-cc-1)
e26d6cc7
EF
4453 ("rust-nasm-rs" ,rust-nasm-rs-0.1)
4454 ("rust-rustc-version" ,rust-rustc-version-0.2)
ca4b5588
LF
4455 ("rust-vergen" ,rust-vergen-3.1))
4456 #:cargo-development-inputs
4fc95933
EF
4457 (("rust-assert-cmd" ,rust-assert-cmd-1)
4458 ("rust-criterion" ,rust-criterion-0.3)
e26d6cc7
EF
4459 ("rust-interpolate-name" ,rust-interpolate-name-0.2)
4460 ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
ca4b5588 4461 ("rust-rand" ,rust-rand-0.7)
e26d6cc7 4462 ("rust-rand-chacha" ,rust-rand-chacha-0.2)
ca4b5588
LF
4463 ("rust-semver" ,rust-semver-0.9))
4464 #:phases
4465 (modify-phases %standard-phases
4466 (replace 'build
4467 (lambda* (#:key outputs #:allow-other-keys)
4468 (let ((out (assoc-ref outputs "out")))
4469 (invoke "cargo" "cinstall" "--release"
4470 (string-append "--prefix=" out))))))))
4471 (native-inputs
4472 `(("cargo-c" ,rust-cargo-c)))
4473 (inputs
4474 `(("nasm" ,nasm)))
4475 (home-page "https://github.com/xiph/rav1e/")
4476 (synopsis "The fastest and safest AV1 encoder")
4477 (description
4478 "The fastest and safest AV1 encoder.")
4479 (license license:bsd-2)))
d4f86c8b
RW
4480
4481(define-public peek
4482 (package
4483 (name "peek")
4484 (version "1.5.1")
4485 (source
4486 (origin
4487 (method git-fetch)
4488 (uri (git-reference
b0e7b699 4489 (url "https://github.com/phw/peek")
d4f86c8b
RW
4490 (commit version)))
4491 (file-name (git-file-name name version))
4492 (sha256
4493 (base32 "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x"))))
4494 (build-system meson-build-system)
4495 (arguments '(#:glib-or-gtk? #t))
4496 (inputs
4497 `(("gtk+" ,gtk+)))
4498 (native-inputs
4499 `(("desktop-file-utils" ,desktop-file-utils) ; for update-desktop-database
4500 ("gettext" ,gettext-minimal)
4501 ("glib:bin" ,glib "bin") ; for glib-compile-resources
4502 ("gtk+-bin" ,gtk+ "bin") ; For gtk-update-icon-cache
4503 ("pkg-config" ,pkg-config)
4504 ("vala" ,vala)))
4505 (home-page "https://github.com/phw/peek")
4506 (synopsis "Simple animated GIF screen recorder")
4507 (description
4508 "Peek makes it easy to create short screencasts of a screen area. It was
4509built for the specific use case of recording screen areas, e.g. for easily
4510showing UI features of your own apps or for showing a bug in bug reports.
4511With Peek, you simply place the Peek window over the area you want to record
4512and press \"Record\". Peek is optimized for generating animated GIFs, but you
4513can also directly record to WebM or MP4 if you prefer.")
4514 (license license:gpl3+)))
58a361fe
AM
4515
4516(define-public wf-recorder
4517 (package
4518 (name "wf-recorder")
4519 (version "0.2.1")
4520 (source (origin
4521 (method git-fetch)
4522 (uri (git-reference
b0e7b699 4523 (url "https://github.com/ammen99/wf-recorder")
58a361fe
AM
4524 (commit (string-append "v" version))))
4525 (file-name (git-file-name name version))
4526 (sha256
4527 (base32
4528 "1cw6kpcbl33wh95pvy32xrsrm6kkk1awccr3phyh885xjs3b3iim"))))
4529 (build-system meson-build-system)
4530 (native-inputs
4531 `(("pkg-config" ,pkg-config)))
4532 (inputs
4533 `(("ffmpeg" ,ffmpeg)
4534 ("pulseaudio" ,pulseaudio)
4535 ("wayland" ,wayland)
4536 ("wayland-protocols" ,wayland-protocols)
4537 ("libx264" ,libx264)))
4538 (home-page "https://github.com/ammen99/wf-recorder")
4539 (synopsis "Screen recorder for wlroots-based compositors")
4540 (description
4541 "@code{wf-recorder} is a utility program for screen recording of
4542wlroots-based compositors. More specifically, those that support
4543@code{wlr-screencopy-v1} and @code{xdg-output}.")
4544 (license license:expat)))
c941b312
LC
4545
4546(define-public guvcview
4547 (package
4548 (name "guvcview")
4549 (version "2.0.6")
4550 (source (origin
4551 (method url-fetch)
4552 (uri (string-append "mirror://sourceforge/guvcview/source/guvcview-"
4553 "src-" version ".tar.gz"))
4554 (sha256
4555 (base32
4556 "11byyfpkcik7wvf2qic77zjamfr2rhji97dpj1gy2fg1bvpiqf4m"))))
4557 (build-system gnu-build-system)
4558 (arguments
4559 ;; There are no tests and "make check" would fail on an intltool error.
4560 '(#:tests? #f))
4561 (native-inputs
4562 `(("pkg-config" ,pkg-config)
4563 ("intltool" ,intltool)))
4564 (inputs
4565 `(("gtk+" ,gtk+)
4566 ("eudev" ,eudev)
4567 ("libusb" ,libusb)
4568 ("v4l-utils" ,v4l-utils) ;libv4l2
4569 ("ffmpeg" ,ffmpeg) ;libavcodec, libavutil
4570 ("sdl2" ,sdl2)
4571 ("gsl" ,gsl)
4572 ("portaudio" ,portaudio)
4573 ("alsa-lib" ,alsa-lib)))
4574 (home-page "http://guvcview.sourceforge.net/")
4575 (synopsis "Control your webcam and capture videos and images")
4576 (description
4577 "GTK+ UVC Viewer (guvcview) is a graphical application to control a
4578webcam accessible with Video4Linux (V4L2) and to capture videos and images.
4579It provides control over precise settings of the webcam such as exposure,
4580brightness, contrast, and frame rate.")
4581
4582 ;; 'COPYING' is GPLv3 but source headers say GPLv2+.
4583 (license license:gpl2+)))
3123cdaf
EF
4584
4585(define-public get-iplayer
4586 (package
4587 (name "get-iplayer")
4588 (version "3.26")
4589 (source
4590 (origin
4591 (method git-fetch)
4592 (uri (git-reference
4593 (url "https://github.com/get-iplayer/get_iplayer")
4594 (commit (string-append "v" version))))
4595 (file-name (git-file-name name version))
4596 (sha256
4597 (base32
4598 "0lsz5hz1ia5j612540rb0f31y7j2k5gf7x5i43l8k06b90wi73d6"))))
4599 (build-system perl-build-system)
4600 (arguments
4601 `(#:tests? #f ; no tests
4602 #:phases
4603 (modify-phases %standard-phases
4604 (delete 'configure)
4605 (delete 'build)
4606 (replace 'install
4607 (lambda* (#:key outputs #:allow-other-keys)
4608 (let* ((out (assoc-ref outputs "out"))
4609 (bin (string-append out "/bin"))
4610 (man (string-append out "/share/man/man1")))
4611 (install-file "get_iplayer" bin)
4612 (install-file "get_iplayer.cgi" bin)
4613 (install-file "get_iplayer.1" man))
4614 #t))
4615 (add-after 'install 'wrap-program
4616 (lambda* (#:key inputs outputs #:allow-other-keys)
4617 (let* ((out (assoc-ref outputs "out"))
4618 (perllib (string-append out "/lib/perl5/site_perl/"
4619 ,(package-version perl))))
4620 (wrap-program (string-append out "/bin/get_iplayer")
4621 `("PERL5LIB" ":"
4622 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
4623 (wrap-program (string-append out "/bin/get_iplayer.cgi")
4624 `("PERL5LIB" ":"
4625 prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
4626 #t))))))
4627 (inputs
4628 `(("perl-mojolicious" ,perl-mojolicious)
4629 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
4630 ("perl-xml-libxml" ,perl-xml-libxml)))
4631 (home-page "https://github.com/get-iplayer/get_iplayer")
4632 (synopsis "Download or stream available BBC iPlayer TV and radio programmes")
4633 (description "@code{get_iplayer} lists, searches and records BBC iPlayer
4634TV/Radio, BBC Podcast programmes. Other third-party plugins may be available.
4635@code{get_iplayer} has three modes: recording a complete programme for later
4636playback, streaming a programme directly to a playback application, such as
4637mplayer; and as a @dfn{Personal Video Recorder} (PVR), subscribing to search
4638terms and recording programmes automatically. It can also stream or record live
4639BBC iPlayer output.")
4640 (license license:gpl3+)))
68c858de
PN
4641
4642(define-public ogmtools
4643 (package
4644 (name "ogmtools")
4645 (version "1.5")
4646 (source (origin
4647 (method url-fetch)
4648 (uri (string-append "https://www.bunkus.org/videotools/ogmtools/ogmtools-"
4649 version
4650 ".tar.bz2"))
4651 (sha256
4652 (base32
4653 "1spx81p5wf59ksl3r3gvf78d77sh7gj8a6lw773iv67bphfivmn8"))))
4654 (build-system gnu-build-system)
4655 (inputs
4656 `(("libvorbis" ,libvorbis)
4657 ("libdvdread" ,libdvdread)))
4658 (synopsis "Information, extraction or creation for OGG media streams")
4659 (description
4660 "These tools allow information about (@code{ogminfo}) or extraction from
4661\(@code{ogmdemux}) or creation of (@code{ogmmerge}) OGG media streams. It
4662includes @code{dvdxchap} tool for extracting chapter information from DVD.")
4663 (license license:gpl2)
4664 (home-page "https://www.bunkus.org/videotools/ogmtools/")))