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