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